summaryrefslogtreecommitdiffstats
path: root/editor/plugins/animation_player_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/animation_player_editor_plugin.cpp')
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index 484d2b1fff..02fa582da4 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -1395,23 +1395,14 @@ void AnimationPlayerEditor::_current_animation_changed(const String &p_name) {
void AnimationPlayerEditor::_animation_key_editor_anim_len_changed(float p_len) {
frame->set_max(p_len);
}
-
-void AnimationPlayerEditor::_animation_key_editor_seek(float p_pos, bool p_timeline_only) {
+void AnimationPlayerEditor::_animation_key_editor_seek(float p_pos, bool p_timeline_only, bool p_update_position_only) {
timeline_position = p_pos;
- if (!is_visible_in_tree()) {
- return;
- }
-
- if (!player) {
- return;
- }
-
- if (player->is_playing()) {
- return;
- }
-
- if (!player->has_animation(player->get_assigned_animation())) {
+ if (!is_visible_in_tree() ||
+ p_update_position_only ||
+ !player ||
+ player->is_playing() ||
+ !player->has_animation(player->get_assigned_animation())) {
return;
}