diff options
author | Matthew Breindel (Falcon) <falcon@lindenlab.com> | 2012-06-15 00:28:12 +0000 |
---|---|---|
committer | Matthew Breindel (Falcon) <falcon@lindenlab.com> | 2012-06-15 00:28:12 +0000 |
commit | e76fe073df81d4fd2b25d09f7c0ccd0566c2e966 (patch) | |
tree | b9270197dc7b0c6bc06f0ea44c991d5cbf9be865 /indra/newview | |
parent | 8b2ad982d72ade6db7ae45758171fa7b5e30a42a (diff) | |
parent | f6153ab73508ad972827950e0276dfd2a8e79bf1 (diff) |
Merge
Diffstat (limited to 'indra/newview')
50 files changed, 546 insertions, 1181 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index f2486adab3..cb269fdfc1 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -218,7 +218,6 @@ set(viewer_SOURCE_FILES llfloaterobjectweights.cpp llfloateropenobject.cpp llfloateroutbox.cpp - llfloaterpathfindingbasic.cpp llfloaterpathfindingcharacters.cpp llfloaterpathfindingconsole.cpp llfloaterpathfindinglinksets.cpp @@ -384,6 +383,7 @@ set(viewer_SOURCE_FILES llpanelmediasettingspermissions.cpp llpanelmediasettingssecurity.cpp llpanelme.cpp + llpanelnavmeshrebake.cpp llpanelnearbymedia.cpp llpanelobject.cpp llpanelobjectinventory.cpp @@ -790,7 +790,6 @@ set(viewer_HEADER_FILES llfloaterobjectweights.h llfloateropenobject.h llfloateroutbox.h - llfloaterpathfindingbasic.h llfloaterpathfindingcharacters.h llfloaterpathfindingconsole.h llfloaterpathfindinglinksets.h @@ -950,6 +949,7 @@ set(viewer_HEADER_FILES llpanelmediasettingspermissions.h llpanelmediasettingssecurity.h llpanelme.h + llpanelnavmeshrebake.h llpanelnearbymedia.h llpanelobject.h llpanelobjectinventory.h diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index ff4d9ceb93..cb6bdc627f 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -157,16 +157,6 @@ is_running_function="Floater.IsOpen" is_running_parameters="people" /> - <command name="pathfinding_basic" - available_in_toybox="false" - icon="Command_PF_Basic_Icon" - label_ref="Command_PF_Basic_Label" - tooltip_ref="Command_PF_Basic_Tooltip" - execute_function="Floater.ToggleOrBringToFront" - execute_parameters="pathfinding_basic" - is_running_function="Floater.IsOpen" - is_running_parameters="pathfinding_basic" - /> <command name="pathfinding_console" available_in_toybox="false" icon="Command_Pathfinding_Icon" diff --git a/indra/newview/llfloaterpathfindingbasic.cpp b/indra/newview/llfloaterpathfindingbasic.cpp deleted file mode 100644 index 40752352ea..0000000000 --- a/indra/newview/llfloaterpathfindingbasic.cpp +++ /dev/null @@ -1,167 +0,0 @@ -/** -* @file llfloaterpathfindingbasic.cpp -* @author William Todd Stinson -* @brief "Pathfinding basic" floater, allowing for basic freezing and unfreezing of the pathfinding avatar mode. -* -* $LicenseInfo:firstyear=2002&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2010, 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 "llfloaterpathfindingbasic.h" -#include "llsd.h" -#include "lltextbase.h" -#include "llbutton.h" -#include "llpathfindingmanager.h" - -#include <boost/bind.hpp> - -//--------------------------------------------------------------------------- -// LLFloaterPathfindingBasic -//--------------------------------------------------------------------------- - -BOOL LLFloaterPathfindingBasic::postBuild() -{ - mStatusText = findChild<LLTextBase>("status_label"); - llassert(mStatusText != NULL); - - mUnfreezeLabel = findChild<LLTextBase>("unfreeze_label"); - llassert(mUnfreezeLabel != NULL); - - mUnfreezeButton = findChild<LLButton>("enter_unfrozen_mode"); - llassert(mUnfreezeButton != NULL); - mUnfreezeButton->setCommitCallback(boost::bind(&LLFloaterPathfindingBasic::onUnfreezeClicked, this)); - - mFreezeLabel = findChild<LLTextBase>("freeze_label"); - llassert(mFreezeLabel != NULL); - - mFreezeButton = findChild<LLButton>("enter_frozen_mode"); - llassert(mFreezeButton != NULL); - mFreezeButton->setCommitCallback(boost::bind(&LLFloaterPathfindingBasic::onFreezeClicked, this)); - - return LLFloater::postBuild(); -} - -void LLFloaterPathfindingBasic::onOpen(const LLSD& pKey) -{ - LLFloater::onOpen(pKey); - - if (!mAgentStateSlot.connected()) - { - mAgentStateSlot = LLPathfindingManager::getInstance()->registerAgentStateListener(boost::bind(&LLFloaterPathfindingBasic::onAgentStateCB, this, _1)); - } - setAgentState(LLPathfindingManager::getInstance()->getAgentState()); -} - -void LLFloaterPathfindingBasic::onClose(bool pIsAppQuitting) -{ - if (mAgentStateSlot.connected()) - { - mAgentStateSlot.disconnect(); - } - - LLFloater::onClose(pIsAppQuitting); -} - -LLFloaterPathfindingBasic::LLFloaterPathfindingBasic(const LLSD& pSeed) - : LLFloater(pSeed), - mStatusText(NULL), - mUnfreezeLabel(NULL), - mUnfreezeButton(NULL), - mFreezeLabel(NULL), - mFreezeButton(NULL), - mAgentStateSlot() -{ -} - -LLFloaterPathfindingBasic::~LLFloaterPathfindingBasic() -{ -} - -void LLFloaterPathfindingBasic::onUnfreezeClicked() -{ - mUnfreezeButton->setEnabled(FALSE); - LLPathfindingManager::getInstance()->requestSetAgentState(LLPathfindingManager::kAgentStateUnfrozen); -} - -void LLFloaterPathfindingBasic::onFreezeClicked() -{ - mUnfreezeButton->setEnabled(FALSE); - LLPathfindingManager::getInstance()->requestSetAgentState(LLPathfindingManager::kAgentStateFrozen); -} - -void LLFloaterPathfindingBasic::onAgentStateCB(LLPathfindingManager::EAgentState pAgentState) -{ - setAgentState(pAgentState); -} - -void LLFloaterPathfindingBasic::setAgentState(LLPathfindingManager::EAgentState pAgentState) -{ - static const LLColor4 errorColor = LLUIColorTable::instance().getColor("PathfindingErrorColor"); - LLStyle::Params styleParams; - - switch (pAgentState) - { - case LLPathfindingManager::kAgentStateUnknown : - mStatusText->setVisible(TRUE); - mStatusText->setText((LLStringExplicit)getString("status_querying_state"), styleParams); - break; - case LLPathfindingManager::kAgentStateNotEnabled : - mStatusText->setVisible(TRUE); - styleParams.color = errorColor; - mStatusText->setText((LLStringExplicit)getString("status_pathfinding_not_enabled"), styleParams); - break; - case LLPathfindingManager::kAgentStateError : - mStatusText->setVisible(TRUE); - styleParams.color = errorColor; - mStatusText->setText((LLStringExplicit)getString("status_unable_to_change_state"), styleParams); - break; - default : - mStatusText->setVisible(FALSE); - break; - } - - switch (LLPathfindingManager::getInstance()->getLastKnownNonErrorAgentState()) - { - case LLPathfindingManager::kAgentStateUnknown : - case LLPathfindingManager::kAgentStateNotEnabled : - mUnfreezeLabel->setEnabled(FALSE); - mUnfreezeButton->setEnabled(FALSE); - mFreezeLabel->setEnabled(FALSE); - mFreezeButton->setEnabled(FALSE); - break; - case LLPathfindingManager::kAgentStateFrozen : - mUnfreezeLabel->setEnabled(TRUE); - mUnfreezeButton->setEnabled(TRUE); - mFreezeLabel->setEnabled(FALSE); - mFreezeButton->setEnabled(FALSE); - break; - case LLPathfindingManager::kAgentStateUnfrozen : - mUnfreezeLabel->setEnabled(FALSE); - mUnfreezeButton->setEnabled(FALSE); - mFreezeLabel->setEnabled(TRUE); - mFreezeButton->setEnabled(TRUE); - break; - default : - llassert(0); - break; - } -} diff --git a/indra/newview/llfloaterpathfindingbasic.h b/indra/newview/llfloaterpathfindingbasic.h deleted file mode 100644 index 286985c022..0000000000 --- a/indra/newview/llfloaterpathfindingbasic.h +++ /dev/null @@ -1,71 +0,0 @@ -/** - * @file llfloaterpathfindingbasic.h - * @author William Todd Stinson - * @brief "Pathfinding basic" floater, allowing for basic freezing and unfreezing of the pathfinding avatar mode. - * - * $LicenseInfo:firstyear=2002&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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$ - */ - -#ifndef LL_LLFLOATERPATHFINDINGBASIC_H -#define LL_LLFLOATERPATHFINDINGBASIC_H - -#include "llfloater.h" -#include "llpathfindingmanager.h" - -class LLSD; -class LLTextBase; -class LLButton; - -class LLFloaterPathfindingBasic -: public LLFloater -{ - friend class LLFloaterReg; - -public: - virtual BOOL postBuild(); - virtual void onOpen(const LLSD& pKey); - virtual void onClose(bool pIsAppQuitting); - -protected: - -private: - // Does its own instance management, so clients not allowed - // to allocate or destroy. - LLFloaterPathfindingBasic(const LLSD& pSeed); - virtual ~LLFloaterPathfindingBasic(); - - void onUnfreezeClicked(); - void onFreezeClicked(); - - void onAgentStateCB(LLPathfindingManager::EAgentState pAgentState); - - void setAgentState(LLPathfindingManager::EAgentState pAgentState); - - LLTextBase *mStatusText; - LLTextBase *mUnfreezeLabel; - LLButton *mUnfreezeButton; - LLTextBase *mFreezeLabel; - LLButton *mFreezeButton; - LLPathfindingManager::agent_state_slot_t mAgentStateSlot; -}; - -#endif // LL_LLFLOATERPATHFINDINGBASIC_H diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index 54e60ce0f4..7d3efb5454 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -51,6 +51,7 @@ #include "pipeline.h" #include "llpathinglib.h" #include "llviewerparcelmgr.h" +#include "llpanelnavmeshrebake.h" #define XUI_RENDER_HEATMAP_NONE 0 #define XUI_RENDER_HEATMAP_A 1 @@ -64,9 +65,6 @@ #define XUI_CHARACTER_TYPE_C 3 #define XUI_CHARACTER_TYPE_D 4 -#define XUI_EDIT_TAB_INDEX 0 -#define XUI_TEST_TAB_INDEX 1 - #define SET_SHAPE_RENDER_FLAG(_flag,_type) _flag |= (1U << _type) #define CONTROL_NAME_RETRIEVE_NEIGHBOR "RetrieveNeighboringRegion" @@ -138,37 +136,9 @@ BOOL LLFloaterPathfindingConsole::postBuild() llassert(mViewCharactersButton != NULL); mViewCharactersButton->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onViewCharactersClicked, this)); - mEditTestTabContainer = findChild<LLTabContainer>("edit_test_tab_container"); - llassert(mEditTestTabContainer != NULL); - mEditTestTabContainer->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onTabSwitch, this)); - - mEditTab = findChild<LLPanel>("edit_panel"); - llassert(mEditTab != NULL); - mTestTab = findChild<LLPanel>("test_panel"); llassert(mTestTab != NULL); - mUnfreezeLabel = findChild<LLTextBase>("unfreeze_label"); - llassert(mUnfreezeLabel != NULL); - - mUnfreezeButton = findChild<LLButton>("enter_unfrozen_mode"); - llassert(mUnfreezeButton != NULL); - mUnfreezeButton->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onUnfreezeClicked, this)); - - mLinksetsLabel = findChild<LLTextBase>("edit_linksets_label"); - llassert(mLinksetsLabel != NULL); - - mLinksetsButton = findChild<LLButton>("view_and_edit_linksets"); - llassert(mLinksetsButton != NULL); - mLinksetsButton->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onViewEditLinksetClicked, this)); - - mFreezeLabel = findChild<LLTextBase>("freeze_label"); - llassert(mFreezeLabel != NULL); - - mFreezeButton = findChild<LLButton>("enter_frozen_mode"); - llassert(mFreezeButton != NULL); - mFreezeButton->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onFreezeClicked, this)); - mPathfindingViewerStatus = findChild<LLTextBase>("pathfinding_viewer_status"); llassert(mPathfindingViewerStatus != NULL); @@ -205,11 +175,6 @@ BOOL LLFloaterPathfindingConsole::postBuild() llassert(mClearPathButton != NULL); mClearPathButton->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onClearPathClicked, this)); - if (LLPathingLib::getInstance() == NULL) - { - LLPathingLib::initSystem(); - } - if (LLPathingLib::getInstance() != NULL) { mPathfindingToolset = new LLToolset(); @@ -246,11 +211,6 @@ void LLFloaterPathfindingConsole::onOpen(const LLSD& pKey) fillInColorsForNavMeshVisualization(); } - if (!mAgentStateSlot.connected()) - { - mAgentStateSlot = LLPathfindingManager::getInstance()->registerAgentStateListener(boost::bind(&LLFloaterPathfindingConsole::onAgentStateCB, this, _1)); - } - if (!mRegionBoundarySlot.connected()) { mRegionBoundarySlot = LLEnvManagerNew::instance().setRegionChangeCallback(boost::bind(&LLFloaterPathfindingConsole::onRegionBoundaryCross, this)); @@ -266,14 +226,10 @@ void LLFloaterPathfindingConsole::onOpen(const LLSD& pKey) mPathEventSlot = LLPathfindingPathTool::getInstance()->registerPathEventListener(boost::bind(&LLFloaterPathfindingConsole::onPathEvent, this)); } - setAgentState(LLPathfindingManager::getInstance()->getAgentState()); setDefaultInputs(); updatePathTestStatus(); - if (mEditTestTabContainer->getCurrentPanelIndex() == XUI_TEST_TAB_INDEX) - { - switchIntoTestPathMode(); - } + switchIntoTestPathMode(); } void LLFloaterPathfindingConsole::onClose(bool pIsAppQuitting) @@ -295,11 +251,6 @@ void LLFloaterPathfindingConsole::onClose(bool pIsAppQuitting) mRegionBoundarySlot.disconnect(); } - if (mAgentStateSlot.connected()) - { - mAgentStateSlot.disconnect(); - } - if (mNavMeshZoneSlot.connected()) { mNavMeshZoneSlot.disconnect(); @@ -314,6 +265,9 @@ void LLFloaterPathfindingConsole::onClose(bool pIsAppQuitting) setDefaultInputs(); setConsoleState(kConsoleStateUnknown); cleanupRenderableRestoreItems(); + LLPanelNavMeshRebake* pPanelNavMeshRebake = LLPanelNavMeshRebake::getInstance(); + if ( pPanelNavMeshRebake ) { pPanelNavMeshRebake->setVisible( FALSE ); } + LLFloater::onClose(pIsAppQuitting); } @@ -501,15 +455,7 @@ LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& pSeed) mPathfindingViewerStatus(NULL), mPathfindingSimulatorStatus(NULL), mViewCharactersButton(NULL), - mEditTestTabContainer(NULL), - mEditTab(NULL), mTestTab(NULL), - mUnfreezeLabel(NULL), - mUnfreezeButton(NULL), - mLinksetsLabel(NULL), - mLinksetsButton(NULL), - mFreezeLabel(NULL), - mFreezeButton(NULL), mCtrlClickLabel(), mShiftClickLabel(), mCharacterWidthLabel(), @@ -522,7 +468,6 @@ LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& pSeed) mNavMeshZoneSlot(), mNavMeshZone(), mIsNavMeshUpdating(false), - mAgentStateSlot(), mRegionBoundarySlot(), mTeleportFailedSlot(), mPathEventSlot(), @@ -577,35 +522,6 @@ void LLFloaterPathfindingConsole::onViewCharactersClicked() LLFloaterPathfindingCharacters::openCharactersViewer(); } -void LLFloaterPathfindingConsole::onTabSwitch() -{ - if (mEditTestTabContainer->getCurrentPanelIndex() == XUI_TEST_TAB_INDEX) - { - switchIntoTestPathMode(); - } - else - { - switchOutOfTestPathMode(); - } -} - -void LLFloaterPathfindingConsole::onUnfreezeClicked() -{ - mUnfreezeButton->setEnabled(FALSE); - LLPathfindingManager::getInstance()->requestSetAgentState(LLPathfindingManager::kAgentStateUnfrozen); -} - -void LLFloaterPathfindingConsole::onFreezeClicked() -{ - mFreezeButton->setEnabled(FALSE); - LLPathfindingManager::getInstance()->requestSetAgentState(LLPathfindingManager::kAgentStateFrozen); -} - -void LLFloaterPathfindingConsole::onViewEditLinksetClicked() -{ - LLFloaterPathfindingLinksets::openLinksetsEditor(); -} - void LLFloaterPathfindingConsole::onCharacterWidthSet() { updateCharacterWidth(); @@ -658,11 +574,6 @@ void LLFloaterPathfindingConsole::onNavMeshZoneCB(LLPathfindingNavMeshZone::ENav } } -void LLFloaterPathfindingConsole::onAgentStateCB(LLPathfindingManager::EAgentState pAgentState) -{ - setAgentState(pAgentState); -} - void LLFloaterPathfindingConsole::onRegionBoundaryCross() { initializeNavMeshZoneForCurrentRegion(); @@ -706,7 +617,6 @@ void LLFloaterPathfindingConsole::onPathEvent() void LLFloaterPathfindingConsole::setDefaultInputs() { - mEditTestTabContainer->selectTab(XUI_EDIT_TAB_INDEX); setRenderWorld(TRUE); setRenderNavMesh(FALSE); setRenderWalkables(FALSE); @@ -776,7 +686,6 @@ void LLFloaterPathfindingConsole::updateControlsOnConsoleState() mShowRenderWaterPlaneCheckBox->setEnabled(FALSE); mShowXRayCheckBox->setEnabled(FALSE); mViewCharactersButton->setEnabled(FALSE); - mEditTestTabContainer->selectTab(0); mTestTab->setEnabled(FALSE); mCtrlClickLabel->setEnabled(FALSE); mShiftClickLabel->setEnabled(FALSE); @@ -802,7 +711,6 @@ void LLFloaterPathfindingConsole::updateControlsOnConsoleState() mShowRenderWaterPlaneCheckBox->setEnabled(FALSE); mShowXRayCheckBox->setEnabled(FALSE); mViewCharactersButton->setEnabled(TRUE); - mEditTestTabContainer->selectTab(0); mTestTab->setEnabled(FALSE); mCtrlClickLabel->setEnabled(FALSE); mShiftClickLabel->setEnabled(FALSE); @@ -830,7 +738,6 @@ void LLFloaterPathfindingConsole::updateControlsOnConsoleState() mShowRenderWaterPlaneCheckBox->setEnabled(FALSE); mShowXRayCheckBox->setEnabled(FALSE); mViewCharactersButton->setEnabled(TRUE); - mEditTestTabContainer->selectTab(0); mTestTab->setEnabled(FALSE); mCtrlClickLabel->setEnabled(FALSE); mShiftClickLabel->setEnabled(FALSE); @@ -944,39 +851,6 @@ std::string LLFloaterPathfindingConsole::getSimulatorStatusText() const { std::string simulatorStatusText(""); -#ifdef DEPRECATED_UNVERSIONED_NAVMESH - if (LLPathfindingManager::getInstance()->isPathfindingNavMeshVersioningEnabledForCurrentRegionXXX()) - { - switch (mNavMeshZone.getNavMeshZoneStatus()) - { - case LLPathfindingNavMeshZone::kNavMeshZonePending : - simulatorStatusText = getString("navmesh_simulator_status_pending"); - break; - case LLPathfindingNavMeshZone::kNavMeshZoneBuilding : - simulatorStatusText = getString("navmesh_simulator_status_building"); - break; - case LLPathfindingNavMeshZone::kNavMeshZoneSomePending : - simulatorStatusText = getString("navmesh_simulator_status_some_pending"); - break; - case LLPathfindingNavMeshZone::kNavMeshZoneSomeBuilding : - simulatorStatusText = getString("navmesh_simulator_status_some_building"); - break; - case LLPathfindingNavMeshZone::kNavMeshZonePendingAndBuilding : - simulatorStatusText = getString("navmesh_simulator_status_pending_and_building"); - break; - case LLPathfindingNavMeshZone::kNavMeshZoneComplete : - simulatorStatusText = getString("navmesh_simulator_status_complete"); - break; - default : - simulatorStatusText = getString("navmesh_simulator_status_unknown"); - break; - } - } - else - { - simulatorStatusText = getString("navmesh_simulator_status_region_not_enabled"); - } -#else // DEPRECATED_UNVERSIONED_NAVMESH switch (mNavMeshZone.getNavMeshZoneStatus()) { case LLPathfindingNavMeshZone::kNavMeshZonePending : @@ -1001,7 +875,6 @@ std::string LLFloaterPathfindingConsole::getSimulatorStatusText() const simulatorStatusText = getString("navmesh_simulator_status_unknown"); break; } -#endif // DEPRECATED_UNVERSIONED_NAVMESH return simulatorStatusText; } @@ -1028,44 +901,6 @@ void LLFloaterPathfindingConsole::cleanupRenderableRestoreItems() } } -void LLFloaterPathfindingConsole::setAgentState(LLPathfindingManager::EAgentState pAgentState) -{ - switch (LLPathfindingManager::getInstance()->getLastKnownNonErrorAgentState()) - { - case LLPathfindingManager::kAgentStateUnknown : - case LLPathfindingManager::kAgentStateNotEnabled : - mEditTab->setEnabled(FALSE); - mUnfreezeLabel->setEnabled(FALSE); - mUnfreezeButton->setEnabled(FALSE); - mLinksetsLabel->setEnabled(FALSE); - mLinksetsButton->setEnabled(FALSE); - mFreezeLabel->setEnabled(FALSE); - mFreezeButton->setEnabled(FALSE); - break; - case LLPathfindingManager::kAgentStateFrozen : - mEditTab->setEnabled(TRUE); - mUnfreezeLabel->setEnabled(TRUE); - mUnfreezeButton->setEnabled(TRUE); - mLinksetsLabel->setEnabled(FALSE); - mLinksetsButton->setEnabled(FALSE); - mFreezeLabel->setEnabled(FALSE); - mFreezeButton->setEnabled(FALSE); - break; - case LLPathfindingManager::kAgentStateUnfrozen : - mEditTab->setEnabled(TRUE); - mUnfreezeLabel->setEnabled(FALSE); - mUnfreezeButton->setEnabled(FALSE); - mLinksetsLabel->setEnabled(TRUE); - mLinksetsButton->setEnabled(TRUE); - mFreezeLabel->setEnabled(TRUE); - mFreezeButton->setEnabled(TRUE); - break; - default : - llassert(0); - break; - } -} - void LLFloaterPathfindingConsole::switchIntoTestPathMode() { if (LLPathingLib::getInstance() != NULL) diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h index edbeae2012..2529b241bf 100644 --- a/indra/newview/llfloaterpathfindingconsole.h +++ b/indra/newview/llfloaterpathfindingconsole.h @@ -31,7 +31,6 @@ #include "llfloater.h" #include "llhandle.h" #include "llpathinglib.h" -#include "llpathfindingmanager.h" #include "llpathfindingnavmeshzone.h" #include "llpathfindingpathtool.h" @@ -43,7 +42,6 @@ class LLSliderCtrl; class LLLineEditor; class LLTextBase; class LLCheckBoxCtrl; -class LLTabContainer; class LLComboBox; class LLButton; class LLToolset; @@ -120,16 +118,11 @@ private: void onShowNavMeshSet(); void onShowWalkabilitySet(); void onViewCharactersClicked(); - void onTabSwitch(); - void onUnfreezeClicked(); - void onFreezeClicked(); - void onViewEditLinksetClicked(); void onCharacterWidthSet(); void onCharacterTypeSwitch(); void onClearPathClicked(); void onNavMeshZoneCB(LLPathfindingNavMeshZone::ENavMeshZoneRequestStatus pNavMeshZoneRequestStatus); - void onAgentStateCB(LLPathfindingManager::EAgentState pAgentState); void onRegionBoundaryCross(); void onPathEvent(); @@ -145,8 +138,6 @@ private: void initializeNavMeshZoneForCurrentRegion(); - void setAgentState(LLPathfindingManager::EAgentState pAgentState); - void switchIntoTestPathMode(); void switchOutOfTestPathMode(); void updateCharacterWidth(); @@ -177,15 +168,7 @@ private: LLTextBase *mPathfindingViewerStatus; LLTextBase *mPathfindingSimulatorStatus; LLButton *mViewCharactersButton; - LLTabContainer *mEditTestTabContainer; - LLPanel *mEditTab; LLPanel *mTestTab; - LLTextBase *mUnfreezeLabel; - LLButton *mUnfreezeButton; - LLTextBase *mLinksetsLabel; - LLButton *mLinksetsButton; - LLTextBase *mFreezeLabel; - LLButton *mFreezeButton; LLTextBase *mCtrlClickLabel; LLTextBase *mShiftClickLabel; LLTextBase *mCharacterWidthLabel; @@ -200,7 +183,6 @@ private: LLPathfindingNavMeshZone mNavMeshZone; bool mIsNavMeshUpdating; - LLPathfindingManager::agent_state_slot_t mAgentStateSlot; boost::signals2::connection mRegionBoundarySlot; boost::signals2::connection mTeleportFailedSlot; LLPathfindingPathTool::path_event_slot_t mPathEventSlot; diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp index 1d7f165ad9..8488ee1aa3 100644 --- a/indra/newview/llfloaterpathfindinglinksets.cpp +++ b/indra/newview/llfloaterpathfindinglinksets.cpp @@ -60,26 +60,6 @@ // LLFloaterPathfindingLinksets //--------------------------------------------------------------------------- -void LLFloaterPathfindingLinksets::onOpen(const LLSD& pKey) -{ - LLFloaterPathfindingObjects::onOpen(pKey); - - if (!mAgentStateSlot.connected()) - { - mAgentStateSlot = LLPathfindingManager::getInstance()->registerAgentStateListener(boost::bind(&LLFloaterPathfindingLinksets::onAgentStateChange, this, _1)); - } -} - -void LLFloaterPathfindingLinksets::onClose(bool pIsAppQuitting) -{ - if (mAgentStateSlot.connected()) - { - mAgentStateSlot.disconnect(); - } - - LLFloaterPathfindingObjects::onClose(pIsAppQuitting); -} - void LLFloaterPathfindingLinksets::openLinksetsEditor() { LLFloaterReg::toggleInstanceOrBringToFront("pathfinding_linksets"); @@ -107,8 +87,7 @@ LLFloaterPathfindingLinksets::LLFloaterPathfindingLinksets(const LLSD& pSeed) mLabelEditD(NULL), mEditD(NULL), mApplyEditsButton(NULL), - mBeaconColor(), - mAgentStateSlot() + mBeaconColor() { } @@ -337,11 +316,6 @@ void LLFloaterPathfindingLinksets::onApplyChangesClicked() applyEdit(); } -void LLFloaterPathfindingLinksets::onAgentStateChange(LLPathfindingManager::EAgentState pAgentState) -{ - updateControls(); -} - void LLFloaterPathfindingLinksets::applyFilters() { rebuildObjectsScrollList(); @@ -530,7 +504,7 @@ bool LLFloaterPathfindingLinksets::isShowCannotBeVolumeWarning(LLPathfindingLink void LLFloaterPathfindingLinksets::updateStateOnEditFields() { int numSelectedItems = getNumSelectedObjects(); - bool isEditEnabled = ((numSelectedItems > 0) && LLPathfindingManager::getInstance()->isAllowAlterPermanent()); + bool isEditEnabled = (numSelectedItems > 0); mEditLinksetUse->setEnabled(isEditEnabled); diff --git a/indra/newview/llfloaterpathfindinglinksets.h b/indra/newview/llfloaterpathfindinglinksets.h index 4b19f09cda..8c464dc1d5 100644 --- a/indra/newview/llfloaterpathfindinglinksets.h +++ b/indra/newview/llfloaterpathfindinglinksets.h @@ -46,10 +46,6 @@ class LLVector3; class LLFloaterPathfindingLinksets : public LLFloaterPathfindingObjects { public: - - virtual void onOpen(const LLSD& pKey); - virtual void onClose(bool pIsAppQuitting); - static void openLinksetsEditor(); protected: @@ -78,7 +74,6 @@ private: void onClearFiltersClicked(); void onWalkabilityCoefficientEntered(LLUICtrl *pUICtrl); void onApplyChangesClicked(); - void onAgentStateChange(LLPathfindingManager::EAgentState pAgentState); void applyFilters(); void clearFilters(); @@ -131,8 +126,6 @@ private: LLButton *mApplyEditsButton; LLColor4 mBeaconColor; - - LLPathfindingManager::agent_state_slot_t mAgentStateSlot; }; #endif // LL_LLFLOATERPATHFINDINGLINKSETS_H diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index c8599df161..105636364c 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -1198,7 +1198,10 @@ void LLFloaterTools::getMediaState() return; } - bool editable = (first_object->permModify() || selectedMediaEditable()); + BOOL is_nonpermanent = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() + && LLSelectMgr::getInstance()->selectGetRootsNonPermanent()) + || LLSelectMgr::getInstance()->selectGetNonPermanent(); + bool editable = is_nonpermanent && (first_object->permModify() || selectedMediaEditable()); // Check modify permissions and whether any selected objects are in // the process of being fetched. If they are, then we're not editable diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 025181ead5..db7371d993 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -191,7 +191,8 @@ LLLocationInputCtrl::Params::Params() damage_icon("damage_icon"), damage_text("damage_text"), see_avatars_icon("see_avatars_icon"), - maturity_help_topic("maturity_help_topic") + maturity_help_topic("maturity_help_topic"), + pathfinding_dynamic_icon("pathfinding_dynamic_icon") { } @@ -270,7 +271,7 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) if (p.icon_maturity_general()) { mIconMaturityGeneral = p.icon_maturity_general; - } + } if (p.icon_maturity_adult()) { mIconMaturityAdult = p.icon_maturity_adult; @@ -279,7 +280,7 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) { mIconMaturityModerate = p.icon_maturity_moderate; } - + LLButton::Params maturity_button = p.maturity_button; mMaturityButton = LLUICtrlFactory::create<LLButton>(maturity_button); addChild(mMaturityButton); @@ -336,7 +337,14 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) mParcelIcon[DAMAGE_ICON] = LLUICtrlFactory::create<LLIconCtrl>(damage_icon); mParcelIcon[DAMAGE_ICON]->setMouseDownCallback(boost::bind(&LLLocationInputCtrl::onParcelIconClick, this, DAMAGE_ICON)); addChild(mParcelIcon[DAMAGE_ICON]); - + + LLIconCtrl::Params pathfinding_dynamic_icon = p.pathfinding_dynamic_icon; + pathfinding_dynamic_icon.tool_tip = LLTrans::getString("PathfindingDynamicTooltip"); + pathfinding_dynamic_icon.mouse_opaque = true; + mParcelIcon[PATHFINDING_DYNAMIC_ICON] = LLUICtrlFactory::create<LLIconCtrl>(pathfinding_dynamic_icon); + mParcelIcon[PATHFINDING_DYNAMIC_ICON]->setMouseDownCallback(boost::bind(&LLLocationInputCtrl::onParcelIconClick, this, PATHFINDING_DYNAMIC_ICON)); + addChild(mParcelIcon[PATHFINDING_DYNAMIC_ICON]); + LLTextBox::Params damage_text = p.damage_text; damage_text.tool_tip = LLTrans::getString("LocationCtrlDamageTooltip"); damage_text.mouse_opaque = true; @@ -819,6 +827,7 @@ void LLLocationInputCtrl::refreshParcelIcons() bool allow_scripts = vpm->allowAgentScripts(agent_region, current_parcel); bool allow_damage = vpm->allowAgentDamage(agent_region, current_parcel); bool see_avs = current_parcel->getSeeAVs(); + bool pathfinding_dynamic = gAgent.getRegion()->dynamicPathfindingEnabled(); // Most icons are "block this ability" mParcelIcon[VOICE_ICON]->setVisible( !allow_voice ); @@ -827,6 +836,8 @@ void LLLocationInputCtrl::refreshParcelIcons() mParcelIcon[BUILD_ICON]->setVisible( !allow_build ); mParcelIcon[SCRIPTS_ICON]->setVisible( !allow_scripts ); mParcelIcon[DAMAGE_ICON]->setVisible( allow_damage ); + mParcelIcon[PATHFINDING_DYNAMIC_ICON]->setVisible( pathfinding_dynamic ); + mDamageText->setVisible(allow_damage); mParcelIcon[SEE_AVATARS_ICON]->setVisible( !see_avs ); @@ -1165,6 +1176,9 @@ void LLLocationInputCtrl::onParcelIconClick(EParcelIcon icon) case BUILD_ICON: LLNotificationsUtil::add("NoBuild"); break; + case PATHFINDING_DYNAMIC_ICON: + LLNotificationsUtil::add("PathfindingDynamic"); + break; case SCRIPTS_ICON: { LLViewerRegion* region = gAgent.getRegion(); diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h index ed47ba73e3..e219d4ac5d 100644 --- a/indra/newview/lllocationinputctrl.h +++ b/indra/newview/lllocationinputctrl.h @@ -78,7 +78,8 @@ public: build_icon, scripts_icon, damage_icon, - see_avatars_icon; + see_avatars_icon, + pathfinding_dynamic_icon; Optional<LLTextBox::Params> damage_text; Params(); }; @@ -116,7 +117,8 @@ private: SCRIPTS_ICON, // 4 DAMAGE_ICON, // 5 SEE_AVATARS_ICON, // 6 - ICON_COUNT // 7 total + PATHFINDING_DYNAMIC_ICON,// 7 + ICON_COUNT // 8 total }; friend class LLUICtrlFactory; @@ -184,6 +186,7 @@ private: LLPointer<LLUIImage> mIconMaturityGeneral; LLPointer<LLUIImage> mIconMaturityAdult; LLPointer<LLUIImage> mIconMaturityModerate; + LLPointer<LLUIImage> mIconPathfindingDynamic; std::string mAddLandmarkTooltip; std::string mEditLandmarkTooltip; diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index a64b4ec94d..77e1487f38 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -116,7 +116,7 @@ void LLPanelContents::getState(LLViewerObject *objectp ) // BUG? Check for all objects being editable? bool editable = gAgent.isGodlike() - || (objectp->permModify() + || (objectp->permModify() && !objectp->isPermanentEnforced() && ( objectp->permYouOwner() || ( !group_id.isNull() && gAgent.isInGroup(group_id) ))); // solves SL-23488 BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); @@ -127,6 +127,8 @@ void LLPanelContents::getState(LLViewerObject *objectp ) ((LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() == 1) || (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1))); + getChildView("button permissions")->setEnabled(!objectp->isPermanentEnforced()); + mPanelInventoryObject->setEnabled(!objectp->isPermanentEnforced()); } void LLPanelContents::refresh() diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 7301b305b2..05d9a32108 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -504,7 +504,7 @@ void LLPanelFace::getState() && objectp->getPCode() == LL_PCODE_VOLUME && objectp->permModify()) { - BOOL editable = objectp->permModify(); + BOOL editable = objectp->permModify() && !objectp->isPermanentEnforced(); // only turn on auto-adjust button if there is a media renderer and the media is loaded getChildView("textbox autofix")->setEnabled(editable); diff --git a/indra/newview/llpanelnavmeshrebake.cpp b/indra/newview/llpanelnavmeshrebake.cpp new file mode 100644 index 0000000000..0f88c6f1d3 --- /dev/null +++ b/indra/newview/llpanelnavmeshrebake.cpp @@ -0,0 +1,120 @@ +/** + * @file LLPanelNavMeshRebake.cpp + * @author prep + * @brief handles the buttons for navmesh rebaking + * + * $LicenseInfo:firstyear=2002&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, 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 "llpathfindingmanager.h" +#include <string> +#include <map> +#include <boost/function.hpp> +#include <boost/signals2.hpp> +#include "llpanelnavmeshrebake.h" +#include "llagent.h" +#include "llhints.h" +#include "lltooltip.h" +#include "llbutton.h" +#include "llpanel.h" + +LLPanelNavMeshRebake::LLPanelNavMeshRebake() +: mNavMeshRebakeButton( NULL ) +, mNavMeshBakingButton( NULL ) +{ + // make sure we have the only instance of this class + static bool b = true; + llassert_always(b); + b=false; +} + +LLPanelNavMeshRebake* LLPanelNavMeshRebake::getInstance() +{ + static LLPanelNavMeshRebake* panel = getPanel(); + return panel; +} + +BOOL LLPanelNavMeshRebake::postBuild() +{ + //Rebake initiated + mNavMeshRebakeButton = getChild<LLButton>("navmesh_btn"); + mNavMeshRebakeButton->setCommitCallback(boost::bind(&LLPanelNavMeshRebake::onNavMeshRebakeClick, this)); + mNavMeshRebakeButton->setVisible( TRUE ); + LLHints::registerHintTarget("navmesh_btn", mNavMeshRebakeButton->getHandle()); + + //Baking... + mNavMeshBakingButton = getChild<LLButton>("navmesh_btn_baking"); + mNavMeshBakingButton->setVisible( FALSE ); + LLHints::registerHintTarget("navmesh_btn_baking", mNavMeshBakingButton->getHandle()); + return TRUE; +} + +void LLPanelNavMeshRebake::setVisible( BOOL visible ) +{ + LLPanel::setVisible(visible); +} + +BOOL LLPanelNavMeshRebake::handleToolTip( S32 x, S32 y, MASK mask ) +{ + LLToolTipMgr::instance().unblockToolTips(); + + if (mNavMeshRebakeButton->getVisible()) + { + LLToolTipMgr::instance().show(mNavMeshRebakeButton->getToolTip()); + } + return LLPanel::handleToolTip(x, y, mask); +} + +void LLPanelNavMeshRebake::reparent( LLView* rootp ) +{ + LLPanel* parent = dynamic_cast<LLPanel*>( getParent() ); + if (!parent) + { + return; + } + rootp->addChild(this); +} + +LLPanelNavMeshRebake* LLPanelNavMeshRebake::getPanel() +{ + LLPanelNavMeshRebake* panel = new LLPanelNavMeshRebake(); + panel->buildFromFile("panel_navmesh_rebake.xml"); + panel->setVisible(FALSE); + //panel->updatePosition(); + return panel; +} + +void LLPanelNavMeshRebake::onNavMeshRebakeClick() +{ + mNavMeshRebakeButton->setVisible( FALSE ); + mNavMeshBakingButton->setVisible( TRUE ); + mNavMeshBakingButton->setForcePressedState( TRUE ); + LLPathfindingManager::getInstance()->triggerNavMeshRebuild(); +} + +void LLPanelNavMeshRebake::resetButtonStates() +{ + mNavMeshRebakeButton->setVisible( TRUE ); + mNavMeshBakingButton->setVisible( FALSE ); +} + diff --git a/indra/newview/llpanelnavmeshrebake.h b/indra/newview/llpanelnavmeshrebake.h new file mode 100644 index 0000000000..4e2381b6d6 --- /dev/null +++ b/indra/newview/llpanelnavmeshrebake.h @@ -0,0 +1,74 @@ +/** + * @file llpanelenavmeshrebake.h + * @author prep + * @brief handles the buttons for navmesh rebaking + * + * $LicenseInfo:firstyear=2002&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, 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$ + */ + +#ifndef LL_NAVMESHREBAKE_H +#define LL_NAVMESHREBAKE_H + + +class LLPanelNavMeshRebake : public LLPanel +{ + + LOG_CLASS(LLPanelNavMeshRebake); + +public: + + typedef enum navmesh_rebake_mode_t + { + NMRM_Visible, + NMRM_Visible_Waiting_Response, + NVRM_Hiddeb + } ESNavMeshRebakeMode; + + void reparent( LLView* rootp ); + void resetButtonStates(); + static LLPanelNavMeshRebake* getInstance(); + + /*virtual*/ BOOL postBuild(); + /*virtual*/ void setVisible( BOOL visible ); + + + /*virtual*/ void draw(){/*updatePosition(); */LLPanel::draw();} + /*virtual*/ BOOL handleToolTip( S32 x, S32 y, MASK mask ); + +protected: + + LLPanelNavMeshRebake(); + +private: + static LLPanelNavMeshRebake* getPanel(); + void onNavMeshRebakeClick(); + //void updatePosition(); + + LLButton* mNavMeshRebakeButton; + LLButton* mNavMeshBakingButton; + + LLHandle<LLPanel> mOriginalParent; + +}; + +#endif //LL_NAVMESHREBAKE_H + diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 0473866ac0..be4ce4700a 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -279,8 +279,6 @@ BOOL LLPanelObject::postBuild() mCtrlSculptInvert = getChild<LLCheckBoxCtrl>("sculpt invert control"); childSetCommitCallback("sculpt invert control", onCommitSculptType, this); - LLPathfindingManager::getInstance()->registerAgentStateListener(boost::bind(&LLPanelObject::handleAgentStateCallback, this)); - // Start with everyone disabled clearCtrls(); @@ -470,9 +468,16 @@ void LLPanelObject::getState( ) getChildView("select_single")->setVisible( TRUE); getChildView("select_single")->setEnabled(TRUE); } + + BOOL is_flexible = volobjp && volobjp->isFlexible(); + BOOL is_permanent = root_objectp->flagObjectPermanent(); + BOOL is_permanent_enforced = root_objectp->isPermanentEnforced(); + BOOL is_character = root_objectp->flagCharacter(); + llassert(!is_permanent || !is_character); // should never have a permanent object that is also a character + // Lock checkbox - only modifiable if you own the object. BOOL self_owned = (gAgent.getID() == owner_id); - mCheckLock->setEnabled( roots_selected > 0 && self_owned ); + mCheckLock->setEnabled( roots_selected > 0 && self_owned && !is_permanent_enforced); // More lock and debit checkbox - get the values BOOL valid; @@ -502,12 +507,6 @@ void LLPanelObject::getState( ) } } - BOOL is_flexible = volobjp && volobjp->isFlexible(); - BOOL is_permanent = root_objectp->flagObjectPermanent(); - BOOL is_permanent_enforced = root_objectp->isPermanentEnforced(); - BOOL is_character = root_objectp->flagCharacter(); - llassert(!is_permanent || !is_character); // should never have a permanent object that is also a character - // Physics checkbox mIsPhysical = root_objectp->flagUsePhysics(); llassert(!is_permanent || !mIsPhysical); // should never have a permanent object that is also physical @@ -515,7 +514,7 @@ void LLPanelObject::getState( ) mCheckPhysics->set( mIsPhysical ); mCheckPhysics->setEnabled( roots_selected>0 && (editable || gAgent.isGodlike()) - && !is_flexible && !is_permanent && !is_character); + && !is_flexible && !is_permanent); mIsTemporary = root_objectp->flagTemporaryOnRez(); llassert(!is_permanent || !mIsTemporary); // should never has a permanent object that is also temporary @@ -1995,11 +1994,6 @@ void LLPanelObject::onCommitSculpt( const LLSD& data ) sendSculpt(); } -void LLPanelObject::handleAgentStateCallback() const -{ - gFloaterTools->dirty(); -} - BOOL LLPanelObject::onDropSculpt(LLInventoryItem* item) { LLTextureCtrl* mTextureCtrl = getChild<LLTextureCtrl>("sculpt texture control"); diff --git a/indra/newview/llpanelobject.h b/indra/newview/llpanelobject.h index 307d63aada..34a19b3dfa 100644 --- a/indra/newview/llpanelobject.h +++ b/indra/newview/llpanelobject.h @@ -75,8 +75,6 @@ public: BOOL onDropSculpt(LLInventoryItem* item); static void onCommitSculptType( LLUICtrl *ctrl, void* userdata); - void handleAgentStateCallback() const; - protected: void getState(); diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index f3a16dbbf1..64481717f5 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -393,7 +393,7 @@ void LLPanelPermissions::refresh() } } - getChildView("button set group")->setEnabled(owners_identical && (mOwnerID == gAgent.getID())); + getChildView("button set group")->setEnabled(owners_identical && (mOwnerID == gAgent.getID()) && is_nonpermanent); getChildView("Name:")->setEnabled(TRUE); LLLineEditor* LineEditorObjectName = getChild<LLLineEditor>("Object Name"); @@ -423,7 +423,7 @@ void LLPanelPermissions::refresh() // figure out the contents of the name, description, & category BOOL edit_name_desc = FALSE; - if (is_one_object && objectp->permModify()) + if (is_one_object && objectp->permModify() && !objectp->isPermanentEnforced()) { edit_name_desc = TRUE; } @@ -603,12 +603,12 @@ void LLPanelPermissions::refresh() BOOL has_change_perm_ability = FALSE; BOOL has_change_sale_ability = FALSE; - if (valid_base_perms && + if (valid_base_perms && is_nonpermanent && (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_MANIPULATE)))) { has_change_perm_ability = TRUE; } - if (valid_base_perms && + if (valid_base_perms && is_nonpermanent && (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_SET_SALE)))) { has_change_sale_ability = TRUE; @@ -821,8 +821,8 @@ void LLPanelPermissions::refresh() combo_click_action->setValue(LLSD(combo_value)); } } - getChildView("label click action")->setEnabled(is_perm_modify && all_volume); - getChildView("clickaction")->setEnabled(is_perm_modify && all_volume); + getChildView("label click action")->setEnabled(is_perm_modify && is_nonpermanent && all_volume); + getChildView("clickaction")->setEnabled(is_perm_modify && is_nonpermanent && all_volume); } diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 792d852d53..13b746dbab 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -258,7 +258,7 @@ void LLPanelVolume::getState( ) owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name); // BUG? Check for all objects being editable? - BOOL editable = root_objectp->permModify(); + BOOL editable = root_objectp->permModify() && !root_objectp->isPermanentEnforced(); BOOL single_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ) && LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1; diff --git a/indra/newview/llpathfindingcharacterlist.cpp b/indra/newview/llpathfindingcharacterlist.cpp index 15eaac771f..ac1fb15be9 100644 --- a/indra/newview/llpathfindingcharacterlist.cpp +++ b/indra/newview/llpathfindingcharacterlist.cpp @@ -47,12 +47,10 @@ LLPathfindingCharacterList::LLPathfindingCharacterList() LLPathfindingCharacterList::LLPathfindingCharacterList(const LLSD& pCharacterListData) : LLPathfindingObjectList() { - if ( LLPathingLib::getInstance() == NULL ) + if (LLPathingLib::getInstance() != NULL) { - LLPathingLib::initSystem(); + LLPathingLib::getInstance()->cleanupPhysicsCapsuleRepResiduals( ); } - - LLPathingLib::getInstance()->cleanupPhysicsCapsuleRepResiduals( ); parseCharacterListData(pCharacterListData); } diff --git a/indra/newview/llpathfindinglinkset.cpp b/indra/newview/llpathfindinglinkset.cpp index 5b321b4408..4cb749b3ca 100644 --- a/indra/newview/llpathfindinglinkset.cpp +++ b/indra/newview/llpathfindinglinkset.cpp @@ -34,19 +34,15 @@ #include "llpathfindingobject.h" #include "llsd.h" -#define LINKSET_LAND_IMPACT_FIELD "landimpact" -#define LINKSET_MODIFIABLE_FIELD "modifiable" -#ifdef DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS -#define DEPRECATED_LINKSET_PERMANENT_FIELD "permanent" -#define DEPRECATED_LINKSET_WALKABLE_FIELD "walkable" -#endif // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS -#define LINKSET_CATEGORY_FIELD "navmesh_category" -#define LINKSET_CAN_BE_VOLUME "can_be_volume" -#define LINKSET_PHANTOM_FIELD "phantom" -#define LINKSET_WALKABILITY_A_FIELD "A" -#define LINKSET_WALKABILITY_B_FIELD "B" -#define LINKSET_WALKABILITY_C_FIELD "C" -#define LINKSET_WALKABILITY_D_FIELD "D" +#define LINKSET_LAND_IMPACT_FIELD "landimpact" +#define LINKSET_MODIFIABLE_FIELD "modifiable" +#define LINKSET_CATEGORY_FIELD "navmesh_category" +#define LINKSET_CAN_BE_VOLUME "can_be_volume" +#define LINKSET_PHANTOM_FIELD "phantom" +#define LINKSET_WALKABILITY_A_FIELD "A" +#define LINKSET_WALKABILITY_B_FIELD "B" +#define LINKSET_WALKABILITY_C_FIELD "C" +#define LINKSET_WALKABILITY_D_FIELD "D" #define LINKSET_CATEGORY_VALUE_INCLUDE 0 #define LINKSET_CATEGORY_VALUE_EXCLUDE 1 @@ -63,9 +59,6 @@ LLPathfindingLinkset::LLPathfindingLinkset(const LLSD& pTerrainData) : LLPathfindingObject(), mIsTerrain(true), mLandImpact(0U), -#ifdef MISSING_MODIFIABLE_FIELD_WAR - mHasModifiable(true), -#endif // MISSING_MODIFIABLE_FIELD_WAR mIsModifiable(FALSE), mCanBeVolume(FALSE), mLinksetUse(kUnknown), @@ -81,9 +74,6 @@ LLPathfindingLinkset::LLPathfindingLinkset(const std::string &pUUID, const LLSD& : LLPathfindingObject(pUUID, pLinksetData), mIsTerrain(false), mLandImpact(0U), -#ifdef MISSING_MODIFIABLE_FIELD_WAR - mHasModifiable(false), -#endif // MISSING_MODIFIABLE_FIELD_WAR mIsModifiable(TRUE), mCanBeVolume(TRUE), mLinksetUse(kUnknown), @@ -100,12 +90,7 @@ LLPathfindingLinkset::LLPathfindingLinkset(const LLPathfindingLinkset& pOther) : LLPathfindingObject(pOther), mIsTerrain(pOther.mIsTerrain), mLandImpact(pOther.mLandImpact), -#ifdef MISSING_MODIFIABLE_FIELD_WAR - mHasModifiable(pOther.mHasModifiable), - mIsModifiable(pOther.mHasModifiable ? pOther.mIsModifiable : TRUE), -#else // MISSING_MODIFIABLE_FIELD_WAR mIsModifiable(pOther.mIsModifiable), -#endif // MISSING_MODIFIABLE_FIELD_WAR mCanBeVolume(pOther.mCanBeVolume), mLinksetUse(pOther.mLinksetUse), mWalkabilityCoefficientA(pOther.mWalkabilityCoefficientA), @@ -125,15 +110,7 @@ LLPathfindingLinkset& LLPathfindingLinkset::operator =(const LLPathfindingLinkse mIsTerrain = pOther.mIsTerrain; mLandImpact = pOther.mLandImpact; -#ifdef MISSING_MODIFIABLE_FIELD_WAR - if (pOther.mHasModifiable) - { - mHasModifiable = pOther.mHasModifiable; - mIsModifiable = pOther.mIsModifiable; - } -#else // MISSING_MODIFIABLE_FIELD_WAR mIsModifiable = pOther.mIsModifiable; -#endif // MISSING_MODIFIABLE_FIELD_WAR mCanBeVolume = pOther.mCanBeVolume; mLinksetUse = pOther.mLinksetUse; mWalkabilityCoefficientA = pOther.mWalkabilityCoefficientA; @@ -179,10 +156,6 @@ LLSD LLPathfindingLinkset::encodeAlteredFields(ELinksetUse pLinksetUse, S32 pA, itemData[LINKSET_PHANTOM_FIELD] = static_cast<bool>(isPhantom(pLinksetUse)); } -#ifdef DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS - itemData[DEPRECATED_LINKSET_PERMANENT_FIELD] = static_cast<bool>(isPermanent(pLinksetUse)); - itemData[DEPRECATED_LINKSET_WALKABLE_FIELD] = static_cast<bool>(isWalkable(pLinksetUse)); -#endif // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS itemData[LINKSET_CATEGORY_FIELD] = convertCategoryToLLSD(getNavMeshGenerationCategory(pLinksetUse)); } @@ -216,18 +189,9 @@ void LLPathfindingLinkset::parseLinksetData(const LLSD &pLinksetData) llassert(pLinksetData.get(LINKSET_LAND_IMPACT_FIELD).asInteger() >= 0); mLandImpact = pLinksetData.get(LINKSET_LAND_IMPACT_FIELD).asInteger(); -#ifdef MISSING_MODIFIABLE_FIELD_WAR - mHasModifiable = pLinksetData.has(LINKSET_MODIFIABLE_FIELD); - if (mHasModifiable) - { - llassert(pLinksetData.get(LINKSET_MODIFIABLE_FIELD).isBoolean()); - mIsModifiable = pLinksetData.get(LINKSET_MODIFIABLE_FIELD).asBoolean(); - } -#else // MISSING_MODIFIABLE_FIELD_WAR llassert(pLinksetData.has(LINKSET_MODIFIABLE_FIELD)); llassert(pLinksetData.get(LINKSET_MODIFIABLE_FIELD).isBoolean()); mIsModifiable = pLinksetData.get(LINKSET_MODIFIABLE_FIELD).asBoolean(); -#endif // MISSING_MODIFIABLE_FIELD_WAR } void LLPathfindingLinkset::parsePathfindingData(const LLSD &pLinksetData) @@ -239,27 +203,8 @@ void LLPathfindingLinkset::parsePathfindingData(const LLSD &pLinksetData) isPhantom = pLinksetData.get(LINKSET_PHANTOM_FIELD).asBoolean(); } -#ifdef DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS - if (pLinksetData.has(LINKSET_CATEGORY_FIELD)) - { - mLinksetUse = getLinksetUse(isPhantom, convertCategoryFromLLSD(pLinksetData.get(LINKSET_CATEGORY_FIELD))); - } - else - { - llassert(pLinksetData.has(DEPRECATED_LINKSET_PERMANENT_FIELD)); - llassert(pLinksetData.get(DEPRECATED_LINKSET_PERMANENT_FIELD).isBoolean()); - bool isPermanent = pLinksetData.get(DEPRECATED_LINKSET_PERMANENT_FIELD).asBoolean(); - - llassert(pLinksetData.has(DEPRECATED_LINKSET_WALKABLE_FIELD)); - llassert(pLinksetData.get(DEPRECATED_LINKSET_WALKABLE_FIELD).isBoolean()); - bool isWalkable = pLinksetData.get(DEPRECATED_LINKSET_WALKABLE_FIELD).asBoolean(); - - mLinksetUse = getLinksetUse(isPhantom, isPermanent, isWalkable); - } -#else // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS llassert(pLinksetData.has(LINKSET_CATEGORY_FIELD)); mLinksetUse = getLinksetUse(isPhantom, convertCategoryFromLLSD(pLinksetData.get(LINKSET_CATEGORY_FIELD))); -#endif // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS if (pLinksetData.has(LINKSET_CAN_BE_VOLUME)) { @@ -292,66 +237,6 @@ void LLPathfindingLinkset::parsePathfindingData(const LLSD &pLinksetData) llassert(mWalkabilityCoefficientD <= MAX_WALKABILITY_VALUE); } -#ifdef DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS -LLPathfindingLinkset::ELinksetUse LLPathfindingLinkset::getLinksetUse(bool pIsPhantom, bool pIsPermanent, bool pIsWalkable) -{ - return (pIsPhantom ? (pIsPermanent ? (pIsWalkable ? kMaterialVolume : kExclusionVolume) : kDynamicPhantom) : - (pIsPermanent ? (pIsWalkable ? kWalkable : kStaticObstacle) : kDynamicObstacle)); -} - -BOOL LLPathfindingLinkset::isPermanent(ELinksetUse pLinksetUse) -{ - BOOL retVal; - - switch (pLinksetUse) - { - case kWalkable : - case kStaticObstacle : - case kMaterialVolume : - case kExclusionVolume : - retVal = true; - break; - case kDynamicObstacle : - case kDynamicPhantom : - retVal = false; - break; - case kUnknown : - default : - retVal = false; - llassert(0); - break; - } - - return retVal; -} - -BOOL LLPathfindingLinkset::isWalkable(ELinksetUse pLinksetUse) -{ - BOOL retVal; - - switch (pLinksetUse) - { - case kWalkable : - case kMaterialVolume : - retVal = true; - break; - case kStaticObstacle : - case kDynamicObstacle : - case kExclusionVolume : - case kDynamicPhantom : - retVal = false; - break; - case kUnknown : - default : - retVal = false; - llassert(0); - break; - } - - return retVal; -} -#endif // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS - BOOL LLPathfindingLinkset::isPhantom(ELinksetUse pLinksetUse) { BOOL retVal; diff --git a/indra/newview/llpathfindinglinkset.h b/indra/newview/llpathfindinglinkset.h index a598452ea5..03c526560c 100644 --- a/indra/newview/llpathfindinglinkset.h +++ b/indra/newview/llpathfindinglinkset.h @@ -32,9 +32,6 @@ #include "llpathfindingobject.h" -#define DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS -#define MISSING_MODIFIABLE_FIELD_WAR - class LLSD; class LLPathfindingLinkset : public LLPathfindingObject @@ -92,11 +89,6 @@ private: void parseLinksetData(const LLSD &pLinksetData); void parsePathfindingData(const LLSD &pLinksetData); -#ifdef DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS - static ELinksetUse getLinksetUse(bool pIsPhantom, bool pIsPermanent, bool pIsWalkable); - static BOOL isPermanent(ELinksetUse pLinksetUse); - static BOOL isWalkable(ELinksetUse pLinksetUse); -#endif // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS static BOOL isPhantom(ELinksetUse pLinksetUse); static ELinksetUse getLinksetUse(bool pIsPhantom, ENavMeshGenerationCategory pNavMeshGenerationCategory); static ENavMeshGenerationCategory getNavMeshGenerationCategory(ELinksetUse pLinksetUse); @@ -105,9 +97,6 @@ private: bool mIsTerrain; U32 mLandImpact; -#ifdef MISSING_MODIFIABLE_FIELD_WAR - bool mHasModifiable; -#endif // MISSING_MODIFIABLE_FIELD_WAR BOOL mIsModifiable; BOOL mCanBeVolume; ELinksetUse mLinksetUse; diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp index 85a315a3e7..16283282fb 100644 --- a/indra/newview/llpathfindingmanager.cpp +++ b/indra/newview/llpathfindingmanager.cpp @@ -45,30 +45,32 @@ #include "llpathfindingnavmesh.h" #include "llpathfindingnavmeshstatus.h" #include "llpathfindingobject.h" +#include "llpathinglib.h" #include "llsingleton.h" #include "llsd.h" #include "lltrans.h" #include "lluuid.h" #include "llviewerregion.h" #include "llweb.h" +#include "llpanelnavmeshrebake.h" +#include "llenvmanager.h" -#define CAP_SERVICE_RETRIEVE_NAVMESH "RetrieveNavMeshSrc" +#define CAP_SERVICE_RETRIEVE_NAVMESH "RetrieveNavMeshSrc" -#define CAP_SERVICE_NAVMESH_STATUS "NavMeshGenerationStatus" +#define CAP_SERVICE_NAVMESH_STATUS "NavMeshGenerationStatus" -#define CAP_SERVICE_AGENT_STATE "AgentPreferences" -#define ALTER_NAVMESH_OBJECTS_FIELD "alter_navmesh_objects" -#define DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD "alter_permanent_objects" +#define CAP_SERVICE_OBJECT_LINKSETS "ObjectNavMeshProperties" +#define CAP_SERVICE_TERRAIN_LINKSETS "TerrainNavMeshProperties" -#define CAP_SERVICE_OBJECT_LINKSETS "ObjectNavMeshProperties" -#define CAP_SERVICE_TERRAIN_LINKSETS "TerrainNavMeshProperties" - -#define CAP_SERVICE_CHARACTERS "CharacterProperties" +#define CAP_SERVICE_CHARACTERS "CharacterProperties" #define SIM_MESSAGE_NAVMESH_STATUS_UPDATE "/message/NavMeshStatusUpdate" -#define SIM_MESSAGE_AGENT_STATE_UPDATE "/message/AgentPreferencesUpdate" #define SIM_MESSAGE_BODY_FIELD "body" +#define CAP_SERVICE_AGENT_STATE "AgentState" +#define ALTER_NAVMESH_OBJECTS_FIELD "alter_navmesh_objects" +#define SIM_MESSAGE_AGENT_STATE_UPDATE "/message/AgentStateUpdate" + //--------------------------------------------------------------------------- // LLNavMeshSimStateChangeNode //--------------------------------------------------------------------------- @@ -81,10 +83,10 @@ public: LLHTTPRegistration<LLNavMeshSimStateChangeNode> gHTTPRegistrationNavMeshSimStateChangeNode(SIM_MESSAGE_NAVMESH_STATUS_UPDATE); + //--------------------------------------------------------------------------- // LLAgentStateChangeNode //--------------------------------------------------------------------------- - class LLAgentStateChangeNode : public LLHTTPNode { public: @@ -94,25 +96,6 @@ public: LLHTTPRegistration<LLAgentStateChangeNode> gHTTPRegistrationAgentStateChangeNode(SIM_MESSAGE_AGENT_STATE_UPDATE); //--------------------------------------------------------------------------- -// StinsonResponder -//--------------------------------------------------------------------------- - -class StinsonResponder : public LLHTTPClient::Responder -{ -public: - StinsonResponder(const std::string &pCapabilityURL); - virtual ~StinsonResponder(); - - virtual void result(const LLSD &pContent); - virtual void error(U32 pStatus, const std::string& pReason); - -protected: - -private: - std::string mCapabilityURL; -}; - -//--------------------------------------------------------------------------- // NavMeshStatusResponder //--------------------------------------------------------------------------- @@ -161,7 +144,7 @@ private: class AgentStateResponder : public LLHTTPClient::Responder { public: - AgentStateResponder(const std::string &pCapabilityURL, LLPathfindingManager::EAgentState pRequestedAgentState = LLPathfindingManager::kAgentStateUnknown); + AgentStateResponder(const std::string &pCapabilityURL); virtual ~AgentStateResponder(); virtual void result(const LLSD &pContent); @@ -171,9 +154,26 @@ protected: private: std::string mCapabilityURL; - LLPathfindingManager::EAgentState mRequestedAgentState; }; + +//--------------------------------------------------------------------------- +// NavMeshRebakeResponder +//--------------------------------------------------------------------------- +class NavMeshRebakeResponder : public LLHTTPClient::Responder +{ +public: + NavMeshRebakeResponder( const std::string &pCapabilityURL ); + virtual ~NavMeshRebakeResponder(); + + virtual void result( const LLSD &pContent ); + virtual void error( U32 pStatus, const std::string& pReason ); + +protected: + +private: + std::string mCapabilityURL; +}; //--------------------------------------------------------------------------- // LinksetsResponder //--------------------------------------------------------------------------- @@ -282,14 +282,34 @@ private: LLPathfindingManager::LLPathfindingManager() : LLSingleton<LLPathfindingManager>(), mNavMeshMap(), - mAgentStateSignal(), - mAgentState(kAgentStateUnknown), - mLastKnownNonErrorAgentState(kAgentStateUnknown) + mShowNavMeshRebake(false), + mCrossingSlot() { + if ( !mCrossingSlot.connected() ) + { + mCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLPathfindingManager::onRegionBoundaryCrossed, this)); + } +} + +void LLPathfindingManager::onRegionBoundaryCrossed() +{ + displayNavMeshRebakePanel(); } LLPathfindingManager::~LLPathfindingManager() +{ + if (mCrossingSlot.connected()) + { + mCrossingSlot.disconnect(); + } +} + +void LLPathfindingManager::initSystem() { + if (LLPathingLib::getInstance() == NULL) + { + LLPathingLib::initSystem(); + } } bool LLPathfindingManager::isPathfindingEnabledForCurrentRegion() const @@ -303,17 +323,9 @@ bool LLPathfindingManager::isPathfindingEnabledForRegion(LLViewerRegion *pRegion return !retrieveNavMeshURL.empty(); } -#ifdef DEPRECATED_UNVERSIONED_NAVMESH -bool LLPathfindingManager::isPathfindingNavMeshVersioningEnabledForCurrentRegionXXX() const +bool LLPathfindingManager::isPathfindingDebugEnabled() const { - std::string navMeshStatusURL = getNavMeshStatusURLForRegion(getCurrentRegion()); - return !navMeshStatusURL.empty(); -} -#endif // DEPRECATED_UNVERSIONED_NAVMESH - -bool LLPathfindingManager::isAllowAlterPermanent() -{ - return (!isPathfindingEnabledForCurrentRegion() || (getAgentState() == kAgentStateUnfrozen)); + return (LLPathingLib::getInstance() != NULL); } bool LLPathfindingManager::isAllowViewTerrainProperties() const @@ -348,25 +360,10 @@ void LLPathfindingManager::requestGetNavMeshForRegion(LLViewerRegion *pRegion) else { std::string navMeshStatusURL = getNavMeshStatusURLForRegion(pRegion); -#ifdef DEPRECATED_UNVERSIONED_NAVMESH - if (navMeshStatusURL.empty()) - { - LLPathfindingNavMeshStatus navMeshStatus = navMeshPtr->getNavMeshStatusXXX(); - navMeshStatus.incrementNavMeshVersionXXX(); - sendRequestGetNavMeshForRegion(navMeshPtr, pRegion, navMeshStatus); - } - else - { - navMeshPtr->handleNavMeshCheckVersion(); - LLHTTPClient::ResponderPtr navMeshStatusResponder = new NavMeshStatusResponder(navMeshStatusURL, pRegion); - LLHTTPClient::get(navMeshStatusURL, navMeshStatusResponder); - } -#else // DEPRECATED_UNVERSIONED_NAVMESH llassert(!navMeshStatusURL.empty()); navMeshPtr->handleNavMeshCheckVersion(); LLHTTPClient::ResponderPtr navMeshStatusResponder = new NavMeshStatusResponder(navMeshStatusURL, pRegion); LLHTTPClient::get(navMeshStatusURL, navMeshStatusResponder); -#endif // DEPRECATED_UNVERSIONED_NAVMESH } } @@ -375,49 +372,6 @@ LLPathfindingManager::agent_state_slot_t LLPathfindingManager::registerAgentStat return mAgentStateSignal.connect(pAgentStateCallback); } -LLPathfindingManager::EAgentState LLPathfindingManager::getAgentState() -{ - if (!isPathfindingEnabledForCurrentRegion()) - { - setAgentState(kAgentStateNotEnabled); - } - else - { - if (!isValidAgentState(mAgentState)) - { - requestGetAgentState(); - } - } - - return mAgentState; -} - -LLPathfindingManager::EAgentState LLPathfindingManager::getLastKnownNonErrorAgentState() const -{ - return mLastKnownNonErrorAgentState; -} - -void LLPathfindingManager::requestSetAgentState(EAgentState pRequestedAgentState) -{ - llassert(isValidAgentState(pRequestedAgentState)); - std::string agentStateURL = getAgentStateURLForCurrentRegion(); - - if (agentStateURL.empty()) - { - setAgentState(kAgentStateNotEnabled); - } - else - { - LLSD request; - request[ALTER_NAVMESH_OBJECTS_FIELD] = static_cast<LLSD::Boolean>(pRequestedAgentState == kAgentStateUnfrozen); -#ifdef DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD - request[DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD] = static_cast<LLSD::Boolean>(pRequestedAgentState == kAgentStateUnfrozen); -#endif // DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD - - LLHTTPClient::ResponderPtr responder = new AgentStateResponder(agentStateURL, pRequestedAgentState); - LLHTTPClient::post(agentStateURL, request, responder); - } -} void LLPathfindingManager::requestGetLinksets(request_id_t pRequestId, object_request_callback_t pLinksetsCallback) const { @@ -538,10 +492,6 @@ void LLPathfindingManager::requestGetCharacters(request_id_t pRequestId, object_ LLHTTPClient::ResponderPtr charactersResponder = new CharactersResponder(charactersURL, pRequestId, pCharactersCallback); LLHTTPClient::get(charactersURL, charactersResponder); - - std::string googleURL = "http://www.google.com/"; - LLHTTPClient::ResponderPtr stinsonResponder = new StinsonResponder(googleURL); - LLHTTPClient::get(googleURL, stinsonResponder); } } } @@ -664,93 +614,32 @@ LLPathfindingNavMeshPtr LLPathfindingManager::getNavMeshForRegion(LLViewerRegion return getNavMeshForRegion(regionUUID); } -bool LLPathfindingManager::isValidAgentState(EAgentState pAgentState) -{ - return ((pAgentState == kAgentStateFrozen) || (pAgentState == kAgentStateUnfrozen)); -} - void LLPathfindingManager::requestGetAgentState() { - std::string agentStateURL = getAgentStateURLForCurrentRegion(); + std::string agentStateURL = getAgentStateURLForCurrentRegion( getCurrentRegion() ); - if (agentStateURL.empty()) - { - setAgentState(kAgentStateNotEnabled); - } - else + if ( !agentStateURL.empty() ) { - LLHTTPClient::ResponderPtr responder = new AgentStateResponder(agentStateURL); - LLHTTPClient::get(agentStateURL, responder); + LLHTTPClient::ResponderPtr responder = new AgentStateResponder( agentStateURL ); + LLHTTPClient::get( agentStateURL, responder ); } } -void LLPathfindingManager::setAgentState(EAgentState pAgentState) -{ - mAgentState = pAgentState; - - if (mAgentState != kAgentStateError) - { - mLastKnownNonErrorAgentState = mAgentState; - } - - mAgentStateSignal(mAgentState); -} - -void LLPathfindingManager::handleAgentStateResult(const LLSD &pContent, EAgentState pRequestedAgentState) -{ -#ifndef DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD - llassert(pContent.has(ALTER_NAVMESH_OBJECTS_FIELD)); - llassert(pContent.get(ALTER_NAVMESH_OBJECTS_FIELD).isBoolean()); - EAgentState agentState = (pContent.get(ALTER_NAVMESH_OBJECTS_FIELD).asBoolean() ? kAgentStateUnfrozen : kAgentStateFrozen); -#else // DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD - EAgentState agentState = kAgentStateUnknown; - if (pContent.has(ALTER_NAVMESH_OBJECTS_FIELD)) - { - llassert(pContent.get(ALTER_NAVMESH_OBJECTS_FIELD).isBoolean()); - agentState = (pContent.get(ALTER_NAVMESH_OBJECTS_FIELD).asBoolean() ? kAgentStateUnfrozen : kAgentStateFrozen); - } - else - { - llassert(pContent.has(DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD)); - llassert(pContent.get(DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD).isBoolean()); - agentState = (pContent.get(DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD).asBoolean() ? kAgentStateUnfrozen : kAgentStateFrozen); - } -#endif // DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD - - if (isValidAgentState(pRequestedAgentState) && (agentState != pRequestedAgentState)) - { - agentState = kAgentStateError; - llassert(0); - } - - setAgentState(agentState); +void LLPathfindingManager::handleAgentStateResult(const LLSD &pContent) +{ + displayNavMeshRebakePanel(); } void LLPathfindingManager::handleAgentStateError(U32 pStatus, const std::string &pReason, const std::string &pURL) { llwarns << "error with request to URL '" << pURL << "' because " << pReason << " (statusCode:" << pStatus << ")" << llendl; - setAgentState(kAgentStateError); } -void LLPathfindingManager::handleAgentStateUpdate(const LLSD &pContent) +std::string LLPathfindingManager::getAgentStateURLForCurrentRegion(LLViewerRegion *pRegion) const { - llassert(pContent.has(ALTER_NAVMESH_OBJECTS_FIELD)); - llassert(pContent.get(ALTER_NAVMESH_OBJECTS_FIELD).isBoolean()); - EAgentState agentState = (pContent.get(ALTER_NAVMESH_OBJECTS_FIELD).asBoolean() ? kAgentStateUnfrozen : kAgentStateFrozen); - - setAgentState(agentState); - - LLSD substitutions, payload; - LLNotificationsUtil::add("AutomaticAgentStateUnfreeze", substitutions, payload, boost::bind(&LLPathfindingManager::handleAgentStateUserNotification, this, _1, _2)); + return getCapabilityURLForRegion( pRegion, CAP_SERVICE_AGENT_STATE ); } -void LLPathfindingManager::handleAgentStateUserNotification(const LLSD &pNotification, const LLSD &pResponse) -{ - if (LLNotificationsUtil::getSelectedOption(pNotification, pResponse) == 1) - { - LLWeb::loadURL(LLTrans::getString("Pathfinding_Wiki_URL")); - } -} std::string LLPathfindingManager::getNavMeshStatusURLForRegion(LLViewerRegion *pRegion) const { @@ -762,11 +651,6 @@ std::string LLPathfindingManager::getRetrieveNavMeshURLForRegion(LLViewerRegion return getCapabilityURLForRegion(pRegion, CAP_SERVICE_RETRIEVE_NAVMESH); } -std::string LLPathfindingManager::getAgentStateURLForCurrentRegion() const -{ - return getCapabilityURLForCurrentRegion(CAP_SERVICE_AGENT_STATE); -} - std::string LLPathfindingManager::getObjectLinksetsURLForCurrentRegion() const { return getCapabilityURLForCurrentRegion(CAP_SERVICE_OBJECT_LINKSETS); @@ -810,57 +694,75 @@ LLViewerRegion *LLPathfindingManager::getCurrentRegion() const return gAgent.getRegion(); } -//--------------------------------------------------------------------------- -// LLNavMeshSimStateChangeNode -//--------------------------------------------------------------------------- - -void LLNavMeshSimStateChangeNode::post(ResponsePtr pResponse, const LLSD &pContext, const LLSD &pInput) const +void LLPathfindingManager::displayNavMeshRebakePanel() { -#ifdef XXX_STINSON_DEBUG_NAVMESH_ZONE - llinfos << "STINSON DEBUG: Received NavMeshStatusUpdate: " << pInput << llendl; -#endif // XXX_STINSON_DEBUG_NAVMESH_ZONE - llassert(pInput.has(SIM_MESSAGE_BODY_FIELD)); - llassert(pInput.get(SIM_MESSAGE_BODY_FIELD).isMap()); - LLPathfindingNavMeshStatus navMeshStatus(pInput.get(SIM_MESSAGE_BODY_FIELD)); - LLPathfindingManager::getInstance()->handleNavMeshStatusUpdate(navMeshStatus); + LLView* rootp = LLUI::getRootView(); + LLPanel* panel_nmr_container = rootp->getChild<LLPanel>("navmesh_rebake_container"); + LLPanelNavMeshRebake* panel_namesh_rebake = LLPanelNavMeshRebake::getInstance(); + panel_nmr_container->addChild( panel_namesh_rebake ); + panel_nmr_container->setVisible( TRUE ); + panel_namesh_rebake->reparent( rootp ); + LLPanelNavMeshRebake::getInstance()->setVisible( TRUE ); + LLPanelNavMeshRebake::getInstance()->resetButtonStates(); } -//--------------------------------------------------------------------------- -// StinsonResponder -//--------------------------------------------------------------------------- - -StinsonResponder::StinsonResponder(const std::string &pCapabilityURL) - : LLHTTPClient::Responder(), - mCapabilityURL(pCapabilityURL) +void LLPathfindingManager::hideNavMeshRebakePanel() { + LLPanelNavMeshRebake::getInstance()->setVisible( FALSE ); } -StinsonResponder::~StinsonResponder() +void LLPathfindingManager::handleNavMeshRebakeError(U32 pStatus, const std::string &pReason, const std::string &pURL) { + llwarns << "error with request to URL '" << pURL << "' because " << pReason << " (statusCode:" << pStatus << ")" << llendl; } -void StinsonResponder::result(const LLSD &pContent) +void LLPathfindingManager::handleNavMeshRebakeResult( const LLSD &pContent ) { - llinfos << "STINSON DEBUG: success to URL '" << mCapabilityURL << "' with content " << pContent << llendl; + hideNavMeshRebakePanel(); } -void StinsonResponder::error(U32 pStatus, const std::string& pReason) +void LLPathfindingManager::triggerNavMeshRebuild() { - llwarns << "STINSON DEBUG: error with request to URL '" << mCapabilityURL << "' because " << pReason << " (statusCode:" << pStatus << ")" << llendl; + std::string url = getNavMeshStatusURLForRegion( getCurrentRegion() ); + if ( url.empty() ) + { + llwarns << "Error with request due to nonexistent URL"<<llendl; + } + else + { + LLSD mPostData; + mPostData["command"] = "rebuild"; + LLHTTPClient::ResponderPtr responder = new NavMeshRebakeResponder( url ); + LLHTTPClient::post( url, mPostData, responder ); + } } - //--------------------------------------------------------------------------- -// LLAgentStateChangeNode +// LLNavMeshSimStateChangeNode //--------------------------------------------------------------------------- -void LLAgentStateChangeNode::post(ResponsePtr pResponse, const LLSD &pContext, const LLSD &pInput) const +void LLNavMeshSimStateChangeNode::post(ResponsePtr pResponse, const LLSD &pContext, const LLSD &pInput) const { #ifdef XXX_STINSON_DEBUG_NAVMESH_ZONE - llinfos << "STINSON DEBUG: Received AgentPreferencesUpdate: " << pInput << llendl; + llinfos << "STINSON DEBUG: Received NavMeshStatusUpdate: " << pInput << llendl; #endif // XXX_STINSON_DEBUG_NAVMESH_ZONE llassert(pInput.has(SIM_MESSAGE_BODY_FIELD)); llassert(pInput.get(SIM_MESSAGE_BODY_FIELD).isMap()); - LLPathfindingManager::getInstance()->handleAgentStateUpdate(pInput.get(SIM_MESSAGE_BODY_FIELD)); + LLPathfindingNavMeshStatus navMeshStatus(pInput.get(SIM_MESSAGE_BODY_FIELD)); + LLPathfindingManager::getInstance()->handleNavMeshStatusUpdate(navMeshStatus); +} + +//--------------------------------------------------------------------------- +// LLAgentStateChangeNode +//--------------------------------------------------------------------------- + +void LLAgentStateChangeNode::post(ResponsePtr pResponse, const LLSD &pContext, const LLSD &pInput) const +{ + LLPathfindingManager::getInstance()->handleAgentStateUpdate(); +} + +void LLPathfindingManager::handleAgentStateUpdate() +{ + displayNavMeshRebakePanel(); } //--------------------------------------------------------------------------- @@ -929,10 +831,9 @@ void NavMeshResponder::error(U32 pStatus, const std::string& pReason) // AgentStateResponder //--------------------------------------------------------------------------- -AgentStateResponder::AgentStateResponder(const std::string &pCapabilityURL, LLPathfindingManager::EAgentState pRequestedAgentState) - : LLHTTPClient::Responder(), - mCapabilityURL(pCapabilityURL), - mRequestedAgentState(pRequestedAgentState) +AgentStateResponder::AgentStateResponder(const std::string &pCapabilityURL) +: LLHTTPClient::Responder() +, mCapabilityURL(pCapabilityURL) { } @@ -942,7 +843,7 @@ AgentStateResponder::~AgentStateResponder() void AgentStateResponder::result(const LLSD &pContent) { - LLPathfindingManager::getInstance()->handleAgentStateResult(pContent, mRequestedAgentState); + LLPathfindingManager::getInstance()->handleAgentStateResult(pContent); } void AgentStateResponder::error(U32 pStatus, const std::string &pReason) @@ -950,6 +851,30 @@ void AgentStateResponder::error(U32 pStatus, const std::string &pReason) LLPathfindingManager::getInstance()->handleAgentStateError(pStatus, pReason, mCapabilityURL); } + +//--------------------------------------------------------------------------- +// navmesh rebake responder +//--------------------------------------------------------------------------- +NavMeshRebakeResponder::NavMeshRebakeResponder(const std::string &pCapabilityURL ) +: LLHTTPClient::Responder() +, mCapabilityURL( pCapabilityURL ) +{ +} + +NavMeshRebakeResponder::~NavMeshRebakeResponder() +{ +} + +void NavMeshRebakeResponder::result(const LLSD &pContent) +{ + LLPathfindingManager::getInstance()->handleNavMeshRebakeResult( pContent ); +} + +void NavMeshRebakeResponder::error(U32 pStatus, const std::string &pReason) +{ + LLPathfindingManager::getInstance()->handleNavMeshRebakeError( pStatus, pReason, mCapabilityURL ); +} + //--------------------------------------------------------------------------- // LinksetsResponder //--------------------------------------------------------------------------- @@ -1110,3 +1035,4 @@ void CharactersResponder::error(U32 pStatus, const std::string &pReason) LLPathfindingObjectListPtr characterListPtr = LLPathfindingObjectListPtr(new LLPathfindingCharacterList()); mCharactersCallback(mRequestId, LLPathfindingManager::kRequestError, characterListPtr); } + diff --git a/indra/newview/llpathfindingmanager.h b/indra/newview/llpathfindingmanager.h index 3c9af91e7b..309d7513c6 100644 --- a/indra/newview/llpathfindingmanager.h +++ b/indra/newview/llpathfindingmanager.h @@ -39,6 +39,8 @@ #include "llpathfindingnavmesh.h" #include "llsingleton.h" #include "lluuid.h" +#include "llpanel.h" +#include "llmoveview.h" class LLViewerRegion; class LLPathfindingNavMeshStatus; @@ -46,25 +48,11 @@ class LLPathfindingNavMeshStatus; class LLPathfindingManager : public LLSingleton<LLPathfindingManager> { friend class LLNavMeshSimStateChangeNode; - friend class LLAgentStateChangeNode; friend class NavMeshStatusResponder; - friend class AgentStateResponder; public: typedef std::map<LLUUID, LLPathfindingNavMeshPtr> NavMeshMap; typedef enum { - kAgentStateUnknown, - kAgentStateFrozen, - kAgentStateUnfrozen, - kAgentStateNotEnabled, - kAgentStateError - } EAgentState; - - typedef boost::function<void (EAgentState)> agent_state_callback_t; - typedef boost::signals2::signal<void (EAgentState)> agent_state_signal_t; - typedef boost::signals2::connection agent_state_slot_t; - - typedef enum { kRequestStarted, kRequestCompleted, kRequestNotEnabled, @@ -74,23 +62,18 @@ public: LLPathfindingManager(); virtual ~LLPathfindingManager(); + void initSystem(); + bool isPathfindingEnabledForCurrentRegion() const; bool isPathfindingEnabledForRegion(LLViewerRegion *pRegion) const; -#ifdef DEPRECATED_UNVERSIONED_NAVMESH - bool isPathfindingNavMeshVersioningEnabledForCurrentRegionXXX() const; -#endif // DEPRECATED_UNVERSIONED_NAVMESH - bool isAllowAlterPermanent(); + bool isPathfindingDebugEnabled() const; + bool isAllowViewTerrainProperties() const; LLPathfindingNavMesh::navmesh_slot_t registerNavMeshListenerForRegion(LLViewerRegion *pRegion, LLPathfindingNavMesh::navmesh_callback_t pNavMeshCallback); void requestGetNavMeshForRegion(LLViewerRegion *pRegion); - agent_state_slot_t registerAgentStateListener(agent_state_callback_t pAgentStateCallback); - EAgentState getAgentState(); - EAgentState getLastKnownNonErrorAgentState() const; - void requestSetAgentState(EAgentState pAgentState); - typedef U32 request_id_t; typedef boost::function<void (request_id_t, ERequestStatus, LLPathfindingObjectListPtr)> object_request_callback_t; @@ -99,6 +82,23 @@ public: void requestGetCharacters(request_id_t pRequestId, object_request_callback_t pCharactersCallback) const; + friend class LLAgentStateChangeNode; + friend class AgentStateResponder; + + typedef boost::function< void () > agent_state_callback_t; + typedef boost::signals2::signal< void () > agent_state_signal_t; + typedef boost::signals2::connection agent_state_slot_t; + + agent_state_slot_t mCrossingSlot; + agent_state_signal_t mAgentStateSignal; + + agent_state_slot_t registerAgentStateListener(agent_state_callback_t pAgentStateCallback); + + void handleNavMeshRebakeResult( const LLSD &pContent ); + void handleNavMeshRebakeError( U32 pStatus, const std::string &pReason, const std::string &pURL ); + void triggerNavMeshRebuild(); + void onRegionBoundaryCrossed(); + protected: private: @@ -111,34 +111,36 @@ private: void handleNavMeshStatusRequest(const LLPathfindingNavMeshStatus &pNavMeshStatus, LLViewerRegion *pRegion); void handleNavMeshStatusUpdate(const LLPathfindingNavMeshStatus &pNavMeshStatus); + void handleAgentStateUpdate(); + LLPathfindingNavMeshPtr getNavMeshForRegion(const LLUUID &pRegionUUID); LLPathfindingNavMeshPtr getNavMeshForRegion(LLViewerRegion *pRegion); - static bool isValidAgentState(EAgentState pAgentState); - - void requestGetAgentState(); - void setAgentState(EAgentState pAgentState); - void handleAgentStateResult(const LLSD &pContent, EAgentState pRequestedAgentState); - void handleAgentStateError(U32 pStatus, const std::string &pReason, const std::string &pURL); - void handleAgentStateUpdate(const LLSD &pContent); - void handleAgentStateUserNotification(const LLSD &pNotification, const LLSD &pResponse); - std::string getNavMeshStatusURLForRegion(LLViewerRegion *pRegion) const; std::string getRetrieveNavMeshURLForRegion(LLViewerRegion *pRegion) const; - std::string getAgentStateURLForCurrentRegion() const; std::string getObjectLinksetsURLForCurrentRegion() const; std::string getTerrainLinksetsURLForCurrentRegion() const; std::string getCharactersURLForCurrentRegion() const; - - std::string getCapabilityURLForCurrentRegion(const std::string &pCapabilityName) const; - std::string getCapabilityURLForRegion(LLViewerRegion *pRegion, const std::string &pCapabilityName) const; + std::string getAgentStateURLForCurrentRegion(LLViewerRegion *pRegion) const; + std::string getCapabilityURLForCurrentRegion(const std::string &pCapabilityName) const; + std::string getCapabilityURLForRegion(LLViewerRegion *pRegion, const std::string &pCapabilityName) const; LLViewerRegion *getCurrentRegion() const; - NavMeshMap mNavMeshMap; + + void displayNavMeshRebakePanel(); + void hideNavMeshRebakePanel(); + - agent_state_signal_t mAgentStateSignal; - EAgentState mAgentState; - EAgentState mLastKnownNonErrorAgentState; + void requestGetAgentState(); + void handleAgentStateResult(const LLSD &pContent );//, EAgentState pRequestedAgentState); + void handleAgentStateError(U32 pStatus, const std::string &pReason, const std::string &pURL); + + + NavMeshMap mNavMeshMap; + + + BOOL mShowNavMeshRebake; }; + #endif // LL_LLPATHFINDINGMANAGER_H diff --git a/indra/newview/llpathfindingnavmesh.h b/indra/newview/llpathfindingnavmesh.h index 55fdd9aaa7..02b403ab75 100644 --- a/indra/newview/llpathfindingnavmesh.h +++ b/indra/newview/llpathfindingnavmesh.h @@ -66,10 +66,6 @@ public: navmesh_slot_t registerNavMeshListener(navmesh_callback_t pNavMeshCallback); -#ifdef DEPRECATED_UNVERSIONED_NAVMESH - const LLPathfindingNavMeshStatus &getNavMeshStatusXXX() const {return mNavMeshStatus;}; -#endif // DEPRECATED_UNVERSIONED_NAVMESH - bool hasNavMeshVersion(const LLPathfindingNavMeshStatus &pNavMeshStatus) const; void handleNavMeshWaitForRegionLoad(); diff --git a/indra/newview/llpathfindingnavmeshstatus.h b/indra/newview/llpathfindingnavmeshstatus.h index 6428a31c24..837fc43cc5 100644 --- a/indra/newview/llpathfindingnavmeshstatus.h +++ b/indra/newview/llpathfindingnavmeshstatus.h @@ -32,9 +32,6 @@ #include <string> -// XXX stinson 03/12/2012 : This definition is in place to support an older version of the pathfinding simulator that does not have versioned information -#define DEPRECATED_UNVERSIONED_NAVMESH - class LLSD; class LLPathfindingNavMeshStatus @@ -57,10 +54,6 @@ public: LLPathfindingNavMeshStatus &operator =(const LLPathfindingNavMeshStatus &pOther); -#ifdef DEPRECATED_UNVERSIONED_NAVMESH - void incrementNavMeshVersionXXX() {++mVersion;}; -#endif // DEPRECATED_UNVERSIONED_NAVMESH - bool isValid() const {return mIsValid;}; const LLUUID &getRegionUUID() const {return mRegionUUID;}; U32 getVersion() const {return mVersion;}; diff --git a/indra/newview/llpathfindingnavmeshzone.h b/indra/newview/llpathfindingnavmeshzone.h index 8c330559a9..679e72c978 100644 --- a/indra/newview/llpathfindingnavmeshzone.h +++ b/indra/newview/llpathfindingnavmeshzone.h @@ -32,6 +32,7 @@ #include "lluuid.h" #include "llpathfindingnavmesh.h" #include "llpathfindingnavmeshstatus.h" +#include "llviewerregion.h" #include <vector> @@ -68,7 +69,7 @@ public: typedef boost::function<void (ENavMeshZoneRequestStatus)> navmesh_zone_callback_t; typedef boost::signals2::signal<void (ENavMeshZoneRequestStatus)> navmesh_zone_signal_t; - typedef boost::signals2::connection navmesh_zone_slot_t; + typedef boost::signals2::connection navmesh_zone_slot_t; LLPathfindingNavMeshZone(); virtual ~LLPathfindingNavMeshZone(); diff --git a/indra/newview/llpathfindingpathtool.cpp b/indra/newview/llpathfindingpathtool.cpp index bc5a265111..5567869a1c 100644 --- a/indra/newview/llpathfindingpathtool.cpp +++ b/indra/newview/llpathfindingpathtool.cpp @@ -54,11 +54,6 @@ LLPathfindingPathTool::LLPathfindingPathTool() mIsMiddleMouseButtonHeld(false), mIsRightMouseButtonHeld(false) { - if (!LLPathingLib::getInstance()) - { - LLPathingLib::initSystem(); - } - setCharacterWidth(1.0f); setCharacterType(mCharacterType); } diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 4b49ae9f43..4b84bbb265 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -393,7 +393,7 @@ void LLSidepanelTaskInfo::refresh() } } - getChildView("button set group")->setEnabled(owners_identical && (mOwnerID == gAgent.getID())); + getChildView("button set group")->setEnabled(owners_identical && (mOwnerID == gAgent.getID()) && is_nonpermanent); getChildView("Name:")->setEnabled(TRUE); LLLineEditor* LineEditorObjectName = getChild<LLLineEditor>("Object Name"); @@ -423,7 +423,7 @@ void LLSidepanelTaskInfo::refresh() // figure out the contents of the name, description, & category BOOL edit_name_desc = FALSE; - if (is_one_object && objectp->permModify()) + if (is_one_object && objectp->permModify() && !objectp->isPermanentEnforced()) { edit_name_desc = TRUE; } @@ -603,12 +603,12 @@ void LLSidepanelTaskInfo::refresh() BOOL has_change_perm_ability = FALSE; BOOL has_change_sale_ability = FALSE; - if (valid_base_perms && + if (valid_base_perms && is_nonpermanent && (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_MANIPULATE)))) { has_change_perm_ability = TRUE; } - if (valid_base_perms && + if (valid_base_perms && is_nonpermanent && (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_SET_SALE)))) { has_change_sale_ability = TRUE; @@ -820,8 +820,8 @@ void LLSidepanelTaskInfo::refresh() ComboClickAction->setCurrentByIndex((S32)click_action); } } - getChildView("label click action")->setEnabled(is_perm_modify && all_volume); - getChildView("clickaction")->setEnabled(is_perm_modify && all_volume); + getChildView("label click action")->setEnabled(is_perm_modify && is_nonpermanent && all_volume); + getChildView("clickaction")->setEnabled(is_perm_modify && is_nonpermanent && all_volume); if (!getIsEditing()) { diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 0ac8c1fe39..6bee373181 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -186,6 +186,7 @@ #include "llappearancemgr.h" #include "llavatariconctrl.h" #include "llvoicechannel.h" +#include "llpathfindingmanager.h" #include "lllogin.h" #include "llevents.h" @@ -1968,6 +1969,9 @@ bool idle_startup() } } + llassert(LLPathfindingManager::getInstance() != NULL); + LLPathfindingManager::getInstance()->initSystem(); + display_startup(); //DEV-17797. get null folder. Any items found here moved to Lost and Found LLInventoryModelBackgroundFetch::instance().findLostItems(); diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp index a963ef2ea6..4ef2a26535 100644 --- a/indra/newview/lltoolbrush.cpp +++ b/indra/newview/lltoolbrush.cpp @@ -247,12 +247,6 @@ void LLToolBrushLand::modifyLandInSelectionGlobal() } } - if (!gAgent.isGodlike() && !gSavedSettings.getBOOL("PathfindingDisablePermanentObjects") && !LLPathfindingManager::getInstance()->isAllowAlterPermanent()) - { - alertNoTerraformWhileFrozen(); - return; - } - for(region_list_t::iterator iter = mLastAffectedRegions.begin(); iter != mLastAffectedRegions.end(); ++iter) { @@ -389,12 +383,6 @@ BOOL LLToolBrushLand::handleMouseDown(S32 x, S32 y, MASK mask) return TRUE; } - if (!gAgent.isGodlike() && !gSavedSettings.getBOOL("PathfindingDisablePermanentObjects") && !LLPathfindingManager::getInstance()->isAllowAlterPermanent()) - { - alertNoTerraformWhileFrozen(); - return TRUE; - } - LLVector3 pos_region = region_position.getPositionRegion(); U32 grids = regionp->getLand().mGridsPerEdge; S32 i = llclamp( (S32)pos_region.mV[VX], 0, (S32)grids ); @@ -684,12 +672,6 @@ void LLToolBrushLand::alertNoTerraform(LLViewerRegion* regionp) } -// static -void LLToolBrushLand::alertNoTerraformWhileFrozen() -{ - LLNotificationsUtil::add("RegionNoTerraformingWhileFrozen"); -} - ///============================================================================ /// Local function definitions ///============================================================================ diff --git a/indra/newview/lltoolbrush.h b/indra/newview/lltoolbrush.h index 416cdf429c..1c7f198900 100644 --- a/indra/newview/lltoolbrush.h +++ b/indra/newview/lltoolbrush.h @@ -86,9 +86,6 @@ protected: // Modal dialog that you can't terraform the region void alertNoTerraform(LLViewerRegion* regionp); - // Modal dialog that you can't terraform in frozen mode - void alertNoTerraformWhileFrozen(); - protected: F32 mStartingZ; S32 mMouseX; diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 12f802b29a..6b7b67dab9 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -84,7 +84,6 @@ #include "llfloaterobjectweights.h" #include "llfloateropenobject.h" #include "llfloateroutbox.h" -#include "llfloaterpathfindingbasic.h" #include "llfloaterpathfindingcharacters.h" #include "llfloaterpathfindinglinksets.h" #include "llfloaterpathfindingconsole.h" @@ -247,7 +246,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("outgoing_call", "floater_outgoing_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLOutgoingCallDialog>); LLFloaterPayUtil::registerFloater(); - LLFloaterReg::add("pathfinding_basic", "floater_pathfinding_basic.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPathfindingBasic>); LLFloaterReg::add("pathfinding_characters", "floater_pathfinding_characters.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPathfindingCharacters>); LLFloaterReg::add("pathfinding_linksets", "floater_pathfinding_linksets.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPathfindingLinksets>); LLFloaterReg::add("pathfinding_console", "floater_pathfinding_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPathfindingConsole>); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 6944ae1a9b..69421d240b 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -4802,15 +4802,15 @@ class LLToolsEnablePathfinding : public view_listener_t { bool handleEvent(const LLSD& userdata) { - return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion(); + return (LLPathfindingManager::getInstance() != NULL) && LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion(); } }; -class LLToolsEnablePathfindingLinksets : public view_listener_t +class LLToolsEnablePathfindingDebug : public view_listener_t { bool handleEvent(const LLSD& userdata) { - return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLPathfindingManager::getInstance()->isAllowAlterPermanent(); + return (LLPathfindingManager::getInstance() != NULL) && LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLPathfindingManager::getInstance()->isPathfindingDebugEnabled(); } }; @@ -8209,7 +8209,7 @@ void initialize_menus() view_listener_t::addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.EnableSaveToObjectInventory"); view_listener_t::addMenu(new LLToolsEnablePathfinding(), "Tools.EnablePathfinding"); - view_listener_t::addMenu(new LLToolsEnablePathfindingLinksets(), "Tools.EnablePathfindingLinksets"); + view_listener_t::addMenu(new LLToolsEnablePathfindingDebug(), "Tools.EnablePathfindingDebug"); // Help menu // most items use the ShowFloater method diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index bfde167f18..2c4392ad33 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -5304,7 +5304,7 @@ void LLViewerObject::markForUpdate(BOOL priority) bool LLViewerObject::isPermanentEnforced() const { - return flagObjectPermanent() && !LLPathfindingManager::getInstance()->isAllowAlterPermanent() && !gAgent.isGodlike(); + return flagObjectPermanent() && (mRegionp != gAgent.getRegion()) && !gAgent.isGodlike(); } bool LLViewerObject::getIncludeInSearch() const diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 243231c65a..204cd2a57a 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1151,6 +1151,7 @@ void LLViewerRegion::getInfo(LLSD& info) void LLViewerRegion::getSimulatorFeatures(LLSD& sim_features) { sim_features = mSimulatorFeatures; + } void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features) @@ -1489,7 +1490,7 @@ void LLViewerRegion::unpackRegionHandshake() void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) { - capabilityNames.append("AgentPreferences"); + capabilityNames.append("AgentState"); capabilityNames.append("AttachmentResources"); capabilityNames.append("AvatarPickerSearch"); capabilityNames.append("CharacterProperties"); @@ -1836,4 +1837,9 @@ bool LLViewerRegion::meshRezEnabled() const mSimulatorFeatures["MeshRezEnabled"].asBoolean()); } +bool LLViewerRegion::dynamicPathfindingEnabled() const +{ + return ( mSimulatorFeatures.has("DynamicPathfindingEnabled") && + mSimulatorFeatures["DynamicPathfindingEnabled"].asBoolean()); +} diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 6004165b0e..7bf53ba542 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -285,6 +285,9 @@ public: void getSimulatorFeatures(LLSD& info); void setSimulatorFeatures(const LLSD& info); + + bool dynamicPathfindingEnabled() const; + typedef enum { CACHE_MISS_TYPE_FULL = 0, diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ee2171fb07..8bdab7d27a 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1923,7 +1923,7 @@ void LLViewerWindow::initWorldUI() LLPanelStandStopFlying* panel_stand_stop_flying = LLPanelStandStopFlying::getInstance(); panel_ssf_container->addChild(panel_stand_stop_flying); panel_ssf_container->setVisible(TRUE); - + // Load and make the toolbars visible // Note: we need to load the toolbars only *after* the user is logged in and IW if (gToolBarView) diff --git a/indra/newview/skins/default/textures/icons/Pathfinding_Dynamic.png b/indra/newview/skins/default/textures/icons/Pathfinding_Dynamic.png Binary files differnew file mode 100644 index 0000000000..2c485aef0d --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Pathfinding_Dynamic.png diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index d5d58235a4..0426fa9977 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -142,7 +142,6 @@ with the same filename but different name <texture name="Command_Outbox_Icon" file_name="toolbar_icons/outbox.png" preload="true" /> <texture name="Command_Pathfinding_Icon" file_name="toolbar_icons/land.png" preload="true" /> <texture name="Command_People_Icon" file_name="toolbar_icons/people.png" preload="true" /> - <texture name="Command_PF_Basic_Icon" file_name="toolbar_icons/land.png" preload="true" /> <texture name="Command_PF_Characters_Icon" file_name="toolbar_icons/land.png" preload="true" /> <texture name="Command_PF_Linksets_Icon" file_name="toolbar_icons/land.png" preload="true" /> <texture name="Command_Picks_Icon" file_name="toolbar_icons/picks.png" preload="true" /> @@ -433,6 +432,8 @@ with the same filename but different name <texture name="Parcel_Voice_Light" file_name="icons/Parcel_Voice_Light.png" preload="false" /> <texture name="Parcel_VoiceNo_Light" file_name="icons/Parcel_VoiceNo_Light.png" preload="false" /> + <texture name="Pathfinding_Dynamic" file_name="icons/Pathfinding_Dynamic.png" preload="false" /> + <texture name="Pause_Off" file_name="icons/Pause_Off.png" preload="false" /> <texture name="Pause_Over" file_name="icons/Pause_Over.png" preload="false" /> <texture name="Pause_Press" file_name="icons/Pause_Press.png" preload="false" /> diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_basic.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_basic.xml deleted file mode 100644 index 7af40bbff6..0000000000 --- a/indra/newview/skins/default/xui/en/floater_pathfinding_basic.xml +++ /dev/null @@ -1,79 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater - open_positioning="cascading" - can_tear_off="false" - height="213" - layout="topleft" - name="floater_pathfinding_basic" - help_topic="floater_pathfinding_basic" - reuse_instance="false" - save_rect="false" - single_instance="true" - title="Basic pathfinding setup" - width="312"> - <floater.string name="status_pathfinding_not_enabled">This region is not enabled for pathfinding.</floater.string> - <floater.string name="status_unable_to_change_state">Unable to change modes successfully.</floater.string> - <floater.string name="status_querying_state">Checking status ...</floater.string> - <text - height="13" - word_wrap="false" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - length="1" - follows="left|top" - layout="topleft" - left="15" - name="status_label" - top="8" - width="289"> - </text> - <text - height="13" - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - text_readonly_color="LabelDisabledColor" - length="1" - follows="left|top" - layout="topleft" - left="15" - name="unfreeze_label" - top_pad="4" - width="289"> - Allow object / terrain changes: - </text> - <button - follows="left|top" - height="22" - label="Unfreeze" - layout="topleft" - name="enter_unfrozen_mode" - width="116"/> - <text - height="82" - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - text_readonly_color="LabelDisabledColor" - length="1" - follows="left|top" - layout="topleft" - line_spacing.multiple="1.5" - left="15" - name="freeze_label" - top_pad="23" - width="289"> - In unfrozen mode, you can move and make changes to objects and terrain. When you are finished, click the Freeze button. It may require a few minutes to process your changes. - </text> - <button - follows="left|top" - height="22" - label="Freeze" - layout="topleft" - name="enter_frozen_mode" - top_pad="0" - width="116"/> -</floater> diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml index 54d44be015..59b816b0e1 100644 --- a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml +++ b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml @@ -9,7 +9,7 @@ reuse_instance="true" save_rect="true" single_instance="true" - title="Pathfinding edit / test" + title="Pathfinding debug" width="456"> <floater.string name="navmesh_viewer_status_unknown"></floater.string> <floater.string name="navmesh_viewer_status_library_not_implemented">Cannot find pathing library implementation.</floater.string> @@ -21,7 +21,6 @@ <floater.string name="navmesh_viewer_status_has_navmesh">Latest navmesh has been downloaded.</floater.string> <floater.string name="navmesh_viewer_status_error">Unable to download navmesh successfully.</floater.string> <floater.string name="navmesh_simulator_status_unknown"></floater.string> - <floater.string name="navmesh_simulator_status_region_not_enabled">This region does not expose the navmesh status.</floater.string> <floater.string name="navmesh_simulator_status_pending">Navmesh has pending changes.</floater.string> <floater.string name="navmesh_simulator_status_building">Navmesh is building.</floater.string> <floater.string name="navmesh_simulator_status_some_pending">Some navmesh regions have pending changes.</floater.string> @@ -238,96 +237,9 @@ bevel_style="none" follows="left|top" layout="topleft" - name="edit_panel" - left="1" - label="Edit"> - <text - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - text_readonly_color="LabelDisabledColor" - length="1" - follows="left|top" - layout="topleft" - name="unfreeze_label" - left="16" - top_pad="16" - height="13" - width="190"> - Allow object / terrain changes: - </text> - <button - follows="left|top" - height="22" - left="16" - enabled="false" - label="Unfreeze" - layout="topleft" - name="enter_unfrozen_mode" - top_pad="5" - width="116"/> - <text - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - text_readonly_color="LabelDisabledColor" - length="1" - follows="left|top" - layout="topleft" - left="16" - name="edit_linksets_label" - top_pad="23" - height="13" - width="190"> - Edit linkset attributes: - </text> - <button - follows="left|top" - height="22" - left="16" - label="Linksets..." - layout="topleft" - name="view_and_edit_linksets" - top_pad="5" - width="116"/> - <text - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - text_readonly_color="LabelDisabledColor" - length="1" - follows="left|top" - layout="topleft" - left="16" - line_spacing.multiple="1.5" - name="freeze_label" - top_pad="23" - height="32" - width="190"> - Prevent object / terrain changes and update the navmesh: - </text> - <button - follows="left|top" - height="22" - left="16" - enabled="false" - label="Freeze" - layout="topleft" - name="enter_frozen_mode" - top_pad="3" - width="116"/> - </panel> - <panel - border="false" - bevel_style="none" - follows="left|top" - layout="topleft" left="1" name="test_panel" - label="Test"> + label="Test path"> <text height="14" word_wrap="true" diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 263e10aa1f..c881bb9d81 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -878,11 +878,11 @@ </panel.string> <panel.string name="text modify info 5"> - You can't modify this object in frozen mode + You can't modify this object across a region boundary </panel.string> <panel.string name="text modify info 6"> - You can't modify these objects in frozen mode + You can't modify these objects across a region boundary </panel.string> <panel.string name="text modify warning"> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index ad02beff7a..ecc96ab402 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -943,31 +943,13 @@ name="Pathfinding" tear_off="false"> <menu_item_call - label="Basic setup..." - name="pathfinding_basic_menu_item"> - <menu_item_call.on_click - function="Floater.ToggleOrBringToFront" - parameter="pathfinding_basic" /> - <menu_item_call.on_enable - function="Tools.EnablePathfinding" /> - </menu_item_call> - <menu_item_call - label="Edit / test..." - name="pathfinding_console_menu_item"> - <menu_item_call.on_click - function="Floater.ToggleOrBringToFront" - parameter="pathfinding_console" /> - <menu_item_call.on_enable - function="Tools.EnablePathfinding" /> - </menu_item_call> - <menu_item_call label="Linksets..." name="pathfinding_linksets_menu_item"> <menu_item_call.on_click function="Floater.ToggleOrBringToFront" parameter="pathfinding_linksets" /> <menu_item_call.on_enable - function="Tools.EnablePathfindingLinksets" /> + function="Tools.EnablePathfinding" /> </menu_item_call> <menu_item_call label="Characters..." @@ -978,6 +960,15 @@ <menu_item_call.on_enable function="Tools.EnablePathfinding" /> </menu_item_call> + <menu_item_call + label="Pathfinding debug..." + name="pathfinding_console_menu_item"> + <menu_item_call.on_click + function="Floater.ToggleOrBringToFront" + parameter="pathfinding_console" /> + <menu_item_call.on_enable + function="Tools.EnablePathfindingDebug" /> + </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 0526cf9991..e9151c2db9 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -1293,33 +1293,6 @@ The region [REGION] does not allow terraforming. <notification icon="alertmodal.tga" - name="RegionNoTerraformingWhileFrozen" - type="alertmodal"> - You cannot terraform land while in Frozen mode. Please switch to Unfrozen mode from the menu option Build->Pathfinding->Basic Setup. - <tag>fail</tag> - </notification> - - <notification - icon="alertmodal.tga" - name="AutomaticAgentStateUnfreeze" - type="alertmodal"> -You have automatically switched into Unfrozen mode because of one of the following reasons: - -- You rezzed an object marked as permanent -- You returned an object marked as permanent - -After you finish modifying your permanent objects, please remember to switch back to Frozen mode from the menu option Build->Pathfinding->Basic Setup. - <tag>confirm</tag> - <usetemplate - name="okhelpignore" - yestext="OK" - helptext="More Info" - ignoretext="Launch browser to view pathfinding help" - /> - </notification> - - <notification - icon="alertmodal.tga" name="CannotCopyWarning" type="alertmodal"> You do not have permission to copy the following items: @@ -1526,9 +1499,9 @@ Please make sure none are locked, and that you own all of them. icon="alertmodal.tga" name="CannotLinkPermanent" type="alertmodal"> -Unable to link permanent objects in frozen mode. +Unable to link permanent objects. -Please switch to unfrozen mode from the menu option Build->Pathfinding->Basic Setup. +Please move all objects to the same region, and then attempt to link the objects together again. <tag>fail</tag> </notification> @@ -5806,7 +5779,16 @@ This area has voice chat disabled. You won't be able to hear anyone talking <unique/> This area has building disabled. You can't build or rez objects here. </notification> - + + <notification + icon="notify.tga" + name="PathfindingDynamic" + persist="true" + type="notify"> + <unique/> + Dynamic pathing is enabled. + </notification> + <notification icon="notify.tga" name="SeeAvatars" diff --git a/indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml b/indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml new file mode 100644 index 0000000000..94ca00945b --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml @@ -0,0 +1,32 @@ +<?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 NavMesh" + layout="topleft" + left="10" + name="navmesh_btn" + tool_tip="Click here to rebake." + top="2" + visible="false" + width="113" /> + <button + follows="left|bottom" + height="19" + label="NavMesh Baking..." + layout="topleft" + left="10" + name="navmesh_btn_baking" + tool_tip="NavMesh is baking" + top="2" + visible="false" + width="113" /> +</panel> + diff --git a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml index 58911bed56..107683f1f0 100644 --- a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml +++ b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml @@ -97,7 +97,7 @@ visible="false" width="200"/> </layout_panel> - <layout_panel name="right_toolbar_panel" + <layout_panel name="right_toolbar_panel" auto_resize="false" height="500" width="30" diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml index 8a823e8278..dbf44d8767 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml @@ -32,11 +32,11 @@ </panel.string> <panel.string name="text modify info 5"> - You can't modify this object in frozen mode + You can't modify this object across a region boundary </panel.string> <panel.string name="text modify info 6"> - You can't modify these objects in frozen mode + You can't modify these objects across a region boundary </panel.string> <panel.string name="text modify warning"> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 84532c4c2b..e6af4cf5a6 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3325,7 +3325,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="LocationCtrlModerateIconTooltip">Moderate Region</string> <string name="LocationCtrlGeneralIconTooltip">General Region</string> <string name="LocationCtrlSeeAVsTooltip">Avatars visible and chat allowed outside of this parcel</string> - + <string name="PathfindingDynamicTooltip">Dynamic Pathfinding Enabled</string> <!-- Strings used by the (currently Linux) auto-updater app --> <string name="UpdaterWindowTitle"> [APP_NAME] Update @@ -3832,7 +3832,6 @@ Try enclosing path to the editor with double quotes. <string name="Command_Outbox_Label">Merchant outbox</string> <string name="Command_Pathfinding_Label">Pathfinding</string> <string name="Command_People_Label">People</string> - <string name="Command_PF_Basic_Label">Pathfinding Basic</string> <string name="Command_PF_Characters_Label">Pathfinding Characters</string> <string name="Command_PF_Linksets_Label">Pathfinding Linksets</string> <string name="Command_Picks_Label">Picks</string> @@ -3862,7 +3861,6 @@ Try enclosing path to the editor with double quotes. <string name="Command_Outbox_Tooltip">Transfer items to your marketplace for sale</string> <string name="Command_Pathfinding_Tooltip">Information about pathfinding</string> <string name="Command_People_Tooltip">Friends, groups, and nearby people</string> - <string name="Command_PF_Basic_Tooltip">Manipulation of pathfinding frozen/unfrozen state</string> <string name="Command_PF_Characters_Tooltip">Manipulation of pathfinding characters</string> <string name="Command_PF_Linksets_Tooltip">Manipulation of pathfinding linksets</string> <string name="Command_Picks_Tooltip">Places to show as favorites in your profile</string> diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml index 44436fb6f2..a9cb5f83ed 100644 --- a/indra/newview/skins/default/xui/en/widgets/location_input.xml +++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml @@ -112,6 +112,15 @@ follows="right|top" image_name="Parcel_Health_Dark" /> + <pathfinding_dynamic_icon + name="pathfinding_dynamic_icon" + width="14" + height="13" + top="19" + left="2" + follows="right|top" + image_name="Pathfinding_Dynamic" + /> <!-- Default text color is invisible on top of nav bar background --> <damage_text name="damage_text" |