Perhaps if I find out why this "Doesn't" work It'll solve all my problems.
string $currentSelect[] = `ls -selection`;
duplicate -name ("NewObject_" + $currentSelect);
Im trying to name the duplicated object to the same name as the old with a prefix of NewObject. It's a simple enough procedure why doesn't it work??
Replies
string $currentSelect[] = `ls -selection`;
duplicate -name ("NewObject_" + $currentSelect[0]);
}
$currentSelect is an array, so you have to reference an element of it.
If you want it to work on everything you have selected:
{
string $sel[] = `ls -sl`;
for ($node in $sel)
duplicate -n ("NewObject_" + $node) $node;
}
IT doesn't check to see if you have an object selected though.
And this should have gone into 2d/3d discussion.
This is the place i go when i got trouble with a MEL.
hope this helps