summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-04-24 02:37:35 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-04-24 02:37:35 +0300
commitc0ed9d28f19bcdde171842370e87eb82cf43b896 (patch)
tree527fd03e940f48f75a65ad31204248294185735a
parent9221c8a3f65aa14cad4fec03b7033ad800f6ba35 (diff)
SL-13080 Filter out default overrides
-rw-r--r--indra/newview/llfloatermodelpreview.cpp31
1 files changed, 23 insertions, 8 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 666406d039..083c2dab37 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1361,17 +1361,32 @@ void LLFloaterModelPreview::updateAvatarTab(bool highlight_overrides)
{
for (U32 j = 0; j < joint_count; ++j)
{
- const LLVector3& jointPos = skin->mAlternateBindMatrix[j].getTranslation();
+ const LLVector3& joint_pos = skin->mAlternateBindMatrix[j].getTranslation();
LLJointOverrideData &data = mJointOverrides[display_lod][skin->mJointNames[j]];
- if (data.mPosOverrides.size() > 0
- && (data.mPosOverrides.begin()->second - jointPos).lengthSquared() > (LL_JOINT_TRESHOLD_POS_OFFSET * LL_JOINT_TRESHOLD_POS_OFFSET))
+
+ LLJoint* pJoint = LLModelPreview::lookupJointByName(skin->mJointNames[j], mModelPreview);
+ if (pJoint)
{
- // File contains multiple meshes with conflicting joint offsets
- // preview may be incorrect, upload result might wary (depends onto
- // mesh_id that hasn't been generated yet).
- data.mHasConflicts = true;
+ // see how voavatar uses aboveJointPosThreshold
+ if (pJoint->aboveJointPosThreshold(joint_pos))
+ {
+ // valid override
+ if (data.mPosOverrides.size() > 0
+ && (data.mPosOverrides.begin()->second - joint_pos).lengthSquared() > (LL_JOINT_TRESHOLD_POS_OFFSET * LL_JOINT_TRESHOLD_POS_OFFSET))
+ {
+ // File contains multiple meshes with conflicting joint offsets
+ // preview may be incorrect, upload result might wary (depends onto
+ // mesh_id that hasn't been generated yet).
+ data.mHasConflicts = true;
+ }
+ data.mPosOverrides[model->getName()] = joint_pos;
+ }
+ else
+ {
+ // default value, it won't be accounted for by avatar
+ data.mModelsNoOverrides.insert(model->getName());
+ }
}
- data.mPosOverrides[model->getName()] = jointPos;
}
}
else