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

Only allow object mode pie to be spawned in 3D view.
This commit is contained in:
Julian Eisel 2016-04-23 16:47:41 +02:00
parent e7b6392cd5
commit 7c3a79b484
Notes: blender-bot 2023-02-14 19:48:42 +01:00
Referenced by issue #48200, GP allows to access pie menus out of context
1 changed files with 4 additions and 0 deletions

View File

@ -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