diff options
author | Anchor <none@none> | 2018-11-28 15:16:01 -0800 |
---|---|---|
committer | Anchor <none@none> | 2018-11-28 15:16:01 -0800 |
commit | 014480a79b765587881d0c0f707a7ee191f5fe2e (patch) | |
tree | 4d759c7b996065cccb9171a51a1a3f05d04b6e31 /indra/llappearance/llavatarappearance.cpp | |
parent | 076719013ec2dab7bf8fd1f4d1f953ab73d594e9 (diff) | |
parent | 8558ce5c600b810356010ba3cd6d534ef22f4081 (diff) |
Merge
Diffstat (limited to 'indra/llappearance/llavatarappearance.cpp')
-rw-r--r-- | indra/llappearance/llavatarappearance.cpp | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index f40ae7511f..c2faa18b37 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 @@ -1739,7 +1742,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) { @@ -1754,13 +1757,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; } |