From 4aaa48419594c993c6c1b0bd2f5585c6492b6a31 Mon Sep 17 00:00:00 2001 From: Sabrina Shanman Date: Wed, 9 Nov 2022 00:16:41 +0000 Subject: Revert "SL-18523: When editing an object's material override, use the object's material override as a base, rather than its render material (pull request #1190)" --- indra/newview/llmaterialeditor.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index 70b165460a..a0cb4e1c8f 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -2385,26 +2385,19 @@ public: // Selection can cover multiple objects, and live editor is // supposed to overwrite changed values only LLTextureEntry* tep = objectp->getTE(te); + LLPointer material = tep->getGLTFRenderMaterial(); - if (tep->getGLTFMaterial().isNull()) + if (material.isNull()) { // overrides are not supposed to work or apply if // there is no base material to work from return false; } - LLPointer material = tep->getGLTFMaterialOverride(); + // make a copy to not invalidate existing // material for multiple objects - if (material.isNull()) - { - // Start with a material override which does not make any changes - material = new LLGLTFMaterial(LLGLTFMaterial::sOverrideDefault); - } - else - { - material = new LLGLTFMaterial(*material); - } + material = new LLGLTFMaterial(*material); U32 changed_flags = mEditor->getUnsavedChangesFlags(); U32 reverted_flags = mEditor->getRevertedChangesFlags(); -- cgit v1.2.3