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.
Details
Details
Diff Detail
Diff Detail
- Repository
- rB Blender
Event Timeline
Comment Actions
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. | |