ComfyUI
ComfyUI copied to clipboard
[Feature request] [UI/UX] Change selection behavior
The issue is related to: #103 , #960 , #624 , #414 But I'm extracting it to a separate one.
As usual, I really do want to say thanks for such a great SD UI. But...
The issue
Currently, what you do with the left mouse button depends on WHERE you do it. Which leads to an unnecessary inconvenience and a constant user stress. Besides, literally all the other software use LMB-drag for selection.
So, with this issue I request to fix this in one of the following ways:
1. Sticking to the original design
If panning with a LMB was an intentional decision and you stick to it, at least let's be consistent about it. Let's do it the same way headus UVLayout does: holding a function key (Shift) should ALWAYS switch the ENTIRE canvas into selection mode. You no longer can accidentally connect/disconnect nodes, you no longer can pan the canvas. As soon as you hold shift:
- mouse drag turns into marquee-select
- mouse click turns into select/deselect
- Shift+Ctrl+drag turns into marquee-DEselect
And also, even without shift, if you start dragging on one of the selected nodes, you should keep the selection and move ALL the selected nodes together. Not the current behavior: suddenly deselect everything but the node you started dragging on, and move only it.
2. Following industry standards
Alternatively, you might abandon all this original approach altogether and simply adopt what everyone else does: dedicate LMB entirely to selection/connection and NEVER pan with it. It can be accomplished if you move panning to a MMB, as was suggested multiple times already (and I believe, will be suggested many times more until you do it).
In this way,
- MMB is dedicated to navigation (pan and, optionally, zoom, too)
- LMB-drag:
- on canvas: marquee-select
- on node box / field / connector / connection: current behavior
- Ctrl+LMB-drag: marquee-DEselect, regardless of where you start the drag. Yes, even on fields, connectors and node titles. If you hold ctrl, everything on the canvas temporarily becomes non-interactive for drag and acts only as canvas background.
- Shift+LMB-drag: marquee-add to selection. Regardless of the start position, too.
- Ctrl/Shift+LMB-click - with either Ctrl or Shift held, clicking on a single node inverts it's selection state.
I, personally, would much prefer the second approach. No need to invent a wheel, unless your new wheel is extremely superior in any observable way.
I second the 2. option.
I mention this elsewhere already but would like to add here that the MacBook Pro touchpad (and probably other touchpads) require a bit of attention too if/when improving this behavior.
There are also mentions of really fast zoom behavior. I suffer from this, but not as extremely as some.
I support option 2 to adopt industrial standards.
On specifics, however, I'd advocate considering a setting to use RMB-drag for panning, which is the default behavior in Unreal Editor Blueprint, if possible, I prefer RMB-drag panning because it is simpler: just 2 fingers over 2 buttons. It is easy to use in UE for me and never conflict with RMB-click for the context menu. (But I understand it may not be the case for everyone. )
About the Ctrl+LMB-drag. I think in UE Blueprint it works a bit differently from above suggestion.
- Ctrl+LMB-drag in UE Blueprint is marquee-invert-select, deselect selected or select unselected. I find it simpler in use because whether I need to add or remove some more nodes to a group, I can just use the same Ctrl+LMB-drag. Please consder using this behavior if possible.
- In Blueprint pressing Ctrl also does not make everything non-interactive. One of the best features in Blueprint is that you can Ctrl drag from a connected pin to re-connect all the wires on that pin to another pin. It is a huge time-saver when working in a huge graph. For reference see: https://docs.unrealengine.com/5.2/en-US/connecting-nodes-in-unreal-engine/ I think it is clear to user because the mouse cursor changes differently when hover on a node or a pin, so it is always informed about the action to perform.
Finally, a part of the 'selection' behavior, as https://github.com/comfyanonymous/ComfyUI/issues/373 suggested: the cavas should also pan automatically when user drag to the edge of the viewport, either in marquee-select mode or during node moving.
About the Ctrl+LMB-drag. I think in UE Blueprint it works a bit differently from above suggestion.
Maya has a similar behavior, but with shift. Shift+Ctrl acts as "just add to selction, don't invert". And, as a long-time Maya user, I might advocate for this, too. However, across the industry (and any software overall, even file managers):
- Ctrl/Alt+drag is more often associated with strictly de-selecting (alt here is mostly because of Adobe software, exclusively)
- Shift+drag - add to selection
- There is no key modifier for invert selection... So I guess, we might dedicate Alt+Drag or Shift+Ctrl+drag to this... But strictly speaking, this feature might be missing entirely for now. It's a power-user feature anyway.
Ideally, I agree that there should be an option to select the preferred set of modifier keys, with various levels of granularity (as much as the maintainers are ready to spend time to it).
But I guess, such option makes it increasingly harder to implement, so we should agree on some optimal middle ground, not just the best solution for users of specifically Maya/Unreal/Unity/Blender/Nuke/Substance/%SOFTWARE_NAME%.
We should also consider whether Ctrl+drag ON NODES replicates file manager behavior: in either Windows/Linux it usually means "copy the selected to".
Also,
Finally, a part of the 'selection' behavior, as https://github.com/comfyanonymous/ComfyUI/issues/373 suggested:
Could you please post the same note here? #960 Navigation and selection are related but still different issues. I believe, we have a higher chance of either of those being implemented, if we at least keep the issue threads nice, organized and strictly on-topic. I did my best to AT LEAST manually find and group duplicates and separating this mouse-behavior stuff into two individual issues. I hope, it might help @comfyanonymous collecting feedback.
Just adding a comment to second the motion. Also, ctrl+drag doesn't work on Firefox on Mac, so there's no way to select multiple nodes, so far as I can tell. It's frustrating in a complex workflow right now.
EDIT: For anyone else struggling, I fixed this by switching drag select to the meta key. In ComfyUI/web/lib/litegraph.core.js
around line 5914,
//left button mouse / single finger
if (e.which == 1 && !this.pointer_is_double)
{
if (e.ctrlKey)
{
this.dragging_rectangle = new Float32Array(4);
this.dragging_rectangle[0] = e.canvasX;
this.dragging_rectangle[1] = e.canvasY;
this.dragging_rectangle[2] = 1;
this.dragging_rectangle[3] = 1;
skip_action = true;
}
change if (e.ctrlKey)
to if (e.metaKey)
.
Hoping this gets added as an option in the settings in a future update.