Dev talk:Ref/Proposals/UI/Socket Swapping

提供: wiki
< Dev talk:Ref‎ | Proposals/UI
2018年6月29日 (金) 06:07時点におけるYamyam (トーク | 投稿記録)による版 (1版 をインポートしました)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先: 案内検索

Node Link Socket Swapping

There was a feature which was removed in r61178. This feature moved any existing node link to the next available socket when a new link to the same socket was created. However, I at least found this feature very useful and have missed it considerably since it was removed.

The main reason why I prefer the old behavior is because it's easier (faster) to remove node links than to create them.

From the commit log explaining the reasons for removal:

“This includes the more common case where one actually wants to replace a socket, which then requires a second click to remove the shifted connection.”

Creating a link between nodes requires two precise actions:

  1. Position cursor over source socket and engage LMB
  2. Position cursor over target socket and release LMB

Whereas removing a link at worst (in crowded node setups) requires only one precise action and one imprecise action, and at best only one semi imprecise action:

  1. Slash link with the mouse while holding Ctrl

For crowded node setups where using Ctrl may accidentally remove other links:

  1. Position cursor over target socket and engage LMB
  2. Move mouse anywhere and release LMB

Note that in cases where both input sockets are used, the extra click to remove is not needed.

To see why this is relevant, take the following two examples:

Replacing links

Swapping links

As you can see, the old behavior is slightly slower than the new behavior in first case, however the new behavior is a lot slower than the old behavior in the second case.

Now, you might be thinking that the old way is still faster most of the time (assuming that replacing node links is desired more often). However, I think the old behavior gives the desired result more often. Here's why:

From the commit log explaining the reasons for removal:

“Also this includes the more common case where one actually wants to replace a socket, which then requires a second click to remove the shifted connection. All in all this is not a helpful feature.”

While replacing links may or may not be the more common case, in many (probably most) cases involving mix/math nodes both sockets have links, in which case the old behavior would replace the existing link because there is no available socket to displace the existing links to.

Actual time taken to connect nodes: ~9 seconds.

Therefore the old behavior is faster in all cases where swapping is desired and equally fast in a good many cases where replacing is desired, and the worse case for the new behavior (swapping desired) is slower than the worst case for the old behavior (replacing desired and an adjacent socket is available).

Conclusion

  • The old behavior is faster in probably the majority of cases.
  • In cases where the result is not as desired, the old behavior is still faster.

Other use cases

From the commit log explaining the reasons for removal:

“This was originally intended as a way to speed up workflow for math and mix nodes, but more often than not it just gets in the way. Most binary (or n-ary) functions are not even commutative, i.e. changing the order of sockets does not usually produce the correct result.”

This feature was not only useful for commutative operations. A few more cases where node swapping might be desired:

  • Automatically generated links

Actual time taken to connect nodes: ~12 seconds.

  • Human error

More often than I would like, I connect the links backwards the first time and have to switch them around (on non-commutative mix nodes). Before the behavior changed, this was not a problem. But with the new behavior this is a drag. Even on commutative ones, I like being able to swap the connection order quickly, partially so it's easy to avoid/fix clunky connections like this:

Dev-UI-proposals-clunky nodelink.png

  • Long range connections

Coming soon.

Proposal 1

Re-add this feature and make it work the way it did before it was removed.

Proposal 2

Pick between behaviors based on a modifier key. For example, holding Ctrl while creating a node link would remove any existing connections which interfere, while connecting nodes without holding Ctrl uses the old behavior (displacing conflicting node links if possible).