Page MenuHome

Fix T87356 & T87358: Small multi-input socket issues
ClosedPublic

Authored by Fabian Schempp (fabian_schempp) on Apr 11 2021, 2:38 AM.

Details

Summary

T87356 occured because last_node_hovered_while_dragging_a_link was not set on node_link_init.
The assert in T87358 failed because the sorting operation was called even if the drag link contained a link to another socket.
A little one frame jump was caused because frame was refreshed after picking a link and before sorting happened.

Diff Detail

Repository
rB Blender
Branch
fix_multi_input_socket_T87358 (branched from master)
Build Status
Buildable 13986
Build 13986: arc lint + arc unit

Event Timeline

Fabian Schempp (fabian_schempp) requested review of this revision.Apr 11 2021, 2:38 AM
Fabian Schempp (fabian_schempp) created this revision.
Fabian Schempp (fabian_schempp) retitled this revision from Fixes T87356 & T87356 to Fixes T87356 & T87358.Apr 11 2021, 2:43 AM
Fabian Schempp (fabian_schempp) edited the summary of this revision. (Show Details)
  • Fixed one frame jump mentioned in comment by Hans Goudey.
  • reverted unneeded change.

Looks good, and it fixes the issues for me. Thanks for addressing it!

Side note-- last_node_hovered_while_dragging_a_link is the kind of variable where it's really nice to have its general purpose documented briefly in a comment.
Otherwise in 4 years someone will be wondering "what does this even do?", "is this still necessary?"
If you felt inclined, it might be nice to add a comment there in a separate commit.

source/blender/editors/space_node/node_relationships.c
228

Is this going to run needlessly in the non-multi-input-socket case? I'm not sure.

Obviously it's not a big problem if it did, but if the check to avoid that was simple I don't see why we wouldn't include it. Only if it's simple though.

This revision is now accepted and ready to land.Apr 14 2021, 6:38 AM
Hans Goudey (HooglyBoogly) retitled this revision from Fixes T87356 & T87358 to Fix T87356 & T87358: Small multi-input socket issues.Apr 14 2021, 6:38 AM