Those dreadful drag-out pins...

My studio is moving from UE3 to UE4. And once again, I faced this pin issue many times in the new project. As I don’t forsee myself (as well as my team) dealing with this in the future, risking my mental health, I briefly investigated it ^^.

And I pinned this pin issue !
Here is a very simple fix:
Search “SGraphPin::OnPinMouseDown” and you can see there that the mouse down is only proceed if it’s more on the right side (threshold at 50%) of the widget, only for output pins (not the input ones).
Simply replace the whole content of the function with “return OnPinMouseDown(SenderGeometry, MouseEvent);”

This fixes the selection so when the pin is hovered (the pin is highlighted) the selection works properly. It applies everywhere this pin is used so it works in both the Blueprint Editor and the Material Editor :slight_smile:
As far I’ve tried, I’ve seen no side effects yet. Also, the reroute node is special (as it’s only a floating pin) but it’s still working properly.

To be fair, I have no explanation for this 50% check and I am curious about what you, Epic, can explain about it :slight_smile:
I tried to check on UE4 Perforce to “blame” on this file but I failed because I didn’t found such feature in P4V (and I didn’t found a convenient way yet to “annotate” in P4V).

Anyway, I’ve made a pull request (4.11 preview 8) of a complete and proper fix. This also fixes the mouse over cursor. You can check it here:
https://github.com/EpicGames/UnrealEngine/pull/2202

Here is a gif for Chosker :stuck_out_tongue:
UnrealPin1.gif
And another one where we can see that it applies to the whole name in the pin too:
UnrealPin2.gif
(at first I made a change which only allow the click on the “icon/image” the pin contains but in my feeling that’s much better when I made it work on the whole pin + name)

At least, if Epic accept the pull request, it will make much less Epic devs on the stream facing the same issue in front of all the viewers (and kept on Youtube for posterity) ^^.