summaryrefslogtreecommitdiff
path: root/indra/newview/llmaterialeditor.cpp
diff options
context:
space:
mode:
authorHoward Stearns <howard.stearns@gmail.com>2022-09-01 13:38:59 -0700
committerHoward Stearns <howard.stearns@gmail.com>2022-09-01 13:38:59 -0700
commit3cf349c4fa1c1879babab23536baff8e4e5421fc (patch)
tree61e6af4eb66a3ed754f14743bd08ece4dcdf6a30 /indra/newview/llmaterialeditor.cpp
parent01d03edd8512580575da515401a42021577c3c57 (diff)
parentd2d257cfa99b685160e16ed93c163018e9fe3c50 (diff)
Merge branch 'DRTVWR-559' of bitbucket.org:lindenlab/viewer into SL-17967
Diffstat (limited to 'indra/newview/llmaterialeditor.cpp')
-rw-r--r--indra/newview/llmaterialeditor.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 2052f252b3..f05f0344bd 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -1605,6 +1605,7 @@ void LLMaterialEditor::loadAsset()
if (mAssetID.isNull())
{
mAssetStatus = PREVIEW_ASSET_LOADED;
+ loadDefaults();
setHasUnsavedChanges(false);
}
else
@@ -1905,3 +1906,9 @@ S32 LLMaterialEditor::saveTextures()
return work_count;
}
+void LLMaterialEditor::loadDefaults()
+{
+ tinygltf::Model model_in;
+ model_in.materials.resize(1);
+ setFromGltfModel(model_in, true);
+}