Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2016-04-23 17:47:41 +0300
committerJulian Eisel <eiseljulian@gmail.com>2016-04-23 17:47:41 +0300
commit7c3a79b484179e34f0d5504ea6a9bdd331e686a1 (patch)
tree6fab30e1b311279e890f130d292a00076e6463c8
parente7b6392cd5738c794dc4c7488fbe25499032130b (diff)
Fix T48200 part 1: GP allows to access pie menus out of context
Only allow object mode pie to be spawned in 3D view.
-rw-r--r--ui_pie_menus_official.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui_pie_menus_official.py b/ui_pie_menus_official.py
index d78aeaf4..6ead1769 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