Fix #104438 : Lazy mix connects wrong sockets #104457

Merged
Damien Picard merged 1 commits from wannes.malfait/blender-addons:nw_mix_disabled_sockets into blender-v3.5-release 2023-03-05 11:48:01 +01:00
Member

Because the new mix nodes have different modes, the correct output
socket to connect is not just the first one, but the first enabled one.
There were already some checks in place for this, but apparently not yet
in all the needed places.

The current state of the code for the "Merge Nodes" operator is
terrible, and should probably be refactored in a future update. It is
becoming very hard to maintain.

Because the new mix nodes have different modes, the correct output socket to connect is not just the first one, but the first enabled one. There were already some checks in place for this, but apparently not yet in all the needed places. The current state of the code for the "Merge Nodes" operator is terrible, and should probably be refactored in a future update. It is becoming very hard to maintain.
Wannes Malfait added 1 commit 2023-02-28 15:45:43 +01:00
Because the new mix nodes have different modes, the correct output
socket to connect is not just the first one, but the first enabled one.
There were already some checks in place for this, but apparently not yet
in all the needed places.

The current state of the code for the "Merge Nodes" operator is
terrible, and should probably be refactored in a future update. It is
becoming very hard to maintain.
Author
Member

@pioverfour I tested this as much as I could, but I'm not aware of all of node wrangler's functionality. Could you test this as well to make sure that there is not some other thing that I forgot to fix, or broke by accident?

@pioverfour I tested this as much as I could, but I'm not aware of all of node wrangler's functionality. Could you test this as well to make sure that there is not some other thing that I forgot to fix, or broke by accident?
Wannes Malfait requested review from Jacques Lucke 2023-02-28 15:49:38 +01:00
Wannes Malfait requested review from Damien Picard 2023-02-28 15:49:38 +01:00
Member

I'm not aware of all of node wrangler's functionality. Could you test this as well to make sure that there is not some other thing that I forgot to fix, or broke by accident?

Me neither, I probably use one tenth of it! I didn’t even know about the lazy mix reconnect.
I’ll test the PR tomorrow. :)

> I'm not aware of all of node wrangler's functionality. Could you test this as well to make sure that there is not some other thing that I forgot to fix, or broke by accident? Me neither, I probably use one tenth of it! I didn’t even know about the lazy mix reconnect. I’ll test the PR tomorrow. :)
Damien Picard approved these changes 2023-03-01 14:18:01 +01:00
Damien Picard left a comment
Member

LGTM.

Out of scope for this PR, but it would be nice to detect the socket types for shading nodes, and use that as the type for the mix node since it can now be float, color, or vector.

LGTM. Out of scope for this PR, but it would be nice to detect the socket types for shading nodes, and use that as the type for the mix node since it can now be float, color, or vector.
Author
Member

Out of scope for this PR, but it would be nice to detect the socket types for shading nodes, and use that as the type for the mix node since it can now be float, color, or vector.

I was thinking the same thing, but that is indeed a new feature, and should be for 3.6. It would probably be best to refactor the current code before that change though (and maybe add some tests).

> Out of scope for this PR, but it would be nice to detect the socket types for shading nodes, and use that as the type for the mix node since it can now be float, color, or vector. I was thinking the same thing, but that is indeed a new feature, and should be for 3.6. It would probably be best to refactor the current code before that change though (and maybe add some tests).
Damien Picard merged commit f592ca1059 into blender-v3.5-release 2023-03-05 11:48:01 +01:00
Sign in to join this conversation.
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#104457
No description provided.