Right fix

This commit is contained in:
luiscuenca 2019-02-26 18:29:55 -07:00
parent f47ec09927
commit ff7995ae18

View file

@ -1281,7 +1281,9 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr
joint.geometricScaling = fbxModel.geometricScaling;
joint.isSkeletonJoint = fbxModel.isLimbNode;
hfmModel.hasSkeletonJoints = (hfmModel.hasSkeletonJoints || joint.isSkeletonJoint);
if (applyUpAxisZRotation && joint.parentIndex == -1 && !joint.isSkeletonJoint) {
joint.rotation *= upAxisZRotation;
}
glm::quat combinedRotation = joint.preRotation * joint.rotation * joint.postRotation;
if (joint.parentIndex == -1) {
joint.transform = hfmModel.offset * glm::translate(joint.translation) * joint.preTransform *
@ -1676,6 +1678,7 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr
}
if (applyUpAxisZRotation) {
hfmModelPtr->meshExtents.rotate(upAxisZRotation);
hfmModelPtr->bindExtents.rotate(upAxisZRotation);
}
return hfmModelPtr;