Node Wrangler: Fix #104555, multiple operators using virtual sockets
commitdc6c334c4d6b703b2cc148e1f1eb1859db68e9a6
authorDamien Picard <dam.pic@free.fr>
Tue, 18 Apr 2023 20:34:14 +0000 (18 22:34 +0200)
committerDamien Picard <dam.pic@free.fr>
Sun, 23 Apr 2023 18:18:30 +0000 (23 20:18 +0200)
tree9b0d800b5cc2f4974bf910b4eeccfd58840d4895
parent67df36c993967f2c8e1c30d0d80373687cfe4498
Node Wrangler: Fix #104555, multiple operators using virtual sockets

The bpy_extras.node_utils.connect_sockets() API allows creating node
links to or from virtual sockets. It was used in 0bfeb38c41 to fix one
mode of the lazy connect operator, but the mode with menu was still
affected.

Other operators were affected too, such as Add Texture Setup, Merge
Nodes, or Swap Links when one of the input nodes was a Group Input
with no socket.

This commit replaces all occurrences of `links.new()` by
`bpy_extras.node_utils.connect_sockets()` in Node Wrangler. It should
have no drawback since the new API is compatible with the ordinary
one.
node_wrangler/__init__.py
node_wrangler/operators.py