summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2025-05-27 20:28:00 +0300
committerGitHub <noreply@github.com>2025-05-27 20:28:00 +0300
commit0d99487d46d6ccf7000723c35ac78018b5763dea (patch)
tree69a558fa70f91f601bf0fa1de5f8d3205712b33f
parent3f0aa3383a25d203dcdf35d0b7937cbcba3ea5e3 (diff)
#4107 upload the model ignoring unsupported extension
-rw-r--r--indra/newview/gltf/asset.cpp10
-rw-r--r--indra/newview/gltf/asset.h2
-rw-r--r--indra/newview/gltf/llgltfloader.cpp7
-rw-r--r--indra/newview/skins/default/xui/en/floater_model_preview.xml1
4 files changed, 12 insertions, 8 deletions
diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp
index 129661c195..6576904874 100644
--- a/indra/newview/gltf/asset.cpp
+++ b/indra/newview/gltf/asset.cpp
@@ -489,22 +489,16 @@ void Asset::update()
bool Asset::prep()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_GLTF;
- // check required extensions and fail if not supported
- bool unsupported = false;
+ // check required extensions
for (auto& extension : mExtensionsRequired)
{
if (ExtensionsSupported.find(extension) == ExtensionsSupported.end())
{
LL_WARNS() << "Unsupported extension: " << extension << LL_ENDL;
- unsupported = true;
+ mUnsupportedExtension = true;
}
}
- if (unsupported)
- {
- return false;
- }
-
// do buffers first as other resources depend on them
for (auto& buffer : mBuffers)
{
diff --git a/indra/newview/gltf/asset.h b/indra/newview/gltf/asset.h
index 3cec18268b..3a20f7d6ea 100644
--- a/indra/newview/gltf/asset.h
+++ b/indra/newview/gltf/asset.h
@@ -396,6 +396,8 @@ namespace LL
U32 mMaterialsUBO = 0;
bool mLoadIntoVRAM = false;
+ bool mUnsupportedExtension = false;
+
// prepare for first time use
bool prep();
diff --git a/indra/newview/gltf/llgltfloader.cpp b/indra/newview/gltf/llgltfloader.cpp
index 5922385358..236c75a125 100644
--- a/indra/newview/gltf/llgltfloader.cpp
+++ b/indra/newview/gltf/llgltfloader.cpp
@@ -127,6 +127,13 @@ bool LLGLTFLoader::OpenFile(const std::string &filename)
return false;
}
+ if (mGLTFAsset.mUnsupportedExtension)
+ {
+ LLSD args;
+ args["Message"] = "UnsupportedExtension";
+ mWarningsArray.append(args);
+ }
+
mMeshesLoaded = parseMeshes();
if (mMeshesLoaded) uploadMeshes();
diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml
index 067a1e0c8b..d326cbde3b 100644
--- a/indra/newview/skins/default/xui/en/floater_model_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml
@@ -62,6 +62,7 @@
<string name="ParsingErrorNoScene">Document has no visual_scene</string>
<string name="ParsingErrorPositionInvalidModel">Unable to process mesh without position data. Invalid model.</string>
<string name="InvalidGeometryNonTriangulated">Invalid geometry: GLTF files must contain triangulated meshes only.</string>
+ <string name="UnsupportedExtension">Model uses unsupported extension, related material properties are ignored.</string>
<panel
follows="top|left"