diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-01-12 09:00:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-12 09:00:20 +0100 |
commit | e24f2c6489afdccc6268008d3dcc1ff4ad8ea71c (patch) | |
tree | ee8faddef95f8bcb66acfce729a6f85513740b2d /editor/plugins | |
parent | 00630479dd5e5aa95915fddf7df9c6b11f525b0e (diff) | |
parent | ad79c703008394a360eb9875196a9414e1c84585 (diff) |
Merge pull request #15611 from bojidar-bg/x-bind-more-properties
Bind many more properties to scripts
Diffstat (limited to 'editor/plugins')
-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; |