diff options
author | leyla_linden <none@none> | 2011-01-19 11:38:34 -0800 |
---|---|---|
committer | leyla_linden <none@none> | 2011-01-19 11:38:34 -0800 |
commit | ca1c1eea78ff2ab83979a4308dd5a93ea0032fc8 (patch) | |
tree | ffafba28cf0f0d2cc4e67fae7042e2a318fce1b1 /indra/newview/llpanelobject.cpp | |
parent | b5e67321c3fa1e60e0973547372a5425e9d82efc (diff) |
SH-808 Selectively enable/disable features in edit tools
Diffstat (limited to 'indra/newview/llpanelobject.cpp')
-rw-r--r-- | indra/newview/llpanelobject.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 45e9a04fc2..73a8fbe3aa 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -1910,6 +1910,32 @@ void LLPanelObject::refresh() { mRootObject = NULL; } + + bool enable_mesh = gSavedSettings.getBOOL("MeshEnabled"); + + getChildView("label physicsshapetype")->setVisible(enable_mesh); + getChildView("Physics Shape Type Combo Ctrl")->setVisible(enable_mesh); + getChildView("Physics Gravity")->setVisible(enable_mesh); + getChildView("Physics Material Override")->setVisible(enable_mesh); + getChildView("Physics Friction")->setVisible(enable_mesh); + getChildView("Physics Density")->setVisible(enable_mesh); + getChildView("Physics Restitution")->setVisible(enable_mesh); + + // if mesh isn't enabled we want to the scale max to be 10 + getChild<LLSpinCtrl>("Scale X")->setMaxValue(enable_mesh ? 64 : 10); + getChild<LLSpinCtrl>("Scale Y")->setMaxValue(enable_mesh ? 64 : 10); + getChild<LLSpinCtrl>("Scale Z")->setMaxValue(enable_mesh ? 64 : 10); + + LLComboBox* sculpt_combo = getChild<LLComboBox>("sculpt type control"); + BOOL found = sculpt_combo->itemExists("Mesh"); + if (enable_mesh && !found) + { + sculpt_combo->add("Mesh"); + } + else if (!enable_mesh && found) + { + sculpt_combo->remove("Mesh"); + } } |