diff options
Diffstat (limited to 'indra/newview/lltexturectrl.cpp')
-rw-r--r-- | indra/newview/lltexturectrl.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index f4649a672b..5d9eb48e6c 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -965,14 +965,12 @@ 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); - } + LLMaterialEditor::loadMaterialFromFile(filename, index); } } else |