Fix #104470: Node Wrangler: Lazy Connect changed behaviour #104542

Merged
Damien Picard merged 1 commits from pioverfour/blender-addons:nw_fix_104470 into main 2023-04-12 15:41:18 +02:00

1 Commits

Author SHA1 Message Date
997cb11d9e Fix #104470: Node Wrangler: Lazy Connect changed behaviour
There was an API change in Blender 3.5, after which connecting virtual
sockets (sockets inside groups not yet matching any output or input)
through scripts resulted in broken links. A link was created, but not
the matching group input or output.

In 81815681d0 a new API `bpy_extras.node_utils.connect_sockets()` was
introduced to handle this case by creating an input or output of the
matching type and name.

The Lazy Connect operator was in this exact situation, and replacing
`links.new()` by `connect_sockets()` fixes the issue.
2023-04-12 14:49:59 +02:00