summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llprimitive/llmodel.cpp6
-rw-r--r--indra/llprimitive/llmodel.h1
-rw-r--r--indra/newview/llskinningutil.cpp5
3 files changed, 10 insertions, 2 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index c98cee218c..db6d00bc2c 100644
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -1387,13 +1387,15 @@ bool LLModel::loadDecomposition(LLSD& header, std::istream& is)
LLMeshSkinInfo::LLMeshSkinInfo():
mPelvisOffset(0.0),
- mLockScaleIfJointPosition(false)
+ mLockScaleIfJointPosition(false),
+ mInvalidJointsScrubbed(false)
{
}
LLMeshSkinInfo::LLMeshSkinInfo(LLSD& skin):
mPelvisOffset(0.0),
- mLockScaleIfJointPosition(false)
+ mLockScaleIfJointPosition(false),
+ mInvalidJointsScrubbed(false)
{
fromLLSD(skin);
}
diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h
index 40c3916168..097558ef67 100644
--- a/indra/llprimitive/llmodel.h
+++ b/indra/llprimitive/llmodel.h
@@ -56,6 +56,7 @@ public:
LLMatrix4 mBindShapeMatrix;
float mPelvisOffset;
bool mLockScaleIfJointPosition;
+ bool mInvalidJointsScrubbed;
};
class LLModel : public LLVolume
diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp
index c0589e33bb..b2fd1744bc 100644
--- a/indra/newview/llskinningutil.cpp
+++ b/indra/newview/llskinningutil.cpp
@@ -53,6 +53,10 @@ U32 LLSkinningUtil::getMeshJointCount(const LLMeshSkinInfo *skin)
// static
void LLSkinningUtil::scrubInvalidJoints(LLVOAvatar *avatar, LLMeshSkinInfo* skin)
{
+ if (skin->mInvalidJointsScrubbed)
+ {
+ return;
+ }
for (U32 j = 0; j < skin->mJointNames.size(); ++j)
{
// Fix invalid names to "mPelvis". Currently meshes with
@@ -63,6 +67,7 @@ void LLSkinningUtil::scrubInvalidJoints(LLVOAvatar *avatar, LLMeshSkinInfo* skin
skin->mJointNames[j] = "mPelvis";
}
}
+ skin->mInvalidJointsScrubbed = true;
}
// static