From 79bb641310775c56cb742c5ea938d5681117585c Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 21 Aug 2014 14:18:35 -0400 Subject: MAINT-4158 WIP - fix for bug caused by multiple wearables with the same asset id --- indra/llappearance/llavatarappearance.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'indra/llappearance') diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 6fdf9e2e07..c1107f674e 100755 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -480,6 +480,18 @@ void LLAvatarAppearance::computeBodySize() knee.mV[VZ] * hip_scale.mV[VZ] - ankle.mV[VZ] * knee_scale.mV[VZ] - foot.mV[VZ] * ankle_scale.mV[VZ]; + // if (isSelf()) + // { + // LL_INFOS("Avatar") << "mAvatarOffset.mV[VZ] " << mAvatarOffset.mV[VZ] << LL_ENDL; + // LL_INFOS("Avatar") << "mPelvisToFoot " << mPelvisToFoot << LL_ENDL; + // LL_INFOS("Avatar") << "- hip.mV[VZ] " << hip.mV[VZ] << LL_ENDL; + // LL_INFOS("Avatar") << "- pelvis_scale.mV[VZ] " << pelvis_scale.mV[VZ] << LL_ENDL; + // LL_INFOS("Avatar") << "- knee.mV[VZ] " << knee.mV[VZ] << LL_ENDL; + // LL_INFOS("Avatar") << "- ankle.mV[VZ] " << ankle.mV[VZ] << LL_ENDL; + // LL_INFOS("Avatar") << "- knee_scale.mV[VZ] " << knee_scale.mV[VZ] << LL_ENDL; + // LL_INFOS("Avatar") << "- foot.mV[VZ] " << foot.mV[VZ] << LL_ENDL; + // LL_INFOS("Avatar") << "- ankle_scale.mV[VZ] " << ankle_scale.mV[VZ] << LL_ENDL; + // } LLVector3 new_body_size; new_body_size.mV[VZ] = mPelvisToFoot + @@ -490,6 +502,10 @@ void LLAvatarAppearance::computeBodySize() neck.mV[VZ] * chest_scale.mV[VZ] + chest.mV[VZ] * torso_scale.mV[VZ] + torso.mV[VZ] * pelvis_scale.mV[VZ]; + // if (isSelf()) + // { + // LL_INFOS("Avatar") << "new_body_size.mV[VZ] " << new_body_size.mV[VZ] << LL_ENDL; + // } // TODO -- measure the real depth and width new_body_size.mV[VX] = DEFAULT_AGENT_DEPTH; @@ -502,6 +518,11 @@ void LLAvatarAppearance::computeBodySize() { mBodySize = new_body_size; } + + // if (isSelf()) + // { + // LL_INFOS("Avatar") << "mBodySize.mV[VZ] " << mBodySize.mV[VZ] << LL_ENDL; + // } } //----------------------------------------------------------------------------- -- cgit v1.2.3 From 2cb14c7fdcf835816176d6edc0c05b99bcb39873 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 28 Aug 2014 17:32:22 -0400 Subject: MAINT-4158 WIP - track position overrides requested by attachments so they can be undone intelligently --- indra/llappearance/llavatarappearance.cpp | 2 +- indra/llappearance/llpolyskeletaldistortion.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llappearance') diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index c1107f674e..9904f454d6 100755 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -605,7 +605,7 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent info->mRot.mV[VZ], LLQuaternion::XYZ)); joint->setScale(info->mScale); - joint->setDefaultFromCurrentXform(); + //joint->setDefaultFromCurrentXform(); if (info->mIsJoint) { diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp index ea29cbd451..fbc312c426 100644 --- a/indra/llappearance/llpolyskeletaldistortion.cpp +++ b/indra/llappearance/llpolyskeletaldistortion.cpp @@ -213,7 +213,7 @@ void LLPolySkeletalDistortion::apply( ESex avatar_sex ) LLVector3 scaleDelta = iter->second; newScale = newScale + (effective_weight * scaleDelta) - (mLastWeight * scaleDelta); //An aspect of attached mesh objects (which contain joint offsets) that need to be cleaned up when detached - joint->storeScaleForReset( newScale ); + // needed? // joint->storeScaleForReset( newScale ); joint->setScale(newScale); } -- cgit v1.2.3 From 807f4dff74ee08d86895ee3329e985bb898eae24 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 28 Aug 2014 17:37:25 -0400 Subject: MAINT-4158 WIP - comment change --- indra/llappearance/llavatarappearance.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/llappearance') diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 9904f454d6..6c3bde20ca 100755 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -605,8 +605,6 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent info->mRot.mV[VZ], LLQuaternion::XYZ)); joint->setScale(info->mScale); - //joint->setDefaultFromCurrentXform(); - if (info->mIsJoint) { joint->setSkinOffset( info->mPivot ); -- cgit v1.2.3 From 2c0a0f4a5763d1f34ec1368dcc83ebb085c565e0 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 5 Sep 2014 15:05:51 -0400 Subject: MAINT-4158 cleanup --- indra/llappearance/llavatarappearance.cpp | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'indra/llappearance') diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 6c3bde20ca..c0ad8315af 100755 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -480,18 +480,6 @@ void LLAvatarAppearance::computeBodySize() knee.mV[VZ] * hip_scale.mV[VZ] - ankle.mV[VZ] * knee_scale.mV[VZ] - foot.mV[VZ] * ankle_scale.mV[VZ]; - // if (isSelf()) - // { - // LL_INFOS("Avatar") << "mAvatarOffset.mV[VZ] " << mAvatarOffset.mV[VZ] << LL_ENDL; - // LL_INFOS("Avatar") << "mPelvisToFoot " << mPelvisToFoot << LL_ENDL; - // LL_INFOS("Avatar") << "- hip.mV[VZ] " << hip.mV[VZ] << LL_ENDL; - // LL_INFOS("Avatar") << "- pelvis_scale.mV[VZ] " << pelvis_scale.mV[VZ] << LL_ENDL; - // LL_INFOS("Avatar") << "- knee.mV[VZ] " << knee.mV[VZ] << LL_ENDL; - // LL_INFOS("Avatar") << "- ankle.mV[VZ] " << ankle.mV[VZ] << LL_ENDL; - // LL_INFOS("Avatar") << "- knee_scale.mV[VZ] " << knee_scale.mV[VZ] << LL_ENDL; - // LL_INFOS("Avatar") << "- foot.mV[VZ] " << foot.mV[VZ] << LL_ENDL; - // LL_INFOS("Avatar") << "- ankle_scale.mV[VZ] " << ankle_scale.mV[VZ] << LL_ENDL; - // } LLVector3 new_body_size; new_body_size.mV[VZ] = mPelvisToFoot + @@ -502,10 +490,6 @@ void LLAvatarAppearance::computeBodySize() neck.mV[VZ] * chest_scale.mV[VZ] + chest.mV[VZ] * torso_scale.mV[VZ] + torso.mV[VZ] * pelvis_scale.mV[VZ]; - // if (isSelf()) - // { - // LL_INFOS("Avatar") << "new_body_size.mV[VZ] " << new_body_size.mV[VZ] << LL_ENDL; - // } // TODO -- measure the real depth and width new_body_size.mV[VX] = DEFAULT_AGENT_DEPTH; @@ -518,11 +502,6 @@ void LLAvatarAppearance::computeBodySize() { mBodySize = new_body_size; } - - // if (isSelf()) - // { - // LL_INFOS("Avatar") << "mBodySize.mV[VZ] " << mBodySize.mV[VZ] << LL_ENDL; - // } } //----------------------------------------------------------------------------- -- cgit v1.2.3 From 58e2d58daf603824872308245a451c2e32394706 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 30 Oct 2014 04:20:12 -0400 Subject: SL-93 - WIP on managing pelvis fixups using new joint offset framework --- indra/llappearance/llavatarappearance.cpp | 36 +++++++++++++++++++++++++++++++ indra/llappearance/llavatarappearance.h | 8 ++++++- 2 files changed, 43 insertions(+), 1 deletion(-) (limited to 'indra/llappearance') diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index c0ad8315af..d1eb389013 100755 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -675,6 +675,42 @@ void LLAvatarAppearance::clearSkeleton() mSkeleton.clear(); } +//------------------------------------------------------------------------ +// addPelvisFixup +//------------------------------------------------------------------------ +void LLAvatarAppearance::addPelvisFixup( F32 fixup, const LLUUID& mesh_id ) +{ + LLVector3 pos(0.0,0.0,fixup); + mPelvisFixups.add(mesh_id,pos); +} + +//------------------------------------------------------------------------ +// addPelvisFixup +//------------------------------------------------------------------------ +void LLAvatarAppearance::removePelvisFixup( const LLUUID& mesh_id ) +{ + mPelvisFixups.remove(mesh_id); +} + +//------------------------------------------------------------------------ +// hasPelvisFixup +//------------------------------------------------------------------------ +bool LLAvatarAppearance::hasPelvisFixup( F32& fixup, LLUUID& mesh_id ) const +{ + LLVector3 pos; + if (mPelvisFixups.findActiveOverride(mesh_id,pos)) + { + fixup = pos[2]; + return true; + } + return false; +} + +bool LLAvatarAppearance::hasPelvisFixup( F32& fixup ) const +{ + LLUUID mesh_id; + return hasPelvisFixup( fixup, mesh_id ); +} //----------------------------------------------------------------------------- // LLAvatarAppearance::buildCharacter() // Deferred initialization and rebuild of the avatar. diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h index 1e898026c0..a0ef49b7cb 100755 --- a/indra/llappearance/llavatarappearance.h +++ b/indra/llappearance/llavatarappearance.h @@ -152,11 +152,17 @@ protected: BOOL mIsBuilt; // state of deferred character building typedef std::vector avatar_joint_list_t; avatar_joint_list_t mSkeleton; - + LLPosOverrideMap mPelvisFixups; + //-------------------------------------------------------------------- // Pelvis height adjustment members. //-------------------------------------------------------------------- public: + void addPelvisFixup( F32 fixup, const LLUUID& mesh_id ); + void removePelvisFixup( const LLUUID& mesh_id ); + bool hasPelvisFixup( F32& fixup, LLUUID& mesh_id ) const; + bool hasPelvisFixup( F32& fixup ) const; + LLVector3 mBodySize; LLVector3 mAvatarOffset; protected: -- cgit v1.2.3