# Script to find the rotation order using the gimbal()actor method # The script also print the corresponding axis name import poser import math scene = poser.Scene() # Selection of actor dialog = poser.DialogSimple.AskActor("Please select the Actor?") currentActorName = scene.CurrentActor().Name() print "Current selected Actor is: %s\n" % currentActorName # Get the rotation order and axis name Gimbaldata = scene.CurrentActor().Gimbal() G11 = Gimbaldata[0][0] G12 = Gimbaldata[0][1] G13 = Gimbaldata[0][2] G21 = Gimbaldata[1][0].Name() G22 = Gimbaldata[1][1].Name() G23 = Gimbaldata[1][2].Name() # Find the first axis in the rotation order and its external name if G11 == 0: R1 = "X" NR1 = G21 elif G11 == 1: R1 = "Y" NR1 = G22 else: R1 = "Z" NR1 = G23 # Find the second axis in the rotation order and its external name if G12 == 0: R2 = "X" NR2 = G21 elif G12 == 1: R2 = "Y" NR2 = G22 else: R2 = "Z" NR2 = G23 # Find the third axis in the rotation order and its external name if G13 == 0: R3 = "X" NR3 = G21 elif G13 == 1: R3 = "Y" NR3 = G22 else: R3 = "Z" NR3 = G23 print "Rotation order is : ", R1 + R2 + R3 print "Corresponding axis are: ", NR1 + " , " + NR2 + " , " +NR3