diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2025-07-09 15:52:23 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-07-09 16:28:03 +0300 |
commit | edaf157e19ec5886fa58ba6341db8a91d89e14eb (patch) | |
tree | b7743936d1a6e8f2d41e0f65a2755aa630a26bd5 /indra/newview/gltf/llgltfloader.cpp | |
parent | e77e74ffbb7cc9a8935d5b296a51a9c4ea94ea59 (diff) |
#4314 Fix model suffixes #2
Diffstat (limited to 'indra/newview/gltf/llgltfloader.cpp')
-rw-r--r-- | indra/newview/gltf/llgltfloader.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/indra/newview/gltf/llgltfloader.cpp b/indra/newview/gltf/llgltfloader.cpp index d625ec1261..a181c97ac0 100644 --- a/indra/newview/gltf/llgltfloader.cpp +++ b/indra/newview/gltf/llgltfloader.cpp @@ -310,8 +310,11 @@ void LLGLTFLoader::addModelToScene( materials[model->mMaterialList[i]] = LLImportMaterial(); } } - // Keep base name for scene instance, add LOD suffix to model label for matching + // Keep base name for scene instance. std::string instance_name = model->mLabel; + // Add suffix. Suffix is nessesary for model matching logic + // because sometimes higher lod can be used as a lower one, so models + // need unique names not just in scope of one lod, but across lods. model->mLabel += lod_suffix[mLod]; mScene[transformation].push_back(LLModelInstance(model, instance_name, transformation, materials)); stretch_extents(model, transformation); @@ -563,10 +566,8 @@ bool LLGLTFLoader::populateModelFromMesh(LLModel* pModel, const std::string& bas { // Set the requested label for the floater display and uploading pModel->mRequestedLabel = gDirUtilp->getBaseFileName(mFilename, true); - // Set name and suffix. Suffix is nessesary for model matching logic - // because sometimes higher lod can be used as a lower one, so they - // need unique names not just in scope of one lod, but across lods. - pModel->mLabel = base_name + lod_suffix[mLod]; + // Set only name, suffix will be added later + pModel->mLabel = base_name; LL_DEBUGS("GLTF_DEBUG") << "Processing model " << pModel->mLabel << LL_ENDL; |