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 to select multiple remote nodes at runtime #99680

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

YeldhamDev
Copy link
Member

@YeldhamDev YeldhamDev commented Nov 25, 2024

Closes #93628.

Screencast_20241125_111648.webm

Features Implemented

  • Multi selection of multiple nodes, even if from different types. The properties shown in the inspector will be the ones shared by all the ones selected, like how MultiNodeEdit works.
  • Region selection for Node2D/Control and Node3D nodes.
  • Additive selection: holding Shift will add/remove items to the selection group instead of overriding it.

Sponsored By: 🐺 Lone Wolf Technology / 🍀 W4 Games.

@YeldhamDev YeldhamDev added this to the 4.x milestone Nov 25, 2024
@YeldhamDev YeldhamDev requested review from a team as code owners November 25, 2024 15:02
@YeldhamDev YeldhamDev marked this pull request as draft November 25, 2024 15:02
@YeldhamDev YeldhamDev force-pushed the multi_remote_selection branch 10 times, most recently from c158225 to c618297 Compare November 28, 2024 19:09
@YeldhamDev
Copy link
Member Author

I want some feedback on how to handle limiting selection of too many nodes, because that carries the risk of encoding of the data failing and no selection occurring.

  • What the default limit should be? 10-ish or so?
  • Should it be a hard limit, not allowing to select further nodes? Or a soft one, only printing a warning when the limit is exceeded?

@KoBeWi
Copy link
Member

KoBeWi commented Dec 4, 2024

Maybe hard limit with warning?
How many nodes can be selected before it breaks?

@YeldhamDev
Copy link
Member Author

@KoBeWi Missed your message, sorry.

It depends on the data size of the objects. On my end for example, selecting more than 30 Button nodes starts to break things.

@KoBeWi
Copy link
Member

KoBeWi commented Dec 7, 2024

So limit it to 20-25, if someone tries to select more nodes pop a warning toaster. The limit can be configurable in editor settings. Personally I rarely select more than 5 nodes; most often it's to move them in the scene, which is not something you can do in Remote tree.

@YeldhamDev YeldhamDev force-pushed the multi_remote_selection branch 2 times, most recently from 951b19b to 6b1a4d2 Compare December 21, 2024 20:18
@YeldhamDev
Copy link
Member Author

The selection limit has been implemented.

@YeldhamDev YeldhamDev force-pushed the multi_remote_selection branch from 6b1a4d2 to 2fce8f1 Compare December 24, 2024 22:56
@YeldhamDev YeldhamDev force-pushed the multi_remote_selection branch from eecb1d4 to f4cf9fa Compare January 21, 2025 18:54
editor/debugger/editor_debugger_inspector.cpp Outdated Show resolved Hide resolved
scene/debugger/scene_debugger.h Outdated Show resolved Hide resolved
scene/debugger/scene_debugger.h Outdated Show resolved Hide resolved
scene/debugger/scene_debugger.cpp Outdated Show resolved Hide resolved
editor/debugger/editor_debugger_tree.cpp Outdated Show resolved Hide resolved
scene/debugger/scene_debugger.h Outdated Show resolved Hide resolved
scene/debugger/scene_debugger.h Outdated Show resolved Hide resolved
editor/debugger/editor_debugger_inspector.cpp Outdated Show resolved Hide resolved
scene/debugger/scene_debugger.cpp Outdated Show resolved Hide resolved
editor/debugger/script_editor_debugger.cpp Outdated Show resolved Hide resolved
@@ -520,41 +538,6 @@ void GameView::set_is_feature_enabled(bool p_enabled) {
is_feature_enabled = p_enabled;
}

void GameView::set_state(const Dictionary &p_state) {
Copy link
Member

Choose a reason for hiding this comment

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

You could instead replace it with editor layout. It's global for editor.
The project metadata are per-project, not very useful for Game tab.

Copy link
Member Author

Choose a reason for hiding this comment

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

I would actually disagree. Different projects sometimes require different workflows, so making those be kept in a per-project basis makes sense.

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 works as expected. It works in mixed 2D-3D scenarios too:

select_multi.mp4

PS: The orange selection gizmos in 3D still seem to receive shadows (unlike in the editor where they render as expected). I thought this was fixed at some point.

@YeldhamDev YeldhamDev force-pushed the multi_remote_selection branch from f4cf9fa to 03f6429 Compare January 22, 2025 20:33
@YeldhamDev
Copy link
Member Author

@Calinou The rendering of those use the same flags as the ones in the editor, so I dunno what could be causing it.

@YeldhamDev YeldhamDev force-pushed the multi_remote_selection branch 2 times, most recently from d788bb6 to 2ed8af9 Compare January 24, 2025 23:33
@YeldhamDev
Copy link
Member Author

YeldhamDev commented Jan 24, 2025

Alright, EditorDebuggerRemoteObject and EditorDebuggerMultiRemoteObject have been merged into EditorDebuggerRemoteObjects which handles both single and multi selections.

@KoBeWi

This comment was marked as resolved.

@YeldhamDev YeldhamDev force-pushed the multi_remote_selection branch from 2ed8af9 to e0b563d Compare January 30, 2025 17:23
@YeldhamDev
Copy link
Member Author

@KoBeWi

Properties of remote nodes can't be filtered. The LineEdit immediately loses edit focus.

Try again, please.

@KoBeWi KoBeWi modified the milestones: 4.x, 4.5 Jan 30, 2025
@AeioMuch
Copy link
Contributor

AeioMuch commented Jan 30, 2025

When you select a node the first time, it shows correctly as the one edited at the top of the inspector, but selecting another node does not update it, the first one still shows.

Also the editor selection history does not work properly, selecting another node update the previous entry instead of adding a new one.

godot.windows.editor.x86_64_jneUqvm8CL.mp4

@YeldhamDev YeldhamDev force-pushed the multi_remote_selection branch from e0b563d to 6dbd7ac Compare February 1, 2025 18:13
@YeldhamDev
Copy link
Member Author

@AeioMuch Should be fixed now.

@AeioMuch
Copy link
Contributor

AeioMuch commented Feb 1, 2025

@AeioMuch Should be fixed now.

It works fine now 👍, but there's is still a small issue remaining : while using the drop down menu of recently edited object will properly reselect the correct node(s) in the remote scene tree, using the backward and forward arrows will not reselect them, only update the inspector.

@YeldhamDev YeldhamDev force-pushed the multi_remote_selection branch from 6dbd7ac to 2136a4b Compare February 1, 2025 19:42
@YeldhamDev
Copy link
Member Author

@AeioMuch Try again.

@AeioMuch
Copy link
Contributor

AeioMuch commented Feb 1, 2025

@AeioMuch Try again.

Fixed! Well done 😀

@YeldhamDev YeldhamDev force-pushed the multi_remote_selection branch from 2136a4b to e8c03c2 Compare February 2, 2025 22:58
@YeldhamDev YeldhamDev force-pushed the multi_remote_selection branch from e8c03c2 to 9062df2 Compare February 3, 2025 14:28
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.

You cannot multi-select and multi-edit in the remote scene view
7 participants