diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-01-14 10:59:46 -0800 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-01-14 10:59:46 -0800 |
commit | 44737a3992b112c8191593e71533c19e4c10f911 (patch) | |
tree | eb2f965f49bf442939724ed8ec312ad7e3806ac9 /indra/newview | |
parent | e42755dd16195244a6743fc3970f24fec08f03b9 (diff) | |
parent | 23ffb7db1bb065b5afbdcb94eab57720d604ae8d (diff) |
merging latest changes
Diffstat (limited to 'indra/newview')
36 files changed, 417 insertions, 590 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index d43f9e9988..d40537fc78 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -349,6 +349,7 @@ set(viewer_SOURCE_FILES llmediactrl.cpp llmediadataclient.cpp llmemoryview.cpp + llmenuoptionpathfindingrebakenavmesh.cpp llmeshrepository.cpp llmimetypes.cpp llmorphview.cpp @@ -410,7 +411,6 @@ set(viewer_SOURCE_FILES llpanelonlinestatus.cpp llpaneloutfitedit.cpp llpaneloutfitsinventory.cpp - llpanelpathfindingrebakenavmesh.cpp llpanelpeople.cpp llpanelpeoplemenus.cpp llpanelpermissions.cpp @@ -936,6 +936,7 @@ set(viewer_HEADER_FILES llmediactrl.h llmediadataclient.h llmemoryview.h + llmenuoptionpathfindingrebakenavmesh.h llmeshrepository.h llmimetypes.h llmorphview.h @@ -991,7 +992,6 @@ set(viewer_HEADER_FILES llpanelonlinestatus.h llpaneloutfitedit.h llpaneloutfitsinventory.h - llpanelpathfindingrebakenavmesh.h llpanelpeople.h llpanelpeoplemenus.h llpanelpermissions.h @@ -1590,9 +1590,9 @@ if (WINDOWS) set_target_properties(${VIEWER_BINARY_NAME} PROPERTIES # *TODO -reenable this once we get server usage sorted out - LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS}" - LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO" - LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /MAP\"secondlife-bin.MAP\" /OPT:REF" + LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS} /LARGEADDRESSAWARE" + LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO /LARGEADDRESSAWARE" + LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /MAP\"secondlife-bin.MAP\" /OPT:REF /LARGEADDRESSAWARE" ) if(USE_PRECOMPILED_HEADERS) set_target_properties( @@ -2100,6 +2100,12 @@ if (LL_TESTS) LL_TEST_ADDITIONAL_LIBRARIES "${JSONCPP_LIBRARIES}" ) + set_source_files_properties( + lllogininstance.cpp + PROPERTIES + LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_SYSTEM_LIBRARY}" + ) + ################################################## # DISABLING PRECOMPILED HEADERS USAGE FOR TESTS ################################################## diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 507eb33f2d..126df69519 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5843,7 +5843,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> + <integer>0</integer> </map> <key>MemoryPrivatePoolSize</key> <map> diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index fc3be9ca21..d28af3eff9 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -57,7 +57,6 @@ #include "llnavigationbar.h" // to show/hide navigation bar when changing mouse look state #include "llfloaterimnearbychat.h" #include "llnotificationsutil.h" -#include "llpanelpathfindingrebakenavmesh.h" #include "llpaneltopinfobar.h" #include "llparcel.h" #include "llrendersphere.h" @@ -1982,7 +1981,6 @@ void LLAgent::endAnimationUpdateUI() LLChicletBar::getInstance()->setVisible(TRUE); LLPanelStandStopFlying::getInstance()->setVisible(TRUE); - LLPanelPathfindingRebakeNavmesh::getInstance()->setVisible(TRUE); LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); @@ -2092,7 +2090,6 @@ void LLAgent::endAnimationUpdateUI() LLChicletBar::getInstance()->setVisible(FALSE); LLPanelStandStopFlying::getInstance()->setVisible(FALSE); - LLPanelPathfindingRebakeNavmesh::getInstance()->setVisible(FALSE); // clear out camera lag effect gAgentCamera.clearCameraLag(); diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f7b49850cd..3c42734e6e 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -711,7 +711,7 @@ bool LLAppViewer::init() //set the max heap size. initMaxHeapSize() ; - LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")) ; + LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")*1024*1024) ; // write Google Breakpad minidump files to our log directory std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""); diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index e0ca1232b0..11790d562f 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -125,7 +125,7 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, #if WINDOWS_CRT_MEM_CHECKS && !INCLUDE_VLD _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); // dump memory leaks on exit -#elif 1 +#elif 0 // Experimental - enable the low fragmentation heap // This results in a 2-3x improvement in opening a new Inventory window (which uses a large numebr of allocations) // Note: This won't work when running from the debugger unless the _NO_DEBUG_HEAP environment variable is set to 1 diff --git a/indra/newview/lldirpicker.h b/indra/newview/lldirpicker.h index 2188b7edd0..682f9d6476 100644 --- a/indra/newview/lldirpicker.h +++ b/indra/newview/lldirpicker.h @@ -37,8 +37,8 @@ #include <Carbon/Carbon.h> // AssertMacros.h does bad things. +#include "fix_macros.h" #undef verify -#undef check #undef require #include <vector> diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp index 764da25b08..5cc0ab2081 100644 --- a/indra/newview/lldonotdisturbnotificationstorage.cpp +++ b/indra/newview/lldonotdisturbnotificationstorage.cpp @@ -41,8 +41,6 @@ #include "llsingleton.h" #include "lluuid.h" -extern void useMostItrusiveIMNotification(); - LLDoNotDisturbNotificationStorage::LLDoNotDisturbNotificationStorage() : LLSingleton<LLDoNotDisturbNotificationStorage>() , LLNotificationStorage(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "dnd_notifications.xml")) @@ -105,21 +103,14 @@ void LLDoNotDisturbNotificationStorage::loadNotifications() } LLNotifications& instance = LLNotifications::instance(); - bool imToastExists = false; for (LLSD::array_const_iterator notification_it = data.beginArray(); notification_it != data.endArray(); ++notification_it) { LLSD notification_params = *notification_it; - const std::string notificationName = notification_params["name"].asString(); const LLUUID& notificationID = notification_params["id"]; LLNotificationPtr notification = instance.find(notificationID); - - if(notificationName == "IMToast") - { - imToastExists = true; - } //Notification already exists in notification pipeline (same instance of app running) if (notification) @@ -147,11 +138,6 @@ void LLDoNotDisturbNotificationStorage::loadNotifications() } } - if(imToastExists) - { - useMostItrusiveIMNotification(); - } - // Clear the communication channel history and rewrite the save file to empty it as well LLNotificationChannelPtr channelPtr = getCommunicationChannel(); LLCommunicationChannel *commChannel = dynamic_cast<LLCommunicationChannel*>(channelPtr.get()); diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h index 55c665b9c7..4f602f63f1 100644 --- a/indra/newview/llfilepicker.h +++ b/indra/newview/llfilepicker.h @@ -39,8 +39,8 @@ #include <Carbon/Carbon.h> // AssertMacros.h does bad things. +#include "fix_macros.h" #undef verify -#undef check #undef require #include <vector> diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index c2b9c77307..2e1c963472 100644 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -96,18 +96,6 @@ LLVolumeImplFlexible::~LLVolumeImplFlexible() //static void LLVolumeImplFlexible::updateClass() { - // XXX stinson 11/13/2012 : This hack removes the optimization for limiting the number of flexi-prims - // updated. With the optimization, flexi-prims attached to the users avatar were not being - // animated correctly immediately following teleport. With the optimization removed, the bug went away. -#define XXX_STINSON_MAINT_1890_HACK_FIX 1 -#if XXX_STINSON_MAINT_1890_HACK_FIX - for (std::vector<LLVolumeImplFlexible*>::iterator iter = sInstanceList.begin(); - iter != sInstanceList.end(); - ++iter) - { - (*iter)->doIdleUpdate(); - } -#else // XXX_STINSON_MAINT_1890_HACK_FIX std::vector<S32>::iterator delay_iter = sUpdateDelay.begin(); for (std::vector<LLVolumeImplFlexible*>::iterator iter = sInstanceList.begin(); @@ -121,7 +109,6 @@ void LLVolumeImplFlexible::updateClass() } ++delay_iter; } -#endif // XXX_STINSON_MAINT_1890_HACK_FIX } LLVector3 LLVolumeImplFlexible::getFramePosition() const @@ -373,6 +360,8 @@ void LLVolumeImplFlexible::doIdleUpdate() F32 pixel_area = mVO->getPixelArea(); U32 update_period = (U32) (LLViewerCamera::getInstance()->getScreenPixelArea()*0.01f/(pixel_area*(sUpdateFactor+1.f)))+1; + // MAINT-1890 Clamp the update period to ensure that the update_period is no greater than 32 frames + update_period = llclamp(update_period, 0U, 32U); if (visible) { diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 4c74d3a8ef..3d4a1c44d8 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1624,35 +1624,6 @@ void LLFloaterPreference::selectChatPanel() selectPanel("chat"); } -S32 LLFloaterPreference::getHighestNotificationIndex() //change this name -{ - static const S32 comboBoxNamesLength = 4; - static std::string comboBoxNames[comboBoxNamesLength] = {"FriendIMOptions", - "NonFriendIMOptions", - "ConferenceIMOptions", - "GroupChatOptions"}; - S32 selectedIndex; - S32 priorityindex = 3; - LLComboBox * comboBox; - - for(S32 i = 0; i < comboBoxNamesLength; ++i) - { - comboBox = getChild<LLComboBox>(comboBoxNames[i]); - - if(comboBox) - { - selectedIndex = comboBox->getCurrentIndex(); - - if(selectedIndex < priorityindex) - { - priorityindex = selectedIndex; - } - } - } - - return priorityindex; -} - //------------------------------Updater--------------------------------------- static bool handleBandwidthChanged(const LLSD& newvalue) diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 3d5d49294e..37a531e99e 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -86,7 +86,6 @@ public: void saveAvatarProperties( void ); void selectPrivacyPanel(); void selectChatPanel(); - S32 getHighestNotificationIndex(); protected: void onBtnOK(); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index b29c1484cc..32b4afcfef 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -52,7 +52,6 @@ #include "llchat.h" #include "llfloaterimsession.h" #include "llfloaterimcontainer.h" -#include "llfloaterpreference.h" #include "llgroupiconctrl.h" #include "llmd5.h" #include "llmutelist.h" @@ -129,43 +128,18 @@ void process_dnd_im(const LLSD& notification) false, false); //will need slight refactor to retrieve whether offline message or not (assume online for now) } -} - -void useMostItrusiveIMNotification() -{ - LLFloaterPreference * instance = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences"); - LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); - - //conv. floater is closed - bool conversation_floater_is_closed = - !( im_box - && im_box->isInVisibleChain() - && !im_box->isMinimized()); - - //conversation floater not focused (visible or not) - bool conversation_floater_not_focused = - conversation_floater_is_closed || !im_box->hasFocus(); - //Only notify user of stored DND IM messages when conversation floater isn't focused - if (instance && conversation_floater_not_focused) + // open conversation floater + LLFloaterIMContainer* container_floater = + LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); + if (container_floater && !(container_floater->isFrontmost())) { - switch(instance->getHighestNotificationIndex()) - { - //open conversation floater - case 0: - LLFloaterReg::showInstance("im_container"); - break; - //pop up message - case 1: - //flash toolbar button - case 2: - gToolBarView->flashCommand(LLCommandId("chat"), true); - break; - } + container_floater->openFloater(); + container_floater->setFrontmost(TRUE); } - } + static void on_avatar_name_cache_toast(const LLUUID& agent_id, const LLAvatarName& av_name, LLSD msg) @@ -309,9 +283,9 @@ void on_new_message(const LLSD& msg) if(!gAgent.isDoNotDisturb()) { - //Surface conversations floater - LLFloaterReg::showInstance("im_container"); - } + //Surface conversations floater + LLFloaterReg::showInstance("im_container"); + } //If in DND mode, allow notification to be stored so upon DND exit //useMostItrusiveIMNotification will be called to notify user a message exists @@ -320,8 +294,8 @@ void on_new_message(const LLSD& msg) && gAgent.isDoNotDisturb()) { LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg)); - } - } + } +} } } @@ -2582,25 +2556,6 @@ void LLIMMgr::addMessage( new_session_id = computeSessionID(dialog, other_participant_id); } - // Open conversation log if offline messages are present and user allows a Call Log - if (is_offline_msg) - { - if (gSavedSettings.getBOOL("KeepConversationLogTranscripts")) - { - LLFloaterConversationLog* floater_log = - LLFloaterReg::getTypedInstance<LLFloaterConversationLog>("conversation"); - if (floater_log && !(floater_log->isFrontmost())) - { - floater_log->openFloater(); - floater_log->setFrontmost(TRUE); - } - } - else - { - gToolBarView->flashCommand(LLCommandId("chat"), true); - } - } - //*NOTE session_name is empty in case of incoming P2P sessions std::string fixed_session_name = from; bool name_is_setted = false; @@ -2667,6 +2622,19 @@ void LLIMMgr::addMessage( { LLIMModel::instance().addMessage(new_session_id, from, other_participant_id, msg); } + + // Open conversation floater if offline messages are present + if (is_offline_msg) + { + LLFloaterIMContainer* container_floater = + LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); + if (container_floater && !(container_floater->isFrontmost())) + { + container_floater->openFloater(); + container_floater->setFrontmost(TRUE); + } + } + } void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& message_name, const LLSD& args) diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index 459e52c4f4..97ba5b634a 100644 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -32,9 +32,7 @@ #include "lllocalbitmaps.h" /* boost: will not compile unless equivalent is undef'd, beware. */ -#ifdef equivalent -#undef equivalent -#endif +#include "fix_macros.h" #include <boost/filesystem.hpp> /* image compression headers. */ diff --git a/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp b/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp new file mode 100644 index 0000000000..dd5f1ea689 --- /dev/null +++ b/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp @@ -0,0 +1,238 @@ +/** +* @file llmenuoptionpathfindingrebakenavmesh.cpp +* @brief Implementation of llmenuoptionpathfindingrebakenavmesh +* @author Prep@lindenlab.com +* +* $LicenseInfo:firstyear=2012&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2012, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ + + +#include "llviewerprecompiledheaders.h" + +#include "llmenuoptionpathfindingrebakenavmesh.h" + +#include <boost/bind.hpp> +#include <boost/signals2.hpp> + +#include "llagent.h" +#include "llenvmanager.h" +#include "llnotificationsutil.h" +#include "llpathfindingmanager.h" +#include "llpathfindingnavmesh.h" +#include "llpathfindingnavmeshstatus.h" +#include "llviewerregion.h" + +LLMenuOptionPathfindingRebakeNavmesh::LLMenuOptionPathfindingRebakeNavmesh() + : LLSingleton<LLMenuOptionPathfindingRebakeNavmesh>(), + mIsInitialized(false), + mCanRebakeRegion(false), + mRebakeNavMeshMode(kRebakeNavMesh_Default), + mNavMeshSlot(), + mRegionCrossingSlot(), + mAgentStateSlot() +{ +} + +LLMenuOptionPathfindingRebakeNavmesh::~LLMenuOptionPathfindingRebakeNavmesh() +{ + if (mRebakeNavMeshMode == kRebakeNavMesh_RequestSent) + { + LL_WARNS("navmeshRebaking") << "During destruction of the LLMenuOptionPathfindingRebakeNavmesh " + << "singleton, the mode indicates that a request has been sent for which a response has yet " + << "to be received. This could contribute to a crash on exit." << LL_ENDL; + } + + llassert(!mIsInitialized); + if (mIsInitialized) + { + quit(); + } +} + +void LLMenuOptionPathfindingRebakeNavmesh::initialize() +{ + llassert(!mIsInitialized); + if (!mIsInitialized) + { + mIsInitialized = true; + + setMode(kRebakeNavMesh_Default); + + createNavMeshStatusListenerForCurrentRegion(); + + if ( !mRegionCrossingSlot.connected() ) + { + mRegionCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLMenuOptionPathfindingRebakeNavmesh::handleRegionBoundaryCrossed, this)); + } + + if (!mAgentStateSlot.connected()) + { + mAgentStateSlot = LLPathfindingManager::getInstance()->registerAgentStateListener(boost::bind(&LLMenuOptionPathfindingRebakeNavmesh::handleAgentState, this, _1)); + } + LLPathfindingManager::getInstance()->requestGetAgentState(); + } +} + +void LLMenuOptionPathfindingRebakeNavmesh::quit() +{ + llassert(mIsInitialized); + if (mIsInitialized) + { + if (mNavMeshSlot.connected()) + { + mNavMeshSlot.disconnect(); + } + + if (mRegionCrossingSlot.connected()) + { + mRegionCrossingSlot.disconnect(); + } + + if (mAgentStateSlot.connected()) + { + mAgentStateSlot.disconnect(); + } + + mIsInitialized = false; + } +} + +bool LLMenuOptionPathfindingRebakeNavmesh::canRebakeRegion() const +{ + if (!mIsInitialized) + { + LL_ERRS("navmeshRebaking") << "LLMenuOptionPathfindingRebakeNavmesh class has not been initialized " + << "when the ability to rebake navmesh is being requested." << LL_ENDL; + } + return mCanRebakeRegion; +} + +LLMenuOptionPathfindingRebakeNavmesh::ERebakeNavMeshMode LLMenuOptionPathfindingRebakeNavmesh::getMode() const +{ + if (!mIsInitialized) + { + LL_ERRS("navmeshRebaking") << "LLMenuOptionPathfindingRebakeNavmesh class has not been initialized " + << "when the mode is being requested." << LL_ENDL; + } + return mRebakeNavMeshMode; +} + +void LLMenuOptionPathfindingRebakeNavmesh::sendRequestRebakeNavmesh() +{ + if (!mIsInitialized) + { + LL_ERRS("navmeshRebaking") << "LLMenuOptionPathfindingRebakeNavmesh class has not been initialized " + << "when the request is being made to rebake the navmesh." << LL_ENDL; + } + else + { + if (!canRebakeRegion()) + { + LL_WARNS("navmeshRebaking") << "attempting to rebake navmesh when user does not have permissions " + << "on this region" << LL_ENDL; + } + if (getMode() != kRebakeNavMesh_Available) + { + LL_WARNS("navmeshRebaking") << "attempting to rebake navmesh when mode is not available" + << LL_ENDL; + } + + setMode(kRebakeNavMesh_RequestSent); + LLPathfindingManager::getInstance()->requestRebakeNavMesh(boost::bind(&LLMenuOptionPathfindingRebakeNavmesh::handleRebakeNavMeshResponse, this, _1)); + } +} + +void LLMenuOptionPathfindingRebakeNavmesh::setMode(ERebakeNavMeshMode pRebakeNavMeshMode) +{ + mRebakeNavMeshMode = pRebakeNavMeshMode; +} + +void LLMenuOptionPathfindingRebakeNavmesh::handleAgentState(BOOL pCanRebakeRegion) +{ + llassert(mIsInitialized); + mCanRebakeRegion = pCanRebakeRegion; +} + +void LLMenuOptionPathfindingRebakeNavmesh::handleRebakeNavMeshResponse(bool pResponseStatus) +{ + llassert(mIsInitialized); + if (getMode() == kRebakeNavMesh_RequestSent) + { + setMode(pResponseStatus ? kRebakeNavMesh_InProgress : kRebakeNavMesh_Default); + } + + if (!pResponseStatus) + { + LLNotificationsUtil::add("PathfindingCannotRebakeNavmesh"); + } +} + +void LLMenuOptionPathfindingRebakeNavmesh::handleNavMeshStatus(const LLPathfindingNavMeshStatus &pNavMeshStatus) +{ + llassert(mIsInitialized); + ERebakeNavMeshMode rebakeNavMeshMode = kRebakeNavMesh_Default; + if (pNavMeshStatus.isValid()) + { + switch (pNavMeshStatus.getStatus()) + { + case LLPathfindingNavMeshStatus::kPending : + case LLPathfindingNavMeshStatus::kRepending : + rebakeNavMeshMode = kRebakeNavMesh_Available; + break; + case LLPathfindingNavMeshStatus::kBuilding : + rebakeNavMeshMode = kRebakeNavMesh_InProgress; + break; + case LLPathfindingNavMeshStatus::kComplete : + rebakeNavMeshMode = kRebakeNavMesh_NotAvailable; + break; + default : + rebakeNavMeshMode = kRebakeNavMesh_Default; + llassert(0); + break; + } + } + + setMode(rebakeNavMeshMode); +} + +void LLMenuOptionPathfindingRebakeNavmesh::handleRegionBoundaryCrossed() +{ + llassert(mIsInitialized); + createNavMeshStatusListenerForCurrentRegion(); + mCanRebakeRegion = FALSE; + LLPathfindingManager::getInstance()->requestGetAgentState(); +} + +void LLMenuOptionPathfindingRebakeNavmesh::createNavMeshStatusListenerForCurrentRegion() +{ + if (mNavMeshSlot.connected()) + { + mNavMeshSlot.disconnect(); + } + + LLViewerRegion *currentRegion = gAgent.getRegion(); + if (currentRegion != NULL) + { + mNavMeshSlot = LLPathfindingManager::getInstance()->registerNavMeshListenerForRegion(currentRegion, boost::bind(&LLMenuOptionPathfindingRebakeNavmesh::handleNavMeshStatus, this, _2)); + LLPathfindingManager::getInstance()->requestGetNavMeshForRegion(currentRegion, true); + } +} diff --git a/indra/newview/llpanelpathfindingrebakenavmesh.h b/indra/newview/llmenuoptionpathfindingrebakenavmesh.h index 48764f2aa7..7b1d2873ba 100644 --- a/indra/newview/llpanelpathfindingrebakenavmesh.h +++ b/indra/newview/llmenuoptionpathfindingrebakenavmesh.h @@ -1,6 +1,6 @@ /** -* @file llpanelpathfindingrebakenavmesh.h -* @brief Header file for llpanelpathfindingrebakenavmesh +* @file llmenuoptionpathfindingrebakenavmesh.h +* @brief Header file for llmenuoptionpathfindingrebakenavmesh * @author Prep@lindenlab.com * * $LicenseInfo:firstyear=2012&license=viewerlgpl$ @@ -24,34 +24,22 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ -#ifndef LL_LLPANELPATHFINDINGREBAKENAVMESH_H -#define LL_LLPANELPATHFINDINGREBAKENAVMESH_H +#ifndef LL_LLMENUOPTIONPATHFINDINGREBAKENAVMESH_H +#define LL_LLMENUOPTIONPATHFINDINGREBAKENAVMESH_H #include <boost/signals2.hpp> -#include "llpanel.h" #include "llpathfindingmanager.h" #include "llpathfindingnavmesh.h" +#include "llsingleton.h" -class LLButton; class LLPathfindingNavMeshStatus; -class LLPanelPathfindingRebakeNavmesh : public LLPanel +class LLMenuOptionPathfindingRebakeNavmesh : public LLSingleton<LLMenuOptionPathfindingRebakeNavmesh> { - - LOG_CLASS(LLPanelPathfindingRebakeNavmesh); + LOG_CLASS(LLMenuOptionPathfindingRebakeNavmesh); public: - static LLPanelPathfindingRebakeNavmesh* getInstance(); - - virtual BOOL postBuild(); - - virtual void draw(); - virtual BOOL handleToolTip( S32 x, S32 y, MASK mask ); - -protected: - -private: typedef enum { kRebakeNavMesh_Available, @@ -61,15 +49,21 @@ private: kRebakeNavMesh_Default = kRebakeNavMesh_NotAvailable } ERebakeNavMeshMode; - LLPanelPathfindingRebakeNavmesh(); - virtual ~LLPanelPathfindingRebakeNavmesh(); + LLMenuOptionPathfindingRebakeNavmesh(); + virtual ~LLMenuOptionPathfindingRebakeNavmesh(); - static LLPanelPathfindingRebakeNavmesh* getPanel(); + void initialize(); + void quit(); - void setMode(ERebakeNavMeshMode pRebakeNavMeshMode); + bool canRebakeRegion() const; ERebakeNavMeshMode getMode() const; - void onNavMeshRebakeClick(); + void sendRequestRebakeNavmesh(); + +protected: + +private: + void setMode(ERebakeNavMeshMode pRebakeNavMeshMode); void handleAgentState(BOOL pCanRebakeRegion); void handleRebakeNavMeshResponse(bool pResponseStatus); @@ -78,19 +72,14 @@ private: void createNavMeshStatusListenerForCurrentRegion(); - bool doDraw() const; - void updatePosition(); + bool mIsInitialized; - BOOL mCanRebakeRegion; + bool mCanRebakeRegion; ERebakeNavMeshMode mRebakeNavMeshMode; - LLButton* mNavMeshRebakeButton; - LLButton* mNavMeshSendingButton; - LLButton* mNavMeshBakingButton; - LLPathfindingNavMesh::navmesh_slot_t mNavMeshSlot; boost::signals2::connection mRegionCrossingSlot; LLPathfindingManager::agent_state_slot_t mAgentStateSlot; }; -#endif // LL_LLPANELPATHFINDINGREBAKENAVMESH_H +#endif // LL_LLMENUOPTIONPATHFINDINGREBAKENAVMESH_H diff --git a/indra/newview/llpanelpathfindingrebakenavmesh.cpp b/indra/newview/llpanelpathfindingrebakenavmesh.cpp deleted file mode 100644 index 7efb1a9227..0000000000 --- a/indra/newview/llpanelpathfindingrebakenavmesh.cpp +++ /dev/null @@ -1,269 +0,0 @@ -/** -* @file llpanelpathfindingrebakenavmesh.cpp -* @brief Implementation of llpanelpathfindingrebakenavmesh -* @author Prep@lindenlab.com -* -* $LicenseInfo:firstyear=2012&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2012, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - - -#include "llviewerprecompiledheaders.h" - -#include "llpanelpathfindingrebakenavmesh.h" - -#include <boost/bind.hpp> -#include <boost/signals2.hpp> - -#include "llagent.h" -#include "llbutton.h" -#include "llenvmanager.h" -#include "llhints.h" -#include "llnotificationsutil.h" -#include "llpanel.h" -#include "llpathfindingmanager.h" -#include "llpathfindingnavmesh.h" -#include "llpathfindingnavmeshstatus.h" -#include "lltoolbar.h" -#include "lltoolbarview.h" -#include "lltooltip.h" -#include "llviewerregion.h" - -LLPanelPathfindingRebakeNavmesh* LLPanelPathfindingRebakeNavmesh::getInstance() -{ - static LLPanelPathfindingRebakeNavmesh* panel = getPanel(); - return panel; -} - -BOOL LLPanelPathfindingRebakeNavmesh::postBuild() -{ - //Rebake button - mNavMeshRebakeButton = findChild<LLButton>("navmesh_btn"); - llassert(mNavMeshRebakeButton != NULL); - mNavMeshRebakeButton->setCommitCallback(boost::bind(&LLPanelPathfindingRebakeNavmesh::onNavMeshRebakeClick, this)); - LLHints::registerHintTarget("navmesh_btn", mNavMeshRebakeButton->getHandle()); - - //Sending rebake request - mNavMeshSendingButton = findChild<LLButton>("navmesh_btn_sending"); - llassert(mNavMeshSendingButton != NULL); - LLHints::registerHintTarget("navmesh_btn_sending", mNavMeshSendingButton->getHandle()); - - //rebaking... - mNavMeshBakingButton = findChild<LLButton>("navmesh_btn_baking"); - llassert(mNavMeshBakingButton != NULL); - LLHints::registerHintTarget("navmesh_btn_baking", mNavMeshBakingButton->getHandle()); - - setMode(kRebakeNavMesh_Default); - - createNavMeshStatusListenerForCurrentRegion(); - - if ( !mRegionCrossingSlot.connected() ) - { - mRegionCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLPanelPathfindingRebakeNavmesh::handleRegionBoundaryCrossed, this)); - } - - if (!mAgentStateSlot.connected()) - { - mAgentStateSlot = LLPathfindingManager::getInstance()->registerAgentStateListener(boost::bind(&LLPanelPathfindingRebakeNavmesh::handleAgentState, this, _1)); - } - LLPathfindingManager::getInstance()->requestGetAgentState(); - - return LLPanel::postBuild(); -} - -void LLPanelPathfindingRebakeNavmesh::draw() -{ - if (doDraw()) - { - updatePosition(); - LLPanel::draw(); - } -} - -BOOL LLPanelPathfindingRebakeNavmesh::handleToolTip( S32 x, S32 y, MASK mask ) -{ - LLToolTipMgr::instance().unblockToolTips(); - - if (mNavMeshRebakeButton->getVisible()) - { - LLToolTipMgr::instance().show(mNavMeshRebakeButton->getToolTip()); - } - else if (mNavMeshSendingButton->getVisible()) - { - LLToolTipMgr::instance().show(mNavMeshSendingButton->getToolTip()); - } - else if (mNavMeshBakingButton->getVisible()) - { - LLToolTipMgr::instance().show(mNavMeshBakingButton->getToolTip()); - } - - return LLPanel::handleToolTip(x, y, mask); -} - -LLPanelPathfindingRebakeNavmesh::LLPanelPathfindingRebakeNavmesh() - : LLPanel(), - mCanRebakeRegion(FALSE), - mRebakeNavMeshMode(kRebakeNavMesh_Default), - mNavMeshRebakeButton(NULL), - mNavMeshSendingButton(NULL), - mNavMeshBakingButton(NULL), - mNavMeshSlot(), - mRegionCrossingSlot(), - mAgentStateSlot() -{ - // make sure we have the only instance of this class - static bool b = true; - llassert_always(b); - b=false; -} - -LLPanelPathfindingRebakeNavmesh::~LLPanelPathfindingRebakeNavmesh() -{ -} - -LLPanelPathfindingRebakeNavmesh* LLPanelPathfindingRebakeNavmesh::getPanel() -{ - LLPanelPathfindingRebakeNavmesh* panel = new LLPanelPathfindingRebakeNavmesh(); - panel->buildFromFile("panel_navmesh_rebake.xml"); - return panel; -} - -void LLPanelPathfindingRebakeNavmesh::setMode(ERebakeNavMeshMode pRebakeNavMeshMode) -{ - if (pRebakeNavMeshMode == kRebakeNavMesh_Available) - { - LLNotificationsUtil::add("PathfindingRebakeNavmesh"); - } - mNavMeshRebakeButton->setVisible(pRebakeNavMeshMode == kRebakeNavMesh_Available); - mNavMeshSendingButton->setVisible(pRebakeNavMeshMode == kRebakeNavMesh_RequestSent); - mNavMeshBakingButton->setVisible(pRebakeNavMeshMode == kRebakeNavMesh_InProgress); - mRebakeNavMeshMode = pRebakeNavMeshMode; -} - -LLPanelPathfindingRebakeNavmesh::ERebakeNavMeshMode LLPanelPathfindingRebakeNavmesh::getMode() const -{ - return mRebakeNavMeshMode; -} - -void LLPanelPathfindingRebakeNavmesh::onNavMeshRebakeClick() -{ - setMode(kRebakeNavMesh_RequestSent); - LLPathfindingManager::getInstance()->requestRebakeNavMesh(boost::bind(&LLPanelPathfindingRebakeNavmesh::handleRebakeNavMeshResponse, this, _1)); -} - -void LLPanelPathfindingRebakeNavmesh::handleAgentState(BOOL pCanRebakeRegion) -{ - mCanRebakeRegion = pCanRebakeRegion; -} - -void LLPanelPathfindingRebakeNavmesh::handleRebakeNavMeshResponse(bool pResponseStatus) -{ - if (getMode() == kRebakeNavMesh_RequestSent) - { - setMode(pResponseStatus ? kRebakeNavMesh_InProgress : kRebakeNavMesh_Default); - } - - if (!pResponseStatus) - { - LLNotificationsUtil::add("PathfindingCannotRebakeNavmesh"); - } -} - -void LLPanelPathfindingRebakeNavmesh::handleNavMeshStatus(const LLPathfindingNavMeshStatus &pNavMeshStatus) -{ - ERebakeNavMeshMode rebakeNavMeshMode = kRebakeNavMesh_Default; - if (pNavMeshStatus.isValid()) - { - switch (pNavMeshStatus.getStatus()) - { - case LLPathfindingNavMeshStatus::kPending : - case LLPathfindingNavMeshStatus::kRepending : - rebakeNavMeshMode = kRebakeNavMesh_Available; - break; - case LLPathfindingNavMeshStatus::kBuilding : - rebakeNavMeshMode = kRebakeNavMesh_InProgress; - break; - case LLPathfindingNavMeshStatus::kComplete : - rebakeNavMeshMode = kRebakeNavMesh_NotAvailable; - break; - default : - rebakeNavMeshMode = kRebakeNavMesh_Default; - llassert(0); - break; - } - } - - setMode(rebakeNavMeshMode); -} - -void LLPanelPathfindingRebakeNavmesh::handleRegionBoundaryCrossed() -{ - createNavMeshStatusListenerForCurrentRegion(); - mCanRebakeRegion = FALSE; - LLPathfindingManager::getInstance()->requestGetAgentState(); -} - -void LLPanelPathfindingRebakeNavmesh::createNavMeshStatusListenerForCurrentRegion() -{ - if (mNavMeshSlot.connected()) - { - mNavMeshSlot.disconnect(); - } - - LLViewerRegion *currentRegion = gAgent.getRegion(); - if (currentRegion != NULL) - { - mNavMeshSlot = LLPathfindingManager::getInstance()->registerNavMeshListenerForRegion(currentRegion, boost::bind(&LLPanelPathfindingRebakeNavmesh::handleNavMeshStatus, this, _2)); - LLPathfindingManager::getInstance()->requestGetNavMeshForRegion(currentRegion, true); - } -} - -bool LLPanelPathfindingRebakeNavmesh::doDraw() const -{ - return (mCanRebakeRegion && (mRebakeNavMeshMode != kRebakeNavMesh_NotAvailable)); -} - -void LLPanelPathfindingRebakeNavmesh::updatePosition() -{ - S32 y_pos = 0; - S32 bottom_tb_center = 0; - - if (LLToolBar* toolbar_bottom = gToolBarView->getChild<LLToolBar>("toolbar_bottom")) - { - y_pos = toolbar_bottom->getRect().getHeight(); - bottom_tb_center = toolbar_bottom->getRect().getCenterX(); - } - - S32 left_tb_width = 0; - if (LLToolBar* toolbar_left = gToolBarView->getChild<LLToolBar>("toolbar_left")) - { - left_tb_width = toolbar_left->getRect().getWidth(); - } - - if(LLPanel* panel_ssf_container = getRootView()->getChild<LLPanel>("state_management_buttons_container")) - { - panel_ssf_container->setOrigin(0, y_pos); - } - - S32 x_pos = bottom_tb_center-getRect().getWidth()/2 - left_tb_width + 113 /* width of stand/fly button */ + 10 /* margin */; - - setOrigin( x_pos, 0); -} diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index be9f7d645a..a0aa639ac6 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -84,6 +84,7 @@ #include "llinventoryfunctions.h" #include "llpanellogin.h" #include "llpanelblockedlist.h" +#include "llmenuoptionpathfindingrebakenavmesh.h" #include "llmoveview.h" #include "llparcel.h" #include "llrootview.h" @@ -4864,6 +4865,37 @@ class LLToolsEnablePathfindingView : public view_listener_t } }; +class LLToolsDoPathfindingRebakeRegion : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + bool hasPathfinding = (LLPathfindingManager::getInstance() != NULL); + + if (hasPathfinding) + { + LLMenuOptionPathfindingRebakeNavmesh::getInstance()->sendRequestRebakeNavmesh(); + } + + return hasPathfinding; + } +}; + +class LLToolsEnablePathfindingRebakeRegion : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + bool returnValue = false; + + if (LLPathfindingManager::getInstance() != NULL) + { + LLMenuOptionPathfindingRebakeNavmesh *rebakeInstance = LLMenuOptionPathfindingRebakeNavmesh::getInstance(); + returnValue = (rebakeInstance->canRebakeRegion() && + (rebakeInstance->getMode() == LLMenuOptionPathfindingRebakeNavmesh::kRebakeNavMesh_Available)); + } + return returnValue; + } +}; + // Round the position of all root objects to the grid class LLToolsSnapObjectXY : public view_listener_t { @@ -8363,6 +8395,8 @@ void initialize_menus() view_listener_t::addMenu(new LLToolsEnablePathfinding(), "Tools.EnablePathfinding"); view_listener_t::addMenu(new LLToolsEnablePathfindingView(), "Tools.EnablePathfindingView"); + view_listener_t::addMenu(new LLToolsDoPathfindingRebakeRegion(), "Tools.DoPathfindingRebakeRegion"); + view_listener_t::addMenu(new LLToolsEnablePathfindingRebakeRegion(), "Tools.EnablePathfindingRebakeRegion"); // Help menu // most items use the ShowFloater method diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 52f73d6c43..bc76c83d8f 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -1232,12 +1232,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, coloru.mV[3] = 255 - coloru.mV[3]; mText->setColor(LLColor4(coloru)); mText->setString(temp_string); - - if (mDrawable.notNull()) - { - setChanged(MOVED | SILHOUETTE); - gPipeline.markMoved(mDrawable, FALSE); // undamped - } + + setChanged(MOVED | SILHOUETTE); } else if (mText.notNull()) { @@ -2046,12 +2042,12 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, || (new_angv != old_angv)) { if (new_rot != mPreviousRotation) - { + { resetRot(); } else if (new_angv != old_angv) { - if (flagUsePhysics() || new_angv.isExactlyZero()) + if (flagUsePhysics()) { resetRot(); } @@ -2069,7 +2065,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, setChanged(ROTATED | SILHOUETTE); } - if ( gShowObjectUpdates ) { LLColor4 color; diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 32cf8cc1b3..96d7890a9e 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -624,6 +624,7 @@ LLViewerTexture::~LLViewerTexture() void LLViewerTexture::init(bool firstinit) { mBoostLevel = LLViewerTexture::BOOST_NONE; + mSelectedTime = 0.f; mFullWidth = 0; mFullHeight = 0; @@ -679,11 +680,18 @@ void LLViewerTexture::setBoostLevel(S32 level) if(mBoostLevel != level) { mBoostLevel = level ; - if(mBoostLevel != LLViewerTexture::BOOST_NONE) + if(mBoostLevel != LLViewerTexture::BOOST_NONE && + mBoostLevel != LLViewerTexture::BOOST_SELECTED) { setNoDelete() ; } } + + if (mBoostLevel == LLViewerTexture::BOOST_SELECTED) + { + mSelectedTime = gFrameTimeSeconds; + } + } @@ -1904,13 +1912,34 @@ void LLViewerFetchedTexture::updateVirtualSize() for(U32 i = 0 ; i < mNumFaces ; i++) { LLFace* facep = mFaceList[i] ; - if( facep && facep->getDrawable() && facep->getDrawable()->isRecentlyVisible()) + if( facep ) { - addTextureStats(facep->getVirtualSize()) ; - setAdditionalDecodePriority(facep->getImportanceToCamera()) ; + LLDrawable* drawable = facep->getDrawable(); + if (drawable) + { + if(drawable->isRecentlyVisible()) + { + if (getBoostLevel() == LLViewerTexture::BOOST_NONE && + drawable->getVObj() && drawable->getVObj()->isSelected()) + { + setBoostLevel(LLViewerTexture::BOOST_SELECTED); + } + addTextureStats(facep->getVirtualSize()) ; + setAdditionalDecodePriority(facep->getImportanceToCamera()) ; + } + } } } + //reset whether or not a face was selected after 10 seconds + const F32 SELECTION_RESET_TIME = 10.f; + + if (getBoostLevel() == LLViewerTexture::BOOST_SELECTED && + gFrameTimeSeconds - mSelectedTime > SELECTION_RESET_TIME) + { + setBoostLevel(LLViewerTexture::BOOST_NONE); + } + if(mMaxVirtualSizeResetCounter > 0) { mMaxVirtualSizeResetCounter--; diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 2ea9a07e9a..2e7949e9a3 100755 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -275,6 +275,7 @@ private: protected: LLUUID mID; S32 mBoostLevel; // enum describing priority level + F32 mSelectedTime; // time texture was last selected S32 mFullWidth; S32 mFullHeight; BOOL mUseMipMaps ; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 1c463015e2..2d5634a41d 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -125,12 +125,12 @@ #include "llkeyboard.h" #include "lllineeditor.h" #include "llmenugl.h" +#include "llmenuoptionpathfindingrebakenavmesh.h" #include "llmodaldialog.h" #include "llmorphview.h" #include "llmoveview.h" #include "llnavigationbar.h" #include "llnotificationhandler.h" -#include "llpanelpathfindingrebakenavmesh.h" #include "llpaneltopinfobar.h" #include "llpopupview.h" #include "llpreviewtexture.h" @@ -1937,11 +1937,10 @@ void LLViewerWindow::initWorldUI() LLPanelStandStopFlying* panel_stand_stop_flying = LLPanelStandStopFlying::getInstance(); panel_ssf_container->addChild(panel_stand_stop_flying); - LLPanelPathfindingRebakeNavmesh *panel_rebake_navmesh = LLPanelPathfindingRebakeNavmesh::getInstance(); - panel_ssf_container->addChild(panel_rebake_navmesh); - panel_ssf_container->setVisible(TRUE); + LLMenuOptionPathfindingRebakeNavmesh::getInstance()->initialize(); + // Load and make the toolbars visible // Note: we need to load the toolbars only *after* the user is logged in and IW if (gToolBarView) @@ -2011,6 +2010,8 @@ void LLViewerWindow::shutdownViews() mRootView = NULL; llinfos << "RootView deleted." << llendl ; + LLMenuOptionPathfindingRebakeNavmesh::getInstance()->quit(); + // Automatically deleted as children of mRootView. Fix the globals. gStatusBar = NULL; gIMMgr = NULL; diff --git a/indra/newview/macutil_Prefix.h b/indra/newview/macutil_Prefix.h index fd8e927a08..b54a764a62 100644 --- a/indra/newview/macutil_Prefix.h +++ b/indra/newview/macutil_Prefix.h @@ -33,7 +33,7 @@ */ #include <Carbon/Carbon.h> +#include "fix_macros.h" -#undef check #undef verify #undef require diff --git a/indra/newview/skins/default/xui/de/panel_navmesh_rebake.xml b/indra/newview/skins/default/xui/de/panel_navmesh_rebake.xml deleted file mode 100644 index 44be6d67b1..0000000000 --- a/indra/newview/skins/default/xui/de/panel_navmesh_rebake.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_navmesh_rebake"> - <button label="Region neu formen" name="navmesh_btn" tool_tip="Klicken, um das Navmesh der Region neu zu formen."/> - <button label="Neuformen wird angefordert" name="navmesh_btn_sending" tool_tip="Anforderung zum Neuformen wird an den Server gesendet."/> - <button label="Region wird neu geformt" name="navmesh_btn_baking" tool_tip="Region wird neu geformt. Nach Abschluss des Vorgangs verschwindet diese Schaltfläche."/> -</panel> diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml index 52b9524b11..f6004621a6 100644 --- a/indra/newview/skins/default/xui/en/menu_object.xml +++ b/indra/newview/skins/default/xui/en/menu_object.xml @@ -30,26 +30,6 @@ function="EnableEdit"/> </menu_item_call> <menu_item_call - label="Show in linksets" - name="show_in_linksets"> - <menu_item_call.on_click - function="Pathfinding.Linksets.Select" /> - <menu_item_call.on_enable - function="EnableSelectInPathfindingLinksets"/> - <menu_item_call.on_visible - function="EnableSelectInPathfindingLinksets"/> - </menu_item_call> - <menu_item_call - label="Show in characters" - name="show_in_characters"> - <menu_item_call.on_click - function="Pathfinding.Characters.Select" /> - <menu_item_call.on_enable - function="EnableSelectInPathfindingCharacters"/> - <menu_item_call.on_visible - function="EnableSelectInPathfindingCharacters"/> - </menu_item_call> - <menu_item_call enabled="false" label="Open" name="Open"> @@ -90,6 +70,26 @@ <menu_item_call.on_click function="Object.ZoomIn" /> </menu_item_call> + <menu_item_call + label="Show in linksets" + name="show_in_linksets"> + <menu_item_call.on_click + function="Pathfinding.Linksets.Select" /> + <menu_item_call.on_enable + function="EnableSelectInPathfindingLinksets"/> + <menu_item_call.on_visible + function="EnableSelectInPathfindingLinksets"/> + </menu_item_call> + <menu_item_call + label="Show in characters" + name="show_in_characters"> + <menu_item_call.on_click + function="Pathfinding.Characters.Select" /> + <menu_item_call.on_enable + function="EnableSelectInPathfindingCharacters"/> + <menu_item_call.on_visible + function="EnableSelectInPathfindingCharacters"/> + </menu_item_call> <menu_item_separator layout="topleft" /> <context_menu label="Put On" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 76de81559b..8d5e3f0b5d 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -981,7 +981,7 @@ create_jump_keys="true" label="Pathfinding" name="Pathfinding" - tear_off="false"> + tear_off="true"> <menu_item_call label="Linksets..." name="pathfinding_linksets_menu_item"> @@ -1009,6 +1009,14 @@ <menu_item_call.on_enable function="Tools.EnablePathfindingView" /> </menu_item_call> + <menu_item_call + label="Rebake region" + name="pathfinding_rebake_navmesh_item"> + <menu_item_call.on_click + function="Tools.DoPathfindingRebakeRegion"/> + <menu_item_call.on_enable + function="Tools.EnablePathfindingRebakeRegion" /> + </menu_item_call> </menu> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 05798da8e2..6a464ccdc4 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6116,26 +6116,6 @@ This area has building disabled. You can't build or rez objects here. <notification icon="alertmodal.tga" - name="PathfindingRebakeNavmesh" - type="alertmodal"> - <unique/> - Changing certain objects in this region could cause other moving objects to behave incorrectly. To make moving objects behave correctly, click the “Rebake region” button. Choose “Help” for more information. - <url - option="1" - name="url" - target = "_external"> - http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer - </url> - <usetemplate - name="okhelpignore" - ignoretext="Changing certain objects in this region could cause other moving objects to behave incorrectly." - yestext="OK" - helptext="Help" - /> - </notification> - - <notification - icon="alertmodal.tga" name="PathfindingCannotRebakeNavmesh" type="alertmodal"> <unique/> diff --git a/indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml b/indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml deleted file mode 100644 index 90308a2ca9..0000000000 --- a/indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel - height="25" - layout="topleft" - name="panel_navmesh_rebake" - mouse_opaque="false" - visible="true" - width="133"> - <button - follows="left|bottom" - height="19" - label="Rebake region" - layout="topleft" - left="10" - name="navmesh_btn" - tool_tip="Click to rebake the region's navmesh." - top="2" - visible="false" - enabled="true" - width="120" /> - <button - follows="left|bottom" - height="19" - label="Requesting rebake" - layout="topleft" - left="10" - name="navmesh_btn_sending" - tool_tip="Sending rebake request to the server." - top="2" - visible="false" - enabled="false" - width="120" /> - <button - follows="left|bottom" - height="19" - label="Region is rebaking" - layout="topleft" - left="10" - name="navmesh_btn_baking" - tool_tip="Region is being rebaked. When completed, this button will disappear." - top="2" - visible="false" - enabled="false" - width="120" /> -</panel> diff --git a/indra/newview/skins/default/xui/es/panel_navmesh_rebake.xml b/indra/newview/skins/default/xui/es/panel_navmesh_rebake.xml deleted file mode 100644 index 96df844512..0000000000 --- a/indra/newview/skins/default/xui/es/panel_navmesh_rebake.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_navmesh_rebake"> - <button label="Recargar la región" name="navmesh_btn" tool_tip="Pulsa para recargar el navmesh de la región."/> - <button label="Solicitando recarga" name="navmesh_btn_sending" tool_tip="Enviando la solicitud de recarga al servidor."/> - <button label="La región se está recargando" name="navmesh_btn_baking" tool_tip="La región se está recargando. Este botón desaparecerá cuando finalice la recarga."/> -</panel> diff --git a/indra/newview/skins/default/xui/fr/panel_navmesh_rebake.xml b/indra/newview/skins/default/xui/fr/panel_navmesh_rebake.xml deleted file mode 100644 index 7acf092257..0000000000 --- a/indra/newview/skins/default/xui/fr/panel_navmesh_rebake.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_navmesh_rebake"> - <button label="Refiger la région" name="navmesh_btn" tool_tip="Cliquer pour refiger le maillage de navigation de la région."/> - <button label="Demande consistant à refiger la région en cours..." name="navmesh_btn_sending" tool_tip="Envoi de la demande consistant à refiger la région au serveur..."/> - <button label="La région se refige..." name="navmesh_btn_baking" tool_tip="La région se refige. Ce bouton disparaîtra lorsque le processus sera terminé."/> -</panel> diff --git a/indra/newview/skins/default/xui/it/panel_navmesh_rebake.xml b/indra/newview/skins/default/xui/it/panel_navmesh_rebake.xml deleted file mode 100644 index 432754076a..0000000000 --- a/indra/newview/skins/default/xui/it/panel_navmesh_rebake.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_navmesh_rebake"> - <button label="Rebake regione" name="navmesh_btn" tool_tip="Fai clic per eseguire rebake sul navmesh della regione"/> - <button label="Richiesta rebake" name="navmesh_btn_sending" tool_tip="Invio richiesta rebake al server."/> - <button label="Rebake regione in corso" name="navmesh_btn_baking" tool_tip="Rebake della regione in corso. Al termine, questo pulsante non sarà più visibile."/> -</panel> diff --git a/indra/newview/skins/default/xui/ja/panel_navmesh_rebake.xml b/indra/newview/skins/default/xui/ja/panel_navmesh_rebake.xml deleted file mode 100644 index ea3ec32424..0000000000 --- a/indra/newview/skins/default/xui/ja/panel_navmesh_rebake.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_navmesh_rebake"> - <button label="地域の再構築" name="navmesh_btn" tool_tip="クリックしてこの地域のナビメッシュを再構築します。"/> - <button label="再構築をリクエスト中" name="navmesh_btn_sending" tool_tip="再構築リクエストをサーバーに送信しています。"/> - <button label="地域(リージョン)を再構築中" name="navmesh_btn_baking" tool_tip="地域を再構築しています。完了すると、このボタンは消えます。"/> -</panel> diff --git a/indra/newview/skins/default/xui/pt/panel_navmesh_rebake.xml b/indra/newview/skins/default/xui/pt/panel_navmesh_rebake.xml deleted file mode 100644 index aa885ae031..0000000000 --- a/indra/newview/skins/default/xui/pt/panel_navmesh_rebake.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_navmesh_rebake"> - <button label="Recarregar região" name="navmesh_btn" tool_tip="Clique para recarregar o navmesh da região."/> - <button label="Solicitando recarregamento" name="navmesh_btn_sending" tool_tip="Enviando solicitação de recarregamento para o servidor."/> - <button label="A região está recarregando" name="navmesh_btn_baking" tool_tip="A região está sendo recarregada. Este botão desaparecerá após a conclusão."/> -</panel> diff --git a/indra/newview/skins/default/xui/ru/panel_navmesh_rebake.xml b/indra/newview/skins/default/xui/ru/panel_navmesh_rebake.xml deleted file mode 100644 index fdc374a024..0000000000 --- a/indra/newview/skins/default/xui/ru/panel_navmesh_rebake.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_navmesh_rebake"> - <button label="Восстановить регион" name="navmesh_btn" tool_tip="Восстановить навигационную сетку региона."/> - <button label="Запрос на восстановление" name="navmesh_btn_sending" tool_tip="Отправка запроса на восстановление на сервер."/> - <button label="Идет восстановление региона" name="navmesh_btn_baking" tool_tip="Идет восстановление региона. Когда оно завершится, эта кнопка исчезнет."/> -</panel> diff --git a/indra/newview/skins/default/xui/tr/panel_navmesh_rebake.xml b/indra/newview/skins/default/xui/tr/panel_navmesh_rebake.xml deleted file mode 100644 index 78cb8bcc02..0000000000 --- a/indra/newview/skins/default/xui/tr/panel_navmesh_rebake.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_navmesh_rebake"> - <button label="Bölgeyi yeniden kaydet" name="navmesh_btn" tool_tip="Bölgenin navigasyon örgüsünü tekrar kaydetmek için tıkla."/> - <button label="Yeniden kaydetme talep ediliyor" name="navmesh_btn_sending" tool_tip="Yeniden kaydetme talebi sunucuya gönderiliyor."/> - <button label="Bölge yeniden kaydediliyor" name="navmesh_btn_baking" tool_tip="Bölge yeniden kaydediliyor. Tamamlandığında bu düğme kaybolacak."/> -</panel> diff --git a/indra/newview/tests/lldir_stub.cpp b/indra/newview/tests/lldir_stub.cpp index 3c0a4377d8..2bc6772d86 100644 --- a/indra/newview/tests/lldir_stub.cpp +++ b/indra/newview/tests/lldir_stub.cpp @@ -48,7 +48,7 @@ public: /*virtual*/ U32 countFilesInDir(const std::string &dirname, const std::string &mask) { return 42; } /*virtual*/ BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap) { fname = fname + "_NEXT"; return false; } /*virtual*/ void getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname) { fname = "RANDOM_FILE"; } - /*virtual*/ BOOL fileExists(const std::string &filename) const { return false; } + /*virtual*/ bool fileExists(const std::string &filename) const { return false; } }; LLDir_stub gDirUtil; diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 86f978faf1..ea75d4f4f6 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1065,12 +1065,12 @@ class Linux_i686Manifest(LinuxManifest): self.path("libaprutil-1.so") self.path("libaprutil-1.so.0") self.path("libaprutil-1.so.0.4.1") - self.path("libboost_program_options-mt.so.1.48.0") - self.path("libboost_regex-mt.so.1.48.0") - self.path("libboost_thread-mt.so.1.48.0") - self.path("libboost_filesystem-mt.so.1.48.0") - self.path("libboost_signals-mt.so.1.48.0") - self.path("libboost_system-mt.so.1.48.0") + self.path("libboost_program_options-mt.so.*") + self.path("libboost_regex-mt.so.*") + self.path("libboost_thread-mt.so.*") + self.path("libboost_filesystem-mt.so.*") + self.path("libboost_signals-mt.so.*") + self.path("libboost_system-mt.so.*") self.path("libbreakpad_client.so.0.0.0") self.path("libbreakpad_client.so.0") self.path("libbreakpad_client.so") |