diff options
Diffstat (limited to 'editor/plugins/animation_player_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/animation_player_editor_plugin.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index 2d00324c84..75a7099ec4 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -304,6 +304,7 @@ void AnimationPlayerEditor::_animation_selected(int p_which) { AnimationPlayerEditor::singleton->get_track_editor()->update_keying(); EditorNode::get_singleton()->update_keying(); + _animation_key_editor_seek(timeline_position, false); } void AnimationPlayerEditor::_animation_new() { @@ -1072,14 +1073,20 @@ void AnimationPlayerEditor::_animation_key_editor_anim_len_changed(float p_len) void AnimationPlayerEditor::_animation_key_editor_seek(float p_pos, bool p_drag) { + 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())) + return; + Ref<Animation> anim = player->get_animation(player->get_assigned_animation()); updating = true; @@ -1753,6 +1760,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay renaming = false; last_active = false; + timeline_position = 0; set_process_unhandled_key_input(true); |
