3
0
Fork 0
mirror of https://github.com/JulianGro/overte.git synced 2025-04-30 23:53:58 +02:00

Fixed Inverse logic and Cleanup

This commit is contained in:
Menithal 2017-09-01 00:31:59 +03:00
parent 663e8514de
commit 0e3fc64f63
4 changed files with 5 additions and 6 deletions

View file

@ -287,7 +287,7 @@ bool RenderableModelEntityItem::getAnimationFrame() {
auto animation = getAnimation();
if (animation && animation->isLoaded()) {
const QVector<FBXAnimationFrame>& frames = animation->getFramesReference(); // NOTE: getFrames() is too heavy
auto& fbxJoints = animation->getGeometry().joints;
@ -322,10 +322,10 @@ bool RenderableModelEntityItem::getAnimationFrame() {
if (index >= 0) {
glm::mat4 translationMat;
if (allowTranslation){
if (!allowTranslation){
translationMat = glm::translate(originalFbxJoints[index].translation);
}
else if (!allowTranslation && index < translations.size()) {
else if (allowTranslation && index < translations.size()) {
translationMat = glm::translate(translations[index]);
}

View file

@ -206,7 +206,7 @@ bool AnimationPropertyGroup::appendToEditPacket(OctreePacketData* packetData,
int& propertyCount,
OctreeElement::AppendState& appendState) const {
bool successPropertyFits = true;
bool successPropertyFits = true;
APPEND_ENTITY_PROPERTY(PROP_ANIMATION_URL, getURL());
APPEND_ENTITY_PROPERTY(PROP_ANIMATION_ALLOW_TRANSLATION, getAllowTranslation());

View file

@ -156,7 +156,6 @@ int ModelEntityItem::readEntitySubclassDataFromBuffer(const unsigned char* data,
READ_ENTITY_PROPERTY(PROP_JOINT_TRANSLATIONS_SET, QVector<bool>, setJointTranslationsSet);
READ_ENTITY_PROPERTY(PROP_JOINT_TRANSLATIONS, QVector<glm::vec3>, setJointTranslations);
return bytesRead;
}

View file

@ -152,7 +152,7 @@ protected:
bool isAnimatingSomething() const;
rgbColor _color;
QString _modelURL;
QString _modelURL;
QUrl _parsedModelURL;
QString _compoundShapeURL;