From 7f4e0c206cd0cce1140863168c8bb48340b89529 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Wed, 19 Nov 2014 09:13:03 -0800 Subject: [PATCH] cache indeces to toe joints --- libraries/fbx/src/FBXReader.cpp | 14 ++++++++++++-- libraries/fbx/src/FBXReader.h | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/libraries/fbx/src/FBXReader.cpp b/libraries/fbx/src/FBXReader.cpp index 4ffd3f6286..e0f175d60d 100644 --- a/libraries/fbx/src/FBXReader.cpp +++ b/libraries/fbx/src/FBXReader.cpp @@ -1067,6 +1067,8 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping) QString jointHeadID; QString jointLeftHandID; QString jointRightHandID; + QString jointLeftToeID; + QString jointRightToeID; QVector humanIKJointNames; for (int i = 0;; i++) { @@ -1166,11 +1168,17 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping) } else if (name == jointHeadName) { jointHeadID = getID(object.properties); - } else if (name == jointLeftHandName) { + } else if (name == jointLeftHandName || name == "LeftHand" || name == "joint_L_hand") { jointLeftHandID = getID(object.properties); - } else if (name == jointRightHandName) { + } else if (name == jointRightHandName || name == "RightHand" || name == "joint_R_hand") { jointRightHandID = getID(object.properties); + + } else if (name == "LeftToe" || name == "joint_L_toe" || name == "LeftToe_End") { + jointLeftToeID = getID(object.properties); + + } else if (name == "RightToe" || name == "joint_R_toe" || name == "RightToe_End") { + jointRightToeID = getID(object.properties); } int humanIKJointIndex = humanIKJointNames.indexOf(name); if (humanIKJointIndex != -1) { @@ -1595,6 +1603,8 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping) geometry.headJointIndex = modelIDs.indexOf(jointHeadID); geometry.leftHandJointIndex = modelIDs.indexOf(jointLeftHandID); geometry.rightHandJointIndex = modelIDs.indexOf(jointRightHandID); + geometry.leftToeJointIndex = modelIDs.indexOf(jointLeftToeID); + geometry.rightToeJointIndex = modelIDs.indexOf(jointRightToeID); foreach (const QString& id, humanIKJointIDs) { geometry.humanIKJointIndices.append(modelIDs.indexOf(id)); diff --git a/libraries/fbx/src/FBXReader.h b/libraries/fbx/src/FBXReader.h index 3c9e918686..4a585c2476 100644 --- a/libraries/fbx/src/FBXReader.h +++ b/libraries/fbx/src/FBXReader.h @@ -201,6 +201,8 @@ public: int headJointIndex; int leftHandJointIndex; int rightHandJointIndex; + int leftToeJointIndex; + int rightToeJointIndex; QVector humanIKJointIndices;