diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index f8b7cf593e..0ca6ee2a32 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -4702,6 +4702,7 @@ void LLMeshRepository::notifyLoadedMeshes() if (mPendingRequests.size() > push_count) { + LL_PROFILE_ZONE_NAMED("Mesh score_map"); // More requests than the high-water limit allows so // sort and forward the most important. diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index ae9e4f980f..d63ab008ba 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7370,6 +7370,16 @@ LLJoint *LLVOAvatar::getJoint( S32 joint_num ) return pJoint; } +void LLVOAvatar::initAllJoints() +{ + getJointAliases(); + for (auto& alias : mJointAliasMap) + { + mJointMap[alias.first] = mRoot->findJoint(alias.second); + } + // ignore mScreen and mRoot +} + //----------------------------------------------------------------------------- // getRiggedMeshID // diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 18be18a3d6..95a09cf006 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -210,6 +210,7 @@ public: LLJoint* getJoint( const std::string &name ) { return getJoint( JointKey::construct( name ) ); } // LLJoint* getJoint(S32 num); + void initAllJoints(); //if you KNOW joint_num is a valid animated joint index, use getSkeletonJoint for efficiency inline LLJoint* getSkeletonJoint(S32 joint_num) { return mSkeleton[joint_num]; } diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index bd0405e37f..e527bf5c4e 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -272,6 +272,8 @@ void LLVOAvatarSelf::initInstance() doPeriodically(check_for_unsupported_baked_appearance, 120.0); doPeriodically(boost::bind(&LLVOAvatarSelf::checkStuckAppearance, this), 30.0); + initAllJoints(); // mesh thread uses LLVOAvatarSelf as a joint source + mInitFlags |= 1<<2; }