From 58472180696401155159414c20a307cf97f7df44 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 19 Oct 2022 00:08:27 +0300 Subject: SL-18391 Basic GLTF lifetime management --- indra/newview/llmaterialeditor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/llmaterialeditor.cpp') diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index 319f98b816..c5cdb81d67 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -1422,7 +1422,8 @@ void LLMaterialEditor::loadFromGLTFMaterial(LLUUID &asset_id) return; } LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor"); - me->setTitle(LLTrans::getString("New Material")); + me->mMaterialName = LLTrans::getString("New Material"); + me->setTitle(me->mMaterialName); me->setHasUnsavedChanges(true); me->setFromGLTFMaterial(gGLTFMaterialList.getMaterial(asset_id)); me->openFloater(); @@ -1943,7 +1944,7 @@ void LLMaterialEditor::applyToSelection() LL_WARNS() << "not connected to materials capable region, missing ModifyMaterialParams cap" << LL_ENDL; // Fallback local preview. Will be removed once override systems is finished and new cap is deployed everywhere. - LLPointer mat = new LLGLTFMaterial(); + LLPointer mat = new LLFetchedGLTFMaterial(); getGLTFMaterial(mat); static const LLUUID placeholder("984e183e-7811-4b05-a502-d79c6f978a98"); gGLTFMaterialList.addMaterial(placeholder, mat); -- cgit v1.3