diff --git a/addons/anima/core/anima_node.gd b/addons/anima/core/anima_node.gd index 8eba4a3..d17a60b 100644 --- a/addons/anima/core/anima_node.gd +++ b/addons/anima/core/anima_node.gd @@ -37,7 +37,7 @@ func _exit_tree(): clear() for child in get_children(): - child.free() + child.queue_free() func _ready(): if not _anima_tween.is_connected("animation_completed",Callable(self,"_on_all_tween_completed")): @@ -793,3 +793,5 @@ func _play_backwards(time: float) -> void: func debug(): print(get_animation_data()) + + return self diff --git a/addons/anima/core/declaration/anima_declaration_node.gd b/addons/anima/core/declaration/anima_declaration_node.gd index 5c406c3..8b54f76 100644 --- a/addons/anima/core/declaration/anima_declaration_node.gd +++ b/addons/anima/core/declaration/anima_declaration_node.gd @@ -243,6 +243,12 @@ func clear(): if _anima_node and is_instance_valid(_anima_node): _anima_node.clear() + var to_ignore = ['node', 'nodes', 'grid', 'group'] + for key in _data.keys(): + if not to_ignore.has(key): + _data.erase(key) + + _target_data = _data _clear_metakeys(_target_data.node) return self