diff options
author | Howard Stearns <howard.stearns@gmail.com> | 2022-02-28 15:47:56 -0800 |
---|---|---|
committer | Howard Stearns <howard.stearns@gmail.com> | 2022-02-28 15:47:56 -0800 |
commit | 932b7de5309bc8599655ebb77666c41f5a81cfa9 (patch) | |
tree | 8545e1fe72c62f19d4673a513168732cbb739c97 /indra/newview | |
parent | 9210ec8a82226bd0786d309fcf9e056d08ed1b0f (diff) |
SL-9748 - Handle submesh case of resuseable physics model.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llmodelpreview.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index a1420fba17..f3b6207488 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -529,12 +529,12 @@ void LLModelPreview::rebuildUploadData() LLFloaterModelPreview::addStringToLog(out, false); } } - if (!mLastSpecifiedPhysicsModelOriginalName.empty() && !lod_model && (i == LLModel::LOD_PHYSICS)) + if (mLastSpecifiedPhysicsP && !lod_model && (i == LLModel::LOD_PHYSICS)) { // Despite the various strategies above, if we don't now have a physics model, we're going to end up with decomposition. // That's ok, but in the case where someone supplied a physics file, that's probably not what they wanted. std::ostringstream out; - out << "Reusing previously matched physics model " << mLastSpecifiedPhysicsModelOriginalName; + out << "Reusing physics model " << mLastSpecifiedPhysicsModelOriginalName << " for " << instance.mLabel; LL_INFOS() << out.str() << LL_ENDL; LLFloaterModelPreview::addStringToLog(out, false); lod_model = mLastSpecifiedPhysicsP; @@ -1204,6 +1204,11 @@ void LLModelPreview::loadModelCallback(S32 loaded_lod) } } } + else if ((loaded_lod == LLModel::LOD_PHYSICS) && (mModel[loaded_lod].size() == 1)) + { + mLastSpecifiedPhysicsModelOriginalName = stripSuffix(mModel[loaded_lod][0]->mLabel); + mLastSpecifiedPhysicsP = mModel[loaded_lod][0]; + } } } } |