summaryrefslogtreecommitdiff
path: root/indra/newview/llskinningutil.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2018-06-04 14:43:06 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2018-06-04 14:43:06 +0100
commit228525aa27b05cc1aa8be27de4ae59f5ec590ae3 (patch)
treedde50d01034b34b0c4f15a6ed2fd13efe30eb1e8 /indra/newview/llskinningutil.cpp
parente86839fac19753d0fa4006296c7f8909fe781013 (diff)
SL-915 - tracking joint is rigged state
Diffstat (limited to 'indra/newview/llskinningutil.cpp')
-rw-r--r--indra/newview/llskinningutil.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp
index dba690242a..7adb2fa8d2 100644
--- a/indra/newview/llskinningutil.cpp
+++ b/indra/newview/llskinningutil.cpp
@@ -216,3 +216,28 @@ void LLSkinningUtil::getPerVertexSkinMatrix(
llassert(valid_weights);
}
+//static
+void LLSkinningUtil::initIsRiggedTo(const LLMeshSkinInfo* skin, LLVOAvatar *avatar, joint_rig_info_tab& rig_info_tab)
+{
+ S32 rigged_count = 0;
+ rig_info_tab.resize(LL_CHARACTER_MAX_ANIMATED_JOINTS);
+ for (U32 j = 0; j < skin->mJointNames.size(); ++j)
+ {
+ LLJoint *joint = NULL;
+ if (skin->mJointNums[j] == -1)
+ {
+ joint = avatar->getJoint(skin->mJointNames[j]);
+ if (joint)
+ {
+ skin->mJointNums[j] = joint->getJointNum();
+ }
+ }
+ S32 joint_num = skin->mJointNums[j];
+ if (joint_num != -1)
+ {
+ rig_info_tab[joint_num].setIsRiggedTo(true);
+ rigged_count++;
+ }
+ }
+ //LL_INFOS() << "rigged_count " << rigged_count << LL_ENDL;
+}