The below script for blender 2.7x is not working with 2.80 How could I fix it? I got the message - "TypeError: Converting py args to operator properties: : keyword "axis" unrecognized".

bpy.ops.transform.rotate(value=wheel_rotation_angle , axis=(wheel_rotation_x_axis, wheel_rotation_y_axis, wheel_rotation_z_axis), constraint_axis=(False, True, True))
  • 1
    $\begingroup$ Use orient_axis instead of axis as the argument name. Check the ops documentation here. $\endgroup$ – Blender Dadaist Sep 25 '19 at 3:34
  • $\begingroup$ "axis" has 3 floating values, however, "orient_axis" has 3x3 floating values. $\endgroup$ – Vivianna Sep 25 '19 at 4:23

Select the object in the 3D window ; key in r,x,30 to rotate 30 deg about the x-axis ; Visit the info window to see and copy/paste the equivalent python code.

I forgot which is local and which is global, i.e. experiment with r,x,30 or r,x,x,30

Note also the use of degrees with the keyboard, but radians in the script: bpy.ops.transform.rotate(value=pi/6, orient_axis='Z',\ orient_type='LOCAL') verified with Blender 2.8

We have left off the numerous optional arguments in this example

| improve this answer | |
New contributor
Phil Barns is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.