diff options
| author | Juan Linietsky | 2018-06-21 18:08:11 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2018-06-21 18:08:11 -0300 |
| commit | b80946ee0dbb7c28021c55d2623a35e89fc972f4 (patch) | |
| tree | aae498f78f1fc7df6f05869ac2b92cf8aea92478 /scene/animation/animation_graph_player.cpp | |
| parent | a0719533bdc4e99a24bd02886fc77a29d5d30dfc (diff) | |
| download | godot-b80946ee0dbb7c28021c55d2623a35e89fc972f4.tar.gz godot-b80946ee0dbb7c28021c55d2623a35e89fc972f4.tar.zst godot-b80946ee0dbb7c28021c55d2623a35e89fc972f4.zip | |
Diffstat (limited to 'scene/animation/animation_graph_player.cpp')
| -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 ea41a2011..b8efecebe 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); |
