From 5ad9be4c24e9d7dc5672fdc42cea896622fe5685 Mon Sep 17 00:00:00 2001 From: letheed Date: Sun, 10 Sep 2017 15:37:49 +0200 Subject: [PATCH] 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. --- core/bind/core_bind.cpp | 22 ++++----- core/bind/core_bind.h | 2 +- core/io/file_access_buffered.cpp | 2 +- core/io/file_access_buffered.h | 2 +- core/io/file_access_compressed.cpp | 4 +- core/io/file_access_compressed.h | 2 +- core/io/file_access_encrypted.cpp | 4 +- core/io/file_access_encrypted.h | 2 +- core/io/file_access_memory.cpp | 2 +- core/io/file_access_memory.h | 2 +- core/io/file_access_network.cpp | 2 +- core/io/file_access_network.h | 2 +- core/io/file_access_pack.cpp | 8 ++-- core/io/file_access_pack.h | 2 +- core/io/file_access_zip.cpp | 6 +-- core/io/file_access_zip.h | 2 +- core/io/pck_packer.cpp | 8 ++-- core/io/resource_format_binary.cpp | 8 ++-- core/io/stream_peer.cpp | 6 +-- core/io/stream_peer.h | 2 +- core/io/xml_parser.cpp | 2 +- core/io/zip_io.h | 4 +- core/math/a_star.cpp | 12 ++--- core/math/a_star.h | 4 +- core/os/dir_access.cpp | 2 +- core/os/file_access.h | 2 +- core/os/input.cpp | 2 +- core/os/input.h | 2 +- core/os/input_event.cpp | 2 +- core/os/os.h | 2 +- core/project_settings.cpp | 2 +- core/variant_call.cpp | 20 ++++---- doc/classes/AStar.xml | 16 +++---- doc/classes/Animation.xml | 6 +-- doc/classes/AnimationPlayer.xml | 6 +-- doc/classes/AnimationTreePlayer.xml | 8 ++-- doc/classes/Array.xml | 6 +-- doc/classes/AudioServer.xml | 4 +- doc/classes/AudioStreamPlayer.xml | 8 ++-- doc/classes/AudioStreamPlayer2D.xml | 8 ++-- doc/classes/AudioStreamPlayer3D.xml | 8 ++-- doc/classes/BitMap.xml | 4 +- doc/classes/Camera2D.xml | 2 +- doc/classes/CanvasItem.xml | 14 +++--- doc/classes/CollisionObject.xml | 4 +- doc/classes/Control.xml | 20 ++++---- doc/classes/Curve.xml | 4 +- doc/classes/Curve2D.xml | 18 +++---- doc/classes/Curve3D.xml | 18 +++---- doc/classes/File.xml | 6 +-- doc/classes/Font.xml | 8 ++-- doc/classes/Geometry.xml | 6 +-- doc/classes/GraphEdit.xml | 4 +- doc/classes/GraphNode.xml | 4 +- doc/classes/ImmediateGeometry.xml | 2 +- doc/classes/Input.xml | 2 +- doc/classes/InputEventScreenTouch.xml | 2 +- doc/classes/ItemList.xml | 6 +-- doc/classes/Line2D.xml | 8 ++-- doc/classes/LineEdit.xml | 6 +-- doc/classes/Node.xml | 2 +- doc/classes/Node2D.xml | 4 +- doc/classes/Physics2DDirectBodyState.xml | 6 +-- doc/classes/Physics2DServer.xml | 2 +- doc/classes/PhysicsDirectBodyState.xml | 10 ++-- doc/classes/PhysicsServer.xml | 2 +- doc/classes/ProjectSettings.xml | 2 +- doc/classes/Rect2.xml | 2 +- doc/classes/Rect3.xml | 2 +- doc/classes/RigidBody.xml | 2 +- doc/classes/Spatial.xml | 4 +- doc/classes/SpriteFrames.xml | 2 +- doc/classes/StreamPeerBuffer.xml | 4 +- doc/classes/String.xml | 10 ++-- doc/classes/Texture.xml | 2 +- doc/classes/TileMap.xml | 8 ++-- doc/classes/Transform2D.xml | 2 +- doc/classes/Tree.xml | 16 +++---- doc/classes/Tween.xml | 2 +- doc/classes/VideoPlayer.xml | 2 +- doc/classes/Viewport.xml | 2 +- doc/classes/VisualScript.xml | 8 ++-- doc/classes/XMLParser.xml | 2 +- drivers/unix/file_access_unix.cpp | 2 +- drivers/unix/file_access_unix.h | 2 +- drivers/windows/file_access_windows.cpp | 6 +-- drivers/windows/file_access_windows.h | 2 +- editor/animation_editor.cpp | 46 +++++++++--------- editor/animation_editor.h | 2 +- editor/code_editor.cpp | 2 +- editor/create_dialog.cpp | 6 +-- editor/editor_audio_buses.cpp | 8 ++-- editor/editor_autoload_settings.cpp | 8 ++-- editor/editor_export.cpp | 4 +- editor/filesystem_dock.cpp | 20 ++++---- editor/import/resource_importer_wav.cpp | 2 +- .../animation_player_editor_plugin.cpp | 12 ++--- .../plugins/animation_tree_editor_plugin.cpp | 16 +++---- editor/plugins/canvas_item_editor_plugin.cpp | 10 ++-- editor/plugins/curve_editor_plugin.cpp | 22 ++++----- editor/plugins/line_2d_editor_plugin.cpp | 16 +++---- editor/plugins/path_2d_editor_plugin.cpp | 28 +++++------ editor/plugins/path_editor_plugin.cpp | 40 ++++++++-------- .../resource_preloader_editor_plugin.cpp | 2 +- editor/plugins/script_text_editor.cpp | 8 ++-- editor/plugins/shader_graph_editor_plugin.cpp | 16 +++---- editor/plugins/spatial_editor_plugin.cpp | 16 +++---- editor/plugins/spatial_editor_plugin.h | 2 +- .../plugins/sprite_frames_editor_plugin.cpp | 6 +-- editor/project_export.cpp | 14 +++--- editor/project_manager.cpp | 8 ++-- editor/project_manager.h | 2 +- editor/property_editor.cpp | 12 ++--- editor/scene_tree_editor.cpp | 10 ++-- editor/translations/ar.po | 6 +-- editor/translations/bg.po | 6 +-- editor/translations/bn.po | 6 +-- editor/translations/ca.po | 6 +-- editor/translations/cs.po | 6 +-- editor/translations/da.po | 6 +-- editor/translations/de.po | 6 +-- editor/translations/de_CH.po | 6 +-- editor/translations/editor.pot | 6 +-- editor/translations/el.po | 6 +-- editor/translations/es.po | 6 +-- editor/translations/es_AR.po | 6 +-- editor/translations/fa.po | 6 +-- editor/translations/fi.po | 6 +-- editor/translations/fr.po | 6 +-- editor/translations/hu.po | 6 +-- editor/translations/id.po | 6 +-- editor/translations/it.po | 6 +-- editor/translations/ja.po | 6 +-- editor/translations/ko.po | 6 +-- editor/translations/nb.po | 6 +-- editor/translations/nl.po | 6 +-- editor/translations/pl.po | 6 +-- editor/translations/pr.po | 6 +-- editor/translations/pt_BR.po | 6 +-- editor/translations/pt_PT.po | 6 +-- editor/translations/ru.po | 6 +-- editor/translations/sk.po | 6 +-- editor/translations/sl.po | 6 +-- editor/translations/th.po | 6 +-- editor/translations/tr.po | 6 +-- editor/translations/ur_PK.po | 6 +-- editor/translations/zh_CN.po | 6 +-- editor/translations/zh_HK.po | 6 +-- editor/translations/zh_TW.po | 6 +-- main/input_default.cpp | 6 +-- main/input_default.h | 2 +- modules/dds/texture_loader_dds.cpp | 2 +- modules/opus/audio_stream_opus.cpp | 6 +-- modules/opus/audio_stream_opus.h | 2 +- modules/pvr/texture_loader_pvr.cpp | 2 +- .../stb_vorbis/audio_stream_ogg_vorbis.cpp | 2 +- modules/stb_vorbis/audio_stream_ogg_vorbis.h | 2 +- modules/tga/image_loader_tga.cpp | 4 +- modules/theora/video_stream_theora.cpp | 2 +- modules/theora/video_stream_theora.h | 2 +- modules/visual_script/visual_script.cpp | 10 ++-- modules/visual_script/visual_script.h | 4 +- .../visual_script/visual_script_editor.cpp | 22 ++++----- modules/vorbis/audio_stream_ogg_vorbis.cpp | 6 +-- modules/vorbis/audio_stream_ogg_vorbis.h | 2 +- modules/webm/video_stream_webm.cpp | 4 +- modules/webm/video_stream_webm.h | 2 +- platform/android/file_access_android.cpp | 2 +- platform/android/file_access_android.h | 2 +- platform/android/file_access_jandroid.cpp | 2 +- platform/android/file_access_jandroid.h | 2 +- platform/haiku/haiku_direct_window.cpp | 8 ++-- platform/osx/os_osx.h | 2 +- platform/osx/os_osx.mm | 2 +- platform/uwp/export/export.cpp | 6 +-- platform/windows/os_windows.cpp | 2 +- platform/windows/os_windows.h | 2 +- platform/x11/os_x11.cpp | 2 +- platform/x11/os_x11.h | 2 +- scene/2d/animated_sprite.cpp | 2 +- scene/2d/audio_stream_player_2d.cpp | 10 ++-- scene/2d/audio_stream_player_2d.h | 2 +- scene/2d/camera_2d.cpp | 4 +- scene/2d/camera_2d.h | 2 +- scene/2d/canvas_item.cpp | 20 ++++---- scene/2d/canvas_item.h | 4 +- scene/2d/line_2d.cpp | 10 ++-- scene/2d/line_2d.h | 4 +- scene/2d/node_2d.cpp | 4 +- scene/2d/path_2d.cpp | 2 +- scene/2d/tile_map.cpp | 8 ++-- scene/3d/audio_stream_player_3d.cpp | 10 ++-- scene/3d/audio_stream_player_3d.h | 2 +- scene/3d/collision_object.cpp | 4 +- scene/3d/immediate_geometry.cpp | 2 +- scene/3d/physics_body.cpp | 2 +- scene/3d/spatial.cpp | 4 +- scene/3d/spatial.h | 2 +- scene/animation/animation_player.cpp | 8 ++-- scene/animation/animation_player.h | 2 +- scene/animation/animation_tree_player.cpp | 16 +++---- scene/animation/animation_tree_player.h | 4 +- scene/audio/audio_player.cpp | 10 ++-- scene/audio/audio_player.h | 2 +- scene/gui/control.cpp | 24 +++++----- scene/gui/graph_edit.cpp | 34 ++++++------- scene/gui/graph_node.cpp | 8 ++-- scene/gui/graph_node.h | 4 +- scene/gui/item_list.cpp | 8 ++-- scene/gui/item_list.h | 2 +- scene/gui/line_edit.cpp | 48 +++++++++---------- scene/gui/line_edit.h | 4 +- scene/gui/scroll_container.cpp | 6 +-- scene/gui/scroll_container.h | 2 +- scene/gui/spin_box.cpp | 2 +- scene/gui/text_edit.cpp | 6 +-- scene/gui/tree.cpp | 30 ++++++------ scene/gui/tree.h | 6 +-- scene/gui/video_player.cpp | 6 +-- scene/gui/video_player.h | 2 +- scene/main/node.cpp | 2 +- scene/main/viewport.cpp | 4 +- scene/resources/animation.cpp | 28 +++++------ scene/resources/animation.h | 2 +- scene/resources/audio_stream_sample.cpp | 2 +- scene/resources/audio_stream_sample.h | 2 +- scene/resources/bit_mask.cpp | 4 +- scene/resources/curve.cpp | 41 +++++++--------- scene/resources/curve.h | 10 ++-- scene/resources/dynamic_font.cpp | 2 +- scene/resources/font.cpp | 4 +- scene/resources/scene_format_text.cpp | 4 +- scene/resources/shader_graph.cpp | 14 +++--- scene/resources/shader_graph.h | 4 +- scene/resources/texture.cpp | 6 +-- scene/resources/video_stream.h | 2 +- servers/audio/audio_stream.cpp | 4 +- servers/audio/audio_stream.h | 4 +- servers/audio_server.cpp | 4 +- servers/physics/body_sw.h | 6 +-- servers/physics/joints/pin_joint_sw.h | 4 +- servers/physics/physics_server_sw.cpp | 4 +- servers/physics_2d/body_2d_sw.h | 6 +-- servers/physics_2d_server.cpp | 8 ++-- servers/physics_2d_server.h | 6 +-- servers/physics_server.cpp | 12 ++--- servers/physics_server.h | 6 +-- 247 files changed, 823 insertions(+), 832 deletions(-) diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index cfd7677d6b7..2477b1b1879 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1033,10 +1033,8 @@ void _OS::_bind_methods() { ClassDB::bind_method(D_METHOD("get_time", "utc"), &_OS::get_time, DEFVAL(false)); ClassDB::bind_method(D_METHOD("get_time_zone_info"), &_OS::get_time_zone_info); ClassDB::bind_method(D_METHOD("get_unix_time"), &_OS::get_unix_time); - ClassDB::bind_method(D_METHOD("get_datetime_from_unix_time", "unix_time_val"), - &_OS::get_datetime_from_unix_time); - ClassDB::bind_method(D_METHOD("get_unix_time_from_datetime", "datetime"), - &_OS::get_unix_time_from_datetime); + ClassDB::bind_method(D_METHOD("get_datetime_from_unix_time", "unix_time_val"), &_OS::get_datetime_from_unix_time); + ClassDB::bind_method(D_METHOD("get_unix_time_from_datetime", "datetime"), &_OS::get_unix_time_from_datetime); ClassDB::bind_method(D_METHOD("get_system_time_secs"), &_OS::get_system_time_secs); ClassDB::bind_method(D_METHOD("set_icon", "icon"), &_OS::set_icon); @@ -1337,7 +1335,7 @@ void _Geometry::_bind_methods() { ClassDB::bind_method(D_METHOD("build_box_planes", "extents"), &_Geometry::build_box_planes); ClassDB::bind_method(D_METHOD("build_cylinder_planes", "radius", "height", "sides", "axis"), &_Geometry::build_cylinder_planes, DEFVAL(Vector3::AXIS_Z)); ClassDB::bind_method(D_METHOD("build_capsule_planes", "radius", "height", "sides", "lats", "axis"), &_Geometry::build_capsule_planes, DEFVAL(Vector3::AXIS_Z)); - ClassDB::bind_method(D_METHOD("segment_intersects_circle", "segment_from", "segment_to", "circle_pos", "circle_radius"), &_Geometry::segment_intersects_circle); + ClassDB::bind_method(D_METHOD("segment_intersects_circle", "segment_from", "segment_to", "circle_position", "circle_radius"), &_Geometry::segment_intersects_circle); ClassDB::bind_method(D_METHOD("segment_intersects_segment_2d", "from_a", "to_a", "from_b", "to_b"), &_Geometry::segment_intersects_segment_2d); ClassDB::bind_method(D_METHOD("get_closest_points_between_segments_2d", "p1", "q1", "p2", "q2"), &_Geometry::get_closest_points_between_segments_2d); @@ -1353,7 +1351,7 @@ void _Geometry::_bind_methods() { ClassDB::bind_method(D_METHOD("ray_intersects_triangle", "from", "dir", "a", "b", "c"), &_Geometry::ray_intersects_triangle); ClassDB::bind_method(D_METHOD("segment_intersects_triangle", "from", "to", "a", "b", "c"), &_Geometry::segment_intersects_triangle); - ClassDB::bind_method(D_METHOD("segment_intersects_sphere", "from", "to", "spos", "sradius"), &_Geometry::segment_intersects_sphere); + ClassDB::bind_method(D_METHOD("segment_intersects_sphere", "from", "to", "sphere_position", "sphere_radius"), &_Geometry::segment_intersects_sphere); ClassDB::bind_method(D_METHOD("segment_intersects_cylinder", "from", "to", "height", "radius"), &_Geometry::segment_intersects_cylinder); ClassDB::bind_method(D_METHOD("segment_intersects_convex", "from", "to", "planes"), &_Geometry::segment_intersects_convex); ClassDB::bind_method(D_METHOD("point_is_inside_triangle", "point", "a", "b", "c"), &_Geometry::point_is_inside_triangle); @@ -1452,10 +1450,10 @@ void _File::seek_end(int64_t p_position) { ERR_FAIL_COND(!f); f->seek_end(p_position); } -int64_t _File::get_pos() const { +int64_t _File::get_position() const { ERR_FAIL_COND_V(!f, 0); - return f->get_pos(); + return f->get_position(); } int64_t _File::get_len() const { @@ -1534,7 +1532,7 @@ String _File::get_as_text() const { ERR_FAIL_COND_V(!f, String()); String text; - size_t original_pos = f->get_pos(); + size_t original_pos = f->get_position(); f->seek(0); String l = get_line(); @@ -1731,9 +1729,9 @@ void _File::_bind_methods() { ClassDB::bind_method(D_METHOD("open", "path", "flags"), &_File::open); ClassDB::bind_method(D_METHOD("close"), &_File::close); ClassDB::bind_method(D_METHOD("is_open"), &_File::is_open); - ClassDB::bind_method(D_METHOD("seek", "pos"), &_File::seek); - ClassDB::bind_method(D_METHOD("seek_end", "pos"), &_File::seek_end, DEFVAL(0)); - ClassDB::bind_method(D_METHOD("get_pos"), &_File::get_pos); + ClassDB::bind_method(D_METHOD("seek", "position"), &_File::seek); + ClassDB::bind_method(D_METHOD("seek_end", "position"), &_File::seek_end, DEFVAL(0)); + ClassDB::bind_method(D_METHOD("get_position"), &_File::get_position); ClassDB::bind_method(D_METHOD("get_len"), &_File::get_len); ClassDB::bind_method(D_METHOD("eof_reached"), &_File::eof_reached); ClassDB::bind_method(D_METHOD("get_8"), &_File::get_8); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 721acf657fd..1a22d45932b 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -399,7 +399,7 @@ public: void seek(int64_t p_position); ///< seek to a given position void seek_end(int64_t p_position = 0); ///< seek from the end of file - int64_t get_pos() const; ///< get position in the file + int64_t get_position() const; ///< get position in the file int64_t get_len() const; ///< get size of the file bool eof_reached() const; ///< reading passed EOF diff --git a/core/io/file_access_buffered.cpp b/core/io/file_access_buffered.cpp index 859f2e3f8c7..9ec03bf32be 100644 --- a/core/io/file_access_buffered.cpp +++ b/core/io/file_access_buffered.cpp @@ -76,7 +76,7 @@ void FileAccessBuffered::seek_end(int64_t p_position) { file.offset = file.size + p_position; }; -size_t FileAccessBuffered::get_pos() const { +size_t FileAccessBuffered::get_position() const { return file.offset; }; diff --git a/core/io/file_access_buffered.h b/core/io/file_access_buffered.h index d3137058fb9..70aaeb8ae03 100644 --- a/core/io/file_access_buffered.h +++ b/core/io/file_access_buffered.h @@ -72,7 +72,7 @@ protected: int get_cache_size(); public: - virtual size_t get_pos() const; ///< get position in the file + virtual size_t get_position() const; ///< get position in the file virtual size_t get_len() const; ///< get size of the file virtual void seek(size_t p_position); ///< seek to a given position diff --git a/core/io/file_access_compressed.cpp b/core/io/file_access_compressed.cpp index 70430ca5d37..47509458543 100644 --- a/core/io/file_access_compressed.cpp +++ b/core/io/file_access_compressed.cpp @@ -62,7 +62,7 @@ Error FileAccessCompressed::open_after_magic(FileAccess *p_base) { block_size = f->get_32(); read_total = f->get_32(); int bc = (read_total / block_size) + 1; - int acc_ofs = f->get_pos() + bc * 4; + int acc_ofs = f->get_position() + bc * 4; int max_bs = 0; for (int i = 0; i < bc; i++) { @@ -232,7 +232,7 @@ void FileAccessCompressed::seek_end(int64_t p_position) { seek(read_total + p_position); } } -size_t FileAccessCompressed::get_pos() const { +size_t FileAccessCompressed::get_position() const { ERR_FAIL_COND_V(!f, 0); if (writing) { diff --git a/core/io/file_access_compressed.h b/core/io/file_access_compressed.h index ba84c9767cf..1a57e2d4ee7 100644 --- a/core/io/file_access_compressed.h +++ b/core/io/file_access_compressed.h @@ -74,7 +74,7 @@ public: virtual void seek(size_t p_position); ///< seek to a given position virtual void seek_end(int64_t p_position = 0); ///< seek from the end of file - virtual size_t get_pos() const; ///< get position in the file + virtual size_t get_position() const; ///< get position in the file virtual size_t get_len() const; ///< get size of the file virtual bool eof_reached() const; ///< reading passed EOF diff --git a/core/io/file_access_encrypted.cpp b/core/io/file_access_encrypted.cpp index 12503f3be4b..461c5bafe2a 100644 --- a/core/io/file_access_encrypted.cpp +++ b/core/io/file_access_encrypted.cpp @@ -71,7 +71,7 @@ Error FileAccessEncrypted::open_and_parse(FileAccess *p_base, const Vectorget_buffer(md5d, 16); length = p_base->get_64(); - base = p_base->get_pos(); + base = p_base->get_position(); ERR_FAIL_COND_V(p_base->get_len() < base + length, ERR_FILE_CORRUPT); uint32_t ds = length; if (ds % 16) { @@ -199,7 +199,7 @@ void FileAccessEncrypted::seek_end(int64_t p_position) { seek(data.size() + p_position); } -size_t FileAccessEncrypted::get_pos() const { +size_t FileAccessEncrypted::get_position() const { return pos; } diff --git a/core/io/file_access_encrypted.h b/core/io/file_access_encrypted.h index 74d00a5a8f6..82f60ac654b 100644 --- a/core/io/file_access_encrypted.h +++ b/core/io/file_access_encrypted.h @@ -61,7 +61,7 @@ public: virtual void seek(size_t p_position); ///< seek to a given position virtual void seek_end(int64_t p_position = 0); ///< seek from the end of file - virtual size_t get_pos() const; ///< get position in the file + virtual size_t get_position() const; ///< get position in the file virtual size_t get_len() const; ///< get size of the file virtual bool eof_reached() const; ///< reading passed EOF diff --git a/core/io/file_access_memory.cpp b/core/io/file_access_memory.cpp index 5b186b77981..b948394385b 100644 --- a/core/io/file_access_memory.cpp +++ b/core/io/file_access_memory.cpp @@ -120,7 +120,7 @@ void FileAccessMemory::seek_end(int64_t p_position) { pos = length + p_position; } -size_t FileAccessMemory::get_pos() const { +size_t FileAccessMemory::get_position() const { ERR_FAIL_COND_V(!data, 0); return pos; diff --git a/core/io/file_access_memory.h b/core/io/file_access_memory.h index 7feb16461b3..b7b8430089b 100644 --- a/core/io/file_access_memory.h +++ b/core/io/file_access_memory.h @@ -51,7 +51,7 @@ public: virtual void seek(size_t p_position); ///< seek to a given position virtual void seek_end(int64_t p_position); ///< seek from the end of file - virtual size_t get_pos() const; ///< get position in the file + virtual size_t get_position() const; ///< get position in the file virtual size_t get_len() const; ///< get size of the file virtual bool eof_reached() const; ///< reading passed EOF diff --git a/core/io/file_access_network.cpp b/core/io/file_access_network.cpp index 58ca2d4c586..8c624226a13 100644 --- a/core/io/file_access_network.cpp +++ b/core/io/file_access_network.cpp @@ -350,7 +350,7 @@ void FileAccessNetwork::seek_end(int64_t p_position) { seek(total_size + p_position); } -size_t FileAccessNetwork::get_pos() const { +size_t FileAccessNetwork::get_position() const { ERR_FAIL_COND_V(!opened, 0); return pos; diff --git a/core/io/file_access_network.h b/core/io/file_access_network.h index cd5046f0073..abbe378b60a 100644 --- a/core/io/file_access_network.h +++ b/core/io/file_access_network.h @@ -145,7 +145,7 @@ public: virtual void seek(size_t p_position); ///< seek to a given position virtual void seek_end(int64_t p_position = 0); ///< seek from the end of file - virtual size_t get_pos() const; ///< get position in the file + virtual size_t get_position() const; ///< get position in the file virtual size_t get_len() const; ///< get size of the file virtual bool eof_reached() const; ///< reading passed EOF diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp index e511085ac55..ff4c28ec39f 100644 --- a/core/io/file_access_pack.cpp +++ b/core/io/file_access_pack.cpp @@ -140,17 +140,17 @@ bool PackedSourcePCK::try_open_pack(const String &p_path) { if (magic != 0x43504447) { //maybe at he end.... self contained exe f->seek_end(); - f->seek(f->get_pos() - 4); + f->seek(f->get_position() - 4); magic = f->get_32(); if (magic != 0x43504447) { memdelete(f); return false; } - f->seek(f->get_pos() - 12); + f->seek(f->get_position() - 12); uint64_t ds = f->get_64(); - f->seek(f->get_pos() - ds - 8); + f->seek(f->get_position() - ds - 8); magic = f->get_32(); if (magic != 0x43504447) { @@ -236,7 +236,7 @@ void FileAccessPack::seek_end(int64_t p_position) { seek(pf.size + p_position); } -size_t FileAccessPack::get_pos() const { +size_t FileAccessPack::get_position() const { return pos; } diff --git a/core/io/file_access_pack.h b/core/io/file_access_pack.h index 758e9afa8eb..3deb0d2bd38 100644 --- a/core/io/file_access_pack.h +++ b/core/io/file_access_pack.h @@ -148,7 +148,7 @@ public: virtual void seek(size_t p_position); virtual void seek_end(int64_t p_position = 0); - virtual size_t get_pos() const; + virtual size_t get_position() const; virtual size_t get_len() const; virtual bool eof_reached() const; diff --git a/core/io/file_access_zip.cpp b/core/io/file_access_zip.cpp index 8c99ef29839..73b23ac7021 100644 --- a/core/io/file_access_zip.cpp +++ b/core/io/file_access_zip.cpp @@ -65,7 +65,7 @@ static uLong godot_write(voidpf opaque, voidpf stream, const void *buf, uLong si static long godot_tell(voidpf opaque, voidpf stream) { FileAccess *f = (FileAccess *)opaque; - return f->get_pos(); + return f->get_position(); }; static long godot_seek(voidpf opaque, voidpf stream, uLong offset, int origin) { @@ -76,7 +76,7 @@ static long godot_seek(voidpf opaque, voidpf stream, uLong offset, int origin) { switch (origin) { case ZLIB_FILEFUNC_SEEK_CUR: - pos = f->get_pos() + offset; + pos = f->get_position() + offset; break; case ZLIB_FILEFUNC_SEEK_END: pos = f->get_len() + offset; @@ -301,7 +301,7 @@ void FileAccessZip::seek_end(int64_t p_position) { unzSeekCurrentFile(zfile, get_len() + p_position); }; -size_t FileAccessZip::get_pos() const { +size_t FileAccessZip::get_position() const { ERR_FAIL_COND_V(!zfile, 0); return unztell(zfile); diff --git a/core/io/file_access_zip.h b/core/io/file_access_zip.h index 2a8ec3fca5d..a40e1a753df 100644 --- a/core/io/file_access_zip.h +++ b/core/io/file_access_zip.h @@ -98,7 +98,7 @@ public: virtual void seek(size_t p_position); ///< seek to a given position virtual void seek_end(int64_t p_position = 0); ///< seek from the end of file - virtual size_t get_pos() const; ///< get position in the file + virtual size_t get_position() const; ///< get position in the file virtual size_t get_len() const; ///< get size of the file virtual bool eof_reached() const; ///< reading passed EOF diff --git a/core/io/pck_packer.cpp b/core/io/pck_packer.cpp index f1f5b6f5385..23e86580d14 100644 --- a/core/io/pck_packer.cpp +++ b/core/io/pck_packer.cpp @@ -119,7 +119,7 @@ Error PCKPacker::flush(bool p_verbose) { for (int i = 0; i < files.size(); i++) { file->store_pascal_string(files[i].path); - files[i].offset_offset = file->get_pos(); + files[i].offset_offset = file->get_position(); file->store_64(0); // offset file->store_64(files[i].size); // size @@ -130,10 +130,10 @@ Error PCKPacker::flush(bool p_verbose) { file->store_32(0); }; - uint64_t ofs = file->get_pos(); + uint64_t ofs = file->get_position(); ofs = _align(ofs, alignment); - _pad(file, ofs - file->get_pos()); + _pad(file, ofs - file->get_position()); const uint32_t buf_max = 65536; uint8_t *buf = memnew_arr(uint8_t, buf_max); @@ -150,7 +150,7 @@ Error PCKPacker::flush(bool p_verbose) { to_write -= read; }; - uint64_t pos = file->get_pos(); + uint64_t pos = file->get_position(); file->seek(files[i].offset_offset); // go back to store the file's offset file->store_64(ofs); file->seek(pos); diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index 16ec6cd3c5e..900db7c2dc2 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -1179,7 +1179,7 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons save_ustring(fw, get_ustring(f)); //type - size_t md_ofs = f->get_pos(); + size_t md_ofs = f->get_position(); size_t importmd_ofs = f->get_64(); fw->store_64(0); //metadata offset @@ -1227,7 +1227,7 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons save_ustring(fw, path); } - int64_t size_diff = (int64_t)fw->get_pos() - (int64_t)f->get_pos(); + int64_t size_diff = (int64_t)fw->get_position() - (int64_t)f->get_position(); //internal resources uint32_t int_resources_size = f->get_32(); @@ -1880,7 +1880,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p } else { save_unicode_string(r->get_path()); //actual external } - ofs_pos.push_back(f->get_pos()); + ofs_pos.push_back(f->get_position()); f->store_64(0); //offset in 64 bits } @@ -1891,7 +1891,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p ResourceData &rd = E->get(); - ofs_table.push_back(f->get_pos()); + ofs_table.push_back(f->get_position()); save_unicode_string(rd.type); f->store_32(rd.properties.size()); diff --git a/core/io/stream_peer.cpp b/core/io/stream_peer.cpp index f4f81f08074..2583eb369d1 100644 --- a/core/io/stream_peer.cpp +++ b/core/io/stream_peer.cpp @@ -405,9 +405,9 @@ void StreamPeer::_bind_methods() { void StreamPeerBuffer::_bind_methods() { - ClassDB::bind_method(D_METHOD("seek", "pos"), &StreamPeerBuffer::seek); + ClassDB::bind_method(D_METHOD("seek", "position"), &StreamPeerBuffer::seek); ClassDB::bind_method(D_METHOD("get_size"), &StreamPeerBuffer::get_size); - ClassDB::bind_method(D_METHOD("get_pos"), &StreamPeerBuffer::get_pos); + ClassDB::bind_method(D_METHOD("get_position"), &StreamPeerBuffer::get_position); ClassDB::bind_method(D_METHOD("resize", "size"), &StreamPeerBuffer::resize); ClassDB::bind_method(D_METHOD("set_data_array", "data"), &StreamPeerBuffer::set_data_array); ClassDB::bind_method(D_METHOD("get_data_array"), &StreamPeerBuffer::get_data_array); @@ -484,7 +484,7 @@ int StreamPeerBuffer::get_size() const { return data.size(); } -int StreamPeerBuffer::get_pos() const { +int StreamPeerBuffer::get_position() const { return pointer; } diff --git a/core/io/stream_peer.h b/core/io/stream_peer.h index 1ee997c123c..b120d18501c 100644 --- a/core/io/stream_peer.h +++ b/core/io/stream_peer.h @@ -111,7 +111,7 @@ public: void seek(int p_pos); int get_size() const; - int get_pos() const; + int get_position() const; void resize(int p_size); void set_data_array(const PoolVector &p_data); diff --git a/core/io/xml_parser.cpp b/core/io/xml_parser.cpp index 3a4be7cd139..8ae68183d7c 100644 --- a/core/io/xml_parser.cpp +++ b/core/io/xml_parser.cpp @@ -369,7 +369,7 @@ void XMLParser::_bind_methods() { ClassDB::bind_method(D_METHOD("is_empty"), &XMLParser::is_empty); ClassDB::bind_method(D_METHOD("get_current_line"), &XMLParser::get_current_line); ClassDB::bind_method(D_METHOD("skip_section"), &XMLParser::skip_section); - ClassDB::bind_method(D_METHOD("seek", "pos"), &XMLParser::seek); + ClassDB::bind_method(D_METHOD("seek", "position"), &XMLParser::seek); ClassDB::bind_method(D_METHOD("open", "file"), &XMLParser::open); ClassDB::bind_method(D_METHOD("open_buffer", "buffer"), &XMLParser::open_buffer); diff --git a/core/io/zip_io.h b/core/io/zip_io.h index 8cf971ee08a..ce3c919b77d 100644 --- a/core/io/zip_io.h +++ b/core/io/zip_io.h @@ -72,7 +72,7 @@ static uLong zipio_write(voidpf opaque, voidpf stream, const void *buf, uLong si static long zipio_tell(voidpf opaque, voidpf stream) { FileAccess *f = *(FileAccess **)opaque; - return f->get_pos(); + return f->get_position(); }; static long zipio_seek(voidpf opaque, voidpf stream, uLong offset, int origin) { @@ -83,7 +83,7 @@ static long zipio_seek(voidpf opaque, voidpf stream, uLong offset, int origin) { switch (origin) { case ZLIB_FILEFUNC_SEEK_CUR: - pos = f->get_pos() + offset; + pos = f->get_position() + offset; break; case ZLIB_FILEFUNC_SEEK_END: pos = f->get_len() + offset; diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp index d1afcec18fd..4f80fb2491c 100644 --- a/core/math/a_star.cpp +++ b/core/math/a_star.cpp @@ -58,7 +58,7 @@ void AStar::add_point(int p_id, const Vector3 &p_pos, real_t p_weight_scale) { } } -Vector3 AStar::get_point_pos(int p_id) const { +Vector3 AStar::get_point_position(int p_id) const { ERR_FAIL_COND_V(!points.has(p_id), Vector3()); @@ -171,7 +171,7 @@ int AStar::get_closest_point(const Vector3 &p_point) const { return closest_id; } -Vector3 AStar::get_closest_pos_in_segment(const Vector3 &p_point) const { +Vector3 AStar::get_closest_position_in_segment(const Vector3 &p_point) const { real_t closest_dist = 1e20; bool found = false; @@ -412,8 +412,8 @@ PoolVector AStar::get_id_path(int p_from_id, int p_to_id) { void AStar::_bind_methods() { ClassDB::bind_method(D_METHOD("get_available_point_id"), &AStar::get_available_point_id); - ClassDB::bind_method(D_METHOD("add_point", "id", "pos", "weight_scale"), &AStar::add_point, DEFVAL(1.0)); - ClassDB::bind_method(D_METHOD("get_point_pos", "id"), &AStar::get_point_pos); + ClassDB::bind_method(D_METHOD("add_point", "id", "position", "weight_scale"), &AStar::add_point, DEFVAL(1.0)); + ClassDB::bind_method(D_METHOD("get_point_position", "id"), &AStar::get_point_position); ClassDB::bind_method(D_METHOD("get_point_weight_scale", "id"), &AStar::get_point_weight_scale); ClassDB::bind_method(D_METHOD("remove_point", "id"), &AStar::remove_point); ClassDB::bind_method(D_METHOD("has_point", "id"), &AStar::has_point); @@ -425,8 +425,8 @@ void AStar::_bind_methods() { ClassDB::bind_method(D_METHOD("clear"), &AStar::clear); - ClassDB::bind_method(D_METHOD("get_closest_point", "to_pos"), &AStar::get_closest_point); - ClassDB::bind_method(D_METHOD("get_closest_pos_in_segment", "to_pos"), &AStar::get_closest_pos_in_segment); + ClassDB::bind_method(D_METHOD("get_closest_point", "to_position"), &AStar::get_closest_point); + ClassDB::bind_method(D_METHOD("get_closest_position_in_segment", "to_position"), &AStar::get_closest_position_in_segment); ClassDB::bind_method(D_METHOD("get_point_path", "from_id", "to_id"), &AStar::get_point_path); ClassDB::bind_method(D_METHOD("get_id_path", "from_id", "to_id"), &AStar::get_id_path); diff --git a/core/math/a_star.h b/core/math/a_star.h index 38d13d510b3..2c1e2e2cf79 100644 --- a/core/math/a_star.h +++ b/core/math/a_star.h @@ -101,7 +101,7 @@ public: int get_available_point_id() const; void add_point(int p_id, const Vector3 &p_pos, real_t p_weight_scale = 1); - Vector3 get_point_pos(int p_id) const; + Vector3 get_point_position(int p_id) const; real_t get_point_weight_scale(int p_id) const; void remove_point(int p_id); bool has_point(int p_id) const; @@ -114,7 +114,7 @@ public: void clear(); int get_closest_point(const Vector3 &p_point) const; - Vector3 get_closest_pos_in_segment(const Vector3 &p_point) const; + Vector3 get_closest_position_in_segment(const Vector3 &p_point) const; PoolVector get_point_path(int p_from_id, int p_to_id); PoolVector get_id_path(int p_from_id, int p_to_id); diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp index 1437e7cdfc3..0875f78478b 100644 --- a/core/os/dir_access.cpp +++ b/core/os/dir_access.cpp @@ -312,7 +312,7 @@ Error DirAccess::copy(String p_from, String p_to, int chmod_flags) { } fsrc->seek_end(0); - int size = fsrc->get_pos(); + int size = fsrc->get_position(); fsrc->seek(0); err = OK; while (size--) { diff --git a/core/os/file_access.h b/core/os/file_access.h index 63692cb290a..34e7549fa3b 100644 --- a/core/os/file_access.h +++ b/core/os/file_access.h @@ -90,7 +90,7 @@ public: virtual void seek(size_t p_position) = 0; ///< seek to a given position virtual void seek_end(int64_t p_position = 0) = 0; ///< seek from the end of file - virtual size_t get_pos() const = 0; ///< get position in the file + virtual size_t get_position() const = 0; ///< get position in the file virtual size_t get_len() const = 0; ///< get size of the file virtual bool eof_reached() const = 0; ///< reading passed EOF diff --git a/core/os/input.cpp b/core/os/input.cpp index 65752662d70..a4b82299a77 100644 --- a/core/os/input.cpp +++ b/core/os/input.cpp @@ -80,7 +80,7 @@ void Input::_bind_methods() { ClassDB::bind_method(D_METHOD("get_mouse_button_mask"), &Input::get_mouse_button_mask); ClassDB::bind_method(D_METHOD("set_mouse_mode", "mode"), &Input::set_mouse_mode); ClassDB::bind_method(D_METHOD("get_mouse_mode"), &Input::get_mouse_mode); - ClassDB::bind_method(D_METHOD("warp_mouse_pos", "to"), &Input::warp_mouse_pos); + ClassDB::bind_method(D_METHOD("warp_mouse_position", "to"), &Input::warp_mouse_position); ClassDB::bind_method(D_METHOD("action_press", "action"), &Input::action_press); ClassDB::bind_method(D_METHOD("action_release", "action"), &Input::action_release); ClassDB::bind_method(D_METHOD("set_custom_mouse_cursor", "image", "hotspot"), &Input::set_custom_mouse_cursor, DEFVAL(Vector2())); diff --git a/core/os/input.h b/core/os/input.h index f98b97e647a..97d3bef4f94 100644 --- a/core/os/input.h +++ b/core/os/input.h @@ -81,7 +81,7 @@ public: virtual Point2 get_last_mouse_speed() const = 0; virtual int get_mouse_button_mask() const = 0; - virtual void warp_mouse_pos(const Vector2 &p_to) = 0; + virtual void warp_mouse_position(const Vector2 &p_to) = 0; virtual Point2i warp_mouse_motion(const Ref &p_motion, const Rect2 &p_rect) = 0; virtual Vector3 get_gravity() const = 0; diff --git a/core/os/input_event.cpp b/core/os/input_event.cpp index 88037859aa1..bef98ac3f2a 100644 --- a/core/os/input_event.cpp +++ b/core/os/input_event.cpp @@ -781,7 +781,7 @@ void InputEventScreenTouch::_bind_methods() { ClassDB::bind_method(D_METHOD("set_index", "index"), &InputEventScreenTouch::set_index); ClassDB::bind_method(D_METHOD("get_index"), &InputEventScreenTouch::get_index); - ClassDB::bind_method(D_METHOD("set_position", "pos"), &InputEventScreenTouch::set_position); + ClassDB::bind_method(D_METHOD("set_position", "position"), &InputEventScreenTouch::set_position); ClassDB::bind_method(D_METHOD("get_position"), &InputEventScreenTouch::get_position); ClassDB::bind_method(D_METHOD("set_pressed", "pressed"), &InputEventScreenTouch::set_pressed); diff --git a/core/os/os.h b/core/os/os.h index 2fc87e44a01..38bbbc0a575 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -156,7 +156,7 @@ public: virtual void set_mouse_mode(MouseMode p_mode); virtual MouseMode get_mouse_mode() const; - virtual void warp_mouse_pos(const Point2 &p_to) {} + virtual void warp_mouse_position(const Point2 &p_to) {} virtual Point2 get_mouse_position() const = 0; virtual int get_mouse_button_state() const = 0; virtual void set_window_title(const String &p_title) = 0; diff --git a/core/project_settings.cpp b/core/project_settings.cpp index 7ea0d563a61..14ebe87dc55 100644 --- a/core/project_settings.cpp +++ b/core/project_settings.cpp @@ -910,7 +910,7 @@ Variant ProjectSettings::property_get_revert(const String &p_name) { void ProjectSettings::_bind_methods() { ClassDB::bind_method(D_METHOD("has", "name"), &ProjectSettings::has); - ClassDB::bind_method(D_METHOD("set_order", "name", "pos"), &ProjectSettings::set_order); + ClassDB::bind_method(D_METHOD("set_order", "name", "position"), &ProjectSettings::set_order); ClassDB::bind_method(D_METHOD("get_order", "name"), &ProjectSettings::get_order); ClassDB::bind_method(D_METHOD("set_initial_value", "name", "value"), &ProjectSettings::set_initial_value); ClassDB::bind_method(D_METHOD("add_property_info", "hint"), &ProjectSettings::_add_property_info_bind); diff --git a/core/variant_call.cpp b/core/variant_call.cpp index 19d9b0297fc..72052809383 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -1394,7 +1394,7 @@ void register_variant_methods() { ADDFUNC2(STRING, STRING, String, format, NIL, "values", STRING, "placeholder", varray("{_}")); ADDFUNC2(STRING, STRING, String, replace, STRING, "what", STRING, "forwhat", varray()); ADDFUNC2(STRING, STRING, String, replacen, STRING, "what", STRING, "forwhat", varray()); - ADDFUNC2(STRING, STRING, String, insert, INT, "pos", STRING, "what", varray()); + ADDFUNC2(STRING, STRING, String, insert, INT, "position", STRING, "what", varray()); ADDFUNC0(STRING, STRING, String, capitalize, varray()); ADDFUNC2(STRING, POOL_STRING_ARRAY, String, split, STRING, "divisor", BOOL, "allow_empty", varray(true)); ADDFUNC2(STRING, POOL_REAL_ARRAY, String, split_floats, STRING, "divisor", BOOL, "allow_empty", varray(true)); @@ -1402,14 +1402,14 @@ void register_variant_methods() { ADDFUNC0(STRING, STRING, String, to_upper, varray()); ADDFUNC0(STRING, STRING, String, to_lower, varray()); - ADDFUNC1(STRING, STRING, String, left, INT, "pos", varray()); - ADDFUNC1(STRING, STRING, String, right, INT, "pos", varray()); + ADDFUNC1(STRING, STRING, String, left, INT, "position", varray()); + ADDFUNC1(STRING, STRING, String, right, INT, "position", varray()); ADDFUNC2(STRING, STRING, String, strip_edges, BOOL, "left", BOOL, "right", varray(true, true)); ADDFUNC0(STRING, STRING, String, get_extension, varray()); ADDFUNC0(STRING, STRING, String, get_basename, varray()); ADDFUNC1(STRING, STRING, String, plus_file, STRING, "file", varray()); ADDFUNC1(STRING, INT, String, ord_at, INT, "at", varray()); - ADDFUNC2(STRING, NIL, String, erase, INT, "pos", INT, "chars", varray()); + ADDFUNC2(STRING, NIL, String, erase, INT, "position", INT, "chars", varray()); ADDFUNC0(STRING, INT, String, hash, varray()); ADDFUNC0(STRING, STRING, String, md5_text, varray()); ADDFUNC0(STRING, STRING, String, sha256_text, varray()); @@ -1560,9 +1560,9 @@ void register_variant_methods() { ADDFUNC1(ARRAY, NIL, Array, push_back, NIL, "value", varray()); ADDFUNC1(ARRAY, NIL, Array, push_front, NIL, "value", varray()); ADDFUNC1(ARRAY, NIL, Array, append, NIL, "value", varray()); - ADDFUNC1(ARRAY, NIL, Array, resize, INT, "pos", varray()); - ADDFUNC2(ARRAY, NIL, Array, insert, INT, "pos", NIL, "value", varray()); - ADDFUNC1(ARRAY, NIL, Array, remove, INT, "pos", varray()); + ADDFUNC1(ARRAY, NIL, Array, resize, INT, "size", varray()); + ADDFUNC2(ARRAY, NIL, Array, insert, INT, "position", NIL, "value", varray()); + ADDFUNC1(ARRAY, NIL, Array, remove, INT, "position", varray()); ADDFUNC1(ARRAY, NIL, Array, erase, NIL, "value", varray()); ADDFUNC0(ARRAY, NIL, Array, front, varray()); ADDFUNC0(ARRAY, NIL, Array, back, varray()); @@ -1728,10 +1728,10 @@ void register_variant_methods() { _VariantCall::add_constructor(_VariantCall::Vector2_init1, Variant::VECTOR2, "x", Variant::REAL, "y", Variant::REAL); - _VariantCall::add_constructor(_VariantCall::Rect2_init1, Variant::RECT2, "pos", Variant::VECTOR2, "size", Variant::VECTOR2); + _VariantCall::add_constructor(_VariantCall::Rect2_init1, Variant::RECT2, "position", Variant::VECTOR2, "size", Variant::VECTOR2); _VariantCall::add_constructor(_VariantCall::Rect2_init2, Variant::RECT2, "x", Variant::REAL, "y", Variant::REAL, "width", Variant::REAL, "height", Variant::REAL); - _VariantCall::add_constructor(_VariantCall::Transform2D_init2, Variant::TRANSFORM2D, "rot", Variant::REAL, "pos", Variant::VECTOR2); + _VariantCall::add_constructor(_VariantCall::Transform2D_init2, Variant::TRANSFORM2D, "rotation", Variant::REAL, "position", Variant::VECTOR2); _VariantCall::add_constructor(_VariantCall::Transform2D_init3, Variant::TRANSFORM2D, "x_axis", Variant::VECTOR2, "y_axis", Variant::VECTOR2, "origin", Variant::VECTOR2); _VariantCall::add_constructor(_VariantCall::Vector3_init1, Variant::VECTOR3, "x", Variant::REAL, "y", Variant::REAL, "z", Variant::REAL); @@ -1746,7 +1746,7 @@ void register_variant_methods() { _VariantCall::add_constructor(_VariantCall::Color_init1, Variant::COLOR, "r", Variant::REAL, "g", Variant::REAL, "b", Variant::REAL, "a", Variant::REAL); _VariantCall::add_constructor(_VariantCall::Color_init2, Variant::COLOR, "r", Variant::REAL, "g", Variant::REAL, "b", Variant::REAL); - _VariantCall::add_constructor(_VariantCall::Rect3_init1, Variant::RECT3, "pos", Variant::VECTOR3, "size", Variant::VECTOR3); + _VariantCall::add_constructor(_VariantCall::Rect3_init1, Variant::RECT3, "position", Variant::VECTOR3, "size", Variant::VECTOR3); _VariantCall::add_constructor(_VariantCall::Basis_init1, Variant::BASIS, "x_axis", Variant::VECTOR3, "y_axis", Variant::VECTOR3, "z_axis", Variant::VECTOR3); _VariantCall::add_constructor(_VariantCall::Basis_init2, Variant::BASIS, "axis", Variant::VECTOR3, "phi", Variant::REAL); diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml index d94b8355bab..9b15afbbd40 100644 --- a/doc/classes/AStar.xml +++ b/doc/classes/AStar.xml @@ -39,7 +39,7 @@ - + @@ -113,19 +113,19 @@ - + - Returns the id of the closest point to [code]to_pos[/code]. Returns -1 if there are no points in the points pool. + Returns the id of the closest point to [code]to_position[/code]. Returns -1 if there are no points in the points pool. - + - + - Returns the closest position to [code]to_pos[/code] that resides inside a segment between two connected points. + Returns the closest position to [code]to_position[/code] that resides inside a segment between two connected points. [codeblock] var as = AStar.new() @@ -134,7 +134,7 @@ as.connect_points(1, 2) - var res = as.get_closest_pos_in_segment(Vector3(3,3,0)) # returns (0, 3, 0) + var res = as.get_closest_position_in_segment(Vector3(3,3,0)) # returns (0, 3, 0) [/codeblock] The result is in the segment that goes from [code]y=0[/code] to [code]y=5[/code]. It's the closest position in the segment to the given point. @@ -178,7 +178,7 @@ Returns an array with the points that are in the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path. - + diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index b80edb24daf..6cb4fd5b17a 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -17,7 +17,7 @@ - + Add a track to the Animation. The track type must be specified as any of the values in the TYPE_* enumeration. @@ -281,12 +281,12 @@ Remove a key by index in a given track. - + - + Remove a key by position (seconds) in a given track. diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index 746462380b2..74a7f6c8a44 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -129,7 +129,7 @@ Get the length (in seconds) of the currently being played animation. - + @@ -143,7 +143,7 @@ Return the default blend time between animations. - + @@ -245,7 +245,7 @@ - + diff --git a/doc/classes/AnimationTreePlayer.xml b/doc/classes/AnimationTreePlayer.xml index e128b4d865f..f088d21e410 100644 --- a/doc/classes/AnimationTreePlayer.xml +++ b/doc/classes/AnimationTreePlayer.xml @@ -271,7 +271,7 @@ Return the input source for a given node input. - + @@ -300,12 +300,12 @@ Rename a node in the graph. - + - + Sets position of a node in the graph given its name and position. @@ -531,7 +531,7 @@ - + Sets time seek value of a TimeSeek node given its name and value. diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 042dfb3e12f..f8337641418 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -168,7 +168,7 @@ - + @@ -206,14 +206,14 @@ - + Remove an element from the array by index. - + Resize the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are Null. diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml index dc30c0c5f9d..768987fd0b1 100644 --- a/doc/classes/AudioServer.xml +++ b/doc/classes/AudioServer.xml @@ -14,7 +14,7 @@ - + @@ -26,7 +26,7 @@ - + diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml index edf5dd619b8..2dba35bec00 100644 --- a/doc/classes/AudioStreamPlayer.xml +++ b/doc/classes/AudioStreamPlayer.xml @@ -23,7 +23,7 @@ - + @@ -56,16 +56,16 @@ - + - Plays the audio from the given position 'from_pos', in seconds. + Plays the audio from the given position 'from_position', in seconds. - + Sets the position from which audio will be played, in seconds. diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml index e31f2dd9415..68afffdb41d 100644 --- a/doc/classes/AudioStreamPlayer2D.xml +++ b/doc/classes/AudioStreamPlayer2D.xml @@ -36,7 +36,7 @@ - + @@ -69,16 +69,16 @@ - + - Plays the audio from the given position 'from_pos', in seconds. + Plays the audio from the given position 'from_position', in seconds. - + Sets the position from which audio will be played, in seconds. diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml index 3aad0ea87a6..1577c1e4d32 100644 --- a/doc/classes/AudioStreamPlayer3D.xml +++ b/doc/classes/AudioStreamPlayer3D.xml @@ -78,7 +78,7 @@ - + @@ -123,16 +123,16 @@ - + - Plays the audio from the given position 'from_pos', in seconds. + Plays the audio from the given position 'from_position', in seconds. - + Sets the position from which audio will be played, in seconds. diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml index 62b1c9ff4f4..d872d0892d8 100644 --- a/doc/classes/BitMap.xml +++ b/doc/classes/BitMap.xml @@ -32,7 +32,7 @@ - + Returns bitmap's value at the specified position. @@ -55,7 +55,7 @@ - + diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml index 659efa860db..b6b699612ef 100644 --- a/doc/classes/Camera2D.xml +++ b/doc/classes/Camera2D.xml @@ -38,7 +38,7 @@ - + diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 26a9e1519be..8fc2ff2bc2f 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -27,7 +27,7 @@ - + @@ -42,7 +42,7 @@ - + @@ -170,7 +170,7 @@ - + @@ -193,7 +193,7 @@ - + @@ -221,7 +221,7 @@ - + @@ -367,7 +367,7 @@ Get this item's light mask number. - + @@ -476,7 +476,7 @@ - + diff --git a/doc/classes/CollisionObject.xml b/doc/classes/CollisionObject.xml index 791978993c9..98023a58989 100644 --- a/doc/classes/CollisionObject.xml +++ b/doc/classes/CollisionObject.xml @@ -16,7 +16,7 @@ - + @@ -209,7 +209,7 @@ - + diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 5d77f3a4500..59c3bd30c7c 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -106,7 +106,7 @@ - + @@ -116,7 +116,7 @@ - + @@ -177,7 +177,7 @@ - + Return the cursor shape at a certain position in the control. @@ -199,7 +199,7 @@ - + @@ -390,7 +390,7 @@ - + Return the tooltip, which will appear when the cursor is resting over this control. @@ -596,7 +596,7 @@ - + Sets MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see [method set_margin]). @@ -646,7 +646,7 @@ - + Sets MARGIN_RIGHT and MARGIN_BOTTOM at the same time. This is a helper (see [method set_margin]). @@ -675,7 +675,7 @@ - + Move the Control to a new position, relative to the top-left corner of the [i]window[/i] Control, and without changing current anchor mode. (see [method set_margin]). @@ -729,7 +729,7 @@ - + Move the Control to a new position, relative to the top-left corner of the parent Control, changing all margins if needed and without changing current anchor mode. This is a helper (see [method set_margin]). @@ -826,7 +826,7 @@ - + diff --git a/doc/classes/Curve.xml b/doc/classes/Curve.xml index d676f635c99..ef43d9024c0 100644 --- a/doc/classes/Curve.xml +++ b/doc/classes/Curve.xml @@ -12,7 +12,7 @@ - + @@ -77,7 +77,7 @@ - + diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml index ccf6101829b..4362887be3b 100644 --- a/doc/classes/Curve2D.xml +++ b/doc/classes/Curve2D.xml @@ -15,17 +15,17 @@ - + - + - Adds a point to a curve, at position "pos", with control points "in" and "out". - If "atpos" is given, the point is inserted before the point number "atpos", moving that point (and every point after) after the inserted point. If "atpos" is not given, or is an illegal value (atpos <0 or atpos >= [method get_point_count]), the point will be appended at the end of the point list. + Adds a point to a curve, at "position", with control points "in" and "out". + If "at_position" is given, the point is inserted before the point number "at_position", moving that point (and every point after) after the inserted point. If "at_position" is not given, or is an illegal value (at_position <0 or at_position >= [method get_point_count]), the point will be appended at the end of the point list. @@ -80,7 +80,7 @@ Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0). - + @@ -146,7 +146,7 @@ - + Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console. @@ -157,18 +157,18 @@ - + Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console. - + - + Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console. diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml index 8ea0e04b143..02299753cf2 100644 --- a/doc/classes/Curve3D.xml +++ b/doc/classes/Curve3D.xml @@ -15,17 +15,17 @@ - + - + - Adds a point to a curve, at position "pos", with control points "in" and "out". - If "atpos" is given, the point is inserted before the point number "atpos", moving that point (and every point after) after the inserted point. If "atpos" is not given, or is an illegal value (atpos <0 or atpos >= [method get_point_count]), the point will be appended at the end of the point list. + Adds a point to a curve, at "position", with control points "in" and "out". + If "at_position" is given, the point is inserted before the point number "at_position", moving that point (and every point after) after the inserted point. If "at_position" is not given, or is an illegal value (at_position <0 or at_position >= [method get_point_count]), the point will be appended at the end of the point list. @@ -87,7 +87,7 @@ Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0). - + @@ -162,7 +162,7 @@ - + Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console. @@ -173,18 +173,18 @@ - + Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console. - + - + Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console. diff --git a/doc/classes/File.xml b/doc/classes/File.xml index 4e73cd8ae26..e1a024270e6 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -168,7 +168,7 @@ Get a [String] saved in Pascal format from the file. - + @@ -258,7 +258,7 @@ - + Change the file reading/writing cursor to the specified position (in bytes from the beginning of the file). @@ -267,7 +267,7 @@ - + Change the file reading/writing cursor to the specified position (in bytes from the end of the file). Note that this is an offset, so you should use negative numbers or the cursor will be at the end of the file. diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml index 420756975ff..2e2124cbd69 100644 --- a/doc/classes/Font.xml +++ b/doc/classes/Font.xml @@ -16,7 +16,7 @@ - + @@ -25,7 +25,7 @@ - Draw "string" into a canvas item using the font at a given "pos" position, with "modulate" color, and optionally clipping the width. "pos" specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. + Draw "string" into a canvas item using the font at a given position, with "modulate" color, and optionally clipping the width. "position" specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. @@ -33,7 +33,7 @@ - + @@ -42,7 +42,7 @@ - Draw character "char" into a canvas item using the font at a given "pos" position, with "modulate" color, and optionally kerning if "next" is passed. clipping the width. "pos" specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. The width used by the character is returned, making this function useful for drawing strings character by character. + Draw character "char" into a canvas item using the font at a given position, with "modulate" color, and optionally kerning if "next" is passed. clipping the width. "position" specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. The width used by the character is returned, making this function useful for drawing strings character by character. diff --git a/doc/classes/Geometry.xml b/doc/classes/Geometry.xml index 6c301cb9280..49f32bc68fd 100644 --- a/doc/classes/Geometry.xml +++ b/doc/classes/Geometry.xml @@ -176,7 +176,7 @@ - + @@ -230,9 +230,9 @@ - + - + diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index bd594033ee2..c9771f1ada0 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -177,7 +177,7 @@ - + @@ -230,7 +230,7 @@ - + diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index de1d9c1194a..e2303908822 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -43,7 +43,7 @@ Return the number of enabled input slots (connections) to the GraphNode. - + @@ -77,7 +77,7 @@ Return the number of enabled output slots (connections) of the GraphNode. - + diff --git a/doc/classes/ImmediateGeometry.xml b/doc/classes/ImmediateGeometry.xml index 7b45c0c6781..b12f9c99a99 100644 --- a/doc/classes/ImmediateGeometry.xml +++ b/doc/classes/ImmediateGeometry.xml @@ -28,7 +28,7 @@ - + Add a vertex with the currently set color/uv/etc. diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index f636000242f..3d8b4154f89 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -298,7 +298,7 @@ Stops the vibration of the joypad. - + diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml index 97c35373640..48c5626f143 100644 --- a/doc/classes/InputEventScreenTouch.xml +++ b/doc/classes/InputEventScreenTouch.xml @@ -33,7 +33,7 @@ - + diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index 3423b8fb9c0..a8d879888f3 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -85,10 +85,10 @@ - + - + @@ -490,7 +490,7 @@ - + Fired when specified list item has been selected via right mouse clicking. diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml index 81fd2557817..e6e615ccf15 100644 --- a/doc/classes/Line2D.xml +++ b/doc/classes/Line2D.xml @@ -14,7 +14,7 @@ - + Add a point at the x/y position in the supplied [Vector2] @@ -56,7 +56,7 @@ - + @@ -149,12 +149,12 @@ - + - + diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index 0577e1ba37e..e6c26e32480 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -66,7 +66,7 @@ Return the align mode of the [LineEdit]. - + @@ -169,10 +169,10 @@ Set text alignment of the [LineEdit]. - + - + Set the cursor position inside the [LineEdit], causing it to scroll if needed. diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 5a99263f1ec..e35f64a9c0c 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -441,7 +441,7 @@ - + Move a child node to a different position (order) amongst the other children. Since calls, signals, etc are performed by tree order, changing the order of children nodes may be useful. diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml index 2ba312b301d..084bee92dfb 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -169,7 +169,7 @@ - + Set the node's global position. @@ -214,7 +214,7 @@ - + Set the node's position. diff --git a/doc/classes/Physics2DDirectBodyState.xml b/doc/classes/Physics2DDirectBodyState.xml index 9b6fe69b4a1..cc68aaab1f4 100644 --- a/doc/classes/Physics2DDirectBodyState.xml +++ b/doc/classes/Physics2DDirectBodyState.xml @@ -45,7 +45,7 @@ Return the collider object, this depends on how it was created (will return a scene node if such was used to create it). - + @@ -72,7 +72,7 @@ Return the metadata of the collided shape. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data]. - + @@ -97,7 +97,7 @@ Return the local normal (of this body) of the contact point. - + diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml index ab63089691e..fd093edc840 100644 --- a/doc/classes/Physics2DServer.xml +++ b/doc/classes/Physics2DServer.xml @@ -306,7 +306,7 @@ - + diff --git a/doc/classes/PhysicsDirectBodyState.xml b/doc/classes/PhysicsDirectBodyState.xml index de51d0e958e..349b7e7c3f6 100644 --- a/doc/classes/PhysicsDirectBodyState.xml +++ b/doc/classes/PhysicsDirectBodyState.xml @@ -14,7 +14,7 @@ - + @@ -22,7 +22,7 @@ - + @@ -73,7 +73,7 @@ - + @@ -89,7 +89,7 @@ - + @@ -111,7 +111,7 @@ - + diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml index 0076625ebd5..145f5a01636 100644 --- a/doc/classes/PhysicsServer.xml +++ b/doc/classes/PhysicsServer.xml @@ -268,7 +268,7 @@ - + diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index bec9525a452..1a3ea5c5c76 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -147,7 +147,7 @@ - + Set the order of a configuration value (influences when saved to the config file). diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml index 1a467861b3f..80f7830a161 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -14,7 +14,7 @@ - + diff --git a/doc/classes/Rect3.xml b/doc/classes/Rect3.xml index 8837b8f8129..f41665db341 100644 --- a/doc/classes/Rect3.xml +++ b/doc/classes/Rect3.xml @@ -14,7 +14,7 @@ - + diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml index 8347597dafd..76a93248fb2 100644 --- a/doc/classes/RigidBody.xml +++ b/doc/classes/RigidBody.xml @@ -27,7 +27,7 @@ - + diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml index e43e4dcc1b8..54eb82fbffc 100644 --- a/doc/classes/Spatial.xml +++ b/doc/classes/Spatial.xml @@ -145,10 +145,10 @@ Rotates itself to point into direction of target position. Operations take place in global space. - + - + diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml index 1c5669b898f..f4a8eeabe44 100644 --- a/doc/classes/SpriteFrames.xml +++ b/doc/classes/SpriteFrames.xml @@ -26,7 +26,7 @@ - + diff --git a/doc/classes/StreamPeerBuffer.xml b/doc/classes/StreamPeerBuffer.xml index 70a4c781c95..141d46564c7 100644 --- a/doc/classes/StreamPeerBuffer.xml +++ b/doc/classes/StreamPeerBuffer.xml @@ -27,7 +27,7 @@ - + @@ -50,7 +50,7 @@ - + diff --git a/doc/classes/String.xml b/doc/classes/String.xml index ce3dc1db2f9..c7c19997b9c 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -266,12 +266,12 @@ - + - Erase [code]chars[/code] characters from the string starting from [code]pos[/code]. + Erase [code]chars[/code] characters from the string starting from [code]position[/code]. @@ -360,7 +360,7 @@ - + @@ -445,7 +445,7 @@ - + Return an amount of characters from the left of the string. @@ -596,7 +596,7 @@ - + Return the right side of the string from a given position. diff --git a/doc/classes/Texture.xml b/doc/classes/Texture.xml index d09236bbc99..cbf72eb9916 100644 --- a/doc/classes/Texture.xml +++ b/doc/classes/Texture.xml @@ -16,7 +16,7 @@ - + diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index e1a6c0b523a..c44fa500cd7 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -39,7 +39,7 @@ - + Return the tile index of the cell referenced by a Vector2. @@ -222,7 +222,7 @@ - + @@ -264,7 +264,7 @@ - + @@ -442,7 +442,7 @@ - + Return the tilemap (grid-based) coordinates corresponding to the absolute world position given as an argument. diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index 4cbe9123f14..a90013f9220 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -38,7 +38,7 @@ - + Constructs the [Transform2D] from rotation angle in radians and position [Vector2]. diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index a92a51049bb..82e85126cc5 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -65,10 +65,10 @@ Get whether a right click can select items. - + - + Get the column index under the given point. @@ -113,10 +113,10 @@ Get the flags of the current drop mode. - + - + @@ -146,10 +146,10 @@ Get the rectangle area of the the specified item. If column is specified, only get the position and size of that column, otherwise get the rectangle containing all columns. - + - + Get the tree item at the specified position (relative to the tree origin position). @@ -342,7 +342,7 @@ - + Emitted when the right mouse button is pressed if RMB selection is active and the tree is empty. @@ -378,7 +378,7 @@ - + Emitted when an item is selected with right mouse button. diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index 790a82a60a0..d291f44de30 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -8,7 +8,7 @@ Because it is easy to get it wrong, here is a quick usage example: [codeblock] var tween = get_node("Tween") - tween.interpolate_property(get_node("Node2D_to_move"), "transform/pos", Vector2(0,0), Vector2(100,100), 1, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) + tween.interpolate_property(get_node("Node2D_to_move"), "transform/origin", Vector2(0,0), Vector2(100,100), 1, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) tween.start() [/codeblock] Some of the methods of this class require a property name. You can get the property name by hovering over the property in the inspector of the editor. diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml index 7994c1b65ac..57e417974e7 100644 --- a/doc/classes/VideoPlayer.xml +++ b/doc/classes/VideoPlayer.xml @@ -39,7 +39,7 @@ Get the name of the video stream. - + diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index a5170b8d03a..2cf36ba69bb 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -528,7 +528,7 @@ - + Warp the mouse to a position, relative to the viewport. diff --git a/doc/classes/VisualScript.xml b/doc/classes/VisualScript.xml index 0875aafcfff..6473b074d39 100644 --- a/doc/classes/VisualScript.xml +++ b/doc/classes/VisualScript.xml @@ -34,7 +34,7 @@ - + @@ -197,7 +197,7 @@ - + @@ -405,14 +405,14 @@ - + - + diff --git a/doc/classes/XMLParser.xml b/doc/classes/XMLParser.xml index 6ab84ef3450..bb9599e273d 100644 --- a/doc/classes/XMLParser.xml +++ b/doc/classes/XMLParser.xml @@ -133,7 +133,7 @@ - + Move the buffer cursor to a certain offset (since the beginning) and read the next node there. This returns an error code. diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp index e19bc738cb0..649f874cf4f 100644 --- a/drivers/unix/file_access_unix.cpp +++ b/drivers/unix/file_access_unix.cpp @@ -168,7 +168,7 @@ void FileAccessUnix::seek_end(int64_t p_position) { check_errors(); } -size_t FileAccessUnix::get_pos() const { +size_t FileAccessUnix::get_position() const { ERR_FAIL_COND_V(!f, 0); diff --git a/drivers/unix/file_access_unix.h b/drivers/unix/file_access_unix.h index c5ab8821be3..e2848e41282 100644 --- a/drivers/unix/file_access_unix.h +++ b/drivers/unix/file_access_unix.h @@ -62,7 +62,7 @@ public: virtual void seek(size_t p_position); ///< seek to a given position virtual void seek_end(int64_t p_position = 0); ///< seek from the end of file - virtual size_t get_pos() const; ///< get position in the file + virtual size_t get_position() const; ///< get position in the file virtual size_t get_len() const; ///< get size of the file virtual bool eof_reached() const; ///< reading passed EOF diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp index fe2069089c0..d128b582446 100644 --- a/drivers/windows/file_access_windows.cpp +++ b/drivers/windows/file_access_windows.cpp @@ -156,7 +156,7 @@ void FileAccessWindows::seek_end(int64_t p_position) { if (fseek(f, p_position, SEEK_END)) check_errors(); } -size_t FileAccessWindows::get_pos() const { +size_t FileAccessWindows::get_position() const { size_t aux_position = 0; aux_position = ftell(f); @@ -169,9 +169,9 @@ size_t FileAccessWindows::get_len() const { ERR_FAIL_COND_V(!f, 0); - size_t pos = get_pos(); + size_t pos = get_position(); fseek(f, 0, SEEK_END); - int size = get_pos(); + int size = get_position(); fseek(f, pos, SEEK_SET); return size; diff --git a/drivers/windows/file_access_windows.h b/drivers/windows/file_access_windows.h index 6956e7855a9..15cbdca7394 100644 --- a/drivers/windows/file_access_windows.h +++ b/drivers/windows/file_access_windows.h @@ -54,7 +54,7 @@ public: virtual void seek(size_t p_position); ///< seek to a given position virtual void seek_end(int64_t p_position = 0); ///< seek from the end of file - virtual size_t get_pos() const; ///< get position in the file + virtual size_t get_position() const; ///< get position in the file virtual size_t get_len() const; ///< get size of the file virtual bool eof_reached() const; ///< reading passed EOF diff --git a/editor/animation_editor.cpp b/editor/animation_editor.cpp index 96e5627bef1..2965003645a 100644 --- a/editor/animation_editor.cpp +++ b/editor/animation_editor.cpp @@ -322,7 +322,7 @@ public: undo_redo->add_do_method(animation.ptr(), "track_remove_key", track, key); undo_redo->add_do_method(animation.ptr(), "track_insert_key", track, new_time, val, trans); undo_redo->add_do_method(this, "_key_ofs_changed", animation, key_ofs, new_time); - undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_pos", track, new_time); + undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_position", track, new_time); undo_redo->add_undo_method(animation.ptr(), "track_insert_key", track, key_ofs, val, trans); undo_redo->add_undo_method(this, "_key_ofs_changed", animation, new_time, key_ofs); @@ -563,8 +563,8 @@ public: case Animation::TYPE_TRANSFORM: { - p_list->push_back(PropertyInfo(Variant::VECTOR3, "loc")); - p_list->push_back(PropertyInfo(Variant::QUAT, "rot")); + p_list->push_back(PropertyInfo(Variant::VECTOR3, "location")); + p_list->push_back(PropertyInfo(Variant::QUAT, "rotation")); p_list->push_back(PropertyInfo(Variant::VECTOR3, "scale")); } break; @@ -719,7 +719,7 @@ void AnimationKeyEditor::_anim_duplicate_keys(bool transpose) { int existing_idx = animation->track_find_key(dst_track, dst_time, true); undo_redo->add_do_method(animation.ptr(), "track_insert_key", dst_track, dst_time, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key)); - undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_pos", dst_track, dst_time); + undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_position", dst_track, dst_time); Pair p; p.first = dst_track; @@ -1016,7 +1016,7 @@ float AnimationKeyEditor::_get_zoom_scale() const { } } -void AnimationKeyEditor::_track_pos_draw() { +void AnimationKeyEditor::_track_position_draw() { if (!animation.is_valid()) { return; @@ -2301,8 +2301,8 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref &p_input) if (tt == Animation::TYPE_TRANSFORM) { Dictionary d; - d["loc"] = Vector3(); - d["rot"] = Quat(); + d["location"] = Vector3(); + d["rotation"] = Quat(); d["scale"] = Vector3(); newval = d; @@ -2337,7 +2337,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref &p_input) undo_redo->create_action(TTR("Anim Add Key")); undo_redo->add_do_method(animation.ptr(), "track_insert_key", idx, pos, newval, 1); - undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_pos", idx, pos); + undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_position", idx, pos); if (existing != -1) { Variant v = animation->track_get_key_value(idx, existing); @@ -2506,7 +2506,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref &p_input) if (selection.has(sk)) continue; //already in selection, don't save - undo_redo->add_do_method(animation.ptr(), "track_remove_key_at_pos", E->key().track, newtime); + undo_redo->add_do_method(animation.ptr(), "track_remove_key_at_position", E->key().track, newtime); _AnimMoveRestore amr; amr.key = animation->track_get_key_value(E->key().track, idx); @@ -2536,7 +2536,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref &p_input) if (newpos<0) continue; //no remove what no inserted */ - undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_pos", E->key().track, newpos); + undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_position", E->key().track, newpos); } // 5-(undo) reinsert keys @@ -2753,10 +2753,10 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref &p_input) case Animation::TYPE_TRANSFORM: { Dictionary d = animation->track_get_key_value(idx, mouse_over.over_key); - if (d.has("loc")) - text += "loc: " + String(d["loc"]) + "\n"; - if (d.has("rot")) - text += "rot: " + String(d["rot"]) + "\n"; + if (d.has("location")) + text += "location: " + String(d["location"]) + "\n"; + if (d.has("rotation")) + text += "rot: " + String(d["rotation"]) + "\n"; if (d.has("scale")) text += "scale: " + String(d["scale"]) + "\n"; } break; @@ -3359,9 +3359,9 @@ int AnimationKeyEditor::_confirm_insert(InsertData p_id, int p_last_track) { Transform tr = p_id.value; Dictionary d; - d["loc"] = tr.origin; + d["location"] = tr.origin; d["scale"] = tr.basis.get_scale(); - d["rot"] = Quat(tr.basis); //.orthonormalized(); + d["rotation"] = Quat(tr.basis); //.orthonormalized(); value = d; } break; default: {} @@ -3376,7 +3376,7 @@ int AnimationKeyEditor::_confirm_insert(InsertData p_id, int p_last_track) { p_last_track++; } else { - undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_pos", p_id.track_idx, time); + undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_position", p_id.track_idx, time); int existing = animation->track_find_key(p_id.track_idx, time, true); if (existing != -1) { Variant v = animation->track_get_key_value(p_id.track_idx, existing); @@ -3451,7 +3451,7 @@ void AnimationKeyEditor::_create_value_item(int p_type) { Variant::CallError ce; Variant v = Variant::construct(Variant::Type(p_type), NULL, 0, ce); undo_redo->add_do_method(animation.ptr(), "track_insert_key", cvi_track, cvi_pos, v); - undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_pos", cvi_track, cvi_pos); + undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_position", cvi_track, cvi_pos); int existing = animation->track_find_key(cvi_track, cvi_pos, true); @@ -3586,7 +3586,7 @@ void AnimationKeyEditor::_scale() { if (selection.has(sk)) continue; //already in selection, don't save - undo_redo->add_do_method(animation.ptr(), "track_remove_key_at_pos", E->key().track, newtime); + undo_redo->add_do_method(animation.ptr(), "track_remove_key_at_position", E->key().track, newtime); _AnimMoveRestore amr; amr.key = animation->track_get_key_value(E->key().track, idx); @@ -3609,7 +3609,7 @@ void AnimationKeyEditor::_scale() { for (Map::Element *E = selection.back(); E; E = E->prev()) { float newpos = _NEW_POS(E->get().pos); - undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_pos", E->key().track, newpos); + undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_position", E->key().track, newpos); } // 5-(undo) reinsert keys @@ -3696,7 +3696,7 @@ void AnimationKeyEditor::_bind_methods() { ClassDB::bind_method(D_METHOD("_menu_track"), &AnimationKeyEditor::_menu_track); ClassDB::bind_method(D_METHOD("_clear_selection_for_anim"), &AnimationKeyEditor::_clear_selection_for_anim); ClassDB::bind_method(D_METHOD("_select_at_anim"), &AnimationKeyEditor::_select_at_anim); - ClassDB::bind_method(D_METHOD("_track_pos_draw"), &AnimationKeyEditor::_track_pos_draw); + ClassDB::bind_method(D_METHOD("_track_position_draw"), &AnimationKeyEditor::_track_position_draw); ClassDB::bind_method(D_METHOD("_insert_delay"), &AnimationKeyEditor::_insert_delay); ClassDB::bind_method(D_METHOD("_step_changed"), &AnimationKeyEditor::_step_changed); @@ -3715,7 +3715,7 @@ void AnimationKeyEditor::_bind_methods() { ADD_SIGNAL(MethodInfo("resource_selected", PropertyInfo(Variant::OBJECT, "res"), PropertyInfo(Variant::STRING, "prop"))); ADD_SIGNAL(MethodInfo("keying_changed")); - ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::REAL, "pos"), PropertyInfo(Variant::BOOL, "drag"))); + ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::REAL, "position"), PropertyInfo(Variant::BOOL, "drag"))); ADD_SIGNAL(MethodInfo("animation_len_changed", PropertyInfo(Variant::REAL, "len"))); ADD_SIGNAL(MethodInfo("animation_step_changed", PropertyInfo(Variant::REAL, "step"))); ADD_SIGNAL(MethodInfo("key_edited", PropertyInfo(Variant::INT, "track"), PropertyInfo(Variant::INT, "key"))); @@ -3915,7 +3915,7 @@ AnimationKeyEditor::AnimationKeyEditor() { track_pos->set_area_as_parent_rect(); track_pos->set_mouse_filter(MOUSE_FILTER_IGNORE); track_editor->add_child(track_pos); - track_pos->connect("draw", this, "_track_pos_draw"); + track_pos->connect("draw", this, "_track_position_draw"); select_anim_warning = memnew(Label); track_editor->add_child(select_anim_warning); diff --git a/editor/animation_editor.h b/editor/animation_editor.h index c16072502bc..8a89dc1a1c1 100644 --- a/editor/animation_editor.h +++ b/editor/animation_editor.h @@ -273,7 +273,7 @@ class AnimationKeyEditor : public VBoxContainer { void _track_editor_draw(); void _track_editor_gui_input(const Ref &p_input); - void _track_pos_draw(); + void _track_position_draw(); void _track_name_changed(const String &p_name); void _track_menu_selected(int p_idx); diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 8cc117d2873..0e77d2097e9 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -367,7 +367,7 @@ void FindReplaceBar::_show_search() { if (!get_search_text().empty()) { search_text->select_all(); - search_text->set_cursor_pos(search_text->get_text().length()); + search_text->set_cursor_position(search_text->get_text().length()); search_current(); } } diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index 33734957e26..bb5f5e91751 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -513,7 +513,7 @@ void CreateDialog::_favorite_activated() { Variant CreateDialog::get_drag_data_fw(const Point2 &p_point, Control *p_from) { - TreeItem *ti = favorites->get_item_at_pos(p_point); + TreeItem *ti = favorites->get_item_at_position(p_point); if (ti) { Dictionary d; d["type"] = "create_favorite_drag"; @@ -544,12 +544,12 @@ void CreateDialog::drop_data_fw(const Point2 &p_point, const Variant &p_data, Co Dictionary d = p_data; - TreeItem *ti = favorites->get_item_at_pos(p_point); + TreeItem *ti = favorites->get_item_at_position(p_point); if (!ti) return; String drop_at = ti->get_text(0); - int ds = favorites->get_drop_section_at_pos(p_point); + int ds = favorites->get_drop_section_at_position(p_point); int drop_idx = favorite_list.find(drop_at); if (drop_idx < 0) diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index a36faeb0de1..b74bd3ab431 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -459,7 +459,7 @@ void EditorAudioBus::drop_data(const Point2 &p_point, const Variant &p_data) { Variant EditorAudioBus::get_drag_data_fw(const Point2 &p_point, Control *p_from) { print_line("drag fw"); - TreeItem *item = effects->get_item_at_pos(p_point); + TreeItem *item = effects->get_item_at_position(p_point); if (!item) { print_line("no item"); return Variant(); @@ -489,7 +489,7 @@ bool EditorAudioBus::can_drop_data_fw(const Point2 &p_point, const Variant &p_da if (!d.has("type") || String(d["type"]) != "audio_bus_effect") return false; - TreeItem *item = effects->get_item_at_pos(p_point); + TreeItem *item = effects->get_item_at_position(p_point); if (!item) return false; @@ -502,10 +502,10 @@ void EditorAudioBus::drop_data_fw(const Point2 &p_point, const Variant &p_data, Dictionary d = p_data; - TreeItem *item = effects->get_item_at_pos(p_point); + TreeItem *item = effects->get_item_at_position(p_point); if (!item) return; - int pos = effects->get_drop_section_at_pos(p_point); + int pos = effects->get_drop_section_at_position(p_point); Variant md = item->get_metadata(0); int paste_at; diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp index 82a7fa734a7..ee537f4228e 100644 --- a/editor/editor_autoload_settings.cpp +++ b/editor/editor_autoload_settings.cpp @@ -419,12 +419,12 @@ bool EditorAutoloadSettings::can_drop_data_fw(const Point2 &p_point, const Varia return false; if (drop_data.has("type")) { - TreeItem *ti = tree->get_item_at_pos(p_point); + TreeItem *ti = tree->get_item_at_position(p_point); if (!ti) return false; - int section = tree->get_drop_section_at_pos(p_point); + int section = tree->get_drop_section_at_position(p_point); if (section < -1) return false; @@ -437,12 +437,12 @@ bool EditorAutoloadSettings::can_drop_data_fw(const Point2 &p_point, const Varia void EditorAutoloadSettings::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_control) { - TreeItem *ti = tree->get_item_at_pos(p_point); + TreeItem *ti = tree->get_item_at_position(p_point); if (!ti) return; - int section = tree->get_drop_section_at_pos(p_point); + int section = tree->get_drop_section_at_position(p_point); if (section < -1) return; diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index ad9bc4a6624..4caf2641fcb 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -278,7 +278,7 @@ Error EditorExportPlatform::_save_pack_file(void *p_userdata, const String &p_pa SavedData sd; sd.path_utf8 = p_path.utf8(); - sd.ofs = pd->f->get_pos(); + sd.ofs = pd->f->get_position(); sd.size = p_data.size(); pd->f->store_buffer(p_data.ptr(), p_data.size()); @@ -736,7 +736,7 @@ Error EditorExportPlatform::save_pack(const Ref &p_preset, c f->store_32(pd.file_ofs.size()); //amount of files - size_t header_size = f->get_pos(); + size_t header_size = f->get_position(); //precalculate header size diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 526a8fe8109..5f9f109a2e6 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -1258,11 +1258,11 @@ bool FileSystemDock::can_drop_data_fw(const Point2 &p_point, const Variant &p_da if (drag_data.has("type") && String(drag_data["type"]) == "favorite") { //moving favorite around - TreeItem *ti = tree->get_item_at_pos(p_point); + TreeItem *ti = tree->get_item_at_position(p_point); if (!ti) return false; - int what = tree->get_drop_section_at_pos(p_point); + int what = tree->get_drop_section_at_position(p_point); if (ti == tree->get_root()->get_children()) { return (what == 1); //the parent, first fav @@ -1288,7 +1288,7 @@ bool FileSystemDock::can_drop_data_fw(const Point2 &p_point, const Variant &p_da if (p_from == files) { - int at_pos = files->get_item_at_pos(p_point); + int at_pos = files->get_item_at_position(p_point); if (at_pos != -1) { String dir = files->get_item_metadata(at_pos); @@ -1299,7 +1299,7 @@ bool FileSystemDock::can_drop_data_fw(const Point2 &p_point, const Variant &p_da if (p_from == tree) { - TreeItem *ti = tree->get_item_at_pos(p_point); + TreeItem *ti = tree->get_item_at_position(p_point); if (!ti) return false; String path = ti->get_metadata(0); @@ -1323,7 +1323,7 @@ void FileSystemDock::drop_data_fw(const Point2 &p_point, const Variant &p_data, if (drag_data.has("type") && String(drag_data["type"]) == "favorite") { //moving favorite around - TreeItem *ti = tree->get_item_at_pos(p_point); + TreeItem *ti = tree->get_item_at_position(p_point); if (!ti) return; @@ -1336,7 +1336,7 @@ void FileSystemDock::drop_data_fw(const Point2 &p_point, const Variant &p_data, swap = swap.substr(0, swap.length() - 1); } - int what = tree->get_drop_section_at_pos(p_point); + int what = tree->get_drop_section_at_position(p_point); TreeItem *swap_item = NULL; @@ -1391,7 +1391,7 @@ void FileSystemDock::drop_data_fw(const Point2 &p_point, const Variant &p_data, if (p_from == tree) { - TreeItem *ti = tree->get_item_at_pos(p_point); + TreeItem *ti = tree->get_item_at_position(p_point); if (!ti) return; String path = ti->get_metadata(0); @@ -1406,7 +1406,7 @@ void FileSystemDock::drop_data_fw(const Point2 &p_point, const Variant &p_data, if (p_from == files) { String save_path = path; - int at_pos = files->get_item_at_pos(p_point); + int at_pos = files->get_item_at_position(p_point); if (at_pos != -1) { String to_dir = files->get_item_metadata(at_pos); if (to_dir.ends_with("/")) { @@ -1429,11 +1429,11 @@ void FileSystemDock::drop_data_fw(const Point2 &p_point, const Variant &p_data, if (p_from == files) { - int at_pos = files->get_item_at_pos(p_point); + int at_pos = files->get_item_at_position(p_point); ERR_FAIL_COND(at_pos == -1); to_dir = files->get_item_metadata(at_pos); } else { - TreeItem *ti = tree->get_item_at_pos(p_point); + TreeItem *ti = tree->get_item_at_position(p_point); if (!ti) return; to_dir = ti->get_metadata(0); diff --git a/editor/import/resource_importer_wav.cpp b/editor/import/resource_importer_wav.cpp index 025dbbaacf6..bd15ed535ba 100644 --- a/editor/import/resource_importer_wav.cpp +++ b/editor/import/resource_importer_wav.cpp @@ -141,7 +141,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s /* chunk size */ uint32_t chunksize = file->get_32(); - uint32_t file_pos = file->get_pos(); //save file pos, so we can skip to next chunk safely + uint32_t file_pos = file->get_position(); //save file pos, so we can skip to next chunk safely if (file->eof_reached()) { diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index c8db1763abf..de905d80ef7 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -76,14 +76,14 @@ void AnimationPlayerEditor::_notification(int p_what) { } } } - frame->set_value(player->get_current_animation_pos()); - key_editor->set_anim_pos(player->get_current_animation_pos()); + frame->set_value(player->get_current_animation_position()); + key_editor->set_anim_pos(player->get_current_animation_position()); EditorNode::get_singleton()->get_property_editor()->refresh(); } else if (last_active) { //need the last frame after it stopped - frame->set_value(player->get_current_animation_pos()); + frame->set_value(player->get_current_animation_position()); } last_active = player->is_playing(); @@ -197,7 +197,7 @@ void AnimationPlayerEditor::_play_from_pressed() { if (current != "") { - float time = player->get_current_animation_pos(); + float time = player->get_current_animation_position(); if (current == player->get_current_animation() && player->is_playing()) { @@ -245,7 +245,7 @@ void AnimationPlayerEditor::_play_bw_from_pressed() { if (current != "") { - float time = player->get_current_animation_pos(); + float time = player->get_current_animation_position(); if (current == player->get_current_animation()) player->stop(); //so it wont blend with itself @@ -944,7 +944,7 @@ void AnimationPlayerEditor::_seek_value_changed(float p_value, bool p_set) { } if (player->is_valid() && !p_set) { - float cpos = player->get_current_animation_pos(); + float cpos = player->get_current_animation_position(); player->seek_delta(pos, pos - cpos); } else { diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp index 414b091475a..4dd877a6eec 100644 --- a/editor/plugins/animation_tree_editor_plugin.cpp +++ b/editor/plugins/animation_tree_editor_plugin.cpp @@ -63,7 +63,7 @@ Size2 AnimationTreeEditor::_get_maximum_size() { for (List::Element *E = order.front(); E; E = E->next()) { - Point2 pos = anim_tree->node_get_pos(E->get()); + Point2 pos = anim_tree->node_get_position(E->get()); if (click_type == CLICK_NODE && click_node == E->get()) { @@ -257,7 +257,7 @@ void AnimationTreeEditor::_popup_edit_dialog() { filter_button->hide(); edit_check->hide(); - Point2 pos = anim_tree->node_get_pos(edited_node) - Point2(h_scroll->get_value(), v_scroll->get_value()); + Point2 pos = anim_tree->node_get_position(edited_node) - Point2(h_scroll->get_value(), v_scroll->get_value()); Ref style = get_stylebox("panel", "PopupMenu"); Size2 size = get_node_size(edited_node); Point2 popup_pos(pos.x + style->get_margin(MARGIN_LEFT), pos.y + size.y - style->get_margin(MARGIN_BOTTOM)); @@ -479,7 +479,7 @@ void AnimationTreeEditor::_draw_node(const StringName &p_node) { Ref slot_icon = get_icon("VisualShaderPort", "EditorIcons"); Size2 size = get_node_size(p_node); - Point2 pos = anim_tree->node_get_pos(p_node); + Point2 pos = anim_tree->node_get_position(p_node); if (click_type == CLICK_NODE && click_node == p_node) { pos += click_motion - click_pos; @@ -618,7 +618,7 @@ AnimationTreeEditor::ClickType AnimationTreeEditor::_locate_click(const Point2 & AnimationTreePlayer::NodeType type = anim_tree->node_get_type(node); - Point2 pos = anim_tree->node_get_pos(node); + Point2 pos = anim_tree->node_get_position(node); Size2 size = get_node_size(node); pos -= Point2(h_scroll->get_value(), v_scroll->get_value()); @@ -674,7 +674,7 @@ Point2 AnimationTreeEditor::_get_slot_pos(const StringName &p_node_id, bool p_in Ref slot_icon = get_icon("VisualShaderPort", "EditorIcons"); Size2 size = get_node_size(p_node_id); - Point2 pos = anim_tree->node_get_pos(p_node_id); + Point2 pos = anim_tree->node_get_position(p_node_id); if (click_type == CLICK_NODE && click_node == p_node_id) { @@ -806,12 +806,12 @@ void AnimationTreeEditor::_gui_input(Ref p_event) { } break; case CLICK_NODE: { - Point2 new_pos = anim_tree->node_get_pos(click_node) + (click_motion - click_pos); + Point2 new_pos = anim_tree->node_get_position(click_node) + (click_motion - click_pos); if (new_pos.x < 5) new_pos.x = 5; if (new_pos.y < 5) new_pos.y = 5; - anim_tree->node_set_pos(click_node, new_pos); + anim_tree->node_set_position(click_node, new_pos); } break; default: {} @@ -1081,7 +1081,7 @@ StringName AnimationTreeEditor::_add_node(int p_item) { } anim_tree->add_node((AnimationTreePlayer::NodeType)p_item, name); - anim_tree->node_set_pos(name, Point2(last_x, last_y)); + anim_tree->node_set_position(name, Point2(last_x, last_y)); order.push_back(name); last_x += 10; last_y += 10; diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 27dad7756ed..28de1ad9403 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -368,7 +368,7 @@ void CanvasItemEditor::_unhandled_key_input(const Ref &p_ev) { } else if (set_pivot_shortcut.is_valid() && set_pivot_shortcut->is_shortcut(p_ev) && drag == DRAG_NONE && can_move_pivot) { if (!Input::get_singleton()->is_mouse_button_pressed(0)) { List &selection = editor_selection->get_selected_node_list(); - Vector2 mouse_pos = viewport->get_local_mouse_pos(); + Vector2 mouse_pos = viewport->get_local_mouse_position(); if (selection.size() && viewport->get_rect().has_point(mouse_pos)) { //just in case, make it work if over viewport mouse_pos = transform.affine_inverse().xform(mouse_pos); @@ -4188,13 +4188,13 @@ void CanvasItemEditorViewport::_create_nodes(Node *parent, Node *child, String & pos = parent->call("get_global_position"); } Transform2D trans = canvas->get_canvas_transform(); - Point2 target_pos = (p_point - trans.get_origin()) / trans.get_scale().x - pos; + Point2 target_position = (p_point - trans.get_origin()) / trans.get_scale().x - pos; if (default_type == "Polygon2D" || default_type == "TouchScreenButton" || default_type == "TextureRect" || default_type == "Patch9Rect") { - target_pos -= texture_size / 2; + target_position -= texture_size / 2; } // there's nothing to be used as source position so snapping will work as absolute if enabled - target_pos = canvas->snap_point(target_pos); - editor_data->get_undo_redo().add_do_method(child, "set_position", target_pos); + target_position = canvas->snap_point(target_position); + editor_data->get_undo_redo().add_do_method(child, "set_position", target_position); } bool CanvasItemEditorViewport::_create_instance(Node *parent, String &path, const Point2 &p_point) { diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp index 615cf85aa4b..70d771afc8c 100644 --- a/editor/plugins/curve_editor_plugin.cpp +++ b/editor/plugins/curve_editor_plugin.cpp @@ -188,7 +188,7 @@ void CurveEditor::on_gui_input(const Ref &p_event) { } else { // Drag tangent - Vector2 point_pos = curve.get_point_pos(_selected_point); + Vector2 point_pos = curve.get_point_position(_selected_point); Vector2 control_pos = get_world_pos(mpos); Vector2 dir = (control_pos - point_pos).normalized(); @@ -378,7 +378,7 @@ int CurveEditor::get_point_at(Vector2 pos) const { const float r = _hover_radius * _hover_radius; for (int i = 0; i < curve.get_point_count(); ++i) { - Vector2 p = get_view_pos(curve.get_point_pos(i)); + Vector2 p = get_view_pos(curve.get_point_position(i)); if (p.distance_squared_to(pos) <= r) { return i; } @@ -525,8 +525,8 @@ Vector2 CurveEditor::get_tangent_view_pos(int i, TangentIndex tangent) const { else dir = Vector2(1, _curve_ref->get_point_right_tangent(i)); - Vector2 point_pos = get_view_pos(_curve_ref->get_point_pos(i)); - Vector2 control_pos = get_view_pos(_curve_ref->get_point_pos(i) + dir); + Vector2 point_pos = get_view_pos(_curve_ref->get_point_position(i)); + Vector2 control_pos = get_view_pos(_curve_ref->get_point_position(i) + dir); return point_pos + _tangents_length * (control_pos - point_pos).normalized(); } @@ -549,8 +549,8 @@ static void plot_curve_accurate(const Curve &curve, float step, T plot_func) { plot_func(Vector2(0, y), Vector2(1.f, y), true); } else { - Vector2 first_point = curve.get_point_pos(0); - Vector2 last_point = curve.get_point_pos(curve.get_point_count() - 1); + Vector2 first_point = curve.get_point_position(0); + Vector2 last_point = curve.get_point_position(curve.get_point_count() - 1); // Edge lines plot_func(Vector2(0, first_point.y), first_point, false); @@ -559,8 +559,8 @@ static void plot_curve_accurate(const Curve &curve, float step, T plot_func) { // Draw section by section, so that we get maximum precision near points. // It's an accurate representation, but slower than using the baked one. for (int i = 1; i < curve.get_point_count(); ++i) { - Vector2 a = curve.get_point_pos(i - 1); - Vector2 b = curve.get_point_pos(i); + Vector2 a = curve.get_point_position(i - 1); + Vector2 b = curve.get_point_position(i); Vector2 pos = a; Vector2 prev_pos = a; @@ -667,7 +667,7 @@ void CurveEditor::_draw() { const Color tangent_color(0.5, 0.5, 1, 1); int i = _selected_point; - Vector2 pos = curve.get_point_pos(i); + Vector2 pos = curve.get_point_position(i); if (i != 0) { Vector2 control_pos = get_tangent_view_pos(i, TANGENT_LEFT); @@ -718,7 +718,7 @@ void CurveEditor::_draw() { const Color selected_point_color(1, 0.5, 0.5); for (int i = 0; i < curve.get_point_count(); ++i) { - Vector2 pos = curve.get_point_pos(i); + Vector2 pos = curve.get_point_position(i); draw_rect(Rect2(get_view_pos(pos), Vector2(1, 1)).grow(3), i == _selected_point ? selected_point_color : point_color); // TODO Circles are prettier. Needs a fix! Or a texture //draw_circle(pos, 2, point_color); @@ -728,7 +728,7 @@ void CurveEditor::_draw() { if (_hover_point != -1) { const Color hover_color = line_color; - Vector2 pos = curve.get_point_pos(_hover_point); + Vector2 pos = curve.get_point_position(_hover_point); stroke_rect(Rect2(get_view_pos(pos), Vector2(1, 1)).grow(_hover_radius), hover_color); } diff --git a/editor/plugins/line_2d_editor_plugin.cpp b/editor/plugins/line_2d_editor_plugin.cpp index 84620a75a5c..ef3ee6a78f4 100644 --- a/editor/plugins/line_2d_editor_plugin.cpp +++ b/editor/plugins/line_2d_editor_plugin.cpp @@ -66,7 +66,7 @@ int Line2DEditor::get_point_index_at(Vector2 gpos) { Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform(); for (int i = 0; i < node->get_point_count(); ++i) { - Point2 p = xform.xform(node->get_point_pos(i)); + Point2 p = xform.xform(node->get_point_position(i)); if (gpos.distance_to(p) < grab_threshold) { return i; } @@ -96,12 +96,12 @@ bool Line2DEditor::forward_gui_input(const Ref &p_event) { if (mb->get_button_index() == BUTTON_LEFT && !mb->get_shift() && mode == MODE_EDIT) { _dragging = true; action_point = i; - moving_from = node->get_point_pos(i); + moving_from = node->get_point_position(i); moving_screen_from = gpoint; } else if ((mb->get_button_index() == BUTTON_RIGHT && mode == MODE_EDIT) || (mb->get_button_index() == BUTTON_LEFT && mode == MODE_DELETE)) { undo_redo->create_action(TTR("Remove Point from Line2D")); undo_redo->add_do_method(node, "remove_point", i); - undo_redo->add_undo_method(node, "add_point", node->get_point_pos(i), i); + undo_redo->add_undo_method(node, "add_point", node->get_point_position(i), i); undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update"); undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update"); undo_redo->commit_action(); @@ -121,7 +121,7 @@ bool Line2DEditor::forward_gui_input(const Ref &p_event) { _dragging = true; action_point = node->get_point_count() - 1; - moving_from = node->get_point_pos(action_point); + moving_from = node->get_point_position(action_point); moving_screen_from = gpoint; canvas_item_editor->get_viewport_control()->update(); @@ -131,8 +131,8 @@ bool Line2DEditor::forward_gui_input(const Ref &p_event) { if (!mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT && _dragging) { undo_redo->create_action(TTR("Move Point in Line2D")); - undo_redo->add_do_method(node, "set_point_pos", action_point, cpoint); - undo_redo->add_undo_method(node, "set_point_pos", action_point, moving_from); + undo_redo->add_do_method(node, "set_point_position", action_point, cpoint); + undo_redo->add_undo_method(node, "set_point_position", action_point, moving_from); undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update"); undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update"); undo_redo->commit_action(); @@ -147,7 +147,7 @@ bool Line2DEditor::forward_gui_input(const Ref &p_event) { if (_dragging) { Vector2 cpoint = mouse_to_local_pos(mm->get_position(), mm->get_alt()); - node->set_point_pos(action_point, cpoint); + node->set_point_position(action_point, cpoint); canvas_item_editor->get_viewport_control()->update(); return true; } @@ -172,7 +172,7 @@ void Line2DEditor::_canvas_draw() { Control *vpc = canvas_item_editor->get_viewport_control(); for (int i = 0; i < len; ++i) { - Vector2 point = xform.xform(node->get_point_pos(i)); + Vector2 point = xform.xform(node->get_point_position(i)); vpc->draw_texture_rect(handle, Rect2(point - handle_size * 0.5, handle_size), false); } } diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp index adc8d4f0916..1160e90384d 100644 --- a/editor/plugins/path_2d_editor_plugin.cpp +++ b/editor/plugins/path_2d_editor_plugin.cpp @@ -89,9 +89,9 @@ bool Path2DEditor::forward_gui_input(const Ref &p_event) { for (int i = 0; i < curve->get_point_count(); i++) { - real_t dist_to_p = gpoint.distance_to(xform.xform(curve->get_point_pos(i))); - real_t dist_to_p_out = gpoint.distance_to(xform.xform(curve->get_point_pos(i) + curve->get_point_out(i))); - real_t dist_to_p_in = gpoint.distance_to(xform.xform(curve->get_point_pos(i) + curve->get_point_in(i))); + real_t dist_to_p = gpoint.distance_to(xform.xform(curve->get_point_position(i))); + real_t dist_to_p_out = gpoint.distance_to(xform.xform(curve->get_point_position(i) + curve->get_point_out(i))); + real_t dist_to_p_in = gpoint.distance_to(xform.xform(curve->get_point_position(i) + curve->get_point_in(i))); // Check for point movement start (for point + in/out controls). if (mb->get_button_index() == BUTTON_LEFT) { @@ -100,7 +100,7 @@ bool Path2DEditor::forward_gui_input(const Ref &p_event) { action = ACTION_MOVING_POINT; action_point = i; - moving_from = curve->get_point_pos(i); + moving_from = curve->get_point_position(i); moving_screen_from = gpoint; return true; } else if (mode == MODE_EDIT || mode == MODE_EDIT_CURVE) { @@ -129,7 +129,7 @@ bool Path2DEditor::forward_gui_input(const Ref &p_event) { undo_redo->create_action(TTR("Remove Point from Curve")); undo_redo->add_do_method(curve.ptr(), "remove_point", i); - undo_redo->add_undo_method(curve.ptr(), "add_point", curve->get_point_pos(i), curve->get_point_in(i), curve->get_point_out(i), i); + undo_redo->add_undo_method(curve.ptr(), "add_point", curve->get_point_position(i), curve->get_point_in(i), curve->get_point_out(i), i); undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update"); undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update"); undo_redo->commit_action(); @@ -171,7 +171,7 @@ bool Path2DEditor::forward_gui_input(const Ref &p_event) { action = ACTION_MOVING_POINT; action_point = curve->get_point_count() - 1; - moving_from = curve->get_point_pos(action_point); + moving_from = curve->get_point_position(action_point); moving_screen_from = gpoint; canvas_item_editor->get_viewport_control()->update(); @@ -194,8 +194,8 @@ bool Path2DEditor::forward_gui_input(const Ref &p_event) { case ACTION_MOVING_POINT: { undo_redo->create_action(TTR("Move Point in Curve")); - undo_redo->add_do_method(curve.ptr(), "set_point_pos", action_point, cpoint); - undo_redo->add_undo_method(curve.ptr(), "set_point_pos", action_point, moving_from); + undo_redo->add_do_method(curve.ptr(), "set_point_position", action_point, cpoint); + undo_redo->add_undo_method(curve.ptr(), "set_point_position", action_point, moving_from); undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update"); undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update"); undo_redo->commit_action(); @@ -255,7 +255,7 @@ bool Path2DEditor::forward_gui_input(const Ref &p_event) { break; case ACTION_MOVING_POINT: { - curve->set_point_pos(action_point, cpoint); + curve->set_point_position(action_point, cpoint); } break; case ACTION_MOVING_IN: { @@ -296,17 +296,17 @@ void Path2DEditor::_canvas_draw() { for (int i = 0; i < len; i++) { - Vector2 point = xform.xform(curve->get_point_pos(i)); + Vector2 point = xform.xform(curve->get_point_position(i)); vpc->draw_texture_rect(handle, Rect2(point - handle_size * 0.5, handle_size), false, Color(1, 1, 1, 1)); if (i < len - 1) { - Vector2 pointout = xform.xform(curve->get_point_pos(i) + curve->get_point_out(i)); + Vector2 pointout = xform.xform(curve->get_point_position(i) + curve->get_point_out(i)); vpc->draw_line(point, pointout, Color(0.5, 0.5, 1.0, 0.8), 1.0); vpc->draw_texture_rect(handle, Rect2(pointout - handle_size * 0.5, handle_size), false, Color(1, 0.5, 1, 0.3)); } if (i > 0) { - Vector2 pointin = xform.xform(curve->get_point_pos(i) + curve->get_point_in(i)); + Vector2 pointin = xform.xform(curve->get_point_position(i) + curve->get_point_in(i)); vpc->draw_line(point, pointin, Color(0.5, 0.5, 1.0, 0.8), 1.0); vpc->draw_texture_rect(handle, Rect2(pointin - handle_size * 0.5, handle_size), false, Color(1, 0.5, 1, 0.3)); } @@ -389,8 +389,8 @@ void Path2DEditor::_mode_selected(int p_mode) { if (node->get_curve()->get_point_count() < 3) return; - Vector2 begin = node->get_curve()->get_point_pos(0); - Vector2 end = node->get_curve()->get_point_pos(node->get_curve()->get_point_count() - 1); + Vector2 begin = node->get_curve()->get_point_position(0); + Vector2 end = node->get_curve()->get_point_position(node->get_curve()->get_point_count() - 1); if (begin.distance_to(end) < CMP_EPSILON) return; diff --git a/editor/plugins/path_editor_plugin.cpp b/editor/plugins/path_editor_plugin.cpp index d0f2b19ed3f..fa97c96614d 100644 --- a/editor/plugins/path_editor_plugin.cpp +++ b/editor/plugins/path_editor_plugin.cpp @@ -64,7 +64,7 @@ Variant PathSpatialGizmo::get_handle_value(int p_idx) const { if (p_idx < c->get_point_count()) { - original = c->get_point_pos(p_idx); + original = c->get_point_position(p_idx); return original; } @@ -79,7 +79,7 @@ Variant PathSpatialGizmo::get_handle_value(int p_idx) const { else ofs = c->get_point_out(idx); - original = ofs + c->get_point_pos(idx); + original = ofs + c->get_point_position(idx); return ofs; } @@ -108,7 +108,7 @@ void PathSpatialGizmo::set_handle(int p_idx, Camera *p_camera, const Point2 &p_p } Vector3 local = gi.xform(inters); - c->set_point_pos(p_idx, local); + c->set_point_position(p_idx, local); } return; @@ -119,7 +119,7 @@ void PathSpatialGizmo::set_handle(int p_idx, Camera *p_camera, const Point2 &p_p int idx = p_idx / 2; int t = p_idx % 2; - Vector3 base = c->get_point_pos(idx); + Vector3 base = c->get_point_position(idx); Plane p(gt.xform(original), p_camera->get_transform().basis.get_axis(2)); @@ -148,12 +148,12 @@ void PathSpatialGizmo::commit_handle(int p_idx, const Variant &p_restore, bool p if (p_cancel) { - c->set_point_pos(p_idx, p_restore); + c->set_point_position(p_idx, p_restore); return; } - ur->create_action(TTR("Set Curve Point Pos")); - ur->add_do_method(c.ptr(), "set_point_pos", p_idx, c->get_point_pos(p_idx)); - ur->add_undo_method(c.ptr(), "set_point_pos", p_idx, p_restore); + ur->create_action(TTR("Set Curve Point Position")); + ur->add_do_method(c.ptr(), "set_point_position", p_idx, c->get_point_position(p_idx)); + ur->add_undo_method(c.ptr(), "set_point_position", p_idx, p_restore); ur->commit_action(); return; @@ -178,7 +178,7 @@ void PathSpatialGizmo::commit_handle(int p_idx, const Variant &p_restore, bool p c->set_point_in(p_idx, p_restore); return; } - ur->create_action(TTR("Set Curve In Pos")); + ur->create_action(TTR("Set Curve In Position")); ur->add_do_method(c.ptr(), "set_point_in", idx, c->get_point_in(idx)); ur->add_undo_method(c.ptr(), "set_point_in", idx, p_restore); ur->commit_action(); @@ -189,7 +189,7 @@ void PathSpatialGizmo::commit_handle(int p_idx, const Variant &p_restore, bool p c->set_point_out(idx, p_restore); return; } - ur->create_action(TTR("Set Curve Out Pos")); + ur->create_action(TTR("Set Curve Out Position")); ur->add_do_method(c.ptr(), "set_point_out", idx, c->get_point_out(idx)); ur->add_undo_method(c.ptr(), "set_point_out", idx, p_restore); ur->commit_action(); @@ -234,7 +234,7 @@ void PathSpatialGizmo::redraw() { for (int i = 0; i < c->get_point_count(); i++) { - Vector3 p = c->get_point_pos(i); + Vector3 p = c->get_point_position(i); handles.push_back(p); if (i > 0) { v3p.push_back(p); @@ -307,16 +307,16 @@ bool PathEditorPlugin::forward_spatial_gui_input(Camera *p_camera, const Ref= 2) { PoolVector::Read r = v3a.read(); - if (p_camera->unproject_position(gt.xform(c->get_point_pos(0))).distance_to(mbpos) < click_dist) + if (p_camera->unproject_position(gt.xform(c->get_point_position(0))).distance_to(mbpos) < click_dist) return false; //nope, existing for (int i = 0; i < c->get_point_count() - 1; i++) { //find the offset and point index of the place to break up int j = idx; - if (p_camera->unproject_position(gt.xform(c->get_point_pos(i + 1))).distance_to(mbpos) < click_dist) + if (p_camera->unproject_position(gt.xform(c->get_point_position(i + 1))).distance_to(mbpos) < click_dist) return false; //nope, existing - while (j < rc && c->get_point_pos(i + 1) != r[j]) { + while (j < rc && c->get_point_position(i + 1) != r[j]) { Vector3 from = r[j]; Vector3 to = r[j + 1]; @@ -371,7 +371,7 @@ bool PathEditorPlugin::forward_spatial_gui_input(Camera *p_camera, const Refget_point_count() == 0) org = path->get_transform().get_origin(); else - org = gt.xform(c->get_point_pos(c->get_point_count() - 1)); + org = gt.xform(c->get_point_position(c->get_point_count() - 1)); Plane p(org, p_camera->get_transform().basis.get_axis(2)); Vector3 ray_from = p_camera->project_ray_origin(mbpos); Vector3 ray_dir = p_camera->project_ray_normal(mbpos); @@ -392,9 +392,9 @@ bool PathEditorPlugin::forward_spatial_gui_input(Camera *p_camera, const Refis_pressed() && ((mb->get_button_index() == BUTTON_LEFT && curve_del->is_pressed()) || (mb->get_button_index() == BUTTON_RIGHT && curve_edit->is_pressed()))) { for (int i = 0; i < c->get_point_count(); i++) { - real_t dist_to_p = p_camera->unproject_position(gt.xform(c->get_point_pos(i))).distance_to(mbpos); - real_t dist_to_p_out = p_camera->unproject_position(gt.xform(c->get_point_pos(i) + c->get_point_out(i))).distance_to(mbpos); - real_t dist_to_p_in = p_camera->unproject_position(gt.xform(c->get_point_pos(i) + c->get_point_in(i))).distance_to(mbpos); + real_t dist_to_p = p_camera->unproject_position(gt.xform(c->get_point_position(i))).distance_to(mbpos); + real_t dist_to_p_out = p_camera->unproject_position(gt.xform(c->get_point_position(i) + c->get_point_out(i))).distance_to(mbpos); + real_t dist_to_p_in = p_camera->unproject_position(gt.xform(c->get_point_position(i) + c->get_point_in(i))).distance_to(mbpos); // Find the offset and point index of the place to break up. // Also check for the control points. @@ -403,7 +403,7 @@ bool PathEditorPlugin::forward_spatial_gui_input(Camera *p_camera, const Refget_undo_redo(); ur->create_action(TTR("Remove Path Point")); ur->add_do_method(c.ptr(), "remove_point", i); - ur->add_undo_method(c.ptr(), "add_point", c->get_point_pos(i), c->get_point_in(i), c->get_point_out(i), i); + ur->add_undo_method(c.ptr(), "add_point", c->get_point_position(i), c->get_point_in(i), c->get_point_out(i), i); ur->commit_action(); return true; } else if (dist_to_p_out < click_dist) { @@ -496,7 +496,7 @@ void PathEditorPlugin::_close_curve() { return; if (c->get_point_count() < 2) return; - c->add_point(c->get_point_pos(0), c->get_point_in(0), c->get_point_out(0)); + c->add_point(c->get_point_position(0), c->get_point_in(0), c->get_point_out(0)); } void PathEditorPlugin::_notification(int p_what) { diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp index e157ddbf901..da4a3f84d6b 100644 --- a/editor/plugins/resource_preloader_editor_plugin.cpp +++ b/editor/plugins/resource_preloader_editor_plugin.cpp @@ -254,7 +254,7 @@ void ResourcePreloaderEditor::edit(ResourcePreloader *p_preloader) { Variant ResourcePreloaderEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) { - TreeItem *ti = tree->get_item_at_pos(p_point); + TreeItem *ti = tree->get_item_at_position(p_point); if (!ti) return Variant(); diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index c875ee70115..d3c75d1c42a 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -306,7 +306,7 @@ Variant ScriptTextEditor::get_edit_state() { Dictionary state; - state["scroll_pos"] = code_editor->get_text_edit()->get_v_scroll(); + state["scroll_position"] = code_editor->get_text_edit()->get_v_scroll(); state["column"] = code_editor->get_text_edit()->cursor_get_column(); state["row"] = code_editor->get_text_edit()->cursor_get_line(); @@ -509,7 +509,7 @@ void ScriptTextEditor::ensure_focus() { void ScriptTextEditor::set_edit_state(const Variant &p_state) { Dictionary state = p_state; - code_editor->get_text_edit()->set_v_scroll(state["scroll_pos"]); + code_editor->get_text_edit()->set_v_scroll(state["scroll_position"]); code_editor->get_text_edit()->cursor_set_column(state["column"]); code_editor->get_text_edit()->cursor_set_line(state["row"]); code_editor->get_text_edit()->grab_focus(); @@ -1397,7 +1397,7 @@ void ScriptTextEditor::_text_edit_gui_input(const Ref &ev) { float alpha = color.size() > 3 ? color[3] : 1.0f; color_picker->set_pick_color(Color(color[0], color[1], color[2], alpha)); } - color_panel->set_position(get_global_transform().xform(get_local_mouse_pos())); + color_panel->set_position(get_global_transform().xform(get_local_mouse_position())); } else { have_color = false; } @@ -1445,7 +1445,7 @@ void ScriptTextEditor::_make_context_menu(bool p_selection, bool p_color) { context_menu->add_separator(); context_menu->add_item(TTR("Pick Color"), EDIT_PICK_COLOR); } - context_menu->set_position(get_global_transform().xform(get_local_mouse_pos())); + context_menu->set_position(get_global_transform().xform(get_local_mouse_position())); context_menu->set_size(Vector2(1, 1)); context_menu->popup(); } diff --git a/editor/plugins/shader_graph_editor_plugin.cpp b/editor/plugins/shader_graph_editor_plugin.cpp index 732344cb789..f1863c3ca4a 100644 --- a/editor/plugins/shader_graph_editor_plugin.cpp +++ b/editor/plugins/shader_graph_editor_plugin.cpp @@ -54,7 +54,7 @@ void GraphColorRampEdit::_gui_input(const InputEvent& p_event) { if (p_event.type==InputEvent::MOUSE_BUTTON && p_event->get_button_index()==1 && p_event->is_pressed()) { update(); - int x = p_event->get_pos().x; + int x = p_event->get_position().x; int total_w = get_size().width-get_size().height-3; if (x>total_w+3) { @@ -333,7 +333,7 @@ void GraphCurveMapEdit::_gui_input(const InputEvent& p_event) { if (p_event.type==InputEvent::MOUSE_BUTTON && p_event->get_button_index()==1 && p_event->is_pressed()) { update(); - Point2 p = Vector2(p_event->get_pos().x,p_event->get_pos().y)/get_size(); + Point2 p = Vector2(p_event->get_position().x,p_event->get_position().y)/get_size(); p.y=1.0-p.y; grabbed=-1; grabbing=true; @@ -384,7 +384,7 @@ void GraphCurveMapEdit::_gui_input(const InputEvent& p_event) { if (p_event.type==InputEvent::MOUSE_MOTION && grabbing && grabbed != -1) { - Point2 p = Vector2(p_event->get_pos().x,p_event->get_pos().y)/get_size(); + Point2 p = Vector2(p_event->get_position().x,p_event->get_position().y)/get_size(); p.y=1.0-p.y; p.x = CLAMP(p.x,0.0,1.0); @@ -1205,7 +1205,7 @@ void ShaderGraphView::_move_node(int p_id,const Vector2& p_to) { ERR_FAIL_COND(!node_map.has(p_id)); node_map[p_id]->set_offset(p_to); - graph->node_set_pos(type,p_id,p_to); + graph->node_set_position(type,p_id,p_to); } void ShaderGraphView::_duplicate_nodes_request() @@ -2463,7 +2463,7 @@ void ShaderGraphView::_create_node(int p_id) { gn->connect("close_request",this,"_node_removed",varray(p_id),CONNECT_DEFERRED); graph_edit->add_child(gn); node_map[p_id]=gn; - gn->set_offset(graph->node_get_pos(type,p_id)); + gn->set_offset(graph->node_get_position(type,p_id)); } @@ -2657,7 +2657,7 @@ void ShaderGraphView::add_node(int p_type, const Vector2 &location) { while(true) { bool valid=true; for(List::Element *E=existing.front();E;E=E->next()) { - Vector2 pos = graph->node_get_pos(type,E->get()); + Vector2 pos = graph->node_get_position(type,E->get()); if (init_ofs==pos) { init_ofs+=Vector2(20,20); valid=false; @@ -2672,7 +2672,7 @@ void ShaderGraphView::add_node(int p_type, const Vector2 &location) { UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo(); ur->create_action(TTR("Add Shader Graph Node")); ur->add_do_method(graph.ptr(),"node_add",type,p_type,newid); - ur->add_do_method(graph.ptr(),"node_set_pos",type,newid,init_ofs); + ur->add_do_method(graph.ptr(),"node_set_position",type,newid,init_ofs); ur->add_undo_method(graph.ptr(),"node_remove",type,newid); ur->add_do_method(this,"_update_graph"); ur->add_undo_method(this,"_update_graph"); @@ -2765,7 +2765,7 @@ void ShaderGraphEditor::_add_node(int p_type) { void ShaderGraphEditor::_popup_requested(const Vector2 &p_position) { Vector2 scroll_ofs=graph_edits[tabs->get_current_tab()]->get_graph_edit()->get_scroll_ofs(); - next_location = get_local_mouse_pos() + scroll_ofs; + next_location = get_local_mouse_position() + scroll_ofs; popup->set_global_position(p_position); popup->set_size( Size2( 200, 0) ); popup->popup(); diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index c1b0fdb5d69..6b485aab7c7 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -217,7 +217,7 @@ Transform SpatialEditorViewport::_get_camera_transform() const { return camera->get_global_transform(); } -Vector3 SpatialEditorViewport::_get_camera_pos() const { +Vector3 SpatialEditorViewport::_get_camera_position() const { return _get_camera_transform().origin; } @@ -464,7 +464,7 @@ void SpatialEditorViewport::_select_region() { Vector frustum; - Vector3 cam_pos = _get_camera_pos(); + Vector3 cam_pos = _get_camera_position(); Set > found_gizmos; for (int i = 0; i < 4; i++) { @@ -2366,9 +2366,9 @@ void SpatialEditorViewport::update_transform_gizmo_view() { void SpatialEditorViewport::set_state(const Dictionary &p_state) { - cursor.pos = p_state["pos"]; - cursor.x_rot = p_state["x_rot"]; - cursor.y_rot = p_state["y_rot"]; + cursor.pos = p_state["position"]; + cursor.x_rot = p_state["x_rotation"]; + cursor.y_rot = p_state["y_rotation"]; cursor.distance = p_state["distance"]; bool env = p_state["use_environment"]; bool orth = p_state["use_orthogonal"]; @@ -2410,9 +2410,9 @@ void SpatialEditorViewport::set_state(const Dictionary &p_state) { Dictionary SpatialEditorViewport::get_state() const { Dictionary d; - d["pos"] = cursor.pos; - d["x_rot"] = cursor.x_rot; - d["y_rot"] = cursor.y_rot; + d["position"] = cursor.pos; + d["x_rotation"] = cursor.x_rot; + d["y_rotation"] = cursor.y_rot; d["distance"] = cursor.distance; d["use_environment"] = camera->get_environment().is_valid(); d["use_orthogonal"] = camera->get_projection() == Camera::PROJECTION_ORTHOGONAL; diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h index 5f3ef2dbee0..e0ded6e646d 100644 --- a/editor/plugins/spatial_editor_plugin.h +++ b/editor/plugins/spatial_editor_plugin.h @@ -157,7 +157,7 @@ private: Transform _get_camera_transform() const; int get_selected_count() const; - Vector3 _get_camera_pos() const; + Vector3 _get_camera_position() const; Vector3 _get_camera_normal() const; Vector3 _get_screen_to_space(const Vector3 &p_vector3); diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index 7b40f690823..b9cb1788f07 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -544,7 +544,7 @@ Variant SpriteFramesEditor::get_drag_data_fw(const Point2 &p_point, Control *p_f if (!frames->has_animation(edited_anim)) return false; - int idx = tree->get_item_at_pos(p_point, true); + int idx = tree->get_item_at_position(p_point, true); if (idx < 0 || idx >= frames->get_frame_count(edited_anim)) return Variant(); @@ -609,7 +609,7 @@ void SpriteFramesEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da if (!d.has("type")) return; - int at_pos = tree->get_item_at_pos(p_point, true); + int at_pos = tree->get_item_at_position(p_point, true); if (String(d["type"]) == "resource" && d.has("resource")) { RES r = d["resource"]; @@ -643,7 +643,7 @@ void SpriteFramesEditor::_bind_methods() { ClassDB::bind_method(D_METHOD("_empty2_pressed"), &SpriteFramesEditor::_empty2_pressed); ClassDB::bind_method(D_METHOD("_delete_pressed"), &SpriteFramesEditor::_delete_pressed); ClassDB::bind_method(D_METHOD("_paste_pressed"), &SpriteFramesEditor::_paste_pressed); - ClassDB::bind_method(D_METHOD("_file_load_request", "files", "atpos"), &SpriteFramesEditor::_file_load_request, DEFVAL(-1)); + ClassDB::bind_method(D_METHOD("_file_load_request", "files", "at_position"), &SpriteFramesEditor::_file_load_request, DEFVAL(-1)); ClassDB::bind_method(D_METHOD("_update_library", "skipsel"), &SpriteFramesEditor::_update_library, DEFVAL(false)); ClassDB::bind_method(D_METHOD("_up_pressed"), &SpriteFramesEditor::_up_pressed); ClassDB::bind_method(D_METHOD("_down_pressed"), &SpriteFramesEditor::_down_pressed); diff --git a/editor/project_export.cpp b/editor/project_export.cpp index f4318a670c1..c3b50657f9b 100644 --- a/editor/project_export.cpp +++ b/editor/project_export.cpp @@ -434,7 +434,7 @@ void ProjectExportDialog::_delete_preset_confirm() { Variant ProjectExportDialog::get_drag_data_fw(const Point2 &p_point, Control *p_from) { if (p_from == presets) { - int pos = presets->get_item_at_pos(p_point, true); + int pos = presets->get_item_at_position(p_point, true); if (pos >= 0) { Dictionary d; @@ -455,7 +455,7 @@ Variant ProjectExportDialog::get_drag_data_fw(const Point2 &p_point, Control *p_ } } else if (p_from == patches) { - TreeItem *item = patches->get_item_at_pos(p_point); + TreeItem *item = patches->get_item_at_position(p_point); if (item && item->get_cell_mode(0) == TreeItem::CELL_MODE_CHECK) { @@ -482,7 +482,7 @@ bool ProjectExportDialog::can_drop_data_fw(const Point2 &p_point, const Variant if (!d.has("type") || String(d["type"]) != "export_preset") return false; - if (presets->get_item_at_pos(p_point, true) < 0 && !presets->is_pos_at_end_of_items(p_point)) + if (presets->get_item_at_position(p_point, true) < 0 && !presets->is_pos_at_end_of_items(p_point)) return false; } else if (p_from == patches) { @@ -492,7 +492,7 @@ bool ProjectExportDialog::can_drop_data_fw(const Point2 &p_point, const Variant patches->set_drop_mode_flags(Tree::DROP_MODE_ON_ITEM); - TreeItem *item = patches->get_item_at_pos(p_point); + TreeItem *item = patches->get_item_at_position(p_point); if (!item) { @@ -511,8 +511,8 @@ void ProjectExportDialog::drop_data_fw(const Point2 &p_point, const Variant &p_d int to_pos = -1; - if (presets->get_item_at_pos(p_point, true) >= 0) { - to_pos = presets->get_item_at_pos(p_point, true); + if (presets->get_item_at_position(p_point, true) >= 0) { + to_pos = presets->get_item_at_position(p_point, true); } if (to_pos == -1 && !presets->is_pos_at_end_of_items(p_point)) @@ -541,7 +541,7 @@ void ProjectExportDialog::drop_data_fw(const Point2 &p_point, const Variant &p_d int from_pos = d["patch"]; - TreeItem *item = patches->get_item_at_pos(p_point); + TreeItem *item = patches->get_item_at_position(p_point); if (!item) return; diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 78d544fdcf6..f8f222ac2e3 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -987,15 +987,15 @@ void ProjectManager::_on_project_created(const String &dir) { } } if (has_already) { - _update_scroll_pos(dir); + _update_scroll_position(dir); } else { _load_recent_projects(); - _update_scroll_pos(dir); + _update_scroll_position(dir); } _open_project(); } -void ProjectManager::_update_scroll_pos(const String &dir) { +void ProjectManager::_update_scroll_position(const String &dir) { for (int i = 0; i < scroll_childs->get_child_count(); i++) { HBoxContainer *hb = Object::cast_to(scroll_childs->get_child(i)); Label *fpath = Object::cast_to