summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2016-03-10 10:50:11 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2016-03-10 10:50:11 -0500
commit6e6b247fbe9fb951aa452c1abc0a1b2d38a01756 (patch)
tree1998f97ad662875894c8a5e4148e0e1b84b134bf /indra/newview
parent05bd94268d99a34b4f4b1556e3088cbf134034f9 (diff)
SL-315 - avatar XML dump now includes all joints
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llvoavatar.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 9bee4380eb..2b588ea0ac 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -8026,6 +8026,7 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara
}
}
+ // Bones
avatar_joint_list_t::iterator iter = mSkeleton.begin();
avatar_joint_list_t::iterator end = mSkeleton.end();
for (; iter != end; ++iter)
@@ -8033,10 +8034,33 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara
LLJoint* pJoint = (*iter);
const LLVector3& pos = pJoint->getPosition();
const LLVector3& scale = pJoint->getScale();
- apr_file_printf( file, "\t\t<joint name=\"%s\" position=\"%f %f %f\" scale=\"%f %f %f\"/>\n",
+ apr_file_printf( file, "\t\t<bone name=\"%s\" position=\"%f %f %f\" scale=\"%f %f %f\"/>\n",
pJoint->getName().c_str(), pos[0], pos[1], pos[2], scale[0], scale[1], scale[2]);
}
+ // Collision volumes
+ for (S32 i = 0; i < mNumCollisionVolumes; i++)
+ {
+ LLAvatarJointCollisionVolume* pJoint = &mCollisionVolumes[i];
+ const LLVector3& pos = pJoint->getPosition();
+ const LLVector3& scale = pJoint->getScale();
+ apr_file_printf( file, "\t\t<collision_volume name=\"%s\" position=\"%f %f %f\" scale=\"%f %f %f\"/>\n",
+ pJoint->getName().c_str(), pos[0], pos[1], pos[2], scale[0], scale[1], scale[2]);
+ }
+
+ // Attachment joints
+ for (LLVOAvatar::attachment_map_t::const_iterator iter = mAttachmentPoints.begin();
+ iter != mAttachmentPoints.end(); ++iter)
+ {
+ LLViewerJointAttachment* pJoint = iter->second;
+ if (!pJoint) continue;
+ const LLVector3& pos = pJoint->getPosition();
+ const LLVector3& scale = pJoint->getScale();
+ apr_file_printf( file, "\t\t<attachment_point name=\"%s\" position=\"%f %f %f\" scale=\"%f %f %f\"/>\n",
+ pJoint->getName().c_str(), pos[0], pos[1], pos[2], scale[0], scale[1], scale[2]);
+ }
+
+ // Joint pos overrides
for (iter = mSkeleton.begin(); iter != end; ++iter)
{
LLJoint* pJoint = (*iter);