Fix exceptions in node operator poll functions
This commit is contained in:
@@ -432,6 +432,7 @@ class NODE_OT_viewer_shortcut_set(Operator):
|
||||
del cls
|
||||
space = context.space_data
|
||||
return (
|
||||
(space is not None) and
|
||||
space.type == 'NODE_EDITOR' and
|
||||
space.node_tree is not None and
|
||||
space.tree_type == 'CompositorNodeTree'
|
||||
@@ -495,6 +496,7 @@ class NODE_OT_viewer_shortcut_get(Operator):
|
||||
del cls
|
||||
space = context.space_data
|
||||
return (
|
||||
(space is not None) and
|
||||
space.type == 'NODE_EDITOR' and
|
||||
space.node_tree is not None and
|
||||
space.tree_type == 'CompositorNodeTree'
|
||||
|
||||
Reference in New Issue
Block a user