summaryrefslogtreecommitdiff
path: root/scene/animation/animation_player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/animation/animation_player.cpp')
-rw-r--r--scene/animation/animation_player.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index 9a3c7e71ec..2fbbd54d9f 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -189,7 +189,7 @@ void AnimationPlayer::_notification(int p_what) {
switch(p_what) {
- case NOTIFICATION_ENTER_SCENE: {
+ case NOTIFICATION_ENTER_TREE: {
if (!processing) {
//make sure that a previous process state was not saved
@@ -202,7 +202,7 @@ void AnimationPlayer::_notification(int p_what) {
} break;
case NOTIFICATION_READY: {
- if (!get_scene()->is_editor_hint() && animation_set.has(autoplay)) {
+ if (!get_tree()->is_editor_hint() && animation_set.has(autoplay)) {
play(autoplay);
}
} break;
@@ -221,7 +221,7 @@ void AnimationPlayer::_notification(int p_what) {
if (processing)
_animation_process( get_fixed_process_delta_time() );
} break;
- case NOTIFICATION_EXIT_SCENE: {
+ case NOTIFICATION_EXIT_TREE: {
stop_all();
clear_caches();
@@ -261,8 +261,8 @@ void AnimationPlayer::_generate_node_caches(AnimationData* p_anim) {
}
{
- if (!child->is_connected("exit_scene",this,"_node_removed"))
- child->connect("exit_scene",this,"_node_removed",make_binds(child),CONNECT_ONESHOT);
+ if (!child->is_connected("exit_tree",this,"_node_removed"))
+ child->connect("exit_tree",this,"_node_removed",make_binds(child),CONNECT_ONESHOT);
}
TrackNodeCacheKey key;
@@ -348,7 +348,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData* p_anim,float p
Animation *a=p_anim->animation.operator->();
- bool can_call = is_inside_scene() && !get_scene()->is_editor_hint();
+ bool can_call = is_inside_tree() && !get_tree()->is_editor_hint();
for (int i=0;i<a->get_track_count();i++) {
@@ -922,7 +922,7 @@ void AnimationPlayer::play(const StringName& p_name, float p_custom_blend, float
_set_process(true); // always process when starting an animation
playing = true;
- if (is_inside_scene() && get_scene()->is_editor_hint())
+ if (is_inside_tree() && get_tree()->is_editor_hint())
return; // no next in this case