Page MenuHome

Fix: Fixes Bug with Multi Input Sockets picking wrong link if no link is selected
ClosedPublic

Authored by Fabian Schempp (fabian_schempp) on Feb 15 2021, 12:23 AM.

Details

Summary

The socket drag opperator stores the index of the last picked socket into RNA in case the user mouse cursor leaves the link while dragging.

This id is not uniqe which is why sometimes a link from an other node withthe same id is picked.

This patch changes the way the last picked link is stored and stores a pointer to the link directly into SpaceNode_Runtime instead.


Video of the bug by @Pablo Vazquez (pablovazquez)

Diff Detail

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

Event Timeline

Fabian Schempp (fabian_schempp) requested review of this revision.Feb 15 2021, 12:23 AM
Fabian Schempp (fabian_schempp) created this revision.
Fabian Schempp (fabian_schempp) retitled this revision from Fix: Fixes Bug with Multi Input Sockets picking wrong link if no link is picked. to Fix: Fixes Bug with Multi Input Sockets picking wrong link if no link is selected.Feb 15 2021, 12:37 AM

I agree. Sometimes i have the same problem. But forever reason not every time i grab a Node

Hans Goudey (HooglyBoogly) requested changes to this revision.Mar 2 2021, 4:40 PM

I tested this a while ago and it fixed the problem for me. Thanks for the fix! It's also nice not to have to expose this as an operator property. However, I think this should be stored in wmOperator.customdata rather than the space runtime struct.

This revision now requires changes to proceed.Mar 2 2021, 4:42 PM
Fabian Schempp (fabian_schempp) edited the summary of this revision. (Show Details)

Changes based on review by Hans Goudey.

  • Reverted unneeded change.
Hans Goudey (HooglyBoogly) added inline comments.
source/blender/editors/space_node/node_intern.h
63

Temporary -> Temporarily

This revision is now accepted and ready to land.Mar 2 2021, 10:10 PM
Fabian Schempp (fabian_schempp) marked an inline comment as done.