summaryrefslogtreecommitdiff
path: root/indra/newview/llmaterialeditor.h
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-10-26 17:22:50 -0500
committerDave Parks <davep@lindenlab.com>2022-10-26 17:22:50 -0500
commit65eec2ca8fb34fb2aca8e93c8ce6d8e39cfae3e9 (patch)
tree3e3c9812af98bc209c274fae70f9aa8eaf2c3c90 /indra/newview/llmaterialeditor.h
parent8f47657d646c06dbba8d44497c0f81fd00730cc8 (diff)
parent800044fb33e5e177e45e1bfa9f840a287e0bd186 (diff)
Merge branch 'DRTVWR-559' of ssh://bitbucket.org/lindenlab/viewer into DRTVWR-559
Diffstat (limited to 'indra/newview/llmaterialeditor.h')
-rw-r--r--indra/newview/llmaterialeditor.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llmaterialeditor.h b/indra/newview/llmaterialeditor.h
index 53f19d877b..091f51234f 100644
--- a/indra/newview/llmaterialeditor.h
+++ b/indra/newview/llmaterialeditor.h
@@ -103,6 +103,8 @@ public:
// will promt to select specific one
static void loadMaterialFromFile(const std::string& filename, S32 index = -1);
+ void onSelectionChanged(); // // live overrides selection changes
+ void saveLiveValues(); // for restoration on cancel
static void loadLive();
static void loadObjectSave();
@@ -118,6 +120,7 @@ public:
// save textures to inventory if needed
// returns amount of scheduled uploads
S32 saveTextures();
+ void clearTextures();
void onClickSave();
@@ -206,7 +209,6 @@ public:
bool getDoubleSided();
void setDoubleSided(bool double_sided);
- void setHasUnsavedChanges(bool value);
void setCanSaveAs(bool value);
void setCanSave(bool value);
void setEnableEditing(bool can_modify);
@@ -219,6 +221,8 @@ public:
// initialize the UI from a default GLTF material
void loadDefaults();
+ U32 getUnsavedChangesFlags() { return mUnsavedChanges; }
+
private:
void setFromGLTFMaterial(LLGLTFMaterial* mat);
bool setFromSelection();
@@ -266,7 +270,10 @@ private:
// based on what we know about it.
const std::string buildMaterialDescription();
- bool mHasUnsavedChanges;
+ void resetUnsavedChanges();
+ void markChangesUnsaved(U32 dirty_flag);
+
+ U32 mUnsavedChanges; // flags to indicate individual changed parameters
S32 mUploadingTexturesCount;
S32 mExpectedUploadCost;
std::string mMaterialNameShort;
@@ -277,5 +284,6 @@ private:
// local id, texture ids per face for object overrides
// for "cancel" support
std::map<U32, uuid_vec_t> mObjectOverridesSavedValues;
+ boost::signals2::connection mSelectionUpdateSlot;
};