diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-04-18 19:31:29 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-04-18 19:31:29 -0400 |
commit | 223f0907092966e595890830be76ddf77776e123 (patch) | |
tree | 804245970427512f25ae133c45ce9b601ddbaf06 /indra/newview | |
parent | 5adc782341fd2de7a791f989c991c07d3060b862 (diff) |
SL-371 - more tracking on partial joint overrides
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llvoavatar.cpp | 44 | ||||
-rwxr-xr-x | indra/newview/llvoavatar.h | 1 |
2 files changed, 45 insertions, 0 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index d3ea864800..a82f92b01a 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5339,6 +5339,49 @@ void LLVOAvatar::addAttachmentPosOverridesForObject(LLViewerObject *vo) { postPelvisSetRecalc(); } + + showAttachmentPosOverrides(); +} + +//----------------------------------------------------------------------------- +// showAttachmentPosOverrides +//----------------------------------------------------------------------------- +void LLVOAvatar::showAttachmentPosOverrides() const +{ + LLVector3 pos; + LLUUID mesh_id; + S32 count = 0; + + // Bones + for (avatar_joint_list_t::const_iterator iter = mSkeleton.begin(); + iter != mSkeleton.end(); ++iter) + { + const LLJoint* pJoint = (*iter); + if (pJoint && pJoint->hasAttachmentPosOverride(pos,mesh_id)) + { + pJoint->showAttachmentPosOverrides(getFullname()); + count++; + } + } + + // Attachment points + for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin(); + iter != mAttachmentPoints.end(); + ++iter) + { + const LLViewerJointAttachment *attachment_pt = (*iter).second; + if (attachment_pt && attachment_pt->hasAttachmentPosOverride(pos,mesh_id)) + { + attachment_pt->showAttachmentPosOverrides(getFullname()); + count++; + } + } + + if (count) + { + LL_DEBUGS("Avatar") << avString() << " end of pos overrides" << LL_ENDL; + LL_DEBUGS("Avatar") << "=================================" << LL_ENDL; + } } //----------------------------------------------------------------------------- @@ -5553,6 +5596,7 @@ BOOL LLVOAvatar::loadSkeletonNode () if (info->mHasPosition) { attachment->setOriginalPosition(info->mPosition); + attachment->setDefaultPosition(info->mPosition); } if (info->mHasRotation) diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 76b40fb90a..0e58d7f626 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -204,6 +204,7 @@ public: void resetJointPositionsOnDetach(const LLUUID& mesh_id); void resetJointPositionsOnDetach(LLViewerObject *vo); void clearAttachmentPosOverrides(); + void showAttachmentPosOverrides() const; /*virtual*/ const LLUUID& getID() const; /*virtual*/ void addDebugText(const std::string& text); |