summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelobject.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-08-13 19:37:05 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-08-13 19:37:05 +0000
commitb9b4a4d9347053a3834ca2928063136948f09d1d (patch)
treec2affaf017c2967989ff0b4a2b125d348736a04a /indra/newview/llpanelobject.cpp
parent0a3b9e8e141a6f38ecbdf6020312e7a89b153bc4 (diff)
QAR-782 Merge featurettes batch #2
merge featurettes-6-merge-2 -> release dataserver-is-deprecated
Diffstat (limited to 'indra/newview/llpanelobject.cpp')
-rw-r--r--indra/newview/llpanelobject.cpp39
1 files changed, 35 insertions, 4 deletions
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index d3fb041bad..d54de05d23 100644
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -289,9 +289,12 @@ BOOL LLPanelObject::postBuild()
}
mLabelSculptType = getChild<LLTextBox>("label sculpt type");
- mCtrlSculptType = getChild<LLComboBox>( "sculpt type control");
+ mCtrlSculptType = getChild<LLComboBox>("sculpt type control");
childSetCommitCallback("sculpt type control", onCommitSculptType, this);
-
+ mCtrlSculptMirror = getChild<LLCheckBoxCtrl>("sculpt mirror control");
+ childSetCommitCallback("sculpt mirror control", onCommitSculptType, this);
+ mCtrlSculptInvert = getChild<LLCheckBoxCtrl>("sculpt invert control");
+ childSetCommitCallback("sculpt invert control", onCommitSculptType, this);
// Start with everyone disabled
clearCtrls();
@@ -1057,6 +1060,8 @@ void LLPanelObject::getState( )
mCtrlSculptTexture->setVisible(sculpt_texture_visible);
mLabelSculptType->setVisible(sculpt_texture_visible);
mCtrlSculptType->setVisible(sculpt_texture_visible);
+ mCtrlSculptMirror->setVisible(sculpt_texture_visible);
+ mCtrlSculptInvert->setVisible(sculpt_texture_visible);
// sculpt texture
@@ -1086,12 +1091,29 @@ void LLPanelObject::getState( )
mTextureCtrl->setImageAssetID(LLUUID::null);
}
+ U8 sculpt_type = sculpt_params->getSculptType();
+ U8 sculpt_stitching = sculpt_type & LL_SCULPT_TYPE_MASK;
+ BOOL sculpt_invert = sculpt_type & LL_SCULPT_FLAG_INVERT;
+ BOOL sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR;
+
if (mCtrlSculptType)
{
- mCtrlSculptType->setCurrentByIndex(sculpt_params->getSculptType());
+ mCtrlSculptType->setCurrentByIndex(sculpt_stitching);
mCtrlSculptType->setEnabled(editable);
}
+ if (mCtrlSculptMirror)
+ {
+ mCtrlSculptMirror->set(sculpt_mirror);
+ mCtrlSculptMirror->setEnabled(editable);
+ }
+
+ if (mCtrlSculptInvert)
+ {
+ mCtrlSculptInvert->set(sculpt_invert);
+ mCtrlSculptInvert->setEnabled(editable);
+ }
+
if (mLabelSculptType)
{
mLabelSculptType->setEnabled(TRUE);
@@ -1725,9 +1747,18 @@ void LLPanelObject::sendSculpt()
if (mCtrlSculptTexture)
sculpt_params.setSculptTexture(mCtrlSculptTexture->getImageAssetID());
+ U8 sculpt_type = 0;
+
if (mCtrlSculptType)
- sculpt_params.setSculptType(mCtrlSculptType->getCurrentIndex());
+ sculpt_type |= mCtrlSculptType->getCurrentIndex();
+
+ if ((mCtrlSculptMirror) && (mCtrlSculptMirror->get()))
+ sculpt_type |= LL_SCULPT_FLAG_MIRROR;
+
+ if ((mCtrlSculptInvert) && (mCtrlSculptInvert->get()))
+ sculpt_type |= LL_SCULPT_FLAG_INVERT;
+ sculpt_params.setSculptType(sculpt_type);
mObject->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, TRUE);
}