diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 31 | ||||
-rwxr-xr-x | indra/newview/llviewerregion.cpp | 29 | ||||
-rw-r--r-- | indra/newview/llviewerregion.h | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 27 |
4 files changed, 77 insertions, 13 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index fe6676759d..c762e796aa 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -122,6 +122,7 @@ #include "llviewerstatsrecorder.h" #include "llvoavatarself.h" #include "llvoicevivox.h" +#include "llworld.h" #include "llworldmap.h" #include "pipeline.h" #include "llviewerjoystick.h" @@ -333,6 +334,7 @@ void handle_debug_avatar_textures(void*); void handle_grab_baked_texture(void*); BOOL enable_grab_baked_texture(void*); void handle_dump_region_object_cache(void*); +void handle_reset_interest_lists(void *); BOOL enable_save_into_task_inventory(void*); @@ -1346,6 +1348,14 @@ class LLAdvancedCheckStatsRecorder : public view_listener_t } }; +class LLAdvancedResetInterestLists : public view_listener_t +{ + bool handleEvent(const LLSD &userdata) + { // Reset all region interest lists + handle_reset_interest_lists(NULL); + return true; + } +}; class LLAdvancedBuyCurrencyTest : public view_listener_t @@ -3892,6 +3902,22 @@ void handle_dump_region_object_cache(void*) } } +void handle_reset_interest_lists(void *) +{ + // Check all regions and reset their interest list + for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); + iter != LLWorld::getInstance()->getRegionList().end(); + ++iter) + { + LLViewerRegion *regionp = *iter; + if (regionp && regionp->isAlive() && regionp->capabilitiesReceived()) + { + regionp->resetInterestList(); + } + } +} + + void handle_dump_focus() { LLUICtrl *ctrl = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus()); @@ -9452,10 +9478,11 @@ void initialize_menus() // Advanced > World view_listener_t::addMenu(new LLAdvancedDumpScriptedCamera(), "Advanced.DumpScriptedCamera"); view_listener_t::addMenu(new LLAdvancedDumpRegionObjectCache(), "Advanced.DumpRegionObjectCache"); - view_listener_t::addMenu(new LLAdvancedToggleInterestList360Mode(), "Advanced.ToggleInterestList360Mode"); - view_listener_t::addMenu(new LLAdvancedCheckInterestList360Mode(), "Advanced.CheckInterestList360Mode"); view_listener_t::addMenu(new LLAdvancedToggleStatsRecorder(), "Advanced.ToggleStatsRecorder"); view_listener_t::addMenu(new LLAdvancedCheckStatsRecorder(), "Advanced.CheckStatsRecorder"); + view_listener_t::addMenu(new LLAdvancedToggleInterestList360Mode(), "Advanced.ToggleInterestList360Mode"); + view_listener_t::addMenu(new LLAdvancedCheckInterestList360Mode(), "Advanced.CheckInterestList360Mode"); + view_listener_t::addMenu(new LLAdvancedResetInterestLists(), "Advanced.ResetInterestLists"); // Advanced > UI commit.add("Advanced.WebBrowserTest", boost::bind(&handle_web_browser_test, _2)); // sigh! this one opens the MEDIA browser diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 9c2dc3c761..5254d766a8 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -3341,6 +3341,21 @@ bool LLViewerRegion::requestGetCapability(const std::string &capName, httpCallba return true; } +bool LLViewerRegion::requestDelCapability(const std::string &capName, httpCallback_t cbSuccess, httpCallback_t cbFailure) +{ + std::string url; + + url = getCapability(capName); + + if (url.empty()) + { + LL_WARNS("Region") << "Could not retrieve region " << getRegionID() << " DEL capability \"" << capName << "\"" << LL_ENDL; + return false; + } + + LLCoreHttpUtil::HttpCoroutineAdapter::callbackHttpDel(url, gAgent.getAgentPolicy(), cbSuccess, cbFailure); + return true; +} void LLViewerRegion::setInterestListMode(const std::string &new_mode) { @@ -3382,6 +3397,20 @@ void LLViewerRegion::setInterestListMode(const std::string &new_mode) } +void LLViewerRegion::resetInterestList() +{ + if (requestDelCapability("InterestList", [](const LLSD &response) { + LL_DEBUGS("360Capture") << "InterestList capability DEL responded: \n" << ll_pretty_print_sd(response) << LL_ENDL; + })) + { + LL_DEBUGS("360Capture") << "Region " << getRegionID() << " Successfully reset InterestList capability" << LL_ENDL; + } + else + { + LL_WARNS("360Capture") << "Region " << getRegionID() << " Unable to DEL InterestList capability request" << LL_ENDL; + } +} + LLSpatialPartition *LLViewerRegion::getSpatialPartition(U32 type) { diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 6308058f63..6956e9eb08 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -287,6 +287,7 @@ public: httpCallback_t cbSuccess = NULL, httpCallback_t cbFailure = NULL); bool requestGetCapability(const std::string &capName, httpCallback_t cbSuccess = NULL, httpCallback_t cbFailure = NULL); + bool requestDelCapability(const std::string &capName, httpCallback_t cbSuccess = NULL, httpCallback_t cbFailure = NULL); /// implements LLCapabilityProvider /*virtual*/ const LLHost& getHost() const; @@ -490,6 +491,8 @@ public: void setInterestListMode(const std::string & new_mode); const std::string & getInterestListMode() const { return mInterestListMode; } + void resetInterestList(); + static const std::string IL_MODE_DEFAULT; static const std::string IL_MODE_360; diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 07471ed5bb..51ac3d17ab 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -3485,16 +3485,6 @@ function="World.EnvPreset" <menu_item_call.on_click function="Advanced.DumpRegionObjectCache" /> </menu_item_call> - - <menu_item_check - label="Interest List 360 Mode" - name="Interest List: 360 Mode" - shortcut="alt|shift|I"> - <menu_item_check.on_check - function="Advanced.CheckInterestList360Mode" /> - <menu_item_check.on_click - function="Advanced.ToggleInterestList360Mode" /> - </menu_item_check> <menu_item_check label="Record Stats to File" name="Stats Recorder File"> @@ -3503,7 +3493,22 @@ function="World.EnvPreset" <menu_item_check.on_click function="Advanced.ToggleStatsRecorder" /> </menu_item_check> - </menu> + <menu_item_check + label="Interest Lists 360 Mode" + name="Interest List: 360 Mode" + shortcut="alt|shift|I"> + <menu_item_check.on_check + function="Advanced.CheckInterestList360Mode" /> + <menu_item_check.on_click + function="Advanced.ToggleInterestList360Mode" /> + </menu_item_check> + <menu_item_call + label="Reset Interest Lists" + name="Reset Interest Lists"> + <menu_item_call.on_click + function="Advanced.ResetInterestLists" /> + </menu_item_call> + </menu> <menu create_jump_keys="true" label="UI" |