diff options
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
-rw-r--r-- | indra/newview/lltooldraganddrop.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 6d0704a469..6be7ec2262 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1410,6 +1410,7 @@ void LLToolDragAndDrop::dropTexture(LLViewerObject* hit_obj, LLTextureEntry* te = hit_obj->getTE(hit_face); if (te && !remove_pbr) { + // saveGLTFMaterials will make a copy override_materials.push_back(te->getGLTFMaterialOverride()); } else @@ -1448,7 +1449,8 @@ void LLToolDragAndDrop::dropTexture(LLViewerObject* hit_obj, LLTextureEntry* te = hit_obj->getTE(hit_face); if (te && !remove_pbr) { - nodep->mSavedGLTFOverrideMaterials[hit_face] = te->getGLTFMaterialOverride(); + LLGLTFMaterial* copy = new LLGLTFMaterial(*te->getGLTFMaterialOverride()); + nodep->mSavedGLTFOverrideMaterials[hit_face] = copy; } else { |