diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-12-09 21:46:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-09 21:46:34 +0100 |
commit | 1830b122e1ad75b301a66e837e484d3fb6f9b75b (patch) | |
tree | 8ace87f2fff8fd42930ac614a5698a6a54e9706d | |
parent | dc54ee18ae34338d40dd44a55414c7f3ffc54f2d (diff) | |
parent | a491824ec0788b13cb3b7432942224ef7f630b15 (diff) |
Merge pull request #24221 from YeldhamDev/deprecate_animation_tree_player
Warn about AnimationTreePlayer's deprecation
-rw-r--r-- | scene/animation/animation_tree_player.cpp | 10 | ||||
-rw-r--r-- | scene/animation/animation_tree_player.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp index 524784df53..6adfb94695 100644 --- a/scene/animation/animation_tree_player.cpp +++ b/scene/animation/animation_tree_player.cpp @@ -401,6 +401,9 @@ void AnimationTreePlayer::_notification(int p_what) { case NOTIFICATION_ENTER_TREE: { + ERR_EXPLAIN("AnimationTreePlayer has been deprecated. Use AnimationTree instead."); + WARN_DEPRECATED + if (!processing) { //make sure that a previous process state was not saved //only process if "processing" is set @@ -409,12 +412,14 @@ void AnimationTreePlayer::_notification(int p_what) { } } break; case NOTIFICATION_READY: { + dirty_caches = true; if (master != NodePath()) { _update_sources(); } } break; case NOTIFICATION_INTERNAL_PROCESS: { + if (animation_process_mode == ANIMATION_PROCESS_PHYSICS) break; @@ -1715,6 +1720,11 @@ Error AnimationTreePlayer::node_rename(const StringName &p_node, const StringNam return OK; } +String AnimationTreePlayer::get_configuration_warning() const { + + return TTR("This node has been deprecated. Use AnimationTree instead."); +} + void AnimationTreePlayer::_bind_methods() { ClassDB::bind_method(D_METHOD("add_node", "type", "id"), &AnimationTreePlayer::add_node); diff --git a/scene/animation/animation_tree_player.h b/scene/animation/animation_tree_player.h index d2d7b1c9ec..4e4c876e87 100644 --- a/scene/animation/animation_tree_player.h +++ b/scene/animation/animation_tree_player.h @@ -343,6 +343,8 @@ public: int node_get_input_count(const StringName &p_node) const; StringName node_get_input_source(const StringName &p_node, int p_input) const; + String get_configuration_warning() const; + /* ANIMATION NODE */ void animation_node_set_animation(const StringName &p_node, const Ref<Animation> &p_animation); Ref<Animation> animation_node_get_animation(const StringName &p_node) const; |