[Bf-extensions-cvs] [7c3a79b] master: Fix T48200 part 1: GP allows to access pie menus out of context

Julian Eisel noreply at git.blender.org
Sat Apr 23 17:23:43 CEST 2016


Commit: 7c3a79b484179e34f0d5504ea6a9bdd331e686a1
Author: Julian Eisel
Date:   Sat Apr 23 16:47:41 2016 +0200
Branches: master
https://developer.blender.org/rBA7c3a79b484179e34f0d5504ea6a9bdd331e686a1

Fix T48200 part 1: GP allows to access pie menus out of context

Only allow object mode pie to be spawned in 3D view.

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

M	ui_pie_menus_official.py

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

diff --git a/ui_pie_menus_official.py b/ui_pie_menus_official.py
index d78aeaf..6ead176 100644
--- a/ui_pie_menus_official.py
+++ b/ui_pie_menus_official.py
@@ -37,6 +37,10 @@ from bpy.props import EnumProperty
 class VIEW3D_PIE_object_mode(Menu):
     bl_label = "Mode"
 
+    @classmethod
+    def poll(cls, context):
+        return (context.space_data.type == 'VIEW_3D')
+
     def draw(self, context):
         layout = self.layout



More information about the Bf-extensions-cvs mailing list