summaryrefslogtreecommitdiff
path: root/indra/newview/llmaterialeditor.h
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-11-08 01:22:08 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-11-08 01:22:08 +0200
commit080421decbac73c85d878b7e734ad4e2cfb0f251 (patch)
treedd01c64168bf7856be9d84b93246f2c3b0f3a9b3 /indra/newview/llmaterialeditor.h
parent2b1ff7495df8e94ec47255616c81291ec0ba75d4 (diff)
SL-18583 Make Live Material editor restore changes when canceling in texture or color pickers
Diffstat (limited to 'indra/newview/llmaterialeditor.h')
-rw-r--r--indra/newview/llmaterialeditor.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/indra/newview/llmaterialeditor.h b/indra/newview/llmaterialeditor.h
index 8f0c16881b..423e56e6c0 100644
--- a/indra/newview/llmaterialeditor.h
+++ b/indra/newview/llmaterialeditor.h
@@ -31,10 +31,11 @@
#include "llimagej2c.h"
#include "llviewertexture.h"
-class LLTextureCtrl;
-class LLGLTFMaterial;
class LLButton;
+class LLColorSwatchCtrl;
class LLComboBox;
+class LLGLTFMaterial;
+class LLTextureCtrl;
class LLTextBox;
namespace tinygltf
@@ -218,15 +219,15 @@ public:
void setCanSave(bool value);
void setEnableEditing(bool can_modify);
- void onCommitBaseColorTexture(LLUICtrl* ctrl, const LLSD& data);
- void onCommitMetallicTexture(LLUICtrl* ctrl, const LLSD& data);
- void onCommitEmissiveTexture(LLUICtrl* ctrl, const LLSD& data);
- void onCommitNormalTexture(LLUICtrl* ctrl, const LLSD& data);
+ void onCommitTexture(LLUICtrl* ctrl, const LLSD& data, S32 dirty_flag);
+ void onCancelCtrl(LLUICtrl* ctrl, const LLSD& data, S32 dirty_flag);
+ void onSelectCtrl(LLUICtrl* ctrl, const LLSD& data, S32 dirty_flag);
// initialize the UI from a default GLTF material
void loadDefaults();
U32 getUnsavedChangesFlags() { return mUnsavedChanges; }
+ U32 getRevertedChangesFlags() { return mRevertedChanges; }
bool capabilitiesAvalaible();
@@ -247,6 +248,8 @@ private:
LLTextureCtrl* mMetallicTextureCtrl;
LLTextureCtrl* mEmissiveTextureCtrl;
LLTextureCtrl* mNormalTextureCtrl;
+ LLColorSwatchCtrl* mBaseColorCtrl;
+ LLColorSwatchCtrl* mEmissiveColorCtrl;
// 'Default' texture, unless it's null or from inventory is the one with the fee
LLUUID mBaseColorTextureUploadId;
@@ -284,6 +287,7 @@ private:
void markChangesUnsaved(U32 dirty_flag);
U32 mUnsavedChanges; // flags to indicate individual changed parameters
+ U32 mRevertedChanges; // flags to indicate individual reverted parameters
S32 mUploadingTexturesCount;
S32 mExpectedUploadCost;
std::string mMaterialNameShort;