-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Fix Animation Timeline Go to Next Step / Prev Step which triggered wrong animation display #83399
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1262,9 +1262,7 @@ void AnimationPlayerEditor::_seek_value_changed(float p_value, bool p_set, bool | |
|
||
if (!p_timeline_only) { | ||
if (player->is_valid() && !p_set) { | ||
double delta = player->get_current_animation_position(); | ||
player->seek(pos, true, true); | ||
player->seek(pos + delta, true, true); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This particular line of code caused the animation display to jump elsewhere of the actual There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is equivalent to the following: if (!p_timeline_only) {
if (player->is_valid() && !p_set) {
double delta = player->get_current_animation_position();
player->seek(pos, true, true);
player->seek(pos + delta, true, true);
} else {
if (player->is_playing()) {
player->stop();
}
player->seek(pos, true, true);
}
} ↓ if (!p_timeline_only) {
player->seek(pos, true, true);
} I can't recall anymore why it was necessary in the past to handle drags and seek by key separately, but I think this change probably fine (you just need to rewrite the code as suggested, also |
||
} else { | ||
player->stop(); | ||
player->seek(pos, true, true); | ||
|
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.
This particular line of code is actually not returning a delta but rather the actual current position. It will make
player->seek(pos + delta, true, true);
totally wrong. So I removed it as well.