diff options
| author | Graham Madarasz <graham@lindenlab.com> | 2013-05-07 12:43:15 -0700 | 
|---|---|---|
| committer | Graham Madarasz <graham@lindenlab.com> | 2013-05-07 12:43:15 -0700 | 
| commit | 080981ae8b14b71c5832de11fb968a31a4b5810c (patch) | |
| tree | 25bdbd5a20e741299782455b920159424e725811 /indra/newview | |
| parent | 29246e8a1fa1f8ebec307cc32017910d1e4ab5f4 (diff) | |
NORSPEC-119 another attempt at individual faces edits without side-effects
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llpanelface.cpp | 19 | 
1 files changed, 18 insertions, 1 deletions
| diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 1fbf4a39e6..f55d53fa29 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -1791,6 +1791,8 @@ void LLPanelFace::updateMaterial()  		LLMaterialPtr material_to_set = mMaterial; +		bool subselection = false; +  		// If we're editing a single face and not the entire material for an object,  		// we need to clone the material so that our changes to the material's settings  		// don't automatically propagate to the non-selected faces @@ -1804,6 +1806,7 @@ void LLPanelFace::updateMaterial()  			{  				llinfos << "Cloning material to apply to subselection." << llendl;  				material_to_set = new LLMaterial(mMaterial->asLLSD()); +				subselection = true;  			}  			else  			{ @@ -1888,7 +1891,21 @@ void LLPanelFace::updateMaterial()  		LL_DEBUGS("Materials") << "Updating material: " << material_to_set->asLLSD() << LL_ENDL; -      LLSelectMgr::getInstance()->selectionSetMaterial( material_to_set ); + +		if (node && node->getObject() && node->getObject()->permModify() && subselection) +		{	 +			int selected_te = node->getLastSelectedTE(); +			if (selected_te >= 0) +			{ +				LLMaterialMgr::getInstance()->put(node->getObject()->getID(),selected_te,*material_to_set); +				node->getObject()->getTE(selected_te)->setMaterialParams(material_to_set); +				node->getObject()->sendTEUpdate(); +			} +		} +		else +		{ +			LLSelectMgr::getInstance()->selectionSetMaterial( material_to_set ); +		}  	}  	else  	{ | 
