godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.16k stars 97 forks source link

Improve Visual Shader Editor by adding standard node-based editor features #7860

Open bitinn opened 1 year ago

bitinn commented 1 year ago

Describe the project you are working on

Visual Shader Editor in Godot is missing a few key features that is commonplace in other node-based editors, costing users many clicks as well as reducing shader readability.

(Reference applications: Blender, Unity, Unreal, Substance Designer)

Describe the problem or limitation you are having in your project

  1. Lack of SHIFT + Click and SHIFT + Box Selection to expand selection: neither Left Click nor Box Selection is able to expand on existing node selection. Making node organization exceedingly difficult.

  2. In the same context, lack of CTRL + Click and CTRL + Box Selection to reduce selection is also problematic, because often users would box select a large region then refine selection further before moving/deleting them.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

  1. Support SHIFT + Click and SHIFT + Box Selection to expand selection;

  2. Support CTRL + Click and CTRL + Box Selection to remove selection;

  3. If possible, add a Frame node that can group a number of nodes, for better shader organization, while also acting as shader comments.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

https://streamable.com/x3ofm7

If this enhancement will not be used often, can it be worked around with a few lines of script?

I don't think so

Is there a reason why this should be core and not an add-on in the asset library?

Speaking as a tech artist, I think experienced shader editor users will greatly appreciate these improvement, as these features are common among other applications, if not universal. Making them optional via add-on introduces fragmentation unnecessarily.

Calinou commented 1 year ago
lostminds commented 1 year ago

The shift-click and shift-selection box additions sound like a great idea.

However, control-click might might not be a good idea since (I guess as an artifact of the old one-button mouse) control-click on macOS usually is the same as right-click, bringing up context menus. While not perhaps as standard one option used by some systems could be to simply have shift-click / box let the user toggle the node back to unselected again if it's selected.