diff options
Diffstat (limited to 'indra/newview/llmaterialeditor.h')
-rw-r--r-- | indra/newview/llmaterialeditor.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/llmaterialeditor.h b/indra/newview/llmaterialeditor.h index 4090ed120b..6ccb27cf27 100644 --- a/indra/newview/llmaterialeditor.h +++ b/indra/newview/llmaterialeditor.h @@ -28,6 +28,7 @@ #include "llpreview.h" #include "llvoinventorylistener.h" +#include "llimagej2c.h" class LLTextureCtrl; @@ -61,6 +62,11 @@ public: void inventoryChanged(LLViewerObject* object, LLInventoryObject::object_list_t* inventory, S32 serial_num, void* user_data) override; + void saveTexture(LLImageJ2C* img, const std::string& name, const LLUUID& asset_id); + + // save textures to inventory if needed + void saveTextures(); + void onClickSave(); // get a dump of the json representation of the current state of the editor UI in GLTF format @@ -139,6 +145,8 @@ public: void onCommitNormalTexture(LLUICtrl* ctrl, const LLSD& data); private: + friend class LLMaterialFilePicker; + LLUUID mAssetID; LLUUID mObjectID; @@ -153,6 +161,18 @@ private: LLUUID mEmissiveTextureUploadId; LLUUID mNormalTextureUploadId; + // last known name of each texture + std::string mAlbedoName; + std::string mNormalName; + std::string mMetallicRoughnessName; + std::string mEmissiveName; + + // J2C versions of packed buffers for uploading + LLPointer<LLImageJ2C> mAlbedoJ2C; + LLPointer<LLImageJ2C> mNormalJ2C; + LLPointer<LLImageJ2C> mMetallicRoughnessJ2C; + LLPointer<LLImageJ2C> mEmissiveJ2C; + bool mHasUnsavedChanges; std::string mMaterialName; }; |