godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.12k stars 69 forks source link

Use a scene tree in the Group Editor instead of a list #3351

Open fire-forge opened 2 years ago

fire-forge commented 2 years ago

Describe the project you are working on

A top-down 2D mining and base building game.

Describe the problem or limitation you are having in your project

The Group Editor is somewhat hard to use, because it displays nodes in a long list with their name and sometimes their parent's name.

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

The Group Editor would use the same node tree as is seen in the Scene tab and signal connection window, which would make selecting nodes in the Group Editor far easier. Although this change isn't extremely necessary, it is just a small UX change.

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

The current Group Editor:

image

The Scene tab:

image

The "Nodes not in Group" and "Nodes in Group" sections could be replaced with a tree instead of a list. Any nodes that are in the selected group would be grayed out in the "Nodes not in Group" section, and vice versa for "Nodes in Group" in order to distinguish the two.

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

The Group Editor can't be modified with a script.

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

Add-ons can't modify the Group Editor, and the Group Editor is a built-in part of Godot.

DarkMessiah commented 2 years ago

Hello there :) I made this mockup in gdscript and I can made pull request to the engine if someone approves these changes.

https://user-images.githubusercontent.com/1756388/142751964-17a41747-6a7e-47fb-9b99-eedd0c4b0a18.mp4

Maybe there are some other suggestions for improvement, for example, remove the plus button and add a group on double click or add a drop-down menu (add / remove)

YuriSizov commented 2 years ago

@DarkMessiah I think we still want to see the list of nodes added to the group at any point, without scrolling through the whole list. Maybe the list of groups can be a tree and added nodes display on a sub-level there? This also begs for drag'n'drop support, if it doesn't have it yet.

Jummit commented 2 years ago

I think maybe a context menu option would be better than a dialog? Then you could filter the scene tree, select the nodes you want to add/remove groups instead of doing it one-by-one.

DarkMessiah commented 2 years ago

@pycbouh Like this?

Screenshot ![image](https://user-images.githubusercontent.com/1756388/142760250-5f42dc7e-2878-47a9-8fb6-6bf099bd4559.png)

@Jummit You mean a context menu option for current Scene Tree or scene tree inside Group Editor?

Screenshot ![image](https://user-images.githubusercontent.com/1756388/142760909-b9d1eb4a-550a-4b7c-a031-6ad1364a73fc.png)
YuriSizov commented 2 years ago

@DarkMessiah Yeah, something like this makes sense to me.

Jummit commented 2 years ago

You mean a context menu option for current Scene Tree or scene tree inside Group Editor?

In the SceneTree panel. No need for another dialog.

Another idea: Make the Groups tab of the Node panel handle multiselection of Nodes. Actually, I like this better than having it in the SceneTree panel.

Maran23 commented 8 months ago

I think this one is resolved by https://github.com/godotengine/godot/pull/60965 as well

YuriSizov commented 8 months ago

@Maran23 I couldn't confirm it when merging. How does it look now?

DarkMessiah commented 8 months ago

Now we don't have a separate Group Editor window because we can see Scene Tree and Groups Tree at the same time.

Maybe we need a feature to highlight nodes in some group.

Maran23 commented 8 months ago

Hm, yes, it depends what we want to achieve. With the global groups refactoring, the dialog does not exist anymore, therefore the content of the proposal is outdated. And with global groups in general, it is much easier to keep track of the groups and avoid mistakes.

But one point is still somewhat true, you can not see what nodes are inside what global group (you need to check the Groups tab for every node/scene). Not sure if it is worth to write a new proposal which supersedes this, or try to modify this one. Or maybe this is not needed at all with the new global groups ... not sure.