cwisbg
11-23-2011, 11:03 PM
So im just trying to get transforms from one object, store them, and then apply them to another object.
So far i have the getting atributes from one object with-
string $Tree[] = `ls -sl`;
for($i =0; $i < size($Tree); $i++){ // ( this is ment to, in my mind, cycle thought the array and do //the following opporations to every thing. not sure if this is right please correct me )
float $rx = `getAttr $Tree.rx`;
float $ry = `getAttr $Tree.ry`;
float $rz = `getAttr $Tree.rz`;
vector $attrs = << $rx, $ry, $rz>>;
print $attrs;
}
this works for getting the attributs from one object selected, but when i try two objects it returns
// Error: Cannot convert data of type float[] to type float. //
and i dont know what it even mean or how to fix it ...help would be much appreciated
So far i have the getting atributes from one object with-
string $Tree[] = `ls -sl`;
for($i =0; $i < size($Tree); $i++){ // ( this is ment to, in my mind, cycle thought the array and do //the following opporations to every thing. not sure if this is right please correct me )
float $rx = `getAttr $Tree.rx`;
float $ry = `getAttr $Tree.ry`;
float $rz = `getAttr $Tree.rz`;
vector $attrs = << $rx, $ry, $rz>>;
print $attrs;
}
this works for getting the attributs from one object selected, but when i try two objects it returns
// Error: Cannot convert data of type float[] to type float. //
and i dont know what it even mean or how to fix it ...help would be much appreciated
