diff options
| author | Dave Parks <davep@lindenlab.com> | 2012-04-02 18:12:58 -0500 | 
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2012-04-02 18:12:58 -0500 | 
| commit | 0cce43aefefa2546b83f373ed81f8dbc7a6241d2 (patch) | |
| tree | 7c228bd77d7787b5865de61f9dbd754b9dcd83a7 /indra | |
| parent | 6e184e33018a5395bfbb2c92812229d115944ab5 (diff) | |
| parent | 9ccc2a0fced1a5b1e6bdef34eef07133f7754c72 (diff) | |
merge
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/app_settings/settings.xml | 22 | ||||
| -rw-r--r-- | indra/newview/llmaniprotate.cpp | 24 | ||||
| -rw-r--r-- | indra/newview/llmanipscale.cpp | 30 | ||||
| -rw-r--r-- | indra/newview/llmaniptranslate.cpp | 9 | ||||
| -rw-r--r-- | indra/newview/llpanelobject.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/llpanelpermissions.cpp | 11 | ||||
| -rw-r--r-- | indra/newview/llpanelvolume.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llselectmgr.cpp | 62 | ||||
| -rw-r--r-- | indra/newview/llselectmgr.h | 4 | ||||
| -rw-r--r-- | indra/newview/llsidepaneltaskinfo.cpp | 10 | ||||
| -rw-r--r-- | indra/newview/lltoolbrush.cpp | 10 | ||||
| -rw-r--r-- | indra/newview/llviewerobject.h | 5 | ||||
| -rw-r--r-- | indra/newview/llviewerwindow.cpp | 5 | ||||
| -rw-r--r-- | indra/newview/pipeline.cpp | 101 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_tools.xml | 8 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 10 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/sidepanel_task_info.xml | 8 | 
17 files changed, 250 insertions, 79 deletions
| diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index d18df2d9b2..8e2d69ea9b 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13724,5 +13724,27 @@          <real>1.0</real>        </array>      </map> +  <key>PathfindingDisablePermanentObjects</key> +  <map> +    <key>Comment</key> +    <string>Disables the viewer from seeing the permanent object flag.  Useful for testing server-side enforcement of permanent object rules.</string> +    <key>Persist</key> +    <integer>0</integer> +    <key>Type</key> +    <string>Boolean</string> +    <key>Value</key> +    <integer>0</integer> +  </map> +  <key>PathfindingDisableCharacterObjects</key> +  <map> +    <key>Comment</key> +    <string>Disables the viewer from seeing the character object flag.  Useful for testing server-side enforcement of character object rules.</string> +    <key>Persist</key> +    <integer>0</integer> +    <key>Type</key> +    <string>Boolean</string> +    <key>Value</key> +    <integer>0</integer> +  </map>   </map>  </llsd> diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index 7ac347e66a..826e8d560a 100644 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -479,9 +479,12 @@ BOOL LLManipRotate::handleMouseUp(S32 x, S32 y, MASK mask)  		{  			LLSelectNode* selectNode = *iter;  			LLViewerObject* object = selectNode->getObject(); +			LLViewerObject* root_object = (object == NULL) ? NULL : object->getRootEdit();  			// have permission to move and object is root of selection or individually selected -			if (object->permMove() && !object->isPermanentEnforced() && (object->isRootEdit() || selectNode->mIndividualSelection)) +			if (object->permMove() && !object->isPermanentEnforced() && +				((root_object == NULL) || !root_object->isPermanentEnforced()) && +				(object->isRootEdit() || selectNode->mIndividualSelection))  			{  				object->mUnselectedChildrenPositions.clear() ;  			} @@ -567,9 +570,12 @@ void LLManipRotate::drag( S32 x, S32 y )  	{  		LLSelectNode* selectNode = *iter;  		LLViewerObject* object = selectNode->getObject(); +		LLViewerObject* root_object = (object == NULL) ? NULL : object->getRootEdit();  		// have permission to move and object is root of selection or individually selected -		if (object->permMove() && !object->isPermanentEnforced() && (object->isRootEdit() || selectNode->mIndividualSelection)) +		if (object->permMove() && !object->isPermanentEnforced() && +			((root_object == NULL) || !root_object->isPermanentEnforced()) && +			(object->isRootEdit() || selectNode->mIndividualSelection))  		{  			if (!object->isRootEdit())  			{ @@ -621,9 +627,11 @@ void LLManipRotate::drag( S32 x, S32 y )  	{  		LLSelectNode* selectNode = *iter;  		LLViewerObject* object = selectNode->getObject(); +		LLViewerObject* root_object = (object == NULL) ? NULL : object->getRootEdit();  		// to avoid cumulative position changes we calculate the objects new position using its saved position -		if (object && object->permMove() && !object->isPermanentEnforced()) +		if (object && object->permMove() && !object->isPermanentEnforced() && +			((root_object == NULL) || !root_object->isPermanentEnforced()))  		{  			LLVector3 center   = gAgent.getPosAgentFromGlobal( mRotationCenter ); @@ -704,7 +712,10 @@ void LLManipRotate::drag( S32 x, S32 y )  	{  		LLSelectNode* selectNode = *iter;  		LLViewerObject*cur = selectNode->getObject(); -		if( cur->permModify() && cur->permMove() && !cur->isPermanentEnforced() && !cur->isAvatar()) +		LLViewerObject *root_object = (cur == NULL) ? NULL : cur->getRootEdit(); +		if( cur->permModify() && cur->permMove() && !cur->isPermanentEnforced() && +			((root_object == NULL) || !root_object->isPermanentEnforced()) && +			!cur->isAvatar())  		{  			selectNode->mLastRotation = cur->getRotation();  			selectNode->mLastPositionLocal = cur->getPosition(); @@ -1871,7 +1882,10 @@ BOOL LLManipRotate::canAffectSelection()  		{  			virtual bool apply(LLViewerObject* objectp)  			{ -				return objectp->permMove() && !objectp->isPermanentEnforced() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts")); +				LLViewerObject *root_object = (objectp == NULL) ? NULL : objectp->getRootEdit(); +				return objectp->permMove() && !objectp->isPermanentEnforced() && +					((root_object == NULL) || !root_object->isPermanentEnforced()) && +					(objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts"));  			}  		} func;  		can_rotate = mObjectSelection->applyToObjects(&func); diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index 160ba40433..bc6a94d61f 100644 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -826,7 +826,10 @@ void LLManipScale::drag( S32 x, S32 y )  	{  		LLSelectNode* selectNode = *iter;  		LLViewerObject*cur = selectNode->getObject(); -		if( cur->permModify() && cur->permMove() && !cur->isPermanentEnforced() && !cur->isAvatar()) +		LLViewerObject *root_object = (cur == NULL) ? NULL : cur->getRootEdit(); +		if( cur->permModify() && cur->permMove() && !cur->isPermanentEnforced() && +			((root_object == NULL) || root_object->isPermanentEnforced()) && +			!cur->isAvatar())  		{  			selectNode->mLastScale = cur->getScale();  			selectNode->mLastPositionLocal = cur->getPosition(); @@ -973,7 +976,10 @@ void LLManipScale::dragCorner( S32 x, S32 y )  	{  		LLSelectNode* selectNode = *iter;  		LLViewerObject* cur = selectNode->getObject(); -		if(  cur->permModify() && cur->permMove() && !cur->isPermanentEnforced() && !cur->isAvatar() ) +		LLViewerObject *root_object = (cur == NULL) ? NULL : cur->getRootEdit(); +		if(  cur->permModify() && cur->permMove() && !cur->isPermanentEnforced() && +			((root_object == NULL) || !root_object->isPermanentEnforced()) && +			!cur->isAvatar() )  		{  			const LLVector3& scale = selectNode->mSavedScale; @@ -995,7 +1001,10 @@ void LLManipScale::dragCorner( S32 x, S32 y )  	{  		LLSelectNode* selectNode = *iter;  		LLViewerObject* cur = selectNode->getObject(); -		if( cur->permModify() && cur->permMove() && !cur->isPermanentEnforced() && !cur->isAvatar() && cur->isRootEdit() ) +		LLViewerObject *root_object = (cur == NULL) ? NULL : cur->getRootEdit(); +		if( cur->permModify() && cur->permMove() && !cur->isPermanentEnforced() && +			((root_object == NULL) && !root_object->isPermanentEnforced()) && +			!cur->isAvatar() && cur->isRootEdit() )  		{  			const LLVector3& scale = selectNode->mSavedScale;  			cur->setScale( scale_factor * scale ); @@ -1043,7 +1052,10 @@ void LLManipScale::dragCorner( S32 x, S32 y )  	{  		LLSelectNode* selectNode = *iter;  		LLViewerObject*cur = selectNode->getObject(); -		if( cur->permModify() && cur->permMove() && !cur->isPermanentEnforced() && !cur->isAvatar() && !cur->isRootEdit() ) +		LLViewerObject *root_object = (cur == NULL) ? NULL : cur->getRootEdit(); +		if( cur->permModify() && cur->permMove() && !cur->isPermanentEnforced() && +			((root_object == NULL) || !root_object->isPermanentEnforced()) && +			!cur->isAvatar() && !cur->isRootEdit() )  		{  			const LLVector3& scale = selectNode->mSavedScale;  			cur->setScale( scale_factor * scale, FALSE ); @@ -1251,7 +1263,10 @@ void LLManipScale::stretchFace( const LLVector3& drag_start_agent, const LLVecto  	{  		LLSelectNode* selectNode = *iter;  		LLViewerObject*cur = selectNode->getObject(); -		if( cur->permModify() && cur->permMove() && !cur->isPermanentEnforced() && !cur->isAvatar() ) +		LLViewerObject *root_object = (cur == NULL) ? NULL : cur->getRootEdit(); +		if( cur->permModify() && cur->permMove() && !cur->isPermanentEnforced() && +			((root_object == NULL) || !root_object->isPermanentEnforced()) && +			!cur->isAvatar() )  		{  			LLBBox cur_bbox			= cur->getBoundingBoxAgent();  			LLVector3 start_local	= cur_bbox.agentToLocal( drag_start_agent ); @@ -2057,7 +2072,10 @@ BOOL LLManipScale::canAffectSelection()  		{  			virtual bool apply(LLViewerObject* objectp)  			{ -				return objectp->permModify() && objectp->permMove() && !objectp->isPermanentEnforced() && !objectp->isSeat(); +				LLViewerObject *root_object = (objectp == NULL) ? NULL : objectp->getRootEdit(); +				return objectp->permModify() && objectp->permMove() && !objectp->isPermanentEnforced() && +					((root_object == NULL) || !root_object->isPermanentEnforced()) && +					!objectp->isSeat();  			}  		} func;  		can_scale = mObjectSelection->applyToObjects(&func); diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index e6ccfc0af5..7a35562f86 100644 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -687,7 +687,9 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)  			}  		} -		if (object->permMove() && !object->isPermanentEnforced()) +		LLViewerObject* root_object = (object == NULL) ? NULL : object->getRootEdit(); +		if (object->permMove() && !object->isPermanentEnforced() && +			((root_object == NULL) || !root_object->isPermanentEnforced()))  		{  			// handle attachments in local space  			if (object->isAttachment() && object->mDrawable.notNull()) @@ -2281,7 +2283,10 @@ BOOL LLManipTranslate::canAffectSelection()  		{  			virtual bool apply(LLViewerObject* objectp)  			{ -				return objectp->permMove() && !objectp->isPermanentEnforced() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts")); +				LLViewerObject *root_object = (objectp == NULL) ? NULL : objectp->getRootEdit(); +				return objectp->permMove() && !objectp->isPermanentEnforced() && +					((root_object == NULL) || !root_object->isPermanentEnforced()) && +					(objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts"));  			}  		} func;  		can_move = mObjectSelection->applyToObjects(&func); diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 028ca82fed..d0c60c3e62 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -350,9 +350,9 @@ void LLPanelObject::getState( )  	}  	// can move or rotate only linked group with move permissions, or sub-object with move and modify perms -	BOOL enable_move	= objectp->permMove() && !objectp->isPermanentEnforced() && !objectp->isAttachment() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts")); -	BOOL enable_scale	= objectp->permMove() && !objectp->isPermanentEnforced() && objectp->permModify(); -	BOOL enable_rotate	= objectp->permMove() && !objectp->isPermanentEnforced() && ( (objectp->permModify() && !objectp->isAttachment()) || !gSavedSettings.getBOOL("EditLinkedParts")); +	BOOL enable_move	= objectp->permMove() && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced()) && !objectp->isAttachment() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts")); +	BOOL enable_scale	= objectp->permMove() && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced()) && objectp->permModify(); +	BOOL enable_rotate	= objectp->permMove() && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced()) && ( (objectp->permModify() && !objectp->isAttachment()) || !gSavedSettings.getBOOL("EditLinkedParts"));  	S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();  	BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME )) diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 59130236f2..f3a16dbbf1 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -299,6 +299,9 @@ void LLPanelPermissions::refresh()  	BOOL is_perm_modify = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode()   						   && LLSelectMgr::getInstance()->selectGetRootsModify())  		|| LLSelectMgr::getInstance()->selectGetModify(); +	BOOL is_nonpermanent = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode()  +						   && LLSelectMgr::getInstance()->selectGetRootsNonPermanent()) +		|| LLSelectMgr::getInstance()->selectGetNonPermanent();  	const LLFocusableElement* keyboard_focus_view = gFocusMgr.getKeyboardFocus();  	S32 string_index = 0; @@ -307,12 +310,18 @@ void LLPanelPermissions::refresh()  			getString("text modify info 1"),  			getString("text modify info 2"),  			getString("text modify info 3"), -			getString("text modify info 4") +			getString("text modify info 4"), +			getString("text modify info 5"), +			getString("text modify info 6")  		};  	if (!is_perm_modify)  	{  		string_index += 2;  	} +	else if (!is_nonpermanent) +	{ +		string_index += 4; +	}  	if (!is_one_object)  	{  		++string_index; diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 80dc2c0013..557daeaec2 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -351,7 +351,7 @@ void LLPanelVolume::getState( )  	getChild<LLUICtrl>("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  	{ @@ -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; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index b0aae89a85..49c568039c 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -593,6 +593,12 @@ bool LLSelectMgr::linkObjects()  		return true;  	} +	if (!LLSelectMgr::getInstance()->selectGetRootsNonPermanent()) +	{ +		LLNotificationsUtil::add("CannotLinkPermanent"); +		return true; +	} +  	LLUUID owner_id;  	std::string owner_name;  	if (!LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name)) @@ -638,7 +644,9 @@ bool LLSelectMgr::enableLinkObjects()  			{  				virtual bool apply(LLViewerObject* object)  				{ -					return object->permModify() && !object->isPermanentEnforced(); +					LLViewerObject *root_object = (object == NULL) ? NULL : object->getRootEdit(); +					return object->permModify() && !object->isPermanentEnforced() && +						((root_object == NULL) || !root_object->isPermanentEnforced());  				}  			} func;  			const bool firstonly = true; @@ -651,10 +659,12 @@ bool LLSelectMgr::enableLinkObjects()  bool LLSelectMgr::enableUnlinkObjects()  {  	LLViewerObject* first_editable_object = LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject(); +	LLViewerObject *root_object = (first_editable_object == NULL) ? NULL : first_editable_object->getRootEdit();  	bool new_value = LLSelectMgr::getInstance()->selectGetAllRootsValid() &&  		first_editable_object && -		!first_editable_object->isAttachment() && !first_editable_object->isPermanentEnforced(); +		!first_editable_object->isAttachment() && !first_editable_object->isPermanentEnforced() && +		((root_object == NULL) || !root_object->isPermanentEnforced());  	return new_value;  } @@ -2499,6 +2509,54 @@ BOOL LLSelectMgr::selectGetRootsModify()  //----------------------------------------------------------------------------- +// selectGetPermanent() - return TRUE if current agent can modify all +// selected objects. +//----------------------------------------------------------------------------- +BOOL LLSelectMgr::selectGetNonPermanent() +{ +	for (LLObjectSelection::iterator iter = getSelection()->begin(); +		 iter != getSelection()->end(); iter++ ) +	{ +		LLSelectNode* node = *iter; +		LLViewerObject* object = node->getObject(); +		if( !object || !node->mValid ) +		{ +			return FALSE; +		} +		if( object->isPermanentEnforced()) +		{ +			return FALSE; +		} +	} +	return TRUE; +} + +//----------------------------------------------------------------------------- +// selectGetRootsModify() - return TRUE if current agent can modify all +// selected root objects. +//----------------------------------------------------------------------------- +BOOL LLSelectMgr::selectGetRootsNonPermanent() +{ +	for (LLObjectSelection::root_iterator iter = getSelection()->root_begin(); +		 iter != getSelection()->root_end(); iter++ ) +	{ +		LLSelectNode* node = *iter; +		LLViewerObject* object = node->getObject(); +		if( !node->mValid ) +		{ +			return FALSE; +		} +		if( object->isPermanentEnforced()) +		{ +			return FALSE; +		} +	} + +	return TRUE; +} + + +//-----------------------------------------------------------------------------  // selectGetRootsTransfer() - return TRUE if current agent can transfer all  // selected root objects.  //----------------------------------------------------------------------------- diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 9a066799fe..07eb62a8fa 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -560,6 +560,10 @@ public:  	BOOL selectGetRootsModify();  	BOOL selectGetModify(); +	// returns TRUE if is all objects are non-permanent +	BOOL selectGetRootsNonPermanent(); +	BOOL selectGetNonPermanent(); +  	// returns TRUE if selected objects can be transferred.  	BOOL selectGetRootsTransfer(); diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 24cb559fd0..4b49ae9f43 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -301,6 +301,8 @@ void LLSidepanelTaskInfo::refresh()  	// BUG: fails if a root and non-root are both single-selected.  	const BOOL is_perm_modify = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsModify()) ||  		LLSelectMgr::getInstance()->selectGetModify(); +	const BOOL is_nonpermanent = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsNonPermanent()) || +		LLSelectMgr::getInstance()->selectGetNonPermanent();  	S32 string_index = 0;  	std::string MODIFY_INFO_STRINGS[] = @@ -308,12 +310,18 @@ void LLSidepanelTaskInfo::refresh()  			getString("text modify info 1"),  			getString("text modify info 2"),  			getString("text modify info 3"), -			getString("text modify info 4") +			getString("text modify info 4"), +			getString("text modify info 5"), +			getString("text modify info 6")  		};  	if (!is_perm_modify)  	{  		string_index += 2;  	} +	else if (!is_nonpermanent) +	{ +		string_index += 4; +	}  	if (!is_one_object)  	{  		++string_index; diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp index 51cc697d7a..49ec1703d4 100644 --- a/indra/newview/lltoolbrush.cpp +++ b/indra/newview/lltoolbrush.cpp @@ -245,12 +245,12 @@ void LLToolBrushLand::modifyLandInSelectionGlobal()  			alertNoTerraform(regionp);  			return;  		} +	} -		if (!LLPathfindingManager::getInstance()->isAllowAlterPermanent()) -		{ -			alertNoTerraformWhileFrozen(); -			return; -		} +	if (!LLPathfindingManager::getInstance()->isAllowAlterPermanent()) +	{ +		alertNoTerraformWhileFrozen(); +		return;  	}  	for(region_list_t::iterator iter = mLastAffectedRegions.begin(); diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 192121c021..60665b4880 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -45,6 +45,7 @@  #include "llvertexbuffer.h"  #include "llbbox.h"  #include "llbbox.h" +#include "llviewercontrol.h"  class LLAgent;			// TODO: Get rid of this.  class LLAudioSource; @@ -476,8 +477,8 @@ public:  	inline BOOL		flagObjectCopy() const			{ return ((mFlags & FLAGS_OBJECT_COPY) != 0); }  	inline BOOL		flagObjectMove() const			{ return ((mFlags & FLAGS_OBJECT_MOVE) != 0); }  	inline BOOL		flagObjectTransfer() const		{ return ((mFlags & FLAGS_OBJECT_TRANSFER) != 0); } -	inline BOOL		flagObjectPermanent() const		{ return ((mFlags & FLAGS_OBJECT_PERMANENT) != 0); } -	inline BOOL		flagCharacter() const			{ return ((mFlags & FLAGS_CHARACTER) != 0); } +	inline BOOL		flagObjectPermanent() const		{ return gSavedSettings.getBOOL("PathfindingDisablePermanentObjects") ? FALSE : ((mFlags & FLAGS_OBJECT_PERMANENT) != 0); } +	inline BOOL		flagCharacter() const			{ return gSavedSettings.getBOOL("PathfindingDisableCharacterObjects") ? FALSE : ((mFlags & FLAGS_CHARACTER) != 0); }  	inline BOOL		flagIncludeInSearch() const     { return ((mFlags & FLAGS_INCLUDE_IN_SEARCH) != 0); }  	inline BOOL		flagScripted() const			{ return ((mFlags & FLAGS_SCRIPTED) != 0); }  	inline BOOL		flagHandleTouch() const			{ return ((mFlags & FLAGS_HANDLE_TOUCH) != 0); } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 49e07a1fe3..3b41cdcdff 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3529,8 +3529,11 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls,  					{  						LLSelectNode* nodep = *iter;  						LLViewerObject* object = nodep->getObject(); +						LLViewerObject *root_object = (object == NULL) ? NULL : object->getRootEdit();  						BOOL this_object_movable = FALSE; -						if (object->permMove() && !object->isPermanentEnforced() && (object->permModify() || selecting_linked_set)) +						if (object->permMove() && !object->isPermanentEnforced() && +							((root_object == NULL) || !root_object->isPermanentEnforced()) && +							(object->permModify() || selecting_linked_set))  						{  							moveable_object_selected = TRUE;  							this_object_movable = TRUE; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index da3fb3a71a..d46dc242be 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -4315,50 +4315,54 @@ void LLPipeline::renderDebug()  	assertInitialized(); -	if (LLGLSLShader::sNoFixedFunction) +	bool hud_only = hasRenderType(LLPipeline::RENDER_TYPE_HUD); + +	if (!hud_only )  	{ -		gPathfindingProgram.bind(); -	} +		if (LLGLSLShader::sNoFixedFunction) +		{ +			gPathfindingProgram.bind(); +		} -	gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);	 -	gPipeline.disableLights(); +		gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);	 +		gPipeline.disableLights(); -	//Render any navmesh geometry	 -	LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance(); -	if ( llPathingLibInstance != NULL )  -	{ -		LLHandle<LLFloaterPathfindingConsole> pathfindingConsoleHandle = LLFloaterPathfindingConsole::getInstanceHandle(); -		if (!pathfindingConsoleHandle.isDead()) +		//Render any navmesh geometry	 +		LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance(); +		if ( llPathingLibInstance != NULL )   		{ -			LLFloaterPathfindingConsole *pathfindingConsole = pathfindingConsoleHandle.get(); -			//NavMesh -			if ( pathfindingConsole->isRenderNavMesh() ) -			{				 +			LLHandle<LLFloaterPathfindingConsole> pathfindingConsoleHandle = LLFloaterPathfindingConsole::getInstanceHandle(); +			if (!pathfindingConsoleHandle.isDead()) +			{ +				LLFloaterPathfindingConsole *pathfindingConsole = pathfindingConsoleHandle.get(); +				//NavMesh +				if ( pathfindingConsole->isRenderNavMesh() ) +				{				  				gPathfindingProgram.uniform1f("tint", 1.f); -				glLineWidth(2.0f);	 -				LLGLEnable cull(GL_CULL_FACE); -				LLGLEnable blend(GL_BLEND); -				if ( pathfindingConsole->isRenderWorld() ) -				{					 -					glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );	 -				} -				else -				{ -					const LLColor4 &clearColor = pathfindingConsole->mNavMeshColors.mNavMeshClear; -					glClearColor(clearColor.mV[0],clearColor.mV[1],clearColor.mV[2],0); -					glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);					 +					glLineWidth(2.0f);	 +					LLGLEnable cull(GL_CULL_FACE); +					LLGLEnable blend(GL_BLEND); +					if ( pathfindingConsole->isRenderWorld() ) +					{					 +						glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );	 +					} +					else +					{ +						const LLColor4 &clearColor = pathfindingConsole->mNavMeshColors.mNavMeshClear; +						glClearColor(clearColor.mV[0],clearColor.mV[1],clearColor.mV[2],0); +						glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);					 +						glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );	 +					} +					int materialIndex = pathfindingConsole->getHeatMapType(); +					llPathingLibInstance->renderNavMesh( materialIndex );  					glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );	 +					glLineWidth(1.0f);	 +					gGL.flush();  				} -				int materialIndex = pathfindingConsole->getHeatMapType(); -				llPathingLibInstance->renderNavMesh( materialIndex ); -				glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );	 -				glLineWidth(1.0f);	 -				gGL.flush(); -			} -			//physics/exclusion shapes -			if ( pathfindingConsole->isRenderAnyShapes() ) -			{	 +				//physics/exclusion shapes +				if ( pathfindingConsole->isRenderAnyShapes() ) +				{					  				gPathfindingProgram.uniform1f("tint", 1.f);  				gGL.flush();  				glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );	 @@ -4398,19 +4402,20 @@ void LLPipeline::renderDebug()  					glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );  				} -			}	 -			//User designated path -			if ( pathfindingConsole->isRenderPath() ) -			{ -				LLGLEnable blend(GL_BLEND); -				llPathingLibInstance->renderPath(); +				}	 +				//User designated path +				if ( pathfindingConsole->isRenderPath() ) +				{ +					LLGLEnable blend(GL_BLEND); +					llPathingLibInstance->renderPath(); +				}  			}  		} -	} -	gGL.flush(); -	if (LLGLSLShader::sNoFixedFunction) -	{ -		gUIProgram.unbind(); +		gGL.flush(); +		if (LLGLSLShader::sNoFixedFunction) +		{ +			gUIProgram.unbind(); +		}  	}  	gGL.color4f(1,1,1,1); @@ -4419,9 +4424,7 @@ void LLPipeline::renderDebug()  	gGL.loadMatrix(gGLModelView);  	gGL.setColorMask(true, false); -	bool hud_only = hasRenderType(LLPipeline::RENDER_TYPE_HUD); -	  	if (!hud_only && !mDebugBlips.empty())  	{ //render debug blips  		if (LLGLSLShader::sNoFixedFunction) diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 528d2a7064..0a90cea886 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -877,6 +877,14 @@                  You can't modify these objects              </panel.string>              <panel.string +             name="text modify info 5"> +                You can't modify this object in frozen mode +            </panel.string> +            <panel.string +             name="text modify info 6"> +                You can't modify these objects in frozen mode +            </panel.string> +            <panel.string               name="text modify warning">                  You must select entire object to set permissions              </panel.string> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index f6c29cc191..e1a7c6309d 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -1490,6 +1490,16 @@ Please make sure none are locked, and that you own all of them.    <notification     icon="alertmodal.tga" +   name="CannotLinkPermanent" +   type="alertmodal"> +Unable to link permanent objects 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="CannotLinkDifferentOwners"     type="alertmodal">  Unable to link because not all of the objects have the same owner. 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 6600339ad7..8a823e8278 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml @@ -31,6 +31,14 @@                  You can't modify these objects              </panel.string>              <panel.string +             name="text modify info 5"> +                You can't modify this object in frozen mode +            </panel.string> +            <panel.string +             name="text modify info 6"> +                You can't modify these objects in frozen mode +            </panel.string> +            <panel.string               name="text modify warning">                  This object has linked parts              </panel.string> | 
