From 434f9e927135d961b51b2175960a27be3908f7c3 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 18 Aug 2025 21:36:45 +0300 Subject: #4544 Make model dump go into logs not into work folder, viewer isn't supposed to write there. --- indra/newview/llfloatermodelpreview.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'indra/newview/llfloatermodelpreview.cpp') 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 -- cgit v1.2.3