Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New command: "group" and "ungroup" selected objects #10

Open
NathanLovato opened this issue May 24, 2023 · 2 comments · May be fixed by #14
Open

New command: "group" and "ungroup" selected objects #10

NathanLovato opened this issue May 24, 2023 · 2 comments · May be fixed by #14

Comments

@NathanLovato
Copy link
Contributor

This is a suggestion and a feature I would like to contribute if it's wanted. If not, please feel free to close the issue.

A big thing I am missing when working in 3D in Godot is the ability to truly group selected meshes to quickly duplicate a selection. Currently, Ctrl+G only toggles "selectable children" which isn't super useful.

I'd like to add a shortcut to do the following:

  • Create a new Node3D placed at the average position of the selection
  • Reparent selected nodes to the new Node3D
  • Make children of the new Node3D un-selectable

And a corresponding shortcut to flatten a selection, i.e. given such a node3D is selected, unparent its children and remove the node, trying to preserve the relative tree order.

Godot has a feature named "reparent to new node" but:

  • It places the node at the scene's origin, so when you select the "group" this creates, the gizmo can end up far from the 3D meshes (see example below). This is the biggest limitation with this feature
  • You have to pick the node from the add node dialogue each time, so it's slow
  • You still have to manually make children unselectable

Example of reparent to new node in Godot

image

Would this feature be wanted in this add-on? If so I'd be happy to contribute it via a pull request, respecting the code style of the addon. I'll just wait for a green light to work on this and open a pull request.

@NathanLovato
Copy link
Contributor Author

Note that reparenting to new node and preventing child selection lets you select the whole modular 3D construct by clicking or box selecting anywhere on the models, so it effectively works like groups/joined meshes in Blender, and it's really convenient for level design with modular pieces, when you need to duplicate constructs but adjust some bits, replace a part... so you don't want to use scenes there.

@NathanLovato NathanLovato changed the title Add command and shortcut to "group" and "ungroup" selected objects New command: "group" and "ungroup" selected objects May 24, 2023
@imjp94
Copy link
Owner

imjp94 commented May 31, 2023

Oh yes! This is my favorite shortcut from Blender.
There were countless time when I pressed Ctrl + G and realized I never implemented it...

Feel free to open a PR, thank you!

@NathanLovato NathanLovato linked a pull request Jun 1, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants