[Closed] axisorder on Local Euler XYZ wont set itself
leu = Local_Euler_XYZ()
leu.axisorder = 5
This doesnt appear to work. leu.axisorder always prints out ‘1’. Aside from changing the dropdown manually, is there a scriptable workaround to force this value to change?
Why are you using the local_euler_xyz controller, It isn’t any differernt then an euler_xyz. they axis order was just differernt. This is why they got rid of it.
hmm, yes changing the axisorder on a euler_xyz works, but it isnt exactly the same as the local_euler_xyz. I’ll keep working on it.
Thanks!
I’m not a transformations guru, so I dont know how to accurately describe how they are different, so here is a script that replicates my situation:
Don’t forget to manually set the axis order to ZXY on the dummy labeled ‘Euler Local’
global d_xyz
if d_xyz != undefined do delete d_xyz
d_xyz = dummy()
global d_local_xyz
if d_local_xyz != undefined do delete d_local_xyz
d_local_xyz = dummy()
global myData
if myData == undefined do
myData = #(
#(0,0,0,0)
, #(1,0,0,45)
, #(2,0,0,90)
, #(3,0,0,135)
, #(4,0,0,180)
, #(5,0,0,0)
, #(6,45,0,0)
, #(7,90,0,0)
, #(8,135,0,0)
, #(9,180,0,0)
, #(10,0,0,0)
, #(11,0,45,0)
, #(12,0,90,0)
, #(13,0,135,0)
, #(14,0,180,0)
, #(15,0,0,0)
, #(16,45,45,45)
, #(17,90,90,90)
, #(18,135,135,135)
, #(19,180,180,180)
)
d_local_xyz.pos = [0,20,0]
d_xyz.name = "Euler"
d_xyz.rotation.controller = Euler_XYZ()
d_xyz.rotation.controller.axisorder = 5 --ZXY
d_local_xyz.name = "Euler Local"
d_local_xyz.rotation.controller = Local_Euler_XYZ()
d_local_xyz.rotation.controller.axisorder = 5 --ZXY (But it has to be set manually)
with animate on (
for dataPt in myData do (
at time (dataPt[1]*5.0) (
-- the orders are different so that z = local_z (for example) in the track view
d_xyz.rotation.controller.x_rotation = dataPt[3]
d_xyz.rotation.controller.y_rotation = dataPt[4]
d_xyz.rotation.controller.z_rotation = dataPt[2]
d_local_xyz.rotation.controller.local_x_rotation = dataPt[2]
d_local_xyz.rotation.controller.local_y_rotation = dataPt[3]
d_local_xyz.rotation.controller.local_z_rotation = dataPt[4]
)
)
)
I’d love to know what to do in order to use the Euler_XYZ, but my solution with Local_Euler_XYZ works (even though its a pain to manually set ZXY) and I’m running out of time to develop the tool, heh
Local_euler() is identical to euler_xyz() as Paul said they just have a different axis order, what are you trying to do write?
I have some simulation data that my company has created and they want to use that as a basis for an animation. The data consists of xyz position data and yaw/pitch/roll orientation over time. The document I have that details the YPR values says:
Orientation is customarily expressed by a “yaw, pitch, roll” floating point triplet (Euler angles in degrees). The order of operations is yaw, pitch, then roll. Yaw is negative rotation about z-axis, pitch is positive rotation about x-axis, and roll is positive rotation about y-axis.
Using a plane as an example, a VRML model’s local coordinate system has y out the nose, x out the right wing, and z out the tail.So… a plane with position <0, 0, 0> and yaw, pitch, roll <0, 0, 0> would be centered at the Earth origin with the nose pointed toward India, the right wing pointed to the notch of Africa, and the tail pointing towards the north pole.
My company has a 3d engine that they use to view this data. Local_Euler_XYZ with a ZXY axis order orients the dummy the same as in our 3d program.