diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llpanelobject.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llviewermenufile.cpp | 10 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_inventory_add.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 4 |
4 files changed, 15 insertions, 4 deletions
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index f1fd47f50e..3e2d903d58 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -1923,7 +1923,8 @@ void LLPanelObject::refresh() mRootObject = NULL; } - bool enable_mesh = gSavedSettings.getBOOL("MeshEnabled"); + bool enable_mesh = gSavedSettings.getBOOL("MeshEnabled") && + !gAgent.getRegion()->getCapability("GetMesh").empty(); getChildView("label physicsshapetype")->setVisible(enable_mesh); getChildView("Physics Shape Type Combo Ctrl")->setVisible(enable_mesh); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 4ba1d007fe..d0bb93d1b6 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,14 @@ class LLMeshEnabled : public view_listener_t } }; +class LLMeshUploadVisible : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + return LLViewerParcelMgr::getInstance()->allowAgentBuild() && !gAgent.getRegion()->getCapability("ObjectAdd").empty(); + } +}; + LLMutex* LLFilePickerThread::sMutex = NULL; std::queue<LLFilePickerThread*> LLFilePickerThread::sDeadQ; @@ -1390,6 +1399,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. } diff --git a/indra/newview/skins/default/xui/en/menu_inventory_add.xml b/indra/newview/skins/default/xui/en/menu_inventory_add.xml index e0e6567872..62db15d456 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory_add.xml @@ -52,7 +52,7 @@ <menu_item_call.on_enable function="File.EnableUploadModel" /> <menu_item_call.on_visible - function="File.MeshEnabled"/> + function="File.VisibleUploadModel"/> </menu_item_call> <menu_item_call label="Bulk (L$[COST] per file)..." diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index dac238b84a..3e006d7b31 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -970,7 +970,7 @@ <menu_item_call.on_enable function="File.EnableUploadModel" /> <menu_item_call.on_visible - function="File.MeshEnabled"/> + function="File.VisibleUploadModel"/> </menu_item_call> <menu_item_call label="Model Wizard..." @@ -982,7 +982,7 @@ <menu_item_call.on_enable function="File.EnableUploadModel" /> <menu_item_call.on_visible - function="File.MeshEnabled"/> + function="File.VisibleUploadModel"/> </menu_item_call> <menu_item_call label="Bulk (L$[COST] per file)..." |