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 marked this pull request as ready for review January 10, 2025 01:17
@YeldhamDev YeldhamDev requested a review from a team as a code owner January 10, 2025 01:17
@KoBeWi

This comment was marked as resolved.

@YeldhamDev YeldhamDev force-pushed the multi_remote_selection branch from dcc7849 to a1e0470 Compare January 12, 2025 01:57
@YeldhamDev
Copy link
Member Author

@KoBeWi Alright, try again.

@YeldhamDev YeldhamDev requested a review from KoBeWi January 14, 2025 20:21
@KoBeWi

This comment was marked as resolved.

editor/editor_node.cpp Outdated Show resolved Hide resolved
@YeldhamDev YeldhamDev force-pushed the multi_remote_selection branch from a1e0470 to e78dd0b Compare January 18, 2025 13:58
@YeldhamDev YeldhamDev requested a review from KoBeWi January 18, 2025 14:00
@YeldhamDev YeldhamDev force-pushed the multi_remote_selection branch 2 times, most recently 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 from 03f6429 to d788bb6 Compare January 24, 2025 23:27
@YeldhamDev YeldhamDev force-pushed the multi_remote_selection branch 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.

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
6 participants