godotengine / godot-proposals

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

(WIP) Editor UI Rearchitecture - Better multi-monitor support, asset editing, and persistence #4562

Open marstaik opened 2 years ago

marstaik commented 2 years ago

Describe the project you are working on

N/A

Describe the problem or limitation you are having in your project

The UI system is extremely confusing, never remembers editor state, does not allow for editing multiple assets at the same time, does not allow for viewing multiple assets at the same time, requires jumping between 3D, 2D, and script "states" which completely breaks the flow/representation of data.

It is what I would call a “fixed” editor design. While it does have dockable tabs, the assets are forced to conform to a very specific layout. This approach has led to a very clunky feeling UI, one that doesn’t feel right and is very difficult to use. While inspecting a scene, you must completely switch editor modes to edit an associated script, and there is no way to do/preview both at once. Dividing work across multiple screens is also extremely difficult to do, as the window interface is primarily static.

The editor is just extremely clunky and frankly doesn't make sense. It is often compared to Blender pre-2.8 update in terms of annoyance/complexity.

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

This is a re architecture of the patterns used to represent the editor of assets in the Godot editor.

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

This proposal is a new approach to using the Godot editor, one that, instead of being a “fixed” layout of 2D, 3D, and scripting modes – is instead reflective of the data being worked on. To define a new UI system, let us define some concepts:

“Frame” – A container for Editor, similar in essence to the current main godot window, with its dockable tabs. A frame is responsible for docking “Editors”.

“Editor” – An is a primary tab area that is solely responsible for editing a single disk-based document, or, a custom editor providing some form of disjoint functionality. It contains its own child “Tabs”, which are dockable. It need not contain multiple tabs however, and can also be a single "Tab".

“Tab” – A “tab” is a specific sub-window of a “Editor”, it belongs to, and is completely at the mercy of its owning editor. A tab can only be rearranged within an “Editor” or popped out to be floating. Its death is tied to the death of its parent editor.

To grasp and visualize these proposed changes, its probably better to show a diagram: frame_diagram

So what we really need to talk about now is how do the current components of the Godot UI map into this new proposal?

Editors - These should be one of two things - Either an edited file asset of a specific type (.tscn, .gdscript, .etc) or a "singleton" like object.

So what are some examples of current things that should be Editors?

Note that the scene tree and node inspectors are NOT Editors. Instead, they are Tabs. This is because they are explicitly tied to a "Scene Editor" - you are visualizing components of the scene.

TODO: Finish writing this up

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

No

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

Editor change

me2beats commented 1 year ago

Some things are fixed in godot 4

While inspecting a scene, you must completely switch editor modes to edit an associated script, and there is no way to do/preview both at once

The script editor and shader editor can be a separate window now, so one can write code and see the 2D or 3D editor at the same time

Zireael07 commented 1 year ago

Which of the things listed here are fixed? This is a quite large re-architecturing after all...