put the lean joint back in

This commit is contained in:
amantley 2018-12-06 16:24:06 -08:00
parent edab74caa4
commit ca0133a2a6
3 changed files with 8 additions and 0 deletions

View file

@ -482,6 +482,7 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr
QString jointEyeRightName = "EyeRight";
QString jointNeckName = "Neck";
QString jointRootName = "Hips";
QString jointLeanName = "Spine";
QString jointHeadName = "Head";
QString jointLeftHandName = "LeftHand";
QString jointRightHandName = "RightHand";
@ -489,6 +490,7 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr
QString jointEyeRightID;
QString jointNeckID;
QString jointRootID;
QString jointLeanID;
QString jointHeadID;
QString jointLeftHandID;
QString jointRightHandID;
@ -612,6 +614,9 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr
} else if (name == jointRootName || (hfmModel.hfmToHifiJointNameMapping.contains(jointRootName) && (name == hfmModel.hfmToHifiJointNameMapping[jointRootName]))) {
jointRootID = getID(object.properties);
} else if (name == jointLeanName || (hfmModel.hfmToHifiJointNameMapping.contains(jointLeanName) && (name == hfmModel.hfmToHifiJointNameMapping[jointLeanName]))) {
jointLeanID = getID(object.properties);
} else if ((name == jointHeadName) || (hfmModel.hfmToHifiJointNameMapping.contains(jointHeadName) && (name == hfmModel.hfmToHifiJointNameMapping[jointHeadName]))) {
jointHeadID = getID(object.properties);
@ -1449,6 +1454,7 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr
hfmModel.rightEyeJointIndex = modelIDs.indexOf(jointEyeRightID);
hfmModel.neckJointIndex = modelIDs.indexOf(jointNeckID);
hfmModel.rootJointIndex = modelIDs.indexOf(jointRootID);
hfmModel.leanJointIndex = modelIDs.indexOf(jointLeanID);
hfmModel.headJointIndex = modelIDs.indexOf(jointHeadID);
hfmModel.leftHandJointIndex = modelIDs.indexOf(jointLeftHandID);
hfmModel.rightHandJointIndex = modelIDs.indexOf(jointRightHandID);

View file

@ -1186,6 +1186,7 @@ void GLTFSerializer::hfmDebugDump(const HFMModel& hfmModel) {
qCDebug(modelformat) << " rightEyeJointIndex =" << hfmModel.rightEyeJointIndex;
qCDebug(modelformat) << " neckJointIndex =" << hfmModel.neckJointIndex;
qCDebug(modelformat) << " rootJointIndex =" << hfmModel.rootJointIndex;
qCDebug(modelformat) << " leanJointIndex =" << hfmModel.leanJointIndex;
qCDebug(modelformat) << " headJointIndex =" << hfmModel.headJointIndex;
qCDebug(modelformat) << " leftHandJointIndex" << hfmModel.leftHandJointIndex;
qCDebug(modelformat) << " rightHandJointIndex" << hfmModel.rightHandJointIndex;

View file

@ -274,6 +274,7 @@ public:
int rightEyeJointIndex = -1;
int neckJointIndex = -1;
int rootJointIndex = -1;
int leanJointIndex = -1;
int headJointIndex = -1;
int leftHandJointIndex = -1;
int rightHandJointIndex = -1;