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

Allow dragging a node from the scene tree to NodePath export in inspector #4165

Closed
2nafish117 opened this issue Mar 6, 2022 · 4 comments
Closed

Comments

@2nafish117
Copy link

Describe the project you are working on

This is applicable to any project that uses NodePath exports.

Describe the problem or limitation you are having in your project

I have a lot of nodes in a main level scene, this makes it difficult to select the target node for a nodepath in the new window that pops up.

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

Allow dragging a node from the scene tree to NodePath export in inspector. It reduces the number of clicks the user has to do and potentially not having to search the target once again from the nodepath window.

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

When i drag a node from the scene tree to a NodePath export, it should set the NodePath as the path to that node.
Currently the inspector switches to the properties of the node you drag immediately on mouse button down, instead the properties of the new node can be shown on mouse button up, and allow the user to drag the node to the NodePath.

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

No, i dont think a script/addon can solve this issue.

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

It improves the usability of the editor.

@Calinou
Copy link
Member

Calinou commented Mar 6, 2022

This is already implemented in 3.5beta1 and 4.0alpha: godotengine/godot#55761
See the original proposal: #1042

Remember to hold Alt while starting the drag-and-drop operation to prevent the inspector from switching nodes.

@2nafish117
Copy link
Author

Oh, this is good. Any reason why it was decided to have to have to hold Alt instead of the inspector showing the dragged nodes properties on mouse up?

@Calinou
Copy link
Member

Calinou commented Mar 6, 2022

Oh, this is good. Any reason why it was decided to have to have to hold Alt instead of the inspector showing the dragged nodes properties on mouse up?

Implementing this would require a lot more work, as selection in the scene tree dock would need to be separated from the inspector editor. On the bright side, doing so would also effectively implement #3636.

@KoBeWi
Copy link
Member

KoBeWi commented Mar 6, 2022

Alternatives for preventing inspector/editor switching are discussed here: godotengine/godot#39539

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants