enter image description here

As the picture showed, I changed the coordinate into LOCAL, then paste the command blender given to me into the console and run, but error...


1 Answer 1


If you are trying to change the Transform Orientation for the current scene, the code is:

bpy.context.scene.transform_orientation_slots[0].type = 'LOCAL'

to find this out, I hovered over the menu to change transforms and looked at the Python tooltip:

Python tooltip for Transform Orientation

in the above I've underlined the result I saw while hovering over 'Local' in the menu.

Transform Orientation Slot is a field in bpy.types.Scene so you can change it for any scene. The tooltip gives the generic reference through bpy.data.scenes but I knew that the current scene is stored in bpy.context.scene so I used that.

The valid values for type include 'Global', 'Local', 'Normal', 'Gimbal', 'View', and 'Cursor', hatching the types given in the menu.

  • $\begingroup$ Got that. Thanks! $\endgroup$
    – P. Scotty
    Apr 14, 2022 at 15:17

You must log in to answer this question.

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