summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-07-13 20:50:38 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-07-13 20:50:38 +0100
commit99effd37ab6cc6611f75cdca9146cc3c46a86482 (patch)
tree36b2d122e915b43791231854a6652583d1ca276b /indra
parenta4d1600a79ea9118bcbe854a55f7491d738b844c (diff)
SL-714 - pause animations when animated objects are right clicked, generate rigged volume for wireframe.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llselectmgr.cpp11
-rw-r--r--indra/newview/llvovolume.cpp6
2 files changed, 13 insertions, 4 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 983a7ca1ae..4a12d03f74 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -46,6 +46,7 @@
#include "llundo.h"
#include "lluuid.h"
#include "llvolume.h"
+#include "llcontrolavatar.h"
#include "message.h"
#include "object_flags.h"
#include "llquaternion.h"
@@ -6660,7 +6661,15 @@ void LLSelectMgr::updateSelectionCenter()
}
else
{
- mPauseRequest = NULL;
+ LLVOVolume *volp = dynamic_cast<LLVOVolume*>(object);
+ if (volp && volp->isAnimatedObject() && volp->getControlAvatar())
+ {
+ mPauseRequest = volp->getControlAvatar()->requestPause();
+ }
+ else
+ {
+ mPauseRequest = NULL;
+ }
}
if (mSelectedObjects->mSelectType != SELECT_TYPE_HUD && isAgentAvatarValid())
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 4065f9fc37..d661837ddd 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4269,9 +4269,9 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
bool LLVOVolume::treatAsRigged()
{
return isSelected() &&
- isAttachment() &&
- mDrawable.notNull() &&
- mDrawable->isState(LLDrawable::RIGGED);
+ (isAttachment() || isAnimatedObject()) &&
+ mDrawable.notNull() &&
+ mDrawable->isState(LLDrawable::RIGGED);
}
LLRiggedVolume* LLVOVolume::getRiggedVolume()