From b649847fe9f693b50b99cb73b7c641660812f5b7 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 24 Jun 2016 16:43:23 -0400 Subject: SL-124 - comment cleanup, fixed a crash if skinned mesh has no valid joint names defined --- indra/llappearance/llpolyskeletaldistortion.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'indra/llappearance/llpolyskeletaldistortion.cpp') diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp index fdce8d97ce..8e9b52e974 100644 --- a/indra/llappearance/llpolyskeletaldistortion.cpp +++ b/indra/llappearance/llpolyskeletaldistortion.cpp @@ -154,12 +154,6 @@ 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; - //} - // store it mJointScales[joint] = bone_info->mScaleDeformation; @@ -178,11 +172,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; } } @@ -237,8 +226,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) -- cgit v1.2.3 From 7f904fbcbd878b44b2ffe6c919e96c71756eece1 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 27 Jun 2016 08:48:15 -0400 Subject: SL-124 - code cleanup --- indra/llappearance/llpolyskeletaldistortion.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/llappearance/llpolyskeletaldistortion.cpp') diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp index 8e9b52e974..a427f7c754 100644 --- a/indra/llappearance/llpolyskeletaldistortion.cpp +++ b/indra/llappearance/llpolyskeletaldistortion.cpp @@ -207,12 +207,13 @@ 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. - std::stringstream ostr; - ostr << "LLPolySkeletalDistortion::apply, id " << getID() << " " << getName() << " effective wt " << effective_weight << " last wt " << mLastWeight << " scaleDelta " << scaleDelta << " offset " << offset; - LLScopedContextString str(ostr.str()); + // 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()); joint->setScale(newScale); } -- cgit v1.2.3 From 5ebf9b3caeb95f6f196786c37847d409e94df415 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 29 Jun 2016 09:41:06 -0400 Subject: SL-426 - strings.xml fix for pec attachments, SL-402 - diagnostics for investigation --- indra/llappearance/llpolyskeletaldistortion.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llappearance/llpolyskeletaldistortion.cpp') diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp index a427f7c754..e9750ae6f5 100644 --- a/indra/llappearance/llpolyskeletaldistortion.cpp +++ b/indra/llappearance/llpolyskeletaldistortion.cpp @@ -211,9 +211,9 @@ void LLPolySkeletalDistortion::apply( ESex avatar_sex ) // joint->storeScaleForReset( newScale ); // 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()); + 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); } -- cgit v1.2.3 From 95d9e85f9539c449f37c438b90a90e6ac73d3b87 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 9 Aug 2016 15:24:09 -0400 Subject: SL-109 - made viewer much less tolerant of bad data in avatar_skeleton.xml or avatar_lad.xml. If either of these is broken, there's no point trying to continue, more informative to just error out with an appropriate message. --- indra/llappearance/llpolyskeletaldistortion.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/llappearance/llpolyskeletaldistortion.cpp') diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp index e9750ae6f5..8d71335175 100644 --- a/indra/llappearance/llpolyskeletaldistortion.cpp +++ b/indra/llappearance/llpolyskeletaldistortion.cpp @@ -150,8 +150,10 @@ 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; } // store it -- cgit v1.2.3