summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-12-05 11:32:18 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-12-05 11:32:18 +0100
commit777dca33b0366caf77b6b71f2b073531a2ce5d67 (patch)
treebba527d4cbe615f9e9a89253a311934eb63dd514
parente82d66f23b987f9380b666179f25b44813509106 (diff)
parent8c540b1d7194e41caa11975cb6f71fe988d10447 (diff)
Merge pull request #69588 from TokageItLab/fix-play-bw
Fix AnimationPlayer play backward doesn't process just current key & AnimationPlaybackTrack seeking for preview
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp4
-rw-r--r--scene/animation/animation_player.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index 338688f274..5183a738ae 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -216,8 +216,8 @@ void AnimationPlayerEditor::_play_from_pressed() {
player->stop(); //so it won't blend with itself
}
ERR_FAIL_COND_EDMSG(!_validate_tracks(player->get_animation(current)), "Animation tracks may have any invalid key, abort playing.");
- player->play(current);
player->seek(time);
+ player->play(current);
}
//unstop
@@ -254,8 +254,8 @@ void AnimationPlayerEditor::_play_bw_from_pressed() {
player->stop(); //so it won't blend with itself
}
ERR_FAIL_COND_EDMSG(!_validate_tracks(player->get_animation(current)), "Animation tracks may have any invalid key, abort playing.");
- player->play(current, -1, -1, true);
player->seek(time);
+ player->play(current, -1, -1, true);
}
//unstop
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index ca1befc135..f7baa7facc 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -955,7 +955,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double
break;
}
- if (player->is_playing() || p_seeked) {
+ if (player->is_playing()) {
player->play(anim_name);
player->seek(at_anim_pos);
nc->animation_playing = true;