From 231c618a844cee26a3779b703c88d8807df872e6 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 27 Jun 2022 09:59:11 -0500 Subject: SL-17653 Make changes in material editor apply to selection immediately and enable "apply now" checkbox in color swatches. --- indra/newview/llmaterialeditor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra') diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index e3206947d5..7335669f09 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -37,6 +37,7 @@ #include "llviewertexture.h" #include "llselectmgr.h" #include "llvovolume.h" +#include "llcolorswatch.h" #include "tinygltf/tiny_gltf.h" @@ -73,6 +74,7 @@ BOOL LLMaterialEditor::postBuild() // Albedo childSetCommitCallback("albedo color", changes_callback, NULL); + getChild("albedo color")->setCanApplyImmediately(TRUE); childSetCommitCallback("transparency", changes_callback, NULL); childSetCommitCallback("alpha mode", changes_callback, NULL); childSetCommitCallback("alpha cutoff", changes_callback, NULL); @@ -87,6 +89,7 @@ BOOL LLMaterialEditor::postBuild() // Emissive childSetCommitCallback("emissive color", changes_callback, NULL); + getChild("emissive color")->setCanApplyImmediately(TRUE); childSetVisible("unsaved_changes", mHasUnsavedChanges); @@ -273,6 +276,9 @@ void LLMaterialEditor::setHasUnsavedChanges(bool value) mHasUnsavedChanges = value; childSetVisible("unsaved_changes", value); } + + // HACK -- apply any changes to selection immediately + applyToSelection(); } void LLMaterialEditor::onCommitAlbedoTexture(LLUICtrl * ctrl, const LLSD & data) -- cgit v1.2.3