summaryrefslogtreecommitdiff
path: root/indra/llappearance/llpolyskeletaldistortion.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2016-05-18 17:07:54 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2016-05-18 17:07:54 -0400
commite8afa4c413efac9f58fbfccb1c14c114317a383e (patch)
tree6286b65863b85fcdf1c756933cd558815ade1272 /indra/llappearance/llpolyskeletaldistortion.cpp
parentbb2c147c26efad32f72fd7cdf1378824a4b0085d (diff)
SL-315 - fixed collision volume scale issue in resetSkeleton()
Diffstat (limited to 'indra/llappearance/llpolyskeletaldistortion.cpp')
-rw-r--r--indra/llappearance/llpolyskeletaldistortion.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp
index f75603e083..fdce8d97ce 100644
--- a/indra/llappearance/llpolyskeletaldistortion.cpp
+++ b/indra/llappearance/llpolyskeletaldistortion.cpp
@@ -34,6 +34,7 @@
#include "llpolymorph.h"
#include "llwearable.h"
#include "llfasttimer.h"
+#include "llcallstack.h"
#include "llpolyskeletaldistortion.h"
@@ -134,7 +135,6 @@ LLPolySkeletalDistortion::~LLPolySkeletalDistortion()
BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
{
- //llassert(mInfo == NULL);
if (info->mID < 0)
{
return FALSE;
@@ -154,6 +154,7 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
continue;
}
+ // BENTO remove?
//if (mJointScales.find(joint) != mJointScales.end())
//{
// LL_WARNS() << "Scale deformation already supplied for joint " << joint->getName() << "." << LL_ENDL;
@@ -177,6 +178,7 @@ 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;
@@ -213,9 +215,16 @@ void LLPolySkeletalDistortion::apply( ESex avatar_sex )
joint = iter->first;
LLVector3 newScale = joint->getScale();
LLVector3 scaleDelta = iter->second;
- newScale = newScale + (effective_weight * scaleDelta) - (mLastWeight * scaleDelta);
+ 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 );
+
+ // BENTO debugging stuff can be pulled.
+ std::stringstream ostr;
+ ostr << "LLPolySkeletalDistortion::apply, id " << getID() << " " << getName() << " effective wt " << effective_weight << " last wt " << mLastWeight << " scaleDelta " << scaleDelta << " offset " << offset;
+ LLScopedContextString str(ostr.str());
+
joint->setScale(newScale);
}