Yaw/Pitch/Roll To Eulers? (and back again)

Hi All,

Does anyone have code that can convert yaw/pitch/roll values to XYZ euler rotation?
Also the invert would be needed as well. To convert XYZ rotation back to Yaw/Pitch/Roll?

Thanks:yes:

Thank you, so just to be clear, that link claims that yaw/pitch/roll are just names for ZYX and there is no conversion needed at all.


yaw = ob.rotation_euler.z
pitch = ob.rotation_euler.y
roll = ob.rotation_euler.x

Well that simplifies it.

Funny I did a search on yaw, in the coding forum before I posted this thread, and got zero results. I did a search on pitch and got some results about sound. I wonder why the search engine of this site missed that post as a result?

The best/fastest/easiest way to search this site is with Google. Just add

site:blenderartists.org

after your terms.