godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.17k stars 98 forks source link

Add an option to hide 3D gizmos part of instanced scenes #8220

Open Gatada opened 1 year ago

Gatada commented 1 year ago

Describe the project you are working on

I am working on a platformer, with particle effects.

Describe the problem or limitation you are having in your project

When designing a complex scene, you may have nodes that are part of sub-scenes, and their gizmos are displayed in the 3D Viewport, even when zoomed out, making it cluttered and difficult to work with.

In fact, when I zoom out for an overview, the gizmos cover more or less everything.

Screenshot 2023-10-21 at 10 02 11

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

Adding an option at the top of the View > Gizmos menu that gives the developer the option to show only the gizmos of nodes that are directly added to the current scene, hiding the gizmos of nodes within sub-scenes to improve the clarity and usability of the 3D Viewport.

Nested Gizmo option

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

One way to do this is when rendering the viewport with the option to hide sub-scene gizmos enabled, the renderer will only parse the root of the scene to determine what gizmos to show.

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

The only way to hide gizmos is to manually show and hide each displayed gizmo in the View > Gizmos menu in the 3D Viewport. This is tedious, particularly since each gizmo has to be toggled on and off with 3 clicks. And this has to be done each time I zoom in and out, which quickly kills all joy of working.

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

Hiding and showing gizmos is core, and should stay core. It just needs an enhancement.

KoBeWi commented 1 year ago

Related: #54

ruanrothmann commented 1 year ago

Also related: #8218

Slightly different use cases, but the problem is the same: Gizmos are critical but not useful if too many are shown at the same time. Some way of having more fine-grained control over which gizmos are shown.

I feel that only having selected nodes gizmos shown would most likely cover this issue, as you can deselect any node if you wanted an overview, or select the root node if you wanted to see all gizmos. This given implementation might not be as flexible if instanced scene's gizmos are relevant, which does happen often in cases where you would enable "editable children" on an instanced scene.

Gatada commented 1 year ago

I think the usefulness of hiding gizmos of instantiated scenes is work flow related, and I don't think there should be any issue of them co-existing.

Both filters being off by default.