summaryrefslogtreecommitdiff
path: root/indra/newview/llmaterialeditor.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-11-21 05:31:30 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-11-21 14:14:45 +0200
commit7b2c3f7a22b0df319348224072b14448b1d0f54b (patch)
tree20ec384e862fe524e3eeae4b39a76a7dca4a5873 /indra/newview/llmaterialeditor.cpp
parent9d5e7161e5ff94cad9975a7087dc49f2d546b1c8 (diff)
#5026 Upload To Folder feature not working
Diffstat (limited to 'indra/newview/llmaterialeditor.cpp')
-rw-r--r--indra/newview/llmaterialeditor.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index cac72bb085..cbd95f9cc6 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -1987,12 +1987,14 @@ void LLMaterialEditor::loadMaterialFromFile(const std::string& filename, S32 ind
{
// Prespecified material
LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor");
+ me->mUploadFolder = dest_folder;
me->loadMaterial(model_in, filename, index);
}
else if (model_in.materials.size() == 1)
{
// Only one material, just load it
LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor");
+ me->mUploadFolder = dest_folder;
me->loadMaterial(model_in, filename, 0);
}
else
@@ -2018,11 +2020,12 @@ void LLMaterialEditor::loadMaterialFromFile(const std::string& filename, S32 ind
material_list.push_back(LLTrans::getString("material_batch_import_text"));
LLFloaterComboOptions::showUI(
- [model_in, filename](const std::string& option, S32 index)
+ [model_in, filename, dest_folder](const std::string& option, S32 index)
{
if (index >= 0) // -1 on cancel
{
LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor");
+ me->mUploadFolder = dest_folder;
me->loadMaterial(model_in, filename, index);
}
},
@@ -2448,7 +2451,7 @@ void LLMaterialEditor::loadMaterial(const tinygltf::Model &model_in, const std::
if (index == model_in.materials.size())
{
// bulk upload all the things
- upload_bulk({ filename }, LLFilePicker::FFLOAD_MATERIAL, true, LLUUID::null);
+ upload_bulk({ filename }, LLFilePicker::FFLOAD_MATERIAL, true, mUploadFolder);
return;
}