ForOinObjectsDoPrintName
09-13-2009, 04:38 AM
Hey guys,
I'm trying a really simple code that simply prints out the translateX values of the current selection. It works fine with a single node selected, but with multiple nodes it errors.
string $mySelection[] = `ls -sl`;
for ($myNode in $mySelection)
{
float $myVal = `getAttr $myNode.translateX`;
print $myVal;
}
The error it brings up is:
Error: Cannot convert data of type float[] to type float.
I'm experienced with maxscript, so i'm a little dumbfounded that I can't get this working. Can't seem to find a straight answer anywhere either :S. Thanks!
I'm trying a really simple code that simply prints out the translateX values of the current selection. It works fine with a single node selected, but with multiple nodes it errors.
string $mySelection[] = `ls -sl`;
for ($myNode in $mySelection)
{
float $myVal = `getAttr $myNode.translateX`;
print $myVal;
}
The error it brings up is:
Error: Cannot convert data of type float[] to type float.
I'm experienced with maxscript, so i'm a little dumbfounded that I can't get this working. Can't seem to find a straight answer anywhere either :S. Thanks!
