diff options
author | Callum Linden <callum@lindenlab.com> | 2022-08-10 21:32:00 +0000 |
---|---|---|
committer | Callum Linden <callum@lindenlab.com> | 2022-08-10 21:32:00 +0000 |
commit | a5bdc3c1f370e22ac7ca51b7432d31a504d17fc3 (patch) | |
tree | 10aa36f0c3dde7fea6b1ff8c07c8f8a280a943af /indra/newview/llmaterialeditor.h | |
parent | e408fb9f7c9cc0adf32a2977882fd0c741de66a9 (diff) | |
parent | 8645ffe172e1e847758249af7536eef71e430a17 (diff) |
Merged in DRTVWR-559-SL-17695 (pull request #1089)
SL-17695 Give materials and textures imported by Material Editor a sensible name - first pass - likely need to be refined but may be good enough for now
Approved-by: Andrey Kleshchev
Approved-by: Dave Parks
Diffstat (limited to 'indra/newview/llmaterialeditor.h')
-rw-r--r-- | indra/newview/llmaterialeditor.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llmaterialeditor.h b/indra/newview/llmaterialeditor.h index 1b81a7144a..cf31eb5095 100644 --- a/indra/newview/llmaterialeditor.h +++ b/indra/newview/llmaterialeditor.h @@ -47,6 +47,8 @@ public: bool setFromGltfModel(tinygltf::Model& model, bool set_textures = false); + void setFromGltfMetaData(const std::string& filename, tinygltf::Model& model); + // open a file dialog and select a gltf/glb file for import void importMaterial(); @@ -194,9 +196,17 @@ private: LLPointer<LLImageJ2C> mMetallicRoughnessJ2C; LLPointer<LLImageJ2C> mEmissiveJ2C; + // utility function for converting image uri into a texture name + const std::string getImageNameFromUri(std::string image_uri, const std::string texture_type); + + // utility function for building a description of the imported material + // based on what we know about it. + const std::string buildMaterialDescription(); + bool mHasUnsavedChanges; S32 mUploadingTexturesCount; S32 mExpectedUploadCost; + std::string mMaterialNameShort; std::string mMaterialName; }; |