summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpathfindingconsole.cpp
diff options
context:
space:
mode:
authorprep <none@none>2012-05-01 10:54:00 -0400
committerprep <none@none>2012-05-01 10:54:00 -0400
commit87cba5a2b2ff662cb1b4d847b1ca3030ad53c960 (patch)
tree9147e40ef43bdf06d5f33c9f11f0a2ee2128a012 /indra/newview/llfloaterpathfindingconsole.cpp
parent4bb589bc2b49202f2140860f19d4de69efd14494 (diff)
Path-494: Added support for culling permanent objects from the pathfinding window.
Diffstat (limited to 'indra/newview/llfloaterpathfindingconsole.cpp')
-rw-r--r--indra/newview/llfloaterpathfindingconsole.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp
index 2ccba3604b..570a3f45eb 100644
--- a/indra/newview/llfloaterpathfindingconsole.cpp
+++ b/indra/newview/llfloaterpathfindingconsole.cpp
@@ -48,7 +48,7 @@
#include "llpathfindingpathtool.h"
#include "lltoolmgr.h"
#include "lltoolfocus.h"
-
+#include "pipeline.h"
#include "llpathinglib.h"
#define XUI_RENDER_HEATMAP_NONE 0
@@ -85,6 +85,8 @@
LLHandle<LLFloaterPathfindingConsole> LLFloaterPathfindingConsole::sInstanceHandle;
+extern LLPipeline gPipeline;
+
//---------------------------------------------------------------------------
// LLFloaterPathfindingConsole
//---------------------------------------------------------------------------
@@ -97,8 +99,9 @@ BOOL LLFloaterPathfindingConsole::postBuild()
mShowWorldCheckBox = findChild<LLCheckBoxCtrl>("show_world");
llassert(mShowWorldCheckBox != NULL);
mShowWorldCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowWorldSet, this));
-
+
mShowWorldMovablesOnlyCheckBox = findChild<LLCheckBoxCtrl>("show_world_movables_only");
+ mShowWorldMovablesOnlyCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onRenderWorldMovablesOnly, this));
llassert(mShowWorldMovablesOnlyCheckBox != NULL);
mShowNavMeshCheckBox = findChild<LLCheckBoxCtrl>("show_navmesh");
@@ -600,6 +603,18 @@ void LLFloaterPathfindingConsole::onClearPathClicked()
clearPath();
}
+void LLFloaterPathfindingConsole::onRenderWorldMovablesOnly()
+{
+ if ( mShowWorldMovablesOnlyCheckBox->get() )
+ {
+ gPipeline.hidePermanentObjects( mRenderableRestoreList );
+ }
+ else
+ {
+ gPipeline.restorePermanentObjects( mRenderableRestoreList );
+ mRenderableRestoreList.clear();
+ }
+}
void LLFloaterPathfindingConsole::onNavMeshZoneCB(LLPathfindingNavMeshZone::ENavMeshZoneRequestStatus pNavMeshZoneRequestStatus)
{
switch (pNavMeshZoneRequestStatus)