summaryrefslogtreecommitdiff
path: root/scene/animation
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-14 11:07:57 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-01-14 11:10:42 -0300
commitdcb95ec1473eff3f455909cd81c3cd50b1e1159b (patch)
tree60343275911d48ebf993041dec92e1eac112b746 /scene/animation
parent93ab45b6b5c4f8e0619e963156c983009d399a9d (diff)
removed duplicated functions in class hierarchy that were bound more than once
added a check to detect this case in the future
Diffstat (limited to 'scene/animation')
-rw-r--r--scene/animation/animation_tree_player.cpp14
-rw-r--r--scene/animation/animation_tree_player.h6
2 files changed, 10 insertions, 10 deletions
diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp
index 26c82fe1ae..c3a05240bb 100644
--- a/scene/animation/animation_tree_player.cpp
+++ b/scene/animation/animation_tree_player.cpp
@@ -214,7 +214,7 @@ bool AnimationTreePlayer::_set(const StringName& p_name, const Variant& p_value)
StringName src = connections[i*3+0];
StringName dst = connections[i*3+1];
int dst_in = connections[i*3+2];
- connect(src,dst,dst_in);
+ connect_nodes(src,dst,dst_in);
}
set_active(data.get_valid("active"));
@@ -1496,7 +1496,7 @@ AnimationTreePlayer::ConnectError AnimationTreePlayer::_cycle_test(const StringN
}
-Error AnimationTreePlayer::connect(const StringName& p_src_node,const StringName& p_dst_node, int p_dst_input) {
+Error AnimationTreePlayer::connect_nodes(const StringName& p_src_node,const StringName& p_dst_node, int p_dst_input) {
ERR_FAIL_COND_V( !node_map.has(p_src_node) , ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V( !node_map.has(p_dst_node) , ERR_INVALID_PARAMETER);
@@ -1538,7 +1538,7 @@ Error AnimationTreePlayer::connect(const StringName& p_src_node,const StringName
return OK;
}
-bool AnimationTreePlayer::is_connected(const StringName& p_src_node,const StringName& p_dst_node, int p_dst_input) const {
+bool AnimationTreePlayer::are_nodes_connected(const StringName& p_src_node,const StringName& p_dst_node, int p_dst_input) const {
ERR_FAIL_COND_V( !node_map.has(p_src_node) , false);
ERR_FAIL_COND_V( !node_map.has(p_dst_node) , false);
@@ -1550,7 +1550,7 @@ bool AnimationTreePlayer::is_connected(const StringName& p_src_node,const String
}
-void AnimationTreePlayer::disconnect(const StringName& p_node, int p_input) {
+void AnimationTreePlayer::disconnect_nodes(const StringName& p_node, int p_input) {
ERR_FAIL_COND( !node_map.has(p_node));
@@ -1901,9 +1901,9 @@ void AnimationTreePlayer::_bind_methods() {
ClassDB::bind_method(_MD("node_get_pos","id"),&AnimationTreePlayer::node_get_pos);
ClassDB::bind_method(_MD("remove_node","id"),&AnimationTreePlayer::remove_node);
- ClassDB::bind_method(_MD("connect","id","dst_id","dst_input_idx"),&AnimationTreePlayer::connect);
- ClassDB::bind_method(_MD("is_connected","id","dst_id","dst_input_idx"),&AnimationTreePlayer::is_connected);
- ClassDB::bind_method(_MD("disconnect","id","dst_input_idx"),&AnimationTreePlayer::disconnect);
+ ClassDB::bind_method(_MD("connect_nodes","id","dst_id","dst_input_idx"),&AnimationTreePlayer::connect_nodes);
+ ClassDB::bind_method(_MD("are_nodes_connected","id","dst_id","dst_input_idx"),&AnimationTreePlayer::are_nodes_connected);
+ ClassDB::bind_method(_MD("disconnect_nodes","id","dst_input_idx"),&AnimationTreePlayer::disconnect_nodes);
ClassDB::bind_method(_MD("set_active","enabled"),&AnimationTreePlayer::set_active);
ClassDB::bind_method(_MD("is_active"),&AnimationTreePlayer::is_active);
diff --git a/scene/animation/animation_tree_player.h b/scene/animation/animation_tree_player.h
index ae2fe8c2bb..5e118be034 100644
--- a/scene/animation/animation_tree_player.h
+++ b/scene/animation/animation_tree_player.h
@@ -397,9 +397,9 @@ public:
void get_node_list(List<StringName> *p_node_list) const;
void remove_node(const StringName& p_node);
- Error connect(const StringName& p_src_node,const StringName& p_dst_node, int p_dst_input);
- bool is_connected(const StringName& p_src_node,const StringName& p_dst_node, int p_input) const;
- void disconnect(const StringName& p_src_node, int p_input);
+ Error connect_nodes(const StringName& p_src_node,const StringName& p_dst_node, int p_dst_input);
+ bool are_nodes_connected(const StringName& p_src_node,const StringName& p_dst_node, int p_input) const;
+ void disconnect_nodes(const StringName& p_src_node, int p_input);
void set_base_path(const NodePath& p_path);
NodePath get_base_path() const;