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

Select newly added nodes on drag and drop in 3D viewport #84347

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

viksl
Copy link
Contributor

@viksl viksl commented Nov 2, 2023

Implements this proposal: godotengine/godot-proposals#8282 for 3D viewport.

Testing:
Create couple scenes of different types which can be added to a 3D scene and save them as separate. Try to drag and drop these directly in to the viewport (not the scene tree tab that's a different thing and works ok), one by one, multiple files, have some root node selected or not.
What you should see with this change is that the newly added node(s) will be selected immediately so you should be able to work with them in the viewport.
Test Undo and Redo too please.

Huge thanks to KoBeWi for advice.


Related 2D PR: #84356

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, it mostly works as expected.

One issue is that undoing then redoing won't reselect the node that was added through drag-and-drop (unlike when you add a node through other means).

@viksl
Copy link
Contributor Author

viksl commented Nov 2, 2023

Yeah that's what I thought, it's just that currently I don't really know how to work with the undo-redo system, I assume it's fairly complicated as undos in other programs?

EDIT: Actually I think I have it already working, I'll amend it later on so you can test it in case I'm messing something up.

@viksl
Copy link
Contributor Author

viksl commented Nov 2, 2023

@Calinou I've updated both PRs, should work with undo/redo now. Would you mind checking it out. I'll add info to 2D PR since there's one strange thing I don't know how to work around but doesn't seem to be an issue which would break functionality as far as I can tell right now.

@viksl viksl requested a review from Calinou January 6, 2024 06:39
@akien-mga akien-mga modified the milestones: 4.x, 4.3 Feb 14, 2024
@akien-mga akien-mga merged commit 55dd98e into godotengine:master Feb 15, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

4 participants