From c9baf4c66157c601cc4d4e325c7843b3bf9a0cad Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 7 Jun 2017 14:23:49 +0100 Subject: SL-691,SL-694 - viewer can animate objects based on server messaging. First end-to-end demo for animated objects. --- indra/newview/llvoavatarself.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index aa5d82a096..2137bf4eb3 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2789,7 +2789,7 @@ BOOL LLVOAvatarSelf::needsRenderBeam() // don't render selection beam on hud objects is_touching_or_grabbing = FALSE; } - return is_touching_or_grabbing || (mState & AGENT_STATE_EDITING && LLSelectMgr::getInstance()->shouldShowSelection()); + return is_touching_or_grabbing || (getAttachmentState() & AGENT_STATE_EDITING && LLSelectMgr::getInstance()->shouldShowSelection()); } // static -- 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/newview/llvoavatarself.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 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 From aacb7eb25fd4caceaafb145ed550e14cebeef665 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 1 Oct 2018 16:11:09 +0100 Subject: SL-9773 - treat animated object attachments the same as other rigged attachments for purposes of visibility in mouselook. --- indra/newview/llcontrolavatar.cpp | 14 ++++++++++++++ indra/newview/llcontrolavatar.h | 2 ++ indra/newview/lldrawpoolavatar.cpp | 2 +- indra/newview/llvoavatar.cpp | 6 ++++++ indra/newview/llvoavatar.h | 1 + indra/newview/llvoavatarself.cpp | 6 ++++++ indra/newview/llvoavatarself.h | 3 +++ 7 files changed, 33 insertions(+), 1 deletion(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp index a620f2abe9..28c02b0434 100644 --- a/indra/newview/llcontrolavatar.cpp +++ b/indra/newview/llcontrolavatar.cpp @@ -574,3 +574,17 @@ std::string LLControlAvatar::getFullname() const return "AO_no_root_vol"; } } + +// virtual +bool LLControlAvatar::shouldRenderRigged() const +{ + if (mRootVolp && mRootVolp->isAttachment()) + { + LLVOAvatar *attached_av = mRootVolp->getAvatarAncestor(); + if (attached_av) + { + return attached_av->shouldRenderRigged(); + } + } + return true; +} diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h index 9924697938..f7f8db2717 100644 --- a/indra/newview/llcontrolavatar.h +++ b/indra/newview/llcontrolavatar.h @@ -73,6 +73,8 @@ public: virtual std::string getFullname() const; + /* virtual */ bool shouldRenderRigged() const; + bool mPlaying; F32 mGlobalScale; diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 905428b090..d5e86143f1 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1709,7 +1709,7 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer( void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) { - if (avatar->isSelf() && !gAgent.needsRenderAvatar()) + if (!avatar->shouldRenderRigged()) { return; } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 1f72aed5b4..93885a4472 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7464,6 +7464,12 @@ void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color) updateMeshTextures(); } +// virtual +bool LLVOAvatar::shouldRenderRigged() const +{ + return true; +} + // FIXME: We have an mVisible member, set in updateVisibility(), but this // function doesn't return it! isVisible() and mVisible are used // different places for different purposes. mVisible seems to be more diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 25c89f96d7..985559f2d6 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -756,6 +756,7 @@ private: //-------------------------------------------------------------------- public: BOOL isVisible() const; + virtual bool shouldRenderRigged() const; void setVisibilityRank(U32 rank); U32 getVisibilityRank() const { return mVisibilityRank; } static S32 sNumVisibleAvatars; // Number of instances of this class diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index b3a2d7951c..dcaade55a6 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2701,6 +2701,12 @@ void LLVOAvatarSelf::onCustomizeEnd(bool disable_camera_switch) } } +// virtual +bool LLVOAvatarSelf::shouldRenderRigged() const +{ + return gAgent.needsRenderAvatar(); +} + // HACK: this will null out the avatar's local texture IDs before the TE message is sent // to ensure local texture IDs are not sent to other clients in the area. // this is a short-term solution. The long term solution will be to not set the texture diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index f9f90bb323..b0fdae9bf0 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -312,6 +312,9 @@ public: //-------------------------------------------------------------------- // Visibility //-------------------------------------------------------------------- + + /* virtual */ bool shouldRenderRigged() const; + public: bool sendAppearanceMessage(LLMessageSystem *mesgsys) const; -- cgit v1.3