summaryrefslogtreecommitdiff
path: root/indra/llappearance/llpolyskeletaldistortion.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2016-09-02 14:34:06 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2016-09-02 14:34:06 -0400
commita2875ba53ec02235a0db5734264108c0f0898269 (patch)
treef9dc66183550cda2c3478f72fa7018094da3cd19 /indra/llappearance/llpolyskeletaldistortion.cpp
parent227eb6c4a49724fe513f5d67af68d355d173f951 (diff)
parentd07a8b9965b54fca34b239a51af46b996a58d553 (diff)
merge
Diffstat (limited to 'indra/llappearance/llpolyskeletaldistortion.cpp')
-rw-r--r--indra/llappearance/llpolyskeletaldistortion.cpp24
1 files changed, 8 insertions, 16 deletions
diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp
index 890292a1f6..5662fdd6bc 100644
--- a/indra/llappearance/llpolyskeletaldistortion.cpp
+++ b/indra/llappearance/llpolyskeletaldistortion.cpp
@@ -150,16 +150,12 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
LLJoint* joint = mAvatar->getJoint(bone_info->mBoneName);
if (!joint)
{
+ // There's no point continuing after this error - means
+ // that either the skeleton or lad file is broken.
LL_WARNS() << "Joint " << bone_info->mBoneName << " not found." << LL_ENDL;
- continue;
+ return FALSE;
}
- // BENTO remove?
- //if (mJointScales.find(joint) != mJointScales.end())
- //{
- // LL_WARNS() << "Scale deformation already supplied for joint " << joint->getName() << "." << LL_ENDL;
- //}
-
// store it
mJointScales[joint] = bone_info->mScaleDeformation;
@@ -178,11 +174,6 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
if (bone_info->mHasPositionDeformation)
{
- // BENTO remove?
- //if (mJointOffsets.find(joint) != mJointOffsets.end())
- //{
- // LL_WARNS() << "Offset deformation already supplied for joint " << joint->getName() << "." << LL_ENDL;
- //}
mJointOffsets[joint] = bone_info->mPositionDeformation;
}
}
@@ -218,9 +209,10 @@ void LLPolySkeletalDistortion::apply( ESex avatar_sex )
LLVector3 offset = (effective_weight - mLastWeight) * scaleDelta;
newScale = newScale + offset;
//An aspect of attached mesh objects (which contain joint offsets) that need to be cleaned up when detached
- // needed? // joint->storeScaleForReset( newScale );
+ // needed?
+ // joint->storeScaleForReset( newScale );
- // BENTO debugging stuff can be pulled.
+ // BENTO for detailed stack tracing of params.
std::stringstream ostr;
ostr << "LLPolySkeletalDistortion::apply, id " << getID() << " " << getName() << " effective wt " << effective_weight << " last wt " << mLastWeight << " scaleDelta " << scaleDelta << " offset " << offset;
LLScopedContextString str(ostr.str());
@@ -237,8 +229,8 @@ void LLPolySkeletalDistortion::apply( ESex avatar_sex )
LLVector3 positionDelta = iter->second;
newPosition = newPosition + (effective_weight * positionDelta) - (mLastWeight * positionDelta);
// SL-315
- // BENTO - allow attachment positions to override requests from the params.
- joint->setPosition(newPosition, true);
+ bool allow_attachment_pos_overrides = true;
+ joint->setPosition(newPosition, allow_attachment_pos_overrides);
}
if (mLastWeight != mCurWeight && !mIsAnimating)