diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-10-17 23:55:59 +0300 | 
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-10-17 23:55:59 +0300 | 
| commit | 77eba62335158db6b0c6c7966a26b956fd796da9 (patch) | |
| tree | f272426edecdf851e9acb0c1d33b77bdda6fd5a4 /indra | |
| parent | a27e701530e3498f71b828d7639024330cd0ccb7 (diff) | |
SL-18008 Placeholder functionality for PBR Edit button
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llmaterialeditor.cpp | 23 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_material_editor.xml | 1 | 
2 files changed, 23 insertions, 1 deletions
| diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index 80a0583fd0..f1b015fc84 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -1537,7 +1537,28 @@ void LLMaterialEditor::loadMaterial(LLGLTFMaterial * material, bool make_copy)      {          setTitle(LLTrans::getString("New Material"));      } -    // else ??? Think of a name for live editing +    else +    { +        setTitle(getString("material_override_title")); +        // TODO: Save whole selection + +        LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); +        LLViewerObject* object = selection->getFirstNode()->getObject(); +        if (object) +        { +            const S32 num_tes = llmin((S32)object->getNumTEs(), (S32)object->getNumFaces()); // avatars have TEs but no faces +            for (S32 face = 0; face < num_tes; ++face) +            { +                LLTextureEntry *te = object->getTE(face); +                if (te->isSelected()) +                { +                    // TEMP +                    setOverrideTarget(object->getLocalID(), face); +                    break; +                } +            } +        } +    }      // Todo: At the moment it always makes a 'copy'      // Will need a way to expand existing material diff --git a/indra/newview/skins/default/xui/en/floater_material_editor.xml b/indra/newview/skins/default/xui/en/floater_material_editor.xml index 3314d49ac3..434123faf0 100644 --- a/indra/newview/skins/default/xui/en/floater_material_editor.xml +++ b/indra/newview/skins/default/xui/en/floater_material_editor.xml @@ -15,6 +15,7 @@    <string name="upload_fee_string">L$[FEE] upload fee</string>    <string name="material_selection_title">Material selection</string>    <string name="material_selection_text">Select material:</string> +  <string name="material_override_title">Material override</string>    <scroll_container     name="materials_scroll" | 
