// Copyright (C) 1997-2006 Autodesk, Inc., and/or its licensors.
// All rights reserved.
//
// The coded instructions, statements, computer programs, and/or related
// material (collectively the "Data") in these files contain unpublished
// information proprietary to Autodesk, Inc. ("Autodesk") and/or its licensors,
// which is protected by U.S. and Canadian federal copyright law and by
// international treaties.
//
// The Data is provided for use exclusively by You. You have the right to use,
// modify, and incorporate this Data into other products for purposes authorized 
// by the Autodesk software license agreement, without fee.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. AUTODESK
// DOES NOT MAKE AND HEREBY DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTIES
// INCLUDING, BUT NOT LIMITED TO, THE WARRANTIES OF NON-INFRINGEMENT,
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR ARISING FROM A COURSE 
// OF DEALING, USAGE, OR TRADE PRACTICE. IN NO EVENT WILL AUTODESK AND/OR ITS
// LICENSORS BE LIABLE FOR ANY LOST REVENUES, DATA, OR PROFITS, OR SPECIAL,
// DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES, EVEN IF AUTODESK AND/OR ITS
// LICENSORS HAS BEEN ADVISED OF THE POSSIBILITY OR PROBABILITY OF SUCH DAMAGES.

//
//	hideParticleAttrs.mel
//
//	Description:
//		Hides (as in, makes unkeyable, and hidden in the channel box), all the
//	particle attributes of the given nParticle node.
//
//		Arguments:	nParticle node
//

global proc hideParticleAttrs( string $node )
//
//	Description:
//		Hides the particle attributes for the given nCloth/nRigid, so they
//	won't show up in the channel box.
//
{
	setAttr -keyable false -channelBox false ($node + ".dieOnEmissionVolumeExit");
	setAttr -keyable false -channelBox false ($node + ".lifespanMode");
	setAttr -keyable false -channelBox false ($node + ".lifespanRandom");
	setAttr -keyable false -channelBox false ($node + ".expressionsAfterDynamics");
	setAttr -keyable false -channelBox false ($node + ".isDynamic");
	setAttr -keyable false -channelBox false ($node + ".dynamicsWeight");
	setAttr -keyable false -channelBox false ($node + ".forcesInWorld");
	setAttr -keyable false -channelBox false ($node + ".conserve");
	setAttr -keyable false -channelBox false ($node + ".emissionInWorld");
	setAttr -keyable false -channelBox false ($node + ".maxCount");
	setAttr -keyable false -channelBox false ($node + ".levelOfDetail");
	setAttr -keyable false -channelBox false ($node + ".inheritFactor");
	setAttr -keyable false -channelBox false ($node + ".currentTime");
	setAttr -keyable false -channelBox false ($node + ".startFrame");
	setAttr -keyable false -channelBox false ($node + ".inputGeometrySpace");
	setAttr -keyable false -channelBox false ($node + ".enforceCountFromHistory");
	setAttr -keyable false -channelBox false ($node + ".targetGeometrySpace");
	setAttr -keyable false -channelBox false ($node + ".goalSmoothness");
	setAttr -keyable false -channelBox false ($node + ".cacheData");
	setAttr -keyable false -channelBox false ($node + ".traceDepth");
	setAttr -keyable false -channelBox false ($node + ".particleRenderType");
}

global proc hideAllParticleAttrs()
//
//	Description:
//		Hide the particle attrs for all the nParticle nodes in the scene.
//
{
	string $shapes[] = `ls -type nParticle`;
	int $numShapes = size( $shapes );
	int $index = 0;
	while( $index < $numShapes ){
		string $node = $shapes[$index];
		hideParticleAttrs( $node );
		$index++;
	}
}
