summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llpanelobject.cpp18
-rw-r--r--indra/newview/llpanelobject.h1
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml12
3 files changed, 25 insertions, 6 deletions
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index 2e41aa8002..028ca82fed 100644
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -124,6 +124,8 @@ BOOL LLPanelObject::postBuild()
// Permanent checkbox
mCheckPermanent = getChild<LLCheckBoxCtrl>("Permanent Checkbox Ctrl");
+ // Character checkbox
+ mCheckCharacter = getChild<LLCheckBoxCtrl>("Character Checkbox Ctrl");
// Position
mLabelPosition = getChild<LLTextBox>("label position");
@@ -503,29 +505,35 @@ void LLPanelObject::getState( )
BOOL is_flexible = volobjp && volobjp->isFlexible();
BOOL is_permanent = root_objectp->flagObjectPermanent();
BOOL is_permanent_enforced = root_objectp->isPermanentEnforced();
+ BOOL is_character = root_objectp->flagCharacter();
+ llassert(!is_permanent || !is_character); // should never have a permanent object that is also a character
// Physics checkbox
mIsPhysical = root_objectp->flagUsePhysics();
- //llassert(is_permanent && mIsPhysical); // should never has a permanent object that is also physical
+ llassert(!is_permanent || !mIsPhysical); // should never have a permanent object that is also physical
+ llassert(!is_character || mIsPhysical); // all characters should also be physical
mCheckPhysics->set( mIsPhysical );
mCheckPhysics->setEnabled( roots_selected>0
&& (editable || gAgent.isGodlike())
- && !is_flexible && !is_permanent);
+ && !is_flexible && !is_permanent && !is_character);
mIsTemporary = root_objectp->flagTemporaryOnRez();
- //llassert(is_permanent && mIsTemporary); // should never has a permanent object that is also temporary
+ llassert(!is_permanent || !mIsTemporary); // should never has a permanent object that is also temporary
mCheckTemporary->set( mIsTemporary );
mCheckTemporary->setEnabled( roots_selected>0 && editable && !is_permanent);
mIsPhantom = root_objectp->flagPhantom();
+ llassert(!is_character || !mIsPhantom); // should never have a character that is also a phantom
mCheckPhantom->set( mIsPhantom );
- mCheckPhantom->setEnabled( roots_selected>0 && editable && !is_flexible && !is_permanent_enforced );
+ mCheckPhantom->setEnabled( roots_selected>0 && editable && !is_flexible && !is_permanent_enforced && !is_character);
mCheckPermanent->set(is_permanent);
mCheckPermanent->setEnabled(FALSE);
+ mCheckCharacter->set(is_character);
+ mCheckCharacter->setEnabled(FALSE);
//----------------------------------------------------------------------------
@@ -1880,6 +1888,8 @@ void LLPanelObject::clearCtrls()
mCheckPhantom ->setEnabled( FALSE );
mCheckPermanent ->set(FALSE);
mCheckPermanent ->setEnabled( FALSE );
+ mCheckCharacter ->set(FALSE);
+ mCheckCharacter ->setEnabled( FALSE );
// Disable text labels
mLabelPosition ->setEnabled( FALSE );
diff --git a/indra/newview/llpanelobject.h b/indra/newview/llpanelobject.h
index b606ef5044..307d63aada 100644
--- a/indra/newview/llpanelobject.h
+++ b/indra/newview/llpanelobject.h
@@ -153,6 +153,7 @@ protected:
LLCheckBoxCtrl *mCheckTemporary;
LLCheckBoxCtrl *mCheckPhantom;
LLCheckBoxCtrl *mCheckPermanent;
+ LLCheckBoxCtrl *mCheckCharacter;
LLTextureCtrl *mCtrlSculptTexture;
LLTextBox *mLabelSculptType;
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index 0f390217d1..528d2a7064 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -1362,15 +1362,23 @@ even though the user gets a free copy.
name="Permanent Checkbox Ctrl"
top_pad="0"
width="123" />
+ <check_box
+ height="19"
+ enabled="false"
+ label="Character"
+ layout="topleft"
+ name="Character Checkbox Ctrl"
+ top_pad="0"
+ width="123" />
- <text
+ <text
type="string"
length="1"
follows="left|top"
height="10"
layout="topleft"
name="label position"
- top_pad="10"
+ top_pad="5"
width="121">
Position (meters)
</text>