From 603cf9de16bfdc96e2436a9651724ac582de128a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 8 Nov 2019 16:01:57 +0100 Subject: [PATCH] Sync classref with current source --- classes/class_@gdscript.rst | 4 +- classes/class_aabb.rst | 8 ++ classes/class_animationnodeblendspace2d.rst | 2 +- classes/class_area2d.rst | 5 + classes/class_array.rst | 2 +- classes/class_astar.rst | 135 +++++++++++--------- classes/class_backbuffercopy.rst | 4 +- classes/class_canvasitem.rst | 2 + classes/class_color.rst | 8 ++ classes/class_control.rst | 16 ++- classes/class_editorinspectorplugin.rst | 4 +- classes/class_httprequest.rst | 35 ++++- classes/class_image.rst | 13 +- classes/class_inputevent.rst | 6 +- classes/class_inputeventmousemotion.rst | 38 +++++- classes/class_os.rst | 6 + classes/class_particles.rst | 4 + classes/class_plane.rst | 8 ++ classes/class_poolbytearray.rst | 10 ++ classes/class_poolcolorarray.rst | 10 ++ classes/class_poolintarray.rst | 10 ++ classes/class_poolrealarray.rst | 10 ++ classes/class_poolstringarray.rst | 10 ++ classes/class_poolvector2array.rst | 10 ++ classes/class_poolvector3array.rst | 10 ++ classes/class_popupmenu.rst | 2 +- classes/class_projectsettings.rst | 38 ++++-- classes/class_quat.rst | 8 ++ classes/class_raycast.rst | 5 + classes/class_raycast2d.rst | 5 + classes/class_rect2.rst | 8 ++ classes/class_softbody.rst | 47 ++++--- classes/class_spatial.rst | 8 ++ classes/class_string.rst | 2 +- classes/class_textedit.rst | 34 ++++- classes/class_theme.rst | 4 + classes/class_tilemap.rst | 6 + classes/class_touchscreenbutton.rst | 2 +- classes/class_transform.rst | 8 ++ classes/class_transform2d.rst | 8 ++ classes/class_variant.rst | 47 ++++++- classes/class_vector2.rst | 8 ++ classes/class_vector3.rst | 8 ++ classes/class_visualshadernodeinput.rst | 14 ++ 44 files changed, 518 insertions(+), 114 deletions(-) diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index e93205f5d..fe2dd2b9e 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -240,7 +240,7 @@ Method Descriptions - :ref:`Color` **Color8** **(** :ref:`int` r8, :ref:`int` g8, :ref:`int` b8, :ref:`int` a8=255 **)** -Returns a 32 bit color with red, green, blue and alpha channels. Each channel has 8 bits of information ranging from 0 to 255. +Returns a color constructed from integer red, green, blue, and alpha channels. Each channel should have 8 bits of information ranging from 0 to 255. ``r8`` red channel @@ -1032,6 +1032,8 @@ Prints one or more arguments to strings in the best way possible to console. No printraw("B") # Prints AB +**Note:** Due to limitations with Godot's built-in console, this only prints to the terminal. If you need to print in the editor, use another method, such as :ref:`print`. + ---- .. _class_@GDScript_method_prints: diff --git a/classes/class_aabb.rst b/classes/class_aabb.rst index 96a19b15b..7379cc740 100644 --- a/classes/class_aabb.rst +++ b/classes/class_aabb.rst @@ -71,6 +71,8 @@ Methods +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`intersects_segment` **(** :ref:`Vector3` from, :ref:`Vector3` to **)** | +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`AABB` aabb **)** | ++-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`AABB` | :ref:`merge` **(** :ref:`AABB` with **)** | +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -284,6 +286,12 @@ Returns ``true`` if the ``AABB`` intersects the line segment between ``from`` an ---- +.. _class_AABB_method_is_equal_approx: + +- :ref:`bool` **is_equal_approx** **(** :ref:`AABB` aabb **)** + +---- + .. _class_AABB_method_merge: - :ref:`AABB` **merge** **(** :ref:`AABB` with **)** diff --git a/classes/class_animationnodeblendspace2d.rst b/classes/class_animationnodeblendspace2d.rst index c3c09afb3..f19bfb233 100644 --- a/classes/class_animationnodeblendspace2d.rst +++ b/classes/class_animationnodeblendspace2d.rst @@ -116,7 +116,7 @@ Property Descriptions | *Getter* | get_auto_triangles() | +-----------+---------------------------+ -If true, the blend space is triangulated automatically. The mesh updates every time you add or remove points with :ref:`add_blend_point` and :ref:`remove_blend_point`. +If ``true``, the blend space is triangulated automatically. The mesh updates every time you add or remove points with :ref:`add_blend_point` and :ref:`remove_blend_point`. ---- diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst index 6c31473a3..20c581484 100644 --- a/classes/class_area2d.rst +++ b/classes/class_area2d.rst @@ -177,6 +177,11 @@ Description 2D area that detects :ref:`CollisionObject2D` nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping). +Tutorials +--------- + +- :doc:`../tutorials/physics/using_area_2d` + Property Descriptions --------------------- diff --git a/classes/class_array.rst b/classes/class_array.rst index 874388120..3a672f752 100644 --- a/classes/class_array.rst +++ b/classes/class_array.rst @@ -393,7 +393,7 @@ Returns the number of elements in the array. - :ref:`Array` **slice** **(** :ref:`int` begin, :ref:`int` end, :ref:`int` step=1, :ref:`bool` deep=False **)** -Duplicates the subset described in the function and returns it in an array, deeply copying the array if ``deep`` is true. Lower and upper index are inclusive, with the ``step`` describing the change between indices while slicing. +Duplicates the subset described in the function and returns it in an array, deeply copying the array if ``deep`` is ``true``. Lower and upper index are inclusive, with the ``step`` describing the change between indices while slicing. ---- diff --git a/classes/class_astar.rst b/classes/class_astar.rst index c0d05473c..cf9ed9377 100644 --- a/classes/class_astar.rst +++ b/classes/class_astar.rst @@ -16,69 +16,84 @@ AStar Brief Description ----------------- -AStar class representation that uses 3d-vectors as edges. +An implementation of A\* to find shortest paths among connected points in space. Methods ------- -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_compute_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** virtual | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_estimate_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** virtual | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_point` **(** :ref:`int` id, :ref:`Vector3` position, :ref:`float` weight_scale=1.0 **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`are_points_connected` **(** :ref:`int` id, :ref:`int` to_id **)** const | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`connect_points` **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`disconnect_points` **(** :ref:`int` id, :ref:`int` to_id **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_available_point_id` **(** **)** const | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_closest_point` **(** :ref:`Vector3` to_position, :ref:`bool` include_disabled=false **)** const | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_closest_position_in_segment` **(** :ref:`Vector3` to_position **)** const | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PoolIntArray` | :ref:`get_id_path` **(** :ref:`int` from_id, :ref:`int` to_id **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_point_capacity` **(** **)** const | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PoolIntArray` | :ref:`get_point_connections` **(** :ref:`int` id **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_point_count` **(** **)** const | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PoolVector3Array` | :ref:`get_point_path` **(** :ref:`int` from_id, :ref:`int` to_id **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_point_position` **(** :ref:`int` id **)** const | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_point_weight_scale` **(** :ref:`int` id **)** const | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_points` **(** **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_point` **(** :ref:`int` id **)** const | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_point_disabled` **(** :ref:`int` id **)** const | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_point` **(** :ref:`int` id **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reserve_space` **(** :ref:`int` num_nodes **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_disabled` **(** :ref:`int` id, :ref:`bool` disabled=true **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_position` **(** :ref:`int` id, :ref:`Vector3` position **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_weight_scale` **(** :ref:`int` id, :ref:`float` weight_scale **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_compute_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** virtual | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_estimate_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** virtual | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_point` **(** :ref:`int` id, :ref:`Vector3` position, :ref:`float` weight_scale=1.0 **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`are_points_connected` **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** const | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`connect_points` **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`disconnect_points` **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_available_point_id` **(** **)** const | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_closest_point` **(** :ref:`Vector3` to_position, :ref:`bool` include_disabled=false **)** const | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_closest_position_in_segment` **(** :ref:`Vector3` to_position **)** const | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PoolIntArray` | :ref:`get_id_path` **(** :ref:`int` from_id, :ref:`int` to_id **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_point_capacity` **(** **)** const | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PoolIntArray` | :ref:`get_point_connections` **(** :ref:`int` id **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_point_count` **(** **)** const | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PoolVector3Array` | :ref:`get_point_path` **(** :ref:`int` from_id, :ref:`int` to_id **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_point_position` **(** :ref:`int` id **)** const | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_point_weight_scale` **(** :ref:`int` id **)** const | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_points` **(** **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_point` **(** :ref:`int` id **)** const | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_point_disabled` **(** :ref:`int` id **)** const | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_point` **(** :ref:`int` id **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reserve_space` **(** :ref:`int` num_nodes **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_disabled` **(** :ref:`int` id, :ref:`bool` disabled=true **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_position` **(** :ref:`int` id, :ref:`Vector3` position **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_weight_scale` **(** :ref:`int` id, :ref:`float` weight_scale **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Description ----------- -A\* (A star) is a computer algorithm that is widely used in pathfinding and graph traversal, the process of plotting an efficiently directed path between multiple points. It enjoys widespread use due to its performance and accuracy. Godot's A\* implementation make use of vectors as points. +A\* (A star) is a computer algorithm that is widely used in pathfinding and graph traversal, the process of plotting short paths among vertices (points), passing through a given set of edges (segments). It enjoys widespread use due to its performance and accuracy. Godot's A\* implementation uses points in three-dimensional space and Euclidean distances by default. -You must add points manually with :ref:`add_point` and create segments manually with :ref:`connect_points`. So you can test if there is a path between two points with the :ref:`are_points_connected` function, get the list of existing ids in the found path with :ref:`get_id_path`, or the points list with :ref:`get_point_path`. +You must add points manually with :ref:`add_point` and create segments manually with :ref:`connect_points`. Then you can test if there is a path between two points with the :ref:`are_points_connected` function, get a path containing indices by :ref:`get_id_path`, or one containing actual coordinates with :ref:`get_point_path`. + +It is also possible to use non-Euclidean distances. To do so, create a class that extends ``AStar`` and override methods :ref:`_compute_cost` and :ref:`_estimate_cost`. Both take two indices and return a length, as is shown in the following example. + +:: + + class MyAStar: + extends AStar + + func _compute_cost(u, v): + return abs(u - v) + + func _estimate_cost(u, v): + return min(0, abs(u - v) - 1) + +:ref:`_estimate_cost` should return a lower bound of the distance, i.e. ``_estimate_cost(u, v) <= _compute_cost(u, v)``. This serves as a hint to the algorithm because the custom ``_compute_cost`` might be computation-heavy. If this is not the case, make :ref:`_estimate_cost` return the same value as :ref:`_compute_cost` to provide the algorithm with the most accurate information. Method Descriptions ------------------- @@ -89,6 +104,8 @@ Method Descriptions Called when computing the cost between two connected points. +Note that this function is hidden in the default ``AStar`` class. + ---- .. _class_AStar_method__estimate_cost: @@ -97,6 +114,8 @@ Called when computing the cost between two connected points. Called when estimating the cost between a point and the path's ending point. +Note that this function is hidden in the default ``AStar`` class. + ---- .. _class_AStar_method_add_point: @@ -116,9 +135,9 @@ If there already exists a point for the given ``id``, its position and weight sc .. _class_AStar_method_are_points_connected: -- :ref:`bool` **are_points_connected** **(** :ref:`int` id, :ref:`int` to_id **)** const +- :ref:`bool` **are_points_connected** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** const -Returns whether there is a connection/segment between the given points. +Returns whether the two given points are directly connected by a segment. If ``bidirectional`` is ``false``, returns whether movement from ``id`` to ``to_id`` is possible through this segment. ---- @@ -147,9 +166,9 @@ Creates a segment between the given points. If ``bidirectional`` is ``false``, o .. _class_AStar_method_disconnect_points: -- void **disconnect_points** **(** :ref:`int` id, :ref:`int` to_id **)** +- void **disconnect_points** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** -Deletes the segment between the given points. +Deletes the segment between the given points. If ``bidirectional`` is ``false``, only movement from ``id`` to ``to_id`` is prevented, and a unidirectional segment possibly remains. ---- diff --git a/classes/class_backbuffercopy.rst b/classes/class_backbuffercopy.rst index 0e5052939..e83319b67 100644 --- a/classes/class_backbuffercopy.rst +++ b/classes/class_backbuffercopy.rst @@ -16,7 +16,7 @@ BackBufferCopy Brief Description ----------------- -Copies a region of the screen (or the whole screen) to a buffer so it can be accessed with ``SCREEN_TEXTURE`` in the ``texture()`` function. +Copies a region of the screen (or the whole screen) to a buffer so it can be accessed in your shader scripts through the ``texture(SCREEN_TEXTURE, ...)`` function. Properties ---------- @@ -49,7 +49,7 @@ enum **CopyMode**: Description ----------- -Node for back-buffering the currently-displayed screen. The region defined in the BackBufferCopy node is bufferized with the content of the screen it covers, or the entire screen according to the copy mode set. Use ``SCREEN_TEXTURE`` in the ``texture()`` function to access the buffer. +Node for back-buffering the currently-displayed screen. The region defined in the BackBufferCopy node is bufferized with the content of the screen it covers, or the entire screen according to the copy mode set. Use the ``texture(SCREEN_TEXTURE, ...)`` function in your shader scripts to access the buffer. Property Descriptions --------------------- diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index 41ba90495..b7ee0931f 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -543,6 +543,8 @@ Draws a textured rectangle region at a given position, optionally modulated by a - void **force_update_transform** **(** **)** +Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations. + ---- .. _class_CanvasItem_method_get_canvas: diff --git a/classes/class_color.rst b/classes/class_color.rst index 58528624f..320c905cd 100644 --- a/classes/class_color.rst +++ b/classes/class_color.rst @@ -67,6 +67,8 @@ Methods +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`inverted` **(** **)** | +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Color` color **)** | ++-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`lightened` **(** :ref:`float` amount **)** | +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`linear_interpolate` **(** :ref:`Color` b, :ref:`float` t **)** | @@ -942,6 +944,12 @@ Returns the inverted color ``(1 - r, 1 - g, 1 - b, a)``. ---- +.. _class_Color_method_is_equal_approx: + +- :ref:`bool` **is_equal_approx** **(** :ref:`Color` color **)** + +---- + .. _class_Color_method_lightened: - :ref:`Color` **lightened** **(** :ref:`float` amount **)** diff --git a/classes/class_control.rst b/classes/class_control.rst index 7f49ea890..cae9f507e 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -1194,7 +1194,7 @@ The event won't trigger if: Virtual method to be implemented by the user. Returns a ``Control`` node that should be used as a tooltip instead of the default one. Use ``for_text`` parameter to determine what text the tooltip should contain (likely the contents of :ref:`hint_tooltip`). -The returned node must be of type ``Control`` or Control-derieved. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance, not e.g. a node from scene. When null or non-Control node is returned, the default tooltip will be used instead. +The returned node must be of type ``Control`` or Control-derieved. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance, not e.g. a node from scene. When ``null`` or non-Control node is returned, the default tooltip will be used instead. **Note:** The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its :ref:`rect_min_size` to some non-zero value. @@ -1727,7 +1727,19 @@ Forwarding can be implemented in the target control similar to the methods :ref: - void **set_drag_preview** **(** :ref:`Control` control **)** -Shows the given control at the mouse pointer. A good time to call this method is in :ref:`get_drag_data`. +Shows the given control at the mouse pointer. A good time to call this method is in :ref:`get_drag_data`. The control must not be in the scene tree. + +:: + + export (Color, RGBA) var color = Color(1, 0, 0, 1) + + func get_drag_data(position): + # Use a control that is not in the tree + var cpb = ColorPickerButton.new() + cpb.color = color + cpb.rect_size = Vector2(50, 50) + set_drag_preview(cpb) + return color ---- diff --git a/classes/class_editorinspectorplugin.rst b/classes/class_editorinspectorplugin.rst index 748e87dc5..fe80d97c0 100644 --- a/classes/class_editorinspectorplugin.rst +++ b/classes/class_editorinspectorplugin.rst @@ -46,7 +46,7 @@ This plugins allows adding custom property editors to :ref:`EditorInspector`. -When an object is edited, the :ref:`can_handle` function is called and must return true if the object type is supported. +When an object is edited, the :ref:`can_handle` function is called and must return ``true`` if the object type is supported. If supported, the function :ref:`parse_begin` will be called, allowing to place custom controls at the beginning of the class. @@ -87,7 +87,7 @@ Adds an editor that allows modifying multiple properties, this must inherit :ref - :ref:`bool` **can_handle** **(** :ref:`Object` object **)** virtual -Returns true if this object can be handled by this plugin. +Returns ``true`` if this object can be handled by this plugin. ---- diff --git a/classes/class_httprequest.rst b/classes/class_httprequest.rst index 850a2d03a..c2833b1b6 100644 --- a/classes/class_httprequest.rst +++ b/classes/class_httprequest.rst @@ -16,7 +16,7 @@ HTTPRequest Brief Description ----------------- -A node with the ability to send HTTP requests. +A node with the ability to send HTTP(S) requests. Properties ---------- @@ -123,9 +123,42 @@ A node with the ability to send HTTP requests. Uses :ref:`HTTPClient` **save_exr** **(** :ref:`String` path, :ref:`bool` grayscale=false **)** const -Saves the image as an EXR file to ``path``. If grayscale is true and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return :ref:`@GlobalScope.ERR_UNAVAILABLE` if Godot was compiled without the TinyEXR module. +Saves the image as an EXR file to ``path``. If grayscale is ``true`` and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return :ref:`@GlobalScope.ERR_UNAVAILABLE` if Godot was compiled without the TinyEXR module. ---- @@ -824,6 +824,17 @@ Sets the :ref:`Color` of the pixel at ``(x, y)`` if the image is lo - void **set_pixelv** **(** :ref:`Vector2` dst, :ref:`Color` color **)** +Sets the :ref:`Color` of the pixel at ``(dst.x, dst.y)`` if the image is locked. Note that the ``dst`` values must be integers. Example: + +:: + + var img = Image.new() + img.create(img_width, img_height, false, Image.FORMAT_RGBA8) + img.lock() + img.set_pixelv(Vector2(x, y), color) # Works + img.unlock() + img.set_pixelv(Vector2(x, y), color) # Does not have an effect + ---- .. _class_Image_method_shrink_x2: diff --git a/classes/class_inputevent.rst b/classes/class_inputevent.rst index c315cacaa..c2a8a32bb 100644 --- a/classes/class_inputevent.rst +++ b/classes/class_inputevent.rst @@ -39,7 +39,7 @@ Methods +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_action` **(** :ref:`String` action **)** const | +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`String` action **)** const | +| :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`String` action, :ref:`bool` allow_echo=false **)** const | +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_action_released` **(** :ref:`String` action **)** const | +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -122,9 +122,9 @@ Returns ``true`` if this input event matches a pre-defined action of any type. .. _class_InputEvent_method_is_action_pressed: -- :ref:`bool` **is_action_pressed** **(** :ref:`String` action **)** const +- :ref:`bool` **is_action_pressed** **(** :ref:`String` action, :ref:`bool` allow_echo=false **)** const -Returns ``true`` if the given action is being pressed (and is not an echo event for :ref:`InputEventKey` events). Not relevant for events of type :ref:`InputEventMouseMotion` or :ref:`InputEventScreenDrag`. +Returns ``true`` if the given action is being pressed (and is not an echo event for :ref:`InputEventKey` events, unless ``allow_echo`` is ``true``). Not relevant for events of type :ref:`InputEventMouseMotion` or :ref:`InputEventScreenDrag`. ---- diff --git a/classes/class_inputeventmousemotion.rst b/classes/class_inputeventmousemotion.rst index b835c0c7c..9c8b05436 100644 --- a/classes/class_inputeventmousemotion.rst +++ b/classes/class_inputeventmousemotion.rst @@ -21,16 +21,20 @@ Input event type for mouse motion events. Properties ---------- ++-------------------------------+----------------------------------------------------------------+-----------------+ +| :ref:`float` | :ref:`pressure` | 0.0 | +-------------------------------+----------------------------------------------------------------+-----------------+ | :ref:`Vector2` | :ref:`relative` | Vector2( 0, 0 ) | +-------------------------------+----------------------------------------------------------------+-----------------+ | :ref:`Vector2` | :ref:`speed` | Vector2( 0, 0 ) | +-------------------------------+----------------------------------------------------------------+-----------------+ +| :ref:`Vector2` | :ref:`tilt` | Vector2( 0, 0 ) | ++-------------------------------+----------------------------------------------------------------+-----------------+ Description ----------- -Contains mouse motion information. Supports relative, absolute positions and speed. See :ref:`Node._input`. +Contains mouse and pen motion information. Supports relative, absolute positions and speed. See :ref:`Node._input`. Tutorials --------- @@ -40,6 +44,22 @@ Tutorials Property Descriptions --------------------- +.. _class_InputEventMouseMotion_property_pressure: + +- :ref:`float` **pressure** + ++-----------+---------------------+ +| *Default* | 0.0 | ++-----------+---------------------+ +| *Setter* | set_pressure(value) | ++-----------+---------------------+ +| *Getter* | get_pressure() | ++-----------+---------------------+ + +Represents the pressure the user puts on the pen. Ranges from ``0.0`` to ``1.0``. + +---- + .. _class_InputEventMouseMotion_property_relative: - :ref:`Vector2` **relative** @@ -70,3 +90,19 @@ The mouse position relative to the previous position (position at the last frame The mouse speed in pixels per second. +---- + +.. _class_InputEventMouseMotion_property_tilt: + +- :ref:`Vector2` **tilt** + ++-----------+-----------------+ +| *Default* | Vector2( 0, 0 ) | ++-----------+-----------------+ +| *Setter* | set_tilt(value) | ++-----------+-----------------+ +| *Getter* | get_tilt() | ++-----------+-----------------+ + +Represents the angles of tilt of the pen. Positive X-coordinate value indicates a tilt to the right. Positive Y-coordinate value indicates a tilt toward the user. Ranges from ``-1.0`` to ``1.0`` for both axes. + diff --git a/classes/class_os.rst b/classes/class_os.rst index 0b9e99615..866cc0edc 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -895,6 +895,10 @@ Returns the command line arguments passed to the engine. - :ref:`PoolStringArray` **get_connected_midi_inputs** **(** **)** +Returns an array of MIDI device names. + +The returned array will be empty if the system MIDI driver has not previously been initialised with :ref:`open_midi_inputs`. + ---- .. _class_OS_method_get_current_video_driver: @@ -1464,6 +1468,8 @@ Resumes native video playback. - void **open_midi_inputs** **(** **)** +Initialises the singleton for the system MIDI driver. + ---- .. _class_OS_method_print_all_resources: diff --git a/classes/class_particles.rst b/classes/class_particles.rst index 8033fafb2..36a89ab9b 100644 --- a/classes/class_particles.rst +++ b/classes/class_particles.rst @@ -422,6 +422,8 @@ Returns the axis-aligned bounding box that contains all the particles that are a - :ref:`Mesh` **get_draw_pass_mesh** **(** :ref:`int` pass **)** const +Returns the :ref:`Mesh` that is drawn at index ``pass``. + ---- .. _class_Particles_method_restart: @@ -436,3 +438,5 @@ Restarts the particle emission, clearing existing particles. - void **set_draw_pass_mesh** **(** :ref:`int` pass, :ref:`Mesh` mesh **)** +Sets the :ref:`Mesh` that is drawn at index ``pass``. + diff --git a/classes/class_plane.rst b/classes/class_plane.rst index f7ca926a7..2f55909dc 100644 --- a/classes/class_plane.rst +++ b/classes/class_plane.rst @@ -55,6 +55,8 @@ Methods +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`intersects_segment` **(** :ref:`Vector3` begin, :ref:`Vector3` end **)** | +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Plane` plane **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_point_over` **(** :ref:`Vector3` point **)** | +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Plane` | :ref:`normalized` **(** **)** | @@ -217,6 +219,12 @@ Returns the intersection point of a segment from position ``begin`` to position ---- +.. _class_Plane_method_is_equal_approx: + +- :ref:`bool` **is_equal_approx** **(** :ref:`Plane` plane **)** + +---- + .. _class_Plane_method_is_point_over: - :ref:`bool` **is_point_over** **(** :ref:`Vector3` point **)** diff --git a/classes/class_poolbytearray.rst b/classes/class_poolbytearray.rst index bfc8eba86..50cc08ded 100644 --- a/classes/class_poolbytearray.rst +++ b/classes/class_poolbytearray.rst @@ -30,6 +30,8 @@ Methods +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PoolByteArray` | :ref:`decompress` **(** :ref:`int` buffer_size, :ref:`int` compression_mode=0 **)** | +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`empty` **(** **)** | ++-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_string_from_ascii` **(** **)** | +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_string_from_utf8` **(** **)** | @@ -103,6 +105,14 @@ Returns a new ``PoolByteArray`` with the data decompressed. Set ``buffer_size`` ---- +.. _class_PoolByteArray_method_empty: + +- :ref:`bool` **empty** **(** **)** + +Returns ``true`` if the array is empty. + +---- + .. _class_PoolByteArray_method_get_string_from_ascii: - :ref:`String` **get_string_from_ascii** **(** **)** diff --git a/classes/class_poolcolorarray.rst b/classes/class_poolcolorarray.rst index b67c3acd1..6578ee1a9 100644 --- a/classes/class_poolcolorarray.rst +++ b/classes/class_poolcolorarray.rst @@ -26,6 +26,8 @@ Methods +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`append_array` **(** :ref:`PoolColorArray` array **)** | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`empty` **(** **)** | ++---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert` **(** :ref:`int` idx, :ref:`Color` color **)** | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`invert` **(** **)** | @@ -75,6 +77,14 @@ Appends a ``PoolColorArray`` at the end of this array. ---- +.. _class_PoolColorArray_method_empty: + +- :ref:`bool` **empty** **(** **)** + +Returns ``true`` if the array is empty. + +---- + .. _class_PoolColorArray_method_insert: - :ref:`int` **insert** **(** :ref:`int` idx, :ref:`Color` color **)** diff --git a/classes/class_poolintarray.rst b/classes/class_poolintarray.rst index 49a0811e0..c93aa07c0 100644 --- a/classes/class_poolintarray.rst +++ b/classes/class_poolintarray.rst @@ -26,6 +26,8 @@ Methods +-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ | void | :ref:`append_array` **(** :ref:`PoolIntArray` array **)** | +-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`empty` **(** **)** | ++-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert` **(** :ref:`int` idx, :ref:`int` integer **)** | +-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ | void | :ref:`invert` **(** **)** | @@ -77,6 +79,14 @@ Appends a ``PoolIntArray`` at the end of this array. ---- +.. _class_PoolIntArray_method_empty: + +- :ref:`bool` **empty** **(** **)** + +Returns ``true`` if the array is empty. + +---- + .. _class_PoolIntArray_method_insert: - :ref:`int` **insert** **(** :ref:`int` idx, :ref:`int` integer **)** diff --git a/classes/class_poolrealarray.rst b/classes/class_poolrealarray.rst index 7f8811a81..dc1bbe015 100644 --- a/classes/class_poolrealarray.rst +++ b/classes/class_poolrealarray.rst @@ -26,6 +26,8 @@ Methods +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`append_array` **(** :ref:`PoolRealArray` array **)** | +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`empty` **(** **)** | ++-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert` **(** :ref:`int` idx, :ref:`float` value **)** | +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`invert` **(** **)** | @@ -75,6 +77,14 @@ Appends a ``PoolRealArray`` at the end of this array. ---- +.. _class_PoolRealArray_method_empty: + +- :ref:`bool` **empty** **(** **)** + +Returns ``true`` if the array is empty. + +---- + .. _class_PoolRealArray_method_insert: - :ref:`int` **insert** **(** :ref:`int` idx, :ref:`float` value **)** diff --git a/classes/class_poolstringarray.rst b/classes/class_poolstringarray.rst index 35aaf2cf3..a84e2028e 100644 --- a/classes/class_poolstringarray.rst +++ b/classes/class_poolstringarray.rst @@ -26,6 +26,8 @@ Methods +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`append_array` **(** :ref:`PoolStringArray` array **)** | +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`empty` **(** **)** | ++-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert` **(** :ref:`int` idx, :ref:`String` string **)** | +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`invert` **(** **)** | @@ -77,6 +79,14 @@ Appends a ``PoolStringArray`` at the end of this array. ---- +.. _class_PoolStringArray_method_empty: + +- :ref:`bool` **empty** **(** **)** + +Returns ``true`` if the array is empty. + +---- + .. _class_PoolStringArray_method_insert: - :ref:`int` **insert** **(** :ref:`int` idx, :ref:`String` string **)** diff --git a/classes/class_poolvector2array.rst b/classes/class_poolvector2array.rst index d079e987f..3b49de54c 100644 --- a/classes/class_poolvector2array.rst +++ b/classes/class_poolvector2array.rst @@ -26,6 +26,8 @@ Methods +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`append_array` **(** :ref:`PoolVector2Array` array **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`empty` **(** **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert` **(** :ref:`int` idx, :ref:`Vector2` vector2 **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`invert` **(** **)** | @@ -75,6 +77,14 @@ Appends a ``PoolVector2Array`` at the end of this array. ---- +.. _class_PoolVector2Array_method_empty: + +- :ref:`bool` **empty** **(** **)** + +Returns ``true`` if the array is empty. + +---- + .. _class_PoolVector2Array_method_insert: - :ref:`int` **insert** **(** :ref:`int` idx, :ref:`Vector2` vector2 **)** diff --git a/classes/class_poolvector3array.rst b/classes/class_poolvector3array.rst index 1ed141a1b..7784897c7 100644 --- a/classes/class_poolvector3array.rst +++ b/classes/class_poolvector3array.rst @@ -26,6 +26,8 @@ Methods +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`append_array` **(** :ref:`PoolVector3Array` array **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`empty` **(** **)** | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert` **(** :ref:`int` idx, :ref:`Vector3` vector3 **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`invert` **(** **)** | @@ -75,6 +77,14 @@ Appends a ``PoolVector3Array`` at the end of this array. ---- +.. _class_PoolVector3Array_method_empty: + +- :ref:`bool` **empty** **(** **)** + +Returns ``true`` if the array is empty. + +---- + .. _class_PoolVector3Array_method_insert: - :ref:`int` **insert** **(** :ref:`int` idx, :ref:`Vector3` vector3 **)** diff --git a/classes/class_popupmenu.rst b/classes/class_popupmenu.rst index 6cc098418..ce3a1952a 100644 --- a/classes/class_popupmenu.rst +++ b/classes/class_popupmenu.rst @@ -647,7 +647,7 @@ Sets whether the item at index ``idx`` has a checkbox. If ``false``, sets the ty - void **set_item_as_radio_checkable** **(** :ref:`int` idx, :ref:`bool` enable **)** -Sets the type of the item at the specified index ``idx`` to radio button. If false, sets the type of the item to plain text. +Sets the type of the item at the specified index ``idx`` to radio button. If ``false``, sets the type of the item to plain text. ---- diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index bf1563cfb..6e9e9b2e6 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -94,6 +94,8 @@ Properties +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debug/gdscript/warnings/enable` | true | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`debug/gdscript/warnings/exclude_addons` | true | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debug/gdscript/warnings/function_conflicts_constant` | true | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debug/gdscript/warnings/function_conflicts_variable` | true | @@ -192,8 +194,6 @@ Properties +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`display/window/vsync/use_vsync` | true | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editor/active` | false | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`editor/script_templates_search_path` | "res://script_templates" | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PoolStringArray` | :ref:`editor/search_in_file_extensions` | PoolStringArray( "gd", "shader" ) | @@ -1050,6 +1050,18 @@ If ``true``, enables specific GDScript warnings (see ``debug/gdscript/warnings/* ---- +.. _class_ProjectSettings_property_debug/gdscript/warnings/exclude_addons: + +- :ref:`bool` **debug/gdscript/warnings/exclude_addons** + ++-----------+------+ +| *Default* | true | ++-----------+------+ + +If ``true``, scripts in the ``res://addons`` folder will not generate warnings. + +---- + .. _class_ProjectSettings_property_debug/gdscript/warnings/function_conflicts_constant: - :ref:`bool` **debug/gdscript/warnings/function_conflicts_constant** @@ -1636,18 +1648,6 @@ If ``true``, enables vertical synchronization. This eliminates tearing that may ---- -.. _class_ProjectSettings_property_editor/active: - -- :ref:`bool` **editor/active** - -+-----------+-------+ -| *Default* | false | -+-----------+-------+ - -Internal editor setting, don't touch. - ----- - .. _class_ProjectSettings_property_editor/script_templates_search_path: - :ref:`String` **editor/script_templates_search_path** @@ -3810,6 +3810,8 @@ Saves the configuration to a custom file. - void **set_initial_value** **(** :ref:`String` name, :ref:`Variant` value **)** +Sets the specified property's initial value. This is the value the property reverts to. + ---- .. _class_ProjectSettings_method_set_order: @@ -3824,3 +3826,11 @@ Sets the order of a configuration value (influences when saved to the config fil - void **set_setting** **(** :ref:`String` name, :ref:`Variant` value **)** +Sets the value of a setting. + +**Example:** + +:: + + ProjectSettings.set_setting("application/config/name", "Example") + diff --git a/classes/class_quat.rst b/classes/class_quat.rst index a36c8f913..ba03558a0 100644 --- a/classes/class_quat.rst +++ b/classes/class_quat.rst @@ -49,6 +49,8 @@ Methods +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Quat` | :ref:`inverse` **(** **)** | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Quat` quat **)** | ++-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_normalized` **(** **)** | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`length` **(** **)** | @@ -199,6 +201,12 @@ Returns the inverse of the quaternion. ---- +.. _class_Quat_method_is_equal_approx: + +- :ref:`bool` **is_equal_approx** **(** :ref:`Quat` quat **)** + +---- + .. _class_Quat_method_is_normalized: - :ref:`bool` **is_normalized** **(** **)** diff --git a/classes/class_raycast.rst b/classes/class_raycast.rst index b17c572fa..0ffe2fe1a 100644 --- a/classes/class_raycast.rst +++ b/classes/class_raycast.rst @@ -79,6 +79,11 @@ Only enabled raycasts will be able to query the space and report collisions. RayCast calculates intersection every physics frame (see :ref:`Node`), and the result is cached so it can be used later until the next frame. If multiple queries are required between physics frames (or during the same frame), use :ref:`force_raycast_update` after adjusting the raycast. +Tutorials +--------- + +- :doc:`../tutorials/physics/ray-casting` + Property Descriptions --------------------- diff --git a/classes/class_raycast2d.rst b/classes/class_raycast2d.rst index 8fee70f76..fee6e1731 100644 --- a/classes/class_raycast2d.rst +++ b/classes/class_raycast2d.rst @@ -79,6 +79,11 @@ Only enabled raycasts will be able to query the space and report collisions. RayCast2D calculates intersection every physics frame (see :ref:`Node`), and the result is cached so it can be used later until the next frame. If multiple queries are required between physics frames (or during the same frame) use :ref:`force_raycast_update` after adjusting the raycast. +Tutorials +--------- + +- :doc:`../tutorials/physics/ray-casting` + Property Descriptions --------------------- diff --git a/classes/class_rect2.rst b/classes/class_rect2.rst index 9dfe42ba6..8b2a8b786 100644 --- a/classes/class_rect2.rst +++ b/classes/class_rect2.rst @@ -57,6 +57,8 @@ Methods +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`intersects` **(** :ref:`Rect2` b **)** | +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Rect2` rect **)** | ++---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2` | :ref:`merge` **(** :ref:`Rect2` b **)** | +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -212,6 +214,12 @@ Returns ``true`` if the ``Rect2`` overlaps with another. ---- +.. _class_Rect2_method_is_equal_approx: + +- :ref:`bool` **is_equal_approx** **(** :ref:`Rect2` rect **)** + +---- + .. _class_Rect2_method_merge: - :ref:`Rect2` **merge** **(** :ref:`Rect2` b **)** diff --git a/classes/class_softbody.rst b/classes/class_softbody.rst index f3b741f11..d1c0f0b12 100644 --- a/classes/class_softbody.rst +++ b/classes/class_softbody.rst @@ -40,6 +40,8 @@ Properties +---------------------------------+-------------------------------------------------------------------------------------+--------------+ | :ref:`float` | :ref:`pressure_coefficient` | 0.0 | +---------------------------------+-------------------------------------------------------------------------------------+--------------+ +| :ref:`bool` | :ref:`ray_pickable` | true | ++---------------------------------+-------------------------------------------------------------------------------------+--------------+ | :ref:`int` | :ref:`simulation_precision` | 5 | +---------------------------------+-------------------------------------------------------------------------------------+--------------+ | :ref:`float` | :ref:`total_mass` | 1.0 | @@ -59,22 +61,23 @@ Methods +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_collision_mask_bit` **(** :ref:`int` bit **)** const | +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_ray_pickable` **(** **)** const | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_collision_exception_with` **(** :ref:`Node` body **)** | +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_collision_layer_bit` **(** :ref:`int` bit, :ref:`bool` value **)** | +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_collision_mask_bit` **(** :ref:`int` bit, :ref:`bool` value **)** | +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_ray_pickable` **(** :ref:`bool` ray_pickable **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ Description ----------- A deformable physics body. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials. +Tutorials +--------- + +- :doc:`../tutorials/physics/soft_body` + Property Descriptions --------------------- @@ -104,7 +107,7 @@ Property Descriptions | *Getter* | get_collision_layer() | +-----------+----------------------------+ -The physics layers this area is in. +The physics layers this SoftBody is in. Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property. @@ -124,7 +127,7 @@ A contact is detected if object A is in any of the layers that object B scans, o | *Getter* | get_collision_mask() | +-----------+---------------------------+ -The physics layers this area scans for collisions. +The physics layers this SoftBody scans for collisions. ---- @@ -182,6 +185,8 @@ The physics layers this area scans for collisions. | *Getter* | get_parent_collision_ignore() | +-----------+------------------------------------+ +:ref:`NodePath` to a :ref:`CollisionObject` this SoftBody should avoid clipping. + ---- .. _class_SoftBody_property_pose_matching_coefficient: @@ -212,6 +217,22 @@ The physics layers this area scans for collisions. ---- +.. _class_SoftBody_property_ray_pickable: + +- :ref:`bool` **ray_pickable** + ++-----------+-------------------------+ +| *Default* | true | ++-----------+-------------------------+ +| *Setter* | set_ray_pickable(value) | ++-----------+-------------------------+ +| *Getter* | is_ray_pickable() | ++-----------+-------------------------+ + +If ``true``, the ``SoftBody`` will respond to :ref:`RayCast`\ s. + +---- + .. _class_SoftBody_property_simulation_precision: - :ref:`int` **simulation_precision** @@ -240,6 +261,8 @@ Increasing this value will improve the resulting simulation, but can affect perf | *Getter* | get_total_mass() | +-----------+-----------------------+ +The SoftBody's mass. + ---- .. _class_SoftBody_property_volume_stiffness: @@ -289,12 +312,6 @@ Returns an individual bit on the collision mask. ---- -.. _class_SoftBody_method_is_ray_pickable: - -- :ref:`bool` **is_ray_pickable** **(** **)** const - ----- - .. _class_SoftBody_method_remove_collision_exception_with: - void **remove_collision_exception_with** **(** :ref:`Node` body **)** @@ -317,9 +334,3 @@ Sets individual bits on the layer mask. Use this if you only need to change one Sets individual bits on the collision mask. Use this if you only need to change one layer's value. ----- - -.. _class_SoftBody_method_set_ray_pickable: - -- void **set_ray_pickable** **(** :ref:`bool` ray_pickable **)** - diff --git a/classes/class_spatial.rst b/classes/class_spatial.rst index a74d9dba0..b4f5e77d6 100644 --- a/classes/class_spatial.rst +++ b/classes/class_spatial.rst @@ -286,6 +286,8 @@ Method Descriptions - void **force_update_transform** **(** **)** +Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations. + ---- .. _class_Spatial_method_get_parent_spatial: @@ -316,6 +318,8 @@ Rotates the global (world) transformation around axis, a unit :ref:`Vector3` scale **)** +Scales the global (world) transformation by the given :ref:`Vector3` scale factors. + ---- .. _class_Spatial_method_global_translate: @@ -346,6 +350,8 @@ Returns whether node notifies about its local transformation changes. ``Spatial` - :ref:`bool` **is_scale_disabled** **(** **)** const +Returns whether this node uses a scale of ``(1, 1, 1)`` or its local transformation scale. + ---- .. _class_Spatial_method_is_set_as_toplevel: @@ -460,6 +466,8 @@ Makes the node ignore its parents transformations. Node transformations are only - void **set_disable_scale** **(** :ref:`bool` disable **)** +Sets whether the node uses a scale of ``(1, 1, 1)`` or its local transformation scale. Changes to the local transformation scale are preserved. + ---- .. _class_Spatial_method_set_identity: diff --git a/classes/class_string.rst b/classes/class_string.rst index e6382f4da..79ca4035e 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -610,7 +610,7 @@ Converts ``size`` represented as number of bytes to human-readable format using - :ref:`String` **insert** **(** :ref:`int` position, :ref:`String` what **)** -Inserts a substring at a given position. +Returns a copy of the string with the substring ``what`` inserted at the given position. ---- diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index 492e60cca..a1ef9c806 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -315,6 +315,20 @@ enum **SearchFlags**: ---- +.. _enum_TextEdit_SearchResult: + +.. _class_TextEdit_constant_SEARCH_RESULT_COLUMN: + +.. _class_TextEdit_constant_SEARCH_RESULT_LINE: + +enum **SearchResult**: + +- **SEARCH_RESULT_COLUMN** = **0** --- Used to access the result column from :ref:`search`. + +- **SEARCH_RESULT_LINE** = **1** --- Used to access the result line from :ref:`search`. + +---- + .. _enum_TextEdit_MenuItems: .. _class_TextEdit_constant_MENU_CUT: @@ -335,7 +349,7 @@ enum **SearchFlags**: enum **MenuItems**: -- **MENU_CUT** = **0** --- Cuts (Copies and clears) the selected text. +- **MENU_CUT** = **0** --- Cuts (copies and clears) the selected text. - **MENU_COPY** = **1** --- Copies the selected text. @@ -814,7 +828,7 @@ Returns the line the editing cursor is at. Moves the cursor at the specified ``column`` index. -If ``adjust_viewport`` is set to true, the viewport will center at the cursor position after the move occurs. +If ``adjust_viewport`` is set to ``true``, the viewport will center at the cursor position after the move occurs. ---- @@ -824,9 +838,9 @@ If ``adjust_viewport`` is set to true, the viewport will center at the cursor po Moves the cursor at the specified ``line`` index. -If ``adjust_viewport`` is set to true, the viewport will center at the cursor position after the move occurs. +If ``adjust_viewport`` is set to ``true``, the viewport will center at the cursor position after the move occurs. -If ``can_be_hidden`` is set to true, the specified ``line`` can be hidden using :ref:`set_line_as_hidden`. +If ``can_be_hidden`` is set to ``true``, the specified ``line`` can be hidden using :ref:`set_line_as_hidden`. ---- @@ -1026,7 +1040,17 @@ Removes all the breakpoints. This will not fire the :ref:`breakpoint_toggled` **search** **(** :ref:`String` key, :ref:`int` flags, :ref:`int` from_line, :ref:`int` from_column **)** const -Perform a search inside the text. Search flags can be specified in the``SEARCH_*`` enum. +Perform a search inside the text. Search flags can be specified in the :ref:`SearchFlags` enum. + +Returns an empty ``PoolIntArray`` if no result was found. Otherwise, the result line and column can be accessed at indices specified in the :ref:`SearchResult` enum, e.g: + +:: + + var result = search(key, flags, line, column) + if result.size() > 0: + # result found + var res_line = result[TextEdit.SEARCH_RESULT_LINE] + var res_column = result[TextEdit.SEARCH_RESULT_COLUMN] ---- diff --git a/classes/class_theme.rst b/classes/class_theme.rst index 81b01e9dd..225802522 100644 --- a/classes/class_theme.rst +++ b/classes/class_theme.rst @@ -124,6 +124,8 @@ Method Descriptions - void **clear** **(** **)** +Clears all values on the theme. + ---- .. _class_Theme_method_clear_color: @@ -178,6 +180,8 @@ Sets the Theme's values to a copy of the default theme values. - void **copy_theme** **(** :ref:`Theme` other **)** +Sets the Theme's values to a copy of a given theme. + ---- .. _class_Theme_method_get_color: diff --git a/classes/class_tilemap.rst b/classes/class_tilemap.rst index 70c987dca..d274babd2 100644 --- a/classes/class_tilemap.rst +++ b/classes/class_tilemap.rst @@ -212,6 +212,8 @@ Property Descriptions | *Getter* | get_clip_uv() | +-----------+--------------------+ +If ``true``, the cell's UVs will be clipped. + ---- .. _class_TileMap_property_cell_custom_transform: @@ -420,6 +422,8 @@ If ``true``, TileMap collisions will be handled as a kinematic body. If ``false` | *Getter* | get_collision_use_parent() | +-----------+---------------------------------+ +If ``true``, this tilemap's collision shape will be added to the collision shape of the parent. The parent has to be a :ref:`CollisionObject2D`. + ---- .. _class_TileMap_property_compatibility_mode: @@ -517,6 +521,8 @@ Returns the tile index of the given cell. If no tile exists in the cell, returns - :ref:`Vector2` **get_cell_autotile_coord** **(** :ref:`int` x, :ref:`int` y **)** const +Returns the coordinate of the autotile variation in the tileset. Returns a zero vector if the cell doesn't have autotiling. + ---- .. _class_TileMap_method_get_cellv: diff --git a/classes/class_touchscreenbutton.rst b/classes/class_touchscreenbutton.rst index c235155df..80cd26932 100644 --- a/classes/class_touchscreenbutton.rst +++ b/classes/class_touchscreenbutton.rst @@ -188,7 +188,7 @@ The button's shape. | *Getter* | is_shape_centered() | +-----------+---------------------------+ -If ``true``, the button's shape is centered. +If ``true``, the button's shape is centered in the provided texture. If no texture is used, this property has no effect. ---- diff --git a/classes/class_transform.rst b/classes/class_transform.rst index 8516e28af..ae24d553b 100644 --- a/classes/class_transform.rst +++ b/classes/class_transform.rst @@ -45,6 +45,8 @@ Methods +-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform` | :ref:`inverse` **(** **)** | +-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Transform` transform **)** | ++-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform` | :ref:`looking_at` **(** :ref:`Vector3` target, :ref:`Vector3` up **)** | +-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform` | :ref:`orthonormalized` **(** **)** | @@ -175,6 +177,12 @@ Returns the inverse of the transform, under the assumption that the transformati ---- +.. _class_Transform_method_is_equal_approx: + +- :ref:`bool` **is_equal_approx** **(** :ref:`Transform` transform **)** + +---- + .. _class_Transform_method_looking_at: - :ref:`Transform` **looking_at** **(** :ref:`Vector3` target, :ref:`Vector3` up **)** diff --git a/classes/class_transform2d.rst b/classes/class_transform2d.rst index 5b6e6674e..f2b9793b4 100644 --- a/classes/class_transform2d.rst +++ b/classes/class_transform2d.rst @@ -53,6 +53,8 @@ Methods +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform2D` | :ref:`inverse` **(** **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Transform2D` transform **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform2D` | :ref:`orthonormalized` **(** **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform2D` | :ref:`rotated` **(** :ref:`float` phi **)** | @@ -210,6 +212,12 @@ Returns the inverse of the transform, under the assumption that the transformati ---- +.. _class_Transform2D_method_is_equal_approx: + +- :ref:`bool` **is_equal_approx** **(** :ref:`Transform2D` transform **)** + +---- + .. _class_Transform2D_method_orthonormalized: - :ref:`Transform2D` **orthonormalized** **(** **)** diff --git a/classes/class_variant.rst b/classes/class_variant.rst index d628311d3..b3f7d83d9 100644 --- a/classes/class_variant.rst +++ b/classes/class_variant.rst @@ -19,8 +19,48 @@ The most important data type in Godot. Description ----------- +In computer programming, a Variant class is a class that is designed to store a variety of other types. Dynamic programming languages like PHP, Lua, JavaScript and GDScript like to use them to store variables' data on the backend. With these Variants, properties are able to change value types freely. + +:: + + var foo = 2 # foo is dynamically an integer + foo = "Now foo is a string!" + foo = Reference.new() # foo is an Object + var bar: int = 2 # bar is a statically typed integer. + # bar = "Uh oh! I can't make static variables become a different type!" + +Godot tracks all scripting API variables within Variants. Without even realizing it, you use Variants all the time. When a particular language enforces its own rules for keeping data typed, then that language is applying its own custom logic over the base Variant scripting API. + +- GDScript automatically wrap values in them. It keeps all data in plain Variants by default and then optionally enforces custom static typing rules on variable types. + +- VisualScript tracks properties inside Variants as well, but it also uses static typing. The GUI interface enforces that properties have a particular type that doesn't change over time. + +- C# is statically typed, but uses the Mono ``object`` type in place of Godot's Variant class when it needs to represent a dynamic value. ``object`` is the Mono runtime's equivalent of the same concept. + +- The statically-typed language NativeScript C++ does not define a built-in Variant-like class. Godot's GDNative bindings provide their own godot::Variant class for users; Any point at which the C++ code starts interacting with the Godot runtime is a place where you might have to start wrapping data inside Variant objects. + +The global :ref:`@GDScript.typeof` function returns the enumerated value of the Variant type stored in the current variable. These correspond to ``TYPE_*`` constants in the :ref:`@GlobalScope` docs. + +:: + + var foo = 2 + match typeof(foo): + TYPE_NIL: + print("foo is null") + TYPE_INTEGER: + print("foo is an integer") + TYPE_OBJECT: + # Note that Objects are their own special category. + # To get the name of the underlying Object type, you need the `get_class()` method. + print("foo is a(n) %s" % foo.get_class()) # inject the class name into a formatted string. + # Note also that there is not yet any way to get a script's `class_name` string easily. + # To fetch that value, you need to dig deeply into a hidden ProjectSettings setting: an Array of Dictionaries called "_global_script_classes". + # Open your project.godot file to see it up close. + A Variant takes up only 20 bytes and can store almost any engine datatype inside of it. Variants are rarely used to hold information for long periods of time. Instead, they are used mainly for communication, editing, serialization and moving data around. +Godot has specifically invested in making its Variant class as flexible as possible; so much so that it is used for a multitude of operations to facilitate communication between all of Godot's systems. + A Variant: - Can store almost any datatype. @@ -43,7 +83,12 @@ A Variant: - Can be used for dictionaries, arrays, parsers, etc. -**Containers (:ref:`Array` and :ref:`Dictionary`):** Both are implemented using variants. A :ref:`Dictionary` can match any datatype used as key to any other datatype. An :ref:`Array` just holds an array of Variants. Of course, a Variant can also hold a :ref:`Dictionary` and an :ref:`Array` inside, making it even more flexible. +**Containers (Array and Dictionary):** Both are implemented using variants. A :ref:`Dictionary` can match any datatype used as key to any other datatype. An :ref:`Array` just holds an array of Variants. Of course, a Variant can also hold a :ref:`Dictionary` and an :ref:`Array` inside, making it even more flexible. Modifications to a container will modify all references to it. A :ref:`Mutex` should be created to lock it if multi-threaded access is desired. +Tutorials +--------- + +- :doc:`../development/cpp/variant_class` + diff --git a/classes/class_vector2.rst b/classes/class_vector2.rst index 0c694d911..e3e613a3f 100644 --- a/classes/class_vector2.rst +++ b/classes/class_vector2.rst @@ -61,6 +61,8 @@ Methods +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`floor` **(** **)** | +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Vector2` v **)** | ++-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_normalized` **(** **)** | +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`length` **(** **)** | @@ -303,6 +305,12 @@ Returns the vector with all components rounded down. ---- +.. _class_Vector2_method_is_equal_approx: + +- :ref:`bool` **is_equal_approx** **(** :ref:`Vector2` v **)** + +---- + .. _class_Vector2_method_is_normalized: - :ref:`bool` **is_normalized** **(** **)** diff --git a/classes/class_vector3.rst b/classes/class_vector3.rst index fc43c6bc6..73af951a7 100644 --- a/classes/class_vector3.rst +++ b/classes/class_vector3.rst @@ -57,6 +57,8 @@ Methods +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`inverse` **(** **)** | +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Vector3` v **)** | ++-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_normalized` **(** **)** | +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`length` **(** **)** | @@ -303,6 +305,12 @@ Returns the inverse of the vector. This is the same as ``Vector3( 1.0 / v.x, 1.0 ---- +.. _class_Vector3_method_is_equal_approx: + +- :ref:`bool` **is_equal_approx** **(** :ref:`Vector3` v **)** + +---- + .. _class_Vector3_method_is_normalized: - :ref:`bool` **is_normalized** **(** **)** diff --git a/classes/class_visualshadernodeinput.rst b/classes/class_visualshadernodeinput.rst index 0ef85e9d8..d8252057d 100644 --- a/classes/class_visualshadernodeinput.rst +++ b/classes/class_visualshadernodeinput.rst @@ -27,6 +27,13 @@ Properties | :ref:`String` | :ref:`input_name` | "[None]" | +-----------------------------+--------------------------------------------------------------------+-------------+ +Methods +------- + ++-----------------------------+------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_input_real_name` **(** **)** const | ++-----------------------------+------------------------------------------------------------------------------------------------------+ + Signals ------- @@ -49,3 +56,10 @@ Property Descriptions | *Getter* | get_input_name() | +-----------+-----------------------+ +Method Descriptions +------------------- + +.. _class_VisualShaderNodeInput_method_get_input_real_name: + +- :ref:`String` **get_input_real_name** **(** **)** const +