diff --git a/indra/newview/daeexport.cpp b/indra/newview/daeexport.cpp index b024e875d1..aadd2d09b2 100644 --- a/indra/newview/daeexport.cpp +++ b/indra/newview/daeexport.cpp @@ -81,6 +81,7 @@ #include "lltrans.h" #include "llversioninfo.h" #include "llviewercontrol.h" +#include "llviewermenufile.h" #include "llviewernetwork.h" #include "llviewerregion.h" #include "llviewertexturelist.h" @@ -196,14 +197,14 @@ void ColladaExportFloater::updateUI() void ColladaExportFloater::onClickExport() { - LLFilePicker& file_picker = LLFilePicker::instance(); - if (!file_picker.getSaveFile(LLFilePicker::FFSAVE_COLLADA, LLDir::getScrubbedFileName(mObjectName + ".dae"))) - { - LL_INFOS() << "User closed the filepicker, aborting export!" << LL_ENDL; - return; - } - mFilename = file_picker.getFirstFile(); - + (new LLFilePickerReplyThread(boost::bind(&ColladaExportFloater::onExportFileSelected, this, _1), + LLFilePicker::FFSAVE_COLLADA, LLDir::getScrubbedFileName(mObjectName + ".dae")))->getFile(); +} + +void ColladaExportFloater::onExportFileSelected(const std::vector& filenames) +{ + mFilename = filenames[0]; + if (gSavedSettings.getBOOL("DAEExportTextures")) { saveTextures(); diff --git a/indra/newview/daeexport.h b/indra/newview/daeexport.h index 725f764aff..c0719468ad 100644 --- a/indra/newview/daeexport.h +++ b/indra/newview/daeexport.h @@ -131,6 +131,7 @@ private: void refresh(); void dirty(); void onClickExport(); + void onExportFileSelected(const std::vector& filenames); void onTextureExportCheck(); void onCommitTextureType(); void saveTextures(); diff --git a/indra/newview/fsfloaterexport.cpp b/indra/newview/fsfloaterexport.cpp index 40baea6dd9..0daf51d461 100644 --- a/indra/newview/fsfloaterexport.cpp +++ b/indra/newview/fsfloaterexport.cpp @@ -55,8 +55,9 @@ #include "llvfile.h" #include "llviewercontrol.h" #include "llviewerinventory.h" -#include "llviewerpartsource.h" +#include "llviewermenufile.h" #include "llviewernetwork.h" +#include "llviewerpartsource.h" #include "llviewerregion.h" #include "llviewertexturelist.h" #include "llvovolume.h" @@ -1082,14 +1083,14 @@ void FSFloaterObjectExport::updateUI() void FSFloaterObjectExport::onClickExport() { - LLFilePicker& file_picker = LLFilePicker::instance(); - if(!file_picker.getSaveFile(LLFilePicker::FFSAVE_EXPORT, LLDir::getScrubbedFileName(mObjectName + ".oxp"))) - { - LL_INFOS() << "User closed the filepicker, aborting export!" << LL_ENDL; - return; - } - mFilename = file_picker.getFirstFile(); - + (new LLFilePickerReplyThread(boost::bind(&FSFloaterObjectExport::onExportFileSelected, this, _1), + LLFilePicker::FFSAVE_EXPORT, LLDir::getScrubbedFileName(mObjectName + ".oxp")))->getFile(); +} + +void FSFloaterObjectExport::onExportFileSelected(const std::vector& filenames) +{ + mFilename = filenames[0]; + LLUIString title = getString("title_working"); title.setArg("[OBJECT]", mObjectName); setTitle(title); diff --git a/indra/newview/fsfloaterexport.h b/indra/newview/fsfloaterexport.h index c1db65229b..52e3813980 100644 --- a/indra/newview/fsfloaterexport.h +++ b/indra/newview/fsfloaterexport.h @@ -86,6 +86,7 @@ private: void addSelectedObjects(); void populateObjectList(); void onClickExport(); + void onExportFileSelected(const std::vector& filenames); void addTexturePreview(); S32 getNumExportableTextures(); void addObject(const LLViewerObject* prim, const std::string name);