Fix: exception when using menu search outside of properties editor

This commit is contained in:
Jacques Lucke
2023-09-06 10:03:43 +02:00
parent 8c43cc3f83
commit 461a458e85

View File

@@ -189,7 +189,7 @@ class AddModifierMenu(Operator):
@classmethod
def poll(cls, context):
space = context.space_data
return space and space.context == "MODIFIER"
return space and space.type == 'PROPERTIES' and space.context == "MODIFIER"
def invoke(self, context, event):
return bpy.ops.wm.call_menu(name="OBJECT_MT_modifier_add")