In Blender 2.7 the current coordinate system could be changed through the
1 |
bpy.context.space_data.transform_orientation |
property. In Blender 2.8 coordinate system access moved to the scene collection of “TransformOrientatiosSlots” objects. To get or set the current coordinate system the “transform_orientation_slots” collection is used.
1 2 3 4 5 6 7 8 |
bpy.context.window.scene.transform_orientation_slots[0].type # 'GLOBAL' bpy.context.window.scene.transform_orientation_slots[0].type = 'LOCAL' bpy.context.window.scene.transform_orientation_slots[0].type # 'LOCAL' |