summaryrefslogtreecommitdiff
path: root/indra
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
parentb96c7ec6e6e2e4f2bfd11469155bec4827ac9517 (diff)
#4544 Make model dump go into logs
not into work folder, viewer isn't supposed to write there.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloatermodelpreview.cpp16
-rw-r--r--indra/newview/llfloatermodelpreview.h1
-rw-r--r--indra/newview/llmeshrepository.cpp2
3 files changed, 13 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
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index 982f36c46e..20e5b2666a 100644
--- a/indra/newview/llfloatermodelpreview.h
+++ b/indra/newview/llfloatermodelpreview.h
@@ -223,6 +223,7 @@ private:
void createSmoothComboBox(LLComboBox* combo_box, float min, float max);
+ static std::string getBoundingBoxCubePath();
typedef std::map<std::string, std::string> lod_sources_map_t;
void fillLODSourceStatistics(lod_sources_map_t& lod_sources) const;
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index fd3360b234..9e8ed3bb43 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -2685,6 +2685,8 @@ void dump_llsd_to_file(const LLSD& content, std::string filename)
{
if (gSavedSettings.getBOOL("MeshUploadLogXML"))
{
+ filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
+ filename);
llofstream of(filename.c_str());
LLSDSerialize::toPrettyXML(content,of);
}