SL-451 - avoid more high-cost string operations in a per-frame function
parent
dd2caad496
commit
5dcd81c155
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ public:
|
|||
LLMatrix4 mBindShapeMatrix;
|
||||
float mPelvisOffset;
|
||||
bool mLockScaleIfJointPosition;
|
||||
bool mInvalidJointsScrubbed;
|
||||
};
|
||||
|
||||
class LLModel : public LLVolume
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue