Unable to get correct attribute values from MFnAnimCurve

9 views
Skip to first unread message

yann19

unread,
Feb 10, 2020, 6:33:28 PM2/10/20
to Python Programming for Autodesk Maya
I had a locator, where the following attributes are keyed at Frame 2:
  • rotateX : 10
  • rotateY : 20
  • rotateZ : 30

 I am trying to get the rotational values at every frame, even so, I am having issues in deriving from just one frame.

When I run my following code (see here), instead of getting 10, 20 and 30 as my output, it is giving me 0.174532925199, 0.349065850399 and 0.523598775598 as the results.

Did set my current time to Frame 2, still I am getting the same output result.

Not exactly sure where I am doing it wrong, appreciate if someone could kindly point that out to me.

Angelo Sta. Catalina

unread,
Feb 10, 2020, 6:55:52 PM2/10/20
to python_in...@googlegroups.com
you're getting values in radians. You can convert it back to degrees using the math module math.degrees(x)

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/04f676f4-9c68-4f44-87b9-6c7cd11122a0%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages