diff --git a/scripts/startup/bl_operators/node.py b/scripts/startup/bl_operators/node.py index b8c5dfc3ac9..f5dfae789a4 100644 --- a/scripts/startup/bl_operators/node.py +++ b/scripts/startup/bl_operators/node.py @@ -250,13 +250,10 @@ class NODE_OT_tree_path_parent(Operator): class NodePanelOperator(): @classmethod def poll(cls, context): - snode = context.space_data - if snode is None: + space = context.space_data + if not space or space.type != 'NODE_EDITOR' or not space.edit_tree: return False - tree = snode.edit_tree - if tree is None: - return False - if tree.is_embedded_data: + if space.edit_tree.is_embedded_data: return False return True