Fix Python error when trying to call the Search Menu with no object
When pressing F3 to bring up the Search Menu, an error appeared because the MoveModifierToNodes operator's poll method did not consider the context where no object was selected. Pull Request: https://projects.blender.org/blender/blender/pulls/107310
This commit is contained in:
committed by
Hans Goudey
parent
a649ff7b98
commit
ae7c71ef09
@@ -43,6 +43,8 @@ def get_context_modifier(context):
|
||||
if context.area.type == 'PROPERTIES':
|
||||
modifier = context.modifier
|
||||
else:
|
||||
if context.object is None:
|
||||
return False
|
||||
modifier = context.object.modifiers.active
|
||||
if modifier is None or modifier.type != 'NODES':
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user