One more ASL problem here (it's not worth starting a new topic for this...): Float4x4 type arrays don't work.
I made a simple test - the following script will print global coordinates of each point to the console:
#command("object");
shape $Shapes[0], $S;
int $i;
file $file;
float4x4 $GlobalTransform;
point3 $GlobalCoords;
project.curObject.GetShapes($Shapes);
$S = $Shapes[0];
$GlobalTransform = $S.GetGlobalTransform();
for $i = 0 to $S.GetNumPoints()-1 do {
$GlobalCoords = $GlobalTransform.Project($S.GetPoint($i));
$file.open("$console", "w");
$file.print(PrintToString("Point# %d, XYZ: (%f, %f, %f)\n", $i, $GlobalCoords.x, $GlobalCoords.y, $GlobalCoords.z));
$file.close;
}
When I change the $GlobalTransform variable to an array, the script will return (0, 0, 0) for all the points:
#command("object");
shape $Shapes[0], $S;
int $i;
file $file;
float4x4 $GlobalTransform[1];
point3 $GlobalCoords;
project.curObject.GetShapes($Shapes);
$S = $Shapes[0];
$GlobalTransform[0] = $S.GetGlobalTransform();
for $i = 0 to $S.GetNumPoints()-1 do {
$GlobalCoords = $GlobalTransform[0].Project($S.GetPoint($i));
$file.open("$console", "w");
$file.print(PrintToString("Point# %d, XYZ: (%f, %f, %f)\n", $i, $GlobalCoords.x, $GlobalCoords.y, $GlobalCoords.z));
$file.close;
}
I didn't find anything about float4x4 arrays in the ASL specification. Is there a reason why they don't work? Is it a bug?