From 4b439ff968a934c127cd685b54bcc206e467a948 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 4 Dec 2017 11:15:47 +0000 Subject: SL-704 - made avatar hierarchy more consistent by adding lluiavatar for viewer-local avs used in upload previews --- indra/llappearance/llavatarappearance.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llappearance') diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h index ccd6323ed8..b6bdb652e8 100644 --- a/indra/llappearance/llavatarappearance.h +++ b/indra/llappearance/llavatarappearance.h @@ -227,7 +227,7 @@ protected: ** RENDERING **/ public: - BOOL mIsDummy; // for special views + BOOL mIsDummy; // for special views and animated object controllers; local to viewer //-------------------------------------------------------------------- // Morph masks -- cgit v1.3 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') 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.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 ++++- indra/llappearance/llavatarappearance.h | 1 + indra/newview/llcontrolavatar.cpp | 2 ++ indra/newview/llskinningutil.cpp | 3 +++ indra/newview/lluiavatar.cpp | 2 ++ indra/newview/llvoavatar.cpp | 2 ++ indra/newview/llvoavatarself.cpp | 2 ++ 7 files changed, 16 insertions(+), 1 deletion(-) (limited to 'indra/llappearance') 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 diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h index b6bdb652e8..7815c1844b 100644 --- a/indra/llappearance/llavatarappearance.h +++ b/indra/llappearance/llavatarappearance.h @@ -70,6 +70,7 @@ public: static void initClass(); static void cleanupClass(); // Cleanup data that's only init'd once per class. virtual void initInstance(); // Called after construction to initialize the instance. + S32 mInitFlags; virtual BOOL loadSkeletonNode(); BOOL loadMeshNodes(); BOOL loadLayersets(); diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp index 93b178e0e9..6adb34c263 100644 --- a/indra/newview/llcontrolavatar.cpp +++ b/indra/newview/llcontrolavatar.cpp @@ -63,6 +63,8 @@ void LLControlAvatar::initInstance() updateJointLODs(); updateGeometry(mDrawable); hideSkirt(); + + mInitFlags |= 1<<4; } void LLControlAvatar::matchVolumeTransform() diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp index 64794ae720..df8fc2f7ae 100644 --- a/indra/newview/llskinningutil.cpp +++ b/indra/newview/llskinningutil.cpp @@ -102,6 +102,7 @@ void LLSkinningUtil::initSkinningMatrixPalette( // valid. In other cases of skinned rendering, invalid // joints should already have been removed during scrubInvalidJoints(). LL_WARNS_ONCE("Avatar") << "Rigged to invalid joint name " << skin->mJointNames[j] << LL_ENDL; + LL_WARNS_ONCE() << "avatar build state: isBuilt() " << avatar->isBuilt() << " mInitFlags " << avatar->mInitFlags << LL_ENDL; } } } @@ -217,11 +218,13 @@ void LLSkinningUtil::initJointNums(LLMeshSkinInfo* skin, LLVOAvatar *avatar) if (skin->mJointNums[j] < 0) { LL_WARNS_ONCE() << "joint has unusual number " << skin->mJointNames[j] << ": " << skin->mJointNums[j] << LL_ENDL; + LL_WARNS_ONCE() << "avatar build state: isBuilt() " << avatar->isBuilt() << " mInitFlags " << avatar->mInitFlags << LL_ENDL; } } else { LL_WARNS_ONCE() << "unable to find joint " << skin->mJointNames[j] << LL_ENDL; + LL_WARNS_ONCE() << "avatar build state: isBuilt() " << avatar->isBuilt() << " mInitFlags " << avatar->mInitFlags << LL_ENDL; } } } diff --git a/indra/newview/lluiavatar.cpp b/indra/newview/lluiavatar.cpp index 6cc14fc49b..e4e266c92a 100644 --- a/indra/newview/lluiavatar.cpp +++ b/indra/newview/lluiavatar.cpp @@ -56,4 +56,6 @@ void LLUIAvatar::initInstance() slamPosition(); updateJointLODs(); updateGeometry(mDrawable); + + mInitFlags |= 1<<3; } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 1ed105f8d4..127dfe7c60 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1188,6 +1188,8 @@ void LLVOAvatar::initInstance() //VTPause(); // VTune mVoiceVisualizer->setVoiceEnabled( LLVoiceClient::getInstance()->getVoiceEnabled( mID ) ); + + mInitFlags |= 1<<1; } // virtual diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 31a76d6dd9..b3a2d7951c 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -235,6 +235,8 @@ void LLVOAvatarSelf::initInstance() //doPeriodically(output_self_av_texture_diagnostics, 30.0); doPeriodically(update_avatar_rez_metrics, 5.0); doPeriodically(boost::bind(&LLVOAvatarSelf::checkStuckAppearance, this), 30.0); + + mInitFlags |= 1<<2; } void LLVOAvatarSelf::setHoverIfRegionEnabled() -- cgit v1.3