summaryrefslogtreecommitdiffstats
path: root/scene/animation/animation_tree_player.cpp
diff options
context:
space:
mode:
authorletheed <letheed@outlook.com>2017-09-10 15:37:49 +0200
committerletheed <letheed@outlook.com>2017-09-20 13:11:10 +0200
commit5ad9be4c24e9d7dc5672fdc42cea896622fe5685 (patch)
treea8811a50265edd940b00e12b9bd522e3e9b4694e /scene/animation/animation_tree_player.cpp
parentecd226c6a751f8a20766363fd1f2e1e0e2da8fba (diff)
downloadredot-engine-5ad9be4c24e9d7dc5672fdc42cea896622fe5685.tar.gz
Rename pos to position in user facing methods and variables
Rename user facing methods and variables as well as the corresponding C++ methods according to the folloming changes: * pos -> position * rot -> rotation * loc -> location C++ variables are left as is.
Diffstat (limited to 'scene/animation/animation_tree_player.cpp')
-rw-r--r--scene/animation/animation_tree_player.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp
index 38d0527288..a2a8adb653 100644
--- a/scene/animation/animation_tree_player.cpp
+++ b/scene/animation/animation_tree_player.cpp
@@ -92,7 +92,7 @@ bool AnimationTreePlayer::_set(const StringName &p_name, const Variant &p_value)
Dictionary node = nodes[i];
StringName id = node.get_valid("id");
- Point2 pos = node.get_valid("pos");
+ Point2 pos = node.get_valid("position");
NodeType nt = NODE_MAX;
String type = node.get_valid("type");
@@ -122,7 +122,7 @@ bool AnimationTreePlayer::_set(const StringName &p_name, const Variant &p_value)
if (nt != NODE_OUTPUT)
add_node(nt, id);
- node_set_pos(id, pos);
+ node_set_position(id, pos);
switch (nt) {
case NODE_OUTPUT: {
@@ -245,7 +245,7 @@ bool AnimationTreePlayer::_get(const StringName &p_name, Variant &r_ret) const {
Dictionary node;
node["id"] = E->key();
- node["pos"] = n->pos;
+ node["position"] = n->pos;
switch (n->type) {
case NODE_OUTPUT: node["type"] = "output"; break;
@@ -1176,7 +1176,7 @@ void AnimationTreePlayer::transition_node_set_current(const StringName &p_node,
n->set_current(p_current);
}
-void AnimationTreePlayer::node_set_pos(const StringName &p_node, const Vector2 &p_pos) {
+void AnimationTreePlayer::node_set_position(const StringName &p_node, const Vector2 &p_pos) {
ERR_FAIL_COND(!node_map.has(p_node));
node_map[p_node]->pos = p_pos;
@@ -1187,7 +1187,7 @@ AnimationTreePlayer::NodeType AnimationTreePlayer::node_get_type(const StringNam
ERR_FAIL_COND_V(!node_map.has(p_node), NODE_OUTPUT);
return node_map[p_node]->type;
}
-Point2 AnimationTreePlayer::node_get_pos(const StringName &p_node) const {
+Point2 AnimationTreePlayer::node_get_position(const StringName &p_node) const {
ERR_FAIL_COND_V(!node_map.has(p_node), Point2());
return node_map[p_node]->pos;
@@ -1752,7 +1752,7 @@ void AnimationTreePlayer::_bind_methods() {
ClassDB::bind_method(D_METHOD("timescale_node_set_scale", "id", "scale"), &AnimationTreePlayer::timescale_node_set_scale);
ClassDB::bind_method(D_METHOD("timescale_node_get_scale", "id"), &AnimationTreePlayer::timescale_node_get_scale);
- ClassDB::bind_method(D_METHOD("timeseek_node_seek", "id", "pos_sec"), &AnimationTreePlayer::timeseek_node_seek);
+ ClassDB::bind_method(D_METHOD("timeseek_node_seek", "id", "seconds"), &AnimationTreePlayer::timeseek_node_seek);
ClassDB::bind_method(D_METHOD("transition_node_set_input_count", "id", "count"), &AnimationTreePlayer::transition_node_set_input_count);
ClassDB::bind_method(D_METHOD("transition_node_get_input_count", "id"), &AnimationTreePlayer::transition_node_get_input_count);
@@ -1767,8 +1767,8 @@ void AnimationTreePlayer::_bind_methods() {
ClassDB::bind_method(D_METHOD("transition_node_set_current", "id", "input_idx"), &AnimationTreePlayer::transition_node_set_current);
ClassDB::bind_method(D_METHOD("transition_node_get_current", "id"), &AnimationTreePlayer::transition_node_get_current);
- ClassDB::bind_method(D_METHOD("node_set_pos", "id", "screen_pos"), &AnimationTreePlayer::node_set_pos);
- ClassDB::bind_method(D_METHOD("node_get_pos", "id"), &AnimationTreePlayer::node_get_pos);
+ ClassDB::bind_method(D_METHOD("node_set_position", "id", "screen_position"), &AnimationTreePlayer::node_set_position);
+ ClassDB::bind_method(D_METHOD("node_get_position", "id"), &AnimationTreePlayer::node_get_position);
ClassDB::bind_method(D_METHOD("remove_node", "id"), &AnimationTreePlayer::remove_node);
ClassDB::bind_method(D_METHOD("connect_nodes", "id", "dst_id", "dst_input_idx"), &AnimationTreePlayer::connect_nodes);