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

Add a button/shortcut to fit zoom to duration in the animation editor #7667

Closed
inhalt120g opened this issue Sep 15, 2023 · 3 comments · Fixed by godotengine/godot#87078
Closed

Comments

@inhalt120g
Copy link

Describe the project you are working on

Arcade style pixel game with lots of fast animations.

Describe the problem or limitation you are having in your project

I use AnimationPlayer a lot for various things in the project, and I also create a lot of test AnimationPlayer that are used only for testing and later removed from the project, so I often have to do lots of zooming in / out to fit the used timeline on the AnimationPlayer panel.

The problem is that zooming in/out is a bit cumbersome because (due to the nature of what happens when the numbers grow) the zooming in is a bit slow in the beginning when I just start zooming in, and then the zooming factor just grows and is hard to control as it gets bigger. So I have to be unnecessarily careful for such a simple operation as zooming.

So it's hard to zoom in to the exact duration that I'm working with in a quick and easy way.

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

One solution would be to simply have a way to "zoom to fit" the used part of the timeline (the duration of the animation).

For example, middle mouse click on the zoom slider's head or something super simple like that:
image

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

Let's assume I create a new animation, which would be shown as let's say 4 seconds long, out of which the first 1 is used.
I'd type 0.5 as the duration of my animation.
At this point the duration marking on the timeline changes to 0.5, so obviously this is way too zoomed out for what I'll be working with.

Now I can just MMB click on the slider's head and the first 0.5 seconds stretch to cover the majority of the timeline length.

Even better (not sure how feasible that'd be to implement), pressing "Shift+Enter" (or something similar) instead of only "Enter" after typing in the duration of the animation could have the same effect, but the first solution is more universal (it can be used even if I wasn't in the process of entering new duration value).

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

N\A

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

It can't be an add-on in the asset library…

@TamerSoup625
Copy link

I would prefer having a button to fit zoom. Middle-clicking the slider makes the feature much harder to discover and it's not something you would except to do on it.

@Calinou
Copy link
Member

Calinou commented Sep 15, 2023

I recall seeing a proposal requesting this already, but I can't find it right now.

I would prefer having a button to fit zoom. Middle-clicking the slider makes the feature much harder to discover and it's not something you would except to do on it.

Porque no los dos?1 😉

Footnotes

  1. Why not both?

@Calinou Calinou changed the title Animation panel: fit zoom to duration Add a button/shortcut to fit zoom to duration in the animation editor Sep 15, 2023
@inhalt120g
Copy link
Author

Ha! Today I learned there's a difference between dos and todos ;)

Yes something similar was proposed some time ago but only in connection with curves #7547. This particular proposal is only about the used part of the timeline (the dark grey part on the far left):
image

Originally, I did think of including a button too in the original proposal, but after simulating various workflows (in my head ;) ) it seemed that the zooming in operation will not be something that will be used constantly after the duration is set, so having a button hanging there all the time (and adding more UI) would be more cluttering than useful. So to me a shortcut is more important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants