diff options
author | Graham Linden <graham@lindenlab.com> | 2018-07-30 22:38:30 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-07-30 22:38:30 +0100 |
commit | 60d256e80f019e77afef941bc02eb65be6f9bc6d (patch) | |
tree | 76875bc02bdd45fdfabf423057d8dec67783b83c /indra/newview/llselectmgr.cpp | |
parent | ba31900ea80dd0bdb29fa8f4100f992489b25a1e (diff) |
MAINT-8915
Fix sync of material rotation and offset values when using aligned planar faces.
Make it possible to set a specific TE's normal/spec offset/rotation values.
Eliminate redundant conversions in LLSD -> struct handler.
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r-- | indra/newview/llselectmgr.cpp | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index ddae109030..53f09ab62d 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -2080,29 +2080,33 @@ void LLSelectMgr::selectionSetGlow(F32 glow) mSelectedObjects->applyToObjects( &func2 ); } -void LLSelectMgr::selectionSetMaterialParams(LLSelectedTEMaterialFunctor* material_func) +void LLSelectMgr::selectionSetMaterialParams(LLSelectedTEMaterialFunctor* material_func, int te) { struct f1 : public LLSelectedTEFunctor { LLMaterialPtr mMaterial; - f1(LLSelectedTEMaterialFunctor* material_func) : _material_func(material_func) {} + f1(LLSelectedTEMaterialFunctor* material_func, int te) : _material_func(material_func), _specific_te(te) {} - bool apply(LLViewerObject* object, S32 face) + bool apply(LLViewerObject* object, S32 te) { - if (object && object->permModify() && _material_func) - { - LLTextureEntry* tep = object->getTE(face); - if (tep) - { - LLMaterialPtr current_material = tep->getMaterialParams(); - _material_func->apply(object, face, tep, current_material); - } - } + if (_specific_te == -1 || (te == _specific_te)) + { + if (object && object->permModify() && _material_func) + { + LLTextureEntry* tep = object->getTE(te); + if (tep) + { + LLMaterialPtr current_material = tep->getMaterialParams(); + _material_func->apply(object, te, tep, current_material); + } + } + } return true; } LLSelectedTEMaterialFunctor* _material_func; - } func1(material_func); + int _specific_te; + } func1(material_func, te); mSelectedObjects->applyToTEs( &func1 ); struct f2 : public LLSelectedObjectFunctor |