diff options
author | Aura Linden <aura@lindenlab.com> | 2015-11-13 04:12:13 -0800 |
---|---|---|
committer | Aura Linden <aura@lindenlab.com> | 2015-11-13 04:12:13 -0800 |
commit | 99219cbe80d56dbd9d6f75689304ce2759592868 (patch) | |
tree | edddfd8003e918e5f922c500560b4ffcc2dd0689 /indra/newview/llskinningutil.cpp | |
parent | 146919fa764bed09bfa5e27bc30d02ce2afb6188 (diff) | |
parent | b72480ddb9b01202f1bbe4bfb84595549faeacf3 (diff) |
Eliminated joint_offset file. Added aliases attrib to bones in avatar_skeleton.xml.
Diffstat (limited to 'indra/newview/llskinningutil.cpp')
-rw-r--r-- | indra/newview/llskinningutil.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp index 5fd2248060..279035d769 100644 --- a/indra/newview/llskinningutil.cpp +++ b/indra/newview/llskinningutil.cpp @@ -85,9 +85,7 @@ U32 get_proxy_joint_index(U32 joint_index, LLVOAvatar *avatar, std::vector<std:: U32 j_proxy = get_valid_joint_index(joint_names[joint_index], avatar, joint_names); LLJoint *joint = avatar->getJoint(joint_names[j_proxy]); llassert(joint); - // BENTO - test of simple push-to-base-ancestor - // complexity reduction scheme. Find the first - // ancestor that's not flagged as extended, or the + // Find the first ancestor that's not flagged as extended, or the // last ancestor that's rigged in this mesh, whichever // comes first. while (1) @@ -113,6 +111,7 @@ U32 get_proxy_joint_index(U32 joint_index, LLVOAvatar *avatar, std::vector<std:: void LLSkinningUtil::initClass() { sIncludeEnhancedSkeleton = gSavedSettings.getBOOL("IncludeEnhancedSkeleton"); + // BENTO - remove MaxJointsPerMeshObject before release. sMaxJointsPerMeshObject = gSavedSettings.getU32("MaxJointsPerMeshObject"); } @@ -233,7 +232,18 @@ void LLSkinningUtil::initSkinningMatrixPalette( { LLJoint* joint = avatar->getJoint(skin->mJointNames[j]); mat[j] = skin->mInvBindMatrix[j]; - mat[j] *= joint->getWorldMatrix(); + if (joint) + { + mat[j] *= joint->getWorldMatrix(); + } + else + { + // This shouldn't happen - in mesh upload, skinned + // rendering should be disabled unless all joints are + // valid. In other cases of skinned rendering, invalid + // joints should already have been removed during remap. + LL_WARNS_ONCE("Avatar") << "Rigged to invalid joint name " << skin->mJointNames[j] << LL_ENDL; + } } } |