diff options
Diffstat (limited to 'linden/indra/newview/llpanelobject.cpp')
-rw-r--r-- | linden/indra/newview/llpanelobject.cpp | 172 |
1 files changed, 82 insertions, 90 deletions
diff --git a/linden/indra/newview/llpanelobject.cpp b/linden/indra/newview/llpanelobject.cpp index a395d09..7024691 100644 --- a/linden/indra/newview/llpanelobject.cpp +++ b/linden/indra/newview/llpanelobject.cpp | |||
@@ -69,7 +69,7 @@ | |||
69 | #include "llworld.h" | 69 | #include "llworld.h" |
70 | #include "pipeline.h" | 70 | #include "pipeline.h" |
71 | #include "llviewercontrol.h" | 71 | #include "llviewercontrol.h" |
72 | #include "llvieweruictrlfactory.h" | 72 | #include "lluictrlfactory.h" |
73 | #include "llfirstuse.h" | 73 | #include "llfirstuse.h" |
74 | 74 | ||
75 | #include "lldrawpool.h" | 75 | #include "lldrawpool.h" |
@@ -110,57 +110,57 @@ BOOL LLPanelObject::postBuild() | |||
110 | //-------------------------------------------------------- | 110 | //-------------------------------------------------------- |
111 | 111 | ||
112 | // Lock checkbox | 112 | // Lock checkbox |
113 | mCheckLock = gUICtrlFactory->getCheckBoxByName(this,"checkbox locked"); | 113 | mCheckLock = getChild<LLCheckBoxCtrl>("checkbox locked"); |
114 | childSetCommitCallback("checkbox locked",onCommitLock,this); | 114 | childSetCommitCallback("checkbox locked",onCommitLock,this); |
115 | 115 | ||
116 | // Physical checkbox | 116 | // Physical checkbox |
117 | mCheckPhysics = gUICtrlFactory->getCheckBoxByName(this,"Physical Checkbox Ctrl"); | 117 | mCheckPhysics = getChild<LLCheckBoxCtrl>("Physical Checkbox Ctrl"); |
118 | childSetCommitCallback("Physical Checkbox Ctrl",onCommitPhysics,this); | 118 | childSetCommitCallback("Physical Checkbox Ctrl",onCommitPhysics,this); |
119 | 119 | ||
120 | // Temporary checkbox | 120 | // Temporary checkbox |
121 | mCheckTemporary = gUICtrlFactory->getCheckBoxByName(this,"Temporary Checkbox Ctrl"); | 121 | mCheckTemporary = getChild<LLCheckBoxCtrl>("Temporary Checkbox Ctrl"); |
122 | childSetCommitCallback("Temporary Checkbox Ctrl",onCommitTemporary,this); | 122 | childSetCommitCallback("Temporary Checkbox Ctrl",onCommitTemporary,this); |
123 | 123 | ||
124 | // Phantom checkbox | 124 | // Phantom checkbox |
125 | mCheckPhantom = gUICtrlFactory->getCheckBoxByName(this,"Phantom Checkbox Ctrl"); | 125 | mCheckPhantom = getChild<LLCheckBoxCtrl>("Phantom Checkbox Ctrl"); |
126 | childSetCommitCallback("Phantom Checkbox Ctrl",onCommitPhantom,this); | 126 | childSetCommitCallback("Phantom Checkbox Ctrl",onCommitPhantom,this); |
127 | 127 | ||
128 | // Position | 128 | // Position |
129 | mLabelPosition = gUICtrlFactory->getTextBoxByName(this,"label position"); | 129 | mLabelPosition = getChild<LLTextBox>("label position"); |
130 | mCtrlPosX = gUICtrlFactory->getSpinnerByName(this,"Pos X"); | 130 | mCtrlPosX = getChild<LLSpinCtrl>("Pos X"); |
131 | childSetCommitCallback("Pos X",onCommitPosition,this); | 131 | childSetCommitCallback("Pos X",onCommitPosition,this); |
132 | mCtrlPosY = gUICtrlFactory->getSpinnerByName(this,"Pos Y"); | 132 | mCtrlPosY = getChild<LLSpinCtrl>("Pos Y"); |
133 | childSetCommitCallback("Pos Y",onCommitPosition,this); | 133 | childSetCommitCallback("Pos Y",onCommitPosition,this); |
134 | mCtrlPosZ = gUICtrlFactory->getSpinnerByName(this,"Pos Z"); | 134 | mCtrlPosZ = getChild<LLSpinCtrl>("Pos Z"); |
135 | childSetCommitCallback("Pos Z",onCommitPosition,this); | 135 | childSetCommitCallback("Pos Z",onCommitPosition,this); |
136 | 136 | ||
137 | // Scale | 137 | // Scale |
138 | mLabelSize = gUICtrlFactory->getTextBoxByName(this,"label size"); | 138 | mLabelSize = getChild<LLTextBox>("label size"); |
139 | mCtrlScaleX = gUICtrlFactory->getSpinnerByName(this,"Scale X"); | 139 | mCtrlScaleX = getChild<LLSpinCtrl>("Scale X"); |
140 | childSetCommitCallback("Scale X",onCommitScale,this); | 140 | childSetCommitCallback("Scale X",onCommitScale,this); |
141 | 141 | ||
142 | // Scale Y | 142 | // Scale Y |
143 | mCtrlScaleY = gUICtrlFactory->getSpinnerByName(this,"Scale Y"); | 143 | mCtrlScaleY = getChild<LLSpinCtrl>("Scale Y"); |
144 | childSetCommitCallback("Scale Y",onCommitScale,this); | 144 | childSetCommitCallback("Scale Y",onCommitScale,this); |
145 | 145 | ||
146 | // Scale Z | 146 | // Scale Z |
147 | mCtrlScaleZ = gUICtrlFactory->getSpinnerByName(this,"Scale Z"); | 147 | mCtrlScaleZ = getChild<LLSpinCtrl>("Scale Z"); |
148 | childSetCommitCallback("Scale Z",onCommitScale,this); | 148 | childSetCommitCallback("Scale Z",onCommitScale,this); |
149 | 149 | ||
150 | // Rotation | 150 | // Rotation |
151 | mLabelRotation = gUICtrlFactory->getTextBoxByName(this,"label rotation"); | 151 | mLabelRotation = getChild<LLTextBox>("label rotation"); |
152 | mCtrlRotX = gUICtrlFactory->getSpinnerByName(this,"Rot X"); | 152 | mCtrlRotX = getChild<LLSpinCtrl>("Rot X"); |
153 | childSetCommitCallback("Rot X",onCommitRotation,this); | 153 | childSetCommitCallback("Rot X",onCommitRotation,this); |
154 | mCtrlRotY = gUICtrlFactory->getSpinnerByName(this,"Rot Y"); | 154 | mCtrlRotY = getChild<LLSpinCtrl>("Rot Y"); |
155 | childSetCommitCallback("Rot Y",onCommitRotation,this); | 155 | childSetCommitCallback("Rot Y",onCommitRotation,this); |
156 | mCtrlRotZ = gUICtrlFactory->getSpinnerByName(this,"Rot Z"); | 156 | mCtrlRotZ = getChild<LLSpinCtrl>("Rot Z"); |
157 | childSetCommitCallback("Rot Z",onCommitRotation,this); | 157 | childSetCommitCallback("Rot Z",onCommitRotation,this); |
158 | 158 | ||
159 | //-------------------------------------------------------- | 159 | //-------------------------------------------------------- |
160 | 160 | ||
161 | // material type popup | 161 | // material type popup |
162 | mLabelMaterial = gUICtrlFactory->getTextBoxByName(this,"label material"); | 162 | mLabelMaterial = getChild<LLTextBox>("label material"); |
163 | mComboMaterial = gUICtrlFactory->getComboBoxByName(this,"material"); | 163 | mComboMaterial = getChild<LLComboBox>("material"); |
164 | childSetCommitCallback("material",onCommitMaterial,this); | 164 | childSetCommitCallback("material",onCommitMaterial,this); |
165 | mComboMaterial->removeall(); | 165 | mComboMaterial->removeall(); |
166 | // *TODO:translate | 166 | // *TODO:translate |
@@ -176,84 +176,84 @@ BOOL LLPanelObject::postBuild() | |||
176 | mComboMaterialItemCount = mComboMaterial->getItemCount(); | 176 | mComboMaterialItemCount = mComboMaterial->getItemCount(); |
177 | 177 | ||
178 | // Base Type | 178 | // Base Type |
179 | mLabelBaseType = gUICtrlFactory->getTextBoxByName(this,"label basetype"); | 179 | mLabelBaseType = getChild<LLTextBox>("label basetype"); |
180 | mComboBaseType = gUICtrlFactory->getComboBoxByName(this,"comboBaseType"); | 180 | mComboBaseType = getChild<LLComboBox>("comboBaseType"); |
181 | childSetCommitCallback("comboBaseType",onCommitParametric,this); | 181 | childSetCommitCallback("comboBaseType",onCommitParametric,this); |
182 | 182 | ||
183 | // Cut | 183 | // Cut |
184 | mLabelCut = gUICtrlFactory->getTextBoxByName(this,"text cut"); | 184 | mLabelCut = getChild<LLTextBox>("text cut"); |
185 | mSpinCutBegin = gUICtrlFactory->getSpinnerByName(this,"cut begin"); | 185 | mSpinCutBegin = getChild<LLSpinCtrl>("cut begin"); |
186 | childSetCommitCallback("cut begin",onCommitParametric,this); | 186 | childSetCommitCallback("cut begin",onCommitParametric,this); |
187 | mSpinCutBegin->setValidateBeforeCommit( precommitValidate ); | 187 | mSpinCutBegin->setValidateBeforeCommit( precommitValidate ); |
188 | mSpinCutEnd = gUICtrlFactory->getSpinnerByName(this,"cut end"); | 188 | mSpinCutEnd = getChild<LLSpinCtrl>("cut end"); |
189 | childSetCommitCallback("cut end",onCommitParametric,this); | 189 | childSetCommitCallback("cut end",onCommitParametric,this); |
190 | mSpinCutEnd->setValidateBeforeCommit( &precommitValidate ); | 190 | mSpinCutEnd->setValidateBeforeCommit( &precommitValidate ); |
191 | 191 | ||
192 | // Hollow / Skew | 192 | // Hollow / Skew |
193 | mLabelHollow = gUICtrlFactory->getTextBoxByName(this,"text hollow"); | 193 | mLabelHollow = getChild<LLTextBox>("text hollow"); |
194 | mLabelSkew = gUICtrlFactory->getTextBoxByName(this,"text skew"); | 194 | mLabelSkew = getChild<LLTextBox>("text skew"); |
195 | mSpinHollow = gUICtrlFactory->getSpinnerByName(this,"Scale 1"); | 195 | mSpinHollow = getChild<LLSpinCtrl>("Scale 1"); |
196 | childSetCommitCallback("Scale 1",onCommitParametric,this); | 196 | childSetCommitCallback("Scale 1",onCommitParametric,this); |
197 | mSpinHollow->setValidateBeforeCommit( &precommitValidate ); | 197 | mSpinHollow->setValidateBeforeCommit( &precommitValidate ); |
198 | mSpinSkew = gUICtrlFactory->getSpinnerByName(this,"Skew"); | 198 | mSpinSkew = getChild<LLSpinCtrl>("Skew"); |
199 | childSetCommitCallback("Skew",onCommitParametric,this); | 199 | childSetCommitCallback("Skew",onCommitParametric,this); |
200 | mSpinSkew->setValidateBeforeCommit( &precommitValidate ); | 200 | mSpinSkew->setValidateBeforeCommit( &precommitValidate ); |
201 | mLabelHoleType = gUICtrlFactory->getTextBoxByName(this,"Hollow Shape"); | 201 | mLabelHoleType = getChild<LLTextBox>("Hollow Shape"); |
202 | 202 | ||
203 | // Hole Type | 203 | // Hole Type |
204 | mComboHoleType = gUICtrlFactory->getComboBoxByName(this,"hole"); | 204 | mComboHoleType = getChild<LLComboBox>("hole"); |
205 | childSetCommitCallback("hole",onCommitParametric,this); | 205 | childSetCommitCallback("hole",onCommitParametric,this); |
206 | 206 | ||
207 | // Twist | 207 | // Twist |
208 | mLabelTwist = gUICtrlFactory->getTextBoxByName(this,"text twist"); | 208 | mLabelTwist = getChild<LLTextBox>("text twist"); |
209 | mSpinTwistBegin = gUICtrlFactory->getSpinnerByName(this,"Twist Begin"); | 209 | mSpinTwistBegin = getChild<LLSpinCtrl>("Twist Begin"); |
210 | childSetCommitCallback("Twist Begin",onCommitParametric,this); | 210 | childSetCommitCallback("Twist Begin",onCommitParametric,this); |
211 | mSpinTwistBegin->setValidateBeforeCommit( precommitValidate ); | 211 | mSpinTwistBegin->setValidateBeforeCommit( precommitValidate ); |
212 | mSpinTwist = gUICtrlFactory->getSpinnerByName(this,"Twist End"); | 212 | mSpinTwist = getChild<LLSpinCtrl>("Twist End"); |
213 | childSetCommitCallback("Twist End",onCommitParametric,this); | 213 | childSetCommitCallback("Twist End",onCommitParametric,this); |
214 | mSpinTwist->setValidateBeforeCommit( &precommitValidate ); | 214 | mSpinTwist->setValidateBeforeCommit( &precommitValidate ); |
215 | 215 | ||
216 | // Scale | 216 | // Scale |
217 | mSpinScaleX = gUICtrlFactory->getSpinnerByName(this,"Taper Scale X"); | 217 | mSpinScaleX = getChild<LLSpinCtrl>("Taper Scale X"); |
218 | childSetCommitCallback("Taper Scale X",onCommitParametric,this); | 218 | childSetCommitCallback("Taper Scale X",onCommitParametric,this); |
219 | mSpinScaleX->setValidateBeforeCommit( &precommitValidate ); | 219 | mSpinScaleX->setValidateBeforeCommit( &precommitValidate ); |
220 | mSpinScaleY = gUICtrlFactory->getSpinnerByName(this,"Taper Scale Y"); | 220 | mSpinScaleY = getChild<LLSpinCtrl>("Taper Scale Y"); |
221 | childSetCommitCallback("Taper Scale Y",onCommitParametric,this); | 221 | childSetCommitCallback("Taper Scale Y",onCommitParametric,this); |
222 | mSpinScaleY->setValidateBeforeCommit( &precommitValidate ); | 222 | mSpinScaleY->setValidateBeforeCommit( &precommitValidate ); |
223 | 223 | ||
224 | // Shear | 224 | // Shear |
225 | mLabelShear = gUICtrlFactory->getTextBoxByName(this,"text topshear"); | 225 | mLabelShear = getChild<LLTextBox>("text topshear"); |
226 | mSpinShearX = gUICtrlFactory->getSpinnerByName(this,"Shear X"); | 226 | mSpinShearX = getChild<LLSpinCtrl>("Shear X"); |
227 | childSetCommitCallback("Shear X",onCommitParametric,this); | 227 | childSetCommitCallback("Shear X",onCommitParametric,this); |
228 | mSpinShearX->setValidateBeforeCommit( &precommitValidate ); | 228 | mSpinShearX->setValidateBeforeCommit( &precommitValidate ); |
229 | mSpinShearY = gUICtrlFactory->getSpinnerByName(this,"Shear Y"); | 229 | mSpinShearY = getChild<LLSpinCtrl>("Shear Y"); |
230 | childSetCommitCallback("Shear Y",onCommitParametric,this); | 230 | childSetCommitCallback("Shear Y",onCommitParametric,this); |
231 | mSpinShearY->setValidateBeforeCommit( &precommitValidate ); | 231 | mSpinShearY->setValidateBeforeCommit( &precommitValidate ); |
232 | 232 | ||
233 | // Path / Profile | 233 | // Path / Profile |
234 | mCtrlPathBegin = gUICtrlFactory->getSpinnerByName(this,"Path Limit Begin"); | 234 | mCtrlPathBegin = getChild<LLSpinCtrl>("Path Limit Begin"); |
235 | childSetCommitCallback("Path Limit Begin",onCommitParametric,this); | 235 | childSetCommitCallback("Path Limit Begin",onCommitParametric,this); |
236 | mCtrlPathBegin->setValidateBeforeCommit( &precommitValidate ); | 236 | mCtrlPathBegin->setValidateBeforeCommit( &precommitValidate ); |
237 | mCtrlPathEnd = gUICtrlFactory->getSpinnerByName(this,"Path Limit End"); | 237 | mCtrlPathEnd = getChild<LLSpinCtrl>("Path Limit End"); |
238 | childSetCommitCallback("Path Limit End",onCommitParametric,this); | 238 | childSetCommitCallback("Path Limit End",onCommitParametric,this); |
239 | mCtrlPathEnd->setValidateBeforeCommit( &precommitValidate ); | 239 | mCtrlPathEnd->setValidateBeforeCommit( &precommitValidate ); |
240 | 240 | ||
241 | // Taper | 241 | // Taper |
242 | mLabelTaper = gUICtrlFactory->getTextBoxByName(this,"text taper2"); | 242 | mLabelTaper = getChild<LLTextBox>("text taper2"); |
243 | mSpinTaperX = gUICtrlFactory->getSpinnerByName(this,"Taper X"); | 243 | mSpinTaperX = getChild<LLSpinCtrl>("Taper X"); |
244 | childSetCommitCallback("Taper X",onCommitParametric,this); | 244 | childSetCommitCallback("Taper X",onCommitParametric,this); |
245 | mSpinTaperX->setValidateBeforeCommit( precommitValidate ); | 245 | mSpinTaperX->setValidateBeforeCommit( precommitValidate ); |
246 | mSpinTaperY = gUICtrlFactory->getSpinnerByName(this,"Taper Y"); | 246 | mSpinTaperY = getChild<LLSpinCtrl>("Taper Y"); |
247 | childSetCommitCallback("Taper Y",onCommitParametric,this); | 247 | childSetCommitCallback("Taper Y",onCommitParametric,this); |
248 | mSpinTaperY->setValidateBeforeCommit( precommitValidate ); | 248 | mSpinTaperY->setValidateBeforeCommit( precommitValidate ); |
249 | 249 | ||
250 | // Radius Offset / Revolutions | 250 | // Radius Offset / Revolutions |
251 | mLabelRadiusOffset = gUICtrlFactory->getTextBoxByName(this,"text radius delta"); | 251 | mLabelRadiusOffset = getChild<LLTextBox>("text radius delta"); |
252 | mLabelRevolutions = gUICtrlFactory->getTextBoxByName(this,"text revolutions"); | 252 | mLabelRevolutions = getChild<LLTextBox>("text revolutions"); |
253 | mSpinRadiusOffset = gUICtrlFactory->getSpinnerByName(this,"Radius Offset"); | 253 | mSpinRadiusOffset = getChild<LLSpinCtrl>("Radius Offset"); |
254 | childSetCommitCallback("Radius Offset",onCommitParametric,this); | 254 | childSetCommitCallback("Radius Offset",onCommitParametric,this); |
255 | mSpinRadiusOffset->setValidateBeforeCommit( &precommitValidate ); | 255 | mSpinRadiusOffset->setValidateBeforeCommit( &precommitValidate ); |
256 | mSpinRevolutions = gUICtrlFactory->getSpinnerByName(this,"Revolutions"); | 256 | mSpinRevolutions = getChild<LLSpinCtrl>("Revolutions"); |
257 | childSetCommitCallback("Revolutions",onCommitParametric,this); | 257 | childSetCommitCallback("Revolutions",onCommitParametric,this); |
258 | mSpinRevolutions->setValidateBeforeCommit( &precommitValidate ); | 258 | mSpinRevolutions->setValidateBeforeCommit( &precommitValidate ); |
259 | 259 | ||
@@ -272,7 +272,7 @@ BOOL LLPanelObject::postBuild() | |||
272 | // Allow any texture to be used during non-immediate mode. | 272 | // Allow any texture to be used during non-immediate mode. |
273 | mCtrlSculptTexture->setNonImmediateFilterPermMask(PERM_NONE); | 273 | mCtrlSculptTexture->setNonImmediateFilterPermMask(PERM_NONE); |
274 | LLAggregatePermissions texture_perms; | 274 | LLAggregatePermissions texture_perms; |
275 | if (gSelectMgr->selectGetAggregateTexturePermissions(texture_perms)) | 275 | if (LLSelectMgr::getInstance()->selectGetAggregateTexturePermissions(texture_perms)) |
276 | { | 276 | { |
277 | BOOL can_copy = | 277 | BOOL can_copy = |
278 | texture_perms.getValue(PERM_COPY) == LLAggregatePermissions::AP_EMPTY || | 278 | texture_perms.getValue(PERM_COPY) == LLAggregatePermissions::AP_EMPTY || |
@@ -288,8 +288,8 @@ BOOL LLPanelObject::postBuild() | |||
288 | } | 288 | } |
289 | } | 289 | } |
290 | 290 | ||
291 | mLabelSculptType = gUICtrlFactory->getTextBoxByName(this, "label sculpt type"); | 291 | mLabelSculptType = getChild<LLTextBox>("label sculpt type"); |
292 | mCtrlSculptType = gUICtrlFactory->getComboBoxByName(this, "sculpt type control"); | 292 | mCtrlSculptType = getChild<LLComboBox>( "sculpt type control"); |
293 | childSetCommitCallback("sculpt type control", onCommitSculptType, this); | 293 | childSetCommitCallback("sculpt type control", onCommitSculptType, this); |
294 | 294 | ||
295 | 295 | ||
@@ -317,11 +317,11 @@ LLPanelObject::~LLPanelObject() | |||
317 | 317 | ||
318 | void LLPanelObject::getState( ) | 318 | void LLPanelObject::getState( ) |
319 | { | 319 | { |
320 | LLViewerObject* objectp = gSelectMgr->getSelection()->getFirstRootObject(); | 320 | LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(); |
321 | LLViewerObject* root_objectp = objectp; | 321 | LLViewerObject* root_objectp = objectp; |
322 | if(!objectp) | 322 | if(!objectp) |
323 | { | 323 | { |
324 | objectp = gSelectMgr->getSelection()->getFirstObject(); | 324 | objectp = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); |
325 | // *FIX: shouldn't we just keep the child? | 325 | // *FIX: shouldn't we just keep the child? |
326 | if (objectp) | 326 | if (objectp) |
327 | { | 327 | { |
@@ -430,13 +430,13 @@ void LLPanelObject::getState( ) | |||
430 | BOOL owners_identical; | 430 | BOOL owners_identical; |
431 | LLUUID owner_id; | 431 | LLUUID owner_id; |
432 | LLString owner_name; | 432 | LLString owner_name; |
433 | owners_identical = gSelectMgr->selectGetOwner(owner_id, owner_name); | 433 | owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name); |
434 | 434 | ||
435 | // BUG? Check for all objects being editable? | 435 | // BUG? Check for all objects being editable? |
436 | S32 roots_selected = gSelectMgr->getSelection()->getRootObjectCount(); | 436 | S32 roots_selected = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount(); |
437 | BOOL editable = root_objectp->permModify(); | 437 | BOOL editable = root_objectp->permModify(); |
438 | S32 selected_count = gSelectMgr->getSelection()->getObjectCount(); | 438 | S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); |
439 | BOOL single_volume = (gSelectMgr->selectionAllPCode( LL_PCODE_VOLUME )) | 439 | BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME )) |
440 | && (selected_count == 1); | 440 | && (selected_count == 1); |
441 | 441 | ||
442 | // Select Single Message | 442 | // Select Single Message |
@@ -460,7 +460,7 @@ void LLPanelObject::getState( ) | |||
460 | BOOL valid; | 460 | BOOL valid; |
461 | U32 owner_mask_on; | 461 | U32 owner_mask_on; |
462 | U32 owner_mask_off; | 462 | U32 owner_mask_off; |
463 | valid = gSelectMgr->selectGetPerm(PERM_OWNER, &owner_mask_on, &owner_mask_off); | 463 | valid = LLSelectMgr::getInstance()->selectGetPerm(PERM_OWNER, &owner_mask_on, &owner_mask_off); |
464 | 464 | ||
465 | if(valid) | 465 | if(valid) |
466 | { | 466 | { |
@@ -517,7 +517,7 @@ void LLPanelObject::getState( ) | |||
517 | return object->getMaterial(); | 517 | return object->getMaterial(); |
518 | } | 518 | } |
519 | } func; | 519 | } func; |
520 | bool material_same = gSelectMgr->getSelection()->getSelectedTEValue( &func, material_code ); | 520 | bool material_same = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, material_code ); |
521 | 521 | ||
522 | if (editable && single_volume && material_same) | 522 | if (editable && single_volume && material_same) |
523 | { | 523 | { |
@@ -1054,10 +1054,9 @@ void LLPanelObject::getState( ) | |||
1054 | mLabelRevolutions->setVisible( revolutions_visible ); | 1054 | mLabelRevolutions->setVisible( revolutions_visible ); |
1055 | mSpinRevolutions ->setVisible( revolutions_visible ); | 1055 | mSpinRevolutions ->setVisible( revolutions_visible ); |
1056 | 1056 | ||
1057 | bool sculpt_type_visible = FALSE; // currently not visible - for LSL setting only | ||
1058 | mCtrlSculptTexture->setVisible(sculpt_texture_visible); | 1057 | mCtrlSculptTexture->setVisible(sculpt_texture_visible); |
1059 | mLabelSculptType->setVisible(sculpt_texture_visible && sculpt_type_visible); | 1058 | mLabelSculptType->setVisible(sculpt_texture_visible); |
1060 | mCtrlSculptType->setVisible(sculpt_texture_visible && sculpt_type_visible); | 1059 | mCtrlSculptType->setVisible(sculpt_texture_visible); |
1061 | 1060 | ||
1062 | 1061 | ||
1063 | // sculpt texture | 1062 | // sculpt texture |
@@ -1076,7 +1075,7 @@ void LLPanelObject::getState( ) | |||
1076 | mSculptTypeRevert = sculpt_params->getSculptType(); | 1075 | mSculptTypeRevert = sculpt_params->getSculptType(); |
1077 | } | 1076 | } |
1078 | 1077 | ||
1079 | LLTextureCtrl* mTextureCtrl = LLViewerUICtrlFactory::getTexturePickerByName(this,"sculpt texture control"); | 1078 | LLTextureCtrl* mTextureCtrl = getChild<LLTextureCtrl>("sculpt texture control"); |
1080 | if(mTextureCtrl) | 1079 | if(mTextureCtrl) |
1081 | { | 1080 | { |
1082 | mTextureCtrl->setTentative(FALSE); | 1081 | mTextureCtrl->setTentative(FALSE); |
@@ -1123,7 +1122,7 @@ void LLPanelObject::sendIsPhysical() | |||
1123 | BOOL value = mCheckPhysics->get(); | 1122 | BOOL value = mCheckPhysics->get(); |
1124 | if( mIsPhysical != value ) | 1123 | if( mIsPhysical != value ) |
1125 | { | 1124 | { |
1126 | gSelectMgr->selectionUpdatePhysics(value); | 1125 | LLSelectMgr::getInstance()->selectionUpdatePhysics(value); |
1127 | mIsPhysical = value; | 1126 | mIsPhysical = value; |
1128 | 1127 | ||
1129 | llinfos << "update physics sent" << llendl; | 1128 | llinfos << "update physics sent" << llendl; |
@@ -1139,7 +1138,7 @@ void LLPanelObject::sendIsTemporary() | |||
1139 | BOOL value = mCheckTemporary->get(); | 1138 | BOOL value = mCheckTemporary->get(); |
1140 | if( mIsTemporary != value ) | 1139 | if( mIsTemporary != value ) |
1141 | { | 1140 | { |
1142 | gSelectMgr->selectionUpdateTemporary(value); | 1141 | LLSelectMgr::getInstance()->selectionUpdateTemporary(value); |
1143 | mIsTemporary = value; | 1142 | mIsTemporary = value; |
1144 | 1143 | ||
1145 | llinfos << "update temporary sent" << llendl; | 1144 | llinfos << "update temporary sent" << llendl; |
@@ -1156,7 +1155,7 @@ void LLPanelObject::sendIsPhantom() | |||
1156 | BOOL value = mCheckPhantom->get(); | 1155 | BOOL value = mCheckPhantom->get(); |
1157 | if( mIsPhantom != value ) | 1156 | if( mIsPhantom != value ) |
1158 | { | 1157 | { |
1159 | gSelectMgr->selectionUpdatePhantom(value); | 1158 | LLSelectMgr::getInstance()->selectionUpdatePhantom(value); |
1160 | mIsPhantom = value; | 1159 | mIsPhantom = value; |
1161 | 1160 | ||
1162 | llinfos << "update phantom sent" << llendl; | 1161 | llinfos << "update phantom sent" << llendl; |
@@ -1172,7 +1171,7 @@ void LLPanelObject::sendCastShadows() | |||
1172 | BOOL value = mCheckCastShadows->get(); | 1171 | BOOL value = mCheckCastShadows->get(); |
1173 | if( mCastShadows != value ) | 1172 | if( mCastShadows != value ) |
1174 | { | 1173 | { |
1175 | gSelectMgr->selectionUpdateCastShadows(value); | 1174 | LLSelectMgr::getInstance()->selectionUpdateCastShadows(value); |
1176 | mCastShadows = value; | 1175 | mCastShadows = value; |
1177 | 1176 | ||
1178 | llinfos << "update cast shadows sent" << llendl; | 1177 | llinfos << "update cast shadows sent" << llendl; |
@@ -1196,7 +1195,7 @@ void LLPanelObject::onCommitMaterial( LLUICtrl* ctrl, void* userdata ) | |||
1196 | if (material_name != LEGACY_FULLBRIGHT_DESC) | 1195 | if (material_name != LEGACY_FULLBRIGHT_DESC) |
1197 | { | 1196 | { |
1198 | U8 material_code = LLMaterialTable::basic.getMCode(material_name.c_str()); | 1197 | U8 material_code = LLMaterialTable::basic.getMCode(material_name.c_str()); |
1199 | gSelectMgr->selectionSetMaterial(material_code); | 1198 | LLSelectMgr::getInstance()->selectionSetMaterial(material_code); |
1200 | } | 1199 | } |
1201 | } | 1200 | } |
1202 | } | 1201 | } |
@@ -1574,7 +1573,7 @@ void LLPanelObject::sendRotation() | |||
1574 | 1573 | ||
1575 | mObject->setRotation(rotation, TRUE ); | 1574 | mObject->setRotation(rotation, TRUE ); |
1576 | 1575 | ||
1577 | gSelectMgr->sendMultipleUpdate(UPD_ROTATION); | 1576 | LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_ROTATION); |
1578 | } | 1577 | } |
1579 | } | 1578 | } |
1580 | 1579 | ||
@@ -1596,13 +1595,13 @@ void LLPanelObject::sendScale() | |||
1596 | BOOL dont_stretch_textures = !LLManipScale::getStretchTextures(); | 1595 | BOOL dont_stretch_textures = !LLManipScale::getStretchTextures(); |
1597 | if (dont_stretch_textures) | 1596 | if (dont_stretch_textures) |
1598 | { | 1597 | { |
1599 | gSelectMgr->saveSelectedObjectTransform(SELECT_ACTION_TYPE_SCALE); | 1598 | LLSelectMgr::getInstance()->saveSelectedObjectTransform(SELECT_ACTION_TYPE_SCALE); |
1600 | } | 1599 | } |
1601 | 1600 | ||
1602 | mObject->setScale(newscale, TRUE); | 1601 | mObject->setScale(newscale, TRUE); |
1603 | gSelectMgr->sendMultipleUpdate(UPD_SCALE | UPD_POSITION); | 1602 | LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_SCALE | UPD_POSITION); |
1604 | 1603 | ||
1605 | gSelectMgr->adjustTexturesByScale(TRUE, !dont_stretch_textures); | 1604 | LLSelectMgr::getInstance()->adjustTexturesByScale(TRUE, !dont_stretch_textures); |
1606 | // llinfos << "scale sent" << llendl; | 1605 | // llinfos << "scale sent" << llendl; |
1607 | } | 1606 | } |
1608 | else | 1607 | else |
@@ -1621,8 +1620,8 @@ void LLPanelObject::sendPosition() | |||
1621 | 1620 | ||
1622 | // Clamp the Z height | 1621 | // Clamp the Z height |
1623 | const F32 height = newpos.mV[VZ]; | 1622 | const F32 height = newpos.mV[VZ]; |
1624 | const F32 min_height = gWorldp->getMinAllowedZ(mObject); | 1623 | const F32 min_height = LLWorld::getInstance()->getMinAllowedZ(mObject); |
1625 | const F32 max_height = gWorldPointer->getRegionMaxHeight(); | 1624 | const F32 max_height = LLWorld::getInstance()->getRegionMaxHeight(); |
1626 | 1625 | ||
1627 | if (!mObject->isAttachment()) | 1626 | if (!mObject->isAttachment()) |
1628 | { | 1627 | { |
@@ -1640,7 +1639,7 @@ void LLPanelObject::sendPosition() | |||
1640 | // Grass is always drawn on the ground, so clamp its position to the ground | 1639 | // Grass is always drawn on the ground, so clamp its position to the ground |
1641 | if (mObject->getPCode() == LL_PCODE_LEGACY_GRASS) | 1640 | if (mObject->getPCode() == LL_PCODE_LEGACY_GRASS) |
1642 | { | 1641 | { |
1643 | mCtrlPosZ->set(gWorldp->resolveLandHeightAgent(newpos) + 1.f); | 1642 | mCtrlPosZ->set(LLWorld::getInstance()->resolveLandHeightAgent(newpos) + 1.f); |
1644 | } | 1643 | } |
1645 | } | 1644 | } |
1646 | 1645 | ||
@@ -1648,7 +1647,7 @@ void LLPanelObject::sendPosition() | |||
1648 | // won't get dumped by the simulator. | 1647 | // won't get dumped by the simulator. |
1649 | LLVector3d new_pos_global = regionp->getPosGlobalFromRegion(newpos); | 1648 | LLVector3d new_pos_global = regionp->getPosGlobalFromRegion(newpos); |
1650 | 1649 | ||
1651 | if ( gWorldPointer->positionRegionValidGlobal(new_pos_global) ) | 1650 | if ( LLWorld::getInstance()->positionRegionValidGlobal(new_pos_global) ) |
1652 | { | 1651 | { |
1653 | // send only if the position is changed, that is, the delta vector is not zero | 1652 | // send only if the position is changed, that is, the delta vector is not zero |
1654 | LLVector3d old_pos_global = mObject->getPositionGlobal(); | 1653 | LLVector3d old_pos_global = mObject->getPositionGlobal(); |
@@ -1666,16 +1665,9 @@ void LLPanelObject::sendPosition() | |||
1666 | { | 1665 | { |
1667 | mObject->setPositionEdit(newpos); | 1666 | mObject->setPositionEdit(newpos); |
1668 | } | 1667 | } |
1669 | gSelectMgr->sendMultipleUpdate(UPD_POSITION); | 1668 | LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_POSITION); |
1670 | //mRootObject->sendPositionUpdate(); | ||
1671 | 1669 | ||
1672 | gSelectMgr->updateSelectionCenter(); | 1670 | LLSelectMgr::getInstance()->updateSelectionCenter(); |
1673 | |||
1674 | // llinfos << "position sent" << llendl; | ||
1675 | } | ||
1676 | else | ||
1677 | { | ||
1678 | // llinfos << "position not changed" << llendl; | ||
1679 | } | 1671 | } |
1680 | } | 1672 | } |
1681 | else | 1673 | else |
@@ -1727,9 +1719,9 @@ void LLPanelObject::draw() | |||
1727 | const LLColor4 blue( 0.f, 0.5f, 1.0f, 1); | 1719 | const LLColor4 blue( 0.f, 0.5f, 1.0f, 1); |
1728 | 1720 | ||
1729 | // Tune the colors of the labels | 1721 | // Tune the colors of the labels |
1730 | LLTool* tool = gToolMgr->getCurrentTool(); | 1722 | LLTool* tool = LLToolMgr::getInstance()->getCurrentTool(); |
1731 | 1723 | ||
1732 | if (tool == gToolTranslate) | 1724 | if (tool == LLToolCompTranslate::getInstance()) |
1733 | { | 1725 | { |
1734 | mCtrlPosX ->setLabelColor(red); | 1726 | mCtrlPosX ->setLabelColor(red); |
1735 | mCtrlPosY ->setLabelColor(green); | 1727 | mCtrlPosY ->setLabelColor(green); |
@@ -1743,7 +1735,7 @@ void LLPanelObject::draw() | |||
1743 | mCtrlRotY ->setLabelColor(white); | 1735 | mCtrlRotY ->setLabelColor(white); |
1744 | mCtrlRotZ ->setLabelColor(white); | 1736 | mCtrlRotZ ->setLabelColor(white); |
1745 | } | 1737 | } |
1746 | else if ( tool == gToolStretch ) | 1738 | else if ( tool == LLToolCompScale::getInstance() ) |
1747 | { | 1739 | { |
1748 | mCtrlPosX ->setLabelColor(white); | 1740 | mCtrlPosX ->setLabelColor(white); |
1749 | mCtrlPosY ->setLabelColor(white); | 1741 | mCtrlPosY ->setLabelColor(white); |
@@ -1757,7 +1749,7 @@ void LLPanelObject::draw() | |||
1757 | mCtrlRotY ->setLabelColor(white); | 1749 | mCtrlRotY ->setLabelColor(white); |
1758 | mCtrlRotZ ->setLabelColor(white); | 1750 | mCtrlRotZ ->setLabelColor(white); |
1759 | } | 1751 | } |
1760 | else if ( tool == gToolRotate ) | 1752 | else if ( tool == LLToolCompRotate::getInstance() ) |
1761 | { | 1753 | { |
1762 | mCtrlPosX ->setLabelColor(white); | 1754 | mCtrlPosX ->setLabelColor(white); |
1763 | mCtrlPosY ->setLabelColor(white); | 1755 | mCtrlPosY ->setLabelColor(white); |
@@ -1823,7 +1815,7 @@ void LLPanelObject::clearCtrls() | |||
1823 | mLabelRadiusOffset->setEnabled( FALSE ); | 1815 | mLabelRadiusOffset->setEnabled( FALSE ); |
1824 | mLabelRevolutions->setEnabled( FALSE ); | 1816 | mLabelRevolutions->setEnabled( FALSE ); |
1825 | 1817 | ||
1826 | childSetVisible("select_single", TRUE); | 1818 | childSetVisible("select_single", FALSE); |
1827 | childSetVisible("edit_object", TRUE); | 1819 | childSetVisible("edit_object", TRUE); |
1828 | childSetEnabled("edit_object", FALSE); | 1820 | childSetEnabled("edit_object", FALSE); |
1829 | 1821 | ||
@@ -1847,7 +1839,7 @@ void LLPanelObject::onCommitLock(LLUICtrl *ctrl, void *data) | |||
1847 | 1839 | ||
1848 | BOOL new_state = self->mCheckLock->get(); | 1840 | BOOL new_state = self->mCheckLock->get(); |
1849 | 1841 | ||
1850 | gSelectMgr->selectionSetObjectPermissions(PERM_OWNER, !new_state, PERM_MOVE | PERM_MODIFY); | 1842 | LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_OWNER, !new_state, PERM_MOVE | PERM_MODIFY); |
1851 | } | 1843 | } |
1852 | 1844 | ||
1853 | // static | 1845 | // static |