aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins/animation_player_editor_plugin.cpp
diff options
context:
space:
mode:
authorBojidar Marinov2018-01-12 00:35:12 +0200
committerBojidar Marinov2018-01-12 00:58:14 +0200
commit9b8e8b2220b4e2bac3310262d3d1cd7a8eb3b0a5 (patch)
tree805b828de2c1b899392245dbf77d45c4450664c8 /editor/plugins/animation_player_editor_plugin.cpp
parentc1c17b04bd5090503416cef24b4da9209d5cf563 (diff)
downloadgodot-9b8e8b2220b4e2bac3310262d3d1cd7a8eb3b0a5.tar.gz
godot-9b8e8b2220b4e2bac3310262d3d1cd7a8eb3b0a5.tar.zst
godot-9b8e8b2220b4e2bac3310262d3d1cd7a8eb3b0a5.zip
Bind many more properties to scripts
Notable potentially breaking changes: - PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL - Some properties were renamed, and sometimes even shadowed by new ones - New getter methods (some virtual) were added
Diffstat (limited to 'editor/plugins/animation_player_editor_plugin.cpp')
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp6
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 86b085b42..3593493d1 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;