Skip to content
Snippets Groups Projects
Commit ff5df8a7 authored by Falk David's avatar Falk David Committed by Falk David
Browse files

Fix #114564: Can't search grease pencil modifiers

The grease pencil modifier list hasn't been converted to a menu yet.
This fixes the issue by filtering out grease pencil objects in
the search poll function.

Pull Request: https://projects.blender.org/blender/blender/pulls/114665
parent 16553c2a
Branches
No related tags found
No related merge requests found
...@@ -227,7 +227,10 @@ class AddModifierMenu(Operator): ...@@ -227,7 +227,10 @@ class AddModifierMenu(Operator):
@classmethod @classmethod
def poll(cls, context): def poll(cls, context):
# NOTE: This operator only exists to add a poll to the add modifier shortcut in the property editor. # NOTE: This operator only exists to add a poll to the add modifier shortcut in the property editor.
object = context.object
space = context.space_data space = context.space_data
if object and object.type == 'GPENCIL':
return False
return space and space.type == 'PROPERTIES' and space.context == 'MODIFIER' return space and space.type == 'PROPERTIES' and space.context == 'MODIFIER'
def invoke(self, context, event): def invoke(self, context, event):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment