godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.05k stars 65 forks source link

Make "add as sibling" the default when drag-and-dropping an asset into 3D View #9682

Closed Nodragem closed 1 day ago

Nodragem commented 1 week ago

Describe the project you are working on

Making a level for a 3D Top Down shooter: https://github.com/Nodragem/twin-stick-shooter-starter-kit

Describe the problem or limitation you are having in your project

In 4.3dev6, if I drag and drop a 3D asset in the 3D Viewport it is added as a child and automatically selected; which is not necessarily useful.

Thanks to this PR: https://github.com/godotengine/godot/pull/87623, we've got the following behaviour:

By default, drag-and-dropping adds the scene as a child of the selected node. Hold Alt when releasing the mouse to add the scene as a child of the root node, or Shift to add the scene as a sibling of the selected node.

And thanks to this PR: https://github.com/godotengine/godot/pull/84347, the latest added node is automativally selected.

As discussed here https://github.com/godotengine/godot-proposals/issues/9613, this accidentially creates the following behaviours:

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

These accidental features are very exciting for level designers. But I would like to propose that we swap the SHIFT and default behaviour. Indeed, when editing a level, to add as sibling and select automatically the new node is what you want 90% of the time.

Alternatively, or in addition, the default, ALT and SHIFT behaviours could be changed in the Editor Settings.

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

Just need to a few variables in the code. Then for having it in the Editor Settings, it might me more involved.

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

Nope, it is hard coded.

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

This is a small change on an existing feature.

AThousandShips commented 1 week ago

For uniformity it should probably be changed in both 2D and 3D, as the 3D behaviour was taken from the 2D one

ryevdokimov commented 1 week ago

I don't have a strong opinion yet about what the default behavior should be in terms of sibling vs root, but after having used 4.3 for some time, I agree that child is not the right way to go.

Often you are dragging multiple of the same scene into the viewport and having each one be a child of the next is not what I would expect to be the desired behavior without a modifier. I'd be interested to hear what the reasoning was for having it be that way in 2D, as I don't use it as much.

Nodragem commented 6 days ago

My use case is 3D level editing but it should be similar for 2D level editing. I tried it and it is very productive to add as sibling by default and hold Shift whenever I need to add as child.

For instance:

To add as child of root is not really useful in this workflow.