From 84bbe45fb582722619f77ae5ecaeef52a94abf27 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 29 Jun 2022 11:56:40 -0500 Subject: SL-17602 WIP - Texture uploads form material editor now work but the names are garbage and the resulting material asset has the wrong UUIDs --- indra/newview/llmaterialeditor.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'indra/newview/llmaterialeditor.h') 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 mAlbedoJ2C; + LLPointer mNormalJ2C; + LLPointer mMetallicRoughnessJ2C; + LLPointer mEmissiveJ2C; + bool mHasUnsavedChanges; std::string mMaterialName; }; -- cgit v1.2.3