diff --git a/node_wrangler/operators.py b/node_wrangler/operators.py index ca05fb695..7a651ad41 100644 --- a/node_wrangler/operators.py +++ b/node_wrangler/operators.py @@ -1103,6 +1103,17 @@ class NWMergeNodes(Operator, NWBase): if selected_mix and selected_math and merge_type == 'AUTO': selected_mix += selected_math selected_math = [] + + # If no nodes are selected, do nothing and pass through. + if not any(nodes_list for nodes_list in [selected_mix, + selected_shader, + selected_geometry, + selected_math, + selected_vector, + selected_z, + selected_alphaover]): + return {'PASS_THROUGH'} + for nodes_list in [ selected_mix, selected_shader,