diff options
author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2017-08-19 01:02:56 +0200 |
---|---|---|
committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2017-08-19 01:29:45 +0200 |
commit | 90b8a5b71ef79e0339826507c4b290f0c51b7cd2 (patch) | |
tree | 6f24bbc63ef9674687589f9ec9017e9fd09d266e /scene/animation | |
parent | fd69604bd9dc743494a7818f25f384cc7f521b33 (diff) |
Removes editor_hint from SceneTree
Diffstat (limited to 'scene/animation')
-rw-r--r-- | scene/animation/animation_player.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index e2a0636466..b111fb8812 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "animation_player.h" +#include "engine.h" #include "message_queue.h" #include "scene/scene_string_names.h" @@ -199,7 +200,7 @@ void AnimationPlayer::_notification(int p_what) { } break; case NOTIFICATION_READY: { - if (!get_tree()->is_editor_hint() && animation_set.has(autoplay)) { + if (!Engine::get_singleton()->is_editor_hint() && animation_set.has(autoplay)) { play(autoplay); set_autoplay(""); //this line is the fix for autoplay issues with animatio _animation_process(0); @@ -344,7 +345,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, float ERR_FAIL_COND(p_anim->node_cache.size() != p_anim->animation->get_track_count()); Animation *a = p_anim->animation.operator->(); - bool can_call = is_inside_tree() && !get_tree()->is_editor_hint(); + bool can_call = is_inside_tree() && !Engine::get_singleton()->is_editor_hint(); for (int i = 0; i < a->get_track_count(); i++) { @@ -955,7 +956,7 @@ void AnimationPlayer::play(const StringName &p_name, float p_custom_blend, float emit_signal(SceneStringNames::get_singleton()->animation_started, c.assigned); - if (is_inside_tree() && get_tree()->is_editor_hint()) + if (is_inside_tree() && Engine::get_singleton()->is_editor_hint()) return; // no next in this case StringName next = animation_get_next(p_name); |