Hi There,
I wrote a simple script to do that task, so if you want to change all the nCloth attributes in your scene, please DON'T select anything. If you want to change a single node, please select ONE mesh node.
// COMMAND
// ChangeClothRiggidity( ATTRIBUTE, VALUE );
// ie...
ChangeClothRiggidity( "rigidity", 10 );
global proc int ChangeClothRiggidity( string $attrib, float $value )
{
string $selNodes[] = ls -sl -l -dag -typ "mesh";
string $clothShapes[];
if( !size( $selNodes ) )
{
$selNodes = ls -l -typ "mesh";
}
for( $selNode in $selNodes )
{
string $cons[] = listConnections -t "nCloth" $selNode;
if( size( $cons ) )
{
if( !stringArrayContains( $cons[0], $clothShapes ) )
{
$clothShapes[size( $clothShapes )] = $cons[0];
}
}
}
if( !size( $clothShapes ) )
{
warning( "Unable to find clothShape nodes" );
return true;
}
float $increment = 100 / ((float)size($clothShapes));
float $progress = 0;
progressWindow -t "Processing..." -pr ((int)$progress) -st "Progress: 0%" -ii 1;
for( $clothShape in $clothShapes )
{
$progress += $increment;
progressWindow -e -t $clothShape -pr ((int)$progress) -st ("Progress: " + ((int)$progress)+"%");
if( progressWindow -q -ic )
{
break;
}
setAttr( $clothShape + "." + $attrib ) $value;
}
progressWindow -ep;
return false;
}
Thank You,
Norbert Nacu