summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermodelpreview.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-08-18 21:36:45 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-08-19 00:05:14 +0300
commit434f9e927135d961b51b2175960a27be3908f7c3 (patch)
tree7c36e7892597d43f811517e8390bf2d206555456 /indra/newview/llfloatermodelpreview.cpp
parentb96c7ec6e6e2e4f2bfd11469155bec4827ac9517 (diff)
#4544 Make model dump go into logs
not into work folder, viewer isn't supposed to write there.
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rw-r--r--indra/newview/llfloatermodelpreview.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 96a03ce2a6..f76f39222b 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1090,9 +1090,7 @@ void LLFloaterModelPreview::onPhysicsUseLOD(LLUICtrl* ctrl, void* userdata)
}
else if (which_mode == cube_mode)
{
- std::string path = gDirUtilp->getAppRODataDir();
- gDirUtilp->append(path, "cube.dae");
- sInstance->loadModel(LLModel::LOD_PHYSICS, path);
+ sInstance->loadModel(LLModel::LOD_PHYSICS, getBoundingBoxCubePath());
}
LLModelPreview *model_preview = sInstance->mModelPreview;
@@ -1344,6 +1342,13 @@ std::string get_source_file_format(const std::string& filename)
}
}
+std::string LLFloaterModelPreview::getBoundingBoxCubePath()
+{
+ std::string path = gDirUtilp->getAppRODataDir();
+ gDirUtilp->append(path, "cube.dae");
+ return path;
+}
+
void LLFloaterModelPreview::fillLODSourceStatistics(LLFloaterModelPreview::lod_sources_map_t& lod_sources) const
{
lod_sources.clear();
@@ -1388,10 +1393,9 @@ void LLFloaterModelPreview::fillLODSourceStatistics(LLFloaterModelPreview::lod_s
else
{
const std::string& file = mModelPreview->mLODFile[LLModel::LOD_PHYSICS];
- if (std::string::npos == file.rfind("cube.dae"))
+ const std::string cube = getBoundingBoxCubePath();
+ if (cube != file) // check for "cube.dae"
{
- // There is a chance it will misfire if someone tries to upload a cube.dae mesh,
- // but should be negligible enough.
lod_sources["physics"] = get_source_file_format(file);
}
else