summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-06-21 15:25:50 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-06-21 15:25:50 +0100
commit3c8ff04c0fa5c891a0454d7542f78f65eb5032dc (patch)
tree9b0d4a1dc99b8daf70c9965d7b5c73158169f7f2 /indra
parent4d29b95fb5f2a909be3379181d3f133093ce9c8c (diff)
SL-722 - animated object checkbox is based on state of root prim. Enabled only when root prim or whole linkset is being edited.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelvolume.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index f34194db19..5e87c174d6 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -238,6 +238,11 @@ void LLPanelVolume::getState( )
{
volobjp = (LLVOVolume *)objectp;
}
+ LLVOVolume *root_volobjp = NULL;
+ if (root_objectp && (root_objectp->getPCode() == LL_PCODE_VOLUME))
+ {
+ root_volobjp = (LLVOVolume *)root_objectp;
+ }
if( !objectp )
{
@@ -350,13 +355,17 @@ void LLPanelVolume::getState( )
}
// Animated Mesh
- BOOL is_animated_mesh = volobjp && volobjp->getExtendedMeshFlags() & LLExtendedMeshParams::ANIMATED_MESH_ENABLED_FLAG;
+ BOOL is_animated_mesh = root_volobjp && root_volobjp->isAnimatedObject();
getChild<LLUICtrl>("Animated Mesh Checkbox Ctrl")->setValue(is_animated_mesh);
// AXON FIXME CHECK FOR SKIN INFO ALSO
// WHAT ABOUT isPermanentEnforced?
// What about linksets with some skinned objects?
- BOOL can_be_animated_object = volobjp && volobjp->canBeAnimatedObject() && editable;
- getChildView("Animated Mesh Checkbox Ctrl")->setEnabled(can_be_animated_object);
+ BOOL enabled_animated_object_box = FALSE;
+ if (root_volobjp && root_volobjp == volobjp)
+ {
+ enabled_animated_object_box = root_volobjp && root_volobjp->canBeAnimatedObject() && editable;
+ }
+ getChildView("Animated Mesh Checkbox Ctrl")->setEnabled(enabled_animated_object_box);
// Flexible properties
BOOL is_flexible = volobjp && volobjp->isFlexible();