From 2beb9c1903bc4164fe9e57c4a2eb1cc42d413ef4 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 1 Feb 2012 17:40:16 -0800 Subject: PATH-198: Laid out the pathfinding buttons per Leo's design. Functionality is currently hooked up to stubs that report a warning message about lack of implementation. --- indra/newview/llpanelvolume.cpp | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'indra/newview/llpanelvolume.cpp') diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 12eea7844d..1b629f515b 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -68,6 +68,7 @@ #include "llworld.h" #include "pipeline.h" #include "llviewershadermgr.h" +#include "llradiogroup.h" #include "lldrawpool.h" #include "lluictrlfactory.h" @@ -158,6 +159,14 @@ BOOL LLPanelVolume::postBuild() mSpinPhysicsRestitution->setCommitCallback(boost::bind(&LLPanelVolume::sendPhysicsRestitution, this, _1, mSpinPhysicsRestitution)); } + // Pathfinding Parameters + { + // Pathfinding state + mPathfindingType = findChild("edit_pathfinding_state"); + llassert(mPathfindingType != NULL); + mPathfindingType->setCommitCallback(boost::bind(&LLPanelVolume::sendPathfindingType, this)); + } + std::map material_name_map; material_name_map["Stone"]= LLTrans::getString("Stone"); material_name_map["Metal"]= LLTrans::getString("Metal"); @@ -194,7 +203,8 @@ BOOL LLPanelVolume::postBuild() LLPanelVolume::LLPanelVolume() : LLPanel(), - mComboMaterialItemCount(0) + mComboMaterialItemCount(0), + mPathfindingType(NULL) { setMouseOpaque(FALSE); @@ -463,6 +473,8 @@ void LLPanelVolume::getState( ) mSpinPhysicsRestitution->set(objectp->getPhysicsRestitution()); mSpinPhysicsRestitution->setEnabled(editable); + mPathfindingType->setEnabled(editable); + // update the physics shape combo to include allowed physics shapes mComboPhysicsShapeType->removeall(); mComboPhysicsShapeType->add(getString("None"), LLSD(1)); @@ -546,6 +558,8 @@ void LLPanelVolume::refresh() getChildView("Physics Friction")->setVisible(enable_mesh); getChildView("Physics Density")->setVisible(enable_mesh); getChildView("Physics Restitution")->setVisible(enable_mesh); + + mPathfindingType->setVisible(enable_mesh); /* TODO: add/remove individual physics shape types as per the PhysicsShapeTypes simulator features */ } @@ -600,6 +614,8 @@ void LLPanelVolume::clearCtrls() mSpinPhysicsDensity->setEnabled(FALSE); mSpinPhysicsRestitution->setEnabled(FALSE); + mPathfindingType->setEnabled(FALSE); + mComboMaterial->setEnabled( FALSE ); } @@ -685,6 +701,12 @@ void LLPanelVolume::sendPhysicsDensity(LLUICtrl* ctrl, void* userdata) LLSelectMgr::getInstance()->selectionSetDensity(val); } +void LLPanelVolume::sendPathfindingType() +{ + S32 val = mPathfindingType->getValue().asInteger(); + llwarns << "functionality to set '" << mPathfindingType->getName() << "' to value " << val << " has not been implemented." << llendl; +} + void LLPanelVolume::refreshCost() { LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); -- cgit v1.2.3 From 942c17224d5f299950abc1fbb83d1528c50b3ab2 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 15 Feb 2012 17:09:10 -0800 Subject: Backing out changeset: dda75e2e00e5 --- indra/newview/llpanelvolume.cpp | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'indra/newview/llpanelvolume.cpp') diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 1b629f515b..12eea7844d 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -68,7 +68,6 @@ #include "llworld.h" #include "pipeline.h" #include "llviewershadermgr.h" -#include "llradiogroup.h" #include "lldrawpool.h" #include "lluictrlfactory.h" @@ -159,14 +158,6 @@ BOOL LLPanelVolume::postBuild() mSpinPhysicsRestitution->setCommitCallback(boost::bind(&LLPanelVolume::sendPhysicsRestitution, this, _1, mSpinPhysicsRestitution)); } - // Pathfinding Parameters - { - // Pathfinding state - mPathfindingType = findChild("edit_pathfinding_state"); - llassert(mPathfindingType != NULL); - mPathfindingType->setCommitCallback(boost::bind(&LLPanelVolume::sendPathfindingType, this)); - } - std::map material_name_map; material_name_map["Stone"]= LLTrans::getString("Stone"); material_name_map["Metal"]= LLTrans::getString("Metal"); @@ -203,8 +194,7 @@ BOOL LLPanelVolume::postBuild() LLPanelVolume::LLPanelVolume() : LLPanel(), - mComboMaterialItemCount(0), - mPathfindingType(NULL) + mComboMaterialItemCount(0) { setMouseOpaque(FALSE); @@ -473,8 +463,6 @@ void LLPanelVolume::getState( ) mSpinPhysicsRestitution->set(objectp->getPhysicsRestitution()); mSpinPhysicsRestitution->setEnabled(editable); - mPathfindingType->setEnabled(editable); - // update the physics shape combo to include allowed physics shapes mComboPhysicsShapeType->removeall(); mComboPhysicsShapeType->add(getString("None"), LLSD(1)); @@ -558,8 +546,6 @@ void LLPanelVolume::refresh() getChildView("Physics Friction")->setVisible(enable_mesh); getChildView("Physics Density")->setVisible(enable_mesh); getChildView("Physics Restitution")->setVisible(enable_mesh); - - mPathfindingType->setVisible(enable_mesh); /* TODO: add/remove individual physics shape types as per the PhysicsShapeTypes simulator features */ } @@ -614,8 +600,6 @@ void LLPanelVolume::clearCtrls() mSpinPhysicsDensity->setEnabled(FALSE); mSpinPhysicsRestitution->setEnabled(FALSE); - mPathfindingType->setEnabled(FALSE); - mComboMaterial->setEnabled( FALSE ); } @@ -701,12 +685,6 @@ void LLPanelVolume::sendPhysicsDensity(LLUICtrl* ctrl, void* userdata) LLSelectMgr::getInstance()->selectionSetDensity(val); } -void LLPanelVolume::sendPathfindingType() -{ - S32 val = mPathfindingType->getValue().asInteger(); - llwarns << "functionality to set '" << mPathfindingType->getName() << "' to value " << val << " has not been implemented." << llendl; -} - void LLPanelVolume::refreshCost() { LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); -- cgit v1.2.3 From 22681ddb90b9fcb5eccb4467bb13704075de67d9 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 21 Mar 2012 18:00:21 -0700 Subject: PATH-199: Disabling more functionality of the build tool floater when permanancy is enforced. --- indra/newview/llpanelvolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpanelvolume.cpp') diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 12eea7844d..80dc2c0013 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -495,7 +495,7 @@ void LLPanelVolume::getState( ) mComboPhysicsShapeType->add(getString("Convex Hull"), LLSD(2)); mComboPhysicsShapeType->setValue(LLSD(objectp->getPhysicsShapeType())); - mComboPhysicsShapeType->setEnabled(editable); + mComboPhysicsShapeType->setEnabled(editable && !objectp->isPermanentEnforced()); mObject = objectp; mRootObject = root_objectp; -- cgit v1.2.3 From c1a5d6a36b925728d98c37522ed7ae53e3a87155 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Fri, 30 Mar 2012 15:42:43 -0700 Subject: PATH-450: Disabling the movement and shape manipulation widgets when editing an item in a linked set. --- indra/newview/llpanelvolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpanelvolume.cpp') diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 80dc2c0013..58c38387c3 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -495,7 +495,7 @@ void LLPanelVolume::getState( ) mComboPhysicsShapeType->add(getString("Convex Hull"), LLSD(2)); mComboPhysicsShapeType->setValue(LLSD(objectp->getPhysicsShapeType())); - mComboPhysicsShapeType->setEnabled(editable && !objectp->isPermanentEnforced()); + mComboPhysicsShapeType->setEnabled(editable && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced())); mObject = objectp; mRootObject = root_objectp; -- cgit v1.2.3 From 171e1f314b641c6d328ad5986e285e7e8f3951f4 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Fri, 30 Mar 2012 18:26:40 -0700 Subject: PATH-456: Disabling the Flexible Path checkbox on permanent objects in the frozen state. --- indra/newview/llpanelvolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpanelvolume.cpp') diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 58c38387c3..557daeaec2 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -351,7 +351,7 @@ void LLPanelVolume::getState( ) getChild("Flexible1D Checkbox Ctrl")->setValue(is_flexible); if (is_flexible || (volobjp && volobjp->canBeFlexible())) { - getChildView("Flexible1D Checkbox Ctrl")->setEnabled(editable && single_volume && volobjp && !volobjp->isMesh()); + getChildView("Flexible1D Checkbox Ctrl")->setEnabled(editable && single_volume && volobjp && !volobjp->isMesh() && !objectp->isPermanentEnforced()); } else { -- cgit v1.2.3 From 081977308d6576f100df4bda03e6928faf520bc5 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 3 Apr 2012 18:41:31 -0700 Subject: PATH-454: BUGFIX Adding a notification when switching a permanent object to Flexible Path. --- indra/newview/llpanelvolume.cpp | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'indra/newview/llpanelvolume.cpp') diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 557daeaec2..d277ded636 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -68,6 +68,7 @@ #include "llworld.h" #include "pipeline.h" #include "llviewershadermgr.h" +#include "llnotificationsutil.h" #include "lldrawpool.h" #include "lluictrlfactory.h" @@ -77,13 +78,15 @@ #include "llviewercontrol.h" #include "llmeshrepository.h" +#include + // "Features" Tab BOOL LLPanelVolume::postBuild() { // Flexible Objects Parameters { - childSetCommitCallback("Flexible1D Checkbox Ctrl",onCommitIsFlexible,this); + childSetCommitCallback("Flexible1D Checkbox Ctrl", boost::bind(&LLPanelVolume::onCommitIsFlexible, this, _1, _2), NULL); childSetCommitCallback("FlexNumSections",onCommitFlexible,this); getChild("FlexNumSections")->setValidateBeforeCommit(precommitValidate); childSetCommitCallback("FlexGravity",onCommitFlexible,this); @@ -873,10 +876,26 @@ void LLPanelVolume::onCommitFlexible( LLUICtrl* ctrl, void* userdata ) self->refresh(); } -// static -void LLPanelVolume::onCommitIsFlexible( LLUICtrl* ctrl, void* userdata ) +void LLPanelVolume::onCommitIsFlexible(LLUICtrl *, void*) { - LLPanelVolume* self = (LLPanelVolume*) userdata; - self->sendIsFlexible(); + if (mObject->flagObjectPermanent()) + { + LLNotificationsUtil::add("PathfindingLinksets_ChangeToFlexiblePath", LLSD(), LLSD(), boost::bind(&LLPanelVolume::handleResponseChangeToFlexible, this, _1, _2)); + } + else + { + sendIsFlexible(); + } } +void LLPanelVolume::handleResponseChangeToFlexible(const LLSD &pNotification, const LLSD &pResponse) +{ + if (LLNotificationsUtil::getSelectedOption(pNotification, pResponse) == 0) + { + sendIsFlexible(); + } + else + { + getChild("Flexible1D Checkbox Ctrl")->setValue(FALSE); + } +} -- cgit v1.2.3 From cbebd682f7b9b0cff120bc36d9db9bb170dc1b2a Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 25 Apr 2012 13:04:13 -0700 Subject: Removing windows line endings from .h and .cpp files. --- indra/newview/llpanelvolume.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/newview/llpanelvolume.cpp') diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index d277ded636..792d852d53 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -890,12 +890,12 @@ void LLPanelVolume::onCommitIsFlexible(LLUICtrl *, void*) void LLPanelVolume::handleResponseChangeToFlexible(const LLSD &pNotification, const LLSD &pResponse) { - if (LLNotificationsUtil::getSelectedOption(pNotification, pResponse) == 0) - { - sendIsFlexible(); - } - else - { - getChild("Flexible1D Checkbox Ctrl")->setValue(FALSE); - } + if (LLNotificationsUtil::getSelectedOption(pNotification, pResponse) == 0) + { + sendIsFlexible(); + } + else + { + getChild("Flexible1D Checkbox Ctrl")->setValue(FALSE); + } } -- cgit v1.2.3 From 379aff3520d368d1119e00f46684670030472832 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 13 Jun 2012 16:57:35 -0700 Subject: PATH-713: Disabling all editable object fields on the build tools floater when a static pathfinding object is in not in the current region. --- indra/newview/llpanelvolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpanelvolume.cpp') 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; -- cgit v1.2.3