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
Member

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.

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.
Damien Picard added 1 commit 2023-04-12 14:53:59 +02:00
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.
Wannes Malfait approved these changes 2023-04-12 15:11:30 +02:00
Wannes Malfait left a comment
Member

Simple change, but a needed one. Looks good to me. Good that you got rid of the redundant link_made variable as well.

Simple change, but a needed one. Looks good to me. Good that you got rid of the redundant `link_made` variable as well.
Damien Picard merged commit 0bfeb38c41 into main 2023-04-12 15:41:18 +02:00
Damien Picard deleted branch nw_fix_104470 2023-04-12 15:41:18 +02:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#104542
No description provided.