m.d.
04-09-2010, 03:48 AM
I feel kinda lazy asking this...
but i havn't played with mel for a while...
does anyone know of s simple script that would take selected shatter peices, and then assign each one an individual collision layer...
I tried writing one for a couple of hours, but it's been 5 years since i touched maya...
basically i know i would have to make an array from list selected
something like
string $shatterPieces[];
string $currentPiece;
$currentPiece = `ls -sl`; (but it would have to select the rigidbody node i believe)
for ($currentPiece in $shatterPieces)
{
setAttr (($currentPeice).collisionlLayer) ($shatterPieces[]);
}
basically something that would take the size of the array and iterate through assigning a collision layer based on the array index ect ect.
anybody care to help with syntax...it's been a while
thanks
but i havn't played with mel for a while...
does anyone know of s simple script that would take selected shatter peices, and then assign each one an individual collision layer...
I tried writing one for a couple of hours, but it's been 5 years since i touched maya...
basically i know i would have to make an array from list selected
something like
string $shatterPieces[];
string $currentPiece;
$currentPiece = `ls -sl`; (but it would have to select the rigidbody node i believe)
for ($currentPiece in $shatterPieces)
{
setAttr (($currentPeice).collisionlLayer) ($shatterPieces[]);
}
basically something that would take the size of the array and iterate through assigning a collision layer based on the array index ect ect.
anybody care to help with syntax...it's been a while
thanks
