Rotate from view

hi i would like to make scrips that by pressing 1 button the object makes rotate animations 360° from VIEW orientation. i cant find help how to do it. how i change this code to make it rotate on self axis from ( VIEW )

bpy.ops.transform.rotate(value=3.67306, axis=(-0.44061, -0.707429, -0.552636), constraint_axis=(False, False, False), constraint_orientation=‘GLOBAL’, mirror=False, proportional=‘DISABLED’, proportional_edit_falloff=‘SPHERE’, proportional_size=54.7636)
bpy.ops.transform.rotate(value=6.28319, axis=(-0.46035, -0.483258, -0.744674), constraint_axis=(False, False, False), constraint_orientation=‘GLOBAL’, mirror=False, proportional=‘DISABLED’, proportional_edit_falloff=‘SPHERE’, proportional_size=54.7636)

to make it rotate on self axis from ( VIEW )

i completely new to programming i just want make this script becouse i love make rotate objects XD but dont like always to press always same buttons everyday

please help

hi, i waiting now 1 week here, is here someone who can help me with that? please

bpy.ops.transform.rotate(value=6.28319, axis=(0,0,1), constraint_axis=(False, False, False), constraint_orientation=‘GLOBAL’, mirror=False, proportional=‘DISABLED’, proportional_edit_falloff=‘SPHERE’, proportional_size=54.7636)

Change the axis value in the operator to adjust the axis it rotates on.

hi thanks for answering me someone finally. yes i understand this but this would is changing only Z axis on Global Orientation, and not VIEW orientation. i see now its some kind of bug in blender or badly coded? because >>>> if i set Transform Orientation to VIEW, rotate object and click on constraint axis Z option. then its working, but when i copy it to Text Editor window and run that script then its still working like from global orientation.

can someone explain me where is the logic of this?

  1. set in 3D view the orientation mode to Global and then click on white circle and rotate the object.

then copy the code and run it as script in Text Editor window. or just press F6 and see that it is not set up automatically to View orientation.

  1. another try. set in 3D view the orientation mode to VIEW and then click on white circle which should be the Z axis and rotate the object. then press F6 and change the degree. you see that if you look at object from different angle then the rotation remains still same. but if you click on Constraint axis Z and change degree in F6 mode, then the object clears its rotation but then rotates from the angle View around its Z axis.

so if you copy now the code and run the script then its still not dependent of the VIEW orientation

>>>> bpy.ops.transform.rotate(value=0.174533, axis=(0.316235, -0.655227, 0.686056), constraint_axis=(False, False, True), constraint_orientation=‘VIEW’, mirror=False, proportional=‘DISABLED’, proportional_edit_falloff=‘SPHERE’, proportional_size=54.7636, release_confirm=True)

and what does this mean? bpy.data.window_managers[“WinMan”].(null) = 0.0881906 it comes when i changed rotation degree but from different vieew angle that i looked at…

please help someone