diff options
author | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
commit | ce28e056c20bf2723f565bbf464b87781ec248a2 (patch) | |
tree | ef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/newview/llpanelface.cpp | |
parent | Second Life viewer sources 1.19.1.4b (diff) | |
download | meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2 meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz |
Second Life viewer sources 1.20.2
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llpanelface.cpp | 125 |
1 files changed, 62 insertions, 63 deletions
diff --git a/linden/indra/newview/llpanelface.cpp b/linden/indra/newview/llpanelface.cpp index a52c57f..4742627 100644 --- a/linden/indra/newview/llpanelface.cpp +++ b/linden/indra/newview/llpanelface.cpp | |||
@@ -60,7 +60,7 @@ | |||
60 | #include "llviewermedia.h" | 60 | #include "llviewermedia.h" |
61 | #include "llviewerobject.h" | 61 | #include "llviewerobject.h" |
62 | #include "llviewerstats.h" | 62 | #include "llviewerstats.h" |
63 | #include "llvieweruictrlfactory.h" | 63 | #include "lluictrlfactory.h" |
64 | 64 | ||
65 | // | 65 | // |
66 | // Methods | 66 | // Methods |
@@ -100,7 +100,7 @@ BOOL LLPanelFace::postBuild() | |||
100 | // Allow any texture to be used during non-immediate mode. | 100 | // Allow any texture to be used during non-immediate mode. |
101 | mTextureCtrl->setNonImmediateFilterPermMask(PERM_NONE); | 101 | mTextureCtrl->setNonImmediateFilterPermMask(PERM_NONE); |
102 | LLAggregatePermissions texture_perms; | 102 | LLAggregatePermissions texture_perms; |
103 | if (gSelectMgr->selectGetAggregateTexturePermissions(texture_perms)) | 103 | if (LLSelectMgr::getInstance()->selectGetAggregateTexturePermissions(texture_perms)) |
104 | { | 104 | { |
105 | BOOL can_copy = | 105 | BOOL can_copy = |
106 | texture_perms.getValue(PERM_COPY) == LLAggregatePermissions::AP_EMPTY || | 106 | texture_perms.getValue(PERM_COPY) == LLAggregatePermissions::AP_EMPTY || |
@@ -128,14 +128,14 @@ BOOL LLPanelFace::postBuild() | |||
128 | mColorSwatch->setCanApplyImmediately(TRUE); | 128 | mColorSwatch->setCanApplyImmediately(TRUE); |
129 | } | 129 | } |
130 | 130 | ||
131 | mLabelColorTransp = LLUICtrlFactory::getTextBoxByName(this,"color trans"); | 131 | mLabelColorTransp = getChild<LLTextBox>("color trans"); |
132 | if(mLabelColorTransp) | 132 | if(mLabelColorTransp) |
133 | { | 133 | { |
134 | mLabelColorTransp->setFollowsTop(); | 134 | mLabelColorTransp->setFollowsTop(); |
135 | mLabelColorTransp->setFollowsLeft(); | 135 | mLabelColorTransp->setFollowsLeft(); |
136 | } | 136 | } |
137 | 137 | ||
138 | mCtrlColorTransp = LLUICtrlFactory::getSpinnerByName(this,"ColorTrans"); | 138 | mCtrlColorTransp = getChild<LLSpinCtrl>("ColorTrans"); |
139 | if(mCtrlColorTransp) | 139 | if(mCtrlColorTransp) |
140 | { | 140 | { |
141 | mCtrlColorTransp->setCommitCallback(LLPanelFace::onCommitAlpha); | 141 | mCtrlColorTransp->setCommitCallback(LLPanelFace::onCommitAlpha); |
@@ -145,14 +145,14 @@ BOOL LLPanelFace::postBuild() | |||
145 | mCtrlColorTransp->setFollowsLeft(); | 145 | mCtrlColorTransp->setFollowsLeft(); |
146 | } | 146 | } |
147 | 147 | ||
148 | mCheckFullbright = LLUICtrlFactory::getCheckBoxByName(this,"checkbox fullbright"); | 148 | mCheckFullbright = getChild<LLCheckBoxCtrl>("checkbox fullbright"); |
149 | if (mCheckFullbright) | 149 | if (mCheckFullbright) |
150 | { | 150 | { |
151 | mCheckFullbright->setCommitCallback(LLPanelFace::onCommitFullbright); | 151 | mCheckFullbright->setCommitCallback(LLPanelFace::onCommitFullbright); |
152 | mCheckFullbright->setCallbackUserData( this ); | 152 | mCheckFullbright->setCallbackUserData( this ); |
153 | } | 153 | } |
154 | mLabelTexGen = LLUICtrlFactory::getTextBoxByName(this,"tex gen"); | 154 | mLabelTexGen = getChild<LLTextBox>("tex gen"); |
155 | mComboTexGen = LLUICtrlFactory::getComboBoxByName(this,"combobox texgen"); | 155 | mComboTexGen = getChild<LLComboBox>("combobox texgen"); |
156 | if(mComboTexGen) | 156 | if(mComboTexGen) |
157 | { | 157 | { |
158 | mComboTexGen->setCommitCallback(LLPanelFace::onCommitTexGen); | 158 | mComboTexGen->setCommitCallback(LLPanelFace::onCommitTexGen); |
@@ -160,8 +160,8 @@ BOOL LLPanelFace::postBuild() | |||
160 | mComboTexGen->setCallbackUserData( this ); | 160 | mComboTexGen->setCallbackUserData( this ); |
161 | } | 161 | } |
162 | 162 | ||
163 | mLabelGlow = LLUICtrlFactory::getTextBoxByName(this,"glow label"); | 163 | mLabelGlow = getChild<LLTextBox>("glow label"); |
164 | mCtrlGlow = LLUICtrlFactory::getSpinnerByName(this,"glow"); | 164 | mCtrlGlow = getChild<LLSpinCtrl>("glow"); |
165 | if(mCtrlGlow) | 165 | if(mCtrlGlow) |
166 | { | 166 | { |
167 | mCtrlGlow->setCommitCallback(LLPanelFace::onCommitGlow); | 167 | mCtrlGlow->setCommitCallback(LLPanelFace::onCommitGlow); |
@@ -210,69 +210,68 @@ void LLPanelFace::sendTexture() | |||
210 | { | 210 | { |
211 | id = mTextureCtrl->getImageAssetID(); | 211 | id = mTextureCtrl->getImageAssetID(); |
212 | } | 212 | } |
213 | gSelectMgr->selectionSetImage(id); | 213 | LLSelectMgr::getInstance()->selectionSetImage(id); |
214 | } | 214 | } |
215 | } | 215 | } |
216 | 216 | ||
217 | void LLPanelFace::sendBump() | 217 | void LLPanelFace::sendBump() |
218 | { | 218 | { |
219 | LLComboBox* mComboBumpiness = gUICtrlFactory->getComboBoxByName(this,"combobox bumpiness"); | 219 | LLComboBox* mComboBumpiness = getChild<LLComboBox>("combobox bumpiness"); |
220 | if(!mComboBumpiness)return; | 220 | if(!mComboBumpiness)return; |
221 | U8 bump = (U8) mComboBumpiness->getCurrentIndex() & TEM_BUMP_MASK; | 221 | U8 bump = (U8) mComboBumpiness->getCurrentIndex() & TEM_BUMP_MASK; |
222 | gSelectMgr->selectionSetBumpmap( bump ); | 222 | LLSelectMgr::getInstance()->selectionSetBumpmap( bump ); |
223 | } | 223 | } |
224 | 224 | ||
225 | void LLPanelFace::sendTexGen() | 225 | void LLPanelFace::sendTexGen() |
226 | { | 226 | { |
227 | LLComboBox* mComboTexGen = gUICtrlFactory->getComboBoxByName(this,"combobox texgen"); | 227 | LLComboBox* mComboTexGen = getChild<LLComboBox>("combobox texgen"); |
228 | if(!mComboTexGen)return; | 228 | if(!mComboTexGen)return; |
229 | U8 tex_gen = (U8) mComboTexGen->getCurrentIndex() << TEM_TEX_GEN_SHIFT; | 229 | U8 tex_gen = (U8) mComboTexGen->getCurrentIndex() << TEM_TEX_GEN_SHIFT; |
230 | gSelectMgr->selectionSetTexGen( tex_gen ); | 230 | LLSelectMgr::getInstance()->selectionSetTexGen( tex_gen ); |
231 | } | 231 | } |
232 | 232 | ||
233 | void LLPanelFace::sendShiny() | 233 | void LLPanelFace::sendShiny() |
234 | { | 234 | { |
235 | LLComboBox* mComboShininess = gUICtrlFactory->getComboBoxByName(this,"combobox shininess"); | 235 | LLComboBox* mComboShininess = getChild<LLComboBox>("combobox shininess"); |
236 | if(!mComboShininess)return; | 236 | if(!mComboShininess)return; |
237 | U8 shiny = (U8) mComboShininess->getCurrentIndex() & TEM_SHINY_MASK; | 237 | U8 shiny = (U8) mComboShininess->getCurrentIndex() & TEM_SHINY_MASK; |
238 | gSelectMgr->selectionSetShiny( shiny ); | 238 | LLSelectMgr::getInstance()->selectionSetShiny( shiny ); |
239 | } | 239 | } |
240 | 240 | ||
241 | void LLPanelFace::sendFullbright() | 241 | void LLPanelFace::sendFullbright() |
242 | { | 242 | { |
243 | LLCheckBoxCtrl* mCheckFullbright = gUICtrlFactory->getCheckBoxByName(this,"checkbox fullbright"); | 243 | LLCheckBoxCtrl* mCheckFullbright = getChild<LLCheckBoxCtrl>("checkbox fullbright"); |
244 | if(!mCheckFullbright)return; | 244 | if(!mCheckFullbright)return; |
245 | U8 fullbright = mCheckFullbright->get() ? TEM_FULLBRIGHT_MASK : 0; | 245 | U8 fullbright = mCheckFullbright->get() ? TEM_FULLBRIGHT_MASK : 0; |
246 | gSelectMgr->selectionSetFullbright( fullbright ); | 246 | LLSelectMgr::getInstance()->selectionSetFullbright( fullbright ); |
247 | } | 247 | } |
248 | 248 | ||
249 | void LLPanelFace::sendColor() | 249 | void LLPanelFace::sendColor() |
250 | { | 250 | { |
251 | 251 | ||
252 | LLColorSwatchCtrl* mColorSwatch = LLViewerUICtrlFactory::getColorSwatchByName(this,"colorswatch"); | 252 | LLColorSwatchCtrl* mColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch"); |
253 | if(!mColorSwatch)return; | 253 | if(!mColorSwatch)return; |
254 | LLColor4 color = mColorSwatch->get(); | 254 | LLColor4 color = mColorSwatch->get(); |
255 | 255 | ||
256 | gSelectMgr->selectionSetColorOnly( color ); | 256 | LLSelectMgr::getInstance()->selectionSetColorOnly( color ); |
257 | } | 257 | } |
258 | 258 | ||
259 | void LLPanelFace::sendAlpha() | 259 | void LLPanelFace::sendAlpha() |
260 | { | 260 | { |
261 | LLSpinCtrl* mCtrlColorTransp = LLViewerUICtrlFactory::getSpinnerByName(this,"ColorTrans"); | 261 | LLSpinCtrl* mCtrlColorTransp = getChild<LLSpinCtrl>("ColorTrans"); |
262 | if(!mCtrlColorTransp)return; | 262 | if(!mCtrlColorTransp)return; |
263 | F32 alpha = (100.f - mCtrlColorTransp->get()) / 100.f; | 263 | F32 alpha = (100.f - mCtrlColorTransp->get()) / 100.f; |
264 | 264 | ||
265 | gSelectMgr->selectionSetAlphaOnly( alpha ); | 265 | LLSelectMgr::getInstance()->selectionSetAlphaOnly( alpha ); |
266 | } | 266 | } |
267 | 267 | ||
268 | 268 | ||
269 | void LLPanelFace::sendGlow() | 269 | void LLPanelFace::sendGlow() |
270 | { | 270 | { |
271 | LLSpinCtrl* mCtrlGlow = LLViewerUICtrlFactory::getSpinnerByName(this,"glow"); | 271 | LLSpinCtrl* mCtrlGlow = getChild<LLSpinCtrl>("glow"); |
272 | if(!mCtrlGlow)return; | ||
273 | F32 glow = mCtrlGlow->get(); | 272 | F32 glow = mCtrlGlow->get(); |
274 | 273 | ||
275 | gSelectMgr->selectionSetGlow( glow ); | 274 | LLSelectMgr::getInstance()->selectionSetGlow( glow ); |
276 | } | 275 | } |
277 | 276 | ||
278 | struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor | 277 | struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor |
@@ -282,14 +281,14 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor | |||
282 | { | 281 | { |
283 | BOOL valid; | 282 | BOOL valid; |
284 | F32 value; | 283 | F32 value; |
285 | LLSpinCtrl* ctrlTexScaleS = LLViewerUICtrlFactory::getSpinnerByName(mPanel,"TexScaleU"); | 284 | LLSpinCtrl* ctrlTexScaleS = mPanel->getChild<LLSpinCtrl>("TexScaleU"); |
286 | LLSpinCtrl* ctrlTexScaleT = LLViewerUICtrlFactory::getSpinnerByName(mPanel,"TexScaleV"); | 285 | LLSpinCtrl* ctrlTexScaleT = mPanel->getChild<LLSpinCtrl>("TexScaleV"); |
287 | LLSpinCtrl* ctrlTexOffsetS = LLViewerUICtrlFactory::getSpinnerByName(mPanel,"TexOffsetU"); | 286 | LLSpinCtrl* ctrlTexOffsetS = mPanel->getChild<LLSpinCtrl>("TexOffsetU"); |
288 | LLSpinCtrl* ctrlTexOffsetT = LLViewerUICtrlFactory::getSpinnerByName(mPanel,"TexOffsetV"); | 287 | LLSpinCtrl* ctrlTexOffsetT = mPanel->getChild<LLSpinCtrl>("TexOffsetV"); |
289 | LLSpinCtrl* ctrlTexRotation = LLViewerUICtrlFactory::getSpinnerByName(mPanel,"TexRot"); | 288 | LLSpinCtrl* ctrlTexRotation = mPanel->getChild<LLSpinCtrl>("TexRot"); |
290 | LLCheckBoxCtrl* checkFlipScaleS = LLViewerUICtrlFactory::getCheckBoxByName(mPanel,"checkbox flip s"); | 289 | LLCheckBoxCtrl* checkFlipScaleS = mPanel->getChild<LLCheckBoxCtrl>("checkbox flip s"); |
291 | LLCheckBoxCtrl* checkFlipScaleT = LLViewerUICtrlFactory::getCheckBoxByName(mPanel,"checkbox flip t"); | 290 | LLCheckBoxCtrl* checkFlipScaleT = mPanel->getChild<LLCheckBoxCtrl>("checkbox flip t"); |
292 | LLComboBox* comboTexGen = LLViewerUICtrlFactory::getComboBoxByName(mPanel,"combobox texgen"); | 291 | LLComboBox* comboTexGen = mPanel->getChild<LLComboBox>("combobox texgen"); |
293 | if (ctrlTexScaleS) | 292 | if (ctrlTexScaleS) |
294 | { | 293 | { |
295 | valid = !ctrlTexScaleS->getTentative() || !checkFlipScaleS->getTentative(); | 294 | valid = !ctrlTexScaleS->getTentative() || !checkFlipScaleS->getTentative(); |
@@ -373,15 +372,15 @@ struct LLPanelFaceSendFunctor : public LLSelectedObjectFunctor | |||
373 | void LLPanelFace::sendTextureInfo() | 372 | void LLPanelFace::sendTextureInfo() |
374 | { | 373 | { |
375 | LLPanelFaceSetTEFunctor setfunc(this); | 374 | LLPanelFaceSetTEFunctor setfunc(this); |
376 | gSelectMgr->getSelection()->applyToTEs(&setfunc); | 375 | LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc); |
377 | 376 | ||
378 | LLPanelFaceSendFunctor sendfunc; | 377 | LLPanelFaceSendFunctor sendfunc; |
379 | gSelectMgr->getSelection()->applyToObjects(&sendfunc); | 378 | LLSelectMgr::getInstance()->getSelection()->applyToObjects(&sendfunc); |
380 | } | 379 | } |
381 | 380 | ||
382 | void LLPanelFace::getState() | 381 | void LLPanelFace::getState() |
383 | { | 382 | { |
384 | LLViewerObject* objectp = gSelectMgr->getSelection()->getFirstObject(); | 383 | LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); |
385 | 384 | ||
386 | if( objectp | 385 | if( objectp |
387 | && objectp->getPCode() == LL_PCODE_VOLUME | 386 | && objectp->getPCode() == LL_PCODE_VOLUME |
@@ -411,7 +410,7 @@ void LLPanelFace::getState() | |||
411 | childSetEnabled("button apply",editable); | 410 | childSetEnabled("button apply",editable); |
412 | 411 | ||
413 | bool identical; | 412 | bool identical; |
414 | LLTextureCtrl* texture_ctrl = LLViewerUICtrlFactory::getTexturePickerByName(this,"texture control"); | 413 | LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("texture control"); |
415 | 414 | ||
416 | // Texture | 415 | // Texture |
417 | { | 416 | { |
@@ -424,7 +423,7 @@ void LLPanelFace::getState() | |||
424 | return image ? image->getID() : LLUUID::null; | 423 | return image ? image->getID() : LLUUID::null; |
425 | } | 424 | } |
426 | } func; | 425 | } func; |
427 | identical = gSelectMgr->getSelection()->getSelectedTEValue( &func, id ); | 426 | identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, id ); |
428 | 427 | ||
429 | if (identical) | 428 | if (identical) |
430 | { | 429 | { |
@@ -463,7 +462,7 @@ void LLPanelFace::getState() | |||
463 | { | 462 | { |
464 | // texture_ctrl->setValid( editable ); | 463 | // texture_ctrl->setValid( editable ); |
465 | 464 | ||
466 | if (gSelectMgr->selectGetAggregateTexturePermissions(texture_perms)) | 465 | if (LLSelectMgr::getInstance()->selectGetAggregateTexturePermissions(texture_perms)) |
467 | { | 466 | { |
468 | BOOL can_copy = | 467 | BOOL can_copy = |
469 | texture_perms.getValue(PERM_COPY) == LLAggregatePermissions::AP_EMPTY || | 468 | texture_perms.getValue(PERM_COPY) == LLAggregatePermissions::AP_EMPTY || |
@@ -491,7 +490,7 @@ void LLPanelFace::getState() | |||
491 | return object->getTE(face)->mScaleS; | 490 | return object->getTE(face)->mScaleS; |
492 | } | 491 | } |
493 | } func; | 492 | } func; |
494 | identical = gSelectMgr->getSelection()->getSelectedTEValue( &func, scale_s ); | 493 | identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, scale_s ); |
495 | childSetValue("TexScaleU",editable ? llabs(scale_s) : 0); | 494 | childSetValue("TexScaleU",editable ? llabs(scale_s) : 0); |
496 | childSetTentative("TexScaleU",LLSD((BOOL)(!identical))); | 495 | childSetTentative("TexScaleU",LLSD((BOOL)(!identical))); |
497 | childSetEnabled("TexScaleU",editable); | 496 | childSetEnabled("TexScaleU",editable); |
@@ -509,7 +508,7 @@ void LLPanelFace::getState() | |||
509 | return object->getTE(face)->mScaleT; | 508 | return object->getTE(face)->mScaleT; |
510 | } | 509 | } |
511 | } func; | 510 | } func; |
512 | identical = gSelectMgr->getSelection()->getSelectedTEValue( &func, scale_t ); | 511 | identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, scale_t ); |
513 | 512 | ||
514 | childSetValue("TexScaleV",llabs(editable ? llabs(scale_t) : 0)); | 513 | childSetValue("TexScaleV",llabs(editable ? llabs(scale_t) : 0)); |
515 | childSetTentative("TexScaleV",LLSD((BOOL)(!identical))); | 514 | childSetTentative("TexScaleV",LLSD((BOOL)(!identical))); |
@@ -530,7 +529,7 @@ void LLPanelFace::getState() | |||
530 | return object->getTE(face)->mOffsetS; | 529 | return object->getTE(face)->mOffsetS; |
531 | } | 530 | } |
532 | } func; | 531 | } func; |
533 | identical = gSelectMgr->getSelection()->getSelectedTEValue( &func, offset_s ); | 532 | identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, offset_s ); |
534 | childSetValue("TexOffsetU", editable ? offset_s : 0); | 533 | childSetValue("TexOffsetU", editable ? offset_s : 0); |
535 | childSetTentative("TexOffsetU",!identical); | 534 | childSetTentative("TexOffsetU",!identical); |
536 | childSetEnabled("TexOffsetU",editable); | 535 | childSetEnabled("TexOffsetU",editable); |
@@ -545,7 +544,7 @@ void LLPanelFace::getState() | |||
545 | return object->getTE(face)->mOffsetT; | 544 | return object->getTE(face)->mOffsetT; |
546 | } | 545 | } |
547 | } func; | 546 | } func; |
548 | identical = gSelectMgr->getSelection()->getSelectedTEValue( &func, offset_t ); | 547 | identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, offset_t ); |
549 | childSetValue("TexOffsetV", editable ? offset_t : 0); | 548 | childSetValue("TexOffsetV", editable ? offset_t : 0); |
550 | childSetTentative("TexOffsetV",!identical); | 549 | childSetTentative("TexOffsetV",!identical); |
551 | childSetEnabled("TexOffsetV",editable); | 550 | childSetEnabled("TexOffsetV",editable); |
@@ -562,14 +561,14 @@ void LLPanelFace::getState() | |||
562 | return object->getTE(face)->mRotation; | 561 | return object->getTE(face)->mRotation; |
563 | } | 562 | } |
564 | } func; | 563 | } func; |
565 | identical = gSelectMgr->getSelection()->getSelectedTEValue( &func, rotation ); | 564 | identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, rotation ); |
566 | childSetValue("TexRot", editable ? rotation * RAD_TO_DEG : 0); | 565 | childSetValue("TexRot", editable ? rotation * RAD_TO_DEG : 0); |
567 | childSetTentative("TexRot",!identical); | 566 | childSetTentative("TexRot",!identical); |
568 | childSetEnabled("TexRot",editable); | 567 | childSetEnabled("TexRot",editable); |
569 | } | 568 | } |
570 | 569 | ||
571 | // Color swatch | 570 | // Color swatch |
572 | LLColorSwatchCtrl* mColorSwatch = LLViewerUICtrlFactory::getColorSwatchByName(this,"colorswatch"); | 571 | LLColorSwatchCtrl* mColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch"); |
573 | LLColor4 color = LLColor4::white; | 572 | LLColor4 color = LLColor4::white; |
574 | if(mColorSwatch) | 573 | if(mColorSwatch) |
575 | { | 574 | { |
@@ -580,7 +579,7 @@ void LLPanelFace::getState() | |||
580 | return object->getTE(face)->getColor(); | 579 | return object->getTE(face)->getColor(); |
581 | } | 580 | } |
582 | } func; | 581 | } func; |
583 | identical = gSelectMgr->getSelection()->getSelectedTEValue( &func, color ); | 582 | identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, color ); |
584 | 583 | ||
585 | mColorSwatch->setOriginal(color); | 584 | mColorSwatch->setOriginal(color); |
586 | mColorSwatch->set(color, TRUE); | 585 | mColorSwatch->set(color, TRUE); |
@@ -609,7 +608,7 @@ void LLPanelFace::getState() | |||
609 | return object->getTE(face)->getGlow(); | 608 | return object->getTE(face)->getGlow(); |
610 | } | 609 | } |
611 | } func; | 610 | } func; |
612 | identical = gSelectMgr->getSelection()->getSelectedTEValue( &func, glow ); | 611 | identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, glow ); |
613 | 612 | ||
614 | childSetValue("glow",glow); | 613 | childSetValue("glow",glow); |
615 | childSetEnabled("glow",editable); | 614 | childSetEnabled("glow",editable); |
@@ -628,7 +627,7 @@ void LLPanelFace::getState() | |||
628 | return (F32)(object->getTE(face)->getShiny()); | 627 | return (F32)(object->getTE(face)->getShiny()); |
629 | } | 628 | } |
630 | } func; | 629 | } func; |
631 | identical = gSelectMgr->getSelection()->getSelectedTEValue( &func, shinyf ); | 630 | identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, shinyf ); |
632 | LLCtrlSelectionInterface* combobox_shininess = | 631 | LLCtrlSelectionInterface* combobox_shininess = |
633 | childGetSelectionInterface("combobox shininess"); | 632 | childGetSelectionInterface("combobox shininess"); |
634 | if (combobox_shininess) | 633 | if (combobox_shininess) |
@@ -653,7 +652,7 @@ void LLPanelFace::getState() | |||
653 | return (F32)(object->getTE(face)->getBumpmap()); | 652 | return (F32)(object->getTE(face)->getBumpmap()); |
654 | } | 653 | } |
655 | } func; | 654 | } func; |
656 | identical = gSelectMgr->getSelection()->getSelectedTEValue( &func, bumpf ); | 655 | identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, bumpf ); |
657 | LLCtrlSelectionInterface* combobox_bumpiness = | 656 | LLCtrlSelectionInterface* combobox_bumpiness = |
658 | childGetSelectionInterface("combobox bumpiness"); | 657 | childGetSelectionInterface("combobox bumpiness"); |
659 | if (combobox_bumpiness) | 658 | if (combobox_bumpiness) |
@@ -678,7 +677,7 @@ void LLPanelFace::getState() | |||
678 | return (F32)(object->getTE(face)->getTexGen()); | 677 | return (F32)(object->getTE(face)->getTexGen()); |
679 | } | 678 | } |
680 | } func; | 679 | } func; |
681 | identical = gSelectMgr->getSelection()->getSelectedTEValue( &func, genf ); | 680 | identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, genf ); |
682 | S32 selected_texgen = ((S32) genf) >> TEM_TEX_GEN_SHIFT; | 681 | S32 selected_texgen = ((S32) genf) >> TEM_TEX_GEN_SHIFT; |
683 | LLCtrlSelectionInterface* combobox_texgen = | 682 | LLCtrlSelectionInterface* combobox_texgen = |
684 | childGetSelectionInterface("combobox texgen"); | 683 | childGetSelectionInterface("combobox texgen"); |
@@ -716,7 +715,7 @@ void LLPanelFace::getState() | |||
716 | return (F32)(object->getTE(face)->getFullbright()); | 715 | return (F32)(object->getTE(face)->getFullbright()); |
717 | } | 716 | } |
718 | } func; | 717 | } func; |
719 | identical = gSelectMgr->getSelection()->getSelectedTEValue( &func, fullbrightf ); | 718 | identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, fullbrightf ); |
720 | 719 | ||
721 | childSetValue("checkbox fullbright",(S32)fullbrightf); | 720 | childSetValue("checkbox fullbright",(S32)fullbrightf); |
722 | childSetEnabled("checkbox fullbright",editable); | 721 | childSetEnabled("checkbox fullbright",editable); |
@@ -743,11 +742,11 @@ void LLPanelFace::getState() | |||
743 | return object->getTE(face)->mScaleS / object->getScale().mV[s_axis]; | 742 | return object->getTE(face)->mScaleS / object->getScale().mV[s_axis]; |
744 | } | 743 | } |
745 | } func; | 744 | } func; |
746 | identical = gSelectMgr->getSelection()->getSelectedTEValue( &func, repeats ); | 745 | identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, repeats ); |
747 | 746 | ||
748 | childSetValue("rptctrl", editable ? repeats : 0); | 747 | childSetValue("rptctrl", editable ? repeats : 0); |
749 | childSetTentative("rptctrl",!identical); | 748 | childSetTentative("rptctrl",!identical); |
750 | LLComboBox* mComboTexGen = LLViewerUICtrlFactory::getComboBoxByName(this,"combobox texgen"); | 749 | LLComboBox* mComboTexGen = getChild<LLComboBox>("combobox texgen"); |
751 | if (mComboTexGen) | 750 | if (mComboTexGen) |
752 | { | 751 | { |
753 | BOOL enabled = editable && (!mComboTexGen || mComboTexGen->getCurrentIndex() != 1); | 752 | BOOL enabled = editable && (!mComboTexGen || mComboTexGen->getCurrentIndex() != 1); |
@@ -825,14 +824,14 @@ void LLPanelFace::onCommitAlpha(LLUICtrl* ctrl, void* userdata) | |||
825 | // static | 824 | // static |
826 | void LLPanelFace::onCancelColor(LLUICtrl* ctrl, void* userdata) | 825 | void LLPanelFace::onCancelColor(LLUICtrl* ctrl, void* userdata) |
827 | { | 826 | { |
828 | gSelectMgr->selectionRevertColors(); | 827 | LLSelectMgr::getInstance()->selectionRevertColors(); |
829 | } | 828 | } |
830 | 829 | ||
831 | // static | 830 | // static |
832 | void LLPanelFace::onSelectColor(LLUICtrl* ctrl, void* userdata) | 831 | void LLPanelFace::onSelectColor(LLUICtrl* ctrl, void* userdata) |
833 | { | 832 | { |
834 | LLPanelFace* self = (LLPanelFace*) userdata; | 833 | LLPanelFace* self = (LLPanelFace*) userdata; |
835 | gSelectMgr->saveSelectedObjectColors(); | 834 | LLSelectMgr::getInstance()->saveSelectedObjectColors(); |
836 | self->sendColor(); | 835 | self->sendColor(); |
837 | } | 836 | } |
838 | 837 | ||
@@ -875,8 +874,8 @@ void LLPanelFace::onCommitGlow(LLUICtrl* ctrl, void* userdata) | |||
875 | BOOL LLPanelFace::onDragTexture(LLUICtrl*, LLInventoryItem* item, void*) | 874 | BOOL LLPanelFace::onDragTexture(LLUICtrl*, LLInventoryItem* item, void*) |
876 | { | 875 | { |
877 | BOOL accept = TRUE; | 876 | BOOL accept = TRUE; |
878 | for (LLObjectSelection::root_iterator iter = gSelectMgr->getSelection()->root_begin(); | 877 | for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin(); |
879 | iter != gSelectMgr->getSelection()->root_end(); iter++) | 878 | iter != LLSelectMgr::getInstance()->getSelection()->root_end(); iter++) |
880 | { | 879 | { |
881 | LLSelectNode* node = *iter; | 880 | LLSelectNode* node = *iter; |
882 | LLViewerObject* obj = node->getObject(); | 881 | LLViewerObject* obj = node->getObject(); |
@@ -894,7 +893,7 @@ void LLPanelFace::onCommitTexture( LLUICtrl* ctrl, void* userdata ) | |||
894 | { | 893 | { |
895 | LLPanelFace* self = (LLPanelFace*) userdata; | 894 | LLPanelFace* self = (LLPanelFace*) userdata; |
896 | 895 | ||
897 | gViewerStats->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT ); | 896 | LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT ); |
898 | 897 | ||
899 | self->sendTexture(); | 898 | self->sendTexture(); |
900 | } | 899 | } |
@@ -902,14 +901,14 @@ void LLPanelFace::onCommitTexture( LLUICtrl* ctrl, void* userdata ) | |||
902 | // static | 901 | // static |
903 | void LLPanelFace::onCancelTexture(LLUICtrl* ctrl, void* userdata) | 902 | void LLPanelFace::onCancelTexture(LLUICtrl* ctrl, void* userdata) |
904 | { | 903 | { |
905 | gSelectMgr->selectionRevertTextures(); | 904 | LLSelectMgr::getInstance()->selectionRevertTextures(); |
906 | } | 905 | } |
907 | 906 | ||
908 | // static | 907 | // static |
909 | void LLPanelFace::onSelectTexture(LLUICtrl* ctrl, void* userdata) | 908 | void LLPanelFace::onSelectTexture(LLUICtrl* ctrl, void* userdata) |
910 | { | 909 | { |
911 | LLPanelFace* self = (LLPanelFace*) userdata; | 910 | LLPanelFace* self = (LLPanelFace*) userdata; |
912 | gSelectMgr->saveSelectedObjectTextures(); | 911 | LLSelectMgr::getInstance()->saveSelectedObjectTextures(); |
913 | self->sendTexture(); | 912 | self->sendTexture(); |
914 | } | 913 | } |
915 | 914 | ||
@@ -931,7 +930,7 @@ void LLPanelFace::onClickApply(void* userdata) | |||
931 | 930 | ||
932 | //F32 repeats_per_meter = self->mCtrlRepeatsPerMeter->get(); | 931 | //F32 repeats_per_meter = self->mCtrlRepeatsPerMeter->get(); |
933 | F32 repeats_per_meter = (F32)self->childGetValue( "rptctrl" ).asReal();//self->mCtrlRepeatsPerMeter->get(); | 932 | F32 repeats_per_meter = (F32)self->childGetValue( "rptctrl" ).asReal();//self->mCtrlRepeatsPerMeter->get(); |
934 | gSelectMgr->selectionTexScaleAutofit( repeats_per_meter ); | 933 | LLSelectMgr::getInstance()->selectionTexScaleAutofit( repeats_per_meter ); |
935 | } | 934 | } |
936 | 935 | ||
937 | // commit the fit media texture to prim button | 936 | // commit the fit media texture to prim button |
@@ -965,8 +964,8 @@ struct LLPanelFaceSetMediaFunctor : public LLSelectedTEFunctor | |||
965 | void LLPanelFace::onClickAutoFix(void* userdata) | 964 | void LLPanelFace::onClickAutoFix(void* userdata) |
966 | { | 965 | { |
967 | LLPanelFaceSetMediaFunctor setfunc; | 966 | LLPanelFaceSetMediaFunctor setfunc; |
968 | gSelectMgr->getSelection()->applyToTEs(&setfunc); | 967 | LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc); |
969 | 968 | ||
970 | LLPanelFaceSendFunctor sendfunc; | 969 | LLPanelFaceSendFunctor sendfunc; |
971 | gSelectMgr->getSelection()->applyToObjects(&sendfunc); | 970 | LLSelectMgr::getInstance()->getSelection()->applyToObjects(&sendfunc); |
972 | } | 971 | } |