summaryrefslogtreecommitdiff
path: root/indra/newview/llmaterialeditor.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-12-04 13:58:12 +0800
committerErik Kundiman <erik@megapahit.org>2025-12-04 16:48:50 +0800
commite3a35af2c676fb211ff7d01a79eb1a3299bc82f3 (patch)
tree0ff7a0a15d1a53850399250b65f0a2a42f7bbf22 /indra/newview/llmaterialeditor.cpp
parentac052bed7f9f97efc63f0a0322214d4dcdcd5664 (diff)
parentc4ec3d866082d588de671e833413474d7ab19524 (diff)
Merge remote-tracking branch 'secondlife/release/2026.01' into 2026.01
Diffstat (limited to 'indra/newview/llmaterialeditor.cpp')
-rw-r--r--indra/newview/llmaterialeditor.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index cac72bb085..4e14f416e9 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -494,7 +494,7 @@ bool LLMaterialEditor::postBuild()
refreshUploadCost();
}
- boost::function<void(LLUICtrl*, void*)> changes_callback = [this](LLUICtrl * ctrl, void* userData)
+ std::function<void(LLUICtrl*, void*)> changes_callback = [this](LLUICtrl * ctrl, void* userData)
{
const U32 *flag = (const U32*)userData;
markChangesUnsaved(*flag);
@@ -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;
}