From 49d924ae295190dbce999e5b8e31909c5fc4a22e Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 13 Dec 2017 16:04:10 +0000 Subject: MAINT-7528 - allow underscores to substitute for spaces in uploaded meshes - this allows rigging to some attachment points that will not otherwise work --- indra/llappearance/llavatarappearance.cpp | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'indra/llappearance/llavatarappearance.cpp') diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 94c431feb4..62273339f7 100644 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -1723,7 +1723,7 @@ void LLAvatarAppearance::makeJointAliases(LLAvatarBoneInfo *bone_info) } mJointAliasMap[*i] = bone_name; } - + LLAvatarBoneInfo::child_list_t::const_iterator iter; for (iter = bone_info->mChildList.begin(); iter != bone_info->mChildList.end(); ++iter) { @@ -1738,13 +1738,34 @@ const LLAvatarAppearance::joint_alias_map_t& LLAvatarAppearance::getJointAliases { LLAvatarSkeletonInfo::bone_info_list_t::const_iterator iter; - for (iter = sAvatarSkeletonInfo->mBoneInfoList.begin(); iter != sAvatarSkeletonInfo->mBoneInfoList.end(); ++iter) + for (iter = sAvatarSkeletonInfo->mBoneInfoList.begin(); + iter != sAvatarSkeletonInfo->mBoneInfoList.end(); + ++iter) { //LLAvatarBoneInfo *bone_info = *iter; makeJointAliases( *iter ); } + + LLAvatarXmlInfo::attachment_info_list_t::iterator attach_iter; + for (attach_iter = sAvatarXmlInfo->mAttachmentInfoList.begin(); + attach_iter != sAvatarXmlInfo->mAttachmentInfoList.end(); + ++attach_iter) + { + LLAvatarXmlInfo::LLAvatarAttachmentInfo *info = *attach_iter; + std::string bone_name = info->mName; + + // Also accept the name with spaces substituted with + // underscores. This gives a mechanism for referencing such joints + // in daes, which don't allow spaces. + std::string sub_space_to_underscore = bone_name; + LLStringUtil::replaceChar(sub_space_to_underscore, ' ', '_'); + if (sub_space_to_underscore != bone_name) + { + mJointAliasMap[sub_space_to_underscore] = bone_name; + } + } } - + return mJointAliasMap; } -- cgit v1.2.3 From d389f681b19c39fc633edebafbc745f00dce9416 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 12 Jul 2018 18:10:19 +0100 Subject: MAINT-8863 - more diagnostics to pin down possible causes --- indra/llappearance/llavatarappearance.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/llappearance/llavatarappearance.cpp') diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index e35e4edec2..e4772fbb17 100644 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -190,7 +190,8 @@ LLAvatarAppearance::LLAvatarAppearance(LLWearableData* wearable_data) : mNumBones(0), mNumCollisionVolumes(0), mCollisionVolumes(NULL), - mIsBuilt(FALSE) + mIsBuilt(FALSE), + mInitFlags(0) { llassert_always(mWearableData); mBakedTextureDatas.resize(LLAvatarAppearanceDefines::BAKED_NUM_INDICES); @@ -281,6 +282,8 @@ void LLAvatarAppearance::initInstance() buildCharacter(); + mInitFlags |= 1<<0; + } // virtual -- cgit v1.2.3