summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autobuild.xml12
-rwxr-xr-xbuild.sh6
-rw-r--r--etc/message.xml2
-rw-r--r--indra/newview/CMakeLists.txt17
-rw-r--r--indra/newview/app_settings/commands.xml10
-rw-r--r--indra/newview/llfloaterpathfindingbasic.cpp167
-rw-r--r--indra/newview/llfloaterpathfindingbasic.h71
-rw-r--r--indra/newview/llfloaterpathfindingcharacters.cpp12
-rw-r--r--indra/newview/llfloaterpathfindingcharacters.h6
-rw-r--r--indra/newview/llfloaterpathfindingconsole.cpp175
-rw-r--r--indra/newview/llfloaterpathfindingconsole.h18
-rw-r--r--indra/newview/llfloaterpathfindinglinksets.cpp34
-rw-r--r--indra/newview/llfloaterpathfindinglinksets.h9
-rw-r--r--indra/newview/llfloaterpathfindingobjects.cpp27
-rw-r--r--indra/newview/llfloaterpathfindingobjects.h9
-rw-r--r--indra/newview/llfloatertools.cpp5
-rw-r--r--indra/newview/lllocationinputctrl.cpp72
-rw-r--r--indra/newview/lllocationinputctrl.h30
-rw-r--r--indra/newview/llpanelcontents.cpp4
-rw-r--r--indra/newview/llpanelface.cpp2
-rw-r--r--indra/newview/llpanelnavmeshrebake.cpp120
-rw-r--r--indra/newview/llpanelnavmeshrebake.h74
-rw-r--r--indra/newview/llpanelobject.cpp24
-rw-r--r--indra/newview/llpanelobject.h2
-rw-r--r--indra/newview/llpanelpermissions.cpp12
-rw-r--r--indra/newview/llpanelvolume.cpp2
-rw-r--r--indra/newview/llpathfindingcharacterlist.cpp6
-rw-r--r--indra/newview/llpathfindinglinkset.cpp133
-rw-r--r--indra/newview/llpathfindinglinkset.h11
-rw-r--r--indra/newview/llpathfindingmanager.cpp410
-rw-r--r--indra/newview/llpathfindingmanager.h84
-rw-r--r--indra/newview/llpathfindingnavmesh.h4
-rw-r--r--indra/newview/llpathfindingnavmeshstatus.cpp17
-rw-r--r--indra/newview/llpathfindingnavmeshstatus.h7
-rw-r--r--indra/newview/llpathfindingnavmeshzone.cpp2
-rw-r--r--indra/newview/llpathfindingnavmeshzone.h3
-rw-r--r--indra/newview/llpathfindingpathtool.cpp5
-rw-r--r--indra/newview/llsidepaneltaskinfo.cpp12
-rw-r--r--indra/newview/llstartup.cpp5
-rw-r--r--indra/newview/lltoolbrush.cpp18
-rw-r--r--indra/newview/lltoolbrush.h3
-rw-r--r--indra/newview/llviewerfloaterreg.cpp2
-rw-r--r--indra/newview/llviewermenu.cpp8
-rw-r--r--indra/newview/llviewerobject.cpp2
-rw-r--r--indra/newview/llviewerregion.cpp8
-rw-r--r--indra/newview/llviewerregion.h3
-rw-r--r--indra/newview/llviewerwindow.cpp2
-rw-r--r--indra/newview/skins/default/textures/icons/Pathfinding_Dirty.pngbin0 -> 553 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Pathfinding_Disabled.pngbin0 -> 384 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_pathfinding_basic.xml79
-rw-r--r--indra/newview/skins/default/xui/en/floater_pathfinding_console.xml92
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml4
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml29
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml49
-rw-r--r--indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml32
-rw-r--r--indra/newview/skins/default/xui/en/panel_toolbar_view.xml2
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_task_info.xml4
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml5
-rw-r--r--indra/newview/skins/default/xui/en/widgets/location_input.xml18
60 files changed, 779 insertions, 1206 deletions
diff --git a/autobuild.xml b/autobuild.xml
index 39c09e9d6d..5b290b88c2 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -1110,9 +1110,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>18aed5e908b5b7de719f51d1b368b54d</string>
+ <string>c57826cd993f064686b30d0d7c13b5e3</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/259057/arch/Darwin/installer/llphysicsextensions-0.1-darwin-20120607.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/259906/arch/Darwin/installer/llphysicsextensions-0.1-darwin-20120618.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@@ -1122,9 +1122,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>4b56219aad02f01324828a3034ef6b2f</string>
+ <string>0d8eae10a9e2e76d5ef169fca24b6a76</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/259057/arch/Linux/installer/llphysicsextensions-0.1-linux-20120607.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/259906/arch/Linux/installer/llphysicsextensions-0.1-linux-20120618.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
@@ -1134,9 +1134,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>90a5a1e2fd78eaaa84f36dcafe255963</string>
+ <string>6fb5e77b13ac02d9e4b33fe0ed53eb38</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/259057/arch/CYGWIN/installer/llphysicsextensions-0.1-windows-20120607.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/259906/arch/CYGWIN/installer/llphysicsextensions-0.1-windows-20120618.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
diff --git a/build.sh b/build.sh
index 8ca3208087..00a9baec0a 100755
--- a/build.sh
+++ b/build.sh
@@ -268,6 +268,12 @@ then
else
upload_item installer "$package" binary/octet-stream
upload_item quicklink "$package" binary/octet-stream
+ mapfilepath=$build_dir/newview
+ gzip $mapfilepath/secondlife-bin.MAP
+ mapfile=secondlife-bin-$arch.MAP.gz
+ mv $mapfilepath/secondlife-bin.MAP.gz $mapfilepath/$mapfile
+ upload_item mapfile "$mapfilepath/$mapfile" binary/octet-stream
+ echo "Uploaded mapfile"
[ -f summary.json ] && upload_item installer summary.json text/plain
# Upload crash reporter files.
diff --git a/etc/message.xml b/etc/message.xml
index 7dcf99f307..7b133ab205 100644
--- a/etc/message.xml
+++ b/etc/message.xml
@@ -555,7 +555,7 @@
<boolean>true</boolean>
</map>
- <key>AgentPreferencesUpdate</key>
+ <key>AgentStateUpdate</key>
<map>
<key>flavor</key>
<string>llsd</string>
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 0be289052c..04d67b5108 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
@@ -1550,7 +1550,7 @@ if (WINDOWS)
#LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS /INCLUDE:\"__tcmalloc\""
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS /INCLUDE:__tcmalloc "
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
- LINK_FLAGS_RELEASE "/FORCE:MULTIPLE"
+ LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /MAP\"secondlife-bin.MAP\" /OPT:REF"
)
if(USE_PRECOMPILED_HEADERS)
set_target_properties(
@@ -1755,6 +1755,17 @@ if (WINDOWS)
#${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2)
endif (PACKAGE)
+elseif (DARWIN)
+ set_target_properties(${VIEWER_BINARY_NAME}
+ PROPERTIES
+ LINK_FLAGS_RELEASE "${LINK_FLAGS_RELEASE} -Xlinker -dead_strip -Xlinker -map -Xlinker ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME}.MAP"
+ )
+else (WINDOWS)
+ # Linux
+ set_target_properties(${VIEWER_BINARY_NAME}
+ PROPERTIES
+ LINK_FLAGS_RELEASE "${LINK_FLAGS_RELEASE} -Wl,--Map=${VIEWER_BINARY_NAME}.MAP"
+ )
endif (WINDOWS)
# *NOTE - this list is very sensitive to ordering, test carefully on all
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/llfloaterpathfindingcharacters.cpp b/indra/newview/llfloaterpathfindingcharacters.cpp
index b4a1394b06..60e66174f3 100644
--- a/indra/newview/llfloaterpathfindingcharacters.cpp
+++ b/indra/newview/llfloaterpathfindingcharacters.cpp
@@ -160,11 +160,11 @@ LLSD LLFloaterPathfindingCharacters::convertObjectsIntoScrollListData(const LLPa
return scrollListData;
}
-void LLFloaterPathfindingCharacters::updateControls()
+void LLFloaterPathfindingCharacters::updateControlsOnScrollListChange()
{
- LLFloaterPathfindingObjects::updateControls();
- updateOnScrollListChange();
- updateStateOnActionFields();
+ LLFloaterPathfindingObjects::updateControlsOnScrollListChange();
+ updateStateOnDisplayControls();
+ showSelectedCharacterCapsules();
}
S32 LLFloaterPathfindingCharacters::getNameColumnIndex() const
@@ -233,7 +233,7 @@ LLSD LLFloaterPathfindingCharacters::buildCharacterScrollListData(const LLPathfi
return element;
}
-void LLFloaterPathfindingCharacters::updateStateOnActionFields()
+void LLFloaterPathfindingCharacters::updateStateOnDisplayControls()
{
int numSelectedItems = getNumSelectedObjects();;
#ifndef SERVER_SIDE_CHARACTER_SHAPE_ROLLOUT_COMPLETE
@@ -249,7 +249,7 @@ void LLFloaterPathfindingCharacters::updateStateOnActionFields()
}
}
-void LLFloaterPathfindingCharacters::updateOnScrollListChange()
+void LLFloaterPathfindingCharacters::showSelectedCharacterCapsules()
{
// Hide any previous capsule
hideCapsule();
diff --git a/indra/newview/llfloaterpathfindingcharacters.h b/indra/newview/llfloaterpathfindingcharacters.h
index a86a9700b1..be178d2746 100644
--- a/indra/newview/llfloaterpathfindingcharacters.h
+++ b/indra/newview/llfloaterpathfindingcharacters.h
@@ -61,7 +61,7 @@ protected:
virtual LLSD convertObjectsIntoScrollListData(const LLPathfindingObjectListPtr pObjectListPtr);
- virtual void updateControls();
+ virtual void updateControlsOnScrollListChange();
virtual S32 getNameColumnIndex() const;
virtual const LLColor4 &getBeaconColor() const;
@@ -73,8 +73,8 @@ private:
LLSD buildCharacterScrollListData(const LLPathfindingCharacter *pCharacterPtr) const;
- void updateStateOnActionFields();
- void updateOnScrollListChange();
+ void updateStateOnDisplayControls();
+ void showSelectedCharacterCapsules();
void showCapsule() const;
void hideCapsule() const;
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..a7b856b271 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()
{
}
@@ -271,9 +250,9 @@ LLSD LLFloaterPathfindingLinksets::convertObjectsIntoScrollListData(const LLPath
return scrollListData;
}
-void LLFloaterPathfindingLinksets::updateControls()
+void LLFloaterPathfindingLinksets::updateControlsOnScrollListChange()
{
- LLFloaterPathfindingObjects::updateControls();
+ LLFloaterPathfindingObjects::updateControlsOnScrollListChange();
updateEditFieldValues();
updateStateOnEditFields();
updateStateOnEditLinksetUse();
@@ -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..c9ae5a059a 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:
@@ -64,7 +60,7 @@ protected:
virtual LLSD convertObjectsIntoScrollListData(const LLPathfindingObjectListPtr pObjectListPtr);
- virtual void updateControls();
+ virtual void updateControlsOnScrollListChange();
virtual S32 getNameColumnIndex() const;
virtual const LLColor4 &getBeaconColor() const;
@@ -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/llfloaterpathfindingobjects.cpp b/indra/newview/llfloaterpathfindingobjects.cpp
index 6f183c78b1..14fa0ac428 100644
--- a/indra/newview/llfloaterpathfindingobjects.cpp
+++ b/indra/newview/llfloaterpathfindingobjects.cpp
@@ -348,7 +348,7 @@ void LLFloaterPathfindingObjects::rebuildObjectsScrollList()
mObjectsScrollList->selectMultiple(selectedUUIDs);
mObjectsScrollList->setScrollPos(origScrollPosition);
- updateControls();
+ updateControlsOnScrollListChange();
}
LLSD LLFloaterPathfindingObjects::convertObjectsIntoScrollListData(const LLPathfindingObjectListPtr pObjectListPtr)
@@ -368,11 +368,17 @@ void LLFloaterPathfindingObjects::rebuildScrollListAfterAvatarNameLoads(const LL
}
}
-void LLFloaterPathfindingObjects::updateControls()
+void LLFloaterPathfindingObjects::updateControlsOnScrollListChange()
{
updateMessagingStatus();
- updateStateOnListActionControls();
- updateStateOnEditFields();
+ updateStateOnListControls();
+ selectScrollListItemsInWorld();
+ updateStateOnActionControls();
+}
+
+void LLFloaterPathfindingObjects::updateControlsOnInWorldSelectionChange()
+{
+ updateStateOnActionControls();
}
S32 LLFloaterPathfindingObjects::getNameColumnIndex() const
@@ -491,7 +497,7 @@ LLFloaterPathfindingObjects::EMessagingState LLFloaterPathfindingObjects::getMes
void LLFloaterPathfindingObjects::setMessagingState(EMessagingState pMessagingState)
{
mMessagingState = pMessagingState;
- updateControls();
+ updateControlsOnScrollListChange();
}
void LLFloaterPathfindingObjects::onRefreshObjectsClicked()
@@ -539,13 +545,12 @@ void LLFloaterPathfindingObjects::onTeleportClicked()
void LLFloaterPathfindingObjects::onScrollListSelectionChanged()
{
- updateOnScrollListChange();
- updateControls();
+ updateControlsOnScrollListChange();
}
void LLFloaterPathfindingObjects::onInWorldSelectionListChanged()
{
- updateControls();
+ updateControlsOnInWorldSelectionChange();
}
void LLFloaterPathfindingObjects::onRegionBoundaryCrossed()
@@ -632,7 +637,7 @@ void LLFloaterPathfindingObjects::updateMessagingStatus()
mMessagingStatus->setText((LLStringExplicit)statusText, styleParams);
}
-void LLFloaterPathfindingObjects::updateStateOnListActionControls()
+void LLFloaterPathfindingObjects::updateStateOnListControls()
{
switch (getMessagingState())
{
@@ -665,7 +670,7 @@ void LLFloaterPathfindingObjects::updateStateOnListActionControls()
}
}
-void LLFloaterPathfindingObjects::updateStateOnEditFields()
+void LLFloaterPathfindingObjects::updateStateOnActionControls()
{
int numSelectedItems = mObjectsScrollList->getNumSelected();
bool isEditEnabled = (numSelectedItems > 0);
@@ -678,7 +683,7 @@ void LLFloaterPathfindingObjects::updateStateOnEditFields()
mTeleportButton->setEnabled(numSelectedItems == 1);
}
-void LLFloaterPathfindingObjects::updateOnScrollListChange()
+void LLFloaterPathfindingObjects::selectScrollListItemsInWorld()
{
mObjectsSelection.clear();
LLSelectMgr::getInstance()->deselectAll();
diff --git a/indra/newview/llfloaterpathfindingobjects.h b/indra/newview/llfloaterpathfindingobjects.h
index cf418b3b71..88790db12d 100644
--- a/indra/newview/llfloaterpathfindingobjects.h
+++ b/indra/newview/llfloaterpathfindingobjects.h
@@ -82,7 +82,8 @@ protected:
void rebuildScrollListAfterAvatarNameLoads(const LLUUID &pAvatarId);
- virtual void updateControls();
+ virtual void updateControlsOnScrollListChange();
+ virtual void updateControlsOnInWorldSelectionChange();
virtual S32 getNameColumnIndex() const;
virtual const LLColor4 &getBeaconColor() const;
@@ -124,9 +125,9 @@ private:
void handleAvatarNameLoads(const LLUUID &pAvatarId, const LLAvatarName &pAvatarName);
void updateMessagingStatus();
- void updateStateOnListActionControls();
- void updateStateOnEditFields();
- void updateOnScrollListChange();
+ void updateStateOnListControls();
+ void updateStateOnActionControls();
+ void selectScrollListItemsInWorld();
LLPathfindingObjectPtr findObject(const LLScrollListItem *pListItem) const;
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..8d9d70b50e 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -44,10 +44,14 @@
// newview includes
#include "llagent.h"
+#include "llenvmanager.h"
#include "llfloatersidepanelcontainer.h"
#include "llinventoryobserver.h"
#include "lllandmarkactions.h"
#include "lllandmarklist.h"
+#include "llpathfindingmanager.h"
+#include "llpathfindingnavmesh.h"
+#include "llpathfindingnavmeshstatus.h"
#include "llteleporthistory.h"
#include "llslurl.h"
#include "llstatusbar.h" // getHealth()
@@ -191,7 +195,9 @@ 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_dirty_icon("pathfinding_dirty_icon"),
+ pathfinding_disabled_icon("pathfinding_disabled_icon")
{
}
@@ -203,6 +209,9 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)
mAddLandmarkBtn(NULL),
mForSaleBtn(NULL),
mInfoBtn(NULL),
+ mRegionCrossingSlot(),
+ mNavMeshSlot(),
+ mIsNavMeshDirty(false),
mLandmarkImageOn(NULL),
mLandmarkImageOff(NULL),
mIconMaturityGeneral(NULL),
@@ -270,7 +279,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 +288,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 +345,21 @@ 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_dirty_icon = p.pathfinding_dirty_icon;
+ pathfinding_dirty_icon.tool_tip = LLTrans::getString("LocationCtrlPathfindingDirtyTooltip");
+ pathfinding_dirty_icon.mouse_opaque = true;
+ mParcelIcon[PATHFINDING_DIRTY_ICON] = LLUICtrlFactory::create<LLIconCtrl>(pathfinding_dirty_icon);
+ mParcelIcon[PATHFINDING_DIRTY_ICON]->setMouseDownCallback(boost::bind(&LLLocationInputCtrl::onParcelIconClick, this, PATHFINDING_DIRTY_ICON));
+ addChild(mParcelIcon[PATHFINDING_DIRTY_ICON]);
+
+ LLIconCtrl::Params pathfinding_disabled_icon = p.pathfinding_disabled_icon;
+ pathfinding_disabled_icon.tool_tip = LLTrans::getString("LocationCtrlPathfindingDisabledTooltip");
+ pathfinding_disabled_icon.mouse_opaque = true;
+ mParcelIcon[PATHFINDING_DISABLED_ICON] = LLUICtrlFactory::create<LLIconCtrl>(pathfinding_disabled_icon);
+ mParcelIcon[PATHFINDING_DISABLED_ICON]->setMouseDownCallback(boost::bind(&LLLocationInputCtrl::onParcelIconClick, this, PATHFINDING_DISABLED_ICON));
+ addChild(mParcelIcon[PATHFINDING_DISABLED_ICON]);
+
LLTextBox::Params damage_text = p.damage_text;
damage_text.tool_tip = LLTrans::getString("LocationCtrlDamageTooltip");
damage_text.mouse_opaque = true;
@@ -391,6 +414,9 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)
mLocationHistoryConnection = LLLocationHistory::getInstance()->setChangedCallback(
boost::bind(&LLLocationInputCtrl::onLocationHistoryChanged, this,_1));
+ mRegionCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLLocationInputCtrl::onRegionBoundaryCrossed, this));
+ createNavMeshStatusListenerForCurrentRegion();
+
mRemoveLandmarkObserver = new LLRemoveLandmarkObserver(this);
mAddLandmarkObserver = new LLAddLandmarkObserver(this);
gInventory.addObserver(mRemoveLandmarkObserver);
@@ -415,6 +441,8 @@ LLLocationInputCtrl::~LLLocationInputCtrl()
LLViewerParcelMgr::getInstance()->removeObserver(mParcelChangeObserver);
delete mParcelChangeObserver;
+ mRegionCrossingSlot.disconnect();
+ mNavMeshSlot.disconnect();
mCoordinatesControlConnection.disconnect();
mParcelPropertiesControlConnection.disconnect();
mParcelMgrConnection.disconnect();
@@ -636,6 +664,17 @@ void LLLocationInputCtrl::onMaturityButtonClicked()
LLUI::sHelpImpl->showTopic(mMaturityHelpTopic);
}
+void LLLocationInputCtrl::onRegionBoundaryCrossed()
+{
+ createNavMeshStatusListenerForCurrentRegion();
+}
+
+void LLLocationInputCtrl::onNavMeshStatusChange(const LLPathfindingNavMeshStatus &pNavMeshStatus)
+{
+ mIsNavMeshDirty = pNavMeshStatus.isValid() && (pNavMeshStatus.getStatus() != LLPathfindingNavMeshStatus::kComplete);
+ refreshParcelIcons();
+}
+
void LLLocationInputCtrl::onLandmarkLoaded(LLLandmark* lm)
{
(void) lm;
@@ -819,6 +858,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_enabled = agent_region->dynamicPathfindingEnabled();
// Most icons are "block this ability"
mParcelIcon[VOICE_ICON]->setVisible( !allow_voice );
@@ -827,6 +867,9 @@ void LLLocationInputCtrl::refreshParcelIcons()
mParcelIcon[BUILD_ICON]->setVisible( !allow_build );
mParcelIcon[SCRIPTS_ICON]->setVisible( !allow_scripts );
mParcelIcon[DAMAGE_ICON]->setVisible( allow_damage );
+ mParcelIcon[PATHFINDING_DIRTY_ICON]->setVisible(mIsNavMeshDirty);
+ mParcelIcon[PATHFINDING_DISABLED_ICON]->setVisible(!mIsNavMeshDirty && !pathfinding_dynamic_enabled);
+
mDamageText->setVisible(allow_damage);
mParcelIcon[SEE_AVATARS_ICON]->setVisible( !see_avs );
@@ -1165,6 +1208,12 @@ void LLLocationInputCtrl::onParcelIconClick(EParcelIcon icon)
case BUILD_ICON:
LLNotificationsUtil::add("NoBuild");
break;
+ case PATHFINDING_DIRTY_ICON:
+ LLNotificationsUtil::add("PathfindingDirty");
+ break;
+ case PATHFINDING_DISABLED_ICON:
+ LLNotificationsUtil::add("DynamicPathfindingDisabled");
+ break;
case SCRIPTS_ICON:
{
LLViewerRegion* region = gAgent.getRegion();
@@ -1193,3 +1242,18 @@ void LLLocationInputCtrl::onParcelIconClick(EParcelIcon icon)
// no default to get compiler warning when a new icon gets added
}
}
+
+void LLLocationInputCtrl::createNavMeshStatusListenerForCurrentRegion()
+{
+ if (mNavMeshSlot.connected())
+ {
+ mNavMeshSlot.disconnect();
+ }
+
+ LLViewerRegion *currentRegion = gAgent.getRegion();
+ if (currentRegion != NULL)
+ {
+ mNavMeshSlot = LLPathfindingManager::getInstance()->registerNavMeshListenerForRegion(currentRegion, boost::bind(&LLLocationInputCtrl::onNavMeshStatusChange, this, _2));
+ LLPathfindingManager::getInstance()->requestGetNavMeshForRegion(currentRegion, true);
+ }
+}
diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h
index ed47ba73e3..cd6fd24077 100644
--- a/indra/newview/lllocationinputctrl.h
+++ b/indra/newview/lllocationinputctrl.h
@@ -31,6 +31,7 @@
#include "lliconctrl.h" // Params
#include "lltextbox.h" // Params
#include "lllocationhistory.h"
+#include "llpathfindingnavmesh.h"
class LLLandmark;
@@ -40,6 +41,7 @@ class LLRemoveLandmarkObserver;
class LLParcelChangeObserver;
class LLMenuGL;
class LLTeleportHistoryItem;
+class LLPathfindingNavMeshStatus;
/**
* Location input control.
@@ -78,7 +80,9 @@ public:
build_icon,
scripts_icon,
damage_icon,
- see_avatars_icon;
+ see_avatars_icon,
+ pathfinding_dirty_icon,
+ pathfinding_disabled_icon;
Optional<LLTextBox::Params> damage_text;
Params();
};
@@ -110,13 +114,15 @@ private:
enum EParcelIcon
{
VOICE_ICON = 0,
- FLY_ICON, // 1
- PUSH_ICON, // 2
- BUILD_ICON, // 3
- SCRIPTS_ICON, // 4
- DAMAGE_ICON, // 5
- SEE_AVATARS_ICON, // 6
- ICON_COUNT // 7 total
+ FLY_ICON, // 1
+ PUSH_ICON, // 2
+ BUILD_ICON, // 3
+ SCRIPTS_ICON, // 4
+ DAMAGE_ICON, // 5
+ SEE_AVATARS_ICON, // 6
+ PATHFINDING_DIRTY_ICON, // 7
+ PATHFINDING_DISABLED_ICON,// 8
+ ICON_COUNT // 9 total
};
friend class LLUICtrlFactory;
@@ -155,11 +161,15 @@ private:
void onAddLandmarkButtonClicked();
void onAgentParcelChange();
void onMaturityButtonClicked();
+ void onRegionBoundaryCrossed();
+ void onNavMeshStatusChange(const LLPathfindingNavMeshStatus &pNavMeshStatus);
// callbacks
bool onLocationContextMenuItemEnabled(const LLSD& userdata);
void onLocationContextMenuItemClicked(const LLSD& userdata);
void onParcelIconClick(EParcelIcon icon);
+ void createNavMeshStatusListenerForCurrentRegion();
+
LLMenuGL* mLocationContextMenu;
LLButton* mAddLandmarkBtn;
LLButton* mForSaleBtn;
@@ -179,11 +189,15 @@ private:
boost::signals2::connection mParcelPropertiesControlConnection;
boost::signals2::connection mParcelMgrConnection;
boost::signals2::connection mLocationHistoryConnection;
+ boost::signals2::connection mRegionCrossingSlot;
+ LLPathfindingNavMesh::navmesh_slot_t mNavMeshSlot;
+ bool mIsNavMeshDirty;
LLUIImage* mLandmarkImageOn;
LLUIImage* mLandmarkImageOff;
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 e282a3e2f4..f49942ee97 100644
--- a/indra/newview/llpathfindingmanager.cpp
+++ b/indra/newview/llpathfindingmanager.cpp
@@ -45,30 +45,33 @@
#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"
+#include "llstartup.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 +84,10 @@ public:
LLHTTPRegistration<LLNavMeshSimStateChangeNode> gHTTPRegistrationNavMeshSimStateChangeNode(SIM_MESSAGE_NAVMESH_STATUS_UPDATE);
+
//---------------------------------------------------------------------------
// LLAgentStateChangeNode
//---------------------------------------------------------------------------
-
class LLAgentStateChangeNode : public LLHTTPNode
{
public:
@@ -100,7 +103,7 @@ LLHTTPRegistration<LLAgentStateChangeNode> gHTTPRegistrationAgentStateChangeNode
class NavMeshStatusResponder : public LLHTTPClient::Responder
{
public:
- NavMeshStatusResponder(const std::string &pCapabilityURL, LLViewerRegion *pRegion);
+ NavMeshStatusResponder(const std::string &pCapabilityURL, LLViewerRegion *pRegion, bool pIsGetStatusOnly);
virtual ~NavMeshStatusResponder();
virtual void result(const LLSD &pContent);
@@ -112,6 +115,7 @@ private:
std::string mCapabilityURL;
LLViewerRegion *mRegion;
LLUUID mRegionUUID;
+ bool mIsGetStatusOnly;
};
//---------------------------------------------------------------------------
@@ -142,7 +146,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);
@@ -152,9 +156,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
//---------------------------------------------------------------------------
@@ -263,14 +284,72 @@ private:
LLPathfindingManager::LLPathfindingManager()
: LLSingleton<LLPathfindingManager>(),
mNavMeshMap(),
+ mCrossingSlot(),
mAgentStateSignal(),
- mAgentState(kAgentStateUnknown),
- mLastKnownNonErrorAgentState(kAgentStateUnknown)
+ mNavMeshSlot()
{
}
+void LLPathfindingManager::onRegionBoundaryCrossed()
+{
+ if (mNavMeshSlot.connected())
+ {
+ mNavMeshSlot.disconnect();
+ }
+ LLViewerRegion *currentRegion = getCurrentRegion();
+ if (currentRegion != NULL)
+ {
+ mNavMeshSlot = registerNavMeshListenerForRegion(currentRegion, boost::bind(&LLPathfindingManager::handleNavMeshStatus, this, _1, _2));
+ requestGetNavMeshForRegion(currentRegion, true);
+ }
+ displayNavMeshRebakePanel();
+}
+
LLPathfindingManager::~LLPathfindingManager()
+{
+ quitSystem();
+}
+
+void LLPathfindingManager::initSystem()
{
+ if (LLPathingLib::getInstance() == NULL)
+ {
+ LLPathingLib::initSystem();
+ }
+
+ if ( !mCrossingSlot.connected() )
+ {
+ mCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLPathfindingManager::onRegionBoundaryCrossed, this));
+ }
+
+ if (mNavMeshSlot.connected())
+ {
+ mNavMeshSlot.disconnect();
+ }
+ LLViewerRegion *currentRegion = getCurrentRegion();
+ if (currentRegion != NULL)
+ {
+ mNavMeshSlot = registerNavMeshListenerForRegion(currentRegion, boost::bind(&LLPathfindingManager::handleNavMeshStatus, this, _1, _2));
+ requestGetNavMeshForRegion(currentRegion, true);
+ }
+}
+
+void LLPathfindingManager::quitSystem()
+{
+ if (mNavMeshSlot.connected())
+ {
+ mNavMeshSlot.disconnect();
+ }
+
+ if (mCrossingSlot.connected())
+ {
+ mCrossingSlot.disconnect();
+ }
+
+ if (LLPathingLib::getInstance() != NULL)
+ {
+ LLPathingLib::quitSystem();
+ }
}
bool LLPathfindingManager::isPathfindingEnabledForCurrentRegion() const
@@ -284,17 +363,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
@@ -309,7 +380,7 @@ LLPathfindingNavMesh::navmesh_slot_t LLPathfindingManager::registerNavMeshListen
return navMeshPtr->registerNavMeshListener(pNavMeshCallback);
}
-void LLPathfindingManager::requestGetNavMeshForRegion(LLViewerRegion *pRegion)
+void LLPathfindingManager::requestGetNavMeshForRegion(LLViewerRegion *pRegion, bool pIsGetStatusOnly)
{
LLPathfindingNavMeshPtr navMeshPtr = getNavMeshForRegion(pRegion);
@@ -320,7 +391,7 @@ void LLPathfindingManager::requestGetNavMeshForRegion(LLViewerRegion *pRegion)
else if (!pRegion->capabilitiesReceived())
{
navMeshPtr->handleNavMeshWaitForRegionLoad();
- pRegion->setCapabilitiesReceivedCallback(boost::bind(&LLPathfindingManager::handleDeferredGetNavMeshForRegion, this, _1));
+ pRegion->setCapabilitiesReceivedCallback(boost::bind(&LLPathfindingManager::handleDeferredGetNavMeshForRegion, this, _1, pIsGetStatusOnly));
}
else if (!isPathfindingEnabledForRegion(pRegion))
{
@@ -329,25 +400,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::ResponderPtr navMeshStatusResponder = new NavMeshStatusResponder(navMeshStatusURL, pRegion, pIsGetStatusOnly);
LLHTTPClient::get(navMeshStatusURL, navMeshStatusResponder);
-#endif // DEPRECATED_UNVERSIONED_NAVMESH
}
}
@@ -356,49 +412,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
{
@@ -548,13 +561,13 @@ void LLPathfindingManager::sendRequestGetNavMeshForRegion(LLPathfindingNavMeshPt
}
}
-void LLPathfindingManager::handleDeferredGetNavMeshForRegion(const LLUUID &pRegionUUID)
+void LLPathfindingManager::handleDeferredGetNavMeshForRegion(const LLUUID &pRegionUUID, bool pIsGetStatusOnly)
{
LLViewerRegion *currentRegion = getCurrentRegion();
if ((currentRegion != NULL) && (currentRegion->getRegionID() == pRegionUUID))
{
- requestGetNavMeshForRegion(currentRegion);
+ requestGetNavMeshForRegion(currentRegion, pIsGetStatusOnly);
}
}
@@ -578,7 +591,7 @@ void LLPathfindingManager::handleDeferredGetCharactersForRegion(const LLUUID &pR
}
}
-void LLPathfindingManager::handleNavMeshStatusRequest(const LLPathfindingNavMeshStatus &pNavMeshStatus, LLViewerRegion *pRegion)
+void LLPathfindingManager::handleNavMeshStatusRequest(const LLPathfindingNavMeshStatus &pNavMeshStatus, LLViewerRegion *pRegion, bool pIsGetStatusOnly)
{
LLPathfindingNavMeshPtr navMeshPtr = getNavMeshForRegion(pNavMeshStatus.getRegionUUID());
@@ -592,6 +605,10 @@ void LLPathfindingManager::handleNavMeshStatusRequest(const LLPathfindingNavMesh
{
navMeshPtr->handleRefresh(pNavMeshStatus);
}
+ else if (pIsGetStatusOnly)
+ {
+ navMeshPtr->handleNavMeshNewVersion(pNavMeshStatus);
+ }
else
{
sendRequestGetNavMeshForRegion(navMeshPtr, pRegion, pNavMeshStatus);
@@ -641,93 +658,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())
+ if ( !agentStateURL.empty() )
{
- setAgentState(kAgentStateNotEnabled);
- }
- else
- {
- 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
{
@@ -739,11 +695,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);
@@ -787,6 +738,79 @@ LLViewerRegion *LLPathfindingManager::getCurrentRegion() const
return gAgent.getRegion();
}
+void LLPathfindingManager::handleNavMeshStatus(LLPathfindingNavMesh::ENavMeshRequestStatus pRequestStatus, const LLPathfindingNavMeshStatus &pNavMeshStatus)
+{
+ if (!pNavMeshStatus.isValid())
+ {
+ llinfos << "STINSON DEBUG: navmesh status is invalid" << llendl;
+ }
+ else
+ {
+ switch (pNavMeshStatus.getStatus())
+ {
+ case LLPathfindingNavMeshStatus::kPending :
+ llinfos << "STINSON DEBUG: navmesh status is kPending" << llendl;
+ break;
+ case LLPathfindingNavMeshStatus::kBuilding :
+ llinfos << "STINSON DEBUG: navmesh status is kBuilding" << llendl;
+ break;
+ case LLPathfindingNavMeshStatus::kComplete :
+ llinfos << "STINSON DEBUG: navmesh status is kComplete" << llendl;
+ displayNavMeshRebakePanel();
+ break;
+ case LLPathfindingNavMeshStatus::kRepending :
+ llinfos << "STINSON DEBUG: navmesh status is kRepending" << llendl;
+ break;
+ default :
+ llinfos << "STINSON DEBUG: navmesh status is default" << llendl;
+ llassert(0);
+ break;
+ }
+ }
+}
+
+void LLPathfindingManager::displayNavMeshRebakePanel()
+{
+ 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();
+}
+
+void LLPathfindingManager::hideNavMeshRebakePanel()
+{
+ LLPanelNavMeshRebake::getInstance()->setVisible( FALSE );
+}
+
+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 LLPathfindingManager::handleNavMeshRebakeResult( const LLSD &pContent )
+{
+ hideNavMeshRebakePanel();
+}
+
+void LLPathfindingManager::triggerNavMeshRebuild()
+{
+ 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 );
+ }
+}
//---------------------------------------------------------------------------
// LLNavMeshSimStateChangeNode
//---------------------------------------------------------------------------
@@ -808,23 +832,25 @@ void LLNavMeshSimStateChangeNode::post(ResponsePtr pResponse, const LLSD &pConte
void LLAgentStateChangeNode::post(ResponsePtr pResponse, const LLSD &pContext, const LLSD &pInput) const
{
-#ifdef XXX_STINSON_DEBUG_NAVMESH_ZONE
- llinfos << "STINSON DEBUG: Received AgentPreferencesUpdate: " << 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));
+ LLPathfindingManager::getInstance()->handleAgentStateUpdate();
+}
+
+void LLPathfindingManager::handleAgentStateUpdate()
+{
+ //Don't trigger if we are still loading in
+ if ( LLStartUp::getStartupState() == STATE_STARTED) { displayNavMeshRebakePanel(); }
}
//---------------------------------------------------------------------------
// NavMeshStatusResponder
//---------------------------------------------------------------------------
-NavMeshStatusResponder::NavMeshStatusResponder(const std::string &pCapabilityURL, LLViewerRegion *pRegion)
+NavMeshStatusResponder::NavMeshStatusResponder(const std::string &pCapabilityURL, LLViewerRegion *pRegion, bool pIsGetStatusOnly)
: LLHTTPClient::Responder(),
mCapabilityURL(pCapabilityURL),
mRegion(pRegion),
- mRegionUUID()
+ mRegionUUID(),
+ mIsGetStatusOnly(pIsGetStatusOnly)
{
if (mRegion != NULL)
{
@@ -842,14 +868,14 @@ void NavMeshStatusResponder::result(const LLSD &pContent)
llinfos << "STINSON DEBUG: Received requested NavMeshStatus: " << pContent << llendl;
#endif // XXX_STINSON_DEBUG_NAVMESH_ZONE
LLPathfindingNavMeshStatus navMeshStatus(mRegionUUID, pContent);
- LLPathfindingManager::getInstance()->handleNavMeshStatusRequest(navMeshStatus, mRegion);
+ LLPathfindingManager::getInstance()->handleNavMeshStatusRequest(navMeshStatus, mRegion, mIsGetStatusOnly);
}
void NavMeshStatusResponder::error(U32 pStatus, const std::string& pReason)
{
llwarns << "error with request to URL '" << mCapabilityURL << "' because " << pReason << " (statusCode:" << pStatus << ")" << llendl;
LLPathfindingNavMeshStatus navMeshStatus(mRegionUUID);
- LLPathfindingManager::getInstance()->handleNavMeshStatusRequest(navMeshStatus, mRegion);
+ LLPathfindingManager::getInstance()->handleNavMeshStatusRequest(navMeshStatus, mRegion, mIsGetStatusOnly);
}
//---------------------------------------------------------------------------
@@ -882,10 +908,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)
{
}
@@ -895,7 +920,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)
@@ -903,6 +928,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
//---------------------------------------------------------------------------
@@ -1063,3 +1112,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..a8ece11302 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,22 +62,18 @@ public:
LLPathfindingManager();
virtual ~LLPathfindingManager();
+ void initSystem();
+ void quitSystem();
+
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);
+ void requestGetNavMeshForRegion(LLViewerRegion *pRegion, bool pIsGetStatusOnly);
typedef U32 request_id_t;
typedef boost::function<void (request_id_t, ERequestStatus, LLPathfindingObjectListPtr)> object_request_callback_t;
@@ -99,46 +83,60 @@ 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 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();
+ void requestGetAgentState();
+
protected:
private:
void sendRequestGetNavMeshForRegion(LLPathfindingNavMeshPtr navMeshPtr, LLViewerRegion *pRegion, const LLPathfindingNavMeshStatus &pNavMeshStatus);
- void handleDeferredGetNavMeshForRegion(const LLUUID &pRegionUUID);
+ void handleDeferredGetNavMeshForRegion(const LLUUID &pRegionUUID, bool pIsGetStatusOnly);
void handleDeferredGetLinksetsForRegion(const LLUUID &pRegionUUID, request_id_t pRequestId, object_request_callback_t pLinksetsCallback) const;
void handleDeferredGetCharactersForRegion(const LLUUID &pRegionUUID, request_id_t pRequestId, object_request_callback_t pCharactersCallback) const;
- void handleNavMeshStatusRequest(const LLPathfindingNavMeshStatus &pNavMeshStatus, LLViewerRegion *pRegion);
+ void handleNavMeshStatusRequest(const LLPathfindingNavMeshStatus &pNavMeshStatus, LLViewerRegion *pRegion, bool pIsGetStatusOnly);
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 handleNavMeshStatus(LLPathfindingNavMesh::ENavMeshRequestStatus pRequestStatus, const LLPathfindingNavMeshStatus &pNavMeshStatus);
- agent_state_signal_t mAgentStateSignal;
- EAgentState mAgentState;
- EAgentState mLastKnownNonErrorAgentState;
+ void displayNavMeshRebakePanel();
+ void hideNavMeshRebakePanel();
+ void handleAgentStateResult(const LLSD &pContent );
+ void handleAgentStateError(U32 pStatus, const std::string &pReason, const std::string &pURL);
+
+ NavMeshMap mNavMeshMap;
+ agent_state_slot_t mCrossingSlot;
+ agent_state_signal_t mAgentStateSignal;
+ LLPathfindingNavMesh::navmesh_slot_t mNavMeshSlot;
};
+
#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.cpp b/indra/newview/llpathfindingnavmeshstatus.cpp
index 31ff85c1a1..5cddb995a4 100644
--- a/indra/newview/llpathfindingnavmeshstatus.cpp
+++ b/indra/newview/llpathfindingnavmeshstatus.cpp
@@ -34,7 +34,6 @@
#include <string>
#define REGION_FIELD "region_id"
-#define DEPRECATED_STATE_FIELD "state"
#define STATUS_FIELD "status"
#define VERSION_FIELD "version"
@@ -115,25 +114,9 @@ void LLPathfindingNavMeshStatus::parseStatus(const LLSD &pContent)
llassert(pContent.get(VERSION_FIELD).asInteger() >= 0);
mVersion = static_cast<U32>(pContent.get(VERSION_FIELD).asInteger());
-#ifdef DEPRECATED_STATE_FIELD
- std::string status;
- if (pContent.has(DEPRECATED_STATE_FIELD))
- {
- llassert(pContent.has(DEPRECATED_STATE_FIELD));
- llassert(pContent.get(DEPRECATED_STATE_FIELD).isString());
- status = pContent.get(DEPRECATED_STATE_FIELD).asString();
- }
- else
- {
- llassert(pContent.has(STATUS_FIELD));
- llassert(pContent.get(STATUS_FIELD).isString());
- status = pContent.get(STATUS_FIELD).asString();
- }
-#else // DEPRECATED_STATE_FIELD
llassert(pContent.has(STATUS_FIELD));
llassert(pContent.get(STATUS_FIELD).isString());
std::string status = pContent.get(STATUS_FIELD).asString();
-#endif // DEPRECATED_STATE_FIELD
if (LLStringUtil::compareStrings(status, sStatusPending) == 0)
{
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.cpp b/indra/newview/llpathfindingnavmeshzone.cpp
index 816c94e25e..69c76c9407 100644
--- a/indra/newview/llpathfindingnavmeshzone.cpp
+++ b/indra/newview/llpathfindingnavmeshzone.cpp
@@ -393,7 +393,7 @@ void LLPathfindingNavMeshZone::NavMeshLocation::refresh()
else
{
llassert(mRegionUUID == region->getRegionID());
- LLPathfindingManager::getInstance()->requestGetNavMeshForRegion(region);
+ LLPathfindingManager::getInstance()->requestGetNavMeshForRegion(region, false);
}
}
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 f7d1e2a331..b995a45a75 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"
@@ -2164,6 +2165,10 @@ bool idle_startup()
LLIMFloater::initIMFloater();
display_startup();
+ llassert(LLPathfindingManager::getInstance() != NULL);
+ LLPathfindingManager::getInstance()->initSystem();
+ LLPathfindingManager::getInstance()->requestGetAgentState();
+
return TRUE;
}
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_Dirty.png b/indra/newview/skins/default/textures/icons/Pathfinding_Dirty.png
new file mode 100644
index 0000000000..cfa12cb7cc
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Pathfinding_Dirty.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Pathfinding_Disabled.png b/indra/newview/skins/default/textures/icons/Pathfinding_Disabled.png
new file mode 100644
index 0000000000..0622141848
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Pathfinding_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index d5d58235a4..b76f04d17f 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,9 @@ 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_Dirty" file_name="icons/Pathfinding_Dirty.png" preload="false" />
+ <texture name="Pathfinding_Disabled" file_name="icons/Pathfinding_Disabled.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 38e041fa20..b7e336e095 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -1300,33 +1300,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:
@@ -1533,9 +1506,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>
@@ -5815,6 +5788,24 @@ This area has building disabled. You can&apos;t build or rez objects here.
</notification>
<notification
+ icon="notify.tga"
+ name="PathfindingDirty"
+ persist="true"
+ type="notify">
+ <unique/>
+ The pathfinding navmesh is not up-to-date on the current region. If you have build rights, you may rebake the navmesh by clicking on the Rebake Region button.
+ </notification>
+
+ <notification
+ icon="notify.tga"
+ name="DynamicPathfindingDisabled"
+ persist="true"
+ type="notify">
+ <unique/>
+ Dynamic pathfinding is not enabled on this region.
+ </notification>
+
+ <notification
icon="notify.tga"
name="SeeAvatars"
persist="true"
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..4fdbe557b9 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3325,7 +3325,8 @@ 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="LocationCtrlPathfindingDirtyTooltip">The pathfinding navmesh is not up-to-date.</string>
+ <string name="LocationCtrlPathfindingDisabledTooltip">Dynamic pathfinding is not disabled on this region.</string>
<!-- Strings used by the (currently Linux) auto-updater app -->
<string name="UpdaterWindowTitle">
[APP_NAME] Update
@@ -3832,7 +3833,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 +3862,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..0eec895b04 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,24 @@
follows="right|top"
image_name="Parcel_Health_Dark"
/>
+ <pathfinding_dirty_icon
+ name="pathfinding_dirty_icon"
+ width="14"
+ height="13"
+ top="19"
+ left="2"
+ follows="right|top"
+ image_name="Pathfinding_Dirty"
+ />
+ <pathfinding_disabled_icon
+ name="pathfinding_disabled_icon"
+ width="14"
+ height="13"
+ top="19"
+ left="2"
+ follows="right|top"
+ image_name="Pathfinding_Disabled"
+ />
<!-- Default text color is invisible on top of nav bar background -->
<damage_text
name="damage_text"