That was not that hard ! Converting quaternions to classical degrees and implement rotations on the exporter. That way I can rotate as wanted any object, and those modifications will be too on the final OpenGL scene.
If that can help someone, here is my current MaxScript :
clearListener()
for i=1 to objects.count do
(
final_text = ""
if Superclassof objects[i] == Geometryclass then
(
instance = objects[i]
coords = instance.pos
x = coords[1] as string
y = coords[3] as string
z = -coords[2]
z = z as string
angles = instance.rotation as eulerAngles
angle_x = -angles.x
angle_x = angle_x as string
angle_y = angles.y as string
angle_z = -angles.z
angle_z = angle_z as string
final_text = final_text + instance.name + " " + x + " " + y + " " + z + " " + angle_x + " " + angle_y + " " + angle_z
format "%\n" final_text
)
)
which renders a text file with lines like the ones bellow :
obj_computer -2.31652 0.0 -0.467049 0.0 0.0 0.0
toDraw_computer_01 1.75932 1.07251 4.37115 0.0 0.0 -90.0
toDraw_computer_02 6.29113 1.07251 2.6695 0.0 0.0 0.0
toDraw_computer_03 5.42527 1.07251 5.44239 0.0 0.0 0.0
Link to this comment:
All Comments (0)