Add support for a single editor shortcut to execute multiple actions
Describe the project you are working on
PVKK, some other professional stuff, some personal stuff, engine contributions.
Describe the problem or limitation you are having in your project
I'm trying to set up some QOL shortcuts, such as a shortcut to hide all gizmos (Like Unreals "G" game-view shortcut). This is currently not possible because editor shortcuts only seems to execute a single action, even when it is tied to multiple actions.
In this example Shift + E is set to to hide gizmos, the origin, transform gizmo, and the grid, however it only hides the gizmos.
(Also not sure of why some have that
(Physical) attribute, while view-grid doesn't, even though they are set up the same way.)
Shift + E in action:
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Allow a single shortcut to execute multiple actions.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
/
If this enhancement will not be used often, can it be worked around with a few lines of script?
I can easily imagine this as something that would be used often.
Is there a reason why this should be core and not an add-on in the asset library?
Improves core engine.
We should probably have a built-in shortcut that hides all gizmos (and grid/origin) all at once, essentially acting as a preview mode in DTP programs like InDesign and Scribus. See also https://github.com/godotengine/godot-proposals/issues/11793.
This would be a separate toggle from the existing gizmo toggles, so that the previous state can be restored cleanly (and it can be made non-persistent across restarts).
I'm a big fan of blender's shift+alt+z to toggle overlays in 3d view. Although, that's tied to a drop down menu that customizes everything to be toggled which might be overkill for godot
I am not 100% sure, but probably this can be achieved by hiding at least the GIZMO layers / setting the camera cull mask like this at least for 3D:
camera->set_cull_mask(((1 << 20) - 1) & ~((1 << GIZMO_BASE_LAYER) | (1 << GIZMO_EDIT_LAYER) | (1 << GIZMO_GRID_LAYER)));
See also node_3d_editor_plugin.cpp.