From 88659e9fe793a02fb4edcbf8ef07307c25119604 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Sat, 22 Oct 2022 15:25:03 -0500 Subject: SL-18105 When saving an object's material to inventory, save the version that as overrides applied. --- indra/newview/llmaterialeditor.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'indra/newview/llmaterialeditor.cpp') diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index 038f4df863..8086bcf402 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -1401,7 +1401,7 @@ void LLMaterialEditor::loadMaterialFromFile(const std::string& filename, S32 ind } } -void LLMaterialEditor::loadLiveMaterialEditor() +void LLMaterialEditor::loadLive() { LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor", LLSD(LIVE_MATERIAL_EDITOR_KEY)); if (me->setFromSelection()) @@ -1416,6 +1416,18 @@ void LLMaterialEditor::loadLiveMaterialEditor() } } +void LLMaterialEditor::loadObjectSave() +{ + LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor", LLSD(LIVE_MATERIAL_EDITOR_KEY)); + if (me->setFromSelection()) + { + me->mIsOverride = false; + me->childSetVisible("save", false); + me->openFloater(); + me->setFocus(TRUE); + } +} + void LLMaterialEditor::loadFromGLTFMaterial(LLUUID &asset_id) { if (asset_id.isNull()) -- cgit v1.2.3