From 9346b45188462056698083f4f83fe8fecbe19bdf Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 29 Sep 2022 22:38:40 +0300 Subject: SL-17653 Multi-material file support for local materials --- indra/newview/lltexturectrl.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/lltexturectrl.cpp') diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index f4649a672b..ff0d74a7c9 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -965,13 +965,16 @@ void LLFloaterTexturePicker::onBtnUpload(void* userdata) if (LLAssetType::AT_MATERIAL == asset_type) { - std::string filename = LLLocalGLTFMaterialMgr::getInstance()->getFilename(tracking_id); + std::string filename; + S32 index; + LLLocalGLTFMaterialMgr::getInstance()->getFilenameAndIndex(tracking_id, filename, index); if (!filename.empty()) { LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor"); if (me) { - me->loadMaterialFromFile(filename); + me->loadMaterialFromFile(filename, index); + me->setFocus(TRUE); } } } -- cgit v1.2.3