godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.15k stars 97 forks source link

Add customizable keyboard shortcut to toggle node visibility #11012

Open hsandt opened 2 days ago

hsandt commented 2 days ago

Describe the project you are working on

A platformer with a skeleton sprite

Describe the problem or limitation you are having in your project

I'm rebuilding the skeleton sprite piece by piece and I need to check that it matches the reference T-pose sprite I prepared in a lower layer.

I can either make the piece semi-transparent, or toggle visibility on each piece to check they fit my reference model.

However, toggling visibility requires to click on the eye button near the node in Scene tree view, which is a bit slow when done repeatedly after each adjustment translating the node around.

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

Add a customizable keyboard shortcut for toggling node visibility aka show/hide node.

Default could be Ctrl+H (in fact not a great left hand shortcut because H is far from the left side... maybe Ctrl+Shift+V is users think of it as Visibility and not Paste), or whatever really. Even if it's empty, I'm fine with it, as "power users" could also set a shortcut for the action. But it could help to have some default shortcut because then it could appear when hovering the eye button, and that would make users aware that it exists.

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?

No, it's native action binding.

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

I think an add-on could do it but it would be overkill for a native action shortcut.

karmaral commented 1 day ago

I had just downloaded this addon a couple of days ago because of the exact same pain. I agree it should be exposed at least.