summaryrefslogtreecommitdiff
path: root/scene/animation/animation_tree_player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/animation/animation_tree_player.cpp')
-rw-r--r--scene/animation/animation_tree_player.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp
index 5c3e123ac3..8f6d53c21c 100644
--- a/scene/animation/animation_tree_player.cpp
+++ b/scene/animation/animation_tree_player.cpp
@@ -403,8 +403,7 @@ void AnimationTreePlayer::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
- ERR_EXPLAIN("AnimationTreePlayer has been deprecated. Use AnimationTree instead.");
- WARN_DEPRECATED;
+ WARN_DEPRECATED_MSG("AnimationTreePlayer has been deprecated. Use AnimationTree instead.");
if (!processing) {
//make sure that a previous process state was not saved
@@ -993,10 +992,9 @@ int AnimationTreePlayer::node_get_input_count(const StringName &p_node) const {
ERR_FAIL_COND_V(!node_map.has(p_node), -1);
return node_map[p_node]->inputs.size();
}
-#define GET_NODE(m_type, m_cast) \
- ERR_FAIL_COND(!node_map.has(p_node)); \
- ERR_EXPLAIN("Invalid parameter for node type."); \
- ERR_FAIL_COND(node_map[p_node]->type != m_type); \
+#define GET_NODE(m_type, m_cast) \
+ ERR_FAIL_COND(!node_map.has(p_node)); \
+ ERR_FAIL_COND_MSG(node_map[p_node]->type != m_type, "Invalid parameter for node type."); \
m_cast *n = static_cast<m_cast *>(node_map[p_node]);
void AnimationTreePlayer::animation_node_set_animation(const StringName &p_node, const Ref<Animation> &p_animation) {
@@ -1209,10 +1207,9 @@ Point2 AnimationTreePlayer::node_get_position(const StringName &p_node) const {
return node_map[p_node]->pos;
}
-#define GET_NODE_V(m_type, m_cast, m_ret) \
- ERR_FAIL_COND_V(!node_map.has(p_node), m_ret); \
- ERR_EXPLAIN("Invalid parameter for node type."); \
- ERR_FAIL_COND_V(node_map[p_node]->type != m_type, m_ret); \
+#define GET_NODE_V(m_type, m_cast, m_ret) \
+ ERR_FAIL_COND_V(!node_map.has(p_node), m_ret); \
+ ERR_FAIL_COND_V_MSG(node_map[p_node]->type != m_type, m_ret, "Invalid parameter for node type."); \
m_cast *n = static_cast<m_cast *>(node_map[p_node]);
Ref<Animation> AnimationTreePlayer::animation_node_get_animation(const StringName &p_node) const {
@@ -1367,8 +1364,7 @@ void AnimationTreePlayer::get_node_list(List<StringName> *p_node_list) const {
void AnimationTreePlayer::remove_node(const StringName &p_node) {
ERR_FAIL_COND(!node_map.has(p_node));
- ERR_EXPLAIN("Node 0 (output) can't be removed.");
- ERR_FAIL_COND(p_node == out_name);
+ ERR_FAIL_COND_MSG(p_node == out_name, "Node 0 (output) can't be removed.");
for (Map<StringName, NodeBase *>::Element *E = node_map.front(); E; E = E->next()) {