mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
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:
parent
a649ff7b98
commit
ae7c71ef09
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue