diff options
Diffstat (limited to 'indra/newview/llviewermenufile.cpp')
-rw-r--r-- | indra/newview/llviewermenufile.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 4ba1d007fe..9ecb11d253 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -53,6 +53,7 @@ #include "llvfs.h" #include "llviewerinventory.h" #include "llviewermenu.h" // gMenuHolder +#include "llviewerparcelmgr.h" #include "llviewerregion.h" #include "llviewerstats.h" #include "llviewerwindow.h" @@ -102,6 +103,16 @@ class LLMeshEnabled : public view_listener_t } }; +class LLMeshUploadVisible : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + return gSavedSettings.getBOOL("MeshEnabled") && + LLViewerParcelMgr::getInstance()->allowAgentBuild() && + !gAgent.getRegion()->getCapability("ObjectAdd").empty(); + } +}; + LLMutex* LLFilePickerThread::sMutex = NULL; std::queue<LLFilePickerThread*> LLFilePickerThread::sDeadQ; @@ -1390,6 +1401,7 @@ void init_menu_file() view_listener_t::addEnable(new LLFileEnableUpload(), "File.EnableUpload"); view_listener_t::addEnable(new LLFileEnableUploadModel(), "File.EnableUploadModel"); view_listener_t::addMenu(new LLMeshEnabled(), "File.MeshEnabled"); + view_listener_t::addMenu(new LLMeshUploadVisible(), "File.VisibleUploadModel"); // "File.SaveTexture" moved to llpanelmaininventory so that it can be properly handled. } |