diff options
Diffstat (limited to 'scene/animation')
-rw-r--r-- | scene/animation/animation_graph_player.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/animation/animation_graph_player.cpp b/scene/animation/animation_graph_player.cpp index ea41a20114..b8efecebe9 100644 --- a/scene/animation/animation_graph_player.cpp +++ b/scene/animation/animation_graph_player.cpp @@ -318,6 +318,9 @@ Vector2 AnimationNode::get_position() const { void AnimationNode::set_graph_player(AnimationGraphPlayer *p_player) { + if (player != NULL && p_player == NULL) { + emit_signal("removed_from_graph"); + } player = p_player; } @@ -377,6 +380,7 @@ void AnimationNode::_bind_methods() { BIND_VMETHOD(MethodInfo("process", PropertyInfo(Variant::REAL, "time"), PropertyInfo(Variant::BOOL, "seek"))); + ADD_SIGNAL(MethodInfo("removed_from_graph")); BIND_ENUM_CONSTANT(FILTER_IGNORE); BIND_ENUM_CONSTANT(FILTER_PASS); BIND_ENUM_CONSTANT(FILTER_STOP); |