diff options
| author | Dave Parks <davep@lindenlab.com> | 2022-08-30 16:43:05 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2022-08-30 16:43:05 -0500 |
| commit | 47ecbca24d5ec11ee5cd940fe9db55022fab8dbe (patch) | |
| tree | 51b5dd4e258e84fbfd8587ce3eae97e88d3d1022 /indra/newview/llmaterialeditor.cpp | |
| parent | 2158162b50673afd7b93822823ce1f2be78e2842 (diff) | |
SL-17987 Fix for material editor not initializing to GLTF defaults when loading a null material asset.
Diffstat (limited to 'indra/newview/llmaterialeditor.cpp')
| -rw-r--r-- | indra/newview/llmaterialeditor.cpp | 7 |
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); +} |
