Skip to content
Snippets Groups Projects
Commit 231c618a authored by David Parks's avatar David Parks
Browse files

SL-17653 Make changes in material editor apply to selection immediately and...

SL-17653 Make changes in material editor apply to selection immediately and enable "apply now" checkbox in color swatches.
parent 63daefb3
No related branches found
No related tags found
2 merge requests!3Update to main branch,!2Rebase onto current main branch
......@@ -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<LLColorSwatchCtrl>("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<LLColorSwatchCtrl>("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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment