diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-07-19 22:21:08 +0100 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-07-19 22:21:08 +0100 |
commit | 5610444d6450d5eb2e203be527116fe01d2d436a (patch) | |
tree | 8cab2d96488ff102fcc81fedd6a63c1737483362 /indra | |
parent | 6837ca5cd899d0aba71f856f540b535a7fc78595 (diff) |
SL-714 - fixes to get wireframes to display consistently when right-clicking on animated objects.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llcontrolavatar.cpp | 24 | ||||
-rw-r--r-- | indra/newview/lldrawable.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llselectmgr.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llviewerobject.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llviewerobject.h | 4 |
5 files changed, 36 insertions, 6 deletions
diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp index 94e5666a70..e9df81e255 100644 --- a/indra/newview/llcontrolavatar.cpp +++ b/indra/newview/llcontrolavatar.cpp @@ -194,7 +194,29 @@ void LLControlAvatar::updateDebugText() std::vector<LLVOVolume*> volumes; getAnimatedVolumes(volumes); S32 animated_volume_count = volumes.size(); - addDebugText(llformat("CAV obj %d anim %d", total_linkset_count, animated_volume_count)); + std::string active_string; + for (std::vector<LLVOVolume*>::iterator it = volumes.begin(); + it != volumes.end(); ++it) + { + LLVOVolume *volp = *it; + if (volp && volp->mDrawable) + { + if (volp->mDrawable->isActive()) + { + active_string += "A"; + } + else + { + active_string += "S"; + } + } + else + { + active_string += "-"; + } + } + addDebugText(llformat("CAV obj %d anim %d active %s", + total_linkset_count, animated_volume_count, active_string.c_str())); #if 0 // AXON - detailed rigged mesh info for (std::vector<LLVOVolume*>::iterator it = volumes.begin(); diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index f956023358..61ebf947dd 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -550,7 +550,8 @@ void LLDrawable::makeStatic(BOOL warning_enabled) if (isState(ACTIVE) && !isState(ACTIVE_CHILD) && !mVObjp->isAttachment() && - !mVObjp->isFlexible()) + !mVObjp->isFlexible() && + !mVObjp->isAnimatedObject()) { clearState(ACTIVE | ANIMATED_CHILD); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 7bf60d6ffb..b6b7d5265b 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6764,10 +6764,9 @@ void LLSelectMgr::pauseAssociatedAvatars() } else { - LLVOVolume *volp = dynamic_cast<LLVOVolume*>(object); - if (volp && volp->isAnimatedObject() && volp->getControlAvatar()) + if (object && object->isAnimatedObject() && object->getControlAvatar()) { - mPauseRequests.push_back(volp->getControlAvatar()->requestPause()); + mPauseRequests.push_back(object->getControlAvatar()->requestPause()); } } } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index c6051650cf..cb9f9e0455 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2965,6 +2965,12 @@ void LLViewerObject::unlinkControlAvatar() // automatically remove the control avatar connection. } +// virtual +bool LLViewerObject::isAnimatedObject() const +{ + return false; +} + struct LLFilenameAndTask { LLUUID mTaskID; diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 1967841fd9..c79ff7bb74 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -693,7 +693,9 @@ public: void linkControlAvatar(); // Remove any reference to control av for this prim void unlinkControlAvatar(); - + + virtual bool isAnimatedObject() const; + protected: LLPointer<LLControlAvatar> mControlAvatar; |