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

Don't switch to 2D view when selecting a control node that is child of a SubViewport #8150

Open
elthundercloud opened this issue Oct 16, 2023 · 2 comments

Comments

@elthundercloud
Copy link

Describe the project you are working on

3D Adventure game with a lot of level-specific texts and signs in the world

Describe the problem or limitation you are having in your project

Every time I click on a control node, the editor takes me from 3D view to 2D view. Previewing subviewports is impossible: #5422; That means I need to switch back to 3D view every time I select a node to see the changes I'm making, which is tedious with big control trees.

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

Either implement subviewport preview in 2D context or do not switch to 2D context at all when selecting a control node that is a child of a subviewport. The solution should not break regular GUI editing, it should still automatically switch to 2D context unless the root is a subviewport.

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

A simple recursive parent check will probably suffice. As for the preview implementation: #5422

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

Core feature.

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

Basic UX.

@Calinou Calinou changed the title 2D view should not be automatically enabled when working with subviewports Don't switch to 2D view when selecting a control node that is child of a SubViewport Oct 16, 2023
@Mickeon
Copy link

Mickeon commented Oct 16, 2023

Getting to fix the issue outright by actually having a preview sounds like the more natural issue. If this exception is made it would have to be removed later anyway, which may go unnoticed.

@KoBeWi
Copy link
Member

KoBeWi commented Oct 16, 2023

The current solution for not being able to edit the nodes inside viewport is godotengine/godot#74573
This proposal can be solved independently (i.e. only switch view when the node is under currently edited viewport).

That said, editor switching is handled by EditorNode using generic main screen plugin code. Making it aware of viewports might require some hacks.

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

4 participants