diff options
Diffstat (limited to 'editor/plugins/animation_player_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/animation_player_editor_plugin.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index 86b085b429..3593493d11 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -299,7 +299,7 @@ void AnimationPlayerEditor::_animation_selected(int p_which) { if (current != "") { - player->set_current_animation(current); + // player->set_current_animation(current, false); Ref<Animation> anim = player->get_animation(current); { @@ -654,7 +654,9 @@ Dictionary AnimationPlayerEditor::get_state() const { d["visible"] = is_visible_in_tree(); if (EditorNode::get_singleton()->get_edited_scene() && is_visible_in_tree() && player) { d["player"] = EditorNode::get_singleton()->get_edited_scene()->get_path_to(player); - d["animation"] = player->get_current_animation(); + } + if (animation->get_selected() >= 0 && animation->get_selected() < animation->get_item_count()) { + d["animation"] = animation->get_item_text(animation->get_selected()); } return d; |
