From 87cba5a2b2ff662cb1b4d847b1ca3030ad53c960 Mon Sep 17 00:00:00 2001 From: prep Date: Tue, 1 May 2012 10:54:00 -0400 Subject: Path-494: Added support for culling permanent objects from the pathfinding window. --- indra/newview/llfloaterpathfindingconsole.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloaterpathfindingconsole.cpp') 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::sInstanceHandle; +extern LLPipeline gPipeline; + //--------------------------------------------------------------------------- // LLFloaterPathfindingConsole //--------------------------------------------------------------------------- @@ -97,8 +99,9 @@ BOOL LLFloaterPathfindingConsole::postBuild() mShowWorldCheckBox = findChild("show_world"); llassert(mShowWorldCheckBox != NULL); mShowWorldCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowWorldSet, this)); - + mShowWorldMovablesOnlyCheckBox = findChild("show_world_movables_only"); + mShowWorldMovablesOnlyCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onRenderWorldMovablesOnly, this)); llassert(mShowWorldMovablesOnlyCheckBox != NULL); mShowNavMeshCheckBox = findChild("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) -- cgit v1.2.3