godotengine / godot-proposals

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

Allow editing groups with multiple nodes selected at the same time #10331

Open MauroPle opened 3 months ago

MauroPle commented 3 months ago

Describe the project you are working on

A panda torturing game

Describe the problem or limitation you are having in your project

I've got 130 copies of the same node, each positioned manually, and to get all of them in an array I want to add them to the same group but it is a total pain to go over each copy and manually set the group

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

There should be a way to change groups on multiple nodes at the same time

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

By selecting multiple nodes in the editor, you should be able to set groups to all of them like how you can do with exported boolean variables in the inspector

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

In some cases you can by adding nodes to group via script, that's how I think I will solve the problem I previously described, but in other cases you might not be able to do it

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

An add-on has to be installed for every project, and I'm not even sure if you can implement with one of them

Sorry for any grammatical errors

sancho2 commented 2 months ago

I would add that the removing of the scene manager is a regression.
If in fact scene/global groups are simply for editor level separation and don't in fact modify the scope of a group (see this), then this change is a step backwards.
I just added 12 items to a group and it was a small misery especially when compared to how easy that was using the manager.
I would rather forgo the change and return to having a scene manager.
This proposal would seem to be an adequate compromise.

Mickeon commented 2 months ago

As a bit of a note, for your particularly huge struggle you could write a short EditorScript. It would go through the edited tree and, on each node of interest, call add_to_group with its persistent parameter set to true.

Fenrirthviti commented 1 month ago

Adding support for this. There's plenty of use cases for wanting to select more than one node at a time and edit the group assignments as a batch job.