summaryrefslogtreecommitdiff
path: root/indra/newview/llmaterialeditor.h
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-09-09 14:23:24 +0800
committerErik Kundiman <erik@megapahit.org>2025-09-09 14:23:24 +0800
commit693137a6487e6ffda9ff15ade62d0e8bfec1bf49 (patch)
tree12c078a35bebfd139d108f5fb7cd6c7fc4455c70 /indra/newview/llmaterialeditor.h
parentb9ab04cd6e253848bad865fc1b5ea993a2a060f3 (diff)
parent8a9a3dc9d760db37bb963d3e5bfadafdd94ee08d (diff)
Merge branch '2025.06'
Diffstat (limited to 'indra/newview/llmaterialeditor.h')
-rw-r--r--indra/newview/llmaterialeditor.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/newview/llmaterialeditor.h b/indra/newview/llmaterialeditor.h
index 232467460e..1abdd7f84c 100644
--- a/indra/newview/llmaterialeditor.h
+++ b/indra/newview/llmaterialeditor.h
@@ -94,7 +94,7 @@ class LLMaterialEditor : public LLPreview, public LLVOInventoryListener
void setFromGltfMetaData(const std::string& filename, const tinygltf::Model& model, S32 index);
// open a file dialog and select a gltf/glb file for import
- static void importMaterial();
+ static void importMaterial(const LLUUID dest_folder = LLUUID::null);
// for live preview, apply current material to currently selected object
void applyToSelection();
@@ -105,8 +105,11 @@ class LLMaterialEditor : public LLPreview, public LLVOInventoryListener
void loadAsset() override;
// @index if -1 and file contains more than one material,
// will promt to select specific one
- static void uploadMaterialFromModel(const std::string& filename, tinygltf::Model& model, S32 index);
- static void loadMaterialFromFile(const std::string& filename, S32 index = -1);
+ static void uploadMaterialFromModel(const std::string& filename,
+ tinygltf::Model& model,
+ S32 index,
+ const LLUUID& dest_folder_id = LLUUID::null);
+ static void loadMaterialFromFile(const std::string& filename, S32 index = -1, const LLUUID& dest_folder = LLUUID::null);
void onSelectionChanged(); // live overrides selection changes
@@ -134,8 +137,6 @@ class LLMaterialEditor : public LLPreview, public LLVOInventoryListener
void onClickSave();
- void getGLTFModel(tinygltf::Model& model);
-
std::string getEncodedAsset();
bool decodeAsset(const std::vector<char>& buffer);
@@ -239,7 +240,7 @@ private:
static void saveObjectsMaterialAs(const LLGLTFMaterial *render_material, const LLLocalGLTFMaterial *local_material, const LLPermissions& permissions, const LLUUID& object_id /* = LLUUID::null */, const LLUUID& item /* = LLUUID::null */);
static bool updateInventoryItem(const std::string &buffer, const LLUUID &item_id, const LLUUID &task_id);
- static void createInventoryItem(const std::string &buffer, const std::string &name, const std::string &desc, const LLPermissions& permissions);
+ static void createInventoryItem(const std::string &buffer, const std::string &name, const std::string &desc, const LLPermissions& permissions, const LLUUID& upload_folder);
void setFromGLTFMaterial(LLGLTFMaterial* mat);
bool setFromSelection();
@@ -249,6 +250,7 @@ private:
friend class LLMaterialFilePicker;
LLUUID mAssetID;
+ LLUUID mUploadFolder;
LLTextureCtrl* mBaseColorTextureCtrl;
LLTextureCtrl* mMetallicTextureCtrl;