[Bf-python] Python export of local rotation in degrees

Herbst, Mathias SX1HZA-AOES herbsmth at schaeffler.com
Thu Jul 5 13:26:44 CEST 2012


Hey guys,

I've set up a tracking scene with a tracked moving object, while the camera is also moving. I would like to extract the information about the local rotation in degrees of my object. Therefor I've inserted a cube constrained to the Object solver. The exact information I'm looking for looks like the values of the rotation of my cube in the 3D Viewport when you change the constraint of the Object solver to an F-Curve.

I've been looking for something like what bpy.data.objects['Cube'].matrix_local.to_translation() is to translatory movement for rotary movement in the documentation as well as in the console itself.
What I found was the .to_euler() function. However, I need the rotation in degrees. Of course I could implement my own transformation to the degree values but I think there should be a blender or even a python function for that and I'm just unable to find it or maybe there is a much easier way to get the information.

Sorry to bother you with this. I would be greatful for any help on the matter.


Best regards
Mathias


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20120705/b1364e97/attachment.html>


More information about the Bf-python mailing list