How to grab the 3D view rotation value?

Hi!

Let’s say i am making a manual rotation around an arbitrary axis in the viewport. Let’s say we want an openGL addon that will follow this action and display in the 3D view the euler value marked in the picture.

Is there a python function or some mathematical formula that can obtain this value? Note - this is not any of the euler values from the properties panel and it can go beyond 360 (e.g. 752, -1255…)

http://pasteall.org/pic/show.php?id=113363

Go here: https://blenderartists.org/forum/showthread.php?394401-Blender-Orient-Express

Hi Spirou4D , thanks for the link. I think it doesn’t address the problem i mentioned, maybe my description wasn’t clear enough.

Anyway, i talked to developers about this, it seems this value is actually not exposed to python and it is impossible to obtain it through api. The only way to do this would probably be calculating the euler value of the current rotation of the object, but with rotated euler system to the view axis, which is unfortunately too complex for me…

If anyone has an idea on how to do this mathematically, i am open to suggestions…