-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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 FPS compatible option in second mode of the animation editor snapping #99013
Conversation
c5e78e1
to
03ad25d
Compare
e603a72
to
b5701fd
Compare
b5701fd
to
ffc8d1d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed at animation meeting 👍
so PR godotengine#99013 could be merged properly
ffc8d1d
to
64d04c3
Compare
Thanks! |
return; // Avoid zero div. | ||
} | ||
|
||
if (timeline->is_using_fps()) { | ||
_clear_selection(true); // Needs to recreate a spinbox of the KeyEdit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, can you explain/document this line better? It's causing the animation player to unselect keyframes when I click them in my fork. What is this line trying to solve? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The FPS in the key edit inspector is displayed dependent on the FPS of the snap value. For example, a key placed at 1s will appear as follows in FPS mode:
I thought that changing the FPS with the keyedit inspector displayed would implicitly change the FPS in the inspector and have some negative effect, but sorry I did not realize that _update_snap_unit() is fired each key time is changed in the inspector (although I think it's a redundant).
There are some instability issues, such as undo after switching from second mode and keys not working due to spin box arrows, but this seems to be a problem that has been occurring for some time and probably needs to be revert in this area and stabilized from other parts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, thank you for these details! This is starting to make sense. Hopefully these redundant method calls can be untangled easily. For now I will remove this line and deal with any eccentricities on my end. Cheers!
Supersedes Fix animation editor snapping value not lowering as intended when holding shift #98826Now conflict is solvedMakes it optional to snap the FPS to a close integer FPS when in SecondMode.
Partially revert #97569 to disallow fractional FPS because KeyEditor's spin slider syncs with the FPS of the Snap setting, but KeyEditor's spin slider only allows integers, so if fractional FPS is used for snapping, KeyEditor's spin slider will break. Moreover, it is not consistent with this FPS compatible option.
Even if the KeyEditor spin slider allows fractional values, this will still cause problems due to lack of precision1, so the fundamental solution is to separate the FPS values for KeyEditor/Timeline from the step(snapping) values. In other words, it means that we need to add a FPS value as well as a step value to the Animation property, but I feel that it should be an editor-only property because it is too specific to the niche case of fractional FPS.
Footnotes
Since the value of time in KeyEditor exceeds 10.0 usually, there is a lack of precision if we want to use a step of 0.0625 since it will be like 10.0625 or 100.0625 ↩