Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions indra/newview/gltf/asset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 2 additions & 0 deletions indra/newview/gltf/asset.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,8 @@ namespace LL
U32 mMaterialsUBO = 0;
bool mLoadIntoVRAM = false;

bool mUnsupportedExtension = false;

// prepare for first time use
bool prep();

Expand Down
7 changes: 7 additions & 0 deletions indra/newview/gltf/llgltfloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down