I am trying to update my plug-in from Blender 2.79 code. I am getting the following error from Blender:

TypeError: Converting py args operator properties: keyword "constraint_orientation" unrecognized.

Screenshot of Blender constraint_orientation error

The code relates to this call in __init__.py:

bpy.ops.transform.translate(value=(0, 1.5, 0), constraint_axis=(False, True, False), constraint_orientation='LOCAL')

What is the right way create such a constraint in Blender 2.80?

  • 1
    $\begingroup$ Did you check the documentation? $\endgroup$ Feb 9, 2020 at 17:41
  • $\begingroup$ Also, you might want to look into using matrix_world translations instead of call bpy.ops.transform.translate. You can create a trans_local variable Vector for the translation, combine the local translation with the world matrix with obj.matrix_world.to_3x3() @ trans_local, and the translate with obj.matrix_world.translation += trans_world. Might be a little cleaner. $\endgroup$ Feb 9, 2020 at 17:57

1 Answer 1


Replace constraint_orientation with orient_type.

Links aren't ideal because they might die. If there is a way to add this more permanently, please let me know.


enter image description here


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .