[Bf-extensions-cvs] [52111c31] master: Fix error when using transform orientation pie menu.

Brecht Van Lommel noreply at git.blender.org
Tue Jan 8 16:40:27 CET 2019


Commit: 52111c31d7d0d39893b11a5242cbfe2bfbda0d12
Author: Brecht Van Lommel
Date:   Tue Jan 8 16:39:14 2019 +0100
Branches: master
https://developer.blender.org/rBA52111c31d7d0d39893b11a5242cbfe2bfbda0d12

Fix error when using transform orientation pie menu.

===================================================================

M	space_view3d_pie_menus/pie_orientation_menu.py
M	space_view3d_pie_menus/pie_save_open_menu.py

===================================================================

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):



More information about the Bf-extensions-cvs mailing list