Skip to content
Merged
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
11 changes: 6 additions & 5 deletions indra/newview/gltf/llgltfloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;

Expand Down
Loading