summaryrefslogtreecommitdiff
path: root/indra/newview/llselectmgr.h
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-11-07 15:02:40 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-11-07 18:07:09 +0200
commit2b1ff7495df8e94ec47255616c81291ec0ba75d4 (patch)
tree2f0018ca6863bb21c00d00901f2476169ea44635 /indra/newview/llselectmgr.h
parentc1180f1cc7370d2ff3acb37d6f6fac08f500661b (diff)
SL-18583 Make tools floater restore overrides when canceling changes #1
This works only partially since changes from material editor are not yet tracked.
Diffstat (limited to 'indra/newview/llselectmgr.h')
-rw-r--r--indra/newview/llselectmgr.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index 573eea7a8a..7e7c450767 100644
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -161,6 +161,8 @@ typedef enum e_selection_type
SELECT_TYPE_HUD
}ESelectType;
+typedef std::vector<LLPointer<LLGLTFMaterial> > gltf_materials_vec_t;
+
const S32 TE_SELECT_MASK_ALL = 0xFFFFFFFF;
// Contains information about a selected object, particularly which TEs are selected.
@@ -184,12 +186,21 @@ public:
LLViewerObject* getObject();
void setObject(LLViewerObject* object);
// *NOTE: invalidate stored textures and colors when # faces change
+ // Used by tools floater's color/texture pickers to restore changes
void saveColors();
void saveShinyColors();
void saveTextures(const uuid_vec_t& textures);
- void savedGLTFMaterials(const uuid_vec_t& materials);
void saveTextureScaleRatios(LLRender::eTexIndex index_to_query);
+ // GLTF materials are applied to objects by ids,
+ // overrides get applied on top of materials resulting in
+ // final gltf material that users see.
+ // Ids get applied and restored by tools floater,
+ // overrides get applied in live material editor
+ void saveGLTFMaterialIds(const uuid_vec_t& materials);
+ void saveGLTFRenderMaterials(const gltf_materials_vec_t& materials);
+ LLGLTFMaterial* getSavedGLTFRenderMaterial(S32 te);
+
BOOL allowOperationOnNode(PermissionBit op, U64 group_proxy_power) const;
public:
@@ -225,7 +236,8 @@ public:
std::vector<LLColor4> mSavedColors;
std::vector<LLColor4> mSavedShinyColors;
uuid_vec_t mSavedTextures;
- uuid_vec_t mSavedGLTFMaterials;
+ uuid_vec_t mSavedGLTFMaterialIds;
+ gltf_materials_vec_t mSavedGLTFRenderMaterials;
std::vector<LLVector3> mTextureScaleRatios;
std::vector<LLVector3> mSilhouetteVertices; // array of vertices to render silhouette of object
std::vector<LLVector3> mSilhouetteNormals; // array of normals to render silhouette of object