summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprep <none@none>2012-02-13 10:11:22 -0500
committerprep <none@none>2012-02-13 10:11:22 -0500
commitca79e6bb048fd28412cf1474952db18a3284416f (patch)
tree66d86fbd7c9562798ea54e5f760ff5cc777e09ec
parent6d6c38f21688eb99691a8273e0779c50dfa69db7 (diff)
parentefdba568f60a8d939fcfd40ee0cf6a8e205a5e0b (diff)
merge
-rw-r--r--indra/newview/CMakeLists.txt4
-rw-r--r--indra/newview/app_settings/commands.xml6
-rw-r--r--indra/newview/llfloaterpathfindingcharacters.cpp6
-rw-r--r--indra/newview/llfloaterpathfindingconsole.cpp465
-rw-r--r--indra/newview/llfloaterpathfindingconsole.h (renamed from indra/newview/llfloaterpathfindingsetup.h)76
-rw-r--r--indra/newview/llfloaterpathfindingsetup.cpp653
-rw-r--r--indra/newview/llnavmeshstation.cpp2
-rw-r--r--indra/newview/llnavmeshstation.h14
-rw-r--r--indra/newview/llviewerdisplay.cpp2
-rw-r--r--indra/newview/llviewerfloaterreg.cpp4
-rw-r--r--indra/newview/llviewermenu.cpp49
-rw-r--r--indra/newview/llviewermenu.h2
-rw-r--r--indra/newview/llviewerwindow.cpp4
-rw-r--r--indra/newview/skins/default/xui/en/floater_pathfinding_console.xml378
-rw-r--r--indra/newview/skins/default/xui/en/floater_pathfinding_setup.xml466
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml4
16 files changed, 935 insertions, 1200 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 76aa982f1d..45688a1724 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -219,8 +219,8 @@ set(viewer_SOURCE_FILES
llfloateropenobject.cpp
llfloateroutbox.cpp
llfloaterpathfindingcharacters.cpp
+ llfloaterpathfindingconsole.cpp
llfloaterpathfindinglinksets.cpp
- llfloaterpathfindingsetup.cpp
llfloaterpay.cpp
llfloaterperms.cpp
llfloaterpostprocess.cpp
@@ -782,8 +782,8 @@ set(viewer_HEADER_FILES
llfloateropenobject.h
llfloateroutbox.h
llfloaterpathfindingcharacters.h
+ llfloaterpathfindingconsole.h
llfloaterpathfindinglinksets.h
- llfloaterpathfindingsetup.h
llfloaterpay.h
llfloaterperms.h
llfloaterpostprocess.h
diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml
index 4ff6b6f37d..e8454f6dad 100644
--- a/indra/newview/app_settings/commands.xml
+++ b/indra/newview/app_settings/commands.xml
@@ -155,15 +155,15 @@
is_running_function="Floater.IsOpen"
is_running_parameters="people"
/>
- <command name="pathfinding_setup"
+ <command name="pathfinding_console"
available_in_toybox="false"
icon="Command_Pathfinding_Icon"
label_ref="Command_Pathfinding_Label"
tooltip_ref="Command_Pathfinding_Tooltip"
execute_function="Floater.ToggleOrBringToFront"
- execute_parameters="pathfinding_setup"
+ execute_parameters="pathfinding_console"
is_running_function="Floater.IsOpen"
- is_running_parameters="pathfinding_setup"
+ is_running_parameters="pathfinding_console"
/>
<command name="pathfinding_characters"
available_in_toybox="false"
diff --git a/indra/newview/llfloaterpathfindingcharacters.cpp b/indra/newview/llfloaterpathfindingcharacters.cpp
index 561ad9535b..25642f0226 100644
--- a/indra/newview/llfloaterpathfindingcharacters.cpp
+++ b/indra/newview/llfloaterpathfindingcharacters.cpp
@@ -356,12 +356,12 @@ void LLFloaterPathfindingCharacters::onTakeCopyCharactersClicked()
void LLFloaterPathfindingCharacters::onReturnCharactersClicked()
{
- llwarns << "functionality has not yet been implemented to return characters" << llendl;
+ handle_object_return();
}
void LLFloaterPathfindingCharacters::onDeleteCharactersClicked()
{
- handle_object_delete();
+ handle_object_delete();
}
void LLFloaterPathfindingCharacters::onTeleportCharacterToMeClicked()
@@ -528,7 +528,7 @@ void LLFloaterPathfindingCharacters::setEnableActionFields(BOOL pEnabled)
mShowBeaconCheckBox->setEnabled(pEnabled);
mTakeBtn->setEnabled(pEnabled && tools_visible_take_object());
mTakeCopyBtn->setEnabled(pEnabled && enable_object_take_copy());
- mReturnBtn->setEnabled(false && pEnabled);
+ mReturnBtn->setEnabled(pEnabled && enable_object_return());
mDeleteBtn->setEnabled(pEnabled && enable_object_delete());
mTeleportBtn->setEnabled(pEnabled && (mCharactersScrollList->getNumSelected() == 1));
}
diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp
new file mode 100644
index 0000000000..ca39463b24
--- /dev/null
+++ b/indra/newview/llfloaterpathfindingconsole.cpp
@@ -0,0 +1,465 @@
+/**
+* @file llfloaterpathfindingconsole.cpp
+* @author William Todd Stinson
+* @brief "Pathfinding console" floater, allowing manipulation of the Havok AI pathfinding settings.
+*
+* $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 "llfloaterpathfindingconsole.h"
+#include "llfloaterpathfindinglinksets.h"
+
+#include "llsd.h"
+#include "llagent.h"
+#include "llbutton.h"
+#include "llradiogroup.h"
+#include "llsliderctrl.h"
+#include "lllineeditor.h"
+#include "lltextbase.h"
+#include "lltextvalidate.h"
+#include "llnavmeshstation.h"
+#include "llviewerregion.h"
+
+#include "LLPathingLib.h"
+
+#define XUI_CHARACTER_TYPE_A 1
+#define XUI_CHARACTER_TYPE_B 2
+#define XUI_CHARACTER_TYPE_C 3
+#define XUI_CHARACTER_TYPE_D 4
+
+const int CURRENT_REGION = 99;
+const int MAX_OBSERVERS = 10;
+//---------------------------------------------------------------------------
+// LLFloaterPathfindingConsole
+//---------------------------------------------------------------------------
+
+BOOL LLFloaterPathfindingConsole::postBuild()
+{
+ childSetAction("view_and_edit_linksets", boost::bind(&LLFloaterPathfindingConsole::onViewEditLinksetClicked, this));
+
+ mShowNavMeshCheckBox = findChild<LLCheckBoxCtrl>("show_navmesh");
+ llassert(mShowNavMeshCheckBox != NULL);
+ mShowNavMeshCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowNavMeshToggle, this));
+
+ mShowWalkablesCheckBox = findChild<LLCheckBoxCtrl>("show_walkables");
+ llassert(mShowWalkablesCheckBox != NULL);
+ mShowWalkablesCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowWalkablesToggle, this));
+
+ mShowStaticObstaclesCheckBox = findChild<LLCheckBoxCtrl>("show_static_obstacles");
+ llassert(mShowStaticObstaclesCheckBox != NULL);
+ mShowStaticObstaclesCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowStaticObstaclesToggle, this));
+
+ mShowMaterialVolumesCheckBox = findChild<LLCheckBoxCtrl>("show_material_volumes");
+ llassert(mShowMaterialVolumesCheckBox != NULL);
+ mShowMaterialVolumesCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowMaterialVolumesToggle, this));
+
+ mShowExclusionVolumesCheckBox = findChild<LLCheckBoxCtrl>("show_exclusion_volumes");
+ llassert(mShowExclusionVolumesCheckBox != NULL);
+ mShowExclusionVolumesCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowExclusionVolumesToggle, this));
+
+ mShowWorldCheckBox = findChild<LLCheckBoxCtrl>("show_world");
+ llassert(mShowWorldCheckBox != NULL);
+ mShowWorldCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowWorldToggle, this));
+
+ mPathfindingStatus = findChild<LLTextBase>("pathfinding_status");
+ llassert(mPathfindingStatus != NULL);
+
+ mCharacterWidthSlider = findChild<LLSliderCtrl>("character_width");
+ llassert(mCharacterWidthSlider != NULL);
+ mCharacterWidthSlider->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onCharacterWidthSet, this));
+
+ mCharacterTypeRadioGroup = findChild<LLRadioGroup>("character_type");
+ llassert(mCharacterTypeRadioGroup != NULL);
+ mCharacterTypeRadioGroup->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onCharacterTypeSwitch, this));
+
+ return LLFloater::postBuild();
+}
+
+F32 LLFloaterPathfindingConsole::getCharacterWidth() const
+{
+ return mCharacterWidthSlider->getValueF32();
+}
+
+void LLFloaterPathfindingConsole::setCharacterWidth(F32 pCharacterWidth)
+{
+ mCharacterWidthSlider->setValue(LLSD(pCharacterWidth));
+}
+
+LLFloaterPathfindingConsole::ECharacterType LLFloaterPathfindingConsole::getCharacterType() const
+{
+ ECharacterType characterType;
+
+ switch (mCharacterTypeRadioGroup->getValue().asInteger())
+ {
+ case XUI_CHARACTER_TYPE_A :
+ characterType = kCharacterTypeA;
+ break;
+ case XUI_CHARACTER_TYPE_B :
+ characterType = kCharacterTypeB;
+ break;
+ case XUI_CHARACTER_TYPE_C :
+ characterType = kCharacterTypeC;
+ break;
+ case XUI_CHARACTER_TYPE_D :
+ characterType = kCharacterTypeD;
+ break;
+ default :
+ characterType = kCharacterTypeA;
+ llassert(0);
+ break;
+ }
+
+ return characterType;
+}
+
+void LLFloaterPathfindingConsole::setCharacterType(ECharacterType pCharacterType)
+{
+ LLSD radioGroupValue;
+
+ switch (pCharacterType)
+ {
+ case kCharacterTypeA :
+ radioGroupValue = XUI_CHARACTER_TYPE_A;
+ break;
+ case kCharacterTypeB :
+ radioGroupValue = XUI_CHARACTER_TYPE_B;
+ break;
+ case kCharacterTypeC :
+ radioGroupValue = XUI_CHARACTER_TYPE_C;
+ break;
+ case kCharacterTypeD :
+ radioGroupValue = XUI_CHARACTER_TYPE_D;
+ break;
+ default :
+ radioGroupValue = XUI_CHARACTER_TYPE_A;
+ llassert(0);
+ break;
+ }
+
+ mCharacterTypeRadioGroup->setValue(radioGroupValue);
+}
+
+void LLFloaterPathfindingConsole::setHasNavMeshReceived()
+{
+ std::string str = getString("navmesh_fetch_complete_available");
+ mPathfindingStatus->setText((LLStringExplicit)str);
+ //check to see if all regions are done loading and they are then stitch the navmeshes together
+ --mNavMeshCnt;
+ if ( mNavMeshCnt == 0 )
+ {
+ LLPathingLib::getInstance()->stitchNavMeshes();
+ }
+}
+
+void LLFloaterPathfindingConsole::setHasNoNavMesh()
+{
+ std::string str = getString("navmesh_fetch_complete_none");
+ mPathfindingStatus->setText((LLStringExplicit)str);
+}
+
+LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& pSeed)
+ : LLFloater(pSeed),
+ mShowNavMeshCheckBox(NULL),
+ mShowWalkablesCheckBox(NULL),
+ mShowStaticObstaclesCheckBox(NULL),
+ mShowMaterialVolumesCheckBox(NULL),
+ mShowExclusionVolumesCheckBox(NULL),
+ mShowWorldCheckBox(NULL),
+ mCharacterWidthSlider(NULL),
+ mCharacterTypeRadioGroup(NULL),
+ mPathfindingStatus(NULL),
+ mNavMeshCnt(0),
+ mHasStartPoint(false),
+ mHasEndPoint(false)
+{
+ for (int i=0;i<MAX_OBSERVERS;++i)
+ {
+ mNavMeshDownloadObserver[i].setPathfindingConsole(this);
+ }
+}
+
+LLFloaterPathfindingConsole::~LLFloaterPathfindingConsole()
+{
+}
+
+void LLFloaterPathfindingConsole::onOpen(const LLSD& pKey)
+{
+ //make sure we have a pathing system
+ if ( !LLPathingLib::getInstance() )
+ {
+ LLPathingLib::initSystem();
+ }
+ if ( LLPathingLib::getInstance() == NULL )
+ {
+ std::string str = getString("navmesh_library_not_implemented");
+ LLStyle::Params styleParams;
+ styleParams.color = LLUIColorTable::instance().getColor("DrYellow");
+ mPathfindingStatus->setText((LLStringExplicit)str, styleParams);
+ llwarns <<"Errror: cannout find pathing library implementation."<<llendl;
+ }
+ else
+ {
+ LLPathingLib::getInstance()->cleanupResidual();
+
+ mCurrentMDO = 0;
+ mNavMeshCnt = 0;
+
+ //make sure the region is essentially enabled for navmesh support
+ std::string capability = "RetrieveNavMeshSrc";
+
+ //prep# neighboring navmesh support proto
+ LLViewerRegion* pCurrentRegion = gAgent.getRegion();
+ std::vector<LLViewerRegion*> regions;
+ regions.push_back( pCurrentRegion );
+ pCurrentRegion->getNeighboringRegions( regions );
+
+ std::vector<int> shift;
+ shift.push_back( CURRENT_REGION );
+ pCurrentRegion->getNeighboringRegionsStatus( shift );
+
+ //If the navmesh shift ops and the total region counts do not match - use the current region, only.
+ if ( shift.size() != regions.size() )
+ {
+ shift.clear();regions.clear();
+ regions.push_back( pCurrentRegion );
+ shift.push_back( CURRENT_REGION );
+ }
+ int regionCnt = regions.size();
+ mNavMeshCnt = regionCnt;
+ for ( int i=0; i<regionCnt; ++i )
+ {
+ std::string url = regions[i]->getCapability( capability );
+
+ if ( !url.empty() )
+ {
+ std::string str = getString("navmesh_fetch_inprogress");
+ mPathfindingStatus->setText((LLStringExplicit)str);
+ LLNavMeshStation::getInstance()->setNavMeshDownloadURL( url );
+ int dir = shift[i];
+ LLNavMeshStation::getInstance()->downloadNavMeshSrc( mNavMeshDownloadObserver[mCurrentMDO].getObserverHandle(), dir );
+ ++mCurrentMDO;
+ }
+ else
+ {
+ --mNavMeshCnt;
+ std::string str = getString("navmesh_region_not_enabled");
+ LLStyle::Params styleParams;
+ styleParams.color = LLUIColorTable::instance().getColor("DrYellow");
+ mPathfindingStatus->setText((LLStringExplicit)str, styleParams);
+ llinfos<<"Region has does not required caps of type ["<<capability<<"]"<<llendl;
+ }
+ }
+ LLPathingLib::getInstance()->setRenderPath(true);
+ }
+}
+
+void LLFloaterPathfindingConsole::onClose(bool app_quitting)
+{
+ //make sure we have a pathing system
+ if ( !LLPathingLib::getInstance() )
+ {
+ LLPathingLib::getInstance()->setRenderPath(false);
+ }
+}
+
+void LLFloaterPathfindingConsole::onShowNavMeshToggle()
+{
+ BOOL checkBoxValue = mShowNavMeshCheckBox->get();
+
+ LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
+ if (llPathingLibInstance != NULL)
+ {
+ llPathingLibInstance->setRenderNavMesh(checkBoxValue);
+ }
+ else
+ {
+ mShowNavMeshCheckBox->set(FALSE);
+ llwarns << "cannot find LLPathingLib instance" << llendl;
+ }
+}
+
+void LLFloaterPathfindingConsole::onShowWalkablesToggle()
+{
+ BOOL checkBoxValue = mShowWalkablesCheckBox->get();
+
+ LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
+ if (llPathingLibInstance != NULL)
+ {
+ //llPathingLibInstance->setRenderNavMesh(checkBoxValue);
+ llwarns << "functionality has not yet been implemented to set walkables to "
+ << (checkBoxValue ? "TRUE" : "FALSE") << llendl;
+
+ }
+ else
+ {
+ mShowWalkablesCheckBox->set(FALSE);
+ llwarns << "cannot find LLPathingLib instance" << llendl;
+ }
+}
+
+void LLFloaterPathfindingConsole::onShowStaticObstaclesToggle()
+{
+ BOOL checkBoxValue = mShowStaticObstaclesCheckBox->get();
+
+ LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
+ if (llPathingLibInstance != NULL)
+ {
+ //llPathingLibInstance->setRenderNavMesh(checkBoxValue);
+ llwarns << "functionality has not yet been implemented to set static obstacles to "
+ << (checkBoxValue ? "TRUE" : "FALSE") << llendl;
+ }
+ else
+ {
+ mShowStaticObstaclesCheckBox->set(FALSE);
+ llwarns << "cannot find LLPathingLib instance" << llendl;
+ }
+}
+
+void LLFloaterPathfindingConsole::onShowMaterialVolumesToggle()
+{
+ BOOL checkBoxValue = mShowMaterialVolumesCheckBox->get();
+
+ LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
+ if (llPathingLibInstance != NULL)
+ {
+ //llPathingLibInstance->setRenderNavMesh(checkBoxValue);
+ llwarns << "functionality has not yet been implemented to set material volumes to "
+ << (checkBoxValue ? "TRUE" : "FALSE") << llendl;
+ }
+ else
+ {
+ mShowMaterialVolumesCheckBox->set(FALSE);
+ llwarns << "cannot find LLPathingLib instance" << llendl;
+ }
+}
+
+void LLFloaterPathfindingConsole::onShowExclusionVolumesToggle()
+{
+ BOOL checkBoxValue = mShowExclusionVolumesCheckBox->get();
+
+ LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
+ if (llPathingLibInstance != NULL)
+ {
+ llPathingLibInstance->setRenderShapes(checkBoxValue);
+ }
+ else
+ {
+ mShowExclusionVolumesCheckBox->set(FALSE);
+ llwarns << "cannot find LLPathingLib instance" << llendl;
+ }
+}
+
+void LLFloaterPathfindingConsole::onShowWorldToggle()
+{
+ BOOL checkBoxValue = mShowWorldCheckBox->get();
+
+ LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
+ if (llPathingLibInstance != NULL)
+ {
+ llPathingLibInstance->setRenderOverlayMode(checkBoxValue);
+ }
+ else
+ {
+ mShowWorldCheckBox->set(FALSE);
+ llwarns << "cannot find LLPathingLib instance" << llendl;
+ }
+}
+
+void LLFloaterPathfindingConsole::onCharacterWidthSet()
+{
+ generatePath();
+}
+
+void LLFloaterPathfindingConsole::onCharacterTypeSwitch()
+{
+ switch (getCharacterType())
+ {
+ case kCharacterTypeA :
+ llwarns << "functionality has not yet been implemented to toggle '"
+ << mCharacterTypeRadioGroup->getName() << "' to CharacterTypeA"
+ << llendl;
+ break;
+ case kCharacterTypeB :
+ llwarns << "functionality has not yet been implemented to toggle '"
+ << mCharacterTypeRadioGroup->getName() << "' to CharacterTypeB"
+ << llendl;
+ break;
+ case kCharacterTypeC :
+ llwarns << "functionality has not yet been implemented to toggle '"
+ << mCharacterTypeRadioGroup->getName() << "' to CharacterTypeC"
+ << llendl;
+ break;
+ case kCharacterTypeD :
+ llwarns << "functionality has not yet been implemented to toggle '"
+ << mCharacterTypeRadioGroup->getName() << "' to CharacterTypeD"
+ << llendl;
+ break;
+ default :
+ llassert(0);
+ break;
+ }
+
+}
+
+void LLFloaterPathfindingConsole::onViewEditLinksetClicked()
+{
+ LLFloaterPathfindingLinksets::openLinksetsEditor();
+}
+
+
+void LLFloaterPathfindingConsole::providePathingData( const LLVector3& point1, const LLVector3& point2 )
+{
+#if 0
+ switch (getPathSelectionState())
+ {
+ case kPathSelectNone :
+ break;
+
+ case kPathSelectStartPoint :
+ mPathData.mStartPointA = point1;
+ mPathData.mEndPointA = point2;
+ mHasStartPoint = true;
+ break;
+
+ case kPathSelectEndPoint :
+ mPathData.mStartPointB = point1;
+ mPathData.mEndPointB = point2;
+ mHasEndPoint = true;
+ break;
+
+ default :
+ llassert(0);
+ break;
+ }
+#endif
+ generatePath();
+}
+
+void LLFloaterPathfindingConsole::generatePath()
+{
+ if (mHasStartPoint && mHasEndPoint)
+ {
+ mPathData.mCharacterWidth = getCharacterWidth();
+ LLPathingLib::getInstance()->generatePath(mPathData);
+ }
+}
diff --git a/indra/newview/llfloaterpathfindingsetup.h b/indra/newview/llfloaterpathfindingconsole.h
index edb7072b28..a2e247c1c9 100644
--- a/indra/newview/llfloaterpathfindingsetup.h
+++ b/indra/newview/llfloaterpathfindingconsole.h
@@ -1,5 +1,5 @@
/**
- * @file llfloaterpathfindingsetup.h
+ * @file llfloaterpathfindingconsole.h
* @author William Todd Stinson
* @brief "Pathfinding console" floater, allowing manipulation of the Havok AI pathfinding settings.
*
@@ -25,8 +25,8 @@
* $/LicenseInfo$
*/
-#ifndef LL_LLFLOATERPATHFINDINGSETUP_H
-#define LL_LLFLOATERPATHFINDINGSETUP_H
+#ifndef LL_LLFLOATERPATHFINDINGCONSOLE_H
+#define LL_LLFLOATERPATHFINDINGCONSOLE_H
#include "llfloater.h"
#include "llnavmeshstation.h"
@@ -39,7 +39,7 @@ class LLLineEditor;
class LLTextBase;
class LLCheckBoxCtrl;
-class LLFloaterPathfindingSetup
+class LLFloaterPathfindingConsole
: public LLFloater
{
friend class LLFloaterReg;
@@ -47,19 +47,6 @@ class LLFloaterPathfindingSetup
public:
typedef enum
{
- kRenderOverlayOnFixedPhysicsGeometry = 0,
- kRenderOverlayOnAllRenderableGeometry = 1
- } ERegionOverlayDisplay;
-
- typedef enum
- {
- kPathSelectNone = 0,
- kPathSelectStartPoint = 1,
- kPathSelectEndPoint = 2
- } EPathSelectionState;
-
- typedef enum
- {
kCharacterTypeA = 0,
kCharacterTypeB = 1,
kCharacterTypeC = 2,
@@ -70,30 +57,12 @@ public:
//Populates a data packet that is forwarded onto the LLPathingSystem
void providePathingData( const LLVector3& point1, const LLVector3& point2 );
- ERegionOverlayDisplay getRegionOverlayDisplay() const;
- void setRegionOverlayDisplay(ERegionOverlayDisplay pRegionOverlayDisplay);
-
- EPathSelectionState getPathSelectionState() const;
- void setPathSelectionState(EPathSelectionState pPathSelectionState);
-
F32 getCharacterWidth() const;
void setCharacterWidth(F32 pCharacterWidth);
ECharacterType getCharacterType() const;
void setCharacterType(ECharacterType pCharacterType);
- F32 getTerrainMaterialA() const;
- void setTerrainMaterialA(F32 pTerrainMaterial);
-
- F32 getTerrainMaterialB() const;
- void setTerrainMaterialB(F32 pTerrainMaterial);
-
- F32 getTerrainMaterialC() const;
- void setTerrainMaterialC(F32 pTerrainMaterial);
-
- F32 getTerrainMaterialD() const;
- void setTerrainMaterialD(F32 pTerrainMaterial);
-
void setHasNavMeshReceived();
void setHasNoNavMesh();
@@ -102,41 +71,32 @@ protected:
private:
// Does its own instance management, so clients not allowed
// to allocate or destroy.
- LLFloaterPathfindingSetup(const LLSD& pSeed);
- virtual ~LLFloaterPathfindingSetup();
+ LLFloaterPathfindingConsole(const LLSD& pSeed);
+ virtual ~LLFloaterPathfindingConsole();
virtual void onOpen(const LLSD& pKey);
+ virtual void onClose(bool app_quitting);
void onShowNavMeshToggle();
- void onShowExcludeVolumesToggle();
- void onShowPathToggle();
- void onShowWaterPlaneToggle();
- void onRegionOverlayDisplaySwitch();
- void onPathSelectionSwitch();
+ void onShowWalkablesToggle();
+ void onShowStaticObstaclesToggle();
+ void onShowMaterialVolumesToggle();
+ void onShowExclusionVolumesToggle();
+ void onShowWorldToggle();
void onCharacterWidthSet();
void onCharacterTypeSwitch();
void onViewEditLinksetClicked();
- void onRebuildNavMeshClicked();
- void onRefreshNavMeshClicked();
- void onTerrainMaterialASet();
- void onTerrainMaterialBSet();
- void onTerrainMaterialCSet();
- void onTerrainMaterialDSet();
void generatePath();
LLCheckBoxCtrl *mShowNavMeshCheckBox;
- LLCheckBoxCtrl *mShowExcludeVolumesCheckBox;
- LLCheckBoxCtrl *mShowPathCheckBox;
- LLCheckBoxCtrl *mShowWaterPlaneCheckBox;
- LLRadioGroup *mRegionOverlayDisplayRadioGroup;
- LLRadioGroup *mPathSelectionRadioGroup;
+ LLCheckBoxCtrl *mShowWalkablesCheckBox;
+ LLCheckBoxCtrl *mShowStaticObstaclesCheckBox;
+ LLCheckBoxCtrl *mShowMaterialVolumesCheckBox;
+ LLCheckBoxCtrl *mShowExclusionVolumesCheckBox;
+ LLCheckBoxCtrl *mShowWorldCheckBox;
LLSliderCtrl *mCharacterWidthSlider;
LLRadioGroup *mCharacterTypeRadioGroup;
LLTextBase *mPathfindingStatus;
- LLLineEditor *mTerrainMaterialA;
- LLLineEditor *mTerrainMaterialB;
- LLLineEditor *mTerrainMaterialC;
- LLLineEditor *mTerrainMaterialD;
LLNavMeshDownloadObserver mNavMeshDownloadObserver[10];
int mCurrentMDO;
@@ -148,4 +108,4 @@ private:
bool mHasEndPoint;
};
-#endif // LL_LLFLOATERPATHFINDINGSETUP_H
+#endif // LL_LLFLOATERPATHFINDINGCONSOLE_H
diff --git a/indra/newview/llfloaterpathfindingsetup.cpp b/indra/newview/llfloaterpathfindingsetup.cpp
deleted file mode 100644
index dc8e96eb53..0000000000
--- a/indra/newview/llfloaterpathfindingsetup.cpp
+++ /dev/null
@@ -1,653 +0,0 @@
-/**
-* @file llfloaterpathfindingsetup.cpp
-* @author William Todd Stinson
-* @brief "Pathfinding console" floater, allowing manipulation of the Havok AI pathfinding settings.
-*
-* $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 "llfloaterpathfindingsetup.h"
-#include "llfloaterpathfindinglinksets.h"
-
-#include "llsd.h"
-#include "llagent.h"
-#include "llbutton.h"
-#include "llradiogroup.h"
-#include "llsliderctrl.h"
-#include "lllineeditor.h"
-#include "lltextbase.h"
-#include "lltextvalidate.h"
-#include "llnavmeshstation.h"
-#include "llviewerregion.h"
-
-#include "LLPathingLib.h"
-
-#define XUI_RENDER_OVERLAY_ON_FIXED_PHYSICS_GEOMETRY 1
-#define XUI_RENDER_OVERLAY_ON_ALL_RENDERABLE_GEOMETRY 2
-
-#define XUI_PATH_SELECT_NONE 0
-#define XUI_PATH_SELECT_START_POINT 1
-#define XUI_PATH_SELECT_END_POINT 2
-
-#define XUI_CHARACTER_TYPE_A 1
-#define XUI_CHARACTER_TYPE_B 2
-#define XUI_CHARACTER_TYPE_C 3
-#define XUI_CHARACTER_TYPE_D 4
-
-const int CURRENT_REGION = 99;
-const int MAX_OBSERVERS = 10;
-//---------------------------------------------------------------------------
-// LLFloaterPathfindingSetup
-//---------------------------------------------------------------------------
-
-BOOL LLFloaterPathfindingSetup::postBuild()
-{
- childSetAction("view_and_edit_linksets", boost::bind(&LLFloaterPathfindingSetup::onViewEditLinksetClicked, this));
- childSetAction("rebuild_navmesh", boost::bind(&LLFloaterPathfindingSetup::onRebuildNavMeshClicked, this));
- childSetAction("refresh_navmesh", boost::bind(&LLFloaterPathfindingSetup::onRefreshNavMeshClicked, this));
-
- mShowNavMeshCheckBox = findChild<LLCheckBoxCtrl>("show_navmesh_overlay");
- llassert(mShowNavMeshCheckBox != NULL);
- mShowNavMeshCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onShowNavMeshToggle, this));
-
- mShowExcludeVolumesCheckBox = findChild<LLCheckBoxCtrl>("show_exclusion_volumes");
- llassert(mShowExcludeVolumesCheckBox != NULL);
- mShowExcludeVolumesCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onShowExcludeVolumesToggle, this));
-
- mShowPathCheckBox = findChild<LLCheckBoxCtrl>("show_path");
- llassert(mShowPathCheckBox != NULL);
- mShowPathCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onShowPathToggle, this));
-
- mShowWaterPlaneCheckBox = findChild<LLCheckBoxCtrl>("show_water_plane");
- llassert(mShowWaterPlaneCheckBox != NULL);
- mShowWaterPlaneCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onShowWaterPlaneToggle, this));
-
- mRegionOverlayDisplayRadioGroup = findChild<LLRadioGroup>("region_overlay_display");
- llassert(mRegionOverlayDisplayRadioGroup != NULL);
- mRegionOverlayDisplayRadioGroup->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onRegionOverlayDisplaySwitch, this));
-
- mPathSelectionRadioGroup = findChild<LLRadioGroup>("path_selection");
- llassert(mPathSelectionRadioGroup != NULL);
- mPathSelectionRadioGroup ->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onPathSelectionSwitch, this));
-
- mCharacterWidthSlider = findChild<LLSliderCtrl>("character_width");
- llassert(mCharacterWidthSlider != NULL);
- mCharacterWidthSlider->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onCharacterWidthSet, this));
-
- mCharacterTypeRadioGroup = findChild<LLRadioGroup>("character_type");
- llassert(mCharacterTypeRadioGroup != NULL);
- mCharacterTypeRadioGroup->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onCharacterTypeSwitch, this));
-
- mPathfindingStatus = findChild<LLTextBase>("pathfinding_status");
- llassert(mPathfindingStatus != NULL);
-
- mTerrainMaterialA = findChild<LLLineEditor>("terrain_material_a");
- llassert(mTerrainMaterialA != NULL);
- mTerrainMaterialA->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onTerrainMaterialASet, this));
- mTerrainMaterialA->setPrevalidate(LLTextValidate::validateFloat);
-
- mTerrainMaterialB = findChild<LLLineEditor>("terrain_material_b");
- llassert(mTerrainMaterialB != NULL);
- mTerrainMaterialB->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onTerrainMaterialBSet, this));
- mTerrainMaterialB->setPrevalidate(LLTextValidate::validateFloat);
-
- mTerrainMaterialC = findChild<LLLineEditor>("terrain_material_c");
- llassert(mTerrainMaterialC != NULL);
- mTerrainMaterialC->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onTerrainMaterialCSet, this));
- mTerrainMaterialC->setPrevalidate(LLTextValidate::validateFloat);
-
- mTerrainMaterialD = findChild<LLLineEditor>("terrain_material_d");
- llassert(mTerrainMaterialD != NULL);
- mTerrainMaterialD->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onTerrainMaterialDSet, this));
- mTerrainMaterialD->setPrevalidate(LLTextValidate::validateFloat);
-
- return LLFloater::postBuild();
-}
-
-LLFloaterPathfindingSetup::ERegionOverlayDisplay LLFloaterPathfindingSetup::getRegionOverlayDisplay() const
-{
- ERegionOverlayDisplay regionOverlayDisplay;
- switch (mRegionOverlayDisplayRadioGroup->getValue().asInteger())
- {
- case XUI_RENDER_OVERLAY_ON_FIXED_PHYSICS_GEOMETRY :
- regionOverlayDisplay = kRenderOverlayOnFixedPhysicsGeometry;
- break;
- case XUI_RENDER_OVERLAY_ON_ALL_RENDERABLE_GEOMETRY :
- regionOverlayDisplay = kRenderOverlayOnAllRenderableGeometry;
- break;
- default :
- regionOverlayDisplay = kRenderOverlayOnFixedPhysicsGeometry;
- llassert(0);
- break;
- }
-
- return regionOverlayDisplay;
-}
-
-void LLFloaterPathfindingSetup::setRegionOverlayDisplay(ERegionOverlayDisplay pRegionOverlayDisplay)
-{
- LLSD radioGroupValue;
-
- switch (pRegionOverlayDisplay)
- {
- case kRenderOverlayOnFixedPhysicsGeometry :
- radioGroupValue = XUI_RENDER_OVERLAY_ON_FIXED_PHYSICS_GEOMETRY;
- break;
- case kRenderOverlayOnAllRenderableGeometry :
- radioGroupValue = XUI_RENDER_OVERLAY_ON_ALL_RENDERABLE_GEOMETRY;
- break;
- default :
- radioGroupValue = XUI_RENDER_OVERLAY_ON_FIXED_PHYSICS_GEOMETRY;
- llassert(0);
- break;
- }
-
- mRegionOverlayDisplayRadioGroup->setValue(radioGroupValue);
-}
-
-LLFloaterPathfindingSetup::EPathSelectionState LLFloaterPathfindingSetup::getPathSelectionState() const
-{
- EPathSelectionState pathSelectionState;
-
- switch (mPathSelectionRadioGroup->getValue().asInteger())
- {
- case XUI_PATH_SELECT_START_POINT :
- pathSelectionState = kPathSelectStartPoint;
- break;
- case XUI_PATH_SELECT_END_POINT :
- pathSelectionState = kPathSelectEndPoint;
- break;
- default :
- pathSelectionState = kPathSelectNone;
- break;
- }
-
- return pathSelectionState;
-}
-
-void LLFloaterPathfindingSetup::setPathSelectionState(EPathSelectionState pPathSelectionState)
-{
- LLSD radioGroupValue;
-
- switch (pPathSelectionState)
- {
- case kPathSelectStartPoint :
- radioGroupValue = XUI_PATH_SELECT_START_POINT;
- break;
- case kPathSelectEndPoint :
- radioGroupValue = XUI_PATH_SELECT_END_POINT;
- break;
- default :
- radioGroupValue = XUI_PATH_SELECT_NONE;
- break;
- }
-
- mPathSelectionRadioGroup->setValue(radioGroupValue);
-}
-
-F32 LLFloaterPathfindingSetup::getCharacterWidth() const
-{
- return mCharacterWidthSlider->getValueF32();
-}
-
-void LLFloaterPathfindingSetup::setCharacterWidth(F32 pCharacterWidth)
-{
- mCharacterWidthSlider->setValue(LLSD(pCharacterWidth));
-}
-
-LLFloaterPathfindingSetup::ECharacterType LLFloaterPathfindingSetup::getCharacterType() const
-{
- ECharacterType characterType;
-
- switch (mCharacterTypeRadioGroup->getValue().asInteger())
- {
- case XUI_CHARACTER_TYPE_A :
- characterType = kCharacterTypeA;
- break;
- case XUI_CHARACTER_TYPE_B :
- characterType = kCharacterTypeB;
- break;
- case XUI_CHARACTER_TYPE_C :
- characterType = kCharacterTypeC;
- break;
- case XUI_CHARACTER_TYPE_D :
- characterType = kCharacterTypeD;
- break;
- default :
- characterType = kCharacterTypeA;
- llassert(0);
- break;
- }
-
- return characterType;
-}
-
-void LLFloaterPathfindingSetup::setCharacterType(ECharacterType pCharacterType)
-{
- LLSD radioGroupValue;
-
- switch (pCharacterType)
- {
- case kCharacterTypeA :
- radioGroupValue = XUI_CHARACTER_TYPE_A;
- break;
- case kCharacterTypeB :
- radioGroupValue = XUI_CHARACTER_TYPE_B;
- break;
- case kCharacterTypeC :
- radioGroupValue = XUI_CHARACTER_TYPE_C;
- break;
- case kCharacterTypeD :
- radioGroupValue = XUI_CHARACTER_TYPE_D;
- break;
- default :
- radioGroupValue = XUI_CHARACTER_TYPE_A;
- llassert(0);
- break;
- }
-
- mCharacterTypeRadioGroup->setValue(radioGroupValue);
-}
-
-F32 LLFloaterPathfindingSetup::getTerrainMaterialA() const
-{
- return mTerrainMaterialA->getValue().asReal();
-}
-
-void LLFloaterPathfindingSetup::setTerrainMaterialA(F32 pTerrainMaterial)
-{
- mTerrainMaterialA->setValue(LLSD(pTerrainMaterial));
-}
-
-F32 LLFloaterPathfindingSetup::getTerrainMaterialB() const
-{
- return mTerrainMaterialB->getValue().asReal();
-}
-
-void LLFloaterPathfindingSetup::setTerrainMaterialB(F32 pTerrainMaterial)
-{
- mTerrainMaterialB->setValue(LLSD(pTerrainMaterial));
-}
-
-F32 LLFloaterPathfindingSetup::getTerrainMaterialC() const
-{
- return mTerrainMaterialC->getValue().asReal();
-}
-
-void LLFloaterPathfindingSetup::setTerrainMaterialC(F32 pTerrainMaterial)
-{
- mTerrainMaterialC->setValue(LLSD(pTerrainMaterial));
-}
-
-F32 LLFloaterPathfindingSetup::getTerrainMaterialD() const
-{
- return mTerrainMaterialD->getValue().asReal();
-}
-
-void LLFloaterPathfindingSetup::setTerrainMaterialD(F32 pTerrainMaterial)
-{
- mTerrainMaterialD->setValue(LLSD(pTerrainMaterial));
-}
-
-void LLFloaterPathfindingSetup::setHasNavMeshReceived()
-{
- std::string str = getString("navmesh_fetch_complete_available");
- mPathfindingStatus->setText((LLStringExplicit)str);
- //check to see if all regions are done loading and they are then stitch the navmeshes together
- --mNavMeshCnt;
- if ( mNavMeshCnt == 0 )
- {
- LLPathingLib::getInstance()->stitchNavMeshes();
- }
-}
-
-void LLFloaterPathfindingSetup::setHasNoNavMesh()
-{
- std::string str = getString("navmesh_fetch_complete_none");
- mPathfindingStatus->setText((LLStringExplicit)str);
-}
-
-LLFloaterPathfindingSetup::LLFloaterPathfindingSetup(const LLSD& pSeed)
- : LLFloater(pSeed),
- mShowNavMeshCheckBox(NULL),
- mShowExcludeVolumesCheckBox(NULL),
- mShowPathCheckBox(NULL),
- mShowWaterPlaneCheckBox(NULL),
- mRegionOverlayDisplayRadioGroup(NULL),
- mPathSelectionRadioGroup(NULL),
- mCharacterWidthSlider(NULL),
- mCharacterTypeRadioGroup(NULL),
- mPathfindingStatus(NULL),
- mTerrainMaterialA(NULL),
- mTerrainMaterialB(NULL),
- mTerrainMaterialC(NULL),
- mTerrainMaterialD(NULL),
- mNavMeshCnt(0),
- mHasStartPoint(false),
- mHasEndPoint(false)
-{
- for (int i=0;i<MAX_OBSERVERS;++i)
- {
- mNavMeshDownloadObserver[i].setPathfindingConsole(this);
- }
-}
-
-LLFloaterPathfindingSetup::~LLFloaterPathfindingSetup()
-{
-}
-
-void LLFloaterPathfindingSetup::onOpen(const LLSD& pKey)
-{
- //make sure we have a pathing system
- if ( !LLPathingLib::getInstance() )
- {
- LLPathingLib::initSystem();
- }
- if ( LLPathingLib::getInstance() == NULL )
- {
- std::string str = getString("navmesh_library_not_implemented");
- LLStyle::Params styleParams;
- styleParams.color = LLUIColorTable::instance().getColor("DrYellow");
- mPathfindingStatus->setText((LLStringExplicit)str, styleParams);
- llwarns <<"Errror: cannout find pathing library implementation."<<llendl;
- }
- else
- {
- LLPathingLib::getInstance()->cleanupResidual();
-
- mCurrentMDO = 0;
- mNavMeshCnt = 0;
-
- //make sure the region is essentially enabled for navmesh support
- std::string capability = "RetrieveNavMeshSrc";
-
- //prep# neighboring navmesh support proto
- LLViewerRegion* pCurrentRegion = gAgent.getRegion();
- std::vector<LLViewerRegion*> regions;
- regions.push_back( pCurrentRegion );
- pCurrentRegion->getNeighboringRegions( regions );
-
- std::vector<int> shift;
- shift.push_back( CURRENT_REGION );
- pCurrentRegion->getNeighboringRegionsStatus( shift );
-
- //If the navmesh shift ops and the total region counts do not match - use the current region, only.
- if ( shift.size() != regions.size() )
- {
- shift.clear();regions.clear();
- regions.push_back( pCurrentRegion );
- shift.push_back( CURRENT_REGION );
- }
- int regionCnt = regions.size();
- mNavMeshCnt = regionCnt;
- for ( int i=0; i<regionCnt; ++i )
- {
- std::string url = regions[i]->getCapability( capability );
-
- if ( !url.empty() )
- {
- std::string str = getString("navmesh_fetch_inprogress");
- mPathfindingStatus->setText((LLStringExplicit)str);
- LLNavMeshStation::getInstance()->setNavMeshDownloadURL( url );
- int dir = shift[i];
- LLNavMeshStation::getInstance()->downloadNavMeshSrc( mNavMeshDownloadObserver[mCurrentMDO].getObserverHandle(), dir );
- ++mCurrentMDO;
- }
- else
- {
- --mNavMeshCnt;
- std::string str = getString("navmesh_region_not_enabled");
- LLStyle::Params styleParams;
- styleParams.color = LLUIColorTable::instance().getColor("DrYellow");
- mPathfindingStatus->setText((LLStringExplicit)str, styleParams);
- llinfos<<"Region has does not required caps of type ["<<capability<<"]"<<llendl;
- }
- }
- }
-}
-
-void LLFloaterPathfindingSetup::onShowNavMeshToggle()
-{
- BOOL checkBoxValue = mShowNavMeshCheckBox->get();
-
- LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
- if (llPathingLibInstance != NULL)
- {
- llPathingLibInstance->setRenderNavMesh(checkBoxValue);
- }
- else
- {
- mShowNavMeshCheckBox->set(FALSE);
- llwarns << "cannot find LLPathingLib instance" << llendl;
- }
-}
-
-void LLFloaterPathfindingSetup::onShowExcludeVolumesToggle()
-{
- BOOL checkBoxValue = mShowExcludeVolumesCheckBox->get();
-
- LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
- if (llPathingLibInstance != NULL)
- {
- llPathingLibInstance->setRenderShapes(checkBoxValue);
- }
- else
- {
- mShowExcludeVolumesCheckBox->set(FALSE);
- llwarns << "cannot find LLPathingLib instance" << llendl;
- }
-}
-
-void LLFloaterPathfindingSetup::onShowPathToggle()
-{
- BOOL checkBoxValue = mShowPathCheckBox->get();
-
- LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
- if (llPathingLibInstance != NULL)
- {
- llPathingLibInstance->setRenderPath(checkBoxValue);
- }
- else
- {
- mShowPathCheckBox->set(FALSE);
- llwarns << "cannot find LLPathingLib instance" << llendl;
- }
-}
-
-void LLFloaterPathfindingSetup::onShowWaterPlaneToggle()
-{
- BOOL checkBoxValue = mShowWaterPlaneCheckBox->get();
-
- LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
- if (llPathingLibInstance != NULL)
- {
- llPathingLibInstance->setRenderWaterPlane(checkBoxValue);
- }
- else
- {
- mShowWaterPlaneCheckBox->set(FALSE);
- llwarns << "cannot find LLPathingLib instance" << llendl;
- }
-
- llwarns << "functionality has not yet been implemented to toggle '"
- << mShowWaterPlaneCheckBox->getLabel() << "' to "
- << (checkBoxValue ? "ON" : "OFF") << llendl;
-}
-
-void LLFloaterPathfindingSetup::onRegionOverlayDisplaySwitch()
-{
- LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
- if (llPathingLibInstance != NULL)
- {
- switch (getRegionOverlayDisplay())
- {
- case kRenderOverlayOnFixedPhysicsGeometry :
- llPathingLibInstance->setRenderOverlayMode(false);
- break;
- case kRenderOverlayOnAllRenderableGeometry :
- llPathingLibInstance->setRenderOverlayMode(true);
- break;
- default :
- llPathingLibInstance->setRenderOverlayMode(false);
- llassert(0);
- break;
- }
- }
- else
- {
- this->setRegionOverlayDisplay(kRenderOverlayOnFixedPhysicsGeometry);
- llwarns << "cannot find LLPathingLib instance" << llendl;
- }
-}
-
-void LLFloaterPathfindingSetup::onPathSelectionSwitch()
-{
- switch (getPathSelectionState())
- {
- case kPathSelectNone :
- break;
- case kPathSelectStartPoint :
- break;
- case kPathSelectEndPoint :
- break;
- default :
- llassert(0);
- break;
- }
-}
-
-void LLFloaterPathfindingSetup::onCharacterWidthSet()
-{
- generatePath();
-}
-
-void LLFloaterPathfindingSetup::onCharacterTypeSwitch()
-{
- switch (getCharacterType())
- {
- case kCharacterTypeA :
- llwarns << "functionality has not yet been implemented to toggle '"
- << mCharacterTypeRadioGroup->getName() << "' to CharacterTypeA"
- << llendl;
- break;
- case kCharacterTypeB :
- llwarns << "functionality has not yet been implemented to toggle '"
- << mCharacterTypeRadioGroup->getName() << "' to CharacterTypeB"
- << llendl;
- break;
- case kCharacterTypeC :
- llwarns << "functionality has not yet been implemented to toggle '"
- << mCharacterTypeRadioGroup->getName() << "' to CharacterTypeC"
- << llendl;
- break;
- case kCharacterTypeD :
- llwarns << "functionality has not yet been implemented to toggle '"
- << mCharacterTypeRadioGroup->getName() << "' to CharacterTypeD"
- << llendl;
- break;
- default :
- llassert(0);
- break;
- }
-
-}
-
-void LLFloaterPathfindingSetup::onViewEditLinksetClicked()
-{
- LLFloaterPathfindingLinksets::openLinksetsEditor();
-}
-
-void LLFloaterPathfindingSetup::onRebuildNavMeshClicked()
-{
- llwarns << "functionality has not yet been implemented to handle rebuilding of the navmesh" << llendl;
-}
-
-void LLFloaterPathfindingSetup::onRefreshNavMeshClicked()
-{
- llwarns << "functionality has not yet been implemented to handle refreshing of the navmesh" << llendl;
-}
-
-void LLFloaterPathfindingSetup::onTerrainMaterialASet()
-{
- F32 terrainMaterial = getTerrainMaterialA();
- llwarns << "functionality has not yet been implemented to setting '" << mTerrainMaterialA->getName()
- << "' to value (" << terrainMaterial << ")" << llendl;
-}
-
-void LLFloaterPathfindingSetup::onTerrainMaterialBSet()
-{
- F32 terrainMaterial = getTerrainMaterialB();
- llwarns << "functionality has not yet been implemented to setting '" << mTerrainMaterialB->getName()
- << "' to value (" << terrainMaterial << ")" << llendl;
-}
-
-void LLFloaterPathfindingSetup::onTerrainMaterialCSet()
-{
- F32 terrainMaterial = getTerrainMaterialC();
- llwarns << "functionality has not yet been implemented to setting '" << mTerrainMaterialC->getName()
- << "' to value (" << terrainMaterial << ")" << llendl;
-}
-
-void LLFloaterPathfindingSetup::onTerrainMaterialDSet()
-{
- F32 terrainMaterial = getTerrainMaterialD();
- llwarns << "functionality has not yet been implemented to setting '" << mTerrainMaterialD->getName()
- << "' to value (" << terrainMaterial << ")" << llendl;
-}
-
-
-void LLFloaterPathfindingSetup::providePathingData( const LLVector3& point1, const LLVector3& point2 )
-{
- switch (getPathSelectionState())
- {
- case kPathSelectNone :
- break;
-
- case kPathSelectStartPoint :
- mPathData.mStartPointA = point1;
- mPathData.mEndPointA = point2;
- mHasStartPoint = true;
- break;
-
- case kPathSelectEndPoint :
- mPathData.mStartPointB = point1;
- mPathData.mEndPointB = point2;
- mHasEndPoint = true;
- break;
-
- default :
- llassert(0);
- break;
- }
-
- generatePath();
-}
-
-void LLFloaterPathfindingSetup::generatePath()
-{
- if (mHasStartPoint && mHasEndPoint)
- {
- mPathData.mCharacterWidth = getCharacterWidth();
- LLPathingLib::getInstance()->generatePath(mPathData);
- }
-}
diff --git a/indra/newview/llnavmeshstation.cpp b/indra/newview/llnavmeshstation.cpp
index 16f459ff84..87f7e92ddd 100644
--- a/indra/newview/llnavmeshstation.cpp
+++ b/indra/newview/llnavmeshstation.cpp
@@ -31,7 +31,7 @@
#include "llagent.h"
#include "llviewerregion.h"
#include "llsdutil.h"
-#include "llfloaterpathfindingsetup.h"
+#include "llfloaterpathfindingconsole.h"
//===============================================================================
LLNavMeshStation::LLNavMeshStation()
diff --git a/indra/newview/llnavmeshstation.h b/indra/newview/llnavmeshstation.h
index 0aa714dac8..72bf725688 100644
--- a/indra/newview/llnavmeshstation.h
+++ b/indra/newview/llnavmeshstation.h
@@ -31,7 +31,7 @@
#include "llhandle.h"
//===============================================================================
class LLCurlRequest;
-class LLFloaterPathfindingSetup;
+class LLFloaterPathfindingConsole;
//===============================================================================
class LLNavMeshObserver
{
@@ -44,12 +44,12 @@ public:
virtual ~LLNavMeshObserver() {}
//Accessor for the observers handle
const LLHandle<LLNavMeshObserver>& getObserverHandle() const { return mObserverHandle; }
- LLFloaterPathfindingSetup *getPathfindingConsole() {return mPathfindingConsole;}
- void setPathfindingConsole(LLFloaterPathfindingSetup *pPathfindingConsole) {mPathfindingConsole = pPathfindingConsole;}
+ LLFloaterPathfindingConsole *getPathfindingConsole() {return mPathfindingConsole;}
+ void setPathfindingConsole(LLFloaterPathfindingConsole *pPathfindingConsole) {mPathfindingConsole = pPathfindingConsole;}
protected:
LLRootHandle<LLNavMeshObserver> mObserverHandle;
- LLFloaterPathfindingSetup *mPathfindingConsole;
+ LLFloaterPathfindingConsole *mPathfindingConsole;
};
//===============================================================================
class LLNavMeshDownloadObserver
@@ -61,12 +61,12 @@ public:
virtual ~LLNavMeshDownloadObserver() {}
//Accessor for the observers handle
const LLHandle<LLNavMeshDownloadObserver>& getObserverHandle() const { return mObserverHandle; }
- LLFloaterPathfindingSetup *getPathfindingConsole() {return mPathfindingConsole;}
- void setPathfindingConsole(LLFloaterPathfindingSetup *pPathfindingConsole) {mPathfindingConsole = pPathfindingConsole;}
+ LLFloaterPathfindingConsole *getPathfindingConsole() {return mPathfindingConsole;}
+ void setPathfindingConsole(LLFloaterPathfindingConsole *pPathfindingConsole) {mPathfindingConsole = pPathfindingConsole;}
protected:
LLRootHandle<LLNavMeshDownloadObserver> mObserverHandle;
- LLFloaterPathfindingSetup *mPathfindingConsole;
+ LLFloaterPathfindingConsole *mPathfindingConsole;
};
//===============================================================================
class LLNavMeshStation : public LLSingleton<LLNavMeshStation>
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 0579273d25..0774ab4029 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -78,7 +78,7 @@
#include "llwaterparammanager.h"
#include "llpostprocess.h"
#include "LLPathingLib.h"
-#include "llfloaterpathfindingsetup.h"
+#include "llfloaterpathfindingconsole.h"
#include "llfloaterreg.h"
extern LLPointer<LLViewerTexture> gStartTexture;
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 84a0a8c6c4..5b6b07a49a 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -86,7 +86,7 @@
#include "llfloateroutbox.h"
#include "llfloaterpathfindingcharacters.h"
#include "llfloaterpathfindinglinksets.h"
-#include "llfloaterpathfindingsetup.h"
+#include "llfloaterpathfindingconsole.h"
#include "llfloaterpay.h"
#include "llfloaterperms.h"
#include "llfloaterpostprocess.h"
@@ -248,7 +248,7 @@ void LLViewerFloaterReg::registerFloaters()
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_setup", "floater_pathfinding_setup.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPathfindingSetup>);
+ LLFloaterReg::add("pathfinding_console", "floater_pathfinding_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPathfindingConsole>);
LLFloaterReg::add("people", "floater_people.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
LLFloaterReg::add("places", "floater_places.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>);
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index d2c441ce73..92a01c22b3 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -5010,6 +5010,12 @@ class LLEditDelete : public view_listener_t
}
};
+bool enable_object_return()
+{
+ return (!LLSelectMgr::getInstance()->getSelection()->isEmpty() &&
+ (gAgent.isGodlike() || can_derez(DRD_RETURN_TO_OWNER)));
+}
+
bool enable_object_delete()
{
bool new_value =
@@ -5025,6 +5031,49 @@ bool enable_object_delete()
return new_value;
}
+class LLObjectsReturnPackage
+{
+public:
+ LLObjectsReturnPackage() : mObjectSelection(), mReturnableObjects(), mError(), mFirstRegion(NULL) {};
+ ~LLObjectsReturnPackage()
+ {
+ mObjectSelection.clear();
+ mReturnableObjects.clear();
+ mError.clear();
+ mFirstRegion = NULL;
+ };
+
+ LLObjectSelectionHandle mObjectSelection;
+ LLDynamicArray<LLViewerObjectPtr> mReturnableObjects;
+ std::string mError;
+ LLViewerRegion *mFirstRegion;
+};
+
+static void return_objects(LLObjectsReturnPackage *objectsReturnPackage, const LLSD& notification, const LLSD& response)
+{
+ if (LLNotificationsUtil::getSelectedOption(notification, response) == 0)
+ {
+ // Ignore category ID for this derez destination.
+ derez_objects(DRD_RETURN_TO_OWNER, LLUUID::null, objectsReturnPackage->mFirstRegion, objectsReturnPackage->mError, &objectsReturnPackage->mReturnableObjects);
+ }
+
+ delete objectsReturnPackage;
+}
+
+void handle_object_return()
+{
+ if (!LLSelectMgr::getInstance()->getSelection()->isEmpty())
+ {
+ LLObjectsReturnPackage *objectsReturnPackage = new LLObjectsReturnPackage();
+ objectsReturnPackage->mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
+
+ // Save selected objects, so that we still know what to return after the confirmation dialog resets selection.
+ get_derezzable_objects(DRD_RETURN_TO_OWNER, objectsReturnPackage->mError, objectsReturnPackage->mFirstRegion, &objectsReturnPackage->mReturnableObjects);
+
+ LLNotificationsUtil::add("ReturnToOwner", LLSD(), LLSD(), boost::bind(&return_objects, objectsReturnPackage, _1, _2));
+ }
+}
+
void handle_object_delete()
{
diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h
index 6316141e75..f10891737f 100644
--- a/indra/newview/llviewermenu.h
+++ b/indra/newview/llviewermenu.h
@@ -96,6 +96,7 @@ void handle_object_open();
bool visible_take_object();
bool tools_visible_take_object();
bool enable_object_take_copy();
+bool enable_object_return();
bool enable_object_delete();
// Buy either contents or object itself
@@ -104,6 +105,7 @@ void handle_take();
void handle_take_copy();
void handle_look_at_selection(const LLSD& param);
void handle_zoom_to_object(LLUUID object_id);
+void handle_object_return();
void handle_object_delete();
void handle_buy_land();
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 04b687b42f..33d959f8de 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -204,7 +204,7 @@
#include "llviewerwindowlistener.h"
#include "llpaneltopinfobar.h"
#include "LLPathingLib.h"
-#include "llfloaterpathfindingsetup.h"
+#include "llfloaterpathfindingconsole.h"
#if LL_WINDOWS
#include <tchar.h> // For Unicode conversion methods
@@ -966,7 +966,7 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK
MASK currentKeyMask = gKeyboard->currentMask(TRUE);
if ( !(currentKeyMask & MASK_ALT) )
{
- LLFloaterPathfindingSetup* pFloater = LLFloaterReg::getTypedInstance<LLFloaterPathfindingSetup>("pathfinding_setup");
+ LLFloaterPathfindingConsole* pFloater = LLFloaterReg::getTypedInstance<LLFloaterPathfindingConsole>("pathfinding_console");
if ( pFloater )
{
//The floater takes care of determining what stage - essentially where the data goes into the pathing packet(start or end)
diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml
new file mode 100644
index 0000000000..c0588c9931
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml
@@ -0,0 +1,378 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ open_positioning="cascading"
+ can_tear_off="false"
+ height="270"
+ layout="topleft"
+ name="floater_pathfinding_console"
+ help_topic="floater_pathfinding_console"
+ reuse_instance="true"
+ save_rect="true"
+ single_instance="true"
+ title="Pathfinding"
+ width="450">
+ <floater.string name="navmesh_fetch_initial"></floater.string>
+ <floater.string name="navmesh_fetch_inprogress">Downloading the navmesh ...</floater.string>
+ <floater.string name="navmesh_fetch_complete_available">Navmesh received.</floater.string>
+ <floater.string name="navmesh_fetch_complete_none">No navmesh for region.</floater.string>
+ <floater.string name="navmesh_region_not_enabled">Pathfinding is not enabled for this region.</floater.string>
+ <floater.string name="navmesh_library_not_implemented">Cannot find pathing library implementation.</floater.string>
+ <text
+ height="13"
+ word_wrap="true"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left="12"
+ top="20"
+ width="208">
+ Show:
+ </text>
+ <check_box
+ height="19"
+ label="Navmesh"
+ layout="topleft"
+ left="20"
+ name="show_navmesh"
+ top_pad="5"
+ width="90" />
+ <check_box
+ height="19"
+ label="Walkables"
+ layout="topleft"
+ left="20"
+ name="show_walkables"
+ top_pad="0"
+ width="90" />
+ <check_box
+ height="19"
+ label="Static obstacles"
+ layout="topleft"
+ left="20"
+ name="show_static_obstacles"
+ top_pad="0"
+ width="90" />
+ <check_box
+ height="19"
+ label="Material volumes"
+ layout="topleft"
+ left="20"
+ name="show_material_volumes"
+ top_pad="0"
+ width="90" />
+ <check_box
+ height="19"
+ label="Exclusion volumes"
+ layout="topleft"
+ left="20"
+ name="show_exclusion_volumes"
+ top_pad="0"
+ width="90" />
+ <check_box
+ height="19"
+ label="World"
+ layout="topleft"
+ left="20"
+ name="show_world"
+ top_pad="0"
+ width="90" />
+ <panel
+ border="true"
+ bevel_style="none"
+ follows="left|top"
+ layout="topleft"
+ height="60"
+ width="200">
+ <text
+ height="13"
+ word_wrap="true"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ layout="topleft"
+ left="5"
+ top_pad="5"
+ width="190">
+ Status:
+ </text>
+ <text
+ height="28"
+ word_wrap="true"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left="15"
+ name="pathfinding_status"
+ top_pad="10"
+ width="180">
+ </text>
+ </panel>
+ <button
+ follows="left|top"
+ height="21"
+ left="20"
+ label="Characters..."
+ layout="topleft"
+ name="view_characters_floater"
+ top_pad="10"
+ width="96"/>
+ <tab_container
+ follows="left|top"
+ layout="topleft"
+ tab_position="top"
+ left="220"
+ top="20"
+ height="230"
+ width="220">
+ <panel
+ border="true"
+ 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"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left="20"
+ top_pad="10"
+ height="13"
+ width="180">
+ To blah blah blah:
+ </text>
+ <button
+ follows="left|top"
+ height="21"
+ left="30"
+ enabled="false"
+ label="Unfreeze"
+ layout="topleft"
+ name="enter_unfrozen_mode"
+ top_pad="0"
+ width="96"/>
+ <text
+ word_wrap="true"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left="20"
+ top_pad="10"
+ height="13"
+ width="180">
+ To blah blah blah:
+ </text>
+ <button
+ follows="left|top"
+ height="21"
+ left="30"
+ enabled="false"
+ label="Freeze"
+ layout="topleft"
+ name="enter_frozen_mode"
+ top_pad="0"
+ width="96"/>
+ <text
+ word_wrap="true"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left="20"
+ top_pad="10"
+ height="13"
+ width="180">
+ View / edit linkset attributes:
+ </text>
+ <button
+ follows="left|top"
+ height="21"
+ left="30"
+ label="Linksets..."
+ layout="topleft"
+ name="view_and_edit_linksets"
+ top_pad="0"
+ width="96"/>
+ <button
+ follows="left|top"
+ height="21"
+ label="Clear path"
+ layout="topleft"
+ name="clear_path_on_edit"
+ left="20"
+ top="175"
+ width="96"/>
+ </panel>
+ <panel
+ border="true"
+ bevel_style="none"
+ follows="left|top"
+ layout="topleft"
+ left="1"
+ name="test_panel"
+ label="Test">
+ <text
+ height="14"
+ word_wrap="true"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left="20"
+ width="190">
+ Character width
+ </text>
+ <slider
+ decimal_digits="1"
+ height="14"
+ increment="0.1"
+ layout="topleft"
+ follows="left|top"
+ max_val="2"
+ min_val="0.2"
+ name="character_width"
+ top_pad="5"
+ value="1"
+ width="145" />
+ <text
+ height="14"
+ word_wrap="false"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ top_pad="-14"
+ left_pad="0"
+ width="20">
+ m
+ </text>
+ <text
+ height="14"
+ word_wrap="true"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="-165"
+ top_pad="10"
+ width="190">
+ Character type
+ </text>
+ <radio_group
+ follows="top|left"
+ height="20"
+ layout="topleft"
+ left_delta="0"
+ name="character_type"
+ top_delta="20"
+ value="1"
+ width="190">
+ <radio_item
+ label="A"
+ height="14"
+ width="30"
+ value="1"
+ name="character_type_a"/>
+ <radio_item
+ label="B"
+ height="14"
+ width="30"
+ layout="topleft"
+ top="4"
+ left="50"
+ value="2"
+ name="character_type_b"/>
+ <radio_item
+ label="C"
+ height="14"
+ width="30"
+ layout="topleft"
+ top="4"
+ left="100"
+ value="3"
+ name="character_type_c"/>
+ <radio_item
+ label="D"
+ height="14"
+ width="30"
+ layout="topleft"
+ top="4"
+ left="150"
+ value="4"
+ name="character_type_d"/>
+ </radio_group>
+ <text
+ height="14"
+ word_wrap="true"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="-190"
+ top_pad="10"
+ width="190">
+ Ctrl-click to select start point.
+ </text>
+ <text
+ height="14"
+ word_wrap="true"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ top_pad="5"
+ width="190">
+ Alt-click to select start point.
+ </text>
+ <text
+ height="14"
+ word_wrap="true"
+ use_ellipses="false"
+ type="string"
+ text_color="DrYellow"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ top_pad="15"
+ width="190">
+ Result: No path found.
+ </text>
+ <button
+ follows="left|top"
+ height="21"
+ label="Clear path"
+ layout="topleft"
+ name="clear_path_on_test"
+ left="20"
+ top="175"
+ width="96"/>
+ </panel>
+ </tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_setup.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_setup.xml
deleted file mode 100644
index 37555eea3a..0000000000
--- a/indra/newview/skins/default/xui/en/floater_pathfinding_setup.xml
+++ /dev/null
@@ -1,466 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater
- open_positioning="cascading"
- can_tear_off="false"
- height="228"
- layout="topleft"
- name="floater_pathfinding"
- help_topic="floater_pathfinding"
- reuse_instance="true"
- save_rect="true"
- single_instance="true"
- title="Pathfinding setup"
- width="833">
- <floater.string name="navmesh_fetch_initial"></floater.string>
- <floater.string name="navmesh_fetch_inprogress">Downloading the navmesh ...</floater.string>
- <floater.string name="navmesh_fetch_complete_available">Navmesh received.</floater.string>
- <floater.string name="navmesh_fetch_complete_none">No navmesh for region.</floater.string>
- <floater.string name="navmesh_region_not_enabled">Pathfinding is not enabled for this region.</floater.string>
- <floater.string name="navmesh_library_not_implemented">Cannot find pathing library implementation.</floater.string>
- <text
- height="13"
- word_wrap="true"
- use_ellipses="false"
- type="string"
- text_color="LabelTextColor"
- length="1"
- follows="left|top"
- layout="topleft"
- left="12"
- top="20"
- width="208">
- Show overlays:
- </text>
- <check_box
- height="19"
- label="Navmesh"
- layout="topleft"
- left="20"
- name="show_navmesh_overlay"
- top_pad="5"
- width="90" />
- <check_box
- height="19"
- label="Exclusion volumes"
- layout="topleft"
- left="20"
- name="show_exclusion_volumes"
- top_pad="0"
- width="90" />
- <check_box
- height="19"
- label="Path"
- layout="topleft"
- left="20"
- name="show_path"
- top_pad="0"
- width="90" />
- <check_box
- height="19"
- label="Water plane"
- layout="topleft"
- left="20"
- name="show_water_plane"
- top_pad="0"
- width="90" />
- <text
- height="13"
- word_wrap="true"
- use_ellipses="false"
- type="string"
- text_color="LabelTextColor"
- length="1"
- layout="topleft"
- left="12"
- top_pad="10"
- width="208">
- Overlay on:
- </text>
- <radio_group
- follows="top|left"
- height="45"
- value="1"
- layout="topleft"
- left_delta="8"
- name="region_overlay_display"
- top_delta="17"
- width="200">
- <radio_item
- label="Fixed physics geometry"
- layout="topleft"
- height="14"
- name="display_overlay_on_fixed"
- value="1"/>
- <radio_item
- label="All renderable geometry"
- layout="topleft"
- height="14"
- name="display_overlay_on_all"
- value="2"/>
- </radio_group>
- <view_border
- bevel_style="none"
- follows="top|left"
- height="203"
- layout="topleft"
- name="horiz_separator_1"
- top="15"
- left="228"
- width="0"/>
- <text
- height="24"
- word_wrap="true"
- use_ellipses="false"
- type="string"
- text_color="LabelTextColor"
- length="1"
- line_spacing.pixels="2"
- follows="left|top"
- layout="topleft"
- left="240"
- top="18"
- width="208">
-Click on two points
-to see the path between them.
- </text>
- <radio_group
- allow_deselect="true"
- follows="top|left"
- height="45"
- layout="topleft"
- left_delta="0"
- name="path_selection"
- top_delta="33"
- value="0"
- width="200">
- <radio_item
- label="Choose start point"
- layout="topleft"
- height="14"
- name="choose_path_start_point"
- value="1"/>
- <radio_item
- label="Choose end point"
- layout="topleft"
- height="14"
- name="choose_path_end_point"
- value="2"/>
- </radio_group>
- <text
- height="14"
- word_wrap="true"
- use_ellipses="false"
- type="string"
- text_color="LabelTextColor"
- length="1"
- follows="left|top"
- layout="topleft"
- left="240"
- width="208">
- Character width
- </text>
- <slider
- decimal_digits="1"
- height="14"
- increment="0.1"
- layout="topleft"
- max_val="2"
- min_val="0.2"
- name="character_width"
- top_pad="7"
- value="1"
- width="145" />
- <text
- height="14"
- word_wrap="false"
- use_ellipses="false"
- type="string"
- text_color="LabelTextColor"
- length="1"
- follows="left|top"
- layout="topleft"
- top_pad="-14"
- left="382"
- width="208">
- m
- </text>
- <text
- height="14"
- word_wrap="true"
- use_ellipses="false"
- type="string"
- text_color="LabelTextColor"
- length="1"
- follows="left|top"
- layout="topleft"
- left="240"
- top_pad="10"
- width="208">
- Character type
- </text>
- <radio_group
- follows="top|left"
- height="20"
- layout="topleft"
- left_delta="0"
- name="character_type"
- top_delta="20"
- value="1"
- width="200">
- <radio_item
- label="A"
- height="14"
- width="30"
- value="1"
- name="character_type_a"/>
- <radio_item
- label="B"
- height="14"
- width="30"
- layout="topleft"
- top="4"
- left="50"
- value="2"
- name="character_type_b"/>
- <radio_item
- label="C"
- height="14"
- width="30"
- layout="topleft"
- top="4"
- left="100"
- value="3"
- name="character_type_c"/>
- <radio_item
- label="D"
- height="14"
- width="30"
- layout="topleft"
- top="4"
- left="150"
- value="4"
- name="character_type_d"/>
- </radio_group>
- <text
- height="14"
- word_wrap="true"
- use_ellipses="false"
- type="string"
- text_color="LabelTextColor"
- length="1"
- follows="left|top"
- layout="topleft"
- left="240"
- name="pathfinding_status"
- top_pad="10"
- width="208">
- </text>
- <view_border
- bevel_style="none"
- follows="top|left"
- height="203"
- layout="topleft"
- name="horiz_separator_2"
- top="15"
- left="456"
- width="0"/>
- <text
- height="13"
- word_wrap="true"
- use_ellipses="false"
- type="string"
- text_color="LabelTextColor"
- length="1"
- follows="left|top"
- layout="topleft"
- left="470"
- top="18"
- width="180">
- View / edit linkset attributes:
- </text>
- <button
- follows="left|top"
- height="21"
- label="Linksets..."
- layout="topleft"
- name="view_and_edit_linksets"
- width="96"/>
- <text
- height="25"
- word_wrap="true"
- use_ellipses="false"
- type="string"
- text_color="LabelTextColor"
- length="1"
- line_spacing.pixels="4"
- follows="left|top"
- layout="topleft"
- top_pad="22"
- width="180">
-If you have made changes
-to objects or terrain:
- </text>
- <button
- follows="left|top"
- height="22"
- label="Rebuild navmesh"
- layout="topleft"
- name="rebuild_navmesh"
- top_pad="14"
- width="149"/>
- <text
- height="25"
- word_wrap="true"
- use_ellipses="false"
- type="string"
- text_color="LabelTextColor"
- length="1"
- line_spacing.pixels="4"
- follows="left|top"
- layout="topleft"
- top_pad="14"
- width="180">
-To load the current state
-of the mesh:
- </text>
- <button
- follows="left|top"
- height="21"
- label="Refresh"
- layout="topleft"
- name="refresh_navmesh"
- top_pad="9"
- width="95"/>
- <view_border
- bevel_style="none"
- follows="top|left"
- height="203"
- layout="topleft"
- name="horiz_separator_3"
- top="15"
- left="667"
- width="0"/>
- <text
- height="13"
- word_wrap="true"
- use_ellipses="false"
- type="string"
- text_color="LabelTextColor"
- length="1"
- follows="left|top"
- layout="topleft"
- left="689"
- top="18"
- width="208">
- Terrain materials
- </text>
- <text
- height="13"
- word_wrap="true"
- use_ellipses="false"
- type="string"
- text_color="LabelTextColor"
- length="1"
- follows="left|top"
- layout="topleft"
- top_pad="17"
- width="208">
- A
- </text>
- <line_editor
- border_style="line"
- border_thickness="1"
- follows="top|left"
- height="21"
- layout="topleft"
- left_delta="22"
- max_length_bytes="10"
- name="terrain_material_a"
- width="46" />
- <text
- height="13"
- word_wrap="true"
- use_ellipses="false"
- type="string"
- text_color="LabelTextColor"
- length="1"
- layout="topleft"
- left_pad="-68"
- top_pad="17"
- width="208">
- B
- </text>
- <line_editor
- border_style="line"
- border_thickness="1"
- follows="top|left"
- height="21"
- layout="topleft"
- left_delta="22"
- max_length_bytes="10"
- name="terrain_material_b"
- width="46" />
- <text
- height="13"
- word_wrap="true"
- use_ellipses="false"
- type="string"
- text_color="LabelTextColor"
- length="1"
- layout="topleft"
- left_pad="-68"
- top_pad="17"
- width="208">
- C
- </text>
- <line_editor
- border_style="line"
- border_thickness="1"
- follows="top|left"
- height="21"
- layout="topleft"
- left_delta="22"
- max_length_bytes="10"
- name="terrain_material_c"
- width="46" />
- <text
- height="13"
- word_wrap="true"
- use_ellipses="false"
- type="string"
- text_color="LabelTextColor"
- length="1"
- layout="topleft"
- left_pad="-68"
- top_pad="17"
- width="208">
- D
- </text>
- <line_editor
- border_style="line"
- border_thickness="1"
- follows="top|left"
- height="21"
- layout="topleft"
- left_delta="22"
- max_length_bytes="10"
- name="terrain_material_d"
- width="46" />
- <text
- height="38"
- word_wrap="true"
- use_ellipses="false"
- type="string"
- text_color="LabelTextColor"
- length="1"
- line_spacing.pixels="4"
- follows="left|top"
- layout="topleft"
- left_pad="-68"
- top_pad="14"
- width="180">
-Rebuild the navmesh
-after making any
-changes.
- </text>
-</floater>
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index d8f9453b09..d9a626be14 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -938,10 +938,10 @@
tear_off="false">
<menu_item_call
label="Setup..."
- name="pathfinding_setup_menu_item">
+ name="pathfinding_console_menu_item">
<menu_item_call.on_click
function="Floater.ToggleOrBringToFront"
- parameter="pathfinding_setup" />
+ parameter="pathfinding_console" />
</menu_item_call>
<menu_item_call
label="Linksets..."