diff options
| author | Andrey Lihatskiy <118752495+marchcat@users.noreply.github.com> | 2025-12-04 00:30:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-04 00:30:33 +0200 |
| commit | 8c134d5a4a9f08a87104530fe910bc39434cacf2 (patch) | |
| tree | dad5ddf6daf7f5e1bc7b47cd670a99ca73d4c5a1 /indra/newview/llmaterialeditor.cpp | |
| parent | 2c3ce8fb8ce3967d957e13d48627b45dd32f0e00 (diff) | |
| parent | 590f58dbad3dc3db3482dba86bf2619a87a7dad5 (diff) | |
Merge pull request #5020 from secondlife/marchcat/slua-linux
develop-linux → SLua PV merge
Diffstat (limited to 'indra/newview/llmaterialeditor.cpp')
| -rw-r--r-- | indra/newview/llmaterialeditor.cpp | 9 |
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; } |
