diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-01-08 18:39:14 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-01-08 18:40:09 +0300 |
commit | 52111c31d7d0d39893b11a5242cbfe2bfbda0d12 (patch) | |
tree | 42dee600578e4ed46365679e9c5a7a73d316efe3 | |
parent | cd2cb421fd79772118114d17380697459c9eb18a (diff) |
Fix error when using transform orientation pie menu.
-rw-r--r-- | space_view3d_pie_menus/pie_orientation_menu.py | 31 | ||||
-rw-r--r-- | space_view3d_pie_menus/pie_save_open_menu.py | 2 |
2 files changed, 3 insertions, 30 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 ) diff --git a/space_view3d_pie_menus/pie_save_open_menu.py b/space_view3d_pie_menus/pie_save_open_menu.py index e71f7924..d3586141 100644 --- a/space_view3d_pie_menus/pie_save_open_menu.py +++ b/space_view3d_pie_menus/pie_save_open_menu.py @@ -73,7 +73,7 @@ class pie_link(Menu): box = pie.split().column() box.operator("wm.link", text="Link", icon='LINK_BLEND') box.operator("wm.append", text="Append", icon='APPEND_BLEND') - box.menu("external.data", text="External Data", icon='EXTERNAL_DATA') + box.menu("external.data", text="External Data") class pie_recover(Menu): |