Closed letheed closed 6 years ago
It should all be position
. Missed that one somehow. Feel free to open a pull request.
Related: #9593
Will do... I wanted to make sure that was a wanted change first, given the amount of files that is going to touch.
Fixed by #11153 Thanks @letheed !
Does Godot care about the consistency of method names? It seems to be using "pos" and "position" randomly.
List of methods and variables using "pos" (bind_method.*[^a-zA-Z]pos[^a-zA-Z])
| File | Binding | | ---- | ---- | | core/bind/core_bind.cpp: | ClassDB::bind_method(D_METHOD("segment_intersects_circle", "segment_from", "segment_to", "circle_**pos**", "circle_radius"), &_Geometry::segment_intersects_circle); | | core/bind/core_bind.cpp: | ClassDB::bind_method(D_METHOD("seek", "**pos**"), &_File::seek); | | core/bind/core_bind.cpp: | ClassDB::bind_method(D_METHOD("seek_end", "**pos**"), &_File::seek_end, DEFVAL(0)); | | core/bind/core_bind.cpp: | ClassDB::bind_method(D_METHOD("get_**pos**"), &_File::get_**pos**); | | core/io/stream_peer.cpp: | ClassDB::bind_method(D_METHOD("seek", "**pos**"), &StreamPeerBuffer::seek); | | core/io/stream_peer.cpp: | ClassDB::bind_method(D_METHOD("get_**pos**"), &StreamPeerBuffer::get_**pos**); | | core/io/xml_parser.cpp: | ClassDB::bind_method(D_METHOD("seek", "**pos**"), &XMLParser::seek); | | core/math/a_star.cpp: | ClassDB::bind_method(D_METHOD("add_point", "id", "**pos**", "weight_scale"), &AStar::add_point, DEFVAL(1.0)); | | core/math/a_star.cpp: | ClassDB::bind_method(D_METHOD("get_point_**pos**", "id"), &AStar::get_point_**pos**); | | core/math/a_star.cpp: | ClassDB::bind_method(D_METHOD("get_closest_point", "to_**pos**"), &AStar::get_closest_point); | | core/math/a_star.cpp: | ClassDB::bind_method(D_METHOD("get_closest_**pos**_in_segment", "to_**pos**"), &AStar::get_closest_**pos**_in_segment); | | core/os/input.cpp: | ClassDB::bind_method(D_METHOD("warp_mouse_**pos**", "to"), &Input::warp_mouse_**pos**); | | core/os/input_event.cpp: | ClassDB::bind_method(D_METHOD("set_**pos**ition", "**pos**"), &InputEventScreenTouch::set_**pos**ition); | | core/project_settings.cpp: | ClassDB::bind_method(D_METHOD("set_order", "name", "**pos**"), &ProjectSettings::set_order); | | editor/animation_editor.cpp: | ClassDB::bind_method(D_METHOD("_track_**pos**_draw"), &AnimationKeyEditor::_track_**pos**_draw); | | editor/project_manager.cpp: | ClassDB::bind_method("_update_scroll_**pos**", &ProjectManager::_update_scroll_**pos**); | | modules/visual_script/visual_script.cpp: | ClassDB::bind_method(D_METHOD("add_node", "func", "id", "node", "**pos**"), &VisualScript::add_node, DEFVAL(Point2())); | | modules/visual_script/visual_script.cpp: | ClassDB::bind_method(D_METHOD("set_node_**pos**", "func", "id", "**pos**"), &VisualScript::set_node_**pos**); | | modules/visual_script/visual_script.cpp: | ClassDB::bind_method(D_METHOD("get_node_**pos**", "func", "id"), &VisualScript::get_node_**pos**); | | scene/2d/audio_stream_player_2d.cpp: | ClassDB::bind_method(D_METHOD("play", "from_**pos**"), &AudioStreamPlayer2D::play, DEFVAL(0.0)); | | scene/2d/audio_stream_player_2d.cpp: | ClassDB::bind_method(D_METHOD("seek", "to_**pos**"), &AudioStreamPlayer2D::seek); | | scene/2d/audio_stream_player_2d.cpp: | ClassDB::bind_method(D_METHOD("get_**pos**"), &AudioStreamPlayer2D::get_**pos**); | | scene/2d/camera_2d.cpp: | ClassDB::bind_method(D_METHOD("get_camera_**pos**"), &Camera2D::get_camera_**pos**); | | scene/2d/canvas_item.cpp: | ClassDB::bind_method(D_METHOD("draw_circle", "**pos**", "radius", "color"), &CanvasItem::draw_circle); | | scene/2d/canvas_item.cpp: | ClassDB::bind_method(D_METHOD("draw_texture", "texture", "**pos**", "modulate", "normal_map"), &CanvasItem::draw_texture, DEFVAL(Color(1, 1, 1, 1)), DEFVAL(Variant())); | | scene/2d/canvas_item.cpp: | ClassDB::bind_method(D_METHOD("draw_string", "font", "**pos**", "text", "modulate", "clip_w"), &CanvasItem::draw_string, DEFVAL(Color(1, 1, 1)), DEFVAL(-1)); | | scene/2d/canvas_item.cpp: | ClassDB::bind_method(D_METHOD("draw_char", "font", "**pos**", "char", "next", "modulate"), &CanvasItem::draw_char, DEFVAL(Color(1, 1, 1))); | | scene/2d/canvas_item.cpp: | ClassDB::bind_method(D_METHOD("draw_set_transform", "**pos**", "rot", "scale"), &CanvasItem::draw_set_transform); | | scene/2d/canvas_item.cpp: | ClassDB::bind_method(D_METHOD("get_local_mouse_**pos**"), &CanvasItem::get_local_mouse_**pos**); | | scene/2d/canvas_item.cpp: | ClassDB::bind_method(D_METHOD("make_canvas_**pos**_local", "screen_point"), | | scene/2d/line_2d.cpp: | ClassDB::bind_method(D_METHOD("set_point_**pos**", "i", "**pos**"), &Line2D::set_point_**pos**); | | scene/2d/line_2d.cpp: | ClassDB::bind_method(D_METHOD("get_point_**pos**", "i"), &Line2D::get_point_**pos**); | | scene/2d/line_2d.cpp: | ClassDB::bind_method(D_METHOD("add_point", "**pos**"), &Line2D::add_point); | | scene/2d/node_2d.cpp: | ClassDB::bind_method(D_METHOD("set_**pos**ition", "**pos**"), &Node2D::set_**pos**ition); | | scene/2d/node_2d.cpp: | ClassDB::bind_method(D_METHOD("set_global_**pos**ition", "**pos**"), &Node2D::set_global_**pos**ition); | | scene/2d/tile_map.cpp: | ClassDB::bind_method(D_METHOD("set_cellv", "**pos**", "tile", "flip_x", "flip_y", "trans**pos**e"), &TileMap::set_cellv, DEFVAL(false), DEFVAL(false), DEFVAL(false)); | | scene/2d/tile_map.cpp: | ClassDB::bind_method(D_METHOD("get_cellv", "**pos**"), &TileMap::get_cellv); | | scene/3d/audio_stream_player_3d.cpp: | ClassDB::bind_method(D_METHOD("play", "from_**pos**"), &AudioStreamPlayer3D::play, DEFVAL(0.0)); | | scene/3d/audio_stream_player_3d.cpp: | ClassDB::bind_method(D_METHOD("seek", "to_**pos**"), &AudioStreamPlayer3D::seek); | | scene/3d/audio_stream_player_3d.cpp: | ClassDB::bind_method(D_METHOD("get_**pos**"), &AudioStreamPlayer3D::get_**pos**); | | scene/3d/immediate_geometry.cpp: | ClassDB::bind_method(D_METHOD("add_vertex", "**pos**"), &ImmediateGeometry::add_vertex); | | scene/3d/physics_body.cpp: | ClassDB::bind_method(D_METHOD("apply_impulse", "**pos**", "impulse"), &RigidBody::apply_impulse); | | scene/3d/spatial.cpp: | ClassDB::bind_method(D_METHOD("look_at_from_**pos**", "**pos**", "target", "up"), &Spatial::look_at_from_**pos**); | | scene/animation/animation_player.cpp: | ClassDB::bind_method(D_METHOD("seek", "**pos**_sec", "update"), &AnimationPlayer::seek, DEFVAL(false)); | | scene/animation/animation_player.cpp: | ClassDB::bind_method(D_METHOD("get_**pos**"), &AnimationPlayer::get_current_animation_**pos**); | | scene/animation/animation_player.cpp: | ClassDB::bind_method(D_METHOD("get_current_animation_**pos**"), &AnimationPlayer::get_current_animation_**pos**); | | scene/animation/animation_tree_player.cpp: | ClassDB::bind_method(D_METHOD("timeseek_node_seek", "id", "**pos**_sec"), &AnimationTreePlayer::timeseek_node_seek); | | scene/animation/animation_tree_player.cpp: | ClassDB::bind_method(D_METHOD("node_set_**pos**", "id", "screen_**pos**"), &AnimationTreePlayer::node_set_**pos**); | | scene/animation/animation_tree_player.cpp: | ClassDB::bind_method(D_METHOD("node_get_**pos**", "id"), &AnimationTreePlayer::node_get_**pos**); | | scene/audio/audio_player.cpp: | ClassDB::bind_method(D_METHOD("play", "from_**pos**"), &AudioStreamPlayer::play, DEFVAL(0.0)); | | scene/audio/audio_player.cpp: | ClassDB::bind_method(D_METHOD("seek", "to_**pos**"), &AudioStreamPlayer::seek); | | scene/audio/audio_player.cpp: | ClassDB::bind_method(D_METHOD("get_**pos**"), &AudioStreamPlayer::get_**pos**); | | scene/gui/control.cpp: | ClassDB::bind_method(D_METHOD("set_begin", "**pos**"), &Control::set_begin); | | scene/gui/control.cpp: | ClassDB::bind_method(D_METHOD("set_end", "**pos**"), &Control::set_end); | | scene/gui/control.cpp: | ClassDB::bind_method(D_METHOD("set_**pos**ition", "**pos**"), &Control::set_**pos**ition); | | scene/gui/control.cpp: | ClassDB::bind_method(D_METHOD("set_global_**pos**ition", "**pos**"), &Control::set_global_**pos**ition); | | scene/gui/control.cpp: | ClassDB::bind_method(D_METHOD("get_cursor_shape", "**pos**"), &Control::get_cursor_shape, DEFVAL(Point2())); | | scene/gui/control.cpp: | ClassDB::bind_method(D_METHOD("warp_mouse", "to_**pos**"), &Control::warp_mouse); | | scene/gui/graph_node.cpp: | ClassDB::bind_method(D_METHOD("get_connection_output_**pos**", "idx"), &GraphNode::get_connection_output_**pos**); | | scene/gui/graph_node.cpp: | ClassDB::bind_method(D_METHOD("get_connection_input_**pos**", "idx"), &GraphNode::get_connection_input_**pos**); | | scene/gui/item_list.cpp: | ClassDB::bind_method(D_METHOD("get_item_at_**pos**", "**pos**", "exact"), &ItemList::get_item_at_**pos**, DEFVAL(false)); | | scene/gui/line_edit.cpp: | ClassDB::bind_method(D_METHOD("set_cursor_**pos**", "**pos**"), &LineEdit::set_cursor_**pos**); | | scene/gui/line_edit.cpp: | ClassDB::bind_method(D_METHOD("get_cursor_**pos**"), &LineEdit::get_cursor_**pos**); | | scene/gui/scroll_container.cpp: | ClassDB::bind_method(D_METHOD("_update_scrollbar_**pos**"), &ScrollContainer::_update_scrollbar_**pos**); | | scene/gui/tree.cpp: | ClassDB::bind_method(D_METHOD("get_item_at_**pos**", "**pos**"), &Tree::get_item_at_**pos**); | | scene/gui/tree.cpp: | ClassDB::bind_method(D_METHOD("get_column_at_**pos**", "**pos**"), &Tree::get_column_at_**pos**); | | scene/gui/video_player.cpp: | ClassDB::bind_method(D_METHOD("get_stream_**pos**"), &VideoPlayer::get_stream_**pos**); | | scene/main/node.cpp: | ClassDB::bind_method(D_METHOD("move_child", "child_node", "to_**pos**"), &Node::move_child); | | scene/main/viewport.cpp: | ClassDB::bind_method(D_METHOD("warp_mouse", "to_**pos**"), &Viewport::warp_mouse); | | scene/resources/animation.cpp: | ClassDB::bind_method(D_METHOD("add_track", "type", "at_**pos**"), &Animation::add_track, DEFVAL(-1)); | | scene/resources/animation.cpp: | ClassDB::bind_method(D_METHOD("track_remove_key_at_**pos**", "idx", "**pos**"), &Animation::track_remove_key_at_**pos**); | | scene/resources/bit_mask.cpp: | ClassDB::bind_method(D_METHOD("set_bit", "**pos**", "bit"), &BitMap::set_bit); | | scene/resources/bit_mask.cpp: | ClassDB::bind_method(D_METHOD("get_bit", "**pos**"), &BitMap::get_bit); | | scene/resources/curve.cpp: | ClassDB::bind_method(D_METHOD("add_point", "**pos**", "left_tangent", "right_tangent", "left_mode", "right_mode"), | | scene/resources/curve.cpp: | ClassDB::bind_method(D_METHOD("get_point_**pos**", "index"), &Curve::get_point_**pos**); | | scene/resources/curve.cpp: | ClassDB::bind_method(D_METHOD("add_point", "**pos**", "in", "out", "at**pos**"), &Curve2D::add_point, DEFVAL(Vector2()), DEFVAL(Vector2()), DEFVAL(-1)); | | scene/resources/curve.cpp: | ClassDB::bind_method(D_METHOD("set_point_**pos**", "idx", "**pos**"), &Curve2D::set_point_**pos**); | | scene/resources/curve.cpp: | ClassDB::bind_method(D_METHOD("get_point_**pos**", "idx"), &Curve2D::get_point_**pos**); | | scene/resources/curve.cpp: | ClassDB::bind_method(D_METHOD("set_point_in", "idx", "**pos**"), &Curve2D::set_point_in); | | scene/resources/curve.cpp: | ClassDB::bind_method(D_METHOD("set_point_out", "idx", "**pos**"), &Curve2D::set_point_out); | | scene/resources/curve.cpp: | ClassDB::bind_method(D_METHOD("add_point", "**pos**", "in", "out", "at**pos**"), &Curve3D::add_point, DEFVAL(Vector3()), DEFVAL(Vector3()), DEFVAL(-1)); | | scene/resources/curve.cpp: | ClassDB::bind_method(D_METHOD("set_point_**pos**", "idx", "**pos**"), &Curve3D::set_point_**pos**); | | scene/resources/curve.cpp: | ClassDB::bind_method(D_METHOD("get_point_**pos**", "idx"), &Curve3D::get_point_**pos**); | | scene/resources/curve.cpp: | ClassDB::bind_method(D_METHOD("set_point_in", "idx", "**pos**"), &Curve3D::set_point_in); | | scene/resources/curve.cpp: | ClassDB::bind_method(D_METHOD("set_point_out", "idx", "**pos**"), &Curve3D::set_point_out); | | scene/resources/font.cpp: | ClassDB::bind_method(D_METHOD("draw", "canvas_item", "**pos**", "string", "modulate", "clip_w"), &Font::draw, DEFVAL(Color(1, 1, 1)), DEFVAL(-1)); | | scene/resources/font.cpp: | ClassDB::bind_method(D_METHOD("draw_char", "canvas_item", "**pos**", "char", "next", "modulate"), &Font::draw_char, DEFVAL(-1), DEFVAL(Color(1, 1, 1))); | | scene/resources/shader_graph.cpp: | ClassDB::bind_method(D_METHOD("node_set_**pos**","shader_type","id","**pos**"),&ShaderGraph::node_set_**pos**); | | scene/resources/shader_graph.cpp: | ClassDB::bind_method(D_METHOD("node_get_**pos**","shader_type","id"),&ShaderGraph::node_get_**pos**); | | scene/resources/texture.cpp: | ClassDB::bind_method(D_METHOD("draw", "canvas_item", "**pos**", "modulate", "trans**pos**e", "normal_map"), &Texture::draw, DEFVAL(Color(1, 1, 1)), DEFVAL(false), DEFVAL(Variant())); | | servers/audio_server.cpp: | ClassDB::bind_method(D_METHOD("add_bus", "at_**pos**"), &AudioServer::add_bus, DEFVAL(-1)); | | servers/audio_server.cpp: | ClassDB::bind_method(D_METHOD("add_bus_effect", "bus_idx", "effect", "at_**pos**"), &AudioServer::add_bus_effect, DEFVAL(-1)); | | servers/physics_2d_server.cpp: | ClassDB::bind_method(D_METHOD("get_contact_local_**pos**", "contact_idx"), &Physics2DDirectBodyState::get_contact_local_**pos**); | | servers/physics_2d_server.cpp: | ClassDB::bind_method(D_METHOD("get_contact_collider_**pos**", "contact_idx"), &Physics2DDirectBodyState::get_contact_collider_**pos**); | | servers/physics_2d_server.cpp: | ClassDB::bind_method(D_METHOD("get_contact_collider_velocity_at_**pos**", "contact_idx"), &Physics2DDirectBodyState::get_contact_collider_velocity_at_**pos**); | | servers/physics_2d_server.cpp: | ClassDB::bind_method(D_METHOD("body_apply_impulse", "body", "**pos**", "impulse"), &Physics2DServer::body_apply_impulse); | | servers/physics_server.cpp: | ClassDB::bind_method(D_METHOD("add_force", "force", "**pos**"), &PhysicsDirectBodyState::add_force); | | servers/physics_server.cpp: | ClassDB::bind_method(D_METHOD("apply_impulse", "**pos**", "j"), &PhysicsDirectBodyState::apply_impulse); | | servers/physics_server.cpp: | ClassDB::bind_method(D_METHOD("get_contact_local_**pos**", "contact_idx"), &PhysicsDirectBodyState::get_contact_local_**pos**); | | servers/physics_server.cpp: | ClassDB::bind_method(D_METHOD("get_contact_collider_**pos**", "contact_idx"), &PhysicsDirectBodyState::get_contact_collider_**pos**); | | servers/physics_server.cpp: | ClassDB::bind_method(D_METHOD("get_contact_collider_velocity_at_**pos**", "contact_idx"), &PhysicsDirectBodyState::get_contact_collider_velocity_at_**pos**); | | servers/physics_server.cpp: | ClassDB::bind_method(D_METHOD("body_apply_impulse", "body", "**pos**", "impulse"), &PhysicsServer::body_apply_impulse); |
List of methods and variables using "position" (bind_method.*[^a-zA-Z]position)
| File | Binding | | ---- | ---- | | core/bind/core_bind.cpp: | //ClassDB::bind_method(D_METHOD("get_mouse_**position**"),&_OS::get_mouse_**position**); | | core/bind/core_bind.cpp: | ClassDB::bind_method(D_METHOD("get_screen_**position**", "screen"), &_OS::get_screen_**position**, DEFVAL(-1)); | | core/bind/core_bind.cpp: | ClassDB::bind_method(D_METHOD("get_window_**position**"), &_OS::get_window_**position**); | | core/bind/core_bind.cpp: | ClassDB::bind_method(D_METHOD("set_window_**position**", "**position**"), &_OS::set_window_**position**); | | core/bind/core_bind.cpp: | ClassDB::bind_method(D_METHOD("set_ime_**position**", "**position**"), &_OS::set_ime_**position**); | | core/os/input.cpp: | //ClassDB::bind_method(D_METHOD("get_mouse_**position**"),&Input::get_mouse_**position**); - this is not the function you want | | core/os/input_event.cpp: | ClassDB::bind_method(D_METHOD("set_**position**", "**position**"), &InputEventMouse::set_**position**); | | core/os/input_event.cpp: | ClassDB::bind_method(D_METHOD("get_**position**"), &InputEventMouse::get_**position**); | | core/os/input_event.cpp: | ClassDB::bind_method(D_METHOD("set_global_**position**", "global_**position**"), &InputEventMouse::set_global_**position**); | | core/os/input_event.cpp: | ClassDB::bind_method(D_METHOD("get_global_**position**"), &InputEventMouse::get_global_**position**); | | core/os/input_event.cpp: | ClassDB::bind_method(D_METHOD("set_**position**", "pos"), &InputEventScreenTouch::set_**position**); | | core/os/input_event.cpp: | ClassDB::bind_method(D_METHOD("get_**position**"), &InputEventScreenTouch::get_**position**); | | core/os/input_event.cpp: | ClassDB::bind_method(D_METHOD("set_**position**", "**position**"), &InputEventScreenDrag::set_**position**); | | core/os/input_event.cpp: | ClassDB::bind_method(D_METHOD("get_**position**"), &InputEventScreenDrag::get_**position**); | | scene/2d/canvas_item.cpp: | ClassDB::bind_method(D_METHOD("get_global_mouse_**position**"), &CanvasItem::get_global_mouse_**position**); | | scene/2d/node_2d.cpp: | ClassDB::bind_method(D_METHOD("set_**position**", "pos"), &Node2D::set_**position**); | | scene/2d/node_2d.cpp: | ClassDB::bind_method(D_METHOD("get_**position**"), &Node2D::get_**position**); | | scene/2d/node_2d.cpp: | ClassDB::bind_method(D_METHOD("set_global_**position**", "pos"), &Node2D::set_global_**position**); | | scene/2d/node_2d.cpp: | ClassDB::bind_method(D_METHOD("get_global_**position**"), &Node2D::get_global_**position**); | | scene/2d/physics_body_2d.cpp: | ClassDB::bind_method(D_METHOD("get_collision_**position**", "collision"), &KinematicBody2D::get_collision_**position**); | | scene/2d/remote_transform_2d.cpp: | ClassDB::bind_method(D_METHOD("set_update_**position**", "update_remote_**position**"), &RemoteTransform2D::set_update_**position**); | | scene/2d/remote_transform_2d.cpp: | ClassDB::bind_method(D_METHOD("get_update_**position**"), &RemoteTransform2D::get_update_**position**); | | scene/3d/camera.cpp: | ClassDB::bind_method(D_METHOD("unproject_**position**", "world_point"), &Camera::unproject_**position**); | | scene/3d/camera.cpp: | ClassDB::bind_method(D_METHOD("is_**position**_behind", "world_point"), &Camera::is_**position**_behind); | | scene/3d/camera.cpp: | ClassDB::bind_method(D_METHOD("project_**position**", "screen_point"), &Camera::project_**position**); | | scene/3d/physics_body.cpp: | ClassDB::bind_method(D_METHOD("get_**position**"), &KinematicCollision::get_**position**); | | scene/3d/remote_transform.cpp: | ClassDB::bind_method(D_METHOD("set_update_**position**", "update_remote_**position**"), &RemoteTransform::set_update_**position**); | | scene/3d/remote_transform.cpp: | ClassDB::bind_method(D_METHOD("get_update_**position**"), &RemoteTransform::get_update_**position**); | | scene/3d/spatial_velocity_tracker.cpp: | ClassDB::bind_method(D_METHOD("update_**position**", "**position**"), &SpatialVelocityTracker::update_**position**); | | scene/3d/spatial_velocity_tracker.cpp: | ClassDB::bind_method(D_METHOD("reset", "**position**"), &SpatialVelocityTracker::reset); | | scene/gui/control.cpp: | ClassDB::bind_method(D_METHOD("set_**position**", "pos"), &Control::set_**position**); | | scene/gui/control.cpp: | ClassDB::bind_method(D_METHOD("set_global_**position**", "pos"), &Control::set_global_**position**); | | scene/gui/control.cpp: | ClassDB::bind_method(D_METHOD("get_**position**"), &Control::get_**position**); | | scene/gui/control.cpp: | ClassDB::bind_method(D_METHOD("get_global_**position**"), &Control::get_global_**position**); | | scene/main/node.cpp: | ClassDB::bind_method(D_METHOD("get_**position**_in_parent"), &Node::get_**position**_in_parent); | | scene/main/viewport.cpp: | ClassDB::bind_method(D_METHOD("get_mouse_**position**"), &Viewport::get_mouse_**position**); | | servers/arvr/arvr_**position**al_tracker.cpp: | ClassDB::bind_method(D_METHOD("get_tracks_**position**"), &ARVRPositionalTracker::get_tracks_**position**); | | servers/arvr/arvr_**position**al_tracker.cpp: | ClassDB::bind_method(D_METHOD("get_**position**"), &ARVRPositionalTracker::get_**position**); | | servers/arvr/arvr_**position**al_tracker.cpp: | ClassDB::bind_method(D_METHOD("_set_rw_**position**", "rw_**position**"), &ARVRPositionalTracker::set_rw_**position**); |
Should some of those be renamed before 3.0? Autocompletion makes it easy to deal with but in some cases like for example
CanvasItem
havingget_global_mouse_position
andget_local_mouse_pos
are bit weird.