diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2016-04-23 17:47:41 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2016-04-23 17:47:41 +0300 |
commit | 7c3a79b484179e34f0d5504ea6a9bdd331e686a1 (patch) | |
tree | 6fab30e1b311279e890f130d292a00076e6463c8 | |
parent | e7b6392cd5738c794dc4c7488fbe25499032130b (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.py | 4 |
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 |