From 895db142ee9224e1b8e4d2fc6348dc1801bea0dc Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 26 Jun 2025 20:43:06 +0300 Subject: #4291 Uploading without a .bin silently fails --- indra/newview/gltf/llgltfloader.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'indra/newview/gltf/llgltfloader.cpp') diff --git a/indra/newview/gltf/llgltfloader.cpp b/indra/newview/gltf/llgltfloader.cpp index 039c0b561e..7ae255e054 100644 --- a/indra/newview/gltf/llgltfloader.cpp +++ b/indra/newview/gltf/llgltfloader.cpp @@ -129,6 +129,20 @@ bool LLGLTFLoader::OpenFile(const std::string &filename) if (!mGltfLoaded) { notifyUnsupportedExtension(true); + + for (const auto& buffer : mGLTFAsset.mBuffers) + { + if (buffer.mByteLength > 0 && buffer.mData.empty()) + { + bool bin_file = buffer.mUri.ends_with(".bin"); + LLSD args; + args["Message"] = bin_file ? "ParsingErrorMissingBufferBin" : "ParsingErrorMissingBuffer"; + args["BUFFER_NAME"] = buffer.mName; + args["BUFFER_URI"] = buffer.mUri; + mWarningsArray.append(args); + } + } + setLoadState(ERROR_PARSING); return false; } -- cgit v1.2.3