godotengine / godot-proposals

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

Animation panel: auto-scroll when multi-key drag selection rectangle hits the edge of the track view #11045

Open hsandt opened 1 day ago

hsandt commented 1 day ago

Describe the project you are working on

A platformer with 2D skeletal animation

Describe the problem or limitation you are having in your project

I have many skeleton bones to animate and many keys to copy from one time to another, but it's cumbersome to select all the bone keys for a given frame. One intuitive way to select all the keys at a given time is to mouse drag rectangle to multi-select a column of keys. However, there are many keys so they don't all fit in the view and I need to scroll vertically to see them all. However, when my drag rectangle hits the bottom of the track view, the track view doesn't auto-scroll vertically.

Godot 4.3 suggestion - Animation panel - drag rectangle does not auto-scroll.webm

Same issue when hitting top, left or right (for people who want to select multiple frames on the same track, at different times).

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

When drag selection rectangle hits the edge of the track view, auto-scroll in that direction at a certain speed until reaching the end of scrolling in that direction.

Default speed should be quite slow to avoid an annoying auto-scroll that is too fast, but it could be parameterable in Editor Settings.

Alternatives

There are alternative ways to make this work, such as requiring manual scroll with mouse wheel (EDIT: I opened another ticket for this https://github.com/godotengine/godot-proposals/issues/11046) or, for the specific case of selecting all keys aligned vertically, a special key or button to select all keys at the same time (already proposed on https://github.com/godotengine/godot-proposals/issues/1908).

I also considered Shift+click but I'm not sure what the best implementation is when dealing with 3+ clicks, see discussion: https://github.com/godotengine/godot-proposals/discussions/11047

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

Example with a file browser:

Godot 4.3 suggestion - Animation panel - auto-scroll when multi-key drag selection rectangle hits the edge of the track view.webm

This is in fact too fast for us, but illustrates the behavior.

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

No, it is native editor behavior

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

It is native editor behavior

Calinou commented 23 hours ago

This should also apply to timeline scrolling: https://github.com/godotengine/godot/issues/34362