diff options
Diffstat (limited to 'space_view3d_pie_menus/pie_orientation_menu.py')
-rw-r--r-- | space_view3d_pie_menus/pie_orientation_menu.py | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/space_view3d_pie_menus/pie_orientation_menu.py b/space_view3d_pie_menus/pie_orientation_menu.py index 04e77c95..801fbaa0 100644 --- a/space_view3d_pie_menus/pie_orientation_menu.py +++ b/space_view3d_pie_menus/pie_orientation_menu.py @@ -39,22 +39,6 @@ from bpy.props import ( ) -class OrientPoll(Operator): - bl_idname = "pie.orientation" - bl_label = "Orientation Poll" - bl_options = {'INTERNAL'} - - space: StringProperty() - - @classmethod - def poll(cls, context): - return context.space_data.type == "VIEW_3D" - - def execute(self, context): - context.scene.transform_orientation = self.space - return {'FINISHED'} - - class OrientPie(Menu): bl_label = "Transform Orientation" bl_idname = "pie.orient" @@ -62,26 +46,15 @@ class OrientPie(Menu): def draw(self, context): layout = self.layout pie = layout.menu_pie() - view = context.space_data - - pie.operator("pie.orientation", text="Global").space = 'GLOBAL' - pie.operator("pie.orientation", text="Local").space = 'LOCAL' - pie.operator("pie.orientation", text="Gimbal").space = 'GIMBAL' - - # XXX: Display only custom orientations - pie = pie.box() - pie.prop(view, "transform_orientation", text="") - pie = layout.menu_pie() + scene = context.scene - pie.operator("pie.orientation", text="Normal").space = 'NORMAL' - pie.operator("pie.orientation", text="View").space = 'VIEW' + pie.prop(scene.transform_orientation_slots[0], "type", expand=True) addon_keymaps = [] classes = ( OrientPie, - OrientPoll ) |