diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-11-08 16:51:45 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2018-11-08 16:51:45 -0300 |
commit | 531dc2f435c1d64a2e3ef0710cc05a7c13969587 (patch) | |
tree | 74d4c0e620410c7cb00d96ad5ce1eeb74f35e4dd /editor/plugins | |
parent | 555fb3a31749b19829588391794bfc57364e070a (diff) |
Proper time tracking in AnimationNodeAnimation, closes #22887
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/animation_blend_tree_editor_plugin.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp index b83976270f..eb3c432ee7 100644 --- a/editor/plugins/animation_blend_tree_editor_plugin.cpp +++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp @@ -692,7 +692,9 @@ void AnimationNodeBlendTreeEditor::_notification(int p_what) { Ref<Animation> anim = player->get_animation(an->get_animation()); if (anim.is_valid()) { E->get()->set_max(anim->get_length()); - E->get()->set_value(an->get_playback_time()); + //StringName path = AnimationTreeEditor::get_singleton()->get_base_path() + E->get().input_node; + StringName time_path = AnimationTreeEditor::get_singleton()->get_base_path() + String(E->key()) + "/time"; + E->get()->set_value(AnimationTreeEditor::get_singleton()->get_tree()->get(time_path)); } } } |