diff --git a/about/faq.rst b/about/faq.rst index 58da3c68f407..79ddcbfd35c6 100644 --- a/about/faq.rst +++ b/about/faq.rst @@ -275,11 +275,11 @@ data directory. This is usually a good approach, but this means configuration fi will not carry across machines if you copy the folder containing the Godot executable. See :ref:`doc_data_paths` for more information. -If *true* portable operation is desired (e.g. for use on an USB stick), +If *true* portable operation is desired (e.g. for use on a USB stick), follow the steps in :ref:`doc_data_paths_self_contained_mode`. -Why does Godot use Vulkan or OpenGL instead of Direct3D? --------------------------------------------------------- +Why does Godot prioritize Vulkan and OpenGL over Direct3D? +---------------------------------------------------------- Godot aims for cross-platform compatibility and open standards first and foremost. OpenGL and Vulkan are the technologies that are both open and @@ -287,14 +287,11 @@ available on (nearly) all platforms. Thanks to this design decision, a project developed with Godot on Windows will run out of the box on Linux, macOS, and more. -Since Godot only has a few people working on its renderer, we would prefer -having fewer rendering backends to maintain. On top of that, using a single API -on all platforms allows for greater consistency with fewer platform-specific -issues. - -In the long term, we may develop a Direct3D 12 renderer for Godot (mainly for -Xbox), but Vulkan and OpenGL will remain the default rendering -backends on all platforms, including Windows. +While Vulkan and OpenGL remain our primary focus for their open standard and +cross-platform benefits, Godot 4.3 introduced experimental support for Direct3D 12. +This addition aims to enhance performance and compatibility on platforms where +Direct3D 12 is prevalent, such as Windows and Xbox. However, Vulkan and OpenGL +will continue as the default rendering backends on all platforms, including Windows. Why does Godot aim to keep its core feature set small? ------------------------------------------------------ diff --git a/about/list_of_features.rst b/about/list_of_features.rst index 82f9a8edd57f..91c14e7e816a 100644 --- a/about/list_of_features.rst +++ b/about/list_of_features.rst @@ -291,7 +291,7 @@ Rendering - Does not rely on run-time mesh generation. This means decals can be used on complex skinned meshes with no performance penalty, even if the decal moves every frame. - Support for nearest, bilinear, trilinear or anisotropic texture filtering (configured globally). -- Optional distance fade system to fade distant lights and their shadows, improving performance. +- Optional distance fade system to fade distant decals, improving performance. - When using the Forward+ backend (default on desktop), decals are rendered with clustered forward optimizations to decrease their individual cost. Clustered rendering also lifts any limits on the number of decals that can be used on a mesh. diff --git a/about/system_requirements.rst b/about/system_requirements.rst index f90134f6e428..73a8ecc6cde1 100644 --- a/about/system_requirements.rst +++ b/about/system_requirements.rst @@ -69,7 +69,7 @@ Desktop or laptop PC - Minimum Vulkan drivers for these Windows versions are known to have issues with memory leaks. As a result, it's recommended to stick to the Compatibility - rendering method when running Godot on an Windows version older than 10. + rendering method when running Godot on a Windows version older than 10. Mobile device (smartphone/tablet) - Minimum ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -252,7 +252,7 @@ Desktop or laptop PC - Minimum Vulkan drivers for these Windows versions are known to have issues with memory leaks. As a result, it's recommended to stick to the Compatibility - rendering method when running Godot on an Windows version older than 10. + rendering method when running Godot on a Windows version older than 10. Mobile device (smartphone/tablet) - Minimum ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index 041f71a42a51..efd80ae5fdef 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -788,6 +788,10 @@ The order of ``mode``, ``sync`` and ``transfer_mode`` does not matter, but value Make a script with static variables to not persist after all references are lost. If the script is loaded again the static variables will revert to their default values. +\ **Note:** As annotations describe their subject, the :ref:`@static_unload` annotation must be placed before the class definition and inheritance. + +\ **Warning:** Currently, due to a bug, scripts are never freed, even if :ref:`@static_unload` annotation is used. + .. rst-class:: classref-item-separator ---- @@ -877,6 +881,8 @@ An optional ``message`` can be shown in addition to the generic "Assertion faile assert(speed >= 0 and speed < 20) # You can also combine the two conditional statements in one check. assert(speed < 20, "the speed limit is 20") # Show a message. +\ **Note:** :ref:`assert` is a keyword, not a function. So you cannot access it as a :ref:`Callable` or use it inside expressions. + .. rst-class:: classref-item-separator ---- @@ -955,7 +961,7 @@ Returns an array of dictionaries representing the current call stack. See also : Starting from ``_ready()``, ``bar()`` would print: -.. code:: +.. code:: text [{function:bar, line:12, source:res://script.gd}, {function:foo, line:9, source:res://script.gd}, {function:_ready, line:6, source:res://script.gd}] @@ -987,7 +993,7 @@ Returns the passed ``instance`` converted to a Dictionary. Can be useful for ser Prints out: -.. code:: +.. code:: text [@subpath, @path, foo] [, res://test.gd, bar] @@ -1010,7 +1016,7 @@ Returns ``true`` if ``value`` is an instance of ``type``. The ``type`` value mus - A :ref:`Script` (you can use any class, including inner one). -Unlike the right operand of the ``is`` operator, ``type`` can be a non-constant value. The ``is`` operator supports more features (such as typed arrays) and is more performant. Use the operator instead of this method if you do not need dynamic type checking. +Unlike the right operand of the ``is`` operator, ``type`` can be a non-constant value. The ``is`` operator supports more features (such as typed arrays). Use the operator instead of this method if you do not need dynamic type checking. Examples: @@ -1064,7 +1070,7 @@ Returns a :ref:`Resource` from the filesystem located at the abs # Load a scene called "main" located in the root of the project directory and cache it in a variable. var main = load("res://main.tscn") # main will contain a PackedScene resource. -\ **Important:** The path must be absolute. A relative path will always return ``null``. +\ **Important:** Relative paths are *not* relative to the script calling this method, instead it is prefixed with ``"res://"``. Loading from relative paths might not work as expected. This function is a simplified version of :ref:`ResourceLoader.load`, which can be used for more advanced scenarios. @@ -1091,6 +1097,8 @@ Returns a :ref:`Resource` from the filesystem located at ``path` # Create instance of a scene. var diamond = preload("res://diamond.tscn").instantiate() +\ **Note:** :ref:`preload` is a keyword, not a function. So you cannot access it as a :ref:`Callable`. + .. rst-class:: classref-item-separator ---- @@ -1105,7 +1113,7 @@ Like :ref:`@GlobalScope.print`, but includes th The output in the console may look like the following: -.. code:: +.. code:: text Test print At: res://test.gd:15:_process() @@ -1126,7 +1134,7 @@ Prints a stack trace at the current code location. See also :ref:`get_stack` backwards, use: Output: -.. code:: +.. code:: text 9 6 @@ -1190,7 +1198,7 @@ To iterate over :ref:`float`, convert them in the loop. Output: -.. code:: +.. code:: text 0.3 0.2 diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 4dded3653af7..8fa65f006201 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -5715,7 +5715,7 @@ Converts an angle expressed in degrees to radians. Returns an "eased" value of ``x`` based on an easing function defined with ``curve``. This easing function is based on an exponent. The ``curve`` can be any floating-point number, with specific values leading to the following behaviors: -:: +.. code:: text - Lower than -1.0 (exclusive): Ease in-out - 1.0: Linear @@ -5856,9 +5856,9 @@ Returns the floating-point modulus of ``x`` divided by ``y``, wrapping equally i var x = i * 0.5 - 1.5 print("%4.1f %4.1f | %4.1f" % [x, fmod(x, 1.5), fposmod(x, 1.5)]) -Produces: +Prints: -:: +.. code:: text (x) (fmod(x, 1.5)) (fposmod(x, 1.5)) -1.5 -0.0 | 0.0 @@ -6374,9 +6374,9 @@ Returns the integer modulus of ``x`` divided by ``y`` that wraps equally in posi for i in range(-3, 4): print("%2d %2d | %2d" % [i, i % 3, posmod(i, 3)]) -Produces: +Prints: -:: +.. code:: text (i) (i % 3) (posmod(i, 3)) -3 0 | 0 @@ -6523,6 +6523,8 @@ Prints one or more arguments to strings in the best way possible to standard err Prints one or more arguments to strings in the best way possible to the OS terminal. Unlike :ref:`print`, no newline is automatically added at the end. +\ **Note:** The OS terminal is *not* the same as the editor's Output dock. The output sent to the OS terminal can be seen when running Godot from a terminal. On Windows, this requires using the ``console.exe`` executable. + .. tabs:: @@ -6849,7 +6851,7 @@ For complex use cases where multiple ranges are needed, consider using :ref:`Cur :ref:`int` **rid_allocate_id**\ (\ ) -Allocates a unique ID which can be used by the implementation to construct a RID. This is used mainly from native extensions to implement servers. +Allocates a unique ID which can be used by the implementation to construct an RID. This is used mainly from native extensions to implement servers. .. rst-class:: classref-item-separator @@ -6861,7 +6863,7 @@ Allocates a unique ID which can be used by the implementation to construct a RID :ref:`RID` **rid_from_int64**\ (\ base\: :ref:`int`\ ) -Creates a RID from a ``base``. This is used mainly from native extensions to build servers. +Creates an RID from a ``base``. This is used mainly from native extensions to build servers. .. rst-class:: classref-item-separator @@ -7396,7 +7398,7 @@ Converts a :ref:`Variant` ``variable`` to a formatted :ref:`Strin Prints: -:: +.. code:: text { "a": 1, diff --git a/classes/class_acceptdialog.rst b/classes/class_acceptdialog.rst index a3c3bf190afa..98cde8d74467 100644 --- a/classes/class_acceptdialog.rst +++ b/classes/class_acceptdialog.rst @@ -72,9 +72,9 @@ Methods +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Button` | :ref:`get_ok_button`\ (\ ) | +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`register_text_enter`\ (\ line_edit\: :ref:`Control`\ ) | + | |void| | :ref:`register_text_enter`\ (\ line_edit\: :ref:`LineEdit`\ ) | +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`remove_button`\ (\ button\: :ref:`Control`\ ) | + | |void| | :ref:`remove_button`\ (\ button\: :ref:`Button`\ ) | +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -295,7 +295,7 @@ Returns the OK :ref:`Button` instance. .. rst-class:: classref-method -|void| **register_text_enter**\ (\ line_edit\: :ref:`Control`\ ) +|void| **register_text_enter**\ (\ line_edit\: :ref:`LineEdit`\ ) Registers a :ref:`LineEdit` in the dialog. When the enter key is pressed, the dialog will be accepted. @@ -307,7 +307,7 @@ Registers a :ref:`LineEdit` in the dialog. When the enter key is .. rst-class:: classref-method -|void| **remove_button**\ (\ button\: :ref:`Control`\ ) +|void| **remove_button**\ (\ button\: :ref:`Button`\ ) Removes the ``button`` from the dialog. Does NOT free the ``button``. The ``button`` must be a :ref:`Button` added with :ref:`add_button` or :ref:`add_cancel_button` method. After removal, pressing the ``button`` will no longer emit this dialog's :ref:`custom_action` or :ref:`canceled` signals. diff --git a/classes/class_animatablebody3d.rst b/classes/class_animatablebody3d.rst index de772ac6151b..a49d1d641802 100644 --- a/classes/class_animatablebody3d.rst +++ b/classes/class_animatablebody3d.rst @@ -28,11 +28,11 @@ When **AnimatableBody3D** is moved, its linear and angular velocity are estimate Tutorials --------- -- `3D Physics Tests Demo `__ +- `3D Physics Tests Demo `__ -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ -- `3D Voxel Demo `__ +- `3D Voxel Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_animatedsprite2d.rst b/classes/class_animatedsprite2d.rst index fa2086b23dd1..ddaf8317fb53 100644 --- a/classes/class_animatedsprite2d.rst +++ b/classes/class_animatedsprite2d.rst @@ -28,7 +28,7 @@ Tutorials - :doc:`2D Sprite animation <../tutorials/2d/2d_sprite_animation>` -- `2D Dodge The Creeps Demo `__ +- `2D Dodge The Creeps Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_animationmixer.rst b/classes/class_animationmixer.rst index 11bd9505e9ae..8db5dde5034f 100644 --- a/classes/class_animationmixer.rst +++ b/classes/class_animationmixer.rst @@ -176,13 +176,25 @@ Notifies when the caches have been cleared, either automatically, or manually vi ---- +.. _class_AnimationMixer_signal_mixer_applied: + +.. rst-class:: classref-signal + +**mixer_applied**\ (\ ) + +Notifies when the blending result related have been applied to the target objects. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationMixer_signal_mixer_updated: .. rst-class:: classref-signal **mixer_updated**\ (\ ) -Editor only. Notifies when the property have been updated to update dummy :ref:`AnimationPlayer` in animation player editor. +Notifies when the property related process have been updated. .. rst-class:: classref-section-separator @@ -580,7 +592,7 @@ Returns the :ref:`Animation` with the key ``name``. If the anim Returns the first :ref:`AnimationLibrary` with key ``name`` or ``null`` if not found. -To get the :ref:`AnimationPlayer`'s global animation library, use ``get_animation_library("")``. +To get the **AnimationMixer**'s global animation library, use ``get_animation_library("")``. .. rst-class:: classref-item-separator @@ -839,7 +851,7 @@ However, if the animation loops, an unintended discrete change may occur, so thi :ref:`bool` **has_animation**\ (\ name\: :ref:`StringName`\ ) |const| -Returns ``true`` if the :ref:`AnimationPlayer` stores an :ref:`Animation` with key ``name``. +Returns ``true`` if the **AnimationMixer** stores an :ref:`Animation` with key ``name``. .. rst-class:: classref-item-separator @@ -851,7 +863,7 @@ Returns ``true`` if the :ref:`AnimationPlayer` stores an :ref:`bool` **has_animation_library**\ (\ name\: :ref:`StringName`\ ) |const| -Returns ``true`` if the :ref:`AnimationPlayer` stores an :ref:`AnimationLibrary` with key ``name``. +Returns ``true`` if the **AnimationMixer** stores an :ref:`AnimationLibrary` with key ``name``. .. rst-class:: classref-item-separator diff --git a/classes/class_animationnode.rst b/classes/class_animationnode.rst index 127f1558a6ae..76dbd337e8ee 100644 --- a/classes/class_animationnode.rst +++ b/classes/class_animationnode.rst @@ -25,6 +25,16 @@ Base resource for :ref:`AnimationTree` nodes. In general, i Inherit this when creating animation nodes mainly for use in :ref:`AnimationNodeBlendTree`, otherwise :ref:`AnimationRootNode` should be used instead. +You can access the time information as read-only parameter which is processed and stored in the previous frame for all nodes except :ref:`AnimationNodeOutput`. + +\ **Note:** If more than two inputs exist in the **AnimationNode**, which time information takes precedence depends on the type of **AnimationNode**. + +:: + + var current_length = $AnimationTree[parameters/AnimationNodeName/current_length] + var current_position = $AnimationTree[parameters/AnimationNodeName/current_position] + var current_delta = $AnimationTree[parameters/AnimationNodeName/current_delta] + .. rst-class:: classref-introduction-group Tutorials @@ -305,11 +315,13 @@ When inheriting from :ref:`AnimationRootNode`, implemen :ref:`float` **_process**\ (\ time\: :ref:`float`, seek\: :ref:`bool`, is_external_seeking\: :ref:`bool`, test_only\: :ref:`bool`\ ) |virtual| |const| +**Deprecated:** Currently this is mostly useless as there is a lack of many APIs to extend AnimationNode by GDScript. It is planned that a more flexible API using structures will be provided in the future. + When inheriting from :ref:`AnimationRootNode`, implement this virtual method to run some code when this animation node is processed. The ``time`` parameter is a relative delta, unless ``seek`` is ``true``, in which case it is absolute. Here, call the :ref:`blend_input`, :ref:`blend_node` or :ref:`blend_animation` functions. You can also use :ref:`get_parameter` and :ref:`set_parameter` to modify local memory. -This function should return the time left for the current animation to finish (if unsure, pass the value from the main blend being called). +This function should return the delta. .. rst-class:: classref-item-separator diff --git a/classes/class_animationnodeadd3.rst b/classes/class_animationnodeadd3.rst index 313bd91232c9..f77b8f847b6a 100644 --- a/classes/class_animationnodeadd3.rst +++ b/classes/class_animationnodeadd3.rst @@ -38,7 +38,7 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_animationnodeanimation.rst b/classes/class_animationnodeanimation.rst index 46cee9bf212f..56d188d0c4f1 100644 --- a/classes/class_animationnodeanimation.rst +++ b/classes/class_animationnodeanimation.rst @@ -28,9 +28,9 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group @@ -40,11 +40,21 @@ Properties .. table:: :widths: auto - +-------------------------------------------------------+-------------------------------------------------------------------+---------+ - | :ref:`StringName` | :ref:`animation` | ``&""`` | - +-------------------------------------------------------+-------------------------------------------------------------------+---------+ - | :ref:`PlayMode` | :ref:`play_mode` | ``0`` | - +-------------------------------------------------------+-------------------------------------------------------------------+---------+ + +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ + | :ref:`StringName` | :ref:`animation` | ``&""`` | + +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ + | :ref:`LoopMode` | :ref:`loop_mode` | | + +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ + | :ref:`PlayMode` | :ref:`play_mode` | ``0`` | + +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`start_offset` | | + +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`stretch_time_scale` | | + +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`timeline_length` | | + +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`use_custom_timeline` | ``false`` | + +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-section-separator @@ -103,6 +113,23 @@ Animation to use as an output. It is one of the animations provided by :ref:`Ani ---- +.. _class_AnimationNodeAnimation_property_loop_mode: + +.. rst-class:: classref-property + +:ref:`LoopMode` **loop_mode** + +.. rst-class:: classref-property-setget + +- |void| **set_loop_mode**\ (\ value\: :ref:`LoopMode`\ ) +- :ref:`LoopMode` **get_loop_mode**\ (\ ) + +If :ref:`use_custom_timeline` is ``true``, override the loop settings of the original :ref:`Animation` resource with the value. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationNodeAnimation_property_play_mode: .. rst-class:: classref-property @@ -116,6 +143,80 @@ Animation to use as an output. It is one of the animations provided by :ref:`Ani Determines the playback direction of the animation. +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationNodeAnimation_property_start_offset: + +.. rst-class:: classref-property + +:ref:`float` **start_offset** + +.. rst-class:: classref-property-setget + +- |void| **set_start_offset**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_start_offset**\ (\ ) + +If :ref:`use_custom_timeline` is ``true``, offset the start position of the animation. + +This is useful for adjusting which foot steps first in 3D walking animations. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationNodeAnimation_property_stretch_time_scale: + +.. rst-class:: classref-property + +:ref:`bool` **stretch_time_scale** + +.. rst-class:: classref-property-setget + +- |void| **set_stretch_time_scale**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_stretching_time_scale**\ (\ ) + +If ``true``, scales the time so that the length specified in :ref:`timeline_length` is one cycle. + +This is useful for matching the periods of walking and running animations. + +If ``false``, the original animation length is respected. If you set the loop to :ref:`loop_mode`, the animation will loop in :ref:`timeline_length`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationNodeAnimation_property_timeline_length: + +.. rst-class:: classref-property + +:ref:`float` **timeline_length** + +.. rst-class:: classref-property-setget + +- |void| **set_timeline_length**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_timeline_length**\ (\ ) + +If :ref:`use_custom_timeline` is ``true``, offset the start position of the animation. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationNodeAnimation_property_use_custom_timeline: + +.. rst-class:: classref-property + +:ref:`bool` **use_custom_timeline** = ``false`` + +.. rst-class:: classref-property-setget + +- |void| **set_use_custom_timeline**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_using_custom_timeline**\ (\ ) + +If ``true``, :ref:`AnimationNode` provides an animation based on the :ref:`Animation` resource with some parameters adjusted. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_animationnodeblend2.rst b/classes/class_animationnodeblend2.rst index ca333217cc35..53a14c5473b3 100644 --- a/classes/class_animationnodeblend2.rst +++ b/classes/class_animationnodeblend2.rst @@ -30,9 +30,9 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_animationnodeblendspace2d.rst b/classes/class_animationnodeblendspace2d.rst index 285ec23541d5..96bcb0e2b0a0 100644 --- a/classes/class_animationnodeblendspace2d.rst +++ b/classes/class_animationnodeblendspace2d.rst @@ -32,7 +32,7 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_animationnodeoneshot.rst b/classes/class_animationnodeoneshot.rst index 92f8ab6f4502..2e83fc832aeb 100644 --- a/classes/class_animationnodeoneshot.rst +++ b/classes/class_animationnodeoneshot.rst @@ -79,7 +79,7 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group @@ -96,6 +96,8 @@ Properties +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`autorestart_random_delay` | ``0.0`` | +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`break_loop_at_end` | ``false`` | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`Curve` | :ref:`fadein_curve` | | +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`fadein_time` | ``0.0`` | @@ -242,6 +244,23 @@ If :ref:`autorestart` is ``true ---- +.. _class_AnimationNodeOneShot_property_break_loop_at_end: + +.. rst-class:: classref-property + +:ref:`bool` **break_loop_at_end** = ``false`` + +.. rst-class:: classref-property-setget + +- |void| **set_break_loop_at_end**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_loop_broken_at_end**\ (\ ) + +If ``true``, breaks the loop at the end of the loop cycle for transition, even if the animation is looping. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationNodeOneShot_property_fadein_curve: .. rst-class:: classref-property @@ -272,6 +291,8 @@ Determines how cross-fading between animations is eased. If empty, the transitio The fade-in duration. For example, setting this to ``1.0`` for a 5 second length animation will produce a cross-fade that starts at 0 second and ends at 1 second during the animation. +\ **Note:** **AnimationNodeOneShot** transitions the current state after the end of the fading. When :ref:`AnimationNodeOutput` is considered as the most upstream, so the :ref:`fadein_time` is scaled depending on the downstream delta. For example, if this value is set to ``1.0`` and a :ref:`AnimationNodeTimeScale` with a value of ``2.0`` is chained downstream, the actual processing time will be 0.5 second. + .. rst-class:: classref-item-separator ---- @@ -306,6 +327,8 @@ Determines how cross-fading between animations is eased. If empty, the transitio The fade-out duration. For example, setting this to ``1.0`` for a 5 second length animation will produce a cross-fade that starts at 4 second and ends at 5 second during the animation. +\ **Note:** **AnimationNodeOneShot** transitions the current state after the end of the fading. When :ref:`AnimationNodeOutput` is considered as the most upstream, so the :ref:`fadeout_time` is scaled depending on the downstream delta. For example, if this value is set to ``1.0`` and an :ref:`AnimationNodeTimeScale` with a value of ``2.0`` is chained downstream, the actual processing time will be 0.5 second. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_animationnodeoutput.rst b/classes/class_animationnodeoutput.rst index 2965cafaf80c..17f6be4d6eef 100644 --- a/classes/class_animationnodeoutput.rst +++ b/classes/class_animationnodeoutput.rst @@ -28,9 +28,9 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_animationnodestatemachinetransition.rst b/classes/class_animationnodestatemachinetransition.rst index 5adcfccae85b..4b440903f126 100644 --- a/classes/class_animationnodestatemachinetransition.rst +++ b/classes/class_animationnodestatemachinetransition.rst @@ -38,23 +38,25 @@ Properties .. table:: :widths: auto - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+----------+ - | :ref:`StringName` | :ref:`advance_condition` | ``&""`` | - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+----------+ - | :ref:`String` | :ref:`advance_expression` | ``""`` | - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+----------+ - | :ref:`AdvanceMode` | :ref:`advance_mode` | ``1`` | - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+----------+ - | :ref:`int` | :ref:`priority` | ``1`` | - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+----------+ - | :ref:`bool` | :ref:`reset` | ``true`` | - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+----------+ - | :ref:`SwitchMode` | :ref:`switch_mode` | ``0`` | - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+----------+ - | :ref:`Curve` | :ref:`xfade_curve` | | - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+----------+ - | :ref:`float` | :ref:`xfade_time` | ``0.0`` | - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+----------+ + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`StringName` | :ref:`advance_condition` | ``&""`` | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`advance_expression` | ``""`` | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`AdvanceMode` | :ref:`advance_mode` | ``1`` | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`break_loop_at_end` | ``false`` | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`priority` | ``1`` | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`reset` | ``true`` | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`SwitchMode` | :ref:`switch_mode` | ``0`` | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`Curve` | :ref:`xfade_curve` | | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`xfade_time` | ``0.0`` | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-section-separator @@ -219,6 +221,23 @@ Determines whether the transition should disabled, enabled when using :ref:`Anim ---- +.. _class_AnimationNodeStateMachineTransition_property_break_loop_at_end: + +.. rst-class:: classref-property + +:ref:`bool` **break_loop_at_end** = ``false`` + +.. rst-class:: classref-property-setget + +- |void| **set_break_loop_at_end**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_loop_broken_at_end**\ (\ ) + +If ``true``, breaks the loop at the end of the loop cycle for transition, even if the animation is looping. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationNodeStateMachineTransition_property_priority: .. rst-class:: classref-property @@ -300,6 +319,8 @@ Ease curve for better control over cross-fade between this state and the next. The time to cross-fade between this state and the next. +\ **Note:** :ref:`AnimationNodeStateMachine` transitions the current state immediately after the start of the fading. The precise remaining time can only be inferred from the main animation. When :ref:`AnimationNodeOutput` is considered as the most upstream, so the :ref:`xfade_time` is not scaled depending on the downstream delta. See also :ref:`AnimationNodeOneShot.fadeout_time`. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_animationnodetimescale.rst b/classes/class_animationnodetimescale.rst index 2f31c725c586..7d19d1419f90 100644 --- a/classes/class_animationnodetimescale.rst +++ b/classes/class_animationnodetimescale.rst @@ -28,7 +28,7 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_animationnodetransition.rst b/classes/class_animationnodetransition.rst index b837d98823e2..dbb40e868fc6 100644 --- a/classes/class_animationnodetransition.rst +++ b/classes/class_animationnodetransition.rst @@ -65,9 +65,9 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group @@ -95,15 +95,19 @@ Methods .. table:: :widths: auto - +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_input_reset`\ (\ input\: :ref:`int`\ ) |const| | - +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_input_set_as_auto_advance`\ (\ input\: :ref:`int`\ ) |const| | - +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_input_as_auto_advance`\ (\ input\: :ref:`int`, enable\: :ref:`bool`\ ) | - +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_input_reset`\ (\ input\: :ref:`int`, enable\: :ref:`bool`\ ) | - +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_input_loop_broken_at_end`\ (\ input\: :ref:`int`\ ) |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_input_reset`\ (\ input\: :ref:`int`\ ) |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_input_set_as_auto_advance`\ (\ input\: :ref:`int`\ ) |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_input_as_auto_advance`\ (\ input\: :ref:`int`, enable\: :ref:`bool`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_input_break_loop_at_end`\ (\ input\: :ref:`int`, enable\: :ref:`bool`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_input_reset`\ (\ input\: :ref:`int`, enable\: :ref:`bool`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -178,6 +182,8 @@ Determines how cross-fading between animations is eased. If empty, the transitio Cross-fading time (in seconds) between each animation connected to the inputs. +\ **Note:** **AnimationNodeTransition** transitions the current state immediately after the start of the fading. The precise remaining time can only be inferred from the main animation. When :ref:`AnimationNodeOutput` is considered as the most upstream, so the :ref:`xfade_time` is not scaled depending on the downstream delta. See also :ref:`AnimationNodeOneShot.fadeout_time`. + .. rst-class:: classref-section-separator ---- @@ -187,6 +193,18 @@ Cross-fading time (in seconds) between each animation connected to the inputs. Method Descriptions ------------------- +.. _class_AnimationNodeTransition_method_is_input_loop_broken_at_end: + +.. rst-class:: classref-method + +:ref:`bool` **is_input_loop_broken_at_end**\ (\ input\: :ref:`int`\ ) |const| + +Returns whether the animation breaks the loop at the end of the loop cycle for transition. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationNodeTransition_method_is_input_reset: .. rst-class:: classref-method @@ -223,6 +241,18 @@ Enables or disables auto-advance for the given ``input`` index. If enabled, stat ---- +.. _class_AnimationNodeTransition_method_set_input_break_loop_at_end: + +.. rst-class:: classref-method + +|void| **set_input_break_loop_at_end**\ (\ input\: :ref:`int`, enable\: :ref:`bool`\ ) + +If ``true``, breaks the loop at the end of the loop cycle for transition, even if the animation is looping. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationNodeTransition_method_set_input_reset: .. rst-class:: classref-method diff --git a/classes/class_animationplayer.rst b/classes/class_animationplayer.rst index 5a1ce0783732..51ae0cfc7331 100644 --- a/classes/class_animationplayer.rst +++ b/classes/class_animationplayer.rst @@ -36,7 +36,7 @@ Tutorials - :doc:`Animation documentation index <../tutorials/animation/index>` -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_animationtree.rst b/classes/class_animationtree.rst index 63cbe82ca503..7091d5ecc2d6 100644 --- a/classes/class_animationtree.rst +++ b/classes/class_animationtree.rst @@ -30,7 +30,7 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst index d33554bad8d0..dc4b6f66cb3e 100644 --- a/classes/class_area2d.rst +++ b/classes/class_area2d.rst @@ -35,11 +35,11 @@ Tutorials - :doc:`Using Area2D <../tutorials/physics/using_area_2d>` -- `2D Dodge The Creeps Demo `__ +- `2D Dodge The Creeps Demo `__ -- `2D Pong Demo `__ +- `2D Pong Demo `__ -- `2D Platformer Demo `__ +- `2D Platformer Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_area3d.rst b/classes/class_area3d.rst index fdce53bdcb97..5b35f3e7b9e3 100644 --- a/classes/class_area3d.rst +++ b/classes/class_area3d.rst @@ -37,9 +37,9 @@ Tutorials - :doc:`Using Area2D <../tutorials/physics/using_area_2d>` -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ -- `GUI in 3D Demo `__ +- `GUI in 3D Viewport Demo `__ .. rst-class:: classref-reftable-group @@ -662,6 +662,8 @@ The degree to which this area's reverb is a uniform effect. Ranges from ``0`` to The exponential rate at which wind force decreases with distance from its origin. +\ **Note:** This wind force only applies to :ref:`SoftBody3D` nodes. Other physics bodies are currently not affected by wind. + .. rst-class:: classref-item-separator ---- @@ -679,6 +681,8 @@ The exponential rate at which wind force decreases with distance from its origin The magnitude of area-specific wind force. +\ **Note:** This wind force only applies to :ref:`SoftBody3D` nodes. Other physics bodies are currently not affected by wind. + .. rst-class:: classref-item-separator ---- @@ -696,6 +700,8 @@ The magnitude of area-specific wind force. The :ref:`Node3D` which is used to specify the direction and origin of an area-specific wind force. The direction is opposite to the z-axis of the :ref:`Node3D`'s local transform, and its origin is the origin of the :ref:`Node3D`'s local transform. +\ **Note:** This wind force only applies to :ref:`SoftBody3D` nodes. Other physics bodies are currently not affected by wind. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_array.rst b/classes/class_array.rst index 842fc9eec209..47a15667024f 100644 --- a/classes/class_array.rst +++ b/classes/class_array.rst @@ -68,6 +68,8 @@ Arrays can be concatenated using the ``+`` operator: \ **Note:** Erasing elements while iterating over arrays is **not** supported and will result in unpredictable behavior. +\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. :ref:`PackedInt64Array` versus ``Array[int]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`map`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. + .. note:: There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. @@ -259,7 +261,37 @@ Constructs an empty **Array**. :ref:`Array` **Array**\ (\ base\: :ref:`Array`, type\: :ref:`int`, class_name\: :ref:`StringName`, script\: :ref:`Variant`\ ) -Creates a typed array from the ``base`` array. +Creates a typed array from the ``base`` array. All arguments are required. + +- ``type`` is the built-in type as a :ref:`Variant.Type` constant, for example :ref:`@GlobalScope.TYPE_INT`. + +- ``class_name`` is the **native** class name, for example :ref:`Node`. If ``type`` is not :ref:`@GlobalScope.TYPE_OBJECT`, must be an empty string. + +- ``script`` is the associated script. Must be a :ref:`Script` instance or ``null``. + +Examples: + +:: + + class_name MyNode + extends Node + + class MyClass: + pass + + func _ready(): + var a = Array([], TYPE_INT, &"", null) # Array[int] + var b = Array([], TYPE_OBJECT, &"Node", null) # Array[Node] + var c = Array([], TYPE_OBJECT, &"Node", MyNode) # Array[MyNode] + var d = Array([], TYPE_OBJECT, &"RefCounted", MyClass) # Array[MyClass] + +\ **Note:** This constructor can be useful if you want to create a typed array on the fly, but you are not required to use it. In GDScript you can use a temporary variable with the static type you need and then pass it: + +:: + + func _ready(): + var a: Array[int] = [] + some_func(a) .. rst-class:: classref-item-separator @@ -501,6 +533,12 @@ Returns the last element of the array. Prints an error and returns ``null`` if t Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a ``before`` specifier can be passed. If ``false``, the returned index comes after all existing entries of the value in the array. +:: + + var array = ["a", "b", "c", "c", "d", "e"] + print(array.bsearch("c", true)) # Prints 2, at the first matching element. + print(array.bsearch("c", false)) # Prints 4, after the last matching element, pointing to "d". + \ **Note:** Calling :ref:`bsearch` on an unsorted array results in unexpected behavior. .. rst-class:: classref-item-separator @@ -515,6 +553,8 @@ Finds the index of an existing value (or the insertion index that maintains sort Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a ``before`` specifier can be passed. If ``false``, the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return ``true`` if the first argument is less than the second, and return ``false`` otherwise. +\ **Note:** The custom method must accept the two arguments in any order, you cannot rely on that the first argument will always be from the array. + \ **Note:** Calling :ref:`bsearch_custom` on an unsorted array results in unexpected behavior. .. rst-class:: classref-item-separator @@ -665,7 +705,7 @@ Returns the first element of the array. Prints an error and returns ``null`` if :ref:`int` **get_typed_builtin**\ (\ ) |const| -Returns the :ref:`Variant.Type` constant for a typed array. If the **Array** is not typed, returns :ref:`@GlobalScope.TYPE_NIL`. +Returns the built-in type of the typed array as a :ref:`Variant.Type` constant. If the array is not typed, returns :ref:`@GlobalScope.TYPE_NIL`. .. rst-class:: classref-item-separator @@ -677,7 +717,7 @@ Returns the :ref:`Variant.Type` constant for a t :ref:`StringName` **get_typed_class_name**\ (\ ) |const| -Returns a class name of a typed **Array** of type :ref:`@GlobalScope.TYPE_OBJECT`. +Returns the **native** class name of the typed array if the built-in type is :ref:`@GlobalScope.TYPE_OBJECT`. Otherwise, this method returns an empty string. .. rst-class:: classref-item-separator @@ -689,7 +729,7 @@ Returns a class name of a typed **Array** of type :ref:`@GlobalScope.TYPE_OBJECT :ref:`Variant` **get_typed_script**\ (\ ) |const| -Returns the script associated with a typed array tied to a class name. +Returns the script associated with the typed array. This method returns a :ref:`Script` instance or ``null``. .. rst-class:: classref-item-separator diff --git a/classes/class_arraymesh.rst b/classes/class_arraymesh.rst index e79c0a38efc5..b8905fb4bdc3 100644 --- a/classes/class_arraymesh.rst +++ b/classes/class_arraymesh.rst @@ -234,7 +234,7 @@ The ``arrays`` argument is an array of arrays. Each of the :ref:`Mesh.ARRAY_MAX< The ``blend_shapes`` argument is an array of vertex data for each blend shape. Each element is an array of the same structure as ``arrays``, but :ref:`Mesh.ARRAY_VERTEX`, :ref:`Mesh.ARRAY_NORMAL`, and :ref:`Mesh.ARRAY_TANGENT` are set if and only if they are set in ``arrays`` and all other entries are ``null``. -The ``lods`` argument is a dictionary with :ref:`float` keys and :ref:`PackedInt32Array` values. Each entry in the dictionary represents a LOD level of the surface, where the value is the :ref:`Mesh.ARRAY_INDEX` array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of a LOD also increases the distance that the objects has to be from the camera before the LOD is used. +The ``lods`` argument is a dictionary with :ref:`float` keys and :ref:`PackedInt32Array` values. Each entry in the dictionary represents an LOD level of the surface, where the value is the :ref:`Mesh.ARRAY_INDEX` array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of an LOD also increases the distance that the objects has to be from the camera before the LOD is used. The ``flags`` argument is the bitwise or of, as required: One value of :ref:`ArrayCustomFormat` left shifted by ``ARRAY_FORMAT_CUSTOMn_SHIFT`` for each custom channel in use, :ref:`Mesh.ARRAY_FLAG_USE_DYNAMIC_UPDATE`, :ref:`Mesh.ARRAY_FLAG_USE_8_BONE_WEIGHTS`, or :ref:`Mesh.ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY`. diff --git a/classes/class_arrayoccluder3d.rst b/classes/class_arrayoccluder3d.rst index c9c3c4cf625a..a31fc6ba8827 100644 --- a/classes/class_arrayoccluder3d.rst +++ b/classes/class_arrayoccluder3d.rst @@ -80,6 +80,8 @@ The occluder's index position. Indices determine which points from the :ref:`ver \ **Note:** The occluder is always updated after setting this value. If creating occluders procedurally, consider using :ref:`set_arrays` instead to avoid updating the occluder twice when it's created. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -99,6 +101,8 @@ The occluder's vertex positions in local 3D coordinates. \ **Note:** The occluder is always updated after setting this value. If creating occluders procedurally, consider using :ref:`set_arrays` instead to avoid updating the occluder twice when it's created. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector3Array` for more details. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_astar2d.rst b/classes/class_astar2d.rst index 0692f720d0da..4e4faea583dc 100644 --- a/classes/class_astar2d.rst +++ b/classes/class_astar2d.rst @@ -52,7 +52,7 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_closest_position_in_segment`\ (\ to_position\: :ref:`Vector2`\ ) |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt64Array` | :ref:`get_id_path`\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`\ ) | + | :ref:`PackedInt64Array` | :ref:`get_id_path`\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`, allow_partial_path\: :ref:`bool` = false\ ) | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_point_capacity`\ (\ ) |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -62,7 +62,7 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt64Array` | :ref:`get_point_ids`\ (\ ) | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`get_point_path`\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`\ ) | + | :ref:`PackedVector2Array` | :ref:`get_point_path`\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`, allow_partial_path\: :ref:`bool` = false\ ) | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_point_position`\ (\ id\: :ref:`int`\ ) |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -283,10 +283,12 @@ The result is in the segment that goes from ``y = 0`` to ``y = 5``. It's the clo .. rst-class:: classref-method -:ref:`PackedInt64Array` **get_id_path**\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`\ ) +:ref:`PackedInt64Array` **get_id_path**\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`, allow_partial_path\: :ref:`bool` = false\ ) Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. +If there is no valid path to the target, and ``allow_partial_path`` is ``true``, returns a path to the point closest to the target that can be reached. + .. tabs:: @@ -410,11 +412,13 @@ Returns an array of all point IDs. .. rst-class:: classref-method -:ref:`PackedVector2Array` **get_point_path**\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`\ ) +:ref:`PackedVector2Array` **get_point_path**\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`, allow_partial_path\: :ref:`bool` = false\ ) Returns an array with the points that are in the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. -\ **Note:** This method is not thread-safe. If called from a :ref:`Thread`, it will return an empty :ref:`PackedVector2Array` and will print an error message. +If there is no valid path to the target, and ``allow_partial_path`` is ``true``, returns a path to the point closest to the target that can be reached. + +\ **Note:** This method is not thread-safe. If called from a :ref:`Thread`, it will return an empty array and will print an error message. .. rst-class:: classref-item-separator diff --git a/classes/class_astar3d.rst b/classes/class_astar3d.rst index 8dbfca024728..6f23f7ddbb5a 100644 --- a/classes/class_astar3d.rst +++ b/classes/class_astar3d.rst @@ -89,7 +89,7 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_closest_position_in_segment`\ (\ to_position\: :ref:`Vector3`\ ) |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt64Array` | :ref:`get_id_path`\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`\ ) | + | :ref:`PackedInt64Array` | :ref:`get_id_path`\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`, allow_partial_path\: :ref:`bool` = false\ ) | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_point_capacity`\ (\ ) |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -99,7 +99,7 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt64Array` | :ref:`get_point_ids`\ (\ ) | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array` | :ref:`get_point_path`\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`\ ) | + | :ref:`PackedVector3Array` | :ref:`get_point_path`\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`, allow_partial_path\: :ref:`bool` = false\ ) | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_point_position`\ (\ id\: :ref:`int`\ ) |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -320,10 +320,12 @@ The result is in the segment that goes from ``y = 0`` to ``y = 5``. It's the clo .. rst-class:: classref-method -:ref:`PackedInt64Array` **get_id_path**\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`\ ) +:ref:`PackedInt64Array` **get_id_path**\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`, allow_partial_path\: :ref:`bool` = false\ ) Returns an array with the IDs of the points that form the path found by AStar3D between the given points. The array is ordered from the starting point to the ending point of the path. +If there is no valid path to the target, and ``allow_partial_path`` is ``true``, returns a path to the point closest to the target that can be reached. + .. tabs:: @@ -445,11 +447,13 @@ Returns an array of all point IDs. .. rst-class:: classref-method -:ref:`PackedVector3Array` **get_point_path**\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`\ ) +:ref:`PackedVector3Array` **get_point_path**\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`, allow_partial_path\: :ref:`bool` = false\ ) Returns an array with the points that are in the path found by AStar3D between the given points. The array is ordered from the starting point to the ending point of the path. -\ **Note:** This method is not thread-safe. If called from a :ref:`Thread`, it will return an empty :ref:`PackedVector3Array` and will print an error message. +If there is no valid path to the target, and ``allow_partial_path`` is ``true``, returns a path to the point closest to the target that can be reached. + +\ **Note:** This method is not thread-safe. If called from a :ref:`Thread`, it will return an empty array and will print an error message. .. rst-class:: classref-item-separator diff --git a/classes/class_astargrid2d.rst b/classes/class_astargrid2d.rst index 5b9a394fbd6c..fe0434c38f60 100644 --- a/classes/class_astargrid2d.rst +++ b/classes/class_astargrid2d.rst @@ -84,39 +84,39 @@ Methods .. table:: :widths: auto - +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_compute_cost`\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`\ ) |virtual| |const| | - +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_estimate_cost`\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`\ ) |virtual| |const| | - +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`clear`\ (\ ) | - +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`fill_solid_region`\ (\ region\: :ref:`Rect2i`, solid\: :ref:`bool` = true\ ) | - +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`fill_weight_scale_region`\ (\ region\: :ref:`Rect2i`, weight_scale\: :ref:`float`\ ) | - +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Vector2i`\] | :ref:`get_id_path`\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`\ ) | - +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`get_point_path`\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`\ ) | - +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_point_position`\ (\ id\: :ref:`Vector2i`\ ) |const| | - +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_point_weight_scale`\ (\ id\: :ref:`Vector2i`\ ) |const| | - +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_dirty`\ (\ ) |const| | - +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_in_bounds`\ (\ x\: :ref:`int`, y\: :ref:`int`\ ) |const| | - +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_in_boundsv`\ (\ id\: :ref:`Vector2i`\ ) |const| | - +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_point_solid`\ (\ id\: :ref:`Vector2i`\ ) |const| | - +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_point_solid`\ (\ id\: :ref:`Vector2i`, solid\: :ref:`bool` = true\ ) | - +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_point_weight_scale`\ (\ id\: :ref:`Vector2i`, weight_scale\: :ref:`float`\ ) | - +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`update`\ (\ ) | - +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_compute_cost`\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`\ ) |virtual| |const| | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_estimate_cost`\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`\ ) |virtual| |const| | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear`\ (\ ) | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fill_solid_region`\ (\ region\: :ref:`Rect2i`, solid\: :ref:`bool` = true\ ) | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fill_weight_scale_region`\ (\ region\: :ref:`Rect2i`, weight_scale\: :ref:`float`\ ) | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Vector2i`\] | :ref:`get_id_path`\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`, allow_partial_path\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`get_point_path`\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`, allow_partial_path\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_point_position`\ (\ id\: :ref:`Vector2i`\ ) |const| | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_point_weight_scale`\ (\ id\: :ref:`Vector2i`\ ) |const| | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_dirty`\ (\ ) |const| | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_in_bounds`\ (\ x\: :ref:`int`, y\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_in_boundsv`\ (\ id\: :ref:`Vector2i`\ ) |const| | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_point_solid`\ (\ id\: :ref:`Vector2i`\ ) |const| | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_solid`\ (\ id\: :ref:`Vector2i`, solid\: :ref:`bool` = true\ ) | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_weight_scale`\ (\ id\: :ref:`Vector2i`, weight_scale\: :ref:`float`\ ) | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update`\ (\ ) | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -537,10 +537,12 @@ Fills the given ``region`` on the grid with the specified value for the weight s .. rst-class:: classref-method -:ref:`Array`\[:ref:`Vector2i`\] **get_id_path**\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`\ ) +:ref:`Array`\[:ref:`Vector2i`\] **get_id_path**\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`, allow_partial_path\: :ref:`bool` = false\ ) Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. +If there is no valid path to the target, and ``allow_partial_path`` is ``true``, returns a path to the point closest to the target that can be reached. + .. rst-class:: classref-item-separator ---- @@ -549,11 +551,13 @@ Returns an array with the IDs of the points that form the path found by AStar2D .. rst-class:: classref-method -:ref:`PackedVector2Array` **get_point_path**\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`\ ) +:ref:`PackedVector2Array` **get_point_path**\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`, allow_partial_path\: :ref:`bool` = false\ ) Returns an array with the points that are in the path found by **AStarGrid2D** between the given points. The array is ordered from the starting point to the ending point of the path. -\ **Note:** This method is not thread-safe. If called from a :ref:`Thread`, it will return an empty :ref:`PackedVector3Array` and will print an error message. +If there is no valid path to the target, and ``allow_partial_path`` is ``true``, returns a path to the point closest to the target that can be reached. + +\ **Note:** This method is not thread-safe. If called from a :ref:`Thread`, it will return an empty array and will print an error message. .. rst-class:: classref-item-separator diff --git a/classes/class_audioeffect.rst b/classes/class_audioeffect.rst index 5644677a8108..95ce3b49651b 100644 --- a/classes/class_audioeffect.rst +++ b/classes/class_audioeffect.rst @@ -12,7 +12,7 @@ AudioEffect **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AudioEffectAmplify`, :ref:`AudioEffectCapture`, :ref:`AudioEffectChorus`, :ref:`AudioEffectCompressor`, :ref:`AudioEffectDelay`, :ref:`AudioEffectDistortion`, :ref:`AudioEffectEQ`, :ref:`AudioEffectFilter`, :ref:`AudioEffectLimiter`, :ref:`AudioEffectPanner`, :ref:`AudioEffectPhaser`, :ref:`AudioEffectPitchShift`, :ref:`AudioEffectRecord`, :ref:`AudioEffectReverb`, :ref:`AudioEffectSpectrumAnalyzer`, :ref:`AudioEffectStereoEnhance` +**Inherited By:** :ref:`AudioEffectAmplify`, :ref:`AudioEffectCapture`, :ref:`AudioEffectChorus`, :ref:`AudioEffectCompressor`, :ref:`AudioEffectDelay`, :ref:`AudioEffectDistortion`, :ref:`AudioEffectEQ`, :ref:`AudioEffectFilter`, :ref:`AudioEffectHardLimiter`, :ref:`AudioEffectLimiter`, :ref:`AudioEffectPanner`, :ref:`AudioEffectPhaser`, :ref:`AudioEffectPitchShift`, :ref:`AudioEffectRecord`, :ref:`AudioEffectReverb`, :ref:`AudioEffectSpectrumAnalyzer`, :ref:`AudioEffectStereoEnhance` Base class for audio effect resources. @@ -32,7 +32,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` -- `Audio Mic Record Demo `__ +- `Audio Microphone Record Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_audioeffecthardlimiter.rst b/classes/class_audioeffecthardlimiter.rst new file mode 100644 index 000000000000..efd7f7890aac --- /dev/null +++ b/classes/class_audioeffecthardlimiter.rst @@ -0,0 +1,112 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AudioEffectHardLimiter.xml. + +.. _class_AudioEffectHardLimiter: + +AudioEffectHardLimiter +====================== + +**Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +Adds a hard limiter audio effect to an Audio bus. + +.. rst-class:: classref-introduction-group + +Description +----------- + +A limiter is an effect designed to disallow sound from going over a given dB threshold. Hard limiters predict volume peaks, and will smoothly apply gain reduction when a peak crosses the ceiling threshold to prevent clipping and distortion. It preserves the waveform and prevents it from crossing the ceiling threshold. Adding one in the Master bus is recommended as a safety measure to prevent sudden volume peaks from occurring, and to prevent distortion caused by clipping. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Audio buses <../tutorials/audio/audio_buses>` + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------+-----------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`ceiling_db` | ``-0.3`` | + +---------------------------+-----------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`pre_gain_db` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`release` | ``0.1`` | + +---------------------------+-----------------------------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_AudioEffectHardLimiter_property_ceiling_db: + +.. rst-class:: classref-property + +:ref:`float` **ceiling_db** = ``-0.3`` + +.. rst-class:: classref-property-setget + +- |void| **set_ceiling_db**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_ceiling_db**\ (\ ) + +The waveform's maximum allowed value, in decibels. This value can range from ``-24.0`` to ``0.0``. + +The default value of ``-0.3`` prevents potential inter-sample peaks (ISP) from crossing over 0 dB, which can cause slight distortion on some older hardware. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioEffectHardLimiter_property_pre_gain_db: + +.. rst-class:: classref-property + +:ref:`float` **pre_gain_db** = ``0.0`` + +.. rst-class:: classref-property-setget + +- |void| **set_pre_gain_db**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_pre_gain_db**\ (\ ) + +Gain to apply before limiting, in decibels. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioEffectHardLimiter_property_release: + +.. rst-class:: classref-property + +:ref:`float` **release** = ``0.1`` + +.. rst-class:: classref-property-setget + +- |void| **set_release**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_release**\ (\ ) + +Time it takes in seconds for the gain reduction to fully release. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffectlimiter.rst b/classes/class_audioeffectlimiter.rst index 2b60bae0664f..f30ab79a15b6 100644 --- a/classes/class_audioeffectlimiter.rst +++ b/classes/class_audioeffectlimiter.rst @@ -10,6 +10,8 @@ AudioEffectLimiter ================== +**Deprecated:** Use :ref:`AudioEffectHardLimiter` instead. + **Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` Adds a soft-clip limiter audio effect to an Audio bus. diff --git a/classes/class_audioeffectrecord.rst b/classes/class_audioeffectrecord.rst index c344f946e321..0dc140b54ed5 100644 --- a/classes/class_audioeffectrecord.rst +++ b/classes/class_audioeffectrecord.rst @@ -34,7 +34,7 @@ Tutorials - :doc:`Recording with microphone <../tutorials/audio/recording_with_microphone>` -- `Audio Mic Record Demo `__ +- `Audio Microphone Record Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_audioeffectreverb.rst b/classes/class_audioeffectreverb.rst index a143ad17c227..01bf4a045280 100644 --- a/classes/class_audioeffectreverb.rst +++ b/classes/class_audioeffectreverb.rst @@ -28,7 +28,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_audioeffectspectrumanalyzer.rst b/classes/class_audioeffectspectrumanalyzer.rst index 8db1a9f7fe93..35df039c0269 100644 --- a/classes/class_audioeffectspectrumanalyzer.rst +++ b/classes/class_audioeffectspectrumanalyzer.rst @@ -28,7 +28,7 @@ See also :ref:`AudioStreamGenerator` for procedurall Tutorials --------- -- `Audio Spectrum Demo `__ +- `Audio Spectrum Visualizer Demo `__ - `Godot 3.2 will get new audio features `__ diff --git a/classes/class_audioserver.rst b/classes/class_audioserver.rst index 7d94051428c0..4122ffd93b56 100644 --- a/classes/class_audioserver.rst +++ b/classes/class_audioserver.rst @@ -28,11 +28,11 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` -- `Audio Device Changer Demo `__ +- `Audio Device Changer Demo `__ -- `Audio Mic Record Demo `__ +- `Audio Microphone Record Demo `__ -- `Audio Spectrum Demo `__ +- `Audio Spectrum Visualizer Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_audiostream.rst b/classes/class_audiostream.rst index 5f2ed4b47c6e..04a0bd0682b3 100644 --- a/classes/class_audiostream.rst +++ b/classes/class_audiostream.rst @@ -12,7 +12,7 @@ AudioStream **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AudioStreamGenerator`, :ref:`AudioStreamMicrophone`, :ref:`AudioStreamMP3`, :ref:`AudioStreamOggVorbis`, :ref:`AudioStreamPolyphonic`, :ref:`AudioStreamRandomizer`, :ref:`AudioStreamWAV` +**Inherited By:** :ref:`AudioStreamGenerator`, :ref:`AudioStreamInteractive`, :ref:`AudioStreamMicrophone`, :ref:`AudioStreamMP3`, :ref:`AudioStreamOggVorbis`, :ref:`AudioStreamPlaylist`, :ref:`AudioStreamPolyphonic`, :ref:`AudioStreamRandomizer`, :ref:`AudioStreamSynchronized`, :ref:`AudioStreamWAV` Base class for audio streams. @@ -30,11 +30,11 @@ Tutorials - :doc:`Audio streams <../tutorials/audio/audio_streams>` -- `Audio Generator Demo `__ +- `Audio Generator Demo `__ -- `Audio Mic Record Demo `__ +- `Audio Microphone Record Demo `__ -- `Audio Spectrum Demo `__ +- `Audio Spectrum Visualizer Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_audiostreamgenerator.rst b/classes/class_audiostreamgenerator.rst index 813a9764038d..d33e1da62099 100644 --- a/classes/class_audiostreamgenerator.rst +++ b/classes/class_audiostreamgenerator.rst @@ -91,7 +91,7 @@ See also :ref:`AudioEffectSpectrumAnalyzer` f Tutorials --------- -- `Audio Generator Demo `__ +- `Audio Generator Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_audiostreamgeneratorplayback.rst b/classes/class_audiostreamgeneratorplayback.rst index 809e157ce290..d75d9089c86d 100644 --- a/classes/class_audiostreamgeneratorplayback.rst +++ b/classes/class_audiostreamgeneratorplayback.rst @@ -26,7 +26,7 @@ This class is meant to be used with :ref:`AudioStreamGenerator`__ +- `Audio Generator Demo `__ - `Godot 3.2 will get new audio features `__ diff --git a/classes/class_audiostreaminteractive.rst b/classes/class_audiostreaminteractive.rst new file mode 100644 index 000000000000..a96c8b7f7194 --- /dev/null +++ b/classes/class_audiostreaminteractive.rst @@ -0,0 +1,555 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/interactive_music/doc_classes/AudioStreamInteractive.xml. + +.. _class_AudioStreamInteractive: + +AudioStreamInteractive +====================== + +**Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +Audio stream that can playback music interactively, combining clips and a transition table. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This is an audio stream that can playback music interactively, combining clips and a transition table. Clips must be added first, and the transition rules via the :ref:`add_transition`. Additionally, this stream export a property parameter to control the playback via :ref:`AudioStreamPlayer`, :ref:`AudioStreamPlayer2D`, or :ref:`AudioStreamPlayer3D`. + +The way this is used is by filling a number of clips, then configuring the transition table. From there, clips are selected for playback and the music will smoothly go from the current to the new one while using the corresponding transition rule defined in the transition table. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------+-------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`clip_count` | ``0`` | + +-----------------------+-------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`initial_clip` | ``0`` | + +-----------------------+-------------------------------------------------------------------------+-------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_transition`\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`, from_time\: :ref:`TransitionFromTime`, to_time\: :ref:`TransitionToTime`, fade_mode\: :ref:`FadeMode`, fade_beats\: :ref:`float`, use_filler_clip\: :ref:`bool` = false, filler_clip\: :ref:`int` = -1, hold_previous\: :ref:`bool` = false\ ) | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`erase_transition`\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AutoAdvanceMode` | :ref:`get_clip_auto_advance`\ (\ clip_index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_clip_auto_advance_next_clip`\ (\ clip_index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_clip_name`\ (\ clip_index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStream` | :ref:`get_clip_stream`\ (\ clip_index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_transition_fade_beats`\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FadeMode` | :ref:`get_transition_fade_mode`\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_transition_filler_clip`\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TransitionFromTime` | :ref:`get_transition_from_time`\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_transition_list`\ (\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TransitionToTime` | :ref:`get_transition_to_time`\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_transition`\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_transition_holding_previous`\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_transition_using_filler_clip`\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_clip_auto_advance`\ (\ clip_index\: :ref:`int`, mode\: :ref:`AutoAdvanceMode`\ ) | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_clip_auto_advance_next_clip`\ (\ clip_index\: :ref:`int`, auto_advance_next_clip\: :ref:`int`\ ) | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_clip_name`\ (\ clip_index\: :ref:`int`, name\: :ref:`StringName`\ ) | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_clip_stream`\ (\ clip_index\: :ref:`int`, stream\: :ref:`AudioStream`\ ) | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_AudioStreamInteractive_TransitionFromTime: + +.. rst-class:: classref-enumeration + +enum **TransitionFromTime**: + +.. _class_AudioStreamInteractive_constant_TRANSITION_FROM_TIME_IMMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransitionFromTime` **TRANSITION_FROM_TIME_IMMEDIATE** = ``0`` + +Start transition as soon as possible, don't wait for any specific time position. + +.. _class_AudioStreamInteractive_constant_TRANSITION_FROM_TIME_NEXT_BEAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransitionFromTime` **TRANSITION_FROM_TIME_NEXT_BEAT** = ``1`` + +Transition when the clip playback position reaches the next beat. + +.. _class_AudioStreamInteractive_constant_TRANSITION_FROM_TIME_NEXT_BAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransitionFromTime` **TRANSITION_FROM_TIME_NEXT_BAR** = ``2`` + +Transition when the clip playback position reaches the next bar. + +.. _class_AudioStreamInteractive_constant_TRANSITION_FROM_TIME_END: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransitionFromTime` **TRANSITION_FROM_TIME_END** = ``3`` + +Transition when the current clip finished playing. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_AudioStreamInteractive_TransitionToTime: + +.. rst-class:: classref-enumeration + +enum **TransitionToTime**: + +.. _class_AudioStreamInteractive_constant_TRANSITION_TO_TIME_SAME_POSITION: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransitionToTime` **TRANSITION_TO_TIME_SAME_POSITION** = ``0`` + +Transition to the same position in the destination clip. This is useful when both clips have exactly the same length and the music should fade between them. + +.. _class_AudioStreamInteractive_constant_TRANSITION_TO_TIME_START: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransitionToTime` **TRANSITION_TO_TIME_START** = ``1`` + +Transition to the start of the destination clip. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_AudioStreamInteractive_FadeMode: + +.. rst-class:: classref-enumeration + +enum **FadeMode**: + +.. _class_AudioStreamInteractive_constant_FADE_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`FadeMode` **FADE_DISABLED** = ``0`` + +Do not use fade for the transition. This is useful when transitioning from a clip-end to clip-beginning, and each clip has their begin/end. + +.. _class_AudioStreamInteractive_constant_FADE_IN: + +.. rst-class:: classref-enumeration-constant + +:ref:`FadeMode` **FADE_IN** = ``1`` + +Use a fade-in in the next clip, let the current clip finish. + +.. _class_AudioStreamInteractive_constant_FADE_OUT: + +.. rst-class:: classref-enumeration-constant + +:ref:`FadeMode` **FADE_OUT** = ``2`` + +Use a fade-out in the current clip, the next clip will start by itself. + +.. _class_AudioStreamInteractive_constant_FADE_CROSS: + +.. rst-class:: classref-enumeration-constant + +:ref:`FadeMode` **FADE_CROSS** = ``3`` + +Use a cross-fade between clips. + +.. _class_AudioStreamInteractive_constant_FADE_AUTOMATIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`FadeMode` **FADE_AUTOMATIC** = ``4`` + +Use automatic fade logic depending on the transition from/to. It is recommended to use this by default. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_AudioStreamInteractive_AutoAdvanceMode: + +.. rst-class:: classref-enumeration + +enum **AutoAdvanceMode**: + +.. _class_AudioStreamInteractive_constant_AUTO_ADVANCE_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`AutoAdvanceMode` **AUTO_ADVANCE_DISABLED** = ``0`` + +Disable auto-advance (default). + +.. _class_AudioStreamInteractive_constant_AUTO_ADVANCE_ENABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`AutoAdvanceMode` **AUTO_ADVANCE_ENABLED** = ``1`` + +Enable auto-advance, a clip must be specified. + +.. _class_AudioStreamInteractive_constant_AUTO_ADVANCE_RETURN_TO_HOLD: + +.. rst-class:: classref-enumeration-constant + +:ref:`AutoAdvanceMode` **AUTO_ADVANCE_RETURN_TO_HOLD** = ``2`` + +Enable auto-advance, but instead of specifying a clip, the playback will return to hold (see :ref:`add_transition`). + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + +.. _class_AudioStreamInteractive_constant_CLIP_ANY: + +.. rst-class:: classref-constant + +**CLIP_ANY** = ``-1`` + +This constant describes that any clip is valid for a specific transition as either source or destination. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_AudioStreamInteractive_property_clip_count: + +.. rst-class:: classref-property + +:ref:`int` **clip_count** = ``0`` + +.. rst-class:: classref-property-setget + +- |void| **set_clip_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_clip_count**\ (\ ) + +Amount of clips contained in this interactive player. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_property_initial_clip: + +.. rst-class:: classref-property + +:ref:`int` **initial_clip** = ``0`` + +.. rst-class:: classref-property-setget + +- |void| **set_initial_clip**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_initial_clip**\ (\ ) + +Index of the initial clip, which will be played first when this stream is played. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_AudioStreamInteractive_method_add_transition: + +.. rst-class:: classref-method + +|void| **add_transition**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`, from_time\: :ref:`TransitionFromTime`, to_time\: :ref:`TransitionToTime`, fade_mode\: :ref:`FadeMode`, fade_beats\: :ref:`float`, use_filler_clip\: :ref:`bool` = false, filler_clip\: :ref:`int` = -1, hold_previous\: :ref:`bool` = false\ ) + +Add a transition between two clips. Provide the indices of the source and destination clips, or use the :ref:`CLIP_ANY` constant to indicate that transition happens to/from any clip to this one. + +\* ``from_time`` indicates the moment in the current clip the transition will begin after triggered. + +\* ``to_time`` indicates the time in the next clip that the playback will start from. + +\* ``fade_mode`` indicates how the fade will happen between clips. If unsure, just use :ref:`FADE_AUTOMATIC` which uses the most common type of fade for each situation. + +\* ``fade_beats`` indicates how many beats the fade will take. Using decimals is allowed. + +\* ``use_filler_clip`` indicates that there will be a filler clip used between the source and destination clips. + +\* ``filler_clip`` the index of the filler clip. + +\* If ``hold_previous`` is used, then this clip will be remembered. This can be used together with :ref:`AUTO_ADVANCE_RETURN_TO_HOLD` to return to this clip after another is done playing. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_erase_transition: + +.. rst-class:: classref-method + +|void| **erase_transition**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) + +Erase a transition by providing ``from_clip`` and ``to_clip`` clip indices. :ref:`CLIP_ANY` can be used for either argument or both. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_get_clip_auto_advance: + +.. rst-class:: classref-method + +:ref:`AutoAdvanceMode` **get_clip_auto_advance**\ (\ clip_index\: :ref:`int`\ ) |const| + +Return whether a clip has auto-advance enabled. See :ref:`set_clip_auto_advance`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_get_clip_auto_advance_next_clip: + +.. rst-class:: classref-method + +:ref:`int` **get_clip_auto_advance_next_clip**\ (\ clip_index\: :ref:`int`\ ) |const| + +Return the clip towards which the clip referenced by ``clip_index`` will auto-advance to. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_get_clip_name: + +.. rst-class:: classref-method + +:ref:`StringName` **get_clip_name**\ (\ clip_index\: :ref:`int`\ ) |const| + +Return the name of a clip. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_get_clip_stream: + +.. rst-class:: classref-method + +:ref:`AudioStream` **get_clip_stream**\ (\ clip_index\: :ref:`int`\ ) |const| + +Return the :ref:`AudioStream` associated with a clip. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_get_transition_fade_beats: + +.. rst-class:: classref-method + +:ref:`float` **get_transition_fade_beats**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| + +Return the time (in beats) for a transition (see :ref:`add_transition`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_get_transition_fade_mode: + +.. rst-class:: classref-method + +:ref:`FadeMode` **get_transition_fade_mode**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| + +Return the mode for a transition (see :ref:`add_transition`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_get_transition_filler_clip: + +.. rst-class:: classref-method + +:ref:`int` **get_transition_filler_clip**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| + +Return the filler clip for a transition (see :ref:`add_transition`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_get_transition_from_time: + +.. rst-class:: classref-method + +:ref:`TransitionFromTime` **get_transition_from_time**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| + +Return the source time position for a transition (see :ref:`add_transition`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_get_transition_list: + +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_transition_list**\ (\ ) |const| + +Return the list of transitions (from, to interleaved). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_get_transition_to_time: + +.. rst-class:: classref-method + +:ref:`TransitionToTime` **get_transition_to_time**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| + +Return the destination time position for a transition (see :ref:`add_transition`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_has_transition: + +.. rst-class:: classref-method + +:ref:`bool` **has_transition**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| + +Return true if a given transition exists (was added via :ref:`add_transition`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_is_transition_holding_previous: + +.. rst-class:: classref-method + +:ref:`bool` **is_transition_holding_previous**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| + +Return whether a transition uses the *hold previous* functionality (see :ref:`add_transition`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_is_transition_using_filler_clip: + +.. rst-class:: classref-method + +:ref:`bool` **is_transition_using_filler_clip**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| + +Return whether a transition uses the *filler clip* functionality (see :ref:`add_transition`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_set_clip_auto_advance: + +.. rst-class:: classref-method + +|void| **set_clip_auto_advance**\ (\ clip_index\: :ref:`int`, mode\: :ref:`AutoAdvanceMode`\ ) + +Set whether a clip will auto-advance by changing the auto-advance mode. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_set_clip_auto_advance_next_clip: + +.. rst-class:: classref-method + +|void| **set_clip_auto_advance_next_clip**\ (\ clip_index\: :ref:`int`, auto_advance_next_clip\: :ref:`int`\ ) + +Set the index of the next clip towards which this clip will auto advance to when finished. If the clip being played loops, then auto-advance will be ignored. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_set_clip_name: + +.. rst-class:: classref-method + +|void| **set_clip_name**\ (\ clip_index\: :ref:`int`, name\: :ref:`StringName`\ ) + +Set the name of the current clip (for easier identification). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_set_clip_stream: + +.. rst-class:: classref-method + +|void| **set_clip_stream**\ (\ clip_index\: :ref:`int`, stream\: :ref:`AudioStream`\ ) + +Set the :ref:`AudioStream` associated with the current clip. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreammp3.rst b/classes/class_audiostreammp3.rst index ee031252d79d..15c8caabb220 100644 --- a/classes/class_audiostreammp3.rst +++ b/classes/class_audiostreammp3.rst @@ -147,6 +147,8 @@ You can load a file without having to import it beforehand using the code snippe +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray` for more details. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_audiostreamplayback.rst b/classes/class_audiostreamplayback.rst index ebde6a874bd1..eaa3e1cfe02b 100644 --- a/classes/class_audiostreamplayback.rst +++ b/classes/class_audiostreamplayback.rst @@ -12,7 +12,7 @@ AudioStreamPlayback **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AudioStreamPlaybackPolyphonic`, :ref:`AudioStreamPlaybackResampled` +**Inherited By:** :ref:`AudioStreamPlaybackInteractive`, :ref:`AudioStreamPlaybackPlaylist`, :ref:`AudioStreamPlaybackPolyphonic`, :ref:`AudioStreamPlaybackResampled`, :ref:`AudioStreamPlaybackSynchronized` Meta class for playing back audio. @@ -28,7 +28,7 @@ Can play, loop, pause a scroll through audio. See :ref:`AudioStream`__ +- `Audio Generator Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_audiostreamplaybackinteractive.rst b/classes/class_audiostreamplaybackinteractive.rst new file mode 100644 index 000000000000..52af6b0269d1 --- /dev/null +++ b/classes/class_audiostreamplaybackinteractive.rst @@ -0,0 +1,74 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/interactive_music/doc_classes/AudioStreamPlaybackInteractive.xml. + +.. _class_AudioStreamPlaybackInteractive: + +AudioStreamPlaybackInteractive +============================== + +**Inherits:** :ref:`AudioStreamPlayback` **<** :ref:`RefCounted` **<** :ref:`Object` + +Playback component of :ref:`AudioStreamInteractive`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Playback component of :ref:`AudioStreamInteractive`. Contains functions to change the currently played clip. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`switch_to_clip`\ (\ clip_index\: :ref:`int`\ ) | + +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`switch_to_clip_by_name`\ (\ clip_name\: :ref:`StringName`\ ) | + +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_AudioStreamPlaybackInteractive_method_switch_to_clip: + +.. rst-class:: classref-method + +|void| **switch_to_clip**\ (\ clip_index\: :ref:`int`\ ) + +Switch to a clip (by index). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlaybackInteractive_method_switch_to_clip_by_name: + +.. rst-class:: classref-method + +|void| **switch_to_clip_by_name**\ (\ clip_name\: :ref:`StringName`\ ) + +Switch to a clip (by name). + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreamplaybackplaylist.rst b/classes/class_audiostreamplaybackplaylist.rst new file mode 100644 index 000000000000..6c5a3c836fda --- /dev/null +++ b/classes/class_audiostreamplaybackplaylist.rst @@ -0,0 +1,24 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/interactive_music/doc_classes/AudioStreamPlaybackPlaylist.xml. + +.. _class_AudioStreamPlaybackPlaylist: + +AudioStreamPlaybackPlaylist +=========================== + +**Inherits:** :ref:`AudioStreamPlayback` **<** :ref:`RefCounted` **<** :ref:`Object` + +Playback class used for :ref:`AudioStreamPlaylist`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreamplaybacksynchronized.rst b/classes/class_audiostreamplaybacksynchronized.rst new file mode 100644 index 000000000000..d0703335a77c --- /dev/null +++ b/classes/class_audiostreamplaybacksynchronized.rst @@ -0,0 +1,26 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/interactive_music/doc_classes/AudioStreamPlaybackSynchronized.xml. + +.. _class_AudioStreamPlaybackSynchronized: + +AudioStreamPlaybackSynchronized +=============================== + +**Inherits:** :ref:`AudioStreamPlayback` **<** :ref:`RefCounted` **<** :ref:`Object` + +.. container:: contribute + + There is currently no description for this class. Please help us by :ref:`contributing one `! + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreamplayer.rst b/classes/class_audiostreamplayer.rst index f6c43302ea2d..856dc0137268 100644 --- a/classes/class_audiostreamplayer.rst +++ b/classes/class_audiostreamplayer.rst @@ -15,16 +15,18 @@ AudioStreamPlayer **Inherits:** :ref:`Node` **<** :ref:`Object` -Plays back audio non-positionally. +A node for audio playback. .. rst-class:: classref-introduction-group Description ----------- -Plays an audio stream non-positionally. +The **AudioStreamPlayer** node plays an audio stream non-positionally. It is ideal for user interfaces, menus, or background music. -To play audio positionally, use :ref:`AudioStreamPlayer2D` or :ref:`AudioStreamPlayer3D` instead of **AudioStreamPlayer**. +To use this node, :ref:`stream` needs to be set to a valid :ref:`AudioStream` resource. Playing more than one sound at the time is also supported, see :ref:`max_polyphony`. + +If you need to play audio at a specific position, use :ref:`AudioStreamPlayer2D` or :ref:`AudioStreamPlayer3D` instead. .. rst-class:: classref-introduction-group @@ -33,15 +35,15 @@ Tutorials - :doc:`Audio streams <../tutorials/audio/audio_streams>` -- `2D Dodge The Creeps Demo `__ +- `2D Dodge The Creeps Demo `__ -- `Audio Device Changer Demo `__ +- `Audio Device Changer Demo `__ -- `Audio Generator Demo `__ +- `Audio Generator Demo `__ -- `Audio Mic Record Demo `__ +- `Audio Microphone Record Demo `__ -- `Audio Spectrum Demo `__ +- `Audio Spectrum Visualizer Demo `__ .. rst-class:: classref-reftable-group @@ -108,7 +110,7 @@ Signals **finished**\ (\ ) -Emitted when the audio stops playing. +Emitted when a sound finishes playing without interruptions. This signal is *not* emitted when calling :ref:`stop`, or when exiting the tree while sounds are playing. .. rst-class:: classref-section-separator @@ -131,7 +133,7 @@ enum **MixTarget**: :ref:`MixTarget` **MIX_TARGET_STEREO** = ``0`` -The audio will be played only on the first channel. +The audio will be played only on the first channel. This is the default. .. _class_AudioStreamPlayer_constant_MIX_TARGET_SURROUND: @@ -169,7 +171,7 @@ Property Descriptions - |void| **set_autoplay**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_autoplay_enabled**\ (\ ) -If ``true``, audio plays when added to scene tree. +If ``true``, this node calls :ref:`play` when entering the tree. .. rst-class:: classref-item-separator @@ -186,9 +188,9 @@ If ``true``, audio plays when added to scene tree. - |void| **set_bus**\ (\ value\: :ref:`StringName`\ ) - :ref:`StringName` **get_bus**\ (\ ) -Bus on which this audio is playing. +The target bus name. All sounds from this node will be playing on this bus. -\ **Note:** When setting this property, keep in mind that no validation is performed to see if the given name matches an existing bus. This is because audio bus layouts might be loaded after this property is set. If this given name can't be resolved at runtime, it will fall back to ``"Master"``. +\ **Note:** At runtime, if no bus with the given name exists, all sounds will fall back on ``"Master"``. See also :ref:`AudioServer.get_bus_name`. .. rst-class:: classref-item-separator @@ -205,7 +207,7 @@ Bus on which this audio is playing. - |void| **set_max_polyphony**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_max_polyphony**\ (\ ) -The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds. +The maximum number of sounds this node can play at the same time. Calling :ref:`play` after this value is reached will cut off the oldest sounds. .. rst-class:: classref-item-separator @@ -222,7 +224,7 @@ The maximum number of sounds this node can play at the same time. Playing additi - |void| **set_mix_target**\ (\ value\: :ref:`MixTarget`\ ) - :ref:`MixTarget` **get_mix_target**\ (\ ) -If the audio configuration has more than two speakers, this sets the target channels. See :ref:`MixTarget` constants. +The mix target channels, as one of the :ref:`MixTarget` constants. Has no effect when two speakers or less are detected (see :ref:`SpeakerMode`). .. rst-class:: classref-item-separator @@ -239,7 +241,7 @@ If the audio configuration has more than two speakers, this sets the target chan - |void| **set_pitch_scale**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_pitch_scale**\ (\ ) -The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate. +The audio's pitch and tempo, as a multiplier of the :ref:`stream`'s sample rate. A value of ``2.0`` doubles the audio's pitch, while a value of ``0.5`` halves the pitch. .. rst-class:: classref-item-separator @@ -255,7 +257,7 @@ The pitch and the tempo of the audio, as a multiplier of the audio sample's samp - :ref:`bool` **is_playing**\ (\ ) -If ``true``, audio is playing. +If ``true``, this node is playing sounds. Setting this property has the same effect as :ref:`play` and :ref:`stop`. .. rst-class:: classref-item-separator @@ -272,7 +274,7 @@ If ``true``, audio is playing. - |void| **set_stream**\ (\ value\: :ref:`AudioStream`\ ) - :ref:`AudioStream` **get_stream**\ (\ ) -The :ref:`AudioStream` object to be played. +The :ref:`AudioStream` resource to be played. Setting this property stops all currently playing sounds. If left empty, the **AudioStreamPlayer** does not work. .. rst-class:: classref-item-separator @@ -289,7 +291,9 @@ The :ref:`AudioStream` object to be played. - |void| **set_stream_paused**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_stream_paused**\ (\ ) -If ``true``, the playback is paused. You can resume it by setting :ref:`stream_paused` to ``false``. +If ``true``, the sounds are paused. Setting :ref:`stream_paused` to ``false`` resumes all sounds. + +\ **Note:** This property is automatically changed when exiting or entering the tree, or this node is paused (see :ref:`Node.process_mode`). .. rst-class:: classref-item-separator @@ -306,7 +310,9 @@ If ``true``, the playback is paused. You can resume it by setting :ref:`stream_p - |void| **set_volume_db**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_volume_db**\ (\ ) -Volume of sound, in dB. +Volume of sound, in decibel. This is an offset of the :ref:`stream`'s volume. + +\ **Note:** To convert between decibel and linear energy (like most volume sliders do), use :ref:`@GlobalScope.db_to_linear` and :ref:`@GlobalScope.linear_to_db`. .. rst-class:: classref-section-separator @@ -323,7 +329,9 @@ Method Descriptions :ref:`float` **get_playback_position**\ (\ ) -Returns the position in the :ref:`AudioStream` in seconds. +Returns the position in the :ref:`AudioStream` of the latest sound, in seconds. Returns ``0.0`` if no sounds are playing. + +\ **Note:** The position is not always accurate, as the :ref:`AudioServer` does not mix audio every processed frame. To get more accurate results, add :ref:`AudioServer.get_time_since_last_mix` to the returned position. .. rst-class:: classref-item-separator @@ -335,7 +343,7 @@ Returns the position in the :ref:`AudioStream` in seconds. :ref:`AudioStreamPlayback` **get_stream_playback**\ (\ ) -Returns the :ref:`AudioStreamPlayback` object associated with this **AudioStreamPlayer**. +Returns the latest :ref:`AudioStreamPlayback` of this node, usually the most recently created by :ref:`play`. If no sounds are playing, this method fails and returns an empty playback. .. rst-class:: classref-item-separator @@ -347,7 +355,7 @@ Returns the :ref:`AudioStreamPlayback` object associa :ref:`bool` **has_stream_playback**\ (\ ) -Returns whether the **AudioStreamPlayer** can return the :ref:`AudioStreamPlayback` object or not. +Returns ``true`` if any sound is active, even if :ref:`stream_paused` is set to ``true``. See also :ref:`playing` and :ref:`get_stream_playback`. .. rst-class:: classref-item-separator @@ -359,7 +367,7 @@ Returns whether the **AudioStreamPlayer** can return the :ref:`AudioStreamPlayba |void| **play**\ (\ from_position\: :ref:`float` = 0.0\ ) -Plays the audio from the given ``from_position``, in seconds. +Plays a sound from the beginning, or the given ``from_position`` in seconds. .. rst-class:: classref-item-separator @@ -371,7 +379,7 @@ Plays the audio from the given ``from_position``, in seconds. |void| **seek**\ (\ to_position\: :ref:`float`\ ) -Sets the position from which audio will be played, in seconds. +Restarts all sounds to be played from the given ``to_position``, in seconds. Does nothing if no sounds are playing. .. rst-class:: classref-item-separator @@ -383,7 +391,7 @@ Sets the position from which audio will be played, in seconds. |void| **stop**\ (\ ) -Stops the audio. +Stops all sounds from this node. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_audiostreamplaylist.rst b/classes/class_audiostreamplaylist.rst new file mode 100644 index 000000000000..a303dec5469e --- /dev/null +++ b/classes/class_audiostreamplaylist.rst @@ -0,0 +1,189 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/interactive_music/doc_classes/AudioStreamPlaylist.xml. + +.. _class_AudioStreamPlaylist: + +AudioStreamPlaylist +=================== + +**Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +:ref:`AudioStream` that includes sub-streams and plays them back like a playslit. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`fade_time` | ``0.3`` | + +---------------------------+----------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`loop` | ``true`` | + +---------------------------+----------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`shuffle` | ``false`` | + +---------------------------+----------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`stream_count` | ``0`` | + +---------------------------+----------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_bpm`\ (\ ) |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStream` | :ref:`get_list_stream`\ (\ stream_index\: :ref:`int`\ ) |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_list_stream`\ (\ stream_index\: :ref:`int`, audio_stream\: :ref:`AudioStream`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + +.. _class_AudioStreamPlaylist_constant_MAX_STREAMS: + +.. rst-class:: classref-constant + +**MAX_STREAMS** = ``64`` + +Maximum amount of streams supported in the playlist. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_AudioStreamPlaylist_property_fade_time: + +.. rst-class:: classref-property + +:ref:`float` **fade_time** = ``0.3`` + +.. rst-class:: classref-property-setget + +- |void| **set_fade_time**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_fade_time**\ (\ ) + +Fade time used when a stream ends, when going to the next one. Streams are expected to have an extra bit of audio after the end to help with fading. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlaylist_property_loop: + +.. rst-class:: classref-property + +:ref:`bool` **loop** = ``true`` + +.. rst-class:: classref-property-setget + +- |void| **set_loop**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **has_loop**\ (\ ) + +If true, the playlist will loop, otherwise the playlist when end when the last stream is played. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlaylist_property_shuffle: + +.. rst-class:: classref-property + +:ref:`bool` **shuffle** = ``false`` + +.. rst-class:: classref-property-setget + +- |void| **set_shuffle**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_shuffle**\ (\ ) + +Shuffle the playlist. Streams are played in random order. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlaylist_property_stream_count: + +.. rst-class:: classref-property + +:ref:`int` **stream_count** = ``0`` + +.. rst-class:: classref-property-setget + +- |void| **set_stream_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_stream_count**\ (\ ) + +Amount of streams in the playlist. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_AudioStreamPlaylist_method_get_bpm: + +.. rst-class:: classref-method + +:ref:`float` **get_bpm**\ (\ ) |const| + +Return the bpm of the playlist, which can vary depending on the clip being played. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlaylist_method_get_list_stream: + +.. rst-class:: classref-method + +:ref:`AudioStream` **get_list_stream**\ (\ stream_index\: :ref:`int`\ ) |const| + +Get the stream at playback position index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlaylist_method_set_list_stream: + +.. rst-class:: classref-method + +|void| **set_list_stream**\ (\ stream_index\: :ref:`int`, audio_stream\: :ref:`AudioStream`\ ) + +Set the stream at playback position index. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreamsynchronized.rst b/classes/class_audiostreamsynchronized.rst new file mode 100644 index 000000000000..40018eb9d554 --- /dev/null +++ b/classes/class_audiostreamsynchronized.rst @@ -0,0 +1,153 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/interactive_music/doc_classes/AudioStreamSynchronized.xml. + +.. _class_AudioStreamSynchronized: + +AudioStreamSynchronized +======================= + +**Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +Stream that can be fitted with sub-streams, which will be played in-sync. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This is a stream that can be fitted with sub-streams, which will be played in-sync. The streams being at exactly the same time when play is pressed, and will end when the last of them ends. If one of the sub-streams loops, then playback will continue. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------+--------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`stream_count` | ``0`` | + +-----------------------+--------------------------------------------------------------------------+-------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStream` | :ref:`get_sync_stream`\ (\ stream_index\: :ref:`int`\ ) |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_sync_stream_volume`\ (\ stream_index\: :ref:`int`\ ) |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_sync_stream`\ (\ stream_index\: :ref:`int`, audio_stream\: :ref:`AudioStream`\ ) | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_sync_stream_volume`\ (\ stream_index\: :ref:`int`, volume_db\: :ref:`float`\ ) | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + +.. _class_AudioStreamSynchronized_constant_MAX_STREAMS: + +.. rst-class:: classref-constant + +**MAX_STREAMS** = ``32`` + +Maximum amount of streams that can be synchrohized. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_AudioStreamSynchronized_property_stream_count: + +.. rst-class:: classref-property + +:ref:`int` **stream_count** = ``0`` + +.. rst-class:: classref-property-setget + +- |void| **set_stream_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_stream_count**\ (\ ) + +Set the total amount of streams that will be played back synchronized. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_AudioStreamSynchronized_method_get_sync_stream: + +.. rst-class:: classref-method + +:ref:`AudioStream` **get_sync_stream**\ (\ stream_index\: :ref:`int`\ ) |const| + +Get one of the synchronized streams, by index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamSynchronized_method_get_sync_stream_volume: + +.. rst-class:: classref-method + +:ref:`float` **get_sync_stream_volume**\ (\ stream_index\: :ref:`int`\ ) |const| + +Get the volume of one of the synchronized streams, by index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamSynchronized_method_set_sync_stream: + +.. rst-class:: classref-method + +|void| **set_sync_stream**\ (\ stream_index\: :ref:`int`, audio_stream\: :ref:`AudioStream`\ ) + +Set one of the synchronized streams, by index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamSynchronized_method_set_sync_stream_volume: + +.. rst-class:: classref-method + +|void| **set_sync_stream_volume**\ (\ stream_index\: :ref:`int`, volume_db\: :ref:`float`\ ) + +Set the volume of one of the synchronized streams, by index. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreamwav.rst b/classes/class_audiostreamwav.rst index cc90f5658948..a17aaa9ccd6a 100644 --- a/classes/class_audiostreamwav.rst +++ b/classes/class_audiostreamwav.rst @@ -171,6 +171,8 @@ Contains the audio data in bytes. \ **Note:** This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray` for more details. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_basis.rst b/classes/class_basis.rst index dbec1dabe268..623e5ed438f6 100644 --- a/classes/class_basis.rst +++ b/classes/class_basis.rst @@ -44,13 +44,13 @@ Tutorials - :doc:`Using 3D transforms <../tutorials/3d/using_transforms>` -- `Matrix Transform Demo `__ +- `Matrix Transform Demo `__ -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ -- `3D Voxel Demo `__ +- `3D Voxel Demo `__ -- `2.5D Demo `__ +- `2.5D Game Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_boneattachment3d.rst b/classes/class_boneattachment3d.rst index 727d5ac06941..8d6c0007c602 100644 --- a/classes/class_boneattachment3d.rst +++ b/classes/class_boneattachment3d.rst @@ -116,6 +116,8 @@ The name of the attached bone. Whether the BoneAttachment3D node will override the bone pose of the bone it is attached to. When set to ``true``, the BoneAttachment3D node can change the pose of the bone. When set to ``false``, the BoneAttachment3D will always be set to the bone's transform. +\ **Note:** This override performs interruptively in the skeleton update process using signals due to the old design. It may cause unintended behavior when used at the same time with :ref:`SkeletonModifier3D`. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_boxshape3d.rst b/classes/class_boxshape3d.rst index 00aecb2cb3c1..7a2d8e9544ee 100644 --- a/classes/class_boxshape3d.rst +++ b/classes/class_boxshape3d.rst @@ -28,11 +28,11 @@ A 3D box shape, intended for use in physics. Usually used to provide a shape for Tutorials --------- -- `3D Physics Tests Demo `__ +- `3D Physics Tests Demo `__ -- `3D Kinematic Character Demo `__ +- `3D Kinematic Character Demo `__ -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_button.rst b/classes/class_button.rst index 64d21a7e2463..ea2d846fb478 100644 --- a/classes/class_button.rst +++ b/classes/class_button.rst @@ -65,9 +65,9 @@ See also :ref:`BaseButton` which contains common properties an Tutorials --------- -- `2D Dodge The Creeps Demo `__ +- `2D Dodge The Creeps Demo `__ -- `OS Test Demo `__ +- `Operating System Testing Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_callable.rst b/classes/class_callable.rst index 0d26b3e85b91..02b66aabb646 100644 --- a/classes/class_callable.rst +++ b/classes/class_callable.rst @@ -129,6 +129,8 @@ Methods +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Callable` | :ref:`create`\ (\ variant\: :ref:`Variant`, method\: :ref:`StringName`\ ) |static| | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_argument_count`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_bound_arguments`\ (\ ) |const| | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_bound_arguments_count`\ (\ ) |const| | @@ -317,6 +319,18 @@ Creates a new **Callable** for the method named ``method`` in the specified ``va ---- +.. _class_Callable_method_get_argument_count: + +.. rst-class:: classref-method + +:ref:`int` **get_argument_count**\ (\ ) |const| + +Returns the total number of arguments this **Callable** should take, including optional arguments. This means that any arguments bound with :ref:`bind` are *subtracted* from the result, and any arguments unbound with :ref:`unbind` are *added* to the result. + +.. rst-class:: classref-item-separator + +---- + .. _class_Callable_method_get_bound_arguments: .. rst-class:: classref-method diff --git a/classes/class_camera2d.rst b/classes/class_camera2d.rst index 9b02b053424e..810348fa9c6b 100644 --- a/classes/class_camera2d.rst +++ b/classes/class_camera2d.rst @@ -32,11 +32,9 @@ Note that the **Camera2D** node's ``position`` doesn't represent the actual posi Tutorials --------- -- `2D Platformer Demo `__ +- `2D Platformer Demo `__ -- `2D Isometric Demo `__ - -- `2D HDR Demo `__ +- `2D Isometric Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_camera3d.rst b/classes/class_camera3d.rst index 9020c3832865..dfdde08de559 100644 --- a/classes/class_camera3d.rst +++ b/classes/class_camera3d.rst @@ -28,7 +28,7 @@ Description Tutorials --------- -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_cameraserver.rst b/classes/class_cameraserver.rst index dca7797eda01..65719ba195ba 100644 --- a/classes/class_cameraserver.rst +++ b/classes/class_cameraserver.rst @@ -23,7 +23,7 @@ The **CameraServer** keeps track of different cameras accessible in Godot. These It is notably used to provide AR modules with a video feed from the camera. -\ **Note:** This class is currently only implemented on macOS and iOS. On other platforms, no :ref:`CameraFeed`\ s will be available. +\ **Note:** This class is currently only implemented on macOS and iOS. To get a :ref:`CameraFeed` on iOS, the camera plugin from `godot-ios-plugins `__ is required. On other platforms, no :ref:`CameraFeed`\ s will be available. .. rst-class:: classref-reftable-group diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index 4b740494bbc3..519ae420a6fb 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -38,7 +38,7 @@ Tutorials - :doc:`Custom drawing in 2D <../tutorials/2d/custom_drawing_in_2d>` -- `Audio Spectrum Demo `__ +- `Audio Spectrum Visualizer Demo `__ .. rst-class:: classref-reftable-group @@ -733,9 +733,11 @@ If ``true``, this **CanvasItem** is drawn. The node is only visible if all of it - |void| **set_y_sort_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_y_sort_enabled**\ (\ ) -If ``true``, this **CanvasItem** and its **CanvasItem** child nodes are sorted according to the Y position. Nodes with a lower Y position are drawn before those with a higher Y position. If ``false``, Y-sorting is disabled. +If ``true``, this and child **CanvasItem** nodes with a lower Y position are rendered in front of nodes with a higher Y position. If ``false``, this and child **CanvasItem** nodes are rendered normally in scene tree order. -You can nest nodes with Y-sorting. Child Y-sorted nodes are sorted in the same space as the parent Y-sort. This feature allows you to organize a scene better or divide it into multiple ones without changing your scene tree. +With Y-sorting enabled on a parent node ('A') but disabled on a child node ('B'), the child node ('B') is sorted but its children ('C1', 'C2', etc) render together on the same Y position as the child node 'B'. This allows you to organize the render order of a scene without changing the scene tree. + +Nodes sort relative to each other only if they are on the same :ref:`z_index`. .. rst-class:: classref-item-separator @@ -769,7 +771,7 @@ If ``true``, the node's Z index is relative to its parent's Z index. If this nod - |void| **set_z_index**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_z_index**\ (\ ) -Z index. Controls the order in which the nodes render. A node with a higher Z index will display in front of others. Must be between :ref:`RenderingServer.CANVAS_ITEM_Z_MIN` and :ref:`RenderingServer.CANVAS_ITEM_Z_MAX` (inclusive). +Controls the order in which the nodes render. A node with a higher Z index will display in front of others. Must be between :ref:`RenderingServer.CANVAS_ITEM_Z_MIN` and :ref:`RenderingServer.CANVAS_ITEM_Z_MAX` (inclusive). \ **Note:** Changing the Z index of a :ref:`Control` only affects the drawing order, not the order in which input events are handled. This can be useful to implement certain UI animations, e.g. a menu where hovered items are scaled and should overlap others. diff --git a/classes/class_canvaslayer.rst b/classes/class_canvaslayer.rst index 792e9d304540..b98daac1c4de 100644 --- a/classes/class_canvaslayer.rst +++ b/classes/class_canvaslayer.rst @@ -38,7 +38,7 @@ Tutorials - :doc:`Canvas layers <../tutorials/2d/canvas_layers>` -- `2D Dodge The Creeps Demo `__ +- `2D Dodge The Creeps Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_capsuleshape3d.rst b/classes/class_capsuleshape3d.rst index 0bde8e5d1665..9e69bcfc2de8 100644 --- a/classes/class_capsuleshape3d.rst +++ b/classes/class_capsuleshape3d.rst @@ -28,7 +28,7 @@ A 3D capsule shape, intended for use in physics. Usually used to provide a shape Tutorials --------- -- `3D Physics Tests Demo `__ +- `3D Physics Tests Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_characterbody2d.rst b/classes/class_characterbody2d.rst index b18d5619598f..d48aacf586c7 100644 --- a/classes/class_characterbody2d.rst +++ b/classes/class_characterbody2d.rst @@ -32,9 +32,9 @@ Tutorials - :doc:`Using CharacterBody2D <../tutorials/physics/using_character_body_2d>` -- `2D Kinematic Character Demo `__ +- `2D Kinematic Character Demo `__ -- `2D Platformer Demo `__ +- `2D Platformer Demo `__ .. rst-class:: classref-reftable-group @@ -498,7 +498,9 @@ Returns the floor's collision angle at the last collision point according to ``u :ref:`Vector2` **get_floor_normal**\ (\ ) |const| -Returns the surface normal of the floor at the last collision point. Only valid after calling :ref:`move_and_slide` and when :ref:`is_on_floor` returns ``true``. +Returns the collision normal of the floor at the last collision point. Only valid after calling :ref:`move_and_slide` and when :ref:`is_on_floor` returns ``true``. + +\ **Warning:** The collision normal is not always the same as the surface normal. .. rst-class:: classref-item-separator @@ -615,7 +617,9 @@ Returns the number of times the body collided and changed direction during the l :ref:`Vector2` **get_wall_normal**\ (\ ) |const| -Returns the surface normal of the wall at the last collision point. Only valid after calling :ref:`move_and_slide` and when :ref:`is_on_wall` returns ``true``. +Returns the collision normal of the wall at the last collision point. Only valid after calling :ref:`move_and_slide` and when :ref:`is_on_wall` returns ``true``. + +\ **Warning:** The collision normal is not always the same as the surface normal. .. rst-class:: classref-item-separator diff --git a/classes/class_characterbody3d.rst b/classes/class_characterbody3d.rst index d9e49bf051be..67bc1081f12b 100644 --- a/classes/class_characterbody3d.rst +++ b/classes/class_characterbody3d.rst @@ -30,13 +30,13 @@ Tutorials - :doc:`Kinematic character (2D) <../tutorials/physics/kinematic_character_2d>` -- `3D Kinematic Character Demo `__ +- `3D Kinematic Character Demo `__ -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ -- `3D Voxel Demo `__ +- `3D Voxel Demo `__ -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group @@ -502,7 +502,9 @@ Returns the floor's collision angle at the last collision point according to ``u :ref:`Vector3` **get_floor_normal**\ (\ ) |const| -Returns the surface normal of the floor at the last collision point. Only valid after calling :ref:`move_and_slide` and when :ref:`is_on_floor` returns ``true``. +Returns the collision normal of the floor at the last collision point. Only valid after calling :ref:`move_and_slide` and when :ref:`is_on_floor` returns ``true``. + +\ **Warning:** The collision normal is not always the same as the surface normal. .. rst-class:: classref-item-separator @@ -610,7 +612,9 @@ Returns the number of times the body collided and changed direction during the l :ref:`Vector3` **get_wall_normal**\ (\ ) |const| -Returns the surface normal of the wall at the last collision point. Only valid after calling :ref:`move_and_slide` and when :ref:`is_on_wall` returns ``true``. +Returns the collision normal of the wall at the last collision point. Only valid after calling :ref:`move_and_slide` and when :ref:`is_on_wall` returns ``true``. + +\ **Warning:** The collision normal is not always the same as the surface normal. .. rst-class:: classref-item-separator diff --git a/classes/class_classdb.rst b/classes/class_classdb.rst index e0e2ebfdf49e..c86a6dbead39 100644 --- a/classes/class_classdb.rst +++ b/classes/class_classdb.rst @@ -29,53 +29,55 @@ Methods .. table:: :widths: auto - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`can_instantiate`\ (\ class\: :ref:`StringName`\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`class_exists`\ (\ class\: :ref:`StringName`\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`class_get_enum_constants`\ (\ class\: :ref:`StringName`, enum\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`class_get_enum_list`\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`class_get_integer_constant`\ (\ class\: :ref:`StringName`, name\: :ref:`StringName`\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`class_get_integer_constant_enum`\ (\ class\: :ref:`StringName`, name\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`class_get_integer_constant_list`\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`class_get_method_list`\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`class_get_property`\ (\ object\: :ref:`Object`, property\: :ref:`StringName`\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`class_get_property_list`\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`class_get_signal`\ (\ class\: :ref:`StringName`, signal\: :ref:`StringName`\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`class_get_signal_list`\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`class_has_enum`\ (\ class\: :ref:`StringName`, name\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`class_has_integer_constant`\ (\ class\: :ref:`StringName`, name\: :ref:`StringName`\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`class_has_method`\ (\ class\: :ref:`StringName`, method\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`class_has_signal`\ (\ class\: :ref:`StringName`, signal\: :ref:`StringName`\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`class_set_property`\ (\ object\: :ref:`Object`, property\: :ref:`StringName`, value\: :ref:`Variant`\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_class_list`\ (\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_inheriters_from_class`\ (\ class\: :ref:`StringName`\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`get_parent_class`\ (\ class\: :ref:`StringName`\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`instantiate`\ (\ class\: :ref:`StringName`\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_class_enabled`\ (\ class\: :ref:`StringName`\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_parent_class`\ (\ class\: :ref:`StringName`, inherits\: :ref:`StringName`\ ) |const| | - +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`can_instantiate`\ (\ class\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`class_exists`\ (\ class\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`class_get_enum_constants`\ (\ class\: :ref:`StringName`, enum\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`class_get_enum_list`\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`class_get_integer_constant`\ (\ class\: :ref:`StringName`, name\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`class_get_integer_constant_enum`\ (\ class\: :ref:`StringName`, name\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`class_get_integer_constant_list`\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`class_get_method_argument_count`\ (\ class\: :ref:`StringName`, method\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`class_get_method_list`\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`class_get_property`\ (\ object\: :ref:`Object`, property\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`class_get_property_list`\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`class_get_signal`\ (\ class\: :ref:`StringName`, signal\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`class_get_signal_list`\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`class_has_enum`\ (\ class\: :ref:`StringName`, name\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`class_has_integer_constant`\ (\ class\: :ref:`StringName`, name\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`class_has_method`\ (\ class\: :ref:`StringName`, method\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`class_has_signal`\ (\ class\: :ref:`StringName`, signal\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`class_set_property`\ (\ object\: :ref:`Object`, property\: :ref:`StringName`, value\: :ref:`Variant`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_class_list`\ (\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_inheriters_from_class`\ (\ class\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_parent_class`\ (\ class\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`instantiate`\ (\ class\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_class_enabled`\ (\ class\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_parent_class`\ (\ class\: :ref:`StringName`, inherits\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -170,6 +172,18 @@ Returns an array with the names all the integer constants of ``class`` or its an ---- +.. _class_ClassDB_method_class_get_method_argument_count: + +.. rst-class:: classref-method + +:ref:`int` **class_get_method_argument_count**\ (\ class\: :ref:`StringName`, method\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| + +Returns the number of arguments of the method ``method`` of ``class`` or its ancestry if ``no_inheritance`` is ``false``. + +.. rst-class:: classref-item-separator + +---- + .. _class_ClassDB_method_class_get_method_list: .. rst-class:: classref-method diff --git a/classes/class_collisionobject3d.rst b/classes/class_collisionobject3d.rst index 06e2beb1c3fe..87d18e2632f5 100644 --- a/classes/class_collisionobject3d.rst +++ b/classes/class_collisionobject3d.rst @@ -55,53 +55,53 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_input_event`\ (\ camera\: :ref:`Camera3D`, event\: :ref:`InputEvent`, position\: :ref:`Vector3`, normal\: :ref:`Vector3`, shape_idx\: :ref:`int`\ ) |virtual| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_mouse_enter`\ (\ ) |virtual| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_mouse_exit`\ (\ ) |virtual| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`create_shape_owner`\ (\ owner\: :ref:`Object`\ ) | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_collision_layer_value`\ (\ layer_number\: :ref:`int`\ ) |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_collision_mask_value`\ (\ layer_number\: :ref:`int`\ ) |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_rid`\ (\ ) |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`get_shape_owners`\ (\ ) | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_shape_owner_disabled`\ (\ owner_id\: :ref:`int`\ ) |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`remove_shape_owner`\ (\ owner_id\: :ref:`int`\ ) | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_collision_layer_value`\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_collision_mask_value`\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`shape_find_owner`\ (\ shape_index\: :ref:`int`\ ) |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`shape_owner_add_shape`\ (\ owner_id\: :ref:`int`, shape\: :ref:`Shape3D`\ ) | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`shape_owner_clear_shapes`\ (\ owner_id\: :ref:`int`\ ) | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object` | :ref:`shape_owner_get_owner`\ (\ owner_id\: :ref:`int`\ ) |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Shape3D` | :ref:`shape_owner_get_shape`\ (\ owner_id\: :ref:`int`, shape_id\: :ref:`int`\ ) |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`shape_owner_get_shape_count`\ (\ owner_id\: :ref:`int`\ ) |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`shape_owner_get_shape_index`\ (\ owner_id\: :ref:`int`, shape_id\: :ref:`int`\ ) |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`shape_owner_get_transform`\ (\ owner_id\: :ref:`int`\ ) |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`shape_owner_remove_shape`\ (\ owner_id\: :ref:`int`, shape_id\: :ref:`int`\ ) | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`shape_owner_set_disabled`\ (\ owner_id\: :ref:`int`, disabled\: :ref:`bool`\ ) | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`shape_owner_set_transform`\ (\ owner_id\: :ref:`int`, transform\: :ref:`Transform3D`\ ) | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_input_event`\ (\ camera\: :ref:`Camera3D`, event\: :ref:`InputEvent`, event_position\: :ref:`Vector3`, normal\: :ref:`Vector3`, shape_idx\: :ref:`int`\ ) |virtual| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_mouse_enter`\ (\ ) |virtual| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_mouse_exit`\ (\ ) |virtual| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`create_shape_owner`\ (\ owner\: :ref:`Object`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_collision_layer_value`\ (\ layer_number\: :ref:`int`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_collision_mask_value`\ (\ layer_number\: :ref:`int`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid`\ (\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_shape_owners`\ (\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_shape_owner_disabled`\ (\ owner_id\: :ref:`int`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_shape_owner`\ (\ owner_id\: :ref:`int`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_layer_value`\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_mask_value`\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shape_find_owner`\ (\ shape_index\: :ref:`int`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shape_owner_add_shape`\ (\ owner_id\: :ref:`int`, shape\: :ref:`Shape3D`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shape_owner_clear_shapes`\ (\ owner_id\: :ref:`int`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`shape_owner_get_owner`\ (\ owner_id\: :ref:`int`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Shape3D` | :ref:`shape_owner_get_shape`\ (\ owner_id\: :ref:`int`, shape_id\: :ref:`int`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shape_owner_get_shape_count`\ (\ owner_id\: :ref:`int`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shape_owner_get_shape_index`\ (\ owner_id\: :ref:`int`, shape_id\: :ref:`int`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`shape_owner_get_transform`\ (\ owner_id\: :ref:`int`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shape_owner_remove_shape`\ (\ owner_id\: :ref:`int`, shape_id\: :ref:`int`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shape_owner_set_disabled`\ (\ owner_id\: :ref:`int`, disabled\: :ref:`bool`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shape_owner_set_transform`\ (\ owner_id\: :ref:`int`, transform\: :ref:`Transform3D`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -116,9 +116,9 @@ Signals .. rst-class:: classref-signal -**input_event**\ (\ camera\: :ref:`Node`, event\: :ref:`InputEvent`, position\: :ref:`Vector3`, normal\: :ref:`Vector3`, shape_idx\: :ref:`int`\ ) +**input_event**\ (\ camera\: :ref:`Node`, event\: :ref:`InputEvent`, event_position\: :ref:`Vector3`, normal\: :ref:`Vector3`, shape_idx\: :ref:`int`\ ) -Emitted when the object receives an unhandled :ref:`InputEvent`. ``position`` is the location in world space of the mouse pointer on the surface of the shape with index ``shape_idx`` and ``normal`` is the normal vector of the surface at that point. +Emitted when the object receives an unhandled :ref:`InputEvent`. ``event_position`` is the location in world space of the mouse pointer on the surface of the shape with index ``shape_idx`` and ``normal`` is the normal vector of the surface at that point. .. rst-class:: classref-item-separator @@ -315,9 +315,9 @@ Method Descriptions .. rst-class:: classref-method -|void| **_input_event**\ (\ camera\: :ref:`Camera3D`, event\: :ref:`InputEvent`, position\: :ref:`Vector3`, normal\: :ref:`Vector3`, shape_idx\: :ref:`int`\ ) |virtual| +|void| **_input_event**\ (\ camera\: :ref:`Camera3D`, event\: :ref:`InputEvent`, event_position\: :ref:`Vector3`, normal\: :ref:`Vector3`, shape_idx\: :ref:`int`\ ) |virtual| -Receives unhandled :ref:`InputEvent`\ s. ``position`` is the location in world space of the mouse pointer on the surface of the shape with index ``shape_idx`` and ``normal`` is the normal vector of the surface at that point. Connect to the :ref:`input_event` signal to easily pick up these events. +Receives unhandled :ref:`InputEvent`\ s. ``event_position`` is the location in world space of the mouse pointer on the surface of the shape with index ``shape_idx`` and ``normal`` is the normal vector of the surface at that point. Connect to the :ref:`input_event` signal to easily pick up these events. \ **Note:** :ref:`_input_event` requires :ref:`input_ray_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. diff --git a/classes/class_collisionpolygon2d.rst b/classes/class_collisionpolygon2d.rst index 2d9fd9da3663..0275f887f16b 100644 --- a/classes/class_collisionpolygon2d.rst +++ b/classes/class_collisionpolygon2d.rst @@ -19,7 +19,7 @@ A node that provides a polygon shape to a :ref:`CollisionObject2D` parent and allows to edit it. The polygon can be concave or convex. This can give a detection shape to an :ref:`Area2D` or turn :ref:`PhysicsBody2D` into a solid object. +A node that provides a polygon shape to a :ref:`CollisionObject2D` parent and allows to edit it. The polygon can be concave or convex. This can give a detection shape to an :ref:`Area2D`, turn :ref:`PhysicsBody2D` into a solid object, or give a hollow shape to a :ref:`StaticBody2D`. \ **Warning:** A non-uniformly scaled :ref:`CollisionShape2D` will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its shape resource instead. @@ -168,7 +168,7 @@ The polygon's list of vertices. Each point will be connected to the next, and th \ **Note:** The returned vertices are in the local coordinate space of the given **CollisionPolygon2D**. -\ **Warning:** The returned value is a clone of the :ref:`PackedVector2Array`, not a reference. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_collisionpolygon3d.rst b/classes/class_collisionpolygon3d.rst index eaba73a5891b..b5f6d8f3ce86 100644 --- a/classes/class_collisionpolygon3d.rst +++ b/classes/class_collisionpolygon3d.rst @@ -114,7 +114,7 @@ The collision margin for the generated :ref:`Shape3D`. See :ref:` Array of vertices which define the 2D polygon in the local XY plane. -\ **Note:** The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the class property. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_collisionshape2d.rst b/classes/class_collisionshape2d.rst index 47db055107ca..7ccf4a7cf052 100644 --- a/classes/class_collisionshape2d.rst +++ b/classes/class_collisionshape2d.rst @@ -28,11 +28,11 @@ Tutorials - :doc:`Physics introduction <../tutorials/physics/physics_introduction>` -- `2D Dodge The Creeps Demo `__ +- `2D Dodge The Creeps Demo `__ -- `2D Pong Demo `__ +- `2D Pong Demo `__ -- `2D Kinematic Character Demo `__ +- `2D Kinematic Character Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_collisionshape3d.rst b/classes/class_collisionshape3d.rst index 8c199da95ac2..16648dc0933a 100644 --- a/classes/class_collisionshape3d.rst +++ b/classes/class_collisionshape3d.rst @@ -30,11 +30,11 @@ Tutorials - :doc:`Physics introduction <../tutorials/physics/physics_introduction>` -- `3D Kinematic Character Demo `__ +- `3D Kinematic Character Demo `__ -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_color.rst b/classes/class_color.rst index ab3fd2977e8a..91c401a1bcfe 100644 --- a/classes/class_color.rst +++ b/classes/class_color.rst @@ -34,11 +34,11 @@ Colors can be created in various ways: By the various **Color** constructors, by Tutorials --------- -- `2D GD Paint Demo `__ +- `2D GD Paint Demo `__ -- `Tween Demo `__ +- `Tween Interpolation Demo `__ -- `GUI Drag And Drop Demo `__ +- `GUI Drag And Drop Demo `__ .. rst-class:: classref-reftable-group @@ -1757,7 +1757,7 @@ Constructs a color from an `OK HSL profile ` **from_rgbe9995**\ (\ rgbe\: :ref:`int`\ ) |static| -Decodes a **Color** from a RGBE9995 format integer. See :ref:`Image.FORMAT_RGBE9995`. +Decodes a **Color** from an RGBE9995 format integer. See :ref:`Image.FORMAT_RGBE9995`. .. rst-class:: classref-item-separator diff --git a/classes/class_colorpicker.rst b/classes/class_colorpicker.rst index d7212ec9eaf2..9748af112a00 100644 --- a/classes/class_colorpicker.rst +++ b/classes/class_colorpicker.rst @@ -28,7 +28,7 @@ A widget that provides an interface for selecting or modifying a color. It can o Tutorials --------- -- `Tween Demo `__ +- `Tween Interpolation Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_colorpickerbutton.rst b/classes/class_colorpickerbutton.rst index 4d83b4323e4b..73682f8cf400 100644 --- a/classes/class_colorpickerbutton.rst +++ b/classes/class_colorpickerbutton.rst @@ -30,9 +30,9 @@ See also :ref:`BaseButton` which contains common properties an Tutorials --------- -- `GUI Drag And Drop Demo `__ +- `2D GD Paint Demo `__ -- `2D GD Paint Demo `__ +- `GUI Drag And Drop Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_colorrect.rst b/classes/class_colorrect.rst index b88adb12d76f..458a146a2018 100644 --- a/classes/class_colorrect.rst +++ b/classes/class_colorrect.rst @@ -26,7 +26,7 @@ Displays a rectangle filled with a solid :ref:`color`__ +- `2D Dodge The Creeps Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_concavepolygonshape2d.rst b/classes/class_concavepolygonshape2d.rst index e97183b52a13..25ff0a483bf1 100644 --- a/classes/class_concavepolygonshape2d.rst +++ b/classes/class_concavepolygonshape2d.rst @@ -63,6 +63,8 @@ Property Descriptions The array of points that make up the **ConcavePolygonShape2D**'s line segments. The array (of length divisible by two) is naturally divided into pairs (one pair for each segment); each pair consists of the starting point of a segment and the endpoint of a segment. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_concavepolygonshape3d.rst b/classes/class_concavepolygonshape3d.rst index 898385d056dd..1a148478e068 100644 --- a/classes/class_concavepolygonshape3d.rst +++ b/classes/class_concavepolygonshape3d.rst @@ -34,7 +34,7 @@ Being just a collection of interconnected triangles, **ConcavePolygonShape3D** i Tutorials --------- -- `3D Physics Tests Demo `__ +- `3D Physics Tests Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_configfile.rst b/classes/class_configfile.rst index 212f0415dbed..785e4c416541 100644 --- a/classes/class_configfile.rst +++ b/classes/class_configfile.rst @@ -21,7 +21,7 @@ Description This helper class can be used to store :ref:`Variant` values on the filesystem using INI-style formatting. The stored values are identified by a section and a key: -:: +.. code:: text [section] some_key=42 diff --git a/classes/class_control.rst b/classes/class_control.rst index 66c0ffb4d508..c92fb6169f65 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -64,85 +64,87 @@ Properties .. table:: :widths: auto - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`anchor_bottom` | ``0.0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`anchor_left` | ``0.0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`anchor_right` | ``0.0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`anchor_top` | ``0.0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`bool` | :ref:`auto_translate` | ``true`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`bool` | :ref:`clip_contents` | ``false`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2` | :ref:`custom_minimum_size` | ``Vector2(0, 0)`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`FocusMode` | :ref:`focus_mode` | ``0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`NodePath` | :ref:`focus_neighbor_bottom` | ``NodePath("")`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`NodePath` | :ref:`focus_neighbor_left` | ``NodePath("")`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`NodePath` | :ref:`focus_neighbor_right` | ``NodePath("")`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`NodePath` | :ref:`focus_neighbor_top` | ``NodePath("")`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`NodePath` | :ref:`focus_next` | ``NodePath("")`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`NodePath` | :ref:`focus_previous` | ``NodePath("")`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2` | :ref:`global_position` | | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`GrowDirection` | :ref:`grow_horizontal` | ``1`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`GrowDirection` | :ref:`grow_vertical` | ``1`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`LayoutDirection` | :ref:`layout_direction` | ``0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`bool` | :ref:`localize_numeral_system` | ``true`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`CursorShape` | :ref:`mouse_default_cursor_shape` | ``0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`MouseFilter` | :ref:`mouse_filter` | ``0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`bool` | :ref:`mouse_force_pass_scroll_events` | ``true`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`offset_bottom` | ``0.0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`offset_left` | ``0.0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`offset_right` | ``0.0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`offset_top` | ``0.0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2` | :ref:`pivot_offset` | ``Vector2(0, 0)`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`rotation` | ``0.0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`rotation_degrees` | | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2` | :ref:`scale` | ``Vector2(1, 1)`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`Node` | :ref:`shortcut_context` | | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2` | :ref:`size` | ``Vector2(0, 0)`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | |bitfield|\[:ref:`SizeFlags`\] | :ref:`size_flags_horizontal` | ``1`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`size_flags_stretch_ratio` | ``1.0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | |bitfield|\[:ref:`SizeFlags`\] | :ref:`size_flags_vertical` | ``1`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`Theme` | :ref:`theme` | | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`StringName` | :ref:`theme_type_variation` | ``&""`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`String` | :ref:`tooltip_text` | ``""`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`anchor_bottom` | ``0.0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`anchor_left` | ``0.0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`anchor_right` | ``0.0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`anchor_top` | ``0.0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`auto_translate` | ``true`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`clip_contents` | ``false`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`custom_minimum_size` | ``Vector2(0, 0)`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`FocusMode` | :ref:`focus_mode` | ``0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`focus_neighbor_bottom` | ``NodePath("")`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`focus_neighbor_left` | ``NodePath("")`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`focus_neighbor_right` | ``NodePath("")`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`focus_neighbor_top` | ``NodePath("")`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`focus_next` | ``NodePath("")`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`focus_previous` | ``NodePath("")`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`global_position` | | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`GrowDirection` | :ref:`grow_horizontal` | ``1`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`GrowDirection` | :ref:`grow_vertical` | ``1`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`LayoutDirection` | :ref:`layout_direction` | ``0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`localize_numeral_system` | ``true`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`CursorShape` | :ref:`mouse_default_cursor_shape` | ``0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`MouseFilter` | :ref:`mouse_filter` | ``0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`mouse_force_pass_scroll_events` | ``true`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`offset_bottom` | ``0.0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`offset_left` | ``0.0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`offset_right` | ``0.0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`offset_top` | ``0.0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`PhysicsInterpolationMode` | physics_interpolation_mode | ``2`` (overrides :ref:`Node`) | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`pivot_offset` | ``Vector2(0, 0)`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rotation` | ``0.0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rotation_degrees` | | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`scale` | ``Vector2(1, 1)`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`shortcut_context` | | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`size` | ``Vector2(0, 0)`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`SizeFlags`\] | :ref:`size_flags_horizontal` | ``1`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`size_flags_stretch_ratio` | ``1.0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`SizeFlags`\] | :ref:`size_flags_vertical` | ``1`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Theme` | :ref:`theme` | | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`theme_type_variation` | ``&""`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`tooltip_text` | ``""`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -1159,6 +1161,16 @@ Sent when the node needs to refresh its theme items. This happens in one of the \ **Note:** As an optimization, this notification won't be sent from changes that occur while this node is outside of the scene tree. Instead, all of the theme item updates can be applied at once when the node enters the scene tree. +\ **Note:** This notification is received alongside :ref:`Node.NOTIFICATION_ENTER_TREE`, so if you are instantiating a scene, the child nodes will not be initialized yet. You can use it to setup theming for this node, child nodes created from script, or if you want to access child nodes added in the editor, make sure the node is ready using :ref:`Node.is_node_ready`. + +:: + + func _notification(what): + if what == NOTIFICATION_THEME_CHANGED: + if not is_node_ready(): + await ready # Wait until ready signal. + $Label.add_theme_color_override("font_color", Color.YELLOW) + .. _class_Control_constant_NOTIFICATION_SCROLL_BEGIN: .. rst-class:: classref-constant @@ -1307,7 +1319,7 @@ Enables whether rendering of :ref:`CanvasItem` based children - |void| **set_custom_minimum_size**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_custom_minimum_size**\ (\ ) -The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes. +The minimum size of the node's bounding rectangle. If you set it to a value greater than ``(0, 0)``, the node's bounding rectangle will always have at least this size. Note that **Control** nodes have their internal minimum size returned by :ref:`get_minimum_size`. It depends on the control's contents, like text, textures, or style boxes. The actual minimum size is the maximum value of this property and the internal minimum size (see :ref:`get_combined_minimum_size`). .. rst-class:: classref-item-separator diff --git a/classes/class_convexpolygonshape2d.rst b/classes/class_convexpolygonshape2d.rst index 9905ca6d3c42..54142e2699b6 100644 --- a/classes/class_convexpolygonshape2d.rst +++ b/classes/class_convexpolygonshape2d.rst @@ -75,6 +75,8 @@ The polygon's list of vertices that form a convex hull. Can be in either clockwi \ **Warning:** Only set this property to a list of points that actually form a convex hull. Use :ref:`set_point_cloud` to generate the convex hull of an arbitrary set of points. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_convexpolygonshape3d.rst b/classes/class_convexpolygonshape3d.rst index a87628f3b056..5bc1b5db046f 100644 --- a/classes/class_convexpolygonshape3d.rst +++ b/classes/class_convexpolygonshape3d.rst @@ -32,7 +32,7 @@ A 3D convex polyhedron shape, intended for use in physics. Usually used to provi Tutorials --------- -- `3D Physics Tests Demo `__ +- `3D Physics Tests Demo `__ .. rst-class:: classref-reftable-group @@ -68,6 +68,8 @@ Property Descriptions The list of 3D points forming the convex polygon shape. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector3Array` for more details. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_cpuparticles2d.rst b/classes/class_cpuparticles2d.rst index 2a57ce32b0a5..77337f111e1b 100644 --- a/classes/class_cpuparticles2d.rst +++ b/classes/class_cpuparticles2d.rst @@ -851,6 +851,8 @@ Particle draw order. Uses :ref:`DrawOrder` values Sets the :ref:`Color`\ s to modulate particles by when using :ref:`EMISSION_SHAPE_POINTS` or :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedColorArray` for more details. + .. rst-class:: classref-item-separator ---- @@ -868,6 +870,8 @@ Sets the :ref:`Color`\ s to modulate particles by when using :ref:` Sets the direction the particles will be emitted in when using :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -885,6 +889,8 @@ Sets the direction the particles will be emitted in when using :ref:`EMISSION_SH Sets the initial positions to spawn particles when using :ref:`EMISSION_SHAPE_POINTS` or :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_cpuparticles3d.rst b/classes/class_cpuparticles3d.rst index 7b16f0f17352..a5c71b3f5ccc 100644 --- a/classes/class_cpuparticles3d.rst +++ b/classes/class_cpuparticles3d.rst @@ -908,6 +908,8 @@ Sets the :ref:`Color`\ s to modulate particles by when using :ref:` \ **Note:** :ref:`emission_colors` multiplies the particle mesh's vertex colors. To have a visible effect on a :ref:`BaseMaterial3D`, :ref:`BaseMaterial3D.vertex_color_use_as_albedo` *must* be ``true``. For a :ref:`ShaderMaterial`, ``ALBEDO *= COLOR.rgb;`` must be inserted in the shader's ``fragment()`` function. Otherwise, :ref:`emission_colors` will have no visible effect. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedColorArray` for more details. + .. rst-class:: classref-item-separator ---- @@ -925,6 +927,8 @@ Sets the :ref:`Color`\ s to modulate particles by when using :ref:` Sets the direction the particles will be emitted in when using :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector3Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -942,6 +946,8 @@ Sets the direction the particles will be emitted in when using :ref:`EMISSION_SH Sets the initial positions to spawn particles when using :ref:`EMISSION_SHAPE_POINTS` or :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector3Array` for more details. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_crypto.rst b/classes/class_crypto.rst index 8c109cc45696..d176c3f01bdb 100644 --- a/classes/class_crypto.rst +++ b/classes/class_crypto.rst @@ -203,7 +203,7 @@ Generates an RSA :ref:`CryptoKey` that can be used for creating Generates a self-signed :ref:`X509Certificate` from the given :ref:`CryptoKey` and ``issuer_name``. The certificate validity will be defined by ``not_before`` and ``not_after`` (first valid date and last valid date). The ``issuer_name`` must contain at least "CN=" (common name, i.e. the domain name), "O=" (organization, i.e. your company name), "C=" (country, i.e. 2 lettered ISO-3166 code of the country the organization is based in). -A small example to generate an RSA key and a X509 self-signed certificate. +A small example to generate an RSA key and an X509 self-signed certificate. .. tabs:: diff --git a/classes/class_csgpolygon3d.rst b/classes/class_csgpolygon3d.rst index 0ac1340d28c9..d7fb20c7e969 100644 --- a/classes/class_csgpolygon3d.rst +++ b/classes/class_csgpolygon3d.rst @@ -403,6 +403,8 @@ The point array that defines the 2D polygon that is extruded. This can be a conv \ **Note:** If only 1 or 2 points are defined in :ref:`polygon`, no mesh will be generated. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_cylindershape3d.rst b/classes/class_cylindershape3d.rst index fa8cd2d328d5..beefbec09c13 100644 --- a/classes/class_cylindershape3d.rst +++ b/classes/class_cylindershape3d.rst @@ -30,11 +30,11 @@ A 3D cylinder shape, intended for use in physics. Usually used to provide a shap Tutorials --------- -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ -- `3D Physics Tests Demo `__ +- `3D Physics Tests Demo `__ -- `3D Voxel Demo `__ +- `3D Voxel Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index b6b0fac412a1..14d037664e06 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -200,9 +200,9 @@ Tutorials - `GDScript basics: Dictionary <../tutorials/scripting/gdscript/gdscript_basics.html#dictionary>`__ -- `3D Voxel Demo `__ +- `3D Voxel Demo `__ -- `OS Test Demo `__ +- `Operating System Testing Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_displayserver.rst b/classes/class_displayserver.rst index b42f8bc00c2d..f99ce58eb06b 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -484,7 +484,7 @@ Display server supports setting the mouse cursor shape to a custom image. **Wind :ref:`Feature` **FEATURE_NATIVE_DIALOG** = ``9`` -Display server supports spawning dialogs using the operating system's native look-and-feel. **Windows, macOS, Linux (X11/Wayland)** +Display server supports spawning text dialogs using the operating system's native look-and-feel. See :ref:`dialog_show`. **Windows, macOS** .. _class_DisplayServer_constant_FEATURE_IME: @@ -590,6 +590,22 @@ Display server supports application status indicators. Display server supports native help system search callbacks. See :ref:`help_set_search_callbacks`. +.. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_INPUT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_NATIVE_DIALOG_INPUT** = ``24`` + +Display server supports spawning text input dialogs using the operating system's native look-and-feel. See :ref:`dialog_input_text`. **Windows, macOS** + +.. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_FILE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_NATIVE_DIALOG_FILE** = ``25`` + +Display server supports spawning dialogs for selecting files or directories using the operating system's native look-and-feel. See :ref:`file_dialog_show` and :ref:`file_dialog_with_options_show`. **Windows, macOS, Linux (X11/Wayland)** + .. rst-class:: classref-item-separator ---- @@ -1624,7 +1640,7 @@ Removes the application status indicator. Shows a text input dialog which uses the operating system's native look-and-feel. ``callback`` should accept a single :ref:`String` parameter which contains the text field's contents. -\ **Note:** This method is implemented only on macOS and Windows. +\ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG_INPUT` feature. Supported platforms include macOS and Windows. .. rst-class:: classref-item-separator @@ -1638,7 +1654,7 @@ Shows a text input dialog which uses the operating system's native look-and-feel Shows a text dialog which uses the operating system's native look-and-feel. ``callback`` should accept a single :ref:`int` parameter which corresponds to the index of the pressed button. -\ **Note:** This method is implemented only on macOS and Windows. +\ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG` feature. Supported platforms include macOS and Windows. .. rst-class:: classref-item-separator @@ -1670,7 +1686,7 @@ Each filter string in the ``filters`` array should be formatted like this: ``*.t Callbacks have the following arguments: ``status: bool, selected_paths: PackedStringArray, selected_filter_index: int``. -\ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG` feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS. +\ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG_FILE` feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS. \ **Note:** ``current_directory`` might be ignored. @@ -1704,7 +1720,7 @@ Each filter string in the ``filters`` array should be formatted like this: ``*.t Callbacks have the following arguments: ``status: bool, selected_paths: PackedStringArray, selected_filter_index: int, selected_option: Dictionary``. -\ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG` feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS. +\ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG_FILE` feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS. \ **Note:** ``current_directory`` might be ignored. @@ -1870,7 +1886,7 @@ Returns ``true`` if positions of **OK** and **Cancel** buttons are swapped in di Returns the ID of the window at the specified screen ``position`` (in pixels). On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this: -:: +.. code:: text * (0, 0) +-------+ | | @@ -1917,7 +1933,7 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that \ **Supported system menu IDs:**\ -:: +.. code:: text "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). @@ -1949,7 +1965,7 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that \ **Supported system menu IDs:**\ -:: +.. code:: text "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). @@ -1981,7 +1997,7 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that \ **Supported system menu IDs:**\ -:: +.. code:: text "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). @@ -2015,7 +2031,7 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that \ **Supported system menu IDs:**\ -:: +.. code:: text "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). @@ -2047,7 +2063,7 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that \ **Supported system menu IDs:**\ -:: +.. code:: text "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). @@ -2083,7 +2099,7 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that \ **Supported system menu IDs:**\ -:: +.. code:: text "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). @@ -2117,7 +2133,7 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that \ **Supported system menu IDs:**\ -:: +.. code:: text "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). @@ -2145,7 +2161,7 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde \ **Supported system menu IDs:**\ -:: +.. code:: text "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). @@ -2173,7 +2189,7 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde \ **Supported system menu IDs:**\ -:: +.. code:: text "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). @@ -2199,7 +2215,7 @@ Removes all items from the global menu with ID ``menu_root``. \ **Supported system menu IDs:**\ -:: +.. code:: text "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). @@ -2299,7 +2315,7 @@ Returns the horizontal offset of the item at the given ``idx``. **Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. -Returns the index of the item with the specified ``tag``. Index is automatically assigned to each item by the engine. Index can not be set manually. +Returns the index of the item with the specified ``tag``. Indices are automatically assigned to each item by the engine, and cannot be set manually. \ **Note:** This method is implemented only on macOS. @@ -2315,7 +2331,7 @@ Returns the index of the item with the specified ``tag``. Index is automatically **Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. -Returns the index of the item with the specified ``text``. Index is automatically assigned to each item by the engine. Index can not be set manually. +Returns the index of the item with the specified ``text``. Indices are automatically assigned to each item by the engine, and cannot be set manually. \ **Note:** This method is implemented only on macOS. @@ -3119,7 +3135,7 @@ Returns the dots per inch density of the specified screen. If ``screen`` is :ref \ **Note:** On Android devices, the actual screen densities are grouped into six generalized densities: -:: +.. code:: text ldpi - 120 dpi mdpi - 160 dpi @@ -3204,7 +3220,7 @@ Returns color of the display pixel at the ``position``. Returns the screen's top-left corner position in pixels. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this: -:: +.. code:: text * (0, 0) +-------+ | | @@ -4206,7 +4222,7 @@ Sets the bounding box of control, or menu item that was used to open the popup w Sets the position of the given window to ``position``. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this: -:: +.. code:: text * (0, 0) +-------+ | | diff --git a/classes/class_dtlsserver.rst b/classes/class_dtlsserver.rst index 59e7ad7411b5..74a94d766b05 100644 --- a/classes/class_dtlsserver.rst +++ b/classes/class_dtlsserver.rst @@ -66,7 +66,7 @@ Below a small example of how to use it: { private DtlsServer _dtls = new DtlsServer(); private UdpServer _server = new UdpServer(); - private Godot.Collections.Array _peers = new Godot.Collections.Array(); + private Godot.Collections.Array _peers = new Godot.Collections.Array(); public override void _Ready() { @@ -80,8 +80,8 @@ Below a small example of how to use it: { while (Server.IsConnectionAvailable()) { - PacketPeerUDP peer = _server.TakeConnection(); - PacketPeerDTLS dtlsPeer = _dtls.TakeConnection(peer); + PacketPeerUdp peer = _server.TakeConnection(); + PacketPeerDtls dtlsPeer = _dtls.TakeConnection(peer); if (dtlsPeer.GetStatus() != PacketPeerDtls.Status.Handshaking) { continue; // It is normal that 50% of the connections fails due to cookie exchange. diff --git a/classes/class_editorexportplatformandroid.rst b/classes/class_editorexportplatformandroid.rst index e69ffbf74637..2afe2440cc62 100644 --- a/classes/class_editorexportplatformandroid.rst +++ b/classes/class_editorexportplatformandroid.rst @@ -270,6 +270,8 @@ Properties +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`permissions/persistent_activity` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/post_notifications` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`permissions/process_outgoing_calls` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`permissions/read_calendar` | @@ -446,9 +448,9 @@ Array of random bytes that the licensing Policy uses to create an `Obfuscator ` **apk_expansion/enable** -If ``true``, project resources are stored in the separate APK expansion file, instead APK. +If ``true``, project resources are stored in the separate APK expansion file, instead of the APK. -\ **Note:** APK expansion should be enabled to use PCK encryption. +\ **Note:** APK expansion should be enabled to use PCK encryption. See `APK Expansion Files `__ .. rst-class:: classref-item-separator @@ -460,7 +462,7 @@ If ``true``, project resources are stored in the separate APK expansion file, in :ref:`String` **apk_expansion/public_key** -Base64 encoded RSA public key for your publisher account, available from the profile page on the "Play Console". +Base64 encoded RSA public key for your publisher account, available from the profile page on the "Google Play Console". .. rst-class:: classref-item-separator @@ -520,7 +522,7 @@ If ``true``, ``x86_64`` binaries are included into exported project. :ref:`String` **command_line/extra_args** -A list of additional command line arguments, exported project will receive when started. +A list of additional command line arguments, separated by space, which the exported project will receive when started. .. rst-class:: classref-item-separator @@ -586,7 +588,7 @@ If ``true``, native libraries are compressed when performing a Gradle build. :ref:`int` **gradle_build/export_format** -Export format for Gradle build. +Application export format (\*.apk or \*.aab). .. rst-class:: classref-item-separator @@ -610,7 +612,7 @@ Path to the Gradle build directory. If left empty, then ``res://android`` will b :ref:`String` **gradle_build/min_sdk** -Minimal Android SDK version for Gradle build. +Minimum Android API level required for the application to run (used during Gradle build). See `android:minSdkVersion `__. .. rst-class:: classref-item-separator @@ -622,7 +624,7 @@ Minimal Android SDK version for Gradle build. :ref:`String` **gradle_build/target_sdk** -Target Android SDK version for Gradle build. +The Android API level on which the application is designed to run (used during Gradle build). See `android:targetSdkVersion `__. .. rst-class:: classref-item-separator @@ -748,7 +750,7 @@ Can be overridden with the environment variable ``GODOT_ANDROID_KEYSTORE_RELEASE :ref:`String` **launcher_icons/adaptive_background_432x432** -Background layer of the application adaptive icon file. +Background layer of the application adaptive icon file. See `Design adaptive icons `__. .. rst-class:: classref-item-separator @@ -760,7 +762,7 @@ Background layer of the application adaptive icon file. :ref:`String` **launcher_icons/adaptive_foreground_432x432** -Foreground layer of the application adaptive icon file. +Foreground layer of the application adaptive icon file. See `Design adaptive icons `__. .. rst-class:: classref-item-separator @@ -784,7 +786,7 @@ Application icon file. If left empty, it will fallback to :ref:`ProjectSettings. :ref:`int` **package/app_category** -Application category for the Play Store. +Application category for the Google Play Store. Only define this if your application fits one of the categories well. See `android:appCategory `__. .. rst-class:: classref-item-separator @@ -796,7 +798,7 @@ Application category for the Play Store. :ref:`bool` **package/exclude_from_recents** -If ``true``, task initiated by main activity will be excluded from the list of recently used applications. +If ``true``, task initiated by main activity will be excluded from the list of recently used applications. See `android:excludeFromRecents `__. .. rst-class:: classref-item-separator @@ -820,7 +822,7 @@ Name of the application. :ref:`bool` **package/retain_data_on_uninstall** -If ``true``, when the user uninstalls an app, a prompt to keep the app's data will be shown. +If ``true``, when the user uninstalls an app, a prompt to keep the app's data will be shown. See `android:hasFragileUserData `__. .. rst-class:: classref-item-separator @@ -1442,6 +1444,8 @@ Allows enabling/disabling location update notifications from the radio. See `CON Array of custom permission strings. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + .. rst-class:: classref-item-separator ---- @@ -1874,7 +1878,19 @@ Allows applications to perform I/O operations over NFC. See `NFC ` **permissions/post_notifications** + +Allows an application to post notifications. Added in API level 33. See `Notification runtime permission `__. .. rst-class:: classref-item-separator @@ -2766,9 +2782,7 @@ Application version visible to the user. Falls back to :ref:`ProjectSettings.app :ref:`int` **xr_features/xr_mode** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The extended reality (XR) mode for this application. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_editorexportplatformios.rst b/classes/class_editorexportplatformios.rst index e58707a4e1ae..6d86e3787368 100644 --- a/classes/class_editorexportplatformios.rst +++ b/classes/class_editorexportplatformios.rst @@ -146,7 +146,7 @@ Property Descriptions Additional data added to the root ```` section of the `Info.plist `__ file. The value should be an XML section with pairs of key-value elements, e.g.: -:: +.. code:: text key_name value diff --git a/classes/class_editorexportplatformmacos.rst b/classes/class_editorexportplatformmacos.rst index f8365fded3ae..51d3dd8efd70 100644 --- a/classes/class_editorexportplatformmacos.rst +++ b/classes/class_editorexportplatformmacos.rst @@ -232,7 +232,7 @@ Property Descriptions Additional data added to the root ```` section of the `Info.plist `__ file. The value should be an XML section with pairs of key-value elements, e.g.: -:: +.. code:: text key_name value @@ -449,6 +449,8 @@ Tool to use for code signing. Array of the additional command line arguments passed to the code signing tool. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_editorexportplatformpc.rst b/classes/class_editorexportplatformpc.rst index f147dfe99c99..195276a8d195 100644 --- a/classes/class_editorexportplatformpc.rst +++ b/classes/class_editorexportplatformpc.rst @@ -16,6 +16,22 @@ EditorExportPlatformPC Base class for the desktop platform exporter (Windows and Linux/BSD). +.. rst-class:: classref-introduction-group + +Description +----------- + +The base class for the desktop platform exporters. These include Windows and Linux/BSD, but not macOS. See the classes inheriting this one for more details. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Exporting for Windows <../tutorials/export/exporting_for_windows>` + +- :doc:`Exporting for Linux <../tutorials/export/exporting_for_linux>` + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_editorexportplatformweb.rst b/classes/class_editorexportplatformweb.rst index bad2fd7052c6..4107f7b059c6 100644 --- a/classes/class_editorexportplatformweb.rst +++ b/classes/class_editorexportplatformweb.rst @@ -351,7 +351,7 @@ If ``true`` enables :ref:`GDExtension` support for this web b If ``true``, the exported game will support threads. It requires `a "cross-origin isolated" website `__, which may be difficult to set up and is limited for security reasons (such as not being able to communicate with third-party websites). -If ``false``, the exported game will not support threads. As a result, it is more prone to performance and audio issues, but will only require to be run on a HTTPS website. +If ``false``, the exported game will not support threads. As a result, it is more prone to performance and audio issues, but will only require to be run on an HTTPS website. .. rst-class:: classref-item-separator diff --git a/classes/class_editorexportplatformwindows.rst b/classes/class_editorexportplatformwindows.rst index 007bb49085fd..a9b220402cdd 100644 --- a/classes/class_editorexportplatformwindows.rst +++ b/classes/class_editorexportplatformwindows.rst @@ -16,6 +16,13 @@ Exporter for Windows. .. rst-class:: classref-introduction-group +Description +----------- + +The Windows exporter customizes how a Windows build is handled. In the editor's "Export" window, it is created when adding a new "Windows" preset. + +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -318,6 +325,8 @@ If ``true``, project resources are embedded into the executable. Array of the additional command line arguments passed to the code signing tool. See `Sign Tool `__. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_editorfiledialog.rst b/classes/class_editorfiledialog.rst index 6ffd062b7588..973d393e49f4 100644 --- a/classes/class_editorfiledialog.rst +++ b/classes/class_editorfiledialog.rst @@ -48,6 +48,8 @@ Properties +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`filters` | ``PackedStringArray()`` | +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`option_count` | ``0`` | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`show_hidden_files` | ``false`` | +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | :ref:`String` | title | ``"Save a File"`` (overrides :ref:`Window`) | @@ -61,19 +63,35 @@ Methods .. table:: :widths: auto - +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`add_filter`\ (\ filter\: :ref:`String`, description\: :ref:`String` = ""\ ) | - +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`add_side_menu`\ (\ menu\: :ref:`Control`, title\: :ref:`String` = ""\ ) | - +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`clear_filters`\ (\ ) | - +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`LineEdit` | :ref:`get_line_edit`\ (\ ) | - +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`VBoxContainer` | :ref:`get_vbox`\ (\ ) | - +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`invalidate`\ (\ ) | - +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_filter`\ (\ filter\: :ref:`String`, description\: :ref:`String` = ""\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_option`\ (\ name\: :ref:`String`, values\: :ref:`PackedStringArray`, default_value_index\: :ref:`int`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_side_menu`\ (\ menu\: :ref:`Control`, title\: :ref:`String` = ""\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_filters`\ (\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`LineEdit` | :ref:`get_line_edit`\ (\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_option_default`\ (\ option\: :ref:`int`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_option_name`\ (\ option\: :ref:`int`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_option_values`\ (\ option\: :ref:`int`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_selected_options`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VBoxContainer` | :ref:`get_vbox`\ (\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`invalidate`\ (\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_option_default`\ (\ option\: :ref:`int`, default_value_index\: :ref:`int`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_option_name`\ (\ option\: :ref:`int`, name\: :ref:`String`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_option_values`\ (\ option\: :ref:`int`, values\: :ref:`PackedStringArray`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -372,6 +390,25 @@ The dialog's open or save mode, which affects the selection behavior. See :ref:` The available file type filters. For example, this shows only ``.png`` and ``.gd`` files: ``set_filters(PackedStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))``. Multiple file types can also be specified in a single filter. ``"*.png, *.jpg, *.jpeg ; Supported Images"`` will show both PNG and JPEG files when selected. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorFileDialog_property_option_count: + +.. rst-class:: classref-property + +:ref:`int` **option_count** = ``0`` + +.. rst-class:: classref-property-setget + +- |void| **set_option_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_option_count**\ (\ ) + +The number of additional :ref:`OptionButton`\ s and :ref:`CheckBox`\ es in the dialog. + .. rst-class:: classref-item-separator ---- @@ -414,6 +451,20 @@ For example, a ``filter`` of ``"*.tscn, *.scn"`` and a ``description`` of ``"Sce ---- +.. _class_EditorFileDialog_method_add_option: + +.. rst-class:: classref-method + +|void| **add_option**\ (\ name\: :ref:`String`, values\: :ref:`PackedStringArray`, default_value_index\: :ref:`int`\ ) + +Adds an additional :ref:`OptionButton` to the file dialog. If ``values`` is empty, a :ref:`CheckBox` is added instead. + +\ ``default_value_index`` should be an index of the value in the ``values``. If ``values`` is empty it should be either ``1`` (checked), or ``0`` (unchecked). + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorFileDialog_method_add_side_menu: .. rst-class:: classref-method @@ -452,6 +503,54 @@ Returns the LineEdit for the selected file. ---- +.. _class_EditorFileDialog_method_get_option_default: + +.. rst-class:: classref-method + +:ref:`int` **get_option_default**\ (\ option\: :ref:`int`\ ) |const| + +Returns the default value index of the :ref:`OptionButton` or :ref:`CheckBox` with index ``option``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorFileDialog_method_get_option_name: + +.. rst-class:: classref-method + +:ref:`String` **get_option_name**\ (\ option\: :ref:`int`\ ) |const| + +Returns the name of the :ref:`OptionButton` or :ref:`CheckBox` with index ``option``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorFileDialog_method_get_option_values: + +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_option_values**\ (\ option\: :ref:`int`\ ) |const| + +Returns an array of values of the :ref:`OptionButton` with index ``option``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorFileDialog_method_get_selected_options: + +.. rst-class:: classref-method + +:ref:`Dictionary` **get_selected_options**\ (\ ) |const| + +Returns a :ref:`Dictionary` with the selected values of the additional :ref:`OptionButton`\ s and/or :ref:`CheckBox`\ es. :ref:`Dictionary` keys are names and values are selected value indices. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorFileDialog_method_get_vbox: .. rst-class:: classref-method @@ -474,6 +573,42 @@ Returns the :ref:`VBoxContainer` used to display the file s Notify the **EditorFileDialog** that its view of the data is no longer accurate. Updates the view contents on next view update. +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorFileDialog_method_set_option_default: + +.. rst-class:: classref-method + +|void| **set_option_default**\ (\ option\: :ref:`int`, default_value_index\: :ref:`int`\ ) + +Sets the default value index of the :ref:`OptionButton` or :ref:`CheckBox` with index ``option``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorFileDialog_method_set_option_name: + +.. rst-class:: classref-method + +|void| **set_option_name**\ (\ option\: :ref:`int`, name\: :ref:`String`\ ) + +Sets the name of the :ref:`OptionButton` or :ref:`CheckBox` with index ``option``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorFileDialog_method_set_option_values: + +.. rst-class:: classref-method + +|void| **set_option_values**\ (\ option\: :ref:`int`, values\: :ref:`PackedStringArray`\ ) + +Sets the option values of the :ref:`OptionButton` with index ``option``. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_editorpaths.rst b/classes/class_editorpaths.rst index ce4a559a5906..41d5e1b2854d 100644 --- a/classes/class_editorpaths.rst +++ b/classes/class_editorpaths.rst @@ -73,7 +73,7 @@ Returns the absolute path to the user's cache folder. This folder should be used \ **Default paths per platform:**\ -:: +.. code:: text - Windows: %LOCALAPPDATA%\Godot\ - macOS: ~/Library/Caches/Godot/ @@ -93,7 +93,7 @@ Returns the absolute path to the user's configuration folder. This folder should \ **Default paths per platform:**\ -:: +.. code:: text - Windows: %APPDATA%\Godot\ (same as `get_data_dir()`) - macOS: ~/Library/Application Support/Godot/ (same as `get_data_dir()`) @@ -113,7 +113,7 @@ Returns the absolute path to the user's data folder. This folder should be used \ **Default paths per platform:**\ -:: +.. code:: text - Windows: %APPDATA%\Godot\ (same as `get_config_dir()`) - macOS: ~/Library/Application Support/Godot/ (same as `get_config_dir()`) diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index 7612df8fa22a..7bc0fadc93f5 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -58,619 +58,629 @@ Properties .. table:: :widths: auto - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`debugger/auto_switch_to_remote_scene_tree` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`debugger/profile_native_calls` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`debugger/profiler_frame_history_size` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`debugger/profiler_frame_max_functions` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`debugger/remote_inspect_refresh_interval` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`debugger/remote_scene_tree_refresh_interval` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`docks/filesystem/always_show_folders` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`docks/filesystem/textfile_extensions` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`docks/filesystem/thumbnail_size` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`docks/property_editor/auto_refresh_interval` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`docks/property_editor/subresource_hue_tint` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`docks/scene_tree/auto_expand_to_selected` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`docks/scene_tree/center_node_on_reparent` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`docks/scene_tree/start_create_dialog_fully_expanded` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/2d/bone_color1` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/2d/bone_color2` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/2d/bone_ik_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/2d/bone_outline_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`editors/2d/bone_outline_size` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/2d/bone_selected_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`editors/2d/bone_width` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/2d/grid_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/2d/guides_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/2d/smart_snapping_line_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`editors/2d/use_integer_zoom_by_default` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/2d/viewport_border_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`editors/3d/default_fov` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`editors/3d/default_z_far` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`editors/3d/default_z_near` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`editors/3d/freelook/freelook_activation_modifier` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`editors/3d/freelook/freelook_base_speed` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`editors/3d/freelook/freelook_inertia` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`editors/3d/freelook/freelook_navigation_scheme` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`editors/3d/freelook/freelook_sensitivity` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`editors/3d/freelook/freelook_speed_zoom_link` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`editors/3d/grid_division_level_bias` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`editors/3d/grid_division_level_max` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`editors/3d/grid_division_level_min` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`editors/3d/grid_size` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`editors/3d/grid_xy_plane` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`editors/3d/grid_xz_plane` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`editors/3d/grid_yz_plane` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`editors/3d/navigation/emulate_3_button_mouse` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`editors/3d/navigation/emulate_numpad` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`editors/3d/navigation/invert_x_axis` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`editors/3d/navigation/invert_y_axis` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`editors/3d/navigation/navigation_scheme` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`editors/3d/navigation/orbit_modifier` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`editors/3d/navigation/pan_modifier` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`editors/3d/navigation/warped_mouse_panning` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`editors/3d/navigation/zoom_modifier` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`editors/3d/navigation/zoom_style` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`editors/3d/navigation_feel/orbit_inertia` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`editors/3d/navigation_feel/orbit_sensitivity` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`editors/3d/navigation_feel/translation_inertia` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`editors/3d/navigation_feel/zoom_inertia` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/3d/primary_grid_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`editors/3d/primary_grid_steps` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/3d/secondary_grid_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/3d/selection_box_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/instantiated` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/joint` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/shape` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`editors/animation/autorename_animation_tracks` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`editors/animation/default_create_bezier_tracks` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`editors/animation/default_create_reset_tracks` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/animation/onion_layers_future_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/animation/onion_layers_past_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`editors/grid_map/pick_distance` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`editors/panning/2d_editor_pan_speed` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`editors/panning/2d_editor_panning_scheme` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`editors/panning/animation_editors_panning_scheme` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`editors/panning/simple_panning` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`editors/panning/sub_editors_panning_scheme` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`editors/panning/warped_mouse_panning` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`editors/polygon_editor/auto_bake_delay` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`editors/polygon_editor/point_grab_radius` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`editors/polygon_editor/show_previous_outline` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`editors/shader_editor/behavior/files/restore_shaders_on_load` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`editors/tiles_editor/display_grid` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/tiles_editor/grid_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/visual_editors/category_colors/color_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/visual_editors/category_colors/conditional_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/visual_editors/category_colors/input_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/visual_editors/category_colors/output_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/visual_editors/category_colors/particle_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/visual_editors/category_colors/scalar_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/visual_editors/category_colors/special_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/visual_editors/category_colors/textures_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/visual_editors/category_colors/transform_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/visual_editors/category_colors/utility_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/visual_editors/category_colors/vector_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`editors/visual_editors/color_theme` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/visual_editors/connection_colors/boolean_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/visual_editors/connection_colors/sampler_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/visual_editors/connection_colors/scalar_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/visual_editors/connection_colors/transform_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/visual_editors/connection_colors/vector2_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/visual_editors/connection_colors/vector3_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`editors/visual_editors/connection_colors/vector4_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`editors/visual_editors/grid_pattern` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`editors/visual_editors/lines_curvature` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`editors/visual_editors/minimap_opacity` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`editors/visual_editors/visual_shader/port_preview_size` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`filesystem/directories/autoscan_project_path` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`filesystem/directories/default_project_path` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`filesystem/external_programs/3d_model_editor` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`filesystem/external_programs/audio_editor` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`filesystem/external_programs/raster_image_editor` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`filesystem/external_programs/terminal_emulator` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`filesystem/external_programs/terminal_emulator_flags` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`filesystem/external_programs/vector_image_editor` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`filesystem/file_dialog/display_mode` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`filesystem/file_dialog/show_hidden_files` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`filesystem/file_dialog/thumbnail_size` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`filesystem/import/blender/blender_path` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`filesystem/import/blender/rpc_port` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`filesystem/import/blender/rpc_server_uptime` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`filesystem/import/fbx2gltf/fbx2gltf_path` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`filesystem/on_save/compress_binary_resources` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`filesystem/on_save/safe_save_on_backup_then_rename` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`filesystem/tools/oidn/oidn_denoise_path` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/editor/accept_dialog_cancel_ok_buttons` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/editor/automatically_open_screenshots` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`interface/editor/code_font` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/editor/code_font_contextual_ligatures` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`interface/editor/code_font_custom_opentype_features` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`interface/editor/code_font_custom_variations` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/editor/code_font_size` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`interface/editor/custom_display_scale` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/editor/debug/enable_pseudolocalization` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/editor/display_scale` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`interface/editor/editor_language` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/editor/editor_screen` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/editor/expand_to_title` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/editor/font_antialiasing` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/editor/font_hinting` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/editor/font_subpixel_positioning` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/editor/localize_settings` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/editor/low_processor_mode_sleep_usec` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`interface/editor/main_font` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`interface/editor/main_font_bold` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/editor/main_font_size` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/editor/mouse_extra_buttons_navigate_history` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/editor/project_manager_screen` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/editor/save_each_scene_on_quit` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/editor/save_on_focus_loss` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/editor/separate_distraction_mode` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/editor/show_internal_errors_in_toast_notifications` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/editor/show_update_spinner` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/editor/single_window_mode` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/editor/ui_layout_direction` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/editor/unfocused_low_processor_mode_sleep_usec` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/editor/update_continuously` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/editor/use_embedded_menu` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/editor/vsync_mode` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/inspector/auto_unfold_foreign_scenes` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/inspector/default_color_picker_mode` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/inspector/default_color_picker_shape` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`interface/inspector/default_float_step` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/inspector/default_property_name_style` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/inspector/disable_folding` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`interface/inspector/float_drag_speed` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/inspector/horizontal_vector2_editing` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/inspector/horizontal_vector_types_editing` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/inspector/max_array_dictionary_items_per_page` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/inspector/open_resources_in_current_inspector` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`interface/inspector/resources_to_open_in_new_inspector` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/inspector/show_low_level_opentype_features` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/multi_window/enable` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/multi_window/maximize_window` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/multi_window/restore_windows_on_load` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/scene_tabs/display_close_button` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/scene_tabs/maximum_width` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/scene_tabs/restore_scenes_on_load` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/scene_tabs/show_script_button` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/scene_tabs/show_thumbnail_on_hover` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`interface/theme/accent_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/theme/additional_spacing` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`interface/theme/base_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/theme/base_spacing` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/theme/border_size` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`interface/theme/contrast` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/theme/corner_radius` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`interface/theme/custom_theme` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/theme/draw_extra_borders` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/theme/follow_system_theme` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`interface/theme/icon_and_font_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`interface/theme/icon_saturation` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`interface/theme/preset` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`interface/theme/relationship_line_opacity` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`interface/theme/spacing_preset` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/theme/use_system_accent_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/touchscreen/enable_long_press_as_right_click` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/touchscreen/enable_pan_and_scale_gestures` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/touchscreen/increase_scrollbar_touch_area` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`interface/touchscreen/scale_gizmo_handles` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`network/connection/network_mode` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`network/debug/remote_host` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`network/debug/remote_port` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`network/http_proxy/host` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`network/http_proxy/port` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`network/tls/editor_tls_certificates` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`project_manager/default_renderer` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`project_manager/directory_naming_convention` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`project_manager/sorting_order` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`run/auto_save/save_before_running` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`run/output/always_clear_output_on_play` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`run/output/always_close_output_on_stop` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`run/output/always_open_output_on_play` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`run/output/font_size` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`run/platforms/linuxbsd/prefer_wayland` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`run/window_placement/android_window` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`run/window_placement/rect` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`run/window_placement/rect_custom_position` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`run/window_placement/screen` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/appearance/caret/caret_blink` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`text_editor/appearance/caret/caret_blink_interval` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/appearance/caret/highlight_all_occurrences` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/appearance/caret/highlight_current_line` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`text_editor/appearance/caret/type` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`text_editor/appearance/guidelines/line_length_guideline_hard_column` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`text_editor/appearance/guidelines/line_length_guideline_soft_column` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/appearance/guidelines/show_line_length_guidelines` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/appearance/gutters/highlight_type_safe_lines` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/appearance/gutters/line_numbers_zero_padded` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/appearance/gutters/show_info_gutter` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/appearance/gutters/show_line_numbers` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`text_editor/appearance/lines/autowrap_mode` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/appearance/lines/code_folding` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`text_editor/appearance/lines/word_wrap` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`text_editor/appearance/minimap/minimap_width` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/appearance/minimap/show_minimap` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/appearance/whitespace/draw_spaces` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/appearance/whitespace/draw_tabs` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`text_editor/appearance/whitespace/line_spacing` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/behavior/files/auto_reload_scripts_on_external_change` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`text_editor/behavior/files/autosave_interval_secs` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/behavior/files/convert_indent_on_save` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/behavior/files/restore_scripts_on_load` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/behavior/files/trim_trailing_whitespace_on_save` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/behavior/indent/auto_indent` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/behavior/indent/indent_wrapped_lines` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`text_editor/behavior/indent/size` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`text_editor/behavior/indent/type` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/behavior/navigation/drag_and_drop_selection` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/behavior/navigation/move_caret_on_right_click` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/behavior/navigation/scroll_past_end_of_file` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/behavior/navigation/smooth_scrolling` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/behavior/navigation/stay_in_script_editor_on_node_selected` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`text_editor/behavior/navigation/v_scroll_speed` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/completion/add_type_hints` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/completion/auto_brace_complete` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`text_editor/completion/code_complete_delay` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/completion/code_complete_enabled` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/completion/colorize_suggestions` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/completion/complete_file_paths` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`text_editor/completion/idle_parse_delay` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/completion/put_callhint_tooltip_below_current_line` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/completion/use_single_quotes` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`text_editor/help/class_reference_examples` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`text_editor/help/help_font_size` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`text_editor/help/help_source_font_size` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`text_editor/help/help_title_font_size` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/help/show_help_index` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/script_list/show_members_overview` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/script_list/sort_members_outline_alphabetically` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`text_editor/theme/color_theme` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/background_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/base_type_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/bookmark_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/brace_mismatch_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/breakpoint_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/caret_background_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/caret_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/code_folding_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/comment_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_background_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_existing_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_font_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_scroll_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_scroll_hovered_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_selected_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/control_flow_keyword_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/current_line_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/doc_comment_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/engine_type_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/executing_line_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/folded_code_region_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/function_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/keyword_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/line_length_guideline_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/line_number_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/mark_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/member_variable_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/number_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/safe_line_number_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/search_result_border_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/search_result_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/selection_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/string_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/symbol_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/text_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/text_selected_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/user_type_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/word_highlighted_color` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debugger/auto_switch_to_remote_scene_tree` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debugger/profile_native_calls` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debugger/profiler_frame_history_size` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debugger/profiler_frame_max_functions` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`debugger/remote_inspect_refresh_interval` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`debugger/remote_scene_tree_refresh_interval` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`docks/filesystem/always_show_folders` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`docks/filesystem/textfile_extensions` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`docks/filesystem/thumbnail_size` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`docks/property_editor/auto_refresh_interval` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`docks/property_editor/subresource_hue_tint` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`docks/scene_tree/auto_expand_to_selected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`docks/scene_tree/center_node_on_reparent` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`docks/scene_tree/start_create_dialog_fully_expanded` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/2d/bone_color1` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/2d/bone_color2` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/2d/bone_ik_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/2d/bone_outline_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/2d/bone_outline_size` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/2d/bone_selected_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/2d/bone_width` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/2d/grid_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/2d/guides_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/2d/smart_snapping_line_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/2d/use_integer_zoom_by_default` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/2d/viewport_border_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/default_fov` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/default_z_far` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/default_z_near` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/freelook/freelook_activation_modifier` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/freelook/freelook_base_speed` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/freelook/freelook_inertia` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/freelook/freelook_navigation_scheme` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/freelook/freelook_sensitivity` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/3d/freelook/freelook_speed_zoom_link` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/grid_division_level_bias` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/grid_division_level_max` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/grid_division_level_min` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/grid_size` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/3d/grid_xy_plane` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/3d/grid_xz_plane` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/3d/grid_yz_plane` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/3d/navigation/emulate_3_button_mouse` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/3d/navigation/emulate_numpad` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/3d/navigation/invert_x_axis` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/3d/navigation/invert_y_axis` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/navigation/navigation_scheme` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/navigation/orbit_modifier` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/navigation/pan_modifier` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/3d/navigation/warped_mouse_panning` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/navigation/zoom_modifier` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/navigation/zoom_style` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/navigation_feel/orbit_inertia` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/navigation_feel/orbit_sensitivity` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/navigation_feel/translation_inertia` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/navigation_feel/zoom_inertia` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d/primary_grid_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/primary_grid_steps` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d/secondary_grid_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d/selection_box_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/instantiated` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/joint` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/shape` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/animation/autorename_animation_tracks` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/animation/default_create_bezier_tracks` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/animation/default_create_reset_tracks` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/animation/onion_layers_future_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/animation/onion_layers_past_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/grid_map/pick_distance` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/panning/2d_editor_pan_speed` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/panning/2d_editor_panning_scheme` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/panning/animation_editors_panning_scheme` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/panning/simple_panning` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/panning/sub_editors_panning_scheme` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/panning/warped_mouse_panning` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/polygon_editor/auto_bake_delay` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/polygon_editor/point_grab_radius` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/polygon_editor/show_previous_outline` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/shader_editor/behavior/files/restore_shaders_on_load` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/tiles_editor/display_grid` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/tiles_editor/grid_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/tiles_editor/highlight_selected_layer` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/visual_editors/category_colors/color_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/visual_editors/category_colors/conditional_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/visual_editors/category_colors/input_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/visual_editors/category_colors/output_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/visual_editors/category_colors/particle_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/visual_editors/category_colors/scalar_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/visual_editors/category_colors/special_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/visual_editors/category_colors/textures_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/visual_editors/category_colors/transform_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/visual_editors/category_colors/utility_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/visual_editors/category_colors/vector_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`editors/visual_editors/color_theme` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/visual_editors/connection_colors/boolean_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/visual_editors/connection_colors/sampler_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/visual_editors/connection_colors/scalar_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/visual_editors/connection_colors/transform_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/visual_editors/connection_colors/vector2_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/visual_editors/connection_colors/vector3_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/visual_editors/connection_colors/vector4_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/visual_editors/grid_pattern` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/visual_editors/lines_curvature` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/visual_editors/minimap_opacity` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/visual_editors/visual_shader/port_preview_size` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`filesystem/directories/autoscan_project_path` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`filesystem/directories/default_project_path` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`filesystem/external_programs/3d_model_editor` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`filesystem/external_programs/audio_editor` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`filesystem/external_programs/raster_image_editor` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`filesystem/external_programs/terminal_emulator` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`filesystem/external_programs/terminal_emulator_flags` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`filesystem/external_programs/vector_image_editor` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`filesystem/file_dialog/display_mode` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`filesystem/file_dialog/show_hidden_files` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`filesystem/file_dialog/thumbnail_size` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`filesystem/import/blender/blender_path` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`filesystem/import/blender/rpc_port` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`filesystem/import/blender/rpc_server_uptime` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`filesystem/import/fbx2gltf/fbx2gltf_path` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`filesystem/on_save/compress_binary_resources` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`filesystem/on_save/safe_save_on_backup_then_rename` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`filesystem/tools/oidn/oidn_denoise_path` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/accept_dialog_cancel_ok_buttons` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/automatically_open_screenshots` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`interface/editor/code_font` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/code_font_contextual_ligatures` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`interface/editor/code_font_custom_opentype_features` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`interface/editor/code_font_custom_variations` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/code_font_size` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`interface/editor/custom_display_scale` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/debug/enable_pseudolocalization` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/display_scale` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`interface/editor/editor_language` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/editor_screen` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/expand_to_title` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/font_antialiasing` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/font_hinting` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/font_subpixel_positioning` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/localize_settings` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/low_processor_mode_sleep_usec` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`interface/editor/main_font` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`interface/editor/main_font_bold` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/main_font_size` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/mouse_extra_buttons_navigate_history` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/project_manager_screen` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/save_each_scene_on_quit` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/save_on_focus_loss` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/separate_distraction_mode` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/show_internal_errors_in_toast_notifications` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/show_update_spinner` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/single_window_mode` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/ui_layout_direction` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/unfocused_low_processor_mode_sleep_usec` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/update_continuously` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/use_embedded_menu` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/use_native_file_dialogs` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/vsync_mode` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/inspector/auto_unfold_foreign_scenes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/inspector/default_color_picker_mode` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/inspector/default_color_picker_shape` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`interface/inspector/default_float_step` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/inspector/default_property_name_style` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/inspector/disable_folding` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`interface/inspector/float_drag_speed` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/inspector/horizontal_vector2_editing` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/inspector/horizontal_vector_types_editing` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/inspector/max_array_dictionary_items_per_page` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/inspector/open_resources_in_current_inspector` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`interface/inspector/resources_to_open_in_new_inspector` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/inspector/show_low_level_opentype_features` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/multi_window/enable` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/multi_window/maximize_window` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/multi_window/restore_windows_on_load` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/scene_tabs/display_close_button` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/scene_tabs/maximum_width` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/scene_tabs/restore_scenes_on_load` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/scene_tabs/show_script_button` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/scene_tabs/show_thumbnail_on_hover` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`interface/theme/accent_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/theme/additional_spacing` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`interface/theme/base_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/theme/base_spacing` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/theme/border_size` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`interface/theme/contrast` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/theme/corner_radius` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`interface/theme/custom_theme` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/theme/draw_extra_borders` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/theme/follow_system_theme` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/theme/icon_and_font_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`interface/theme/icon_saturation` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`interface/theme/preset` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`interface/theme/relationship_line_opacity` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`interface/theme/spacing_preset` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/theme/use_system_accent_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/touchscreen/enable_long_press_as_right_click` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/touchscreen/enable_pan_and_scale_gestures` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/touchscreen/increase_scrollbar_touch_area` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`interface/touchscreen/scale_gizmo_handles` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`network/connection/network_mode` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`network/debug/remote_host` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`network/debug/remote_port` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`network/http_proxy/host` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`network/http_proxy/port` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`network/tls/editor_tls_certificates` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`project_manager/default_renderer` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`project_manager/directory_naming_convention` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`project_manager/sorting_order` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`run/auto_save/save_before_running` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`run/output/always_clear_output_on_play` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`run/output/always_close_output_on_stop` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`run/output/always_open_output_on_play` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`run/output/font_size` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`run/platforms/linuxbsd/prefer_wayland` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`run/window_placement/android_window` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`run/window_placement/rect` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`run/window_placement/rect_custom_position` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`run/window_placement/screen` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/caret/caret_blink` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`text_editor/appearance/caret/caret_blink_interval` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/caret/highlight_all_occurrences` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/caret/highlight_current_line` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/appearance/caret/type` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/appearance/guidelines/line_length_guideline_hard_column` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/appearance/guidelines/line_length_guideline_soft_column` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/guidelines/show_line_length_guidelines` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/gutters/highlight_type_safe_lines` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/gutters/line_numbers_zero_padded` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/gutters/show_info_gutter` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/gutters/show_line_numbers` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/appearance/lines/autowrap_mode` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/lines/code_folding` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/appearance/lines/word_wrap` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/appearance/minimap/minimap_width` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/minimap/show_minimap` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/whitespace/draw_spaces` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/whitespace/draw_tabs` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/appearance/whitespace/line_spacing` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/files/auto_reload_scripts_on_external_change` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/behavior/files/autosave_interval_secs` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/files/convert_indent_on_save` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/files/restore_scripts_on_load` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/files/trim_trailing_whitespace_on_save` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/indent/auto_indent` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/indent/indent_wrapped_lines` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/behavior/indent/size` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/behavior/indent/type` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/navigation/drag_and_drop_selection` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/navigation/move_caret_on_right_click` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/navigation/open_script_when_connecting_signal_to_existing_method` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/navigation/scroll_past_end_of_file` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/navigation/smooth_scrolling` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/navigation/stay_in_script_editor_on_node_selected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/behavior/navigation/v_scroll_speed` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/completion/add_node_path_literals` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/completion/add_string_name_literals` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/completion/add_type_hints` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/completion/auto_brace_complete` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`text_editor/completion/code_complete_delay` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/completion/code_complete_enabled` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/completion/colorize_suggestions` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/completion/complete_file_paths` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`text_editor/completion/idle_parse_delay` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/completion/put_callhint_tooltip_below_current_line` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/completion/use_single_quotes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/help/class_reference_examples` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/help/help_font_size` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/help/help_source_font_size` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/help/help_title_font_size` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/help/show_help_index` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/script_list/show_members_overview` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/script_list/sort_members_outline_alphabetically` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`text_editor/theme/color_theme` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/background_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/base_type_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/bookmark_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/brace_mismatch_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/breakpoint_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/caret_background_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/caret_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/code_folding_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/comment_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_background_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_existing_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_font_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_scroll_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_scroll_hovered_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_selected_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/control_flow_keyword_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/current_line_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/doc_comment_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/engine_type_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/executing_line_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/folded_code_region_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/function_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/keyword_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/line_length_guideline_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/line_number_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/mark_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/member_variable_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/number_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/safe_line_number_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/search_result_border_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/search_result_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/selection_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/string_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/symbol_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/text_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/text_selected_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/user_type_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/word_highlighted_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -1775,6 +1785,18 @@ The color to use for the TileMap editor's grid. ---- +.. _class_EditorSettings_property_editors/tiles_editor/highlight_selected_layer: + +.. rst-class:: classref-property + +:ref:`bool` **editors/tiles_editor/highlight_selected_layer** + +Highlight the currently selected TileMapLayer by dimming the other ones in the scene. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_editors/visual_editors/category_colors/color_color: .. rst-class:: classref-property @@ -2751,6 +2773,18 @@ Specific to the macOS platform. ---- +.. _class_EditorSettings_property_interface/editor/use_native_file_dialogs: + +.. rst-class:: classref-property + +:ref:`bool` **interface/editor/use_native_file_dialogs** + +If ``true``, editor UI uses OS native file/directory selection dialogs. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_interface/editor/vsync_mode: .. rst-class:: classref-property @@ -2915,6 +2949,8 @@ If ``true``, subresources can be edited in the current inspector view. If the re List of resources that should always be opened in a new inspector view, even if :ref:`interface/inspector/open_resources_in_current_inspector` is ``true``. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + .. rst-class:: classref-item-separator ---- @@ -3167,7 +3203,7 @@ The icon and font color scheme to use in the editor. - **Auto** determines the color scheme to use automatically based on :ref:`interface/theme/base_color`. -- **Dark** makes fonts and icons dark (suitable for light themes). Icon colors are automatically converted by the editor following the set of rules defined in `this file `__. +- **Dark** makes fonts and icons dark (suitable for light themes). Icon colors are automatically converted by the editor following the set of rules defined in `this file `__. - **Light** makes fonts and icons light (suitable for dark themes). @@ -3903,6 +3939,18 @@ If ``true``, the caret will be moved when right-clicking somewhere in the script ---- +.. _class_EditorSettings_property_text_editor/behavior/navigation/open_script_when_connecting_signal_to_existing_method: + +.. rst-class:: classref-property + +:ref:`bool` **text_editor/behavior/navigation/open_script_when_connecting_signal_to_existing_method** + +If ``true``, opens the script editor when connecting a signal to an existing script method from the Node dock. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/behavior/navigation/scroll_past_end_of_file: .. rst-class:: classref-property @@ -3955,6 +4003,30 @@ The number of pixels to scroll with every mouse wheel increment. Higher values m ---- +.. _class_EditorSettings_property_text_editor/completion/add_node_path_literals: + +.. rst-class:: classref-property + +:ref:`bool` **text_editor/completion/add_node_path_literals** + +If ``true``, uses :ref:`NodePath` instead of :ref:`String` when appropriate for code autocompletion or for drag and dropping object properties into the script editor. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_text_editor/completion/add_string_name_literals: + +.. rst-class:: classref-property + +:ref:`bool` **text_editor/completion/add_string_name_literals** + +If ``true``, uses :ref:`StringName` instead of :ref:`String` when appropriate for code autocompletion. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/completion/add_type_hints: .. rst-class:: classref-property diff --git a/classes/class_engine.rst b/classes/class_engine.rst index 8ab8d2d7ed68..58908cd581fd 100644 --- a/classes/class_engine.rst +++ b/classes/class_engine.rst @@ -129,7 +129,7 @@ Limiting the FPS can be useful to reduce the host machine's power consumption, w If :ref:`ProjectSettings.display/window/vsync/vsync_mode` is **Enabled** or **Adaptive**, the setting takes precedence and the max FPS number cannot exceed the monitor's refresh rate. -If :ref:`ProjectSettings.display/window/vsync/vsync_mode` is **Enabled**, on monitors with variable refresh rate enabled (G-Sync/FreeSync), using a FPS limit a few frames lower than the monitor's refresh rate will `reduce input lag while avoiding tearing `__. +If :ref:`ProjectSettings.display/window/vsync/vsync_mode` is **Enabled**, on monitors with variable refresh rate enabled (G-Sync/FreeSync), using an FPS limit a few frames lower than the monitor's refresh rate will `reduce input lag while avoiding tearing `__. See also :ref:`physics_ticks_per_second` and :ref:`ProjectSettings.application/run/max_fps`. @@ -280,7 +280,7 @@ To detect whether the current build is 64-bit, you can use the fact that all 64- -\ **Note:** This method does *not* return the name of the system's CPU architecture (like :ref:`OS.get_processor_name`). For example, when running a ``x86_32`` Godot binary on a ``x86_64`` system, the returned value will still be ``"x86_32"``. +\ **Note:** This method does *not* return the name of the system's CPU architecture (like :ref:`OS.get_processor_name`). For example, when running an ``x86_32`` Godot binary on an ``x86_64`` system, the returned value will still be ``"x86_32"``. .. rst-class:: classref-item-separator diff --git a/classes/class_environment.rst b/classes/class_environment.rst index e7b8ab033410..51eb56896026 100644 --- a/classes/class_environment.rst +++ b/classes/class_environment.rst @@ -38,11 +38,9 @@ Tutorials - :doc:`High dynamic range lighting <../tutorials/3d/high_dynamic_range>` -- `3D Material Testers Demo `__ +- `3D Material Testers Demo `__ -- `2D HDR Demo `__ - -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group @@ -2060,7 +2058,7 @@ The default exposure used for tonemapping. Higher values result in a brighter im - |void| **set_tonemapper**\ (\ value\: :ref:`ToneMapper`\ ) - :ref:`ToneMapper` **get_tonemapper**\ (\ ) -The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on a LDR display. (Godot doesn't support rendering on HDR displays yet.) +The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on an LDR display. (Godot doesn't support rendering on HDR displays yet.) .. rst-class:: classref-item-separator diff --git a/classes/class_fileaccess.rst b/classes/class_fileaccess.rst index b0885980889a..f8aa4676a84c 100644 --- a/classes/class_fileaccess.rst +++ b/classes/class_fileaccess.rst @@ -71,7 +71,7 @@ Tutorials - :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` -- `3D Voxel Demo `__ +- `3D Voxel Demo `__ .. rst-class:: classref-reftable-group @@ -606,7 +606,7 @@ Text is interpreted as being UTF-8 encoded. Text values must be enclosed in doub For example, the following CSV lines are valid and will be properly parsed as two strings each: -:: +.. code:: text Alice,"Hello, Bob!" Bob,Alice! What a surprise! @@ -840,7 +840,7 @@ Returns the next bits from the file as a floating-point number. :ref:`String` **get_sha256**\ (\ path\: :ref:`String`\ ) |static| -Returns a SHA-256 :ref:`String` representing the file at the given path or an empty :ref:`String` on failure. +Returns an SHA-256 :ref:`String` representing the file at the given path or an empty :ref:`String` on failure. .. rst-class:: classref-item-separator diff --git a/classes/class_filedialog.rst b/classes/class_filedialog.rst index 59afc6ef7bb2..8bbd4a7b677b 100644 --- a/classes/class_filedialog.rst +++ b/classes/class_filedialog.rst @@ -65,35 +65,35 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`add_filter`\ (\ filter\: :ref:`String`, description\: :ref:`String` = ""\ ) | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`add_option`\ (\ name\: :ref:`String`, values\: :ref:`PackedStringArray`, index\: :ref:`int`\ ) | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`clear_filters`\ (\ ) | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`deselect_all`\ (\ ) | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`LineEdit` | :ref:`get_line_edit`\ (\ ) | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_option_default`\ (\ option\: :ref:`int`\ ) |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_option_name`\ (\ option\: :ref:`int`\ ) |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_option_values`\ (\ option\: :ref:`int`\ ) |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_selected_options`\ (\ ) |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`VBoxContainer` | :ref:`get_vbox`\ (\ ) | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`invalidate`\ (\ ) | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_option_default`\ (\ option\: :ref:`int`, index\: :ref:`int`\ ) | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_option_name`\ (\ option\: :ref:`int`, name\: :ref:`String`\ ) | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_option_values`\ (\ option\: :ref:`int`, values\: :ref:`PackedStringArray`\ ) | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_filter`\ (\ filter\: :ref:`String`, description\: :ref:`String` = ""\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_option`\ (\ name\: :ref:`String`, values\: :ref:`PackedStringArray`, default_value_index\: :ref:`int`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_filters`\ (\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`deselect_all`\ (\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`LineEdit` | :ref:`get_line_edit`\ (\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_option_default`\ (\ option\: :ref:`int`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_option_name`\ (\ option\: :ref:`int`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_option_values`\ (\ option\: :ref:`int`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_selected_options`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VBoxContainer` | :ref:`get_vbox`\ (\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`invalidate`\ (\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_option_default`\ (\ option\: :ref:`int`, default_value_index\: :ref:`int`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_option_name`\ (\ option\: :ref:`int`, name\: :ref:`String`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_option_values`\ (\ option\: :ref:`int`, values\: :ref:`PackedStringArray`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -366,6 +366,8 @@ The dialog's open or save mode, which affects the selection behavior. See :ref:` The available file type filters. Each filter string in the array should be formatted like this: ``*.txt,*.doc;Text Files``. The description text of the filter is optional and can be omitted. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + .. rst-class:: classref-item-separator ---- @@ -482,10 +484,12 @@ For example, a ``filter`` of ``"*.png, *.jpg"`` and a ``description`` of ``"Imag .. rst-class:: classref-method -|void| **add_option**\ (\ name\: :ref:`String`, values\: :ref:`PackedStringArray`, index\: :ref:`int`\ ) +|void| **add_option**\ (\ name\: :ref:`String`, values\: :ref:`PackedStringArray`, default_value_index\: :ref:`int`\ ) Adds an additional :ref:`OptionButton` to the file dialog. If ``values`` is empty, a :ref:`CheckBox` is added instead. +\ ``default_value_index`` should be an index of the value in the ``values``. If ``values`` is empty it should be either ``1`` (checked), or ``0`` (unchecked). + .. rst-class:: classref-item-separator ---- @@ -606,7 +610,7 @@ Invalidate and update the current dialog content list. .. rst-class:: classref-method -|void| **set_option_default**\ (\ option\: :ref:`int`, index\: :ref:`int`\ ) +|void| **set_option_default**\ (\ option\: :ref:`int`, default_value_index\: :ref:`int`\ ) Sets the default value index of the :ref:`OptionButton` or :ref:`CheckBox` with index ``option``. diff --git a/classes/class_fontfile.rst b/classes/class_fontfile.rst index 2865ec0ed1a3..32c1bac8ba03 100644 --- a/classes/class_fontfile.rst +++ b/classes/class_fontfile.rst @@ -78,6 +78,8 @@ Properties +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`PackedByteArray` | :ref:`data` | ``PackedByteArray()`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`disable_embedded_bitmaps` | ``true`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`int` | :ref:`fixed_size` | ``0`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`FixedSizeScaleMode` | :ref:`fixed_size_scale_mode` | ``0`` | @@ -311,6 +313,25 @@ Font anti-aliasing mode. Contents of the dynamic font source file. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray` for more details. + +.. rst-class:: classref-item-separator + +---- + +.. _class_FontFile_property_disable_embedded_bitmaps: + +.. rst-class:: classref-property + +:ref:`bool` **disable_embedded_bitmaps** = ``true`` + +.. rst-class:: classref-property-setget + +- |void| **set_disable_embedded_bitmaps**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_disable_embedded_bitmaps**\ (\ ) + +If set to ``true``, embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property). + .. rst-class:: classref-item-separator ---- @@ -614,7 +635,7 @@ Removes all font cache entries. |void| **clear_glyphs**\ (\ cache_index\: :ref:`int`, size\: :ref:`Vector2i`\ ) -Removes all rendered glyphs information from the cache entry. +Removes all rendered glyph information from the cache entry. \ **Note:** This function will not remove textures associated with the glyphs, use :ref:`remove_texture` to remove them manually. @@ -1398,7 +1419,7 @@ Sets array containing glyph packing data. |void| **set_transform**\ (\ cache_index\: :ref:`int`, transform\: :ref:`Transform2D`\ ) -Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs. +Sets 2D transform, applied to the font outlines, can be used for slanting, flipping, and rotating glyphs. .. rst-class:: classref-item-separator diff --git a/classes/class_geometryinstance3d.rst b/classes/class_geometryinstance3d.rst index 5a175c580794..b0e32a7317e8 100644 --- a/classes/class_geometryinstance3d.rst +++ b/classes/class_geometryinstance3d.rst @@ -153,7 +153,7 @@ enum **GIMode**: :ref:`GIMode` **GI_MODE_DISABLED** = ``0`` -Disabled global illumination mode. Use for dynamic objects that do not contribute to global illumination (such as characters). When using :ref:`VoxelGI` and SDFGI, the geometry will *receive* indirect lighting and reflections but the geometry will not be considered in GI baking. When using :ref:`LightmapGI`, the object will receive indirect lighting using lightmap probes instead of using the baked lightmap texture. +Disabled global illumination mode. Use for dynamic objects that do not contribute to global illumination (such as characters). When using :ref:`VoxelGI` and SDFGI, the geometry will *receive* indirect lighting and reflections but the geometry will not be considered in GI baking. .. _class_GeometryInstance3D_constant_GI_MODE_STATIC: @@ -169,7 +169,7 @@ Baked global illumination mode. Use for static objects that contribute to global :ref:`GIMode` **GI_MODE_DYNAMIC** = ``2`` -Dynamic global illumination mode. Use for dynamic objects that contribute to global illumination. This GI mode is only effective when using :ref:`VoxelGI`, but it has a higher performance impact than :ref:`GI_MODE_STATIC`. When using other GI methods, this will act the same as :ref:`GI_MODE_DISABLED`. +Dynamic global illumination mode. Use for dynamic objects that contribute to global illumination. This GI mode is only effective when using :ref:`VoxelGI`, but it has a higher performance impact than :ref:`GI_MODE_STATIC`. When using other GI methods, this will act the same as :ref:`GI_MODE_DISABLED`. When using :ref:`LightmapGI`, the object will receive indirect lighting using lightmap probes instead of using the baked lightmap texture. .. rst-class:: classref-item-separator diff --git a/classes/class_gltfbufferview.rst b/classes/class_gltfbufferview.rst index 0025cd3f51b2..1d8484eba5f9 100644 --- a/classes/class_gltfbufferview.rst +++ b/classes/class_gltfbufferview.rst @@ -40,17 +40,19 @@ Properties .. table:: :widths: auto - +-------------------------+---------------------------------------------------------------+-----------+ - | :ref:`int` | :ref:`buffer` | ``-1`` | - +-------------------------+---------------------------------------------------------------+-----------+ - | :ref:`int` | :ref:`byte_length` | ``0`` | - +-------------------------+---------------------------------------------------------------+-----------+ - | :ref:`int` | :ref:`byte_offset` | ``0`` | - +-------------------------+---------------------------------------------------------------+-----------+ - | :ref:`int` | :ref:`byte_stride` | ``-1`` | - +-------------------------+---------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`indices` | ``false`` | - +-------------------------+---------------------------------------------------------------+-----------+ + +-------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`buffer` | ``-1`` | + +-------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`byte_length` | ``0`` | + +-------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`byte_offset` | ``0`` | + +-------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`byte_stride` | ``-1`` | + +-------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`indices` | ``false`` | + +-------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`vertex_attributes` | ``false`` | + +-------------------------+---------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -152,7 +154,24 @@ The stride, in bytes, between interleaved data. If ``-1``, this buffer view is n - |void| **set_indices**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_indices**\ (\ ) -True if the GLTFBufferView's OpenGL GPU buffer type is an ``ELEMENT_ARRAY_BUFFER`` used for vertex indices (integer constant ``34963``). False if the buffer type is ``ARRAY_BUFFER`` used for vertex attributes (integer constant ``34962``) or when any other value. See `Buffers, BufferViews, and Accessors `__ for possible values. This property is set but never used, setting this property will do nothing. +True if the GLTFBufferView's OpenGL GPU buffer type is an ``ELEMENT_ARRAY_BUFFER`` used for vertex indices (integer constant ``34963``). False if the buffer type is any other value. See `Buffers, BufferViews, and Accessors `__ for possible values. This property is set on import and used on export. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFBufferView_property_vertex_attributes: + +.. rst-class:: classref-property + +:ref:`bool` **vertex_attributes** = ``false`` + +.. rst-class:: classref-property-setget + +- |void| **set_vertex_attributes**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_vertex_attributes**\ (\ ) + +True if the GLTFBufferView's OpenGL GPU buffer type is an ``ARRAY_BUFFER`` used for vertex attributes (integer constant ``34962``). False if the buffer type is any other value. See `Buffers, BufferViews, and Accessors `__ for possible values. This property is set on import and used on export. .. rst-class:: classref-section-separator diff --git a/classes/class_gltfmesh.rst b/classes/class_gltfmesh.rst index be8ceb295594..18efec24f9b2 100644 --- a/classes/class_gltfmesh.rst +++ b/classes/class_gltfmesh.rst @@ -12,7 +12,7 @@ GLTFMesh **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -GLTFMesh represents an GLTF mesh. +GLTFMesh represents a GLTF mesh. .. rst-class:: classref-introduction-group @@ -82,6 +82,8 @@ Property Descriptions An array of floats representing the blend weights of the mesh. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedFloat32Array` for more details. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_gltfnode.rst b/classes/class_gltfnode.rst index 4ed23efb961e..0349117655a8 100644 --- a/classes/class_gltfnode.rst +++ b/classes/class_gltfnode.rst @@ -121,6 +121,8 @@ If this GLTF node is a camera, the index of the :ref:`GLTFCamera`. If this GLTF node has no children, this will be an empty array. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_gltfphysicsbody.rst b/classes/class_gltfphysicsbody.rst index b34a0c741e26..0efd97208345 100644 --- a/classes/class_gltfphysicsbody.rst +++ b/classes/class_gltfphysicsbody.rst @@ -248,7 +248,7 @@ Creates a new GLTFPhysicsBody instance by parsing the given :ref:`Dictionary` **from_node**\ (\ body_node\: :ref:`CollisionObject3D`\ ) |static| -Create a new GLTFPhysicsBody instance from the given Godot :ref:`CollisionObject3D` node. +Creates a new GLTFPhysicsBody instance from the given Godot :ref:`CollisionObject3D` node. .. rst-class:: classref-item-separator diff --git a/classes/class_gltfphysicsshape.rst b/classes/class_gltfphysicsshape.rst index 50198edaa0ea..229de617e818 100644 --- a/classes/class_gltfphysicsshape.rst +++ b/classes/class_gltfphysicsshape.rst @@ -69,10 +69,14 @@ Methods +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`GLTFPhysicsShape` | :ref:`from_node`\ (\ shape_node\: :ref:`CollisionShape3D`\ ) |static| | +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFPhysicsShape` | :ref:`from_resource`\ (\ shape_resource\: :ref:`Shape3D`\ ) |static| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`to_dictionary`\ (\ ) |const| | +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`CollisionShape3D` | :ref:`to_node`\ (\ cache_shapes\: :ref:`bool` = false\ ) | +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Shape3D` | :ref:`to_resource`\ (\ cache_shapes\: :ref:`bool` = false\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -227,7 +231,19 @@ Creates a new GLTFPhysicsShape instance by parsing the given :ref:`Dictionary` **from_node**\ (\ shape_node\: :ref:`CollisionShape3D`\ ) |static| -Create a new GLTFPhysicsShape instance from the given Godot :ref:`CollisionShape3D` node. +Creates a new GLTFPhysicsShape instance from the given Godot :ref:`CollisionShape3D` node. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFPhysicsShape_method_from_resource: + +.. rst-class:: classref-method + +:ref:`GLTFPhysicsShape` **from_resource**\ (\ shape_resource\: :ref:`Shape3D`\ ) |static| + +Creates a new GLTFPhysicsShape instance from the given Godot :ref:`Shape3D` resource. .. rst-class:: classref-item-separator @@ -253,6 +269,18 @@ Serializes this GLTFPhysicsShape instance into a :ref:`Dictionary` node. +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFPhysicsShape_method_to_resource: + +.. rst-class:: classref-method + +:ref:`Shape3D` **to_resource**\ (\ cache_shapes\: :ref:`bool` = false\ ) + +Converts this GLTFPhysicsShape instance into a Godot :ref:`Shape3D` resource. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_gltfstate.rst b/classes/class_gltfstate.rst index 8d401d035c38..27093e6088bd 100644 --- a/classes/class_gltfstate.rst +++ b/classes/class_gltfstate.rst @@ -312,6 +312,8 @@ The file name associated with this GLTF data. If it ends with ``.gltf``, this is The binary buffer attached to a .glb file. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray` for more details. + .. rst-class:: classref-item-separator ---- @@ -401,6 +403,8 @@ The original raw JSON document corresponding to this GLTFState. The root nodes of the GLTF file. Typically, a GLTF file will only have one scene, and therefore one root node. However, a GLTF file may have multiple scenes and therefore multiple root nodes, which will be generated as siblings of each other and as children of the root node of the generated Godot scene. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_gltftexture.rst b/classes/class_gltftexture.rst index bf9609441fea..2c5882f7c6d3 100644 --- a/classes/class_gltftexture.rst +++ b/classes/class_gltftexture.rst @@ -12,7 +12,7 @@ GLTFTexture **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -GLTFTexture represents a texture in an GLTF file. +GLTFTexture represents a texture in a GLTF file. .. rst-class:: classref-introduction-group diff --git a/classes/class_gpuparticles2d.rst b/classes/class_gpuparticles2d.rst index 356c86bc5f75..3a81d2b75da9 100644 --- a/classes/class_gpuparticles2d.rst +++ b/classes/class_gpuparticles2d.rst @@ -32,9 +32,9 @@ Tutorials - :doc:`Particle systems (2D) <../tutorials/2d/particle_systems_2d>` -- `2D Particles Demo `__ +- `2D Particles Demo `__ -- `2D Dodge The Creeps Demo (uses GPUParticles2D for the trail behind the player) `__ +- `2D Dodge The Creeps Demo (uses GPUParticles2D for the trail behind the player) `__ .. rst-class:: classref-reftable-group @@ -127,9 +127,11 @@ Signals **finished**\ (\ ) -Emitted when all active particles have finished processing. When :ref:`one_shot` is disabled, particles will process continuously, so this is never emitted. +Emitted when all active particles have finished processing. To immediately restart the emission cycle, call :ref:`restart`. -\ **Note:** Due to the particles being computed on the GPU there might be a delay before the signal gets emitted. +Never emitted when :ref:`one_shot` is disabled, as particles will be emitted and processed continuously. + +\ **Note:** For :ref:`one_shot` emitters, due to the particles being computed on the GPU, there may be a short period after receiving the signal during which setting :ref:`emitting` to ``true`` will not restart the emission cycle. This delay is avoided by instead calling :ref:`restart`. .. rst-class:: classref-section-separator @@ -314,7 +316,11 @@ Particle draw order. Uses :ref:`DrawOrder` values - |void| **set_emitting**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_emitting**\ (\ ) -If ``true``, particles are being emitted. :ref:`emitting` can be used to start and stop particles from emitting. However, if :ref:`one_shot` is ``true`` setting :ref:`emitting` to ``true`` will not restart the emission cycle until after all active particles finish processing. You can use the :ref:`finished` signal to be notified once all active particles finish processing. +If ``true``, particles are being emitted. :ref:`emitting` can be used to start and stop particles from emitting. However, if :ref:`one_shot` is ``true`` setting :ref:`emitting` to ``true`` will not restart the emission cycle unless all active particles have finished processing. Use the :ref:`finished` signal to be notified once all active particles finish processing. + +\ **Note:** For :ref:`one_shot` emitters, due to the particles being computed on the GPU, there may be a short period after receiving the :ref:`finished` signal during which setting this to ``true`` will not restart the emission cycle. + +\ **Tip:** If your :ref:`one_shot` emitter needs to immediately restart emitting particles once :ref:`finished` signal is received, consider calling :ref:`restart` instead of setting :ref:`emitting`. .. rst-class:: classref-item-separator @@ -704,7 +710,9 @@ The default ParticleProcessMaterial will overwrite ``color`` and use the content |void| **restart**\ (\ ) -Restarts all the existing particles. +Restarts the particle emission cycle, clearing existing particles. To avoid particles vanishing from the viewport, wait for the :ref:`finished` signal before calling. + +\ **Note:** The :ref:`finished` signal is only emitted by :ref:`one_shot` emitters. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_gpuparticles3d.rst b/classes/class_gpuparticles3d.rst index 0f1922e00d64..208b1d9bc5b4 100644 --- a/classes/class_gpuparticles3d.rst +++ b/classes/class_gpuparticles3d.rst @@ -32,7 +32,7 @@ Tutorials - :doc:`Controlling thousands of fish with Particles <../tutorials/performance/vertex_animation/controlling_thousands_of_fish>` -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group @@ -137,9 +137,11 @@ Signals **finished**\ (\ ) -Emitted when all active particles have finished processing. When :ref:`one_shot` is disabled, particles will process continuously, so this is never emitted. +Emitted when all active particles have finished processing. To immediately emit new particles, call :ref:`restart`. -\ **Note:** Due to the particles being computed on the GPU there might be a delay before the signal gets emitted. +Never emitted when :ref:`one_shot` is disabled, as particles will be emitted and processed continuously. + +\ **Note:** For :ref:`one_shot` emitters, due to the particles being computed on the GPU, there may be a short period after receiving the signal during which setting :ref:`emitting` to ``true`` will not restart the emission cycle. This delay is avoided by instead calling :ref:`restart`. .. rst-class:: classref-section-separator @@ -513,7 +515,11 @@ The number of draw passes when rendering particles. - |void| **set_emitting**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_emitting**\ (\ ) -If ``true``, particles are being emitted. :ref:`emitting` can be used to start and stop particles from emitting. However, if :ref:`one_shot` is ``true`` setting :ref:`emitting` to ``true`` will not restart the emission cycle until after all active particles finish processing. You can use the :ref:`finished` signal to be notified once all active particles finish processing. +If ``true``, particles are being emitted. :ref:`emitting` can be used to start and stop particles from emitting. However, if :ref:`one_shot` is ``true`` setting :ref:`emitting` to ``true`` will not restart the emission cycle unless all active particles have finished processing. Use the :ref:`finished` signal to be notified once all active particles finish processing. + +\ **Note:** For :ref:`one_shot` emitters, due to the particles being computed on the GPU, there may be a short period after receiving the :ref:`finished` signal during which setting this to ``true`` will not restart the emission cycle. + +\ **Tip:** If your :ref:`one_shot` emitter needs to immediately restart emitting particles once :ref:`finished` signal is received, consider calling :ref:`restart` instead of setting :ref:`emitting`. .. rst-class:: classref-item-separator @@ -883,7 +889,9 @@ Returns the :ref:`Mesh` that is drawn at index ``pass``. |void| **restart**\ (\ ) -Restarts the particle emission, clearing existing particles. +Restarts the particle emission cycle, clearing existing particles. To avoid particles vanishing from the viewport, wait for the :ref:`finished` signal before calling. + +\ **Note:** The :ref:`finished` signal is only emitted by :ref:`one_shot` emitters. .. rst-class:: classref-item-separator diff --git a/classes/class_gradient.rst b/classes/class_gradient.rst index e2860adee2d3..1e9d2c999461 100644 --- a/classes/class_gradient.rst +++ b/classes/class_gradient.rst @@ -162,9 +162,11 @@ Property Descriptions - |void| **set_colors**\ (\ value\: :ref:`PackedColorArray`\ ) - :ref:`PackedColorArray` **get_colors**\ (\ ) -Gradient's colors returned as a :ref:`PackedColorArray`. +Gradient's colors as a :ref:`PackedColorArray`. -\ **Note:** This property returns a copy, modifying the return value does not update the gradient. To update the gradient use :ref:`set_color` method (for updating colors individually) or assign to this property directly (for bulk-updating all colors at once). +\ **Note:** Setting this property updates all colors at once. To update any color individually use :ref:`set_color`. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedColorArray` for more details. .. rst-class:: classref-item-separator @@ -217,9 +219,11 @@ The algorithm used to interpolate between points of the gradient. See :ref:`Inte - |void| **set_offsets**\ (\ value\: :ref:`PackedFloat32Array`\ ) - :ref:`PackedFloat32Array` **get_offsets**\ (\ ) -Gradient's offsets returned as a :ref:`PackedFloat32Array`. +Gradient's offsets as a :ref:`PackedFloat32Array`. + +\ **Note:** Setting this property updates all offsets at once. To update any offset individually use :ref:`set_offset`. -\ **Note:** This property returns a copy, modifying the return value does not update the gradient. To update the gradient use :ref:`set_offset` method (for updating offsets individually) or assign to this property directly (for bulk-updating all offsets at once). +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedFloat32Array` for more details. .. rst-class:: classref-section-separator diff --git a/classes/class_graphedit.rst b/classes/class_graphedit.rst index a69497313048..b246d64efc49 100644 --- a/classes/class_graphedit.rst +++ b/classes/class_graphedit.rst @@ -112,14 +112,20 @@ Methods +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`arrange_nodes`\ (\ ) | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`attach_graph_element_to_frame`\ (\ element\: :ref:`StringName`, frame\: :ref:`StringName`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear_connections`\ (\ ) | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`connect_node`\ (\ from_node\: :ref:`StringName`, from_port\: :ref:`int`, to_node\: :ref:`StringName`, to_port\: :ref:`int`\ ) | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`detach_graph_element_from_frame`\ (\ element\: :ref:`StringName`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`disconnect_node`\ (\ from_node\: :ref:`StringName`, from_port\: :ref:`int`, to_node\: :ref:`StringName`, to_port\: :ref:`int`\ ) | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`force_connection_drag_end`\ (\ ) | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`StringName`\] | :ref:`get_attached_nodes_of_frame`\ (\ frame\: :ref:`StringName`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`get_closest_connection_at_point`\ (\ point\: :ref:`Vector2`, max_distance\: :ref:`float` = 4.0\ ) |const| | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector2Array` | :ref:`get_connection_line`\ (\ from_node\: :ref:`Vector2`, to_node\: :ref:`Vector2`\ ) |const| | @@ -128,6 +134,8 @@ Methods +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`get_connections_intersecting_with_rect`\ (\ rect\: :ref:`Rect2`\ ) |const| | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GraphFrame` | :ref:`get_element_frame`\ (\ element\: :ref:`StringName`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`HBoxContainer` | :ref:`get_menu_hbox`\ (\ ) | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_node_connected`\ (\ from_node\: :ref:`StringName`, from_port\: :ref:`int`, to_node\: :ref:`StringName`, to_port\: :ref:`int`\ ) | @@ -336,6 +344,32 @@ Emitted at the end of a :ref:`GraphElement`'s movement. ---- +.. _class_GraphEdit_signal_frame_rect_changed: + +.. rst-class:: classref-signal + +**frame_rect_changed**\ (\ frame\: :ref:`GraphFrame`, new_rect\: :ref:`Vector2`\ ) + +Emitted when the :ref:`GraphFrame` ``frame`` is resized to ``new_rect``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphEdit_signal_graph_elements_linked_to_frame_request: + +.. rst-class:: classref-signal + +**graph_elements_linked_to_frame_request**\ (\ elements\: :ref:`Array`, frame\: :ref:`StringName`\ ) + +Emitted when one or more :ref:`GraphElement`\ s are dropped onto the :ref:`GraphFrame` named ``frame``, when they were not previously attached to any other one. + +\ ``elements`` is an array of :ref:`GraphElement`\ s to be attached. + +.. rst-class:: classref-item-separator + +---- + .. _class_GraphEdit_signal_node_deselected: .. rst-class:: classref-signal @@ -376,9 +410,9 @@ Emitted when this **GraphEdit** captures a ``ui_paste`` action (:kbd:`Ctrl + V` .. rst-class:: classref-signal -**popup_request**\ (\ position\: :ref:`Vector2`\ ) +**popup_request**\ (\ at_position\: :ref:`Vector2`\ ) -Emitted when a popup is requested. Happens on right-clicking in the GraphEdit. ``position`` is the position of the mouse pointer when the signal is sent. +Emitted when a popup is requested. Happens on right-clicking in the GraphEdit. ``at_position`` is the position of the mouse pointer when the signal is sent. .. rst-class:: classref-item-separator @@ -997,6 +1031,18 @@ Rearranges selected nodes in a layout with minimum crossings between connections ---- +.. _class_GraphEdit_method_attach_graph_element_to_frame: + +.. rst-class:: classref-method + +|void| **attach_graph_element_to_frame**\ (\ element\: :ref:`StringName`, frame\: :ref:`StringName`\ ) + +Attaches the ``element`` :ref:`GraphElement` to the ``frame`` :ref:`GraphFrame`. + +.. rst-class:: classref-item-separator + +---- + .. _class_GraphEdit_method_clear_connections: .. rst-class:: classref-method @@ -1021,6 +1067,18 @@ Create a connection between the ``from_port`` of the ``from_node`` :ref:`GraphNo ---- +.. _class_GraphEdit_method_detach_graph_element_from_frame: + +.. rst-class:: classref-method + +|void| **detach_graph_element_from_frame**\ (\ element\: :ref:`StringName`\ ) + +Detaches the ``element`` :ref:`GraphElement` from the :ref:`GraphFrame` it is currently attached to. + +.. rst-class:: classref-item-separator + +---- + .. _class_GraphEdit_method_disconnect_node: .. rst-class:: classref-method @@ -1049,6 +1107,18 @@ This is best used together with :ref:`connection_drag_started`\[:ref:`StringName`\] **get_attached_nodes_of_frame**\ (\ frame\: :ref:`StringName`\ ) + +Returns an array of node names that are attached to the :ref:`GraphFrame` with the given name. + +.. rst-class:: classref-item-separator + +---- + .. _class_GraphEdit_method_get_closest_connection_at_point: .. rst-class:: classref-method @@ -1110,6 +1180,18 @@ Returns an :ref:`Array` containing the list of connections that int ---- +.. _class_GraphEdit_method_get_element_frame: + +.. rst-class:: classref-method + +:ref:`GraphFrame` **get_element_frame**\ (\ element\: :ref:`StringName`\ ) + +Returns the :ref:`GraphFrame` that contains the :ref:`GraphElement` with the given name. + +.. rst-class:: classref-item-separator + +---- + .. _class_GraphEdit_method_get_menu_hbox: .. rst-class:: classref-method diff --git a/classes/class_graphelement.rst b/classes/class_graphelement.rst index 343daae09468..3e8f2690993a 100644 --- a/classes/class_graphelement.rst +++ b/classes/class_graphelement.rst @@ -14,7 +14,7 @@ GraphElement **Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`GraphNode` +**Inherited By:** :ref:`GraphFrame`, :ref:`GraphNode` A container that represents a basic element that can be placed inside a :ref:`GraphEdit` control. @@ -138,11 +138,23 @@ Emitted when displaying the GraphElement over other ones is requested. Happens o ---- +.. _class_GraphElement_signal_resize_end: + +.. rst-class:: classref-signal + +**resize_end**\ (\ new_size\: :ref:`Vector2`\ ) + +Emitted when releasing the mouse button after dragging the resizer handle (see :ref:`resizable`). + +.. rst-class:: classref-item-separator + +---- + .. _class_GraphElement_signal_resize_request: .. rst-class:: classref-signal -**resize_request**\ (\ new_minsize\: :ref:`Vector2`\ ) +**resize_request**\ (\ new_size\: :ref:`Vector2`\ ) Emitted when resizing the GraphElement is requested. Happens on dragging the resizer handle (see :ref:`resizable`). @@ -202,7 +214,7 @@ The offset of the GraphElement, relative to the scroll offset of the :ref:`Graph If ``true``, the user can resize the GraphElement. -\ **Note:** Dragging the handle will only emit the :ref:`resize_request` signal, the GraphElement needs to be resized manually. +\ **Note:** Dragging the handle will only emit the :ref:`resize_request` and :ref:`resize_end` signals, the GraphElement needs to be resized manually. .. rst-class:: classref-item-separator diff --git a/classes/class_graphframe.rst b/classes/class_graphframe.rst new file mode 100644 index 000000000000..97e28160b484 --- /dev/null +++ b/classes/class_graphframe.rst @@ -0,0 +1,299 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/GraphFrame.xml. + +.. _class_GraphFrame: + +GraphFrame +========== + +**Experimental:** This class may be changed or removed in future versions. + +**Inherits:** :ref:`GraphElement` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` + +GraphFrame is a special :ref:`GraphElement` that can be used to organize other :ref:`GraphElement`\ s inside a :ref:`GraphEdit`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +GraphFrame is a special :ref:`GraphElement` to which other :ref:`GraphElement`\ s can be attached. It can be configured to automatically resize to enclose all attached :ref:`GraphElement`\ s. If the frame is moved, all the attached :ref:`GraphElement`\ s inside it will be moved as well. + +A GraphFrame is always kept behind the connection layer and other :ref:`GraphElement`\ s inside a :ref:`GraphEdit`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +----------------------------------------------+-------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`bool` | :ref:`autoshrink_enabled` | ``true`` | + +----------------------------------------------+-------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`int` | :ref:`autoshrink_margin` | ``40`` | + +----------------------------------------------+-------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`int` | :ref:`drag_margin` | ``16`` | + +----------------------------------------------+-------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`MouseFilter` | mouse_filter | ``0`` (overrides :ref:`Control`) | + +----------------------------------------------+-------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`Color` | :ref:`tint_color` | ``Color(0.3, 0.3, 0.3, 0.75)`` | + +----------------------------------------------+-------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`bool` | :ref:`tint_color_enabled` | ``false`` | + +----------------------------------------------+-------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`String` | :ref:`title` | ``""`` | + +----------------------------------------------+-------------------------------------------------------------------------+-----------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`HBoxContainer` | :ref:`get_titlebar_hbox`\ (\ ) | + +-------------------------------------------+---------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group + +Theme Properties +---------------- + +.. table:: + :widths: auto + + +---------------------------------+--------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`resizer_color` | ``Color(0.875, 0.875, 0.875, 1)`` | + +---------------------------------+--------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`panel` | | + +---------------------------------+--------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`panel_selected` | | + +---------------------------------+--------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`titlebar` | | + +---------------------------------+--------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`titlebar_selected` | | + +---------------------------------+--------------------------------------------------------------------------+-----------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_GraphFrame_signal_autoshrink_changed: + +.. rst-class:: classref-signal + +**autoshrink_changed**\ (\ ) + +Emitted when :ref:`autoshrink_enabled` or :ref:`autoshrink_margin` changes. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_GraphFrame_property_autoshrink_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **autoshrink_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- |void| **set_autoshrink_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_autoshrink_enabled**\ (\ ) + +If ``true``, the frame's rect will be adjusted automatically to enclose all attached :ref:`GraphElement`\ s. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphFrame_property_autoshrink_margin: + +.. rst-class:: classref-property + +:ref:`int` **autoshrink_margin** = ``40`` + +.. rst-class:: classref-property-setget + +- |void| **set_autoshrink_margin**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_autoshrink_margin**\ (\ ) + +The margin around the attached nodes that is used to calculate the size of the frame when :ref:`autoshrink_enabled` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphFrame_property_drag_margin: + +.. rst-class:: classref-property + +:ref:`int` **drag_margin** = ``16`` + +.. rst-class:: classref-property-setget + +- |void| **set_drag_margin**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_drag_margin**\ (\ ) + +The margin inside the frame that can be used to drag the frame. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphFrame_property_tint_color: + +.. rst-class:: classref-property + +:ref:`Color` **tint_color** = ``Color(0.3, 0.3, 0.3, 0.75)`` + +.. rst-class:: classref-property-setget + +- |void| **set_tint_color**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_tint_color**\ (\ ) + +The color of the frame when :ref:`tint_color_enabled` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphFrame_property_tint_color_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **tint_color_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- |void| **set_tint_color_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_tint_color_enabled**\ (\ ) + +If ``true``, the tint color will be used to tint the frame. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphFrame_property_title: + +.. rst-class:: classref-property + +:ref:`String` **title** = ``""`` + +.. rst-class:: classref-property-setget + +- |void| **set_title**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_title**\ (\ ) + +Title of the frame. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_GraphFrame_method_get_titlebar_hbox: + +.. rst-class:: classref-method + +:ref:`HBoxContainer` **get_titlebar_hbox**\ (\ ) + +Returns the :ref:`HBoxContainer` used for the title bar, only containing a :ref:`Label` for displaying the title by default. + +This can be used to add custom controls to the title bar such as option or close buttons. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Theme Property Descriptions +--------------------------- + +.. _class_GraphFrame_theme_color_resizer_color: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **resizer_color** = ``Color(0.875, 0.875, 0.875, 1)`` + +The color modulation applied to the resizer icon. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphFrame_theme_style_panel: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **panel** + +The default :ref:`StyleBox` used for the background of the **GraphFrame**. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphFrame_theme_style_panel_selected: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **panel_selected** + +The :ref:`StyleBox` used for the background of the **GraphFrame** when it is selected. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphFrame_theme_style_titlebar: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **titlebar** + +The :ref:`StyleBox` used for the title bar of the **GraphFrame**. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphFrame_theme_style_titlebar_selected: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **titlebar_selected** + +The :ref:`StyleBox` used for the title bar of the **GraphFrame** when it is selected. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gridcontainer.rst b/classes/class_gridcontainer.rst index 4aca26777751..7cec6808eab8 100644 --- a/classes/class_gridcontainer.rst +++ b/classes/class_gridcontainer.rst @@ -30,7 +30,7 @@ Tutorials - :doc:`Using Containers <../tutorials/ui/gui_containers>` -- `OS Test Demo `__ +- `Operating System Testing Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_gridmap.rst b/classes/class_gridmap.rst index fae6948cc8c4..c473116b9dc0 100644 --- a/classes/class_gridmap.rst +++ b/classes/class_gridmap.rst @@ -39,9 +39,9 @@ Tutorials - :doc:`Using gridmaps <../tutorials/3d/using_gridmaps>` -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ -- `3D Kinematic Character Demo `__ +- `3D Kinematic Character Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_hashingcontext.rst b/classes/class_hashingcontext.rst index e6ccd0ba9481..4068e6701927 100644 --- a/classes/class_hashingcontext.rst +++ b/classes/class_hashingcontext.rst @@ -34,7 +34,7 @@ The :ref:`HashType` enum shows the supported hashi # Check that file exists. if not FileAccess.file_exists(path): return - # Start a SHA-256 context. + # Start an SHA-256 context. var ctx = HashingContext.new() ctx.start(HashingContext.HASH_SHA256) # Open the file to hash. @@ -58,7 +58,7 @@ The :ref:`HashType` enum shows the supported hashi { return; } - // Start a SHA-256 context. + // Start an SHA-256 context. var ctx = new HashingContext(); ctx.Start(HashingContext.HashType.Sha256); // Open the file to hash. @@ -158,7 +158,7 @@ Closes the current context, and return the computed hash. :ref:`Error` **start**\ (\ type\: :ref:`HashType`\ ) -Starts a new hash computation of the given ``type`` (e.g. :ref:`HASH_SHA256` to start computation of a SHA-256). +Starts a new hash computation of the given ``type`` (e.g. :ref:`HASH_SHA256` to start computation of an SHA-256). .. rst-class:: classref-item-separator diff --git a/classes/class_heightmapshape3d.rst b/classes/class_heightmapshape3d.rst index a6509380429d..fba539c0f5f4 100644 --- a/classes/class_heightmapshape3d.rst +++ b/classes/class_heightmapshape3d.rst @@ -23,6 +23,24 @@ A 3D heightmap shape, intended for use in physics. Usually used to provide a sha \ **Performance:** **HeightMapShape3D** is faster to check collisions against than :ref:`ConcavePolygonShape3D`, but it is significantly slower than primitive shapes like :ref:`BoxShape3D`. +A heightmap collision shape can also be build by using an :ref:`Image` reference: + + +.. tabs:: + + .. code-tab:: gdscript + + var heightmap_texture: Texture = ResourceLoader.load("res://heightmap_image.exr") + var heightmap_image: Image = heightmap_texture.get_image() + heightmap_image.convert(Image.FORMAT_RF) + + var height_min: float = 0.0 + var height_max: float = 10.0 + + update_map_data_from_image(heightmap_image, height_min, height_max) + + + .. rst-class:: classref-reftable-group Properties @@ -47,11 +65,13 @@ Methods .. table:: :widths: auto - +---------------------------+-----------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_max_height`\ (\ ) |const| | - +---------------------------+-----------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_min_height`\ (\ ) |const| | - +---------------------------+-----------------------------------------------------------------------------------+ + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_max_height`\ (\ ) |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_min_height`\ (\ ) |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_map_data_from_image`\ (\ image\: :ref:`Image`, height_min\: :ref:`float`, height_max\: :ref:`float`\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -75,6 +95,8 @@ Property Descriptions Height map data. The array's size must be equal to :ref:`map_width` multiplied by :ref:`map_depth`. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedFloat32Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -138,6 +160,22 @@ Returns the largest height value found in :ref:`map_data`. Recalculates only when :ref:`map_data` changes. +.. rst-class:: classref-item-separator + +---- + +.. _class_HeightMapShape3D_method_update_map_data_from_image: + +.. rst-class:: classref-method + +|void| **update_map_data_from_image**\ (\ image\: :ref:`Image`, height_min\: :ref:`float`, height_max\: :ref:`float`\ ) + +Updates :ref:`map_data` with data read from an :ref:`Image` reference. Automatically resizes heightmap :ref:`map_width` and :ref:`map_depth` to fit the full image width and height. + +The image needs to be in either :ref:`Image.FORMAT_RF` (32 bit), :ref:`Image.FORMAT_RH` (16 bit), or :ref:`Image.FORMAT_R8` (8 bit). + +Each image pixel is read in as a float on the range from ``0.0`` (black pixel) to ``1.0`` (white pixel). This range value gets remapped to ``height_min`` and ``height_max`` to form the final height value. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_httpclient.rst b/classes/class_httpclient.rst index 5c22f7d6a308..45189d38c6b4 100644 --- a/classes/class_httpclient.rst +++ b/classes/class_httpclient.rst @@ -1085,9 +1085,9 @@ To create a POST request with query strings to push to the server, do: .. code-tab:: csharp var fields = new Godot.Collections.Dictionary { { "username", "user" }, { "password", "pass" } }; - string queryString = new HTTPClient().QueryStringFromDict(fields); + string queryString = new HttpClient().QueryStringFromDict(fields); string[] headers = { "Content-Type: application/x-www-form-urlencoded", $"Content-Length: {queryString.Length}" }; - var result = new HTTPClient().Request(HTTPClient.Method.Post, "index.php", headers, queryString); + var result = new HttpClient().Request(HttpClient.Method.Post, "index.php", headers, queryString); diff --git a/classes/class_httprequest.rst b/classes/class_httprequest.rst index f0ba12c2e65f..5d64db6e7c89 100644 --- a/classes/class_httprequest.rst +++ b/classes/class_httprequest.rst @@ -67,7 +67,7 @@ Can be used to make HTTP requests, i.e. download or upload files or web content public override void _Ready() { // Create an HTTP request node and connect its completion signal. - var httpRequest = new HTTPRequest(); + var httpRequest = new HttpRequest(); AddChild(httpRequest); httpRequest.RequestCompleted += HttpRequestCompleted; @@ -85,7 +85,7 @@ Can be used to make HTTP requests, i.e. download or upload files or web content { { "name", "Godette" } }); - error = httpRequest.Request("https://httpbin.org/post", null, HTTPClient.Method.Post, body); + error = httpRequest.Request("https://httpbin.org/post", null, HttpClient.Method.Post, body); if (error != Error.Ok) { GD.PushError("An error occurred in the HTTP request."); @@ -145,7 +145,7 @@ Can be used to make HTTP requests, i.e. download or upload files or web content public override void _Ready() { // Create an HTTP request node and connect its completion signal. - var httpRequest = new HTTPRequest(); + var httpRequest = new HttpRequest(); AddChild(httpRequest); httpRequest.RequestCompleted += HttpRequestCompleted; @@ -160,7 +160,7 @@ Can be used to make HTTP requests, i.e. download or upload files or web content // Called when the HTTP request is completed. private void HttpRequestCompleted(long result, long responseCode, string[] headers, byte[] body) { - if (result != (long)HTTPRequest.Result.Success) + if (result != (long)HttpRequest.Result.Success) { GD.PushError("Image couldn't be downloaded. Try a different image."); } diff --git a/classes/class_image.rst b/classes/class_image.rst index e2264e492801..979901a50ff1 100644 --- a/classes/class_image.rst +++ b/classes/class_image.rst @@ -1458,7 +1458,7 @@ Loads an image from the UTF-8 binary contents of an **uncompressed** SVG file (* :ref:`Error` **load_svg_from_string**\ (\ svg_str\: :ref:`String`, scale\: :ref:`float` = 1.0\ ) -Loads an image from the string contents of a SVG file (**.svg**). +Loads an image from the string contents of an SVG file (**.svg**). \ **Note:** This method is only available in engine builds with the SVG module enabled. By default, the SVG module is enabled, but it can be disabled at build-time using the ``module_svg_enabled=no`` SCons option. diff --git a/classes/class_importermesh.rst b/classes/class_importermesh.rst index 71d118d8518b..e31833ba6af4 100644 --- a/classes/class_importermesh.rst +++ b/classes/class_importermesh.rst @@ -145,7 +145,7 @@ The ``arrays`` argument is an array of arrays. Each of the :ref:`Mesh.ARRAY_MAX< The ``blend_shapes`` argument is an array of vertex data for each blend shape. Each element is an array of the same structure as ``arrays``, but :ref:`Mesh.ARRAY_VERTEX`, :ref:`Mesh.ARRAY_NORMAL`, and :ref:`Mesh.ARRAY_TANGENT` are set if and only if they are set in ``arrays`` and all other entries are ``null``. -The ``lods`` argument is a dictionary with :ref:`float` keys and :ref:`PackedInt32Array` values. Each entry in the dictionary represents a LOD level of the surface, where the value is the :ref:`Mesh.ARRAY_INDEX` array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of a LOD also increases the distance that the objects has to be from the camera before the LOD is used. +The ``lods`` argument is a dictionary with :ref:`float` keys and :ref:`PackedInt32Array` values. Each entry in the dictionary represents an LOD level of the surface, where the value is the :ref:`Mesh.ARRAY_INDEX` array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of an LOD also increases the distance that the objects has to be from the camera before the LOD is used. The ``flags`` argument is the bitwise or of, as required: One value of :ref:`ArrayCustomFormat` left shifted by ``ARRAY_FORMAT_CUSTOMn_SHIFT`` for each custom channel in use, :ref:`Mesh.ARRAY_FLAG_USE_DYNAMIC_UPDATE`, :ref:`Mesh.ARRAY_FLAG_USE_8_BONE_WEIGHTS`, or :ref:`Mesh.ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY`. diff --git a/classes/class_input.rst b/classes/class_input.rst index d53d421fd8aa..0a498924422d 100644 --- a/classes/class_input.rst +++ b/classes/class_input.rst @@ -30,9 +30,9 @@ Tutorials - :doc:`Inputs documentation index <../tutorials/inputs/index>` -- `2D Dodge The Creeps Demo `__ +- `2D Dodge The Creeps Demo `__ -- `3D Voxel Demo `__ +- `3D Voxel Demo `__ .. rst-class:: classref-reftable-group @@ -644,7 +644,7 @@ Returns the current value of the joypad axis at given index (see :ref:`JoyAxis` **get_joy_guid**\ (\ device\: :ref:`int`\ ) |const| -Returns a SDL2-compatible device GUID on platforms that use gamepad remapping, e.g. ``030000004c050000c405000000010000``. Returns ``"Default Gamepad"`` otherwise. Godot uses the `SDL2 game controller database `__ to determine gamepad names and mappings based on this GUID. +Returns an SDL2-compatible device GUID on platforms that use gamepad remapping, e.g. ``030000004c050000c405000000010000``. Returns ``"Default Gamepad"`` otherwise. Godot uses the `SDL2 game controller database `__ to determine gamepad names and mappings based on this GUID. .. rst-class:: classref-item-separator diff --git a/classes/class_inputevent.rst b/classes/class_inputevent.rst index a67a1b95e355..6e9dfacaea2a 100644 --- a/classes/class_inputevent.rst +++ b/classes/class_inputevent.rst @@ -32,9 +32,9 @@ Tutorials - :doc:`Viewport and canvas transforms <../tutorials/2d/2d_transforms>` -- `2D Dodge The Creeps Demo `__ +- `2D Dodge The Creeps Demo `__ -- `3D Voxel Demo `__ +- `3D Voxel Demo `__ .. rst-class:: classref-reftable-group @@ -90,6 +90,23 @@ Methods .. rst-class:: classref-descriptions-group +Constants +--------- + +.. _class_InputEvent_constant_DEVICE_ID_EMULATION: + +.. rst-class:: classref-constant + +**DEVICE_ID_EMULATION** = ``-1`` + +Device ID used for emulated mouse input from a touchscreen, or for emulated touch input from a mouse. This can be used to distinguish emulated mouse input from physical mouse input, or emulated touch input from physical touch input. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- @@ -106,7 +123,7 @@ Property Descriptions The event's device ID. -\ **Note:** This device ID will always be ``-1`` for emulated mouse input from a touchscreen. This can be used to distinguish emulated mouse input from physical mouse input. +\ **Note:** :ref:`device` can be negative for special use cases that don't refer to devices physically present on the system. See :ref:`DEVICE_ID_EMULATION`. .. rst-class:: classref-section-separator diff --git a/classes/class_inputeventaction.rst b/classes/class_inputeventaction.rst index a9005655fe57..d87748430aff 100644 --- a/classes/class_inputeventaction.rst +++ b/classes/class_inputeventaction.rst @@ -30,9 +30,9 @@ Tutorials - `Using InputEvent: Actions <../tutorials/inputs/inputevent.html#actions>`__ -- `2D Dodge The Creeps Demo `__ +- `2D Dodge The Creeps Demo `__ -- `3D Voxel Demo `__ +- `3D Voxel Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_inputeventkey.rst b/classes/class_inputeventkey.rst index abb534036144..feeeb1c03f1f 100644 --- a/classes/class_inputeventkey.rst +++ b/classes/class_inputeventkey.rst @@ -123,7 +123,7 @@ For keyboard layouts with a single label on the key, it is equivalent to :ref:`k To get a human-readable representation of the **InputEventKey**, use ``OS.get_keycode_string(event.key_label)`` where ``event`` is the **InputEventKey**. -:: +.. code:: text +-----+ +-----+ | Q | | Q | - "Q" - keycode @@ -149,7 +149,7 @@ Latin label printed on the key in the current keyboard layout, which corresponds To get a human-readable representation of the **InputEventKey**, use ``OS.get_keycode_string(event.keycode)`` where ``event`` is the **InputEventKey**. -:: +.. code:: text +-----+ +-----+ | Q | | Q | - "Q" - keycode diff --git a/classes/class_inputeventmidi.rst b/classes/class_inputeventmidi.rst index 7c94617dbd78..b3099caca34b 100644 --- a/classes/class_inputeventmidi.rst +++ b/classes/class_inputeventmidi.rst @@ -59,13 +59,13 @@ By default, Godot does not detect MIDI devices. You need to call :ref:`OS.open_m public override void _Input(InputEvent inputEvent) { - if (inputEvent is InputEventMIDI midiEvent) + if (inputEvent is InputEventMidi midiEvent) { PrintMIDIInfo(midiEvent); } } - private void PrintMIDIInfo(InputEventMIDI midiEvent) + private void PrintMIDIInfo(InputEventMidi midiEvent) { GD.Print(midiEvent); GD.Print($"Channel {midiEvent.Channel}"); diff --git a/classes/class_inputeventmousemotion.rst b/classes/class_inputeventmousemotion.rst index 5cb1f6223983..c50e81a72f2b 100644 --- a/classes/class_inputeventmousemotion.rst +++ b/classes/class_inputeventmousemotion.rst @@ -32,7 +32,7 @@ Tutorials - :doc:`Mouse and input coordinates <../tutorials/inputs/mouse_and_input_coordinates>` -- `3D Voxel Demo `__ +- `3D Voxel Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_inputeventscreendrag.rst b/classes/class_inputeventscreendrag.rst index 15390c5fa524..8151ce81b2f4 100644 --- a/classes/class_inputeventscreendrag.rst +++ b/classes/class_inputeventscreendrag.rst @@ -110,7 +110,7 @@ Returns ``true`` when using the eraser end of a stylus pen. - |void| **set_position**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_position**\ (\ ) -The drag position. +The drag position in the viewport the node is in, using the coordinate system of this viewport. .. rst-class:: classref-item-separator diff --git a/classes/class_inputeventscreentouch.rst b/classes/class_inputeventscreentouch.rst index e3459a9ab01e..ec44a0c5c4bf 100644 --- a/classes/class_inputeventscreentouch.rst +++ b/classes/class_inputeventscreentouch.rst @@ -119,7 +119,7 @@ The touch index in the case of a multi-touch event. One index = one finger. - |void| **set_position**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_position**\ (\ ) -The touch position, in screen (global) coordinates. +The touch position in the viewport the node is in, using the coordinate system of this viewport. .. rst-class:: classref-item-separator diff --git a/classes/class_javaclass.rst b/classes/class_javaclass.rst index 191fc448c1b6..ec46c89bd14f 100644 --- a/classes/class_javaclass.rst +++ b/classes/class_javaclass.rst @@ -12,9 +12,18 @@ JavaClass **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Represents an object from the Java Native Interface. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +Represents an object from the Java Native Interface. It is returned from :ref:`JavaClassWrapper.wrap`. + +\ **Note:** This class only works on Android. For any other build, this class does nothing. + +\ **Note:** This class is not to be confused with :ref:`JavaScriptObject`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_javaclasswrapper.rst b/classes/class_javaclasswrapper.rst index cb0f9c652a02..05c371a0f662 100644 --- a/classes/class_javaclasswrapper.rst +++ b/classes/class_javaclasswrapper.rst @@ -12,9 +12,16 @@ JavaClassWrapper **Inherits:** :ref:`Object` -.. container:: contribute +Provides access to the Java Native Interface. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +The JavaClassWrapper singleton provides a way for the Godot application to send and receive data through the `Java Native Interface `__ (JNI). + +\ **Note:** This singleton is only available in Android builds. .. rst-class:: classref-reftable-group @@ -43,9 +50,9 @@ Method Descriptions :ref:`JavaClass` **wrap**\ (\ name\: :ref:`String`\ ) -.. container:: contribute +Wraps a class defined in Java, and returns it as a :ref:`JavaClass` :ref:`Object` type that Godot can interact with. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** This method only works on Android. On every other platform, this method does nothing and returns an empty :ref:`JavaClass`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_joint3d.rst b/classes/class_joint3d.rst index b0da458031b8..54b1bbc6d53b 100644 --- a/classes/class_joint3d.rst +++ b/classes/class_joint3d.rst @@ -28,7 +28,7 @@ Abstract base class for all joints in 3D physics. 3D joints bind together two ph Tutorials --------- -- `3D Truck Town Demo `__ +- `3D Truck Town Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_jsonrpc.rst b/classes/class_jsonrpc.rst index a3f418adaa16..9859db027124 100644 --- a/classes/class_jsonrpc.rst +++ b/classes/class_jsonrpc.rst @@ -66,11 +66,7 @@ enum **ErrorCode**: :ref:`ErrorCode` **PARSE_ERROR** = ``-32700`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +The request could not be parsed as it was not valid by JSON standard (:ref:`JSON.parse` failed). .. _class_JSONRPC_constant_INVALID_REQUEST: @@ -78,11 +74,7 @@ enum **ErrorCode**: :ref:`ErrorCode` **INVALID_REQUEST** = ``-32600`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +A method call was requested but the request's format is not valid. .. _class_JSONRPC_constant_METHOD_NOT_FOUND: @@ -98,11 +90,7 @@ A method call was requested but no function of that name existed in the JSONRPC :ref:`ErrorCode` **INVALID_PARAMS** = ``-32602`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +A method call was requested but the given method parameters are not valid. Not used by the built-in JSONRPC. .. _class_JSONRPC_constant_INTERNAL_ERROR: @@ -110,11 +98,7 @@ A method call was requested but no function of that name existed in the JSONRPC :ref:`ErrorCode` **INTERNAL_ERROR** = ``-32603`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +An internal error occurred while processing the request. Not used by the built-in JSONRPC. .. rst-class:: classref-section-separator diff --git a/classes/class_label.rst b/classes/class_label.rst index e4b5405b5917..6435cb43a094 100644 --- a/classes/class_label.rst +++ b/classes/class_label.rst @@ -29,7 +29,7 @@ A control for displaying plain text. It gives you control over the horizontal an Tutorials --------- -- `2D Dodge The Creeps Demo `__ +- `2D Dodge The Creeps Demo `__ .. rst-class:: classref-reftable-group @@ -346,6 +346,8 @@ Set additional options for BiDi override. Aligns text to the given tab-stops. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedFloat32Array` for more details. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_light3d.rst b/classes/class_light3d.rst index 56158e345f57..fda2638d2ae8 100644 --- a/classes/class_light3d.rst +++ b/classes/class_light3d.rst @@ -32,7 +32,7 @@ Tutorials - :doc:`Faking global illumination <../tutorials/3d/global_illumination/faking_global_illumination>` -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_line2d.rst b/classes/class_line2d.rst index 8fadb129817e..ebdfae3c337b 100644 --- a/classes/class_line2d.rst +++ b/classes/class_line2d.rst @@ -30,9 +30,9 @@ This node draws a 2D polyline, i.e. a shape consisting of several points connect Tutorials --------- -- `Matrix Transform Demo `__ +- `Matrix Transform Demo `__ -- `2.5D Demo `__ +- `2.5D Game Demo `__ .. rst-class:: classref-reftable-group @@ -348,6 +348,8 @@ The style of the connections between segments of the polyline. Use :ref:`LineJoi The points of the polyline, interpreted in local 2D coordinates. Segments are drawn between the adjacent points in this array. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_material.rst b/classes/class_material.rst index 9416e1ad5f63..cb16e96a8237 100644 --- a/classes/class_material.rst +++ b/classes/class_material.rst @@ -30,9 +30,9 @@ Importantly, you can inherit from **Material** to create your own custom materia Tutorials --------- -- `3D Material Testers Demo `__ +- `3D Material Testers Demo `__ -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_mesh.rst b/classes/class_mesh.rst index 82520076dc46..da40b52103ed 100644 --- a/classes/class_mesh.rst +++ b/classes/class_mesh.rst @@ -28,13 +28,13 @@ Mesh is a type of :ref:`Resource` that contains vertex array-bas Tutorials --------- -- `3D Material Testers Demo `__ +- `3D Material Testers Demo `__ -- `3D Kinematic Character Demo `__ +- `3D Kinematic Character Demo `__ -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_meshinstance3d.rst b/classes/class_meshinstance3d.rst index 1cd6607f4ed8..20524788f699 100644 --- a/classes/class_meshinstance3d.rst +++ b/classes/class_meshinstance3d.rst @@ -28,13 +28,13 @@ MeshInstance3D is a node that takes a :ref:`Mesh` resource and adds Tutorials --------- -- `3D Material Testers Demo `__ +- `3D Material Testers Demo `__ -- `3D Kinematic Character Demo `__ +- `3D Kinematic Character Demo `__ -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group @@ -60,31 +60,33 @@ Methods .. table:: :widths: auto - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`create_convex_collision`\ (\ clean\: :ref:`bool` = true, simplify\: :ref:`bool` = false\ ) | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`create_debug_tangents`\ (\ ) | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`create_multiple_convex_collisions`\ (\ settings\: :ref:`MeshConvexDecompositionSettings` = null\ ) | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`create_trimesh_collision`\ (\ ) | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`find_blend_shape_by_name`\ (\ name\: :ref:`StringName`\ ) | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Material` | :ref:`get_active_material`\ (\ surface\: :ref:`int`\ ) |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_blend_shape_count`\ (\ ) |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_blend_shape_value`\ (\ blend_shape_idx\: :ref:`int`\ ) |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Material` | :ref:`get_surface_override_material`\ (\ surface\: :ref:`int`\ ) |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_surface_override_material_count`\ (\ ) |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_blend_shape_value`\ (\ blend_shape_idx\: :ref:`int`, value\: :ref:`float`\ ) | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_surface_override_material`\ (\ surface\: :ref:`int`, material\: :ref:`Material`\ ) | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_convex_collision`\ (\ clean\: :ref:`bool` = true, simplify\: :ref:`bool` = false\ ) | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_debug_tangents`\ (\ ) | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_multiple_convex_collisions`\ (\ settings\: :ref:`MeshConvexDecompositionSettings` = null\ ) | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_trimesh_collision`\ (\ ) | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find_blend_shape_by_name`\ (\ name\: :ref:`StringName`\ ) | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Material` | :ref:`get_active_material`\ (\ surface\: :ref:`int`\ ) |const| | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_blend_shape_count`\ (\ ) |const| | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_blend_shape_value`\ (\ blend_shape_idx\: :ref:`int`\ ) |const| | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SkinReference` | :ref:`get_skin_reference`\ (\ ) |const| | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Material` | :ref:`get_surface_override_material`\ (\ surface\: :ref:`int`\ ) |const| | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_surface_override_material_count`\ (\ ) |const| | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_blend_shape_value`\ (\ blend_shape_idx\: :ref:`int`, value\: :ref:`float`\ ) | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_surface_override_material`\ (\ surface\: :ref:`int`, material\: :ref:`Material`\ ) | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -253,6 +255,18 @@ Returns the value of the blend shape at the given ``blend_shape_idx``. Returns ` ---- +.. _class_MeshInstance3D_method_get_skin_reference: + +.. rst-class:: classref-method + +:ref:`SkinReference` **get_skin_reference**\ (\ ) |const| + +Returns the internal :ref:`SkinReference` containing the skeleton's :ref:`RID` attached to this RID. See also :ref:`Resource.get_rid`, :ref:`SkinReference.get_skeleton`, and :ref:`RenderingServer.instance_attach_skeleton`. + +.. rst-class:: classref-item-separator + +---- + .. _class_MeshInstance3D_method_get_surface_override_material: .. rst-class:: classref-method diff --git a/classes/class_meshlibrary.rst b/classes/class_meshlibrary.rst index b834c82dc8c2..e494b31f58f2 100644 --- a/classes/class_meshlibrary.rst +++ b/classes/class_meshlibrary.rst @@ -26,9 +26,9 @@ A library of meshes. Contains a list of :ref:`Mesh` resources, each Tutorials --------- -- `3D Kinematic Character Demo `__ +- `3D Kinematic Character Demo `__ -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_multimesh.rst b/classes/class_multimesh.rst index 9360bd9d8204..473860e10e6a 100644 --- a/classes/class_multimesh.rst +++ b/classes/class_multimesh.rst @@ -176,6 +176,8 @@ Property Descriptions Array containing each :ref:`Color` used by all instances of this mesh. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedColorArray` for more details. + .. rst-class:: classref-item-separator ---- @@ -207,6 +209,8 @@ Custom AABB for this MultiMesh resource. Setting this manually prevents costly r Array containing each custom data value used by all instances of this mesh, as a :ref:`PackedColorArray`. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedColorArray` for more details. + .. rst-class:: classref-item-separator ---- @@ -259,6 +263,8 @@ The looks of the individual instances can be modified using :ref:`set_instance_c Array containing each :ref:`Transform2D` value used by all instances of this mesh, as a :ref:`PackedVector2Array`. Each transform is divided into 3 :ref:`Vector2` values corresponding to the transforms' ``x``, ``y``, and ``origin``. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -273,6 +279,8 @@ Array containing each :ref:`Transform2D` value used by all in Array containing each :ref:`Transform3D` value used by all instances of this mesh, as a :ref:`PackedVector3Array`. Each transform is divided into 4 :ref:`Vector3` values corresponding to the transforms' ``x``, ``y``, ``z``, and ``origin``. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector3Array` for more details. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_multiplayerapi.rst b/classes/class_multiplayerapi.rst index 82bc401240f6..e0ce1b051f77 100644 --- a/classes/class_multiplayerapi.rst +++ b/classes/class_multiplayerapi.rst @@ -257,7 +257,7 @@ Returns the peer IDs of all connected peers of this MultiplayerAPI's :ref:`multi Returns the sender's peer ID for the RPC currently being executed. -\ **Note:** If not inside an RPC this method will return 0. +\ **Note:** This method returns ``0`` when called outside of an RPC. As such, the original peer ID may be lost when code execution is delayed (such as with GDScript's ``await`` keyword). .. rst-class:: classref-item-separator diff --git a/classes/class_multiplayerpeer.rst b/classes/class_multiplayerpeer.rst index a15e400ee32c..9da8b33e11a7 100644 --- a/classes/class_multiplayerpeer.rst +++ b/classes/class_multiplayerpeer.rst @@ -37,8 +37,6 @@ Tutorials - :doc:`High-level multiplayer <../tutorials/networking/high_level_multiplayer>` -- `WebRTC Signaling Demo `__ - .. rst-class:: classref-reftable-group Properties diff --git a/classes/class_nativemenu.rst b/classes/class_nativemenu.rst index 86b13069cc1c..e2f0a7f95e63 100644 --- a/classes/class_nativemenu.rst +++ b/classes/class_nativemenu.rst @@ -21,6 +21,38 @@ Description **NativeMenu** handles low-level access to the OS native global menu bar and popup menus. +\ **Note:** This is low-level API, consider using :ref:`MenuBar` with :ref:`MenuBar.prefer_global_menu` set to ``true``, and :ref:`PopupMenu` with :ref:`PopupMenu.prefer_native_menu` set to ``true``. + +To create a menu, use :ref:`create_menu`, add menu items using ``add_*_item`` methods. To remove a menu, use :ref:`free_menu`. + +:: + + var menu + + func _menu_callback(item_id): + if item_id == "ITEM_CUT": + cut() + elif item_id == "ITEM_COPY": + copy() + elif item_id == "ITEM_PASTE": + paste() + + func _enter_tree(): + # Create new menu and add items: + menu = NativeMenu.create_menu() + NativeMenu.add_item(menu, "Cut", _menu_callback, Callable(), "ITEM_CUT") + NativeMenu.add_item(menu, "Copy", _menu_callback, Callable(), "ITEM_COPY") + NativeMenu.add_separator(menu) + NativeMenu.add_item(menu, "Paste", _menu_callback, Callable(), "ITEM_PASTE") + + func _on_button_pressed(): + # Show popup menu at mouse position: + NativeMenu.popup(menu, DisplayServer.mouse_get_position()) + + func _exit_tree(): + # Remove menu when it's no longer needed: + NativeMenu.free_menu(menu) + .. rst-class:: classref-reftable-group Methods @@ -52,6 +84,8 @@ Methods +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`create_menu`\ (\ ) | +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find_item_index_with_submenu`\ (\ rid\: :ref:`RID`, submenu_rid\: :ref:`RID`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`find_item_index_with_tag`\ (\ rid\: :ref:`RID`, tag\: :ref:`Variant`\ ) |const| | +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`find_item_index_with_text`\ (\ rid\: :ref:`RID`, text\: :ref:`String`\ ) |const| | @@ -116,6 +150,8 @@ Methods +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`remove_item`\ (\ rid\: :ref:`RID`, idx\: :ref:`int`\ ) | +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_interface_direction`\ (\ rid\: :ref:`RID`, is_rtl\: :ref:`bool`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_item_accelerator`\ (\ rid\: :ref:`RID`, idx\: :ref:`int`, keycode\: :ref:`Key`\ ) | +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_item_callback`\ (\ rid\: :ref:`RID`, idx\: :ref:`int`, callback\: :ref:`Callable`\ ) | @@ -188,6 +224,30 @@ enum **Feature**: **NativeMenu** supports native popup menus. +.. _class_NativeMenu_constant_FEATURE_OPEN_CLOSE_CALLBACK: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_OPEN_CLOSE_CALLBACK** = ``2`` + +**NativeMenu** supports menu open and close callbacks. + +.. _class_NativeMenu_constant_FEATURE_HOVER_CALLBACK: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_HOVER_CALLBACK** = ``3`` + +**NativeMenu** supports menu item hover callback. + +.. _class_NativeMenu_constant_FEATURE_KEY_CALLBACK: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_KEY_CALLBACK** = ``4`` + +**NativeMenu** supports menu item accelerator/key callback. + .. rst-class:: classref-item-separator ---- @@ -269,7 +329,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that \ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. + +\ **Note:** On Windows, ``accelerator`` and ``key_callback`` are ignored. .. rst-class:: classref-item-separator @@ -289,7 +351,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that \ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. + +\ **Note:** On Windows, ``accelerator`` and ``key_callback`` are ignored. .. rst-class:: classref-item-separator @@ -309,7 +373,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that \ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. + +\ **Note:** On Windows, ``accelerator`` and ``key_callback`` are ignored. .. rst-class:: classref-item-separator @@ -331,7 +397,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that \ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. + +\ **Note:** On Windows, ``accelerator`` and ``key_callback`` are ignored. .. rst-class:: classref-item-separator @@ -351,7 +419,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that \ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. + +\ **Note:** On Windows, ``accelerator`` and ``key_callback`` are ignored. .. rst-class:: classref-item-separator @@ -375,7 +445,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that \ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. + +\ **Note:** On Windows, ``accelerator`` and ``key_callback`` are ignored. .. rst-class:: classref-item-separator @@ -397,7 +469,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that \ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. + +\ **Note:** On Windows, ``accelerator`` and ``key_callback`` are ignored. .. rst-class:: classref-item-separator @@ -413,7 +487,7 @@ Adds a separator between items to the global menu ``rid``. Separators also occup Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -429,7 +503,7 @@ Adds an item that will act as a submenu of the global menu ``rid``. The ``submen Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -443,7 +517,7 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde Removes all items from the global menu ``rid``. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -457,7 +531,21 @@ Removes all items from the global menu ``rid``. Creates a new global menu object. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_find_item_index_with_submenu: + +.. rst-class:: classref-method + +:ref:`int` **find_item_index_with_submenu**\ (\ rid\: :ref:`RID`, submenu_rid\: :ref:`RID`\ ) |const| + +Returns the index of the item with the submenu specified by ``submenu_rid``. Indices are automatically assigned to each item by the engine, and cannot be set manually. + +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -469,9 +557,9 @@ Creates a new global menu object. :ref:`int` **find_item_index_with_tag**\ (\ rid\: :ref:`RID`, tag\: :ref:`Variant`\ ) |const| -Returns the index of the item with the specified ``tag``. Index is automatically assigned to each item by the engine. Index can not be set manually. +Returns the index of the item with the specified ``tag``. Indices are automatically assigned to each item by the engine, and cannot be set manually. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -483,9 +571,9 @@ Returns the index of the item with the specified ``tag``. Index is automatically :ref:`int` **find_item_index_with_text**\ (\ rid\: :ref:`RID`, text\: :ref:`String`\ ) |const| -Returns the index of the item with the specified ``text``. Index is automatically assigned to each item by the engine. Index can not be set manually. +Returns the index of the item with the specified ``text``. Indices are automatically assigned to each item by the engine, and cannot be set manually. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -499,7 +587,7 @@ Returns the index of the item with the specified ``text``. Index is automaticall Frees a global menu object created by this **NativeMenu**. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -527,7 +615,7 @@ Returns the accelerator of the item at index ``idx``. Accelerators are special c Returns the callback of the item at index ``idx``. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -541,7 +629,7 @@ Returns the callback of the item at index ``idx``. Returns number of items in the global menu ``rid``. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -555,7 +643,7 @@ Returns number of items in the global menu ``rid``. Returns the icon of the item at index ``idx``. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -597,7 +685,7 @@ Returns the callback of the item accelerator at index ``idx``. Returns number of states of a multistate item. See :ref:`add_multistate_item` for details. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -611,7 +699,7 @@ Returns number of states of a multistate item. See :ref:`add_multistate_item` for details. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -625,7 +713,7 @@ Returns the state of a multistate item. See :ref:`add_multistate_item` for more info on how to add a submenu. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -639,7 +727,7 @@ Returns the submenu ID of the item at index ``idx``. See :ref:`add_submenu_item< Returns the metadata of the specified item, which might be of any type. You can set it with :ref:`set_item_tag`, which provides a simple way of assigning context data to items. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -653,7 +741,7 @@ Returns the metadata of the specified item, which might be of any type. You can Returns the text of the item at index ``idx``. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -723,7 +811,7 @@ b]Note:** This method is implemented only on macOS. Returns global menu size. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -765,7 +853,7 @@ Returns readable name of a special system menu. Returns ``true`` if the specified ``feature`` is supported by the current **NativeMenu**, ``false`` otherwise. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -779,7 +867,7 @@ Returns ``true`` if the specified ``feature`` is supported by the current **Nati Returns ``true`` if ``rid`` is valid global menu. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -807,7 +895,7 @@ Returns ``true`` if a special system menu is supported. Returns ``true`` if the item at index ``idx`` is checkable in some way, i.e. if it has a checkbox or radio button. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -821,7 +909,7 @@ Returns ``true`` if the item at index ``idx`` is checkable in some way, i.e. if Returns ``true`` if the item at index ``idx`` is checked. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -837,7 +925,7 @@ Returns ``true`` if the item at index ``idx`` is disabled. When it is disabled i See :ref:`set_item_disabled` for more info on how to disable an item. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -869,7 +957,7 @@ Returns ``true`` if the item at index ``idx`` has radio button-style checkabilit \ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -897,7 +985,7 @@ Return ``true`` is global menu is a special system menu. Shows the global menu at ``position`` in the screen coordinates. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -913,7 +1001,21 @@ Removes the item at index ``idx`` from the global menu ``rid``. \ **Note:** The indices of items after the removed item will be shifted by one. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_set_interface_direction: + +.. rst-class:: classref-method + +|void| **set_interface_direction**\ (\ rid\: :ref:`RID`, is_rtl\: :ref:`bool`\ ) + +Sets the menu text layout direction from right-to-left if ``is_rtl`` is ``true``. + +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -943,7 +1045,7 @@ Sets the callback of the item at index ``idx``. Callback is emitted when an item \ **Note:** The ``callback`` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the ``tag`` parameter when the menu item was created. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -957,7 +1059,7 @@ Sets the callback of the item at index ``idx``. Callback is emitted when an item Sets whether the item at index ``idx`` has a checkbox. If ``false``, sets the type of the item to plain text. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -971,7 +1073,7 @@ Sets whether the item at index ``idx`` has a checkbox. If ``false``, sets the ty Sets the checkstate status of the item at index ``idx``. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -985,7 +1087,7 @@ Sets the checkstate status of the item at index ``idx``. Enables/disables the item at index ``idx``. When it is disabled, it can't be selected and its action can't be invoked. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -1029,9 +1131,9 @@ Sets the callback of the item at index ``idx``. The callback is emitted when an Replaces the :ref:`Texture2D` icon of the specified ``idx``. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. -\ **Note:** This method is not supported by macOS "_dock" menu items. +\ **Note:** This method is not supported by macOS Dock menu items. .. rst-class:: classref-item-separator @@ -1075,7 +1177,7 @@ Sets the callback of the item at index ``idx``. Callback is emitted when its acc Sets number of state of a multistate item. See :ref:`add_multistate_item` for details. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -1091,7 +1193,7 @@ Sets the type of the item at the specified index ``idx`` to radio button. If ``f \ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -1105,7 +1207,7 @@ Sets the type of the item at the specified index ``idx`` to radio button. If ``f Sets the state of a multistate item. See :ref:`add_multistate_item` for details. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -1119,7 +1221,7 @@ Sets the state of a multistate item. See :ref:`add_multistate_item`, which provides a simple way of assigning context data to items. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -1147,7 +1249,7 @@ Sets the metadata of an item, which may be of any type. You can later get it wit Sets the text of the item at index ``idx``. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -1189,6 +1291,8 @@ Sets the minimum width of the global menu. Registers callable to emit when the menu is about to show. +\ **Note:** This method is implemented only on macOS. + .. rst-class:: classref-item-separator ---- @@ -1201,6 +1305,8 @@ Registers callable to emit when the menu is about to show. Registers callable to emit when the menu is about to closed. +\ **Note:** This method is implemented only on macOS. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_navigationagent2d.rst b/classes/class_navigationagent2d.rst index 13c6cf32d98c..d8829b453e16 100644 --- a/classes/class_navigationagent2d.rst +++ b/classes/class_navigationagent2d.rst @@ -81,6 +81,10 @@ Properties +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`radius` | ``10.0`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`simplify_epsilon` | ``0.0`` | + +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`simplify_path` | ``false`` | + +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`target_desired_distance` | ``10.0`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`Vector2` | :ref:`target_position` | ``Vector2(0, 0)`` | @@ -587,6 +591,42 @@ Does not affect normal pathfinding. To change an actor's pathfinding radius bake ---- +.. _class_NavigationAgent2D_property_simplify_epsilon: + +.. rst-class:: classref-property + +:ref:`float` **simplify_epsilon** = ``0.0`` + +.. rst-class:: classref-property-setget + +- |void| **set_simplify_epsilon**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_simplify_epsilon**\ (\ ) + +The path simplification amount in worlds units. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent2D_property_simplify_path: + +.. rst-class:: classref-property + +:ref:`bool` **simplify_path** = ``false`` + +.. rst-class:: classref-property-setget + +- |void| **set_simplify_path**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_simplify_path**\ (\ ) + +If ``true`` a simplified version of the path will be returned with less critical path points removed. The simplification amount is controlled by :ref:`simplify_epsilon`. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + +Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationAgent2D_property_target_desired_distance: .. rst-class:: classref-property diff --git a/classes/class_navigationagent3d.rst b/classes/class_navigationagent3d.rst index f863bf9baac8..225c7813c8e2 100644 --- a/classes/class_navigationagent3d.rst +++ b/classes/class_navigationagent3d.rst @@ -85,6 +85,10 @@ Properties +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`radius` | ``0.5`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`simplify_epsilon` | ``0.0`` | + +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`simplify_path` | ``false`` | + +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`target_desired_distance` | ``1.0`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`Vector3` | :ref:`target_position` | ``Vector3(0, 0, 0)`` | @@ -627,6 +631,42 @@ Does not affect normal pathfinding. To change an actor's pathfinding radius bake ---- +.. _class_NavigationAgent3D_property_simplify_epsilon: + +.. rst-class:: classref-property + +:ref:`float` **simplify_epsilon** = ``0.0`` + +.. rst-class:: classref-property-setget + +- |void| **set_simplify_epsilon**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_simplify_epsilon**\ (\ ) + +The path simplification amount in worlds units. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent3D_property_simplify_path: + +.. rst-class:: classref-property + +:ref:`bool` **simplify_path** = ``false`` + +.. rst-class:: classref-property-setget + +- |void| **set_simplify_path**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_simplify_path**\ (\ ) + +If ``true`` a simplified version of the path will be returned with less critical path points removed. The simplification amount is controlled by :ref:`simplify_epsilon`. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + +Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationAgent3D_property_target_desired_distance: .. rst-class:: classref-property diff --git a/classes/class_navigationmesh.rst b/classes/class_navigationmesh.rst index a41d735eefb6..d652174bc9ad 100644 --- a/classes/class_navigationmesh.rst +++ b/classes/class_navigationmesh.rst @@ -30,7 +30,7 @@ Tutorials - :doc:`Using NavigationMeshes <../tutorials/navigation/navigation_using_navigationmeshes>` -- `3D Navmesh Demo `__ +- `3D Navigation Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_navigationmeshsourcegeometrydata2d.rst b/classes/class_navigationmeshsourcegeometrydata2d.rst index a064510db29a..11dce7c5c06f 100644 --- a/classes/class_navigationmeshsourcegeometrydata2d.rst +++ b/classes/class_navigationmeshsourcegeometrydata2d.rst @@ -34,12 +34,18 @@ Methods +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_obstruction_outline`\ (\ shape_outline\: :ref:`PackedVector2Array`\ ) | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_projected_obstruction`\ (\ vertices\: :ref:`PackedVector2Array`, carve\: :ref:`bool`\ ) | + +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_traversable_outline`\ (\ shape_outline\: :ref:`PackedVector2Array`\ ) | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear`\ (\ ) | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_projected_obstructions`\ (\ ) | + +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`PackedVector2Array`\] | :ref:`get_obstruction_outlines`\ (\ ) |const| | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_projected_obstructions`\ (\ ) |const| | + +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`PackedVector2Array`\] | :ref:`get_traversable_outlines`\ (\ ) |const| | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_data`\ (\ ) | @@ -48,6 +54,8 @@ Methods +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_obstruction_outlines`\ (\ obstruction_outlines\: :ref:`Array`\[:ref:`PackedVector2Array`\]\ ) | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_projected_obstructions`\ (\ projected_obstructions\: :ref:`Array`\ ) | + +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_traversable_outlines`\ (\ traversable_outlines\: :ref:`Array`\[:ref:`PackedVector2Array`\]\ ) | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -72,6 +80,18 @@ Adds the outline points of a shape as obstructed area. ---- +.. _class_NavigationMeshSourceGeometryData2D_method_add_projected_obstruction: + +.. rst-class:: classref-method + +|void| **add_projected_obstruction**\ (\ vertices\: :ref:`PackedVector2Array`, carve\: :ref:`bool`\ ) + +Adds a projected obstruction shape to the source geometry. If ``carve`` is ``true`` the carved shape will not be affected by additional offsets (e.g. agent radius) of the navigation mesh baking process. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationMeshSourceGeometryData2D_method_add_traversable_outline: .. rst-class:: classref-method @@ -96,6 +116,18 @@ Clears the internal data. ---- +.. _class_NavigationMeshSourceGeometryData2D_method_clear_projected_obstructions: + +.. rst-class:: classref-method + +|void| **clear_projected_obstructions**\ (\ ) + +Clears all projected obstructions. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationMeshSourceGeometryData2D_method_get_obstruction_outlines: .. rst-class:: classref-method @@ -108,6 +140,22 @@ Returns all the obstructed area outlines arrays. ---- +.. _class_NavigationMeshSourceGeometryData2D_method_get_projected_obstructions: + +.. rst-class:: classref-method + +:ref:`Array` **get_projected_obstructions**\ (\ ) |const| + +Returns the projected obstructions as an :ref:`Array` of dictionaries. Each :ref:`Dictionary` contains the following entries: + +- ``vertices`` - A :ref:`PackedFloat32Array` that defines the outline points of the projected shape. + +- ``carve`` - A :ref:`bool` that defines how the projected shape affects the navigation mesh baking. If ``true`` the projected shape will not be affected by addition offsets, e.g. agent radius. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationMeshSourceGeometryData2D_method_get_traversable_outlines: .. rst-class:: classref-method @@ -152,6 +200,28 @@ Adds the geometry data of another **NavigationMeshSourceGeometryData2D** to the Sets all the obstructed area outlines arrays. +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData2D_method_set_projected_obstructions: + +.. rst-class:: classref-method + +|void| **set_projected_obstructions**\ (\ projected_obstructions\: :ref:`Array`\ ) + +Sets the projected obstructions with an Array of Dictionaries with the following key value pairs: + + +.. tabs:: + + .. code-tab:: gdscript + + "vertices" : PackedFloat32Array + "carve" : bool + + + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_navigationmeshsourcegeometrydata3d.rst b/classes/class_navigationmeshsourcegeometrydata3d.rst index 218f5f1567e5..043b7dfeb8e7 100644 --- a/classes/class_navigationmeshsourcegeometrydata3d.rst +++ b/classes/class_navigationmeshsourcegeometrydata3d.rst @@ -31,27 +31,35 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`add_faces`\ (\ faces\: :ref:`PackedVector3Array`, xform\: :ref:`Transform3D`\ ) | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`add_mesh`\ (\ mesh\: :ref:`Mesh`, xform\: :ref:`Transform3D`\ ) | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`add_mesh_array`\ (\ mesh_array\: :ref:`Array`, xform\: :ref:`Transform3D`\ ) | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`clear`\ (\ ) | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`get_indices`\ (\ ) |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array` | :ref:`get_vertices`\ (\ ) |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_data`\ (\ ) | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`merge`\ (\ other_geometry\: :ref:`NavigationMeshSourceGeometryData3D`\ ) | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_indices`\ (\ indices\: :ref:`PackedInt32Array`\ ) | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_vertices`\ (\ vertices\: :ref:`PackedFloat32Array`\ ) | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_faces`\ (\ faces\: :ref:`PackedVector3Array`, xform\: :ref:`Transform3D`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_mesh`\ (\ mesh\: :ref:`Mesh`, xform\: :ref:`Transform3D`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_mesh_array`\ (\ mesh_array\: :ref:`Array`, xform\: :ref:`Transform3D`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_projected_obstruction`\ (\ vertices\: :ref:`PackedVector3Array`, elevation\: :ref:`float`, height\: :ref:`float`, carve\: :ref:`bool`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_projected_obstructions`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_indices`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_projected_obstructions`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`get_vertices`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_data`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`merge`\ (\ other_geometry\: :ref:`NavigationMeshSourceGeometryData3D`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_indices`\ (\ indices\: :ref:`PackedInt32Array`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_projected_obstructions`\ (\ projected_obstructions\: :ref:`Array`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_vertices`\ (\ vertices\: :ref:`PackedFloat32Array`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -98,6 +106,18 @@ Adds an :ref:`Array` the size of :ref:`Mesh.ARRAY_MAX`, elevation\: :ref:`float`, height\: :ref:`float`, carve\: :ref:`bool`\ ) + +Adds a projected obstruction shape to the source geometry. The ``vertices`` are considered projected on a xz-axes plane, placed at the global y-axis ``elevation`` and extruded by ``height``. If ``carve`` is ``true`` the carved shape will not be affected by additional offsets (e.g. agent radius) of the navigation mesh baking process. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationMeshSourceGeometryData3D_method_clear: .. rst-class:: classref-method @@ -110,6 +130,18 @@ Clears the internal data. ---- +.. _class_NavigationMeshSourceGeometryData3D_method_clear_projected_obstructions: + +.. rst-class:: classref-method + +|void| **clear_projected_obstructions**\ (\ ) + +Clears all projected obstructions. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationMeshSourceGeometryData3D_method_get_indices: .. rst-class:: classref-method @@ -122,6 +154,26 @@ Returns the parsed source geometry data indices array. ---- +.. _class_NavigationMeshSourceGeometryData3D_method_get_projected_obstructions: + +.. rst-class:: classref-method + +:ref:`Array` **get_projected_obstructions**\ (\ ) |const| + +Returns the projected obstructions as an :ref:`Array` of dictionaries. Each :ref:`Dictionary` contains the following entries: + +- ``vertices`` - A :ref:`PackedFloat32Array` that defines the outline points of the projected shape. + +- ``elevation`` - A :ref:`float` that defines the projected shape placement on the y-axis. + +- ``height`` - A :ref:`float` that defines how much the projected shape is extruded along the y-axis. + +- ``carve`` - A :ref:`bool` that defines how the obstacle affects the navigation mesh baking. If ``true`` the projected shape will not be affected by addition offsets, e.g. agent radius. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationMeshSourceGeometryData3D_method_get_vertices: .. rst-class:: classref-method @@ -168,6 +220,30 @@ Sets the parsed source geometry data indices. The indices need to be matched wit \ **Warning:** Inappropriate data can crash the baking process of the involved third-party libraries. +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData3D_method_set_projected_obstructions: + +.. rst-class:: classref-method + +|void| **set_projected_obstructions**\ (\ projected_obstructions\: :ref:`Array`\ ) + +Sets the projected obstructions with an Array of Dictionaries with the following key value pairs: + + +.. tabs:: + + .. code-tab:: gdscript + + "vertices" : PackedFloat32Array + "elevation" : float + "height" : float + "carve" : bool + + + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_navigationobstacle2d.rst b/classes/class_navigationobstacle2d.rst index ce40dc5ef3e3..b4b3599f155e 100644 --- a/classes/class_navigationobstacle2d.rst +++ b/classes/class_navigationobstacle2d.rst @@ -14,20 +14,18 @@ NavigationObstacle2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -2D Obstacle used in navigation to constrain avoidance controlled agents outside or inside an area. +2D obstacle used to affect navigation mesh baking or constrain velocities of avoidance controlled agents. .. rst-class:: classref-introduction-group Description ----------- -2D Obstacle used in navigation to constrain avoidance controlled agents outside or inside an area. The obstacle needs a navigation map and outline vertices defined to work correctly. +An obstacle needs a navigation map and outline :ref:`vertices` defined to work correctly. The outlines can not cross or overlap. -If the obstacle's vertices are winded in clockwise order, avoidance agents will be pushed in by the obstacle, otherwise, avoidance agents will be pushed out. Outlines must not cross or overlap. +Obstacles can be included in the navigation mesh baking process when :ref:`affect_navigation_mesh` is enabled. They do not add walkable geometry, instead their role is to discard other source geometry inside the shape. This can be used to prevent navigation mesh from appearing in unwanted places. If :ref:`carve_navigation_mesh` is enabled the baked shape will not be affected by offsets of the navigation mesh baking, e.g. the agent radius. -Obstacles are **not** a replacement for a (re)baked navigation mesh. Obstacles **don't** change the resulting path from the pathfinding, obstacles only affect the navigation avoidance agent movement by altering the suggested velocity of the avoidance agent. - -Obstacles using vertices can warp to a new position but should not moved every frame as each move requires a rebuild of the avoidance map. +With :ref:`avoidance_enabled` the obstacle can constrain the avoidance velocities of avoidance using agents. If the obstacle's vertices are wound in clockwise order, avoidance agents will be pushed in by the obstacle, otherwise, avoidance agents will be pushed out. Obstacles using vertices and avoidance can warp to a new position but should not be moved every single frame as each change requires a rebuild of the avoidance map. .. rst-class:: classref-introduction-group @@ -44,17 +42,21 @@ Properties .. table:: :widths: auto - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`bool` | :ref:`avoidance_enabled` | ``true`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`int` | :ref:`avoidance_layers` | ``1`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`float` | :ref:`radius` | ``0.0`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`Vector2` | :ref:`velocity` | ``Vector2(0, 0)`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`PackedVector2Array` | :ref:`vertices` | ``PackedVector2Array()`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`affect_navigation_mesh` | ``false`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`avoidance_enabled` | ``true`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`avoidance_layers` | ``1`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`carve_navigation_mesh` | ``false`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`float` | :ref:`radius` | ``0.0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`Vector2` | :ref:`velocity` | ``Vector2(0, 0)`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedVector2Array` | :ref:`vertices` | ``PackedVector2Array()`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ .. rst-class:: classref-reftable-group @@ -85,6 +87,23 @@ Methods Property Descriptions --------------------- +.. _class_NavigationObstacle2D_property_affect_navigation_mesh: + +.. rst-class:: classref-property + +:ref:`bool` **affect_navigation_mesh** = ``false`` + +.. rst-class:: classref-property-setget + +- |void| **set_affect_navigation_mesh**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_affect_navigation_mesh**\ (\ ) + +If enabled and parsed in a navigation mesh baking process the obstacle will discard source geometry inside its :ref:`vertices` defined shape. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationObstacle2D_property_avoidance_enabled: .. rst-class:: classref-property @@ -119,6 +138,27 @@ A bitfield determining the avoidance layers for this obstacle. Agents with a mat ---- +.. _class_NavigationObstacle2D_property_carve_navigation_mesh: + +.. rst-class:: classref-property + +:ref:`bool` **carve_navigation_mesh** = ``false`` + +.. rst-class:: classref-property-setget + +- |void| **set_carve_navigation_mesh**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_carve_navigation_mesh**\ (\ ) + +If enabled the obstacle vertices will carve into the baked navigation mesh with the shape unaffected by additional offsets (e.g. agent radius). + +It will still be affected by further postprocessing of the baking process, like edge and polygon simplification. + +Requires :ref:`affect_navigation_mesh` to be enabled. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationObstacle2D_property_radius: .. rst-class:: classref-property @@ -166,6 +206,8 @@ Sets the wanted velocity for the obstacle so other agent's can better predict th The outline vertices of the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out. Outlines can not be crossed or overlap. Should the vertices using obstacle be warped to a new position agent's can not predict this movement and may get trapped inside the obstacle. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_navigationobstacle3d.rst b/classes/class_navigationobstacle3d.rst index a1fa2f8a6c1c..25b55b1f8abf 100644 --- a/classes/class_navigationobstacle3d.rst +++ b/classes/class_navigationobstacle3d.rst @@ -14,20 +14,18 @@ NavigationObstacle3D **Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -3D Obstacle used in navigation to constrain avoidance controlled agents outside or inside an area. +3D obstacle used to affect navigation mesh baking or constrain velocities of avoidance controlled agents. .. rst-class:: classref-introduction-group Description ----------- -3D Obstacle used in navigation to constrain avoidance controlled agents outside or inside an area. The obstacle needs a navigation map and outline vertices defined to work correctly. +An obstacle needs a navigation map and outline :ref:`vertices` defined to work correctly. The outlines can not cross or overlap and are restricted to a plane projection. This means the y-axis of the vertices is ignored, instead the obstacle's global y-axis position is used for placement. The projected shape is extruded by the obstacles height along the y-axis. -If the obstacle's vertices are winded in clockwise order, avoidance agents will be pushed in by the obstacle, otherwise, avoidance agents will be pushed out. Outlines must not cross or overlap. +Obstacles can be included in the navigation mesh baking process when :ref:`affect_navigation_mesh` is enabled. They do not add walkable geometry, instead their role is to discard other source geometry inside the shape. This can be used to prevent navigation mesh from appearing in unwanted places, e.g. inside "solid" geometry or on top of it. If :ref:`carve_navigation_mesh` is enabled the baked shape will not be affected by offsets of the navigation mesh baking, e.g. the agent radius. -Obstacles are **not** a replacement for a (re)baked navigation mesh. Obstacles **don't** change the resulting path from the pathfinding, obstacles only affect the navigation avoidance agent movement by altering the suggested velocity of the avoidance agent. - -Obstacles using vertices can warp to a new position but should not moved every frame as each move requires a rebuild of the avoidance map. +With :ref:`avoidance_enabled` the obstacle can constrain the avoidance velocities of avoidance using agents. If the obstacle's vertices are wound in clockwise order, avoidance agents will be pushed in by the obstacle, otherwise, avoidance agents will be pushed out. Obstacles using vertices and avoidance can warp to a new position but should not be moved every single frame as each change requires a rebuild of the avoidance map. .. rst-class:: classref-introduction-group @@ -44,21 +42,25 @@ Properties .. table:: :widths: auto - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`bool` | :ref:`avoidance_enabled` | ``true`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`int` | :ref:`avoidance_layers` | ``1`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`float` | :ref:`height` | ``1.0`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`float` | :ref:`radius` | ``0.0`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`bool` | :ref:`use_3d_avoidance` | ``false`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`Vector3` | :ref:`velocity` | ``Vector3(0, 0, 0)`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`PackedVector3Array` | :ref:`vertices` | ``PackedVector3Array()`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`affect_navigation_mesh` | ``false`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`avoidance_enabled` | ``true`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`avoidance_layers` | ``1`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`carve_navigation_mesh` | ``false`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`float` | :ref:`height` | ``1.0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`float` | :ref:`radius` | ``0.0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`use_3d_avoidance` | ``false`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`Vector3` | :ref:`velocity` | ``Vector3(0, 0, 0)`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedVector3Array` | :ref:`vertices` | ``PackedVector3Array()`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ .. rst-class:: classref-reftable-group @@ -89,6 +91,23 @@ Methods Property Descriptions --------------------- +.. _class_NavigationObstacle3D_property_affect_navigation_mesh: + +.. rst-class:: classref-property + +:ref:`bool` **affect_navigation_mesh** = ``false`` + +.. rst-class:: classref-property-setget + +- |void| **set_affect_navigation_mesh**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_affect_navigation_mesh**\ (\ ) + +If enabled and parsed in a navigation mesh baking process the obstacle will discard source geometry inside its :ref:`vertices` and :ref:`height` defined shape. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationObstacle3D_property_avoidance_enabled: .. rst-class:: classref-property @@ -123,6 +142,27 @@ A bitfield determining the avoidance layers for this obstacle. Agents with a mat ---- +.. _class_NavigationObstacle3D_property_carve_navigation_mesh: + +.. rst-class:: classref-property + +:ref:`bool` **carve_navigation_mesh** = ``false`` + +.. rst-class:: classref-property-setget + +- |void| **set_carve_navigation_mesh**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_carve_navigation_mesh**\ (\ ) + +If enabled the obstacle vertices will carve into the baked navigation mesh with the shape unaffected by additional offsets (e.g. agent radius). + +It will still be affected by further postprocessing of the baking process, like edge and polygon simplification. + +Requires :ref:`affect_navigation_mesh` to be enabled. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationObstacle3D_property_height: .. rst-class:: classref-property @@ -206,6 +246,8 @@ Sets the wanted velocity for the obstacle so other agent's can better predict th The outline vertices of the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out. Outlines can not be crossed or overlap. Should the vertices using obstacle be warped to a new position agent's can not predict this movement and may get trapped inside the obstacle. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector3Array` for more details. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_navigationpathqueryparameters2d.rst b/classes/class_navigationpathqueryparameters2d.rst index c8ba2e996e07..27cb9f229ccf 100644 --- a/classes/class_navigationpathqueryparameters2d.rst +++ b/classes/class_navigationpathqueryparameters2d.rst @@ -49,6 +49,10 @@ Properties +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ | :ref:`PathfindingAlgorithm` | :ref:`pathfinding_algorithm` | ``0`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`simplify_epsilon` | ``0.0`` | + +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`simplify_path` | ``false`` | + +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ | :ref:`Vector2` | :ref:`start_position` | ``Vector2(0, 0)`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ | :ref:`Vector2` | :ref:`target_position` | ``Vector2(0, 0)`` | @@ -247,6 +251,42 @@ The pathfinding algorithm used in the path query. ---- +.. _class_NavigationPathQueryParameters2D_property_simplify_epsilon: + +.. rst-class:: classref-property + +:ref:`float` **simplify_epsilon** = ``0.0`` + +.. rst-class:: classref-property-setget + +- |void| **set_simplify_epsilon**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_simplify_epsilon**\ (\ ) + +The path simplification amount in worlds units. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationPathQueryParameters2D_property_simplify_path: + +.. rst-class:: classref-property + +:ref:`bool` **simplify_path** = ``false`` + +.. rst-class:: classref-property-setget + +- |void| **set_simplify_path**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_simplify_path**\ (\ ) + +If ``true`` a simplified version of the path will be returned with less critical path points removed. The simplification amount is controlled by :ref:`simplify_epsilon`. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + +Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationPathQueryParameters2D_property_start_position: .. rst-class:: classref-property diff --git a/classes/class_navigationpathqueryparameters3d.rst b/classes/class_navigationpathqueryparameters3d.rst index 434aa82c991b..1c8c080f1f36 100644 --- a/classes/class_navigationpathqueryparameters3d.rst +++ b/classes/class_navigationpathqueryparameters3d.rst @@ -49,6 +49,10 @@ Properties +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`PathfindingAlgorithm` | :ref:`pathfinding_algorithm` | ``0`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`simplify_epsilon` | ``0.0`` | + +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`simplify_path` | ``false`` | + +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`Vector3` | :ref:`start_position` | ``Vector3(0, 0, 0)`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`Vector3` | :ref:`target_position` | ``Vector3(0, 0, 0)`` | @@ -247,6 +251,42 @@ The pathfinding algorithm used in the path query. ---- +.. _class_NavigationPathQueryParameters3D_property_simplify_epsilon: + +.. rst-class:: classref-property + +:ref:`float` **simplify_epsilon** = ``0.0`` + +.. rst-class:: classref-property-setget + +- |void| **set_simplify_epsilon**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_simplify_epsilon**\ (\ ) + +The path simplification amount in worlds units. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationPathQueryParameters3D_property_simplify_path: + +.. rst-class:: classref-property + +:ref:`bool` **simplify_path** = ``false`` + +.. rst-class:: classref-property-setget + +- |void| **set_simplify_path**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_simplify_path**\ (\ ) + +If ``true`` a simplified version of the path will be returned with less critical path points removed. The simplification amount is controlled by :ref:`simplify_epsilon`. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + +Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationPathQueryParameters3D_property_start_position: .. rst-class:: classref-property diff --git a/classes/class_navigationpathqueryresult2d.rst b/classes/class_navigationpathqueryresult2d.rst index 36acd5000eb2..9d81187ed822 100644 --- a/classes/class_navigationpathqueryresult2d.rst +++ b/classes/class_navigationpathqueryresult2d.rst @@ -113,6 +113,8 @@ Property Descriptions The resulting path array from the navigation query. All path array positions are in global coordinates. Without customized query parameters this is the same path as returned by :ref:`NavigationServer2D.map_get_path`. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -130,6 +132,8 @@ The resulting path array from the navigation query. All path array positions are The ``ObjectID``\ s of the :ref:`Object`\ s which manage the regions and links each point of the path goes through. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt64Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -164,6 +168,8 @@ The :ref:`RID`\ s of the regions and links that each point of the pat The type of navigation primitive (region or link) that each point of the path goes through. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_navigationpathqueryresult3d.rst b/classes/class_navigationpathqueryresult3d.rst index 79ba4bd58043..d01fe630b6bf 100644 --- a/classes/class_navigationpathqueryresult3d.rst +++ b/classes/class_navigationpathqueryresult3d.rst @@ -113,6 +113,8 @@ Property Descriptions The resulting path array from the navigation query. All path array positions are in global coordinates. Without customized query parameters this is the same path as returned by :ref:`NavigationServer3D.map_get_path`. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector3Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -130,6 +132,8 @@ The resulting path array from the navigation query. All path array positions are The ``ObjectID``\ s of the :ref:`Object`\ s which manage the regions and links each point of the path goes through. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt64Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -164,6 +168,8 @@ The :ref:`RID`\ s of the regions and links that each point of the pat The type of navigation primitive (region or link) that each point of the path goes through. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_navigationpolygon.rst b/classes/class_navigationpolygon.rst index 4eea55a10d40..2838b33132f7 100644 --- a/classes/class_navigationpolygon.rst +++ b/classes/class_navigationpolygon.rst @@ -76,10 +76,10 @@ Adding vertices and polygon indices manually. Tutorials --------- -- `2D Navigation Demo `__ - - :doc:`Using NavigationMeshes <../tutorials/navigation/navigation_using_navigationmeshes>` +- `Navigation Polygon 2D Demo `__ + .. rst-class:: classref-reftable-group Properties diff --git a/classes/class_navigationserver2d.rst b/classes/class_navigationserver2d.rst index ed157617c547..635e0af56df7 100644 --- a/classes/class_navigationserver2d.rst +++ b/classes/class_navigationserver2d.rst @@ -42,10 +42,10 @@ This server keeps tracks of any call and executes them during the sync phase. Th Tutorials --------- -- `2D Navigation Demo `__ - - :doc:`Using NavigationServer <../tutorials/navigation/navigation_using_navigationservers>` +- `Navigation Polygon 2D Demo `__ + .. rst-class:: classref-reftable-group Methods @@ -299,6 +299,8 @@ Methods +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_debug_enabled`\ (\ enabled\: :ref:`bool`\ ) | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`simplify_path`\ (\ path\: :ref:`PackedVector2Array`, epsilon\: :ref:`float`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -1826,6 +1828,20 @@ If ``enabled`` is ``true``, the navigation ``region`` will use edge connections If ``true`` enables debug mode on the NavigationServer. +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_simplify_path: + +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **simplify_path**\ (\ path\: :ref:`PackedVector2Array`, epsilon\: :ref:`float`\ ) + +Returns a simplified version of ``path`` with less critical path points removed. The simplification amount is in worlds units and controlled by ``epsilon``. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + +Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_navigationserver3d.rst b/classes/class_navigationserver3d.rst index 28bd9edcbe1f..c49395cf10ae 100644 --- a/classes/class_navigationserver3d.rst +++ b/classes/class_navigationserver3d.rst @@ -42,10 +42,10 @@ This server keeps tracks of any call and executes them during the sync phase. Th Tutorials --------- -- `3D Navmesh Demo `__ - - :doc:`Using NavigationServer <../tutorials/navigation/navigation_using_navigationservers>` +- `3D Navigation Demo `__ + .. rst-class:: classref-reftable-group Methods @@ -337,6 +337,8 @@ Methods +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_debug_enabled`\ (\ enabled\: :ref:`bool`\ ) | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`simplify_path`\ (\ path\: :ref:`PackedVector3Array`, epsilon\: :ref:`float`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -2197,6 +2199,20 @@ Control activation of this server. If ``true`` enables debug mode on the NavigationServer. +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_simplify_path: + +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **simplify_path**\ (\ path\: :ref:`PackedVector3Array`, epsilon\: :ref:`float`\ ) + +Returns a simplified version of ``path`` with less critical path points removed. The simplification amount is in worlds units and controlled by ``epsilon``. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + +Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_node.rst b/classes/class_node.rst index d49167da106e..789f8bf2dd1f 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -12,7 +12,7 @@ Node **Inherits:** :ref:`Object` -**Inherited By:** :ref:`AnimationMixer`, :ref:`AudioStreamPlayer`, :ref:`CanvasItem`, :ref:`CanvasLayer`, :ref:`EditorFileSystem`, :ref:`EditorPlugin`, :ref:`EditorResourcePreview`, :ref:`HTTPRequest`, :ref:`InstancePlaceholder`, :ref:`MissingNode`, :ref:`MultiplayerSpawner`, :ref:`MultiplayerSynchronizer`, :ref:`NavigationAgent2D`, :ref:`NavigationAgent3D`, :ref:`Node3D`, :ref:`ResourcePreloader`, :ref:`ShaderGlobalsOverride`, :ref:`SkeletonIK3D`, :ref:`StatusIndicator`, :ref:`Timer`, :ref:`Viewport`, :ref:`WorldEnvironment` +**Inherited By:** :ref:`AnimationMixer`, :ref:`AudioStreamPlayer`, :ref:`CanvasItem`, :ref:`CanvasLayer`, :ref:`EditorFileSystem`, :ref:`EditorPlugin`, :ref:`EditorResourcePreview`, :ref:`HTTPRequest`, :ref:`InstancePlaceholder`, :ref:`MissingNode`, :ref:`MultiplayerSpawner`, :ref:`MultiplayerSynchronizer`, :ref:`NavigationAgent2D`, :ref:`NavigationAgent3D`, :ref:`Node3D`, :ref:`ResourcePreloader`, :ref:`ShaderGlobalsOverride`, :ref:`StatusIndicator`, :ref:`Timer`, :ref:`Viewport`, :ref:`WorldEnvironment` Base class for all scene objects. @@ -73,6 +73,8 @@ Properties +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ | :ref:`Node` | :ref:`owner` | | +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`PhysicsInterpolationMode` | :ref:`physics_interpolation_mode` | ``0`` | + +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ | :ref:`ProcessMode` | :ref:`process_mode` | ``0`` | +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`process_physics_priority` | ``0`` | @@ -207,6 +209,10 @@ Methods +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_node_ready`\ (\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_physics_interpolated`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_physics_interpolated_and_enabled`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_physics_processing`\ (\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_physics_processing_internal`\ (\ ) |const| | @@ -251,6 +257,8 @@ Methods +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`request_ready`\ (\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reset_physics_interpolation`\ (\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`rpc`\ (\ method\: :ref:`StringName`, ...\ ) |vararg| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`rpc_config`\ (\ method\: :ref:`StringName`, config\: :ref:`Variant`\ ) | @@ -552,6 +560,40 @@ Allows this node to process threaded messages created with :ref:`call_deferred_t ---- +.. _enum_Node_PhysicsInterpolationMode: + +.. rst-class:: classref-enumeration + +enum **PhysicsInterpolationMode**: + +.. _class_Node_constant_PHYSICS_INTERPOLATION_MODE_INHERIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`PhysicsInterpolationMode` **PHYSICS_INTERPOLATION_MODE_INHERIT** = ``0`` + +Inherits :ref:`physics_interpolation_mode` from the node's parent. This is the default for any newly created node. + +.. _class_Node_constant_PHYSICS_INTERPOLATION_MODE_ON: + +.. rst-class:: classref-enumeration-constant + +:ref:`PhysicsInterpolationMode` **PHYSICS_INTERPOLATION_MODE_ON** = ``1`` + +Enables physics interpolation for this node and for children set to :ref:`PHYSICS_INTERPOLATION_MODE_INHERIT`. This is the default for the root node. + +.. _class_Node_constant_PHYSICS_INTERPOLATION_MODE_OFF: + +.. rst-class:: classref-enumeration-constant + +:ref:`PhysicsInterpolationMode` **PHYSICS_INTERPOLATION_MODE_OFF** = ``2`` + +Disables physics interpolation for this node and for children set to :ref:`PHYSICS_INTERPOLATION_MODE_INHERIT`. + +.. rst-class:: classref-item-separator + +---- + .. _enum_Node_DuplicateFlags: .. rst-class:: classref-enumeration @@ -845,6 +887,14 @@ Notification received when the node is disabled. See :ref:`PROCESS_MODE_DISABLED Notification received when the node is enabled again after being disabled. See :ref:`PROCESS_MODE_DISABLED`. +.. _class_Node_constant_NOTIFICATION_RESET_PHYSICS_INTERPOLATION: + +.. rst-class:: classref-constant + +**NOTIFICATION_RESET_PHYSICS_INTERPOLATION** = ``2001`` + +Notification received when :ref:`reset_physics_interpolation` is called on the node or its ancestors. + .. _class_Node_constant_NOTIFICATION_EDITOR_PRE_SAVE: .. rst-class:: classref-constant @@ -971,7 +1021,17 @@ Implemented only on iOS. **NOTIFICATION_TRANSLATION_CHANGED** = ``2010`` -Notification received when translations may have changed. Can be triggered by the user changing the locale. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like :ref:`Object.tr`. +Notification received when translations may have changed. Can be triggered by the user changing the locale, changing :ref:`auto_translate_mode` or when the node enters the scene tree. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like :ref:`Object.tr`. + +\ **Note:** This notification is received alongside :ref:`NOTIFICATION_ENTER_TREE`, so if you are instantiating a scene, the child nodes will not be initialized yet. You can use it to setup translations for this node, child nodes created from script, or if you want to access child nodes added in the editor, make sure the node is ready using :ref:`is_node_ready`. + +:: + + func _notification(what): + if what == NOTIFICATION_TRANSLATION_CHANGED: + if not is_node_ready(): + await ready # Wait until ready signal. + $Label.text = atr("%d Bananas") % banana_counter .. _class_Node_constant_NOTIFICATION_WM_ABOUT: @@ -1154,6 +1214,25 @@ The owner of this node. The owner must be an ancestor of this node. When packing ---- +.. _class_Node_property_physics_interpolation_mode: + +.. rst-class:: classref-property + +:ref:`PhysicsInterpolationMode` **physics_interpolation_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- |void| **set_physics_interpolation_mode**\ (\ value\: :ref:`PhysicsInterpolationMode`\ ) +- :ref:`PhysicsInterpolationMode` **get_physics_interpolation_mode**\ (\ ) + +Allows enabling or disabling physics interpolation per node, offering a finer grain of control than turning physics interpolation on and off globally. See :ref:`ProjectSettings.physics/common/physics_interpolation` and :ref:`SceneTree.physics_interpolation` for the global setting. + +\ **Note:** When teleporting a node to a distant position you should temporarily disable interpolation with :ref:`reset_physics_interpolation`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Node_property_process_mode: .. rst-class:: classref-property @@ -1440,7 +1519,7 @@ Usually used for initialization. For even earlier initialization, :ref:`Object._ |void| **_shortcut_input**\ (\ event\: :ref:`InputEvent`\ ) |virtual| -Called when an :ref:`InputEventKey` or :ref:`InputEventShortcut` hasn't been consumed by :ref:`_input` or any GUI :ref:`Control` item. It is called before :ref:`_unhandled_key_input` and :ref:`_unhandled_input`. The input event propagates up through the node tree until a node consumes it. +Called when an :ref:`InputEventKey`, :ref:`InputEventShortcut`, or :ref:`InputEventJoypadButton` hasn't been consumed by :ref:`_input` or any GUI :ref:`Control` item. It is called before :ref:`_unhandled_key_input` and :ref:`_unhandled_input`. The input event propagates up through the node tree until a node consumes it. It is only called if shortcut processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process_shortcut_input`. @@ -1581,7 +1660,7 @@ If ``persistent`` is ``true``, the group will be stored when saved inside a :ref :ref:`String` **atr**\ (\ message\: :ref:`String`, context\: :ref:`StringName` = ""\ ) |const| -Translates a ``message``, using the translation catalogs configured in the Project Settings. Further ``context`` can be specified to help with the translation. +Translates a ``message``, using the translation catalogs configured in the Project Settings. Further ``context`` can be specified to help with the translation. Note that most :ref:`Control` nodes automatically translate their strings, so this method is mostly useful for formatted strings or custom drawn text. This method works the same as :ref:`Object.tr`, with the addition of respecting the :ref:`auto_translate_mode` state. @@ -1907,7 +1986,7 @@ Fetches a node. The :ref:`NodePath` can either be a relative pat \ **Example:** Assume this method is called from the Character node, inside the following tree: -:: +.. code:: text ┖╴root ┠╴Character (you are here!) @@ -2112,9 +2191,9 @@ Returns the :ref:`SceneTree` that contains this node. If this n Returns the tree as a :ref:`String`. Used mainly for debugging purposes. This version displays the path relative to the current node, and is good for copy/pasting into the :ref:`get_node` function. It also can be used in game UI/UX. -\ **Example output:**\ +May print, for example: -:: +.. code:: text TheGame TheGame/Menu @@ -2135,9 +2214,9 @@ Returns the tree as a :ref:`String`. Used mainly for debugging pur Similar to :ref:`get_tree_string`, this returns the tree as a :ref:`String`. This version displays a more graphical representation similar to what is displayed in the Scene Dock. It is useful for inspecting larger trees. -\ **Example output:**\ +May print, for example: -:: +.. code:: text ┖╴TheGame ┠╴Menu @@ -2296,6 +2375,36 @@ Returns ``true`` if the node is ready, i.e. it's inside scene tree and all its c ---- +.. _class_Node_method_is_physics_interpolated: + +.. rst-class:: classref-method + +:ref:`bool` **is_physics_interpolated**\ (\ ) |const| + +Returns ``true`` if physics interpolation is enabled for this node (see :ref:`physics_interpolation_mode`). + +\ **Note:** Interpolation will only be active if both the flag is set **and** physics interpolation is enabled within the :ref:`SceneTree`. This can be tested using :ref:`is_physics_interpolated_and_enabled`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Node_method_is_physics_interpolated_and_enabled: + +.. rst-class:: classref-method + +:ref:`bool` **is_physics_interpolated_and_enabled**\ (\ ) |const| + +Returns ``true`` if physics interpolation is enabled (see :ref:`physics_interpolation_mode`) **and** enabled in the :ref:`SceneTree`. + +This is a convenience version of :ref:`is_physics_interpolated` that also checks whether physics interpolation is enabled globally. + +See :ref:`SceneTree.physics_interpolation` and :ref:`ProjectSettings.physics/common/physics_interpolation`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Node_method_is_physics_processing: .. rst-class:: classref-method @@ -2452,9 +2561,9 @@ Prints all orphan nodes (nodes outside the :ref:`SceneTree`). U Prints the node and its children to the console, recursively. The node does not have to be inside the tree. This method outputs :ref:`NodePath`\ s relative to this node, and is good for copy/pasting into :ref:`get_node`. See also :ref:`print_tree_pretty`. -\ **Example output:**\ +May print, for example: -:: +.. code:: text . Menu @@ -2475,9 +2584,9 @@ Prints the node and its children to the console, recursively. The node does not Prints the node and its children to the console, recursively. The node does not have to be inside the tree. Similar to :ref:`print_tree`, but the graphical representation looks like what is displayed in the editor's Scene dock. It is useful for inspecting larger trees. -\ **Example output:**\ +May print, for example: -:: +.. code:: text ┖╴TheGame ┠╴Menu @@ -2602,6 +2711,24 @@ Requests :ref:`_ready` to be called again the ---- +.. _class_Node_method_reset_physics_interpolation: + +.. rst-class:: classref-method + +|void| **reset_physics_interpolation**\ (\ ) + +When physics interpolation is active, moving a node to a radically different transform (such as placement within a level) can result in a visible glitch as the object is rendered moving from the old to new position over the physics tick. + +That glitch can be prevented by calling this method, which temporarily disables interpolation until the physics tick is complete. + +The notification :ref:`NOTIFICATION_RESET_PHYSICS_INTERPOLATION` will be received by the node and all children recursively. + +\ **Note:** This function should be called **after** moving the node, rather than before. + +.. rst-class:: classref-item-separator + +---- + .. _class_Node_method_rpc: .. rst-class:: classref-method diff --git a/classes/class_node2d.rst b/classes/class_node2d.rst index 4bd7e24754c3..89387e742c4a 100644 --- a/classes/class_node2d.rst +++ b/classes/class_node2d.rst @@ -12,7 +12,7 @@ Node2D **Inherits:** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`AnimatedSprite2D`, :ref:`AudioListener2D`, :ref:`AudioStreamPlayer2D`, :ref:`BackBufferCopy`, :ref:`Bone2D`, :ref:`Camera2D`, :ref:`CanvasGroup`, :ref:`CanvasModulate`, :ref:`CollisionObject2D`, :ref:`CollisionPolygon2D`, :ref:`CollisionShape2D`, :ref:`CPUParticles2D`, :ref:`GPUParticles2D`, :ref:`Joint2D`, :ref:`Light2D`, :ref:`LightOccluder2D`, :ref:`Line2D`, :ref:`Marker2D`, :ref:`MeshInstance2D`, :ref:`MultiMeshInstance2D`, :ref:`NavigationLink2D`, :ref:`NavigationObstacle2D`, :ref:`NavigationRegion2D`, :ref:`Parallax2D`, :ref:`ParallaxLayer`, :ref:`Path2D`, :ref:`PathFollow2D`, :ref:`Polygon2D`, :ref:`RayCast2D`, :ref:`RemoteTransform2D`, :ref:`ShapeCast2D`, :ref:`Skeleton2D`, :ref:`Sprite2D`, :ref:`TileMapLayerGroup`, :ref:`TouchScreenButton`, :ref:`VisibleOnScreenNotifier2D` +**Inherited By:** :ref:`AnimatedSprite2D`, :ref:`AudioListener2D`, :ref:`AudioStreamPlayer2D`, :ref:`BackBufferCopy`, :ref:`Bone2D`, :ref:`Camera2D`, :ref:`CanvasGroup`, :ref:`CanvasModulate`, :ref:`CollisionObject2D`, :ref:`CollisionPolygon2D`, :ref:`CollisionShape2D`, :ref:`CPUParticles2D`, :ref:`GPUParticles2D`, :ref:`Joint2D`, :ref:`Light2D`, :ref:`LightOccluder2D`, :ref:`Line2D`, :ref:`Marker2D`, :ref:`MeshInstance2D`, :ref:`MultiMeshInstance2D`, :ref:`NavigationLink2D`, :ref:`NavigationObstacle2D`, :ref:`NavigationRegion2D`, :ref:`Parallax2D`, :ref:`ParallaxLayer`, :ref:`Path2D`, :ref:`PathFollow2D`, :ref:`Polygon2D`, :ref:`RayCast2D`, :ref:`RemoteTransform2D`, :ref:`ShapeCast2D`, :ref:`Skeleton2D`, :ref:`Sprite2D`, :ref:`TileMap`, :ref:`TileMapLayer`, :ref:`TouchScreenButton`, :ref:`VisibleOnScreenNotifier2D` A 2D game object, inherited by all 2D-related nodes. Has a position, rotation, scale, and Z index. diff --git a/classes/class_node3d.rst b/classes/class_node3d.rst index 9a82900d9aba..4d1545d04314 100644 --- a/classes/class_node3d.rst +++ b/classes/class_node3d.rst @@ -12,7 +12,7 @@ Node3D **Inherits:** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`AudioListener3D`, :ref:`AudioStreamPlayer3D`, :ref:`BoneAttachment3D`, :ref:`Camera3D`, :ref:`CollisionObject3D`, :ref:`CollisionPolygon3D`, :ref:`CollisionShape3D`, :ref:`GridMap`, :ref:`ImporterMeshInstance3D`, :ref:`Joint3D`, :ref:`LightmapProbe`, :ref:`Marker3D`, :ref:`NavigationLink3D`, :ref:`NavigationObstacle3D`, :ref:`NavigationRegion3D`, :ref:`OccluderInstance3D`, :ref:`OpenXRHand`, :ref:`Path3D`, :ref:`PathFollow3D`, :ref:`RayCast3D`, :ref:`RemoteTransform3D`, :ref:`ShapeCast3D`, :ref:`Skeleton3D`, :ref:`SpringArm3D`, :ref:`VehicleWheel3D`, :ref:`VisualInstance3D`, :ref:`XRBodyModifier3D`, :ref:`XRFaceModifier3D`, :ref:`XRHandModifier3D`, :ref:`XRNode3D`, :ref:`XROrigin3D` +**Inherited By:** :ref:`AudioListener3D`, :ref:`AudioStreamPlayer3D`, :ref:`BoneAttachment3D`, :ref:`Camera3D`, :ref:`CollisionObject3D`, :ref:`CollisionPolygon3D`, :ref:`CollisionShape3D`, :ref:`GridMap`, :ref:`ImporterMeshInstance3D`, :ref:`Joint3D`, :ref:`LightmapProbe`, :ref:`Marker3D`, :ref:`NavigationLink3D`, :ref:`NavigationObstacle3D`, :ref:`NavigationRegion3D`, :ref:`OccluderInstance3D`, :ref:`OpenXRCompositionLayer`, :ref:`Path3D`, :ref:`PathFollow3D`, :ref:`RayCast3D`, :ref:`RemoteTransform3D`, :ref:`ShapeCast3D`, :ref:`Skeleton3D`, :ref:`SkeletonModifier3D`, :ref:`SpringArm3D`, :ref:`VehicleWheel3D`, :ref:`VisualInstance3D`, :ref:`XRFaceModifier3D`, :ref:`XRNode3D`, :ref:`XROrigin3D` Most basic 3D game object, parent of all 3D-related nodes. diff --git a/classes/class_nodepath.rst b/classes/class_nodepath.rst index d25c1caf2f25..2355f48776ac 100644 --- a/classes/class_nodepath.rst +++ b/classes/class_nodepath.rst @@ -66,7 +66,7 @@ See also :ref:`StringName`, which is a similar type designed f Tutorials --------- -- `2D Role Playing Game Demo `__ +- `2D Role Playing Game (RPG) Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_object.rst b/classes/class_object.rst index b52fc55c75eb..e7c77c835eb2 100644 --- a/classes/class_object.rst +++ b/classes/class_object.rst @@ -121,6 +121,8 @@ Methods +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`StringName`\] | :ref:`get_meta_list`\ (\ ) |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_method_argument_count`\ (\ method\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`get_method_list`\ (\ ) |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`get_property_list`\ (\ ) |const| | @@ -987,7 +989,7 @@ While all options have the same outcome (``button``'s :ref:`BaseButton.button_do The syntax to bind parameters is through :ref:`Callable.bind`, which returns a copy of the :ref:`Callable` with its parameters bound. -When calling :ref:`emit_signal`, the signal parameters can be also passed. The examples below show the relationship between these signal parameters and bound parameters. +When calling :ref:`emit_signal` or :ref:`Signal.emit`, the signal parameters can be also passed. The examples below show the relationship between these signal parameters and bound parameters. .. tabs:: @@ -1001,7 +1003,7 @@ When calling :ref:`emit_signal`, the signal par player.hit.connect(_on_player_hit.bind("sword", 100)) # Parameters added when emitting the signal are passed first. - player.emit_signal("hit", "Dark lord", 5) + player.hit.emit("Dark lord", 5) # We pass two arguments when emitting (`hit_by`, `level`), # and bind two more arguments when connecting (`weapon_type`, `damage`). @@ -1230,6 +1232,20 @@ Returns the object's metadata entry names as a :ref:`PackedStringArray` **get_method_argument_count**\ (\ method\: :ref:`StringName`\ ) |const| + +Returns the number of arguments of the given ``method`` by name. + +\ **Note:** In C#, ``method`` must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the ``MethodName`` class to avoid allocating a new :ref:`StringName` on each call. + +.. rst-class:: classref-item-separator + +---- + .. _class_Object_method_get_method_list: .. rst-class:: classref-method @@ -1729,7 +1745,7 @@ Returns a :ref:`String` representing the object. Defaults to ``"` **tr**\ (\ message\: :ref:`StringName`, context\: :ref:`StringName` = &""\ ) |const| -Translates a ``message``, using the translation catalogs configured in the Project Settings. Further ``context`` can be specified to help with the translation. +Translates a ``message``, using the translation catalogs configured in the Project Settings. Further ``context`` can be specified to help with the translation. Note that most :ref:`Control` nodes automatically translate their strings, so this method is mostly useful for formatted strings or custom drawn text. If :ref:`can_translate_messages` is ``false``, or no translation is available, this method returns the ``message`` without changes. See :ref:`set_message_translation`. diff --git a/classes/class_occluderpolygon2d.rst b/classes/class_occluderpolygon2d.rst index 0784c6893e8a..526c0d6ed939 100644 --- a/classes/class_occluderpolygon2d.rst +++ b/classes/class_occluderpolygon2d.rst @@ -132,7 +132,7 @@ The culling mode to use. A :ref:`Vector2` array with the index for polygon's vertices positions. -\ **Note:** The returned value is a copy of the underlying array, rather than a reference. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_oggpacketsequence.rst b/classes/class_oggpacketsequence.rst index 7a8f1cec8b15..66230031eb51 100644 --- a/classes/class_oggpacketsequence.rst +++ b/classes/class_oggpacketsequence.rst @@ -71,6 +71,8 @@ Property Descriptions Contains the granule positions for each page in this packet sequence. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt64Array` for more details. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_openxraction.rst b/classes/class_openxraction.rst index 26459cd09939..23da5b6e0e29 100644 --- a/classes/class_openxraction.rst +++ b/classes/class_openxraction.rst @@ -150,6 +150,8 @@ The localized description of this action. A collections of toplevel paths to which this action can be bound. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_openxrcompositionlayer.rst b/classes/class_openxrcompositionlayer.rst new file mode 100644 index 000000000000..5b311b97a494 --- /dev/null +++ b/classes/class_openxrcompositionlayer.rst @@ -0,0 +1,158 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/openxr/doc_classes/OpenXRCompositionLayer.xml. + +.. _class_OpenXRCompositionLayer: + +OpenXRCompositionLayer +====================== + +**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +**Inherited By:** :ref:`OpenXRCompositionLayerCylinder`, :ref:`OpenXRCompositionLayerEquirect`, :ref:`OpenXRCompositionLayerQuad` + +The parent class of all OpenXR composition layer nodes. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Composition layers allow 2D viewports to be displayed inside of the headset by the XR compositor through special projections that retain their quality. This allows for rendering clear text while keeping the layer at a native resolution. + +\ **Note:** If the OpenXR runtime doesn't support the given composition layer type, a fallback mesh can be generated with a :ref:`ViewportTexture`, in order to emulate the composition layer. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`alpha_blend` | ``false`` | + +---------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`SubViewport` | :ref:`layer_viewport` | | + +---------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`sort_order` | ``1`` | + +---------------------------------------+-----------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`intersects_ray`\ (\ origin\: :ref:`Vector3`, direction\: :ref:`Vector3`\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_natively_supported`\ (\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_OpenXRCompositionLayer_property_alpha_blend: + +.. rst-class:: classref-property + +:ref:`bool` **alpha_blend** = ``false`` + +.. rst-class:: classref-property-setget + +- |void| **set_alpha_blend**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_alpha_blend**\ (\ ) + +Enables the blending the layer using its alpha channel. + +Can be combined with :ref:`Viewport.transparent_bg` to give the layer a transparent background. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRCompositionLayer_property_layer_viewport: + +.. rst-class:: classref-property + +:ref:`SubViewport` **layer_viewport** + +.. rst-class:: classref-property-setget + +- |void| **set_layer_viewport**\ (\ value\: :ref:`SubViewport`\ ) +- :ref:`SubViewport` **get_layer_viewport**\ (\ ) + +The :ref:`SubViewport` to render on the composition layer. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRCompositionLayer_property_sort_order: + +.. rst-class:: classref-property + +:ref:`int` **sort_order** = ``1`` + +.. rst-class:: classref-property-setget + +- |void| **set_sort_order**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_sort_order**\ (\ ) + +The sort order for this composition layer. Higher numbers will be shown in front of lower numbers. + +\ **Note:** This will have no effect if a fallback mesh is being used. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_OpenXRCompositionLayer_method_intersects_ray: + +.. rst-class:: classref-method + +:ref:`Vector2` **intersects_ray**\ (\ origin\: :ref:`Vector3`, direction\: :ref:`Vector3`\ ) |const| + +Returns UV coordinates where the given ray intersects with the composition layer. ``origin`` and ``direction`` must be in global space. + +Returns ``Vector2(-1.0, -1.0)`` if the ray doesn't intersect. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRCompositionLayer_method_is_natively_supported: + +.. rst-class:: classref-method + +:ref:`bool` **is_natively_supported**\ (\ ) |const| + +Returns true if the OpenXR runtime natively supports this composition layer type. + +\ **Note:** This will only return an accurate result after the OpenXR session has started. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxrcompositionlayercylinder.rst b/classes/class_openxrcompositionlayercylinder.rst new file mode 100644 index 000000000000..10400d195443 --- /dev/null +++ b/classes/class_openxrcompositionlayercylinder.rst @@ -0,0 +1,122 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/openxr/doc_classes/OpenXRCompositionLayerCylinder.xml. + +.. _class_OpenXRCompositionLayerCylinder: + +OpenXRCompositionLayerCylinder +============================== + +**Inherits:** :ref:`OpenXRCompositionLayer` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +An OpenXR composition layer that is rendered as an internal slice of a cylinder. + +.. rst-class:: classref-introduction-group + +Description +----------- + +An OpenXR composition layer that allows rendering a :ref:`SubViewport` on an internal slice of a cylinder. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------+-------------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`aspect_ratio` | ``1.0`` | + +---------------------------+-------------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`central_angle` | ``1.5708`` | + +---------------------------+-------------------------------------------------------------------------------------------+------------+ + | :ref:`int` | :ref:`fallback_segments` | ``10`` | + +---------------------------+-------------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`radius` | ``1.0`` | + +---------------------------+-------------------------------------------------------------------------------------------+------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_OpenXRCompositionLayerCylinder_property_aspect_ratio: + +.. rst-class:: classref-property + +:ref:`float` **aspect_ratio** = ``1.0`` + +.. rst-class:: classref-property-setget + +- |void| **set_aspect_ratio**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_aspect_ratio**\ (\ ) + +The aspect ratio of the slice. Used to set the height relative to the width. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRCompositionLayerCylinder_property_central_angle: + +.. rst-class:: classref-property + +:ref:`float` **central_angle** = ``1.5708`` + +.. rst-class:: classref-property-setget + +- |void| **set_central_angle**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_central_angle**\ (\ ) + +The central angle of the cylinder. Used to set the width. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRCompositionLayerCylinder_property_fallback_segments: + +.. rst-class:: classref-property + +:ref:`int` **fallback_segments** = ``10`` + +.. rst-class:: classref-property-setget + +- |void| **set_fallback_segments**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_fallback_segments**\ (\ ) + +The number of segments to use in the fallback mesh. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRCompositionLayerCylinder_property_radius: + +.. rst-class:: classref-property + +:ref:`float` **radius** = ``1.0`` + +.. rst-class:: classref-property-setget + +- |void| **set_radius**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_radius**\ (\ ) + +The radius of the cylinder. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxrcompositionlayerequirect.rst b/classes/class_openxrcompositionlayerequirect.rst new file mode 100644 index 000000000000..a6dcd544234d --- /dev/null +++ b/classes/class_openxrcompositionlayerequirect.rst @@ -0,0 +1,141 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/openxr/doc_classes/OpenXRCompositionLayerEquirect.xml. + +.. _class_OpenXRCompositionLayerEquirect: + +OpenXRCompositionLayerEquirect +============================== + +**Inherits:** :ref:`OpenXRCompositionLayer` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +An OpenXR composition layer that is rendered as an internal slice of a sphere. + +.. rst-class:: classref-introduction-group + +Description +----------- + +An OpenXR composition layer that allows rendering a :ref:`SubViewport` on an internal slice of a sphere. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------------------------------------------------------------+--------------+ + | :ref:`float` | :ref:`central_horizontal_angle` | ``1.5708`` | + +---------------------------+---------------------------------------------------------------------------------------------------------+--------------+ + | :ref:`int` | :ref:`fallback_segments` | ``10`` | + +---------------------------+---------------------------------------------------------------------------------------------------------+--------------+ + | :ref:`float` | :ref:`lower_vertical_angle` | ``0.785398`` | + +---------------------------+---------------------------------------------------------------------------------------------------------+--------------+ + | :ref:`float` | :ref:`radius` | ``1.0`` | + +---------------------------+---------------------------------------------------------------------------------------------------------+--------------+ + | :ref:`float` | :ref:`upper_vertical_angle` | ``0.785398`` | + +---------------------------+---------------------------------------------------------------------------------------------------------+--------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_OpenXRCompositionLayerEquirect_property_central_horizontal_angle: + +.. rst-class:: classref-property + +:ref:`float` **central_horizontal_angle** = ``1.5708`` + +.. rst-class:: classref-property-setget + +- |void| **set_central_horizontal_angle**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_central_horizontal_angle**\ (\ ) + +The central horizontal angle of the sphere. Used to set the width. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRCompositionLayerEquirect_property_fallback_segments: + +.. rst-class:: classref-property + +:ref:`int` **fallback_segments** = ``10`` + +.. rst-class:: classref-property-setget + +- |void| **set_fallback_segments**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_fallback_segments**\ (\ ) + +The number of segments to use in the fallback mesh. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRCompositionLayerEquirect_property_lower_vertical_angle: + +.. rst-class:: classref-property + +:ref:`float` **lower_vertical_angle** = ``0.785398`` + +.. rst-class:: classref-property-setget + +- |void| **set_lower_vertical_angle**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_lower_vertical_angle**\ (\ ) + +The lower vertical angle of the sphere. Used (together with :ref:`upper_vertical_angle`) to set the height. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRCompositionLayerEquirect_property_radius: + +.. rst-class:: classref-property + +:ref:`float` **radius** = ``1.0`` + +.. rst-class:: classref-property-setget + +- |void| **set_radius**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_radius**\ (\ ) + +The radius of the sphere. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRCompositionLayerEquirect_property_upper_vertical_angle: + +.. rst-class:: classref-property + +:ref:`float` **upper_vertical_angle** = ``0.785398`` + +.. rst-class:: classref-property-setget + +- |void| **set_upper_vertical_angle**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_upper_vertical_angle**\ (\ ) + +The upper vertical angle of the sphere. Used (together with :ref:`lower_vertical_angle`) to set the height. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_tilemaplayergroup.rst b/classes/class_openxrcompositionlayerquad.rst similarity index 57% rename from classes/class_tilemaplayergroup.rst rename to classes/class_openxrcompositionlayerquad.rst index e02ad3a89eaa..a2065fd58429 100644 --- a/classes/class_tilemaplayergroup.rst +++ b/classes/class_openxrcompositionlayerquad.rst @@ -3,27 +3,23 @@ .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. -.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/TileMapLayerGroup.xml. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/openxr/doc_classes/OpenXRCompositionLayerQuad.xml. -.. _class_TileMapLayerGroup: +.. _class_OpenXRCompositionLayerQuad: -TileMapLayerGroup -================= +OpenXRCompositionLayerQuad +========================== -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**Inherits:** :ref:`OpenXRCompositionLayer` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`TileMap` - -Groups a set of tile map layers together, allowing them to share a provided :ref:`TileSet`. +An OpenXR composition layer that is rendered as a quad. .. rst-class:: classref-introduction-group Description ----------- -Groups together tile map layers as part or the same map, replacing the :ref:`TileMap` node. Child layers will use this node's :ref:`tile_set`. - -The editor also uses **TileMapLayerGroup** as a way to store which layers are selected in a given group. This allows highlighting the currently selected layers. +An OpenXR composition layer that allows rendering a :ref:`SubViewport` on a quad. .. rst-class:: classref-reftable-group @@ -33,9 +29,9 @@ Properties .. table:: :widths: auto - +-------------------------------+------------------------------------------------------------+ - | :ref:`TileSet` | :ref:`tile_set` | - +-------------------------------+------------------------------------------------------------+ + +-------------------------------+-----------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`quad_size` | ``Vector2(1, 1)`` | + +-------------------------------+-----------------------------------------------------------------------+-------------------+ .. rst-class:: classref-section-separator @@ -46,18 +42,18 @@ Properties Property Descriptions --------------------- -.. _class_TileMapLayerGroup_property_tile_set: +.. _class_OpenXRCompositionLayerQuad_property_quad_size: .. rst-class:: classref-property -:ref:`TileSet` **tile_set** +:ref:`Vector2` **quad_size** = ``Vector2(1, 1)`` .. rst-class:: classref-property-setget -- |void| **set_tileset**\ (\ value\: :ref:`TileSet`\ ) -- :ref:`TileSet` **get_tileset**\ (\ ) +- |void| **set_quad_size**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_quad_size**\ (\ ) -The assigned :ref:`TileSet`. This TileSet will be applied to all child layers. +The dimensions of the quad. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_openxrextensionwrapperextension.rst b/classes/class_openxrextensionwrapperextension.rst index 7c49ac548a3a..a56a5d86fb99 100644 --- a/classes/class_openxrextensionwrapperextension.rst +++ b/classes/class_openxrextensionwrapperextension.rst @@ -29,61 +29,73 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_composition_layer`\ (\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_get_requested_extensions`\ (\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_suggested_tracker_names`\ (\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_on_before_instance_created`\ (\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_on_event_polled`\ (\ event\: ``const void*``\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_on_instance_created`\ (\ instance\: :ref:`int`\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_on_instance_destroyed`\ (\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_on_pre_render`\ (\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_on_process`\ (\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_on_register_metadata`\ (\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_on_session_created`\ (\ session\: :ref:`int`\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_on_session_destroyed`\ (\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_on_state_exiting`\ (\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_on_state_focused`\ (\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_on_state_idle`\ (\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_on_state_loss_pending`\ (\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_on_state_ready`\ (\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_on_state_stopping`\ (\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_on_state_synchronized`\ (\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_on_state_visible`\ (\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_set_hand_joint_locations_and_get_next_pointer`\ (\ hand_index\: :ref:`int`, next_pointer\: ``void*``\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_set_instance_create_info_and_get_next_pointer`\ (\ next_pointer\: ``void*``\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_set_session_create_and_get_next_pointer`\ (\ next_pointer\: ``void*``\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_set_swapchain_create_info_and_get_next_pointer`\ (\ next_pointer\: ``void*``\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_set_system_properties_and_get_next_pointer`\ (\ next_pointer\: ``void*``\ ) |virtual| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`OpenXRAPIExtension` | :ref:`get_openxr_api`\ (\ ) | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`register_extension_wrapper`\ (\ ) | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_composition_layer`\ (\ index\: :ref:`int`\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_composition_layer_count`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_composition_layer_order`\ (\ index\: :ref:`int`\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_requested_extensions`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_suggested_tracker_names`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`_get_viewport_composition_layer_extension_properties`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_viewport_composition_layer_extension_property_defaults`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_before_instance_created`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_on_event_polled`\ (\ event\: ``const void*``\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_instance_created`\ (\ instance\: :ref:`int`\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_instance_destroyed`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_pre_render`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_process`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_register_metadata`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_session_created`\ (\ session\: :ref:`int`\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_session_destroyed`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_state_exiting`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_state_focused`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_state_idle`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_state_loss_pending`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_state_ready`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_state_stopping`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_state_synchronized`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_state_visible`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_viewport_composition_layer_destroyed`\ (\ layer\: ``const void*``\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_set_hand_joint_locations_and_get_next_pointer`\ (\ hand_index\: :ref:`int`, next_pointer\: ``void*``\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_set_instance_create_info_and_get_next_pointer`\ (\ next_pointer\: ``void*``\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_set_session_create_and_get_next_pointer`\ (\ next_pointer\: ``void*``\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_set_swapchain_create_info_and_get_next_pointer`\ (\ next_pointer\: ``void*``\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_set_system_properties_and_get_next_pointer`\ (\ next_pointer\: ``void*``\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_set_viewport_composition_layer_and_get_next_pointer`\ (\ layer\: ``const void*``, property_values\: :ref:`Dictionary`, next_pointer\: ``void*``\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OpenXRAPIExtension` | :ref:`get_openxr_api`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_extension_wrapper`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -98,9 +110,39 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int` **_get_composition_layer**\ (\ ) |virtual| +:ref:`int` **_get_composition_layer**\ (\ index\: :ref:`int`\ ) |virtual| -Returns a pointer to a ``XrCompositionLayerBaseHeader`` struct to provide a composition layer. This will only be called if the extension previously registered itself with :ref:`OpenXRAPIExtension.register_composition_layer_provider`. +Returns a pointer to an ``XrCompositionLayerBaseHeader`` struct to provide the given composition layer. + +This will only be called if the extension previously registered itself with :ref:`OpenXRAPIExtension.register_composition_layer_provider`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__get_composition_layer_count: + +.. rst-class:: classref-method + +:ref:`int` **_get_composition_layer_count**\ (\ ) |virtual| + +Returns the number of composition layers this extension wrapper provides via :ref:`_get_composition_layer`. + +This will only be called if the extension previously registered itself with :ref:`OpenXRAPIExtension.register_composition_layer_provider`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__get_composition_layer_order: + +.. rst-class:: classref-method + +:ref:`int` **_get_composition_layer_order**\ (\ index\: :ref:`int`\ ) |virtual| + +Returns an integer that will be used to sort the given composition layer provided via :ref:`_get_composition_layer`. Lower numbers will move the layer to the front of the list, and higher numbers to the end. The default projection layer has an order of ``0``, so layers provided by this method should probably be above or below (but not exactly) ``0``. + +This will only be called if the extension previously registered itself with :ref:`OpenXRAPIExtension.register_composition_layer_provider`. .. rst-class:: classref-item-separator @@ -134,6 +176,30 @@ Returns a :ref:`PackedStringArray` of positional tracke ---- +.. _class_OpenXRExtensionWrapperExtension_private_method__get_viewport_composition_layer_extension_properties: + +.. rst-class:: classref-method + +:ref:`Array`\[:ref:`Dictionary`\] **_get_viewport_composition_layer_extension_properties**\ (\ ) |virtual| + +Gets an array of :ref:`Dictionary`\ s that represent properties, just like :ref:`Object._get_property_list`, that will be added to :ref:`OpenXRCompositionLayer` nodes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__get_viewport_composition_layer_extension_property_defaults: + +.. rst-class:: classref-method + +:ref:`Dictionary` **_get_viewport_composition_layer_extension_property_defaults**\ (\ ) |virtual| + +Gets a :ref:`Dictionary` containing the default values for the properties returned by :ref:`_get_viewport_composition_layer_extension_properties`. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRExtensionWrapperExtension_private_method__on_before_instance_created: .. rst-class:: classref-method @@ -340,6 +406,20 @@ Called when the OpenXR session state is changed to visible. This means OpenXR is ---- +.. _class_OpenXRExtensionWrapperExtension_private_method__on_viewport_composition_layer_destroyed: + +.. rst-class:: classref-method + +|void| **_on_viewport_composition_layer_destroyed**\ (\ layer\: ``const void*``\ ) |virtual| + +Called when a composition layer created via :ref:`OpenXRCompositionLayer` is destroyed. + +\ ``layer`` is a pointer to an ``XrCompositionLayerBaseHeader`` struct. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRExtensionWrapperExtension_private_method__set_hand_joint_locations_and_get_next_pointer: .. rst-class:: classref-method @@ -400,6 +480,22 @@ Adds additional data structures when interogating OpenXR system abilities. ---- +.. _class_OpenXRExtensionWrapperExtension_private_method__set_viewport_composition_layer_and_get_next_pointer: + +.. rst-class:: classref-method + +:ref:`int` **_set_viewport_composition_layer_and_get_next_pointer**\ (\ layer\: ``const void*``, property_values\: :ref:`Dictionary`, next_pointer\: ``void*``\ ) |virtual| + +Adds additional data structures to composition layers created by :ref:`OpenXRCompositionLayer`. + +\ ``property_values`` contains the values of the properties returned by :ref:`_get_viewport_composition_layer_extension_properties`. + +\ ``layer`` is a pointer to an ``XrCompositionLayerBaseHeader`` struct. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRExtensionWrapperExtension_method_get_openxr_api: .. rst-class:: classref-method diff --git a/classes/class_openxrhand.rst b/classes/class_openxrhand.rst index af4ef5e29cd2..9e7efb593f78 100644 --- a/classes/class_openxrhand.rst +++ b/classes/class_openxrhand.rst @@ -12,7 +12,7 @@ OpenXRHand **Deprecated:** Use :ref:`XRHandModifier3D` instead. -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**Inherits:** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` Node supporting hand and finger tracking in OpenXR. @@ -37,17 +37,15 @@ Properties .. table:: :widths: auto - +-------------------------------------------------+---------------------------------------------------------------+------------------+ - | :ref:`BoneUpdate` | :ref:`bone_update` | ``0`` | - +-------------------------------------------------+---------------------------------------------------------------+------------------+ - | :ref:`Hands` | :ref:`hand` | ``0`` | - +-------------------------------------------------+---------------------------------------------------------------+------------------+ - | :ref:`NodePath` | :ref:`hand_skeleton` | ``NodePath("")`` | - +-------------------------------------------------+---------------------------------------------------------------+------------------+ - | :ref:`MotionRange` | :ref:`motion_range` | ``0`` | - +-------------------------------------------------+---------------------------------------------------------------+------------------+ - | :ref:`SkeletonRig` | :ref:`skeleton_rig` | ``0`` | - +-------------------------------------------------+---------------------------------------------------------------+------------------+ + +-------------------------------------------------+-------------------------------------------------------------+-------+ + | :ref:`BoneUpdate` | :ref:`bone_update` | ``0`` | + +-------------------------------------------------+-------------------------------------------------------------+-------+ + | :ref:`Hands` | :ref:`hand` | ``0`` | + +-------------------------------------------------+-------------------------------------------------------------+-------+ + | :ref:`MotionRange` | :ref:`motion_range` | ``0`` | + +-------------------------------------------------+-------------------------------------------------------------+-------+ + | :ref:`SkeletonRig` | :ref:`skeleton_rig` | ``0`` | + +-------------------------------------------------+-------------------------------------------------------------+-------+ .. rst-class:: classref-section-separator @@ -233,23 +231,6 @@ Specifies whether this node tracks the left or right hand of the player. ---- -.. _class_OpenXRHand_property_hand_skeleton: - -.. rst-class:: classref-property - -:ref:`NodePath` **hand_skeleton** = ``NodePath("")`` - -.. rst-class:: classref-property-setget - -- |void| **set_hand_skeleton**\ (\ value\: :ref:`NodePath`\ ) -- :ref:`NodePath` **get_hand_skeleton**\ (\ ) - -Set a :ref:`Skeleton3D` node for which the pose positions will be updated. - -.. rst-class:: classref-item-separator - ----- - .. _class_OpenXRHand_property_motion_range: .. rst-class:: classref-property @@ -278,7 +259,7 @@ Set the motion range (if supported) limiting the hand motion. - |void| **set_skeleton_rig**\ (\ value\: :ref:`SkeletonRig`\ ) - :ref:`SkeletonRig` **get_skeleton_rig**\ (\ ) -Set the type of skeleton rig the :ref:`hand_skeleton` is compliant with. +Set the type of skeleton rig the parent :ref:`Skeleton3D` is compliant with. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_openxrinterface.rst b/classes/class_openxrinterface.rst index 1a3f478eed5c..3d03af3e267d 100644 --- a/classes/class_openxrinterface.rst +++ b/classes/class_openxrinterface.rst @@ -111,6 +111,20 @@ Informs the user queued a recenter of the player position. ---- +.. _class_OpenXRInterface_signal_refresh_rate_changed: + +.. rst-class:: classref-signal + +**refresh_rate_changed**\ (\ refresh_rate\: :ref:`float`\ ) + +Informs the user the HMD refresh rate has changed. + +\ **Node:** Only emitted if XR runtime supports the refresh rate extension. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRInterface_signal_session_begun: .. rst-class:: classref-signal diff --git a/classes/class_openxripbinding.rst b/classes/class_openxripbinding.rst index 159c821b1159..aa1500651d09 100644 --- a/classes/class_openxripbinding.rst +++ b/classes/class_openxripbinding.rst @@ -92,6 +92,8 @@ Property Descriptions Paths that define the inputs or outputs bound on the device. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_os.rst b/classes/class_os.rst index a14ac0ec68f4..9145ec09286e 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -28,7 +28,7 @@ The **OS** class wraps the most common functionalities for communicating with th Tutorials --------- -- `OS Test Demo `__ +- `Operating System Testing Demo `__ .. rst-class:: classref-reftable-group @@ -71,6 +71,8 @@ Methods +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`execute`\ (\ path\: :ref:`String`, arguments\: :ref:`PackedStringArray`, output\: :ref:`Array` = [], read_stderr\: :ref:`bool` = false, open_console\: :ref:`bool` = false\ ) | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`execute_with_pipe`\ (\ path\: :ref:`String`, arguments\: :ref:`PackedStringArray`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Key` | :ref:`find_keycode_from_string`\ (\ string\: :ref:`String`\ ) |const| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_cache_dir`\ (\ ) |const| | @@ -432,11 +434,11 @@ See :ref:`create_process` if you wish to run a d :ref:`int` **create_process**\ (\ path\: :ref:`String`, arguments\: :ref:`PackedStringArray`, open_console\: :ref:`bool` = false\ ) -Creates a new process that runs independently of Godot. It will not terminate when Godot terminates. The path specified in ``path`` must exist and be executable file or macOS .app bundle. Platform path resolution will be used. The ``arguments`` are used in the given order and separated by a space. +Creates a new process that runs independently of Godot. It will not terminate when Godot terminates. The path specified in ``path`` must exist and be an executable file or macOS ``.app`` bundle. The path is resolved based on the current platform. The ``arguments`` are used in the given order and separated by a space. On Windows, if ``open_console`` is ``true`` and the process is a console app, a new terminal window will be opened. -If the process is successfully created, this method returns its process ID, which you can use to monitor the process (and potentially terminate it with :ref:`kill`). Otherwise this method returns ``-1``. +If the process is successfully created, this method returns its process ID, which you can use to monitor the process (and potentially terminate it with :ref:`kill`). Otherwise, this method returns ``-1``. For example, running another instance of the project: @@ -455,7 +457,7 @@ For example, running another instance of the project: See :ref:`execute` if you wish to run an external command and retrieve the results. -\ **Note:** This method is implemented on Android, iOS, Linux, macOS and Windows. +\ **Note:** This method is implemented on Android, Linux, macOS, and Windows. \ **Note:** On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export or system .app bundle, system .app bundles will ignore arguments. @@ -545,7 +547,7 @@ If you wish to access a shell built-in or execute a composite command, a platfor -\ **Note:** This method is implemented on Android, iOS, Linux, macOS and Windows. +\ **Note:** This method is implemented on Android, Linux, macOS, and Windows. \ **Note:** To execute a Windows command interpreter built-in command, specify ``cmd.exe`` in ``path``, ``/c`` as the first argument, and the desired command as the second argument. @@ -561,6 +563,36 @@ If you wish to access a shell built-in or execute a composite command, a platfor ---- +.. _class_OS_method_execute_with_pipe: + +.. rst-class:: classref-method + +:ref:`Dictionary` **execute_with_pipe**\ (\ path\: :ref:`String`, arguments\: :ref:`PackedStringArray`\ ) + +Creates a new process that runs independently of Godot with redirected IO. It will not terminate when Godot terminates. The path specified in ``path`` must exist and be an executable file or macOS ``.app`` bundle. The path is resolved based on the current platform. The ``arguments`` are used in the given order and separated by a space. + +If the process cannot be created, this method returns an empty :ref:`Dictionary`. Otherwise, this method returns a :ref:`Dictionary` with the following keys: + +- ``"stdio"`` - :ref:`FileAccess` to access the process stdin and stdout pipes (read/write). + +- ``"stderr"`` - :ref:`FileAccess` to access the process stderr pipe (read only). + +- ``"pid"`` - Process ID as an :ref:`int`, which you can use to monitor the process (and potentially terminate it with :ref:`kill`). + +\ **Note:** This method is implemented on Android, Linux, macOS, and Windows. + +\ **Note:** To execute a Windows command interpreter built-in command, specify ``cmd.exe`` in ``path``, ``/c`` as the first argument, and the desired command as the second argument. + +\ **Note:** To execute a PowerShell built-in command, specify ``powershell.exe`` in ``path``, ``-Command`` as the first argument, and the desired command as the second argument. + +\ **Note:** To execute a Unix shell built-in command, specify shell executable name in ``path``, ``-c`` as the first argument, and the desired command as the second argument. + +\ **Note:** On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export or system .app bundle, system .app bundles will ignore arguments. + +.. rst-class:: classref-item-separator + +---- + .. _class_OS_method_find_keycode_from_string: .. rst-class:: classref-method diff --git a/classes/class_packedbytearray.rst b/classes/class_packedbytearray.rst index c0f7dd670d92..c5450db1bbf6 100644 --- a/classes/class_packedbytearray.rst +++ b/classes/class_packedbytearray.rst @@ -21,6 +21,8 @@ An array specifically designed to hold bytes. Packs data tightly, so it saves me \ **PackedByteArray** also provides methods to encode/decode various types to/from bytes. The way values are encoded is an implementation detail and shouldn't be relied upon when interacting with external apps. +\ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. + .. note:: There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. diff --git a/classes/class_packedcolorarray.rst b/classes/class_packedcolorarray.rst index e3b1eb2c242a..0f9530ad8379 100644 --- a/classes/class_packedcolorarray.rst +++ b/classes/class_packedcolorarray.rst @@ -19,6 +19,10 @@ Description An array specifically designed to hold :ref:`Color`. Packs data tightly, so it saves memory for large array sizes. +\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. **PackedColorArray** versus ``Array[Color]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`Array.map`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. + +\ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. + .. note:: There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. diff --git a/classes/class_packedfloat32array.rst b/classes/class_packedfloat32array.rst index 8c38e084bb29..791c171d8dab 100644 --- a/classes/class_packedfloat32array.rst +++ b/classes/class_packedfloat32array.rst @@ -21,6 +21,8 @@ An array specifically designed to hold 32-bit floating-point values (float). Pac If you need to pack 64-bit floats tightly, see :ref:`PackedFloat64Array`. +\ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. + .. note:: There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. diff --git a/classes/class_packedfloat64array.rst b/classes/class_packedfloat64array.rst index 25bd8bc1dd43..c47d8a9916a9 100644 --- a/classes/class_packedfloat64array.rst +++ b/classes/class_packedfloat64array.rst @@ -21,6 +21,10 @@ An array specifically designed to hold 64-bit floating-point values (double). Pa If you only need to pack 32-bit floats tightly, see :ref:`PackedFloat32Array` for a more memory-friendly alternative. +\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. **PackedFloat64Array** versus ``Array[float]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`Array.map`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. + +\ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. + .. note:: There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. diff --git a/classes/class_packedint32array.rst b/classes/class_packedint32array.rst index 024f6d9cd823..3799759f6ea7 100644 --- a/classes/class_packedint32array.rst +++ b/classes/class_packedint32array.rst @@ -21,6 +21,8 @@ An array specifically designed to hold 32-bit integer values. Packs data tightly \ **Note:** This type stores signed 32-bit integers, which means it can take values in the interval ``[-2^31, 2^31 - 1]``, i.e. ``[-2147483648, 2147483647]``. Exceeding those bounds will wrap around. In comparison, :ref:`int` uses signed 64-bit integers which can hold much larger values. If you need to pack 64-bit integers tightly, see :ref:`PackedInt64Array`. +\ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. + .. note:: There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. diff --git a/classes/class_packedint64array.rst b/classes/class_packedint64array.rst index 692e9c251642..8291b5ea7a56 100644 --- a/classes/class_packedint64array.rst +++ b/classes/class_packedint64array.rst @@ -21,6 +21,10 @@ An array specifically designed to hold 64-bit integer values. Packs data tightly \ **Note:** This type stores signed 64-bit integers, which means it can take values in the interval ``[-2^63, 2^63 - 1]``, i.e. ``[-9223372036854775808, 9223372036854775807]``. Exceeding those bounds will wrap around. If you only need to pack 32-bit integers tightly, see :ref:`PackedInt32Array` for a more memory-friendly alternative. +\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. :ref:`PackedInt32Array` versus ``Array[int]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`Array.map`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. + +\ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. + .. note:: There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. diff --git a/classes/class_packedscene.rst b/classes/class_packedscene.rst index 4ced4178c708..273dc27a07ee 100644 --- a/classes/class_packedscene.rst +++ b/classes/class_packedscene.rst @@ -106,7 +106,7 @@ Can be used to save a node to a file. When saving, the node as well as all the n Tutorials --------- -- `2D Role Playing Game Demo `__ +- `2D Role Playing Game (RPG) Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_packedstringarray.rst b/classes/class_packedstringarray.rst index 770d7e0d3a15..f91f6aa38c38 100644 --- a/classes/class_packedstringarray.rst +++ b/classes/class_packedstringarray.rst @@ -27,6 +27,10 @@ If you want to join the strings in the array, use :ref:`String.join`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. + +\ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. + .. note:: There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. @@ -36,7 +40,7 @@ If you want to join the strings in the array, use :ref:`String.join`__ +- `Operating System Testing Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_packedvector2array.rst b/classes/class_packedvector2array.rst index 4954e2fc3f09..8c5b3741b98e 100644 --- a/classes/class_packedvector2array.rst +++ b/classes/class_packedvector2array.rst @@ -19,6 +19,10 @@ Description An array specifically designed to hold :ref:`Vector2`. Packs data tightly, so it saves memory for large array sizes. +\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. :ref:`PackedVector3Array` versus ``Array[Vector2]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`Array.map`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. + +\ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. + .. note:: There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. @@ -28,7 +32,7 @@ An array specifically designed to hold :ref:`Vector2`. Packs data Tutorials --------- -- `2D Navigation Astar Demo `__ +- `Grid-based Navigation with AStarGrid2D Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_packedvector3array.rst b/classes/class_packedvector3array.rst index 93b983409b26..bd4d0b4da83b 100644 --- a/classes/class_packedvector3array.rst +++ b/classes/class_packedvector3array.rst @@ -19,6 +19,10 @@ Description An array specifically designed to hold :ref:`Vector3`. Packs data tightly, so it saves memory for large array sizes. +\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. **PackedVector3Array** versus ``Array[Vector3]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`Array.map`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. + +\ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. + .. note:: There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. diff --git a/classes/class_packetpeerudp.rst b/classes/class_packetpeerudp.rst index d74423b67dd7..34084f298ecb 100644 --- a/classes/class_packetpeerudp.rst +++ b/classes/class_packetpeerudp.rst @@ -256,7 +256,7 @@ Waits for a packet to arrive on the bound address. See :ref:`bind`__ +- `2D Role Playing Game (RPG) Demo `__ -- `2D Finite State Machine Demo `__ - -- `3D Inverse Kinematics Demo `__ +- `Hierarchical Finite State Machine Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_panelcontainer.rst b/classes/class_panelcontainer.rst index a96efac04f66..04de2f1c9782 100644 --- a/classes/class_panelcontainer.rst +++ b/classes/class_panelcontainer.rst @@ -30,7 +30,7 @@ Tutorials - :doc:`Using Containers <../tutorials/ui/gui_containers>` -- `2D Role Playing Game Demo `__ +- `2D Role Playing Game (RPG) Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_parallax2d.rst b/classes/class_parallax2d.rst index 9d07909b356c..decfec93b583 100644 --- a/classes/class_parallax2d.rst +++ b/classes/class_parallax2d.rst @@ -33,27 +33,29 @@ Properties .. table:: :widths: auto - +-------------------------------+-----------------------------------------------------------------------------+-----------------------------+ - | :ref:`Vector2` | :ref:`autoscroll` | ``Vector2(0, 0)`` | - +-------------------------------+-----------------------------------------------------------------------------+-----------------------------+ - | :ref:`bool` | :ref:`follow_viewport` | ``true`` | - +-------------------------------+-----------------------------------------------------------------------------+-----------------------------+ - | :ref:`bool` | :ref:`ignore_camera_scroll` | ``false`` | - +-------------------------------+-----------------------------------------------------------------------------+-----------------------------+ - | :ref:`Vector2` | :ref:`limit_begin` | ``Vector2(-1e+07, -1e+07)`` | - +-------------------------------+-----------------------------------------------------------------------------+-----------------------------+ - | :ref:`Vector2` | :ref:`limit_end` | ``Vector2(1e+07, 1e+07)`` | - +-------------------------------+-----------------------------------------------------------------------------+-----------------------------+ - | :ref:`Vector2` | :ref:`repeat_size` | ``Vector2(0, 0)`` | - +-------------------------------+-----------------------------------------------------------------------------+-----------------------------+ - | :ref:`int` | :ref:`repeat_times` | ``1`` | - +-------------------------------+-----------------------------------------------------------------------------+-----------------------------+ - | :ref:`Vector2` | :ref:`screen_offset` | ``Vector2(0, 0)`` | - +-------------------------------+-----------------------------------------------------------------------------+-----------------------------+ - | :ref:`Vector2` | :ref:`scroll_offset` | ``Vector2(0, 0)`` | - +-------------------------------+-----------------------------------------------------------------------------+-----------------------------+ - | :ref:`Vector2` | :ref:`scroll_scale` | ``Vector2(1, 1)`` | - +-------------------------------+-----------------------------------------------------------------------------+-----------------------------+ + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`autoscroll` | ``Vector2(0, 0)`` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`follow_viewport` | ``true`` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`ignore_camera_scroll` | ``false`` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`limit_begin` | ``Vector2(-1e+07, -1e+07)`` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`limit_end` | ``Vector2(1e+07, 1e+07)`` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`PhysicsInterpolationMode` | physics_interpolation_mode | ``2`` (overrides :ref:`Node`) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`repeat_size` | ``Vector2(0, 0)`` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`repeat_times` | ``1`` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`screen_offset` | ``Vector2(0, 0)`` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`scroll_offset` | ``Vector2(0, 0)`` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`scroll_scale` | ``Vector2(1, 1)`` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -232,7 +234,7 @@ The **Parallax2D**'s offset. Similar to :ref:`screen_offset` | :ref:`motion_mirroring` | ``Vector2(0, 0)`` | - +-------------------------------+------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2` | :ref:`motion_offset` | ``Vector2(0, 0)`` | - +-------------------------------+------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2` | :ref:`motion_scale` | ``Vector2(1, 1)`` | - +-------------------------------+------------------------------------------------------------------------+-------------------+ + +---------------------------------------------------------------------+------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`motion_mirroring` | ``Vector2(0, 0)`` | + +---------------------------------------------------------------------+------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`motion_offset` | ``Vector2(0, 0)`` | + +---------------------------------------------------------------------+------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`motion_scale` | ``Vector2(1, 1)`` | + +---------------------------------------------------------------------+------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`PhysicsInterpolationMode` | physics_interpolation_mode | ``2`` (overrides :ref:`Node`) | + +---------------------------------------------------------------------+------------------------------------------------------------------------+-------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator diff --git a/classes/class_pckpacker.rst b/classes/class_pckpacker.rst index d0e9865f3114..674ccaa616d9 100644 --- a/classes/class_pckpacker.rst +++ b/classes/class_pckpacker.rst @@ -33,7 +33,7 @@ The **PCKPacker** is used to create packages that can be loaded into a running p .. code-tab:: csharp - var packer = new PCKPacker(); + var packer = new PckPacker(); packer.PckStart("test.pck"); packer.AddFile("res://text.txt", "text.txt"); packer.Flush(); diff --git a/classes/class_physicalbone3d.rst b/classes/class_physicalbone3d.rst index 5a1b5c1ee324..da5c4eea495a 100644 --- a/classes/class_physicalbone3d.rst +++ b/classes/class_physicalbone3d.rst @@ -327,7 +327,9 @@ If ``true``, the body is deactivated when there is no movement, so it will not t - |void| **set_use_custom_integrator**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_using_custom_integrator**\ (\ ) -If ``true``, internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the :ref:`_integrate_forces` function, if defined. +If ``true``, the standard force integration (like gravity or damping) will be disabled for this body. Other than collision response, the body will only move as determined by the :ref:`_integrate_forces` method, if that virtual method is overridden. + +Setting this property will call the method :ref:`PhysicsServer3D.body_set_omit_force_integration` internally. .. rst-class:: classref-item-separator @@ -499,7 +501,7 @@ Method Descriptions |void| **_integrate_forces**\ (\ state\: :ref:`PhysicsDirectBodyState3D`\ ) |virtual| -Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it works in addition to the usual physics behavior, but the :ref:`custom_integrator` property allows you to disable the default behavior and do fully custom force integration for a body. +Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it is called before the standard force integration, but the :ref:`custom_integrator` property allows you to disable the standard force integration and do fully custom force integration for a body. .. rst-class:: classref-item-separator diff --git a/classes/class_physicalbonesimulator3d.rst b/classes/class_physicalbonesimulator3d.rst new file mode 100644 index 000000000000..b23f74b6c558 --- /dev/null +++ b/classes/class_physicalbonesimulator3d.rst @@ -0,0 +1,122 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/PhysicalBoneSimulator3D.xml. + +.. _class_PhysicalBoneSimulator3D: + +PhysicalBoneSimulator3D +======================= + +**Inherits:** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +Node that can be the parent of :ref:`PhysicalBone3D` and can apply the simulation results to :ref:`Skeleton3D`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Node that can be the parent of :ref:`PhysicalBone3D` and can apply the simulation results to :ref:`Skeleton3D`. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_simulating_physics`\ (\ ) |const| | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`physical_bones_add_collision_exception`\ (\ exception\: :ref:`RID`\ ) | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`physical_bones_remove_collision_exception`\ (\ exception\: :ref:`RID`\ ) | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`physical_bones_start_simulation`\ (\ bones\: :ref:`Array`\[:ref:`StringName`\] = []\ ) | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`physical_bones_stop_simulation`\ (\ ) | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_PhysicalBoneSimulator3D_method_is_simulating_physics: + +.. rst-class:: classref-method + +:ref:`bool` **is_simulating_physics**\ (\ ) |const| + +Returns a boolean that indicates whether the **PhysicalBoneSimulator3D** is running and simulating. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicalBoneSimulator3D_method_physical_bones_add_collision_exception: + +.. rst-class:: classref-method + +|void| **physical_bones_add_collision_exception**\ (\ exception\: :ref:`RID`\ ) + +Adds a collision exception to the physical bone. + +Works just like the :ref:`RigidBody3D` node. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicalBoneSimulator3D_method_physical_bones_remove_collision_exception: + +.. rst-class:: classref-method + +|void| **physical_bones_remove_collision_exception**\ (\ exception\: :ref:`RID`\ ) + +Removes a collision exception to the physical bone. + +Works just like the :ref:`RigidBody3D` node. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicalBoneSimulator3D_method_physical_bones_start_simulation: + +.. rst-class:: classref-method + +|void| **physical_bones_start_simulation**\ (\ bones\: :ref:`Array`\[:ref:`StringName`\] = []\ ) + +Tells the :ref:`PhysicalBone3D` nodes in the Skeleton to start simulating and reacting to the physics world. + +Optionally, a list of bone names can be passed-in, allowing only the passed-in bones to be simulated. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicalBoneSimulator3D_method_physical_bones_stop_simulation: + +.. rst-class:: classref-method + +|void| **physical_bones_stop_simulation**\ (\ ) + +Tells the :ref:`PhysicalBone3D` nodes in the Skeleton to stop simulating. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsdirectbodystate2d.rst b/classes/class_physicsdirectbodystate2d.rst index 9166dde02a35..3e6349fb3598 100644 --- a/classes/class_physicsdirectbodystate2d.rst +++ b/classes/class_physicsdirectbodystate2d.rst @@ -676,7 +676,7 @@ Returns the body's velocity at the given relative position, including both trans |void| **integrate_forces**\ (\ ) -Calls the built-in force integration code. +Updates the body's linear and angular velocity by applying gravity and damping for the equivalent of one physics tick. .. rst-class:: classref-item-separator diff --git a/classes/class_physicsdirectbodystate2dextension.rst b/classes/class_physicsdirectbodystate2dextension.rst index 55eaaba6f599..27909ea6c3a0 100644 --- a/classes/class_physicsdirectbodystate2dextension.rst +++ b/classes/class_physicsdirectbodystate2dextension.rst @@ -136,9 +136,7 @@ Method Descriptions |void| **_add_constant_central_force**\ (\ force\: :ref:`Vector2`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.add_constant_central_force`. .. rst-class:: classref-item-separator @@ -150,9 +148,7 @@ Method Descriptions |void| **_add_constant_force**\ (\ force\: :ref:`Vector2`, position\: :ref:`Vector2`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.add_constant_force`. .. rst-class:: classref-item-separator @@ -164,9 +160,7 @@ Method Descriptions |void| **_add_constant_torque**\ (\ torque\: :ref:`float`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.add_constant_torque`. .. rst-class:: classref-item-separator @@ -178,9 +172,7 @@ Method Descriptions |void| **_apply_central_force**\ (\ force\: :ref:`Vector2`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.apply_central_force`. .. rst-class:: classref-item-separator @@ -192,9 +184,7 @@ Method Descriptions |void| **_apply_central_impulse**\ (\ impulse\: :ref:`Vector2`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.apply_central_impulse`. .. rst-class:: classref-item-separator @@ -206,9 +196,7 @@ Method Descriptions |void| **_apply_force**\ (\ force\: :ref:`Vector2`, position\: :ref:`Vector2`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.apply_force`. .. rst-class:: classref-item-separator @@ -220,9 +208,7 @@ Method Descriptions |void| **_apply_impulse**\ (\ impulse\: :ref:`Vector2`, position\: :ref:`Vector2`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.apply_impulse`. .. rst-class:: classref-item-separator @@ -234,9 +220,7 @@ Method Descriptions |void| **_apply_torque**\ (\ torque\: :ref:`float`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.apply_torque`. .. rst-class:: classref-item-separator @@ -248,9 +232,7 @@ Method Descriptions |void| **_apply_torque_impulse**\ (\ impulse\: :ref:`float`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.apply_torque_impulse`. .. rst-class:: classref-item-separator @@ -262,9 +244,7 @@ Method Descriptions :ref:`float` **_get_angular_velocity**\ (\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.angular_velocity` and its respective getter. .. rst-class:: classref-item-separator @@ -276,9 +256,7 @@ Method Descriptions :ref:`Vector2` **_get_center_of_mass**\ (\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.center_of_mass` and its respective getter. .. rst-class:: classref-item-separator @@ -290,9 +268,7 @@ Method Descriptions :ref:`Vector2` **_get_center_of_mass_local**\ (\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.center_of_mass_local` and its respective getter. .. rst-class:: classref-item-separator @@ -304,9 +280,7 @@ Method Descriptions :ref:`Vector2` **_get_constant_force**\ (\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_constant_force`. .. rst-class:: classref-item-separator @@ -318,9 +292,7 @@ Method Descriptions :ref:`float` **_get_constant_torque**\ (\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_constant_torque`. .. rst-class:: classref-item-separator @@ -332,9 +304,7 @@ Method Descriptions :ref:`RID` **_get_contact_collider**\ (\ contact_idx\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider`. .. rst-class:: classref-item-separator @@ -346,9 +316,7 @@ Method Descriptions :ref:`int` **_get_contact_collider_id**\ (\ contact_idx\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_id`. .. rst-class:: classref-item-separator @@ -360,9 +328,7 @@ Method Descriptions :ref:`Object` **_get_contact_collider_object**\ (\ contact_idx\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_object`. .. rst-class:: classref-item-separator @@ -374,9 +340,7 @@ Method Descriptions :ref:`Vector2` **_get_contact_collider_position**\ (\ contact_idx\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_position`. .. rst-class:: classref-item-separator @@ -388,9 +352,7 @@ Method Descriptions :ref:`int` **_get_contact_collider_shape**\ (\ contact_idx\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_shape`. .. rst-class:: classref-item-separator @@ -402,9 +364,7 @@ Method Descriptions :ref:`Vector2` **_get_contact_collider_velocity_at_position**\ (\ contact_idx\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_velocity_at_position`. .. rst-class:: classref-item-separator @@ -416,9 +376,7 @@ Method Descriptions :ref:`int` **_get_contact_count**\ (\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_count`. .. rst-class:: classref-item-separator @@ -430,9 +388,7 @@ Method Descriptions :ref:`Vector2` **_get_contact_impulse**\ (\ contact_idx\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_impulse`. .. rst-class:: classref-item-separator @@ -444,9 +400,7 @@ Method Descriptions :ref:`Vector2` **_get_contact_local_normal**\ (\ contact_idx\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_normal`. .. rst-class:: classref-item-separator @@ -458,9 +412,7 @@ Method Descriptions :ref:`Vector2` **_get_contact_local_position**\ (\ contact_idx\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_position`. .. rst-class:: classref-item-separator @@ -472,9 +424,7 @@ Method Descriptions :ref:`int` **_get_contact_local_shape**\ (\ contact_idx\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_shape`. .. rst-class:: classref-item-separator @@ -486,9 +436,7 @@ Method Descriptions :ref:`Vector2` **_get_contact_local_velocity_at_position**\ (\ contact_idx\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_velocity_at_position`. .. rst-class:: classref-item-separator @@ -500,9 +448,7 @@ Method Descriptions :ref:`float` **_get_inverse_inertia**\ (\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.inverse_inertia` and its respective getter. .. rst-class:: classref-item-separator @@ -514,9 +460,7 @@ Method Descriptions :ref:`float` **_get_inverse_mass**\ (\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.inverse_mass` and its respective getter. .. rst-class:: classref-item-separator @@ -528,9 +472,7 @@ Method Descriptions :ref:`Vector2` **_get_linear_velocity**\ (\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.linear_velocity` and its respective getter. .. rst-class:: classref-item-separator @@ -542,9 +484,7 @@ Method Descriptions :ref:`PhysicsDirectSpaceState2D` **_get_space_state**\ (\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_space_state`. .. rst-class:: classref-item-separator @@ -556,9 +496,7 @@ Method Descriptions :ref:`float` **_get_step**\ (\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.step` and its respective getter. .. rst-class:: classref-item-separator @@ -570,9 +508,7 @@ Method Descriptions :ref:`float` **_get_total_angular_damp**\ (\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.total_angular_damp` and its respective getter. .. rst-class:: classref-item-separator @@ -584,9 +520,7 @@ Method Descriptions :ref:`Vector2` **_get_total_gravity**\ (\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.total_gravity` and its respective getter. .. rst-class:: classref-item-separator @@ -598,9 +532,7 @@ Method Descriptions :ref:`float` **_get_total_linear_damp**\ (\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.total_linear_damp` and its respective getter. .. rst-class:: classref-item-separator @@ -612,9 +544,7 @@ Method Descriptions :ref:`Transform2D` **_get_transform**\ (\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.transform` and its respective getter. .. rst-class:: classref-item-separator @@ -626,9 +556,7 @@ Method Descriptions :ref:`Vector2` **_get_velocity_at_local_position**\ (\ local_position\: :ref:`Vector2`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_velocity_at_local_position`. .. rst-class:: classref-item-separator @@ -640,9 +568,7 @@ Method Descriptions |void| **_integrate_forces**\ (\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.integrate_forces`. .. rst-class:: classref-item-separator @@ -654,9 +580,7 @@ Method Descriptions :ref:`bool` **_is_sleeping**\ (\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.sleeping` and its respective getter. .. rst-class:: classref-item-separator @@ -668,9 +592,7 @@ Method Descriptions |void| **_set_angular_velocity**\ (\ velocity\: :ref:`float`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.angular_velocity` and its respective setter. .. rst-class:: classref-item-separator @@ -682,9 +604,7 @@ Method Descriptions |void| **_set_constant_force**\ (\ force\: :ref:`Vector2`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.set_constant_force`. .. rst-class:: classref-item-separator @@ -696,9 +616,7 @@ Method Descriptions |void| **_set_constant_torque**\ (\ torque\: :ref:`float`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsDirectBodyState2D.set_constant_torque`. .. rst-class:: classref-item-separator @@ -710,9 +628,7 @@ Method Descriptions |void| **_set_linear_velocity**\ (\ velocity\: :ref:`Vector2`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.linear_velocity` and its respective setter. .. rst-class:: classref-item-separator @@ -724,9 +640,7 @@ Method Descriptions |void| **_set_sleep_state**\ (\ enabled\: :ref:`bool`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.sleeping` and its respective setter. .. rst-class:: classref-item-separator @@ -738,9 +652,7 @@ Method Descriptions |void| **_set_transform**\ (\ transform\: :ref:`Transform2D`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.transform` and its respective setter. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_physicsdirectbodystate3d.rst b/classes/class_physicsdirectbodystate3d.rst index 5daee5c2d27f..dbfa83c98eb7 100644 --- a/classes/class_physicsdirectbodystate3d.rst +++ b/classes/class_physicsdirectbodystate3d.rst @@ -714,7 +714,7 @@ Returns the body's velocity at the given relative position, including both trans |void| **integrate_forces**\ (\ ) -Calls the built-in force integration code. +Updates the body's linear and angular velocity by applying gravity and damping for the equivalent of one physics tick. .. rst-class:: classref-item-separator diff --git a/classes/class_physicsserver2d.rst b/classes/class_physicsserver2d.rst index 20254a92133f..e5351bd9231e 100644 --- a/classes/class_physicsserver2d.rst +++ b/classes/class_physicsserver2d.rst @@ -1863,7 +1863,7 @@ Returns the value of the given state of the body. See :ref:`BodyState` **body_is_omitting_force_integration**\ (\ body\: :ref:`RID`\ ) |const| -Returns ``true`` if the body uses a callback function to calculate its own physics (see :ref:`body_set_force_integration_callback`). +Returns ``true`` if the body is omitting the standard force integration. See :ref:`body_set_omit_force_integration`. .. rst-class:: classref-item-separator @@ -2001,15 +2001,17 @@ Continuous collision detection tries to predict where a moving body would collid |void| **body_set_force_integration_callback**\ (\ body\: :ref:`RID`, callable\: :ref:`Callable`, userdata\: :ref:`Variant` = null\ ) -Sets the function used to calculate physics for the body, if that body allows it (see :ref:`body_set_omit_force_integration`). +Sets the body's custom force integration callback function to ``callable``. Use an empty :ref:`Callable` (``Callable()``) to clear the custom callback. -The force integration function takes the following two parameters: +The function ``callable`` will be called every physics tick, before the standard force integration (see :ref:`body_set_omit_force_integration`). It can be used for example to update the body's linear and angular velocity based on contact with other bodies. -1. a :ref:`PhysicsDirectBodyState2D` ``state``: used to retrieve and modify the body's state, +If ``userdata`` is not ``null``, the function ``callable`` must take the following two parameters: -2. a :ref:`Variant` ``userdata``: optional user data. +1. ``state``: a :ref:`PhysicsDirectBodyState2D` used to retrieve and modify the body's state, -\ **Note:** This callback is currently not called in Godot Physics. +2. ``userdata``: a :ref:`Variant`; its value will be the ``userdata`` passed into this method. + +If ``userdata`` is ``null``, then ``callable`` must take only the ``state`` parameter. .. rst-class:: classref-item-separator @@ -2045,7 +2047,9 @@ Sets the body's mode. See :ref:`BodyMode` for the |void| **body_set_omit_force_integration**\ (\ body\: :ref:`RID`, enable\: :ref:`bool`\ ) -Sets whether the body uses a callback function to calculate its own physics (see :ref:`body_set_force_integration_callback`). +Sets whether the body omits the standard force integration. If ``enable`` is ``true``, the body will not automatically use applied forces, torques, and damping to update the body's linear and angular velocity. In this case, :ref:`body_set_force_integration_callback` can be used to manually update the linear and angular velocity instead. + +This method is called when the property :ref:`RigidBody2D.custom_integrator` is set. .. rst-class:: classref-item-separator diff --git a/classes/class_physicsserver2dextension.rst b/classes/class_physicsserver2dextension.rst index 066de7755af4..bfe353435933 100644 --- a/classes/class_physicsserver2dextension.rst +++ b/classes/class_physicsserver2dextension.rst @@ -328,9 +328,7 @@ Method Descriptions |void| **_area_add_shape**\ (\ area\: :ref:`RID`, shape\: :ref:`RID`, transform\: :ref:`Transform2D`, disabled\: :ref:`bool`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_add_shape`. .. rst-class:: classref-item-separator @@ -342,9 +340,7 @@ Method Descriptions |void| **_area_attach_canvas_instance_id**\ (\ area\: :ref:`RID`, id\: :ref:`int`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_attach_canvas_instance_id`. .. rst-class:: classref-item-separator @@ -356,9 +352,7 @@ Method Descriptions |void| **_area_attach_object_instance_id**\ (\ area\: :ref:`RID`, id\: :ref:`int`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_attach_object_instance_id`. .. rst-class:: classref-item-separator @@ -370,9 +364,7 @@ Method Descriptions |void| **_area_clear_shapes**\ (\ area\: :ref:`RID`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_clear_shapes`. .. rst-class:: classref-item-separator @@ -384,9 +376,7 @@ Method Descriptions :ref:`RID` **_area_create**\ (\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_create`. .. rst-class:: classref-item-separator @@ -398,9 +388,7 @@ Method Descriptions :ref:`int` **_area_get_canvas_instance_id**\ (\ area\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_get_canvas_instance_id`. .. rst-class:: classref-item-separator @@ -412,9 +400,7 @@ Method Descriptions :ref:`int` **_area_get_collision_layer**\ (\ area\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_get_collision_layer`. .. rst-class:: classref-item-separator @@ -426,9 +412,7 @@ Method Descriptions :ref:`int` **_area_get_collision_mask**\ (\ area\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_get_collision_mask`. .. rst-class:: classref-item-separator @@ -440,9 +424,7 @@ Method Descriptions :ref:`int` **_area_get_object_instance_id**\ (\ area\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_get_object_instance_id`. .. rst-class:: classref-item-separator @@ -454,9 +436,7 @@ Method Descriptions :ref:`Variant` **_area_get_param**\ (\ area\: :ref:`RID`, param\: :ref:`AreaParameter`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_get_param`. .. rst-class:: classref-item-separator @@ -468,9 +448,7 @@ Method Descriptions :ref:`RID` **_area_get_shape**\ (\ area\: :ref:`RID`, shape_idx\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_get_shape`. .. rst-class:: classref-item-separator @@ -482,9 +460,7 @@ Method Descriptions :ref:`int` **_area_get_shape_count**\ (\ area\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_get_shape_count`. .. rst-class:: classref-item-separator @@ -496,9 +472,7 @@ Method Descriptions :ref:`Transform2D` **_area_get_shape_transform**\ (\ area\: :ref:`RID`, shape_idx\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_get_shape_transform`. .. rst-class:: classref-item-separator @@ -510,9 +484,7 @@ Method Descriptions :ref:`RID` **_area_get_space**\ (\ area\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_get_space`. .. rst-class:: classref-item-separator @@ -524,9 +496,7 @@ Method Descriptions :ref:`Transform2D` **_area_get_transform**\ (\ area\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_get_transform`. .. rst-class:: classref-item-separator @@ -538,9 +508,7 @@ Method Descriptions |void| **_area_remove_shape**\ (\ area\: :ref:`RID`, shape_idx\: :ref:`int`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_remove_shape`. .. rst-class:: classref-item-separator @@ -552,9 +520,7 @@ Method Descriptions |void| **_area_set_area_monitor_callback**\ (\ area\: :ref:`RID`, callback\: :ref:`Callable`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_set_area_monitor_callback`. .. rst-class:: classref-item-separator @@ -566,9 +532,7 @@ Method Descriptions |void| **_area_set_collision_layer**\ (\ area\: :ref:`RID`, layer\: :ref:`int`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_set_collision_layer`. .. rst-class:: classref-item-separator @@ -580,9 +544,7 @@ Method Descriptions |void| **_area_set_collision_mask**\ (\ area\: :ref:`RID`, mask\: :ref:`int`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_set_collision_mask`. .. rst-class:: classref-item-separator @@ -594,9 +556,7 @@ Method Descriptions |void| **_area_set_monitor_callback**\ (\ area\: :ref:`RID`, callback\: :ref:`Callable`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_set_monitor_callback`. .. rst-class:: classref-item-separator @@ -608,9 +568,7 @@ Method Descriptions |void| **_area_set_monitorable**\ (\ area\: :ref:`RID`, monitorable\: :ref:`bool`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_set_monitorable`. .. rst-class:: classref-item-separator @@ -622,9 +580,7 @@ Method Descriptions |void| **_area_set_param**\ (\ area\: :ref:`RID`, param\: :ref:`AreaParameter`, value\: :ref:`Variant`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_set_param`. .. rst-class:: classref-item-separator @@ -636,9 +592,9 @@ Method Descriptions |void| **_area_set_pickable**\ (\ area\: :ref:`RID`, pickable\: :ref:`bool`\ ) |virtual| -.. container:: contribute +If set to ``true``, allows the area with the given :ref:`RID` to detect mouse inputs when the mouse cursor is hovering on it. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D`'s internal ``area_set_pickable`` method. Corresponds to :ref:`CollisionObject2D.input_pickable`. .. rst-class:: classref-item-separator @@ -650,9 +606,7 @@ Method Descriptions |void| **_area_set_shape**\ (\ area\: :ref:`RID`, shape_idx\: :ref:`int`, shape\: :ref:`RID`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_set_shape`. .. rst-class:: classref-item-separator @@ -664,9 +618,7 @@ Method Descriptions |void| **_area_set_shape_disabled**\ (\ area\: :ref:`RID`, shape_idx\: :ref:`int`, disabled\: :ref:`bool`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_set_shape_disabled`. .. rst-class:: classref-item-separator @@ -678,9 +630,7 @@ Method Descriptions |void| **_area_set_shape_transform**\ (\ area\: :ref:`RID`, shape_idx\: :ref:`int`, transform\: :ref:`Transform2D`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_set_shape_transform`. .. rst-class:: classref-item-separator @@ -692,9 +642,7 @@ Method Descriptions |void| **_area_set_space**\ (\ area\: :ref:`RID`, space\: :ref:`RID`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_set_space`. .. rst-class:: classref-item-separator @@ -706,9 +654,7 @@ Method Descriptions |void| **_area_set_transform**\ (\ area\: :ref:`RID`, transform\: :ref:`Transform2D`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.area_set_transform`. .. rst-class:: classref-item-separator @@ -720,9 +666,7 @@ Method Descriptions |void| **_body_add_collision_exception**\ (\ body\: :ref:`RID`, excepted_body\: :ref:`RID`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_add_collision_exception`. .. rst-class:: classref-item-separator @@ -734,9 +678,7 @@ Method Descriptions |void| **_body_add_constant_central_force**\ (\ body\: :ref:`RID`, force\: :ref:`Vector2`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_add_constant_central_force`. .. rst-class:: classref-item-separator @@ -748,9 +690,7 @@ Method Descriptions |void| **_body_add_constant_force**\ (\ body\: :ref:`RID`, force\: :ref:`Vector2`, position\: :ref:`Vector2`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_add_constant_force`. .. rst-class:: classref-item-separator @@ -762,9 +702,7 @@ Method Descriptions |void| **_body_add_constant_torque**\ (\ body\: :ref:`RID`, torque\: :ref:`float`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_add_constant_torque`. .. rst-class:: classref-item-separator @@ -776,9 +714,7 @@ Method Descriptions |void| **_body_add_shape**\ (\ body\: :ref:`RID`, shape\: :ref:`RID`, transform\: :ref:`Transform2D`, disabled\: :ref:`bool`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_add_shape`. .. rst-class:: classref-item-separator @@ -790,9 +726,7 @@ Method Descriptions |void| **_body_apply_central_force**\ (\ body\: :ref:`RID`, force\: :ref:`Vector2`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_apply_central_force`. .. rst-class:: classref-item-separator @@ -804,9 +738,7 @@ Method Descriptions |void| **_body_apply_central_impulse**\ (\ body\: :ref:`RID`, impulse\: :ref:`Vector2`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_apply_central_impulse`. .. rst-class:: classref-item-separator @@ -818,9 +750,7 @@ Method Descriptions |void| **_body_apply_force**\ (\ body\: :ref:`RID`, force\: :ref:`Vector2`, position\: :ref:`Vector2`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_apply_force`. .. rst-class:: classref-item-separator @@ -832,9 +762,7 @@ Method Descriptions |void| **_body_apply_impulse**\ (\ body\: :ref:`RID`, impulse\: :ref:`Vector2`, position\: :ref:`Vector2`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_apply_impulse`. .. rst-class:: classref-item-separator @@ -846,9 +774,7 @@ Method Descriptions |void| **_body_apply_torque**\ (\ body\: :ref:`RID`, torque\: :ref:`float`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_apply_torque`. .. rst-class:: classref-item-separator @@ -860,9 +786,7 @@ Method Descriptions |void| **_body_apply_torque_impulse**\ (\ body\: :ref:`RID`, impulse\: :ref:`float`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_apply_torque_impulse`. .. rst-class:: classref-item-separator @@ -874,9 +798,7 @@ Method Descriptions |void| **_body_attach_canvas_instance_id**\ (\ body\: :ref:`RID`, id\: :ref:`int`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_attach_canvas_instance_id`. .. rst-class:: classref-item-separator @@ -888,9 +810,7 @@ Method Descriptions |void| **_body_attach_object_instance_id**\ (\ body\: :ref:`RID`, id\: :ref:`int`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_attach_object_instance_id`. .. rst-class:: classref-item-separator @@ -902,9 +822,7 @@ Method Descriptions |void| **_body_clear_shapes**\ (\ body\: :ref:`RID`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_clear_shapes`. .. rst-class:: classref-item-separator @@ -916,9 +834,9 @@ Method Descriptions :ref:`bool` **_body_collide_shape**\ (\ body\: :ref:`RID`, body_shape\: :ref:`int`, shape\: :ref:`RID`, shape_xform\: :ref:`Transform2D`, motion\: :ref:`Vector2`, results\: ``void*``, result_max\: :ref:`int`, result_count\: ``int32_t*``\ ) |virtual| -.. container:: contribute +Given a ``body``, a ``shape``, and their respective parameters, this method should return ``true`` if a collision between the two would occur, with additional details passed in ``results``. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D`'s internal ``shape_collide`` method. Corresponds to :ref:`PhysicsDirectSpaceState2D.collide_shape`. .. rst-class:: classref-item-separator @@ -930,9 +848,7 @@ Method Descriptions :ref:`RID` **_body_create**\ (\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_create`. .. rst-class:: classref-item-separator @@ -944,9 +860,7 @@ Method Descriptions :ref:`int` **_body_get_canvas_instance_id**\ (\ body\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_get_canvas_instance_id`. .. rst-class:: classref-item-separator @@ -958,9 +872,9 @@ Method Descriptions :ref:`Array`\[:ref:`RID`\] **_body_get_collision_exceptions**\ (\ body\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +Returns the :ref:`RID`\ s of all bodies added as collision exceptions for the given ``body``. See also :ref:`_body_add_collision_exception` and :ref:`_body_remove_collision_exception`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D`'s internal ``body_get_collision_exceptions`` method. Corresponds to :ref:`PhysicsBody2D.get_collision_exceptions`. .. rst-class:: classref-item-separator @@ -972,9 +886,7 @@ Method Descriptions :ref:`int` **_body_get_collision_layer**\ (\ body\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_get_collision_layer`. .. rst-class:: classref-item-separator @@ -986,9 +898,7 @@ Method Descriptions :ref:`int` **_body_get_collision_mask**\ (\ body\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_get_collision_mask`. .. rst-class:: classref-item-separator @@ -1000,9 +910,7 @@ Method Descriptions :ref:`float` **_body_get_collision_priority**\ (\ body\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_get_collision_priority`. .. rst-class:: classref-item-separator @@ -1014,9 +922,7 @@ Method Descriptions :ref:`Vector2` **_body_get_constant_force**\ (\ body\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_get_constant_force`. .. rst-class:: classref-item-separator @@ -1028,9 +934,7 @@ Method Descriptions :ref:`float` **_body_get_constant_torque**\ (\ body\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_get_constant_torque`. .. rst-class:: classref-item-separator @@ -1042,9 +946,9 @@ Method Descriptions :ref:`float` **_body_get_contacts_reported_depth_threshold**\ (\ body\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +Overridable version of :ref:`PhysicsServer2D`'s internal ``body_get_contacts_reported_depth_threshold`` method. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** This method is currently unused by Godot's default physics implementation. .. rst-class:: classref-item-separator @@ -1056,9 +960,7 @@ Method Descriptions :ref:`CCDMode` **_body_get_continuous_collision_detection_mode**\ (\ body\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_get_continuous_collision_detection_mode`. .. rst-class:: classref-item-separator @@ -1070,9 +972,7 @@ Method Descriptions :ref:`PhysicsDirectBodyState2D` **_body_get_direct_state**\ (\ body\: :ref:`RID`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_get_direct_state`. .. rst-class:: classref-item-separator @@ -1084,9 +984,7 @@ Method Descriptions :ref:`int` **_body_get_max_contacts_reported**\ (\ body\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_get_max_contacts_reported`. .. rst-class:: classref-item-separator @@ -1098,9 +996,7 @@ Method Descriptions :ref:`BodyMode` **_body_get_mode**\ (\ body\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_get_mode`. .. rst-class:: classref-item-separator @@ -1112,9 +1008,7 @@ Method Descriptions :ref:`int` **_body_get_object_instance_id**\ (\ body\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_get_object_instance_id`. .. rst-class:: classref-item-separator @@ -1126,9 +1020,7 @@ Method Descriptions :ref:`Variant` **_body_get_param**\ (\ body\: :ref:`RID`, param\: :ref:`BodyParameter`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_get_param`. .. rst-class:: classref-item-separator @@ -1140,9 +1032,7 @@ Method Descriptions :ref:`RID` **_body_get_shape**\ (\ body\: :ref:`RID`, shape_idx\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_get_shape`. .. rst-class:: classref-item-separator @@ -1154,9 +1044,7 @@ Method Descriptions :ref:`int` **_body_get_shape_count**\ (\ body\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_get_shape_count`. .. rst-class:: classref-item-separator @@ -1168,9 +1056,7 @@ Method Descriptions :ref:`Transform2D` **_body_get_shape_transform**\ (\ body\: :ref:`RID`, shape_idx\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_get_shape_transform`. .. rst-class:: classref-item-separator @@ -1182,9 +1068,7 @@ Method Descriptions :ref:`RID` **_body_get_space**\ (\ body\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_get_space`. .. rst-class:: classref-item-separator @@ -1196,9 +1080,7 @@ Method Descriptions :ref:`Variant` **_body_get_state**\ (\ body\: :ref:`RID`, state\: :ref:`BodyState`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_get_state`. .. rst-class:: classref-item-separator @@ -1210,9 +1092,7 @@ Method Descriptions :ref:`bool` **_body_is_omitting_force_integration**\ (\ body\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_is_omitting_force_integration`. .. rst-class:: classref-item-separator @@ -1224,9 +1104,7 @@ Method Descriptions |void| **_body_remove_collision_exception**\ (\ body\: :ref:`RID`, excepted_body\: :ref:`RID`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_remove_collision_exception`. .. rst-class:: classref-item-separator @@ -1238,9 +1116,7 @@ Method Descriptions |void| **_body_remove_shape**\ (\ body\: :ref:`RID`, shape_idx\: :ref:`int`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_remove_shape`. .. rst-class:: classref-item-separator @@ -1252,9 +1128,7 @@ Method Descriptions |void| **_body_reset_mass_properties**\ (\ body\: :ref:`RID`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_reset_mass_properties`. .. rst-class:: classref-item-separator @@ -1266,9 +1140,7 @@ Method Descriptions |void| **_body_set_axis_velocity**\ (\ body\: :ref:`RID`, axis_velocity\: :ref:`Vector2`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_set_axis_velocity`. .. rst-class:: classref-item-separator @@ -1280,9 +1152,7 @@ Method Descriptions |void| **_body_set_collision_layer**\ (\ body\: :ref:`RID`, layer\: :ref:`int`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_set_collision_layer`. .. rst-class:: classref-item-separator @@ -1294,9 +1164,7 @@ Method Descriptions |void| **_body_set_collision_mask**\ (\ body\: :ref:`RID`, mask\: :ref:`int`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_set_collision_mask`. .. rst-class:: classref-item-separator @@ -1308,9 +1176,7 @@ Method Descriptions |void| **_body_set_collision_priority**\ (\ body\: :ref:`RID`, priority\: :ref:`float`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_set_collision_priority`. .. rst-class:: classref-item-separator @@ -1322,9 +1188,7 @@ Method Descriptions |void| **_body_set_constant_force**\ (\ body\: :ref:`RID`, force\: :ref:`Vector2`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_set_constant_force`. .. rst-class:: classref-item-separator @@ -1336,9 +1200,7 @@ Method Descriptions |void| **_body_set_constant_torque**\ (\ body\: :ref:`RID`, torque\: :ref:`float`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_set_constant_torque`. .. rst-class:: classref-item-separator @@ -1350,9 +1212,9 @@ Method Descriptions |void| **_body_set_contacts_reported_depth_threshold**\ (\ body\: :ref:`RID`, threshold\: :ref:`float`\ ) |virtual| -.. container:: contribute +Overridable version of :ref:`PhysicsServer2D`'s internal ``body_set_contacts_reported_depth_threshold`` method. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** This method is currently unused by Godot's default physics implementation. .. rst-class:: classref-item-separator @@ -1364,9 +1226,7 @@ Method Descriptions |void| **_body_set_continuous_collision_detection_mode**\ (\ body\: :ref:`RID`, mode\: :ref:`CCDMode`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_set_continuous_collision_detection_mode`. .. rst-class:: classref-item-separator @@ -1378,9 +1238,7 @@ Method Descriptions |void| **_body_set_force_integration_callback**\ (\ body\: :ref:`RID`, callable\: :ref:`Callable`, userdata\: :ref:`Variant`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_set_force_integration_callback`. .. rst-class:: classref-item-separator @@ -1392,9 +1250,7 @@ Method Descriptions |void| **_body_set_max_contacts_reported**\ (\ body\: :ref:`RID`, amount\: :ref:`int`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_set_max_contacts_reported`. .. rst-class:: classref-item-separator @@ -1406,9 +1262,7 @@ Method Descriptions |void| **_body_set_mode**\ (\ body\: :ref:`RID`, mode\: :ref:`BodyMode`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_set_mode`. .. rst-class:: classref-item-separator @@ -1420,9 +1274,7 @@ Method Descriptions |void| **_body_set_omit_force_integration**\ (\ body\: :ref:`RID`, enable\: :ref:`bool`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_set_omit_force_integration`. .. rst-class:: classref-item-separator @@ -1434,9 +1286,7 @@ Method Descriptions |void| **_body_set_param**\ (\ body\: :ref:`RID`, param\: :ref:`BodyParameter`, value\: :ref:`Variant`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_set_param`. .. rst-class:: classref-item-separator @@ -1448,9 +1298,9 @@ Method Descriptions |void| **_body_set_pickable**\ (\ body\: :ref:`RID`, pickable\: :ref:`bool`\ ) |virtual| -.. container:: contribute +If set to ``true``, allows the body with the given :ref:`RID` to detect mouse inputs when the mouse cursor is hovering on it. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D`'s internal ``body_set_pickable`` method. Corresponds to :ref:`CollisionObject2D.input_pickable`. .. rst-class:: classref-item-separator @@ -1462,9 +1312,7 @@ Method Descriptions |void| **_body_set_shape**\ (\ body\: :ref:`RID`, shape_idx\: :ref:`int`, shape\: :ref:`RID`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_set_shape`. .. rst-class:: classref-item-separator @@ -1476,9 +1324,7 @@ Method Descriptions |void| **_body_set_shape_as_one_way_collision**\ (\ body\: :ref:`RID`, shape_idx\: :ref:`int`, enable\: :ref:`bool`, margin\: :ref:`float`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_set_shape_as_one_way_collision`. .. rst-class:: classref-item-separator @@ -1490,9 +1336,7 @@ Method Descriptions |void| **_body_set_shape_disabled**\ (\ body\: :ref:`RID`, shape_idx\: :ref:`int`, disabled\: :ref:`bool`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_set_shape_disabled`. .. rst-class:: classref-item-separator @@ -1504,9 +1348,7 @@ Method Descriptions |void| **_body_set_shape_transform**\ (\ body\: :ref:`RID`, shape_idx\: :ref:`int`, transform\: :ref:`Transform2D`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_set_shape_transform`. .. rst-class:: classref-item-separator @@ -1518,9 +1360,7 @@ Method Descriptions |void| **_body_set_space**\ (\ body\: :ref:`RID`, space\: :ref:`RID`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_set_space`. .. rst-class:: classref-item-separator @@ -1532,9 +1372,7 @@ Method Descriptions |void| **_body_set_state**\ (\ body\: :ref:`RID`, state\: :ref:`BodyState`, value\: :ref:`Variant`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_set_state`. .. rst-class:: classref-item-separator @@ -1546,9 +1384,9 @@ Method Descriptions |void| **_body_set_state_sync_callback**\ (\ body\: :ref:`RID`, callable\: :ref:`Callable`\ ) |virtual| -.. container:: contribute +Assigns the ``body`` to call the given ``callable`` during the synchronization phase of the loop, before :ref:`_step` is called. See also :ref:`_sync`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D`'s internal ``body_set_state_sync_callback`` method. .. rst-class:: classref-item-separator @@ -1560,9 +1398,7 @@ Method Descriptions :ref:`bool` **_body_test_motion**\ (\ body\: :ref:`RID`, from\: :ref:`Transform2D`, motion\: :ref:`Vector2`, margin\: :ref:`float`, collide_separation_ray\: :ref:`bool`, recovery_as_collision\: :ref:`bool`, result\: ``PhysicsServer2DExtensionMotionResult*``\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.body_test_motion`. Unlike the exposed implementation, this method does not receive all of the arguments inside a :ref:`PhysicsTestMotionParameters2D`. .. rst-class:: classref-item-separator @@ -1574,9 +1410,7 @@ Method Descriptions :ref:`RID` **_capsule_shape_create**\ (\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.capsule_shape_create`. .. rst-class:: classref-item-separator @@ -1588,9 +1422,7 @@ Method Descriptions :ref:`RID` **_circle_shape_create**\ (\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.circle_shape_create`. .. rst-class:: classref-item-separator @@ -1602,9 +1434,7 @@ Method Descriptions :ref:`RID` **_concave_polygon_shape_create**\ (\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.concave_polygon_shape_create`. .. rst-class:: classref-item-separator @@ -1616,9 +1446,7 @@ Method Descriptions :ref:`RID` **_convex_polygon_shape_create**\ (\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.convex_polygon_shape_create`. .. rst-class:: classref-item-separator @@ -1630,9 +1458,7 @@ Method Descriptions :ref:`float` **_damped_spring_joint_get_param**\ (\ joint\: :ref:`RID`, param\: :ref:`DampedSpringParam`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.damped_spring_joint_get_param`. .. rst-class:: classref-item-separator @@ -1644,9 +1470,7 @@ Method Descriptions |void| **_damped_spring_joint_set_param**\ (\ joint\: :ref:`RID`, param\: :ref:`DampedSpringParam`, value\: :ref:`float`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.damped_spring_joint_set_param`. .. rst-class:: classref-item-separator @@ -1658,9 +1482,9 @@ Method Descriptions |void| **_end_sync**\ (\ ) |virtual| -.. container:: contribute +Called to indicate that the physics server has stopped synchronizing. It is in the loop's iteration/physics phase, and can access physics objects even if running on a separate thread. See also :ref:`_sync`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D`'s internal ``end_sync`` method. .. rst-class:: classref-item-separator @@ -1672,9 +1496,9 @@ Method Descriptions |void| **_finish**\ (\ ) |virtual| -.. container:: contribute +Called when the main loop finalizes to shut down the physics server. See also :ref:`MainLoop._finalize` and :ref:`_init`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D`'s internal ``finish`` method. .. rst-class:: classref-item-separator @@ -1686,9 +1510,9 @@ Method Descriptions |void| **_flush_queries**\ (\ ) |virtual| -.. container:: contribute +Called every physics step before :ref:`_step` to process all remaining queries. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D`'s internal ``flush_queries`` method. .. rst-class:: classref-item-separator @@ -1700,9 +1524,7 @@ Method Descriptions |void| **_free_rid**\ (\ rid\: :ref:`RID`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.free_rid`. .. rst-class:: classref-item-separator @@ -1714,9 +1536,7 @@ Method Descriptions :ref:`int` **_get_process_info**\ (\ process_info\: :ref:`ProcessInfo`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.get_process_info`. .. rst-class:: classref-item-separator @@ -1728,9 +1548,9 @@ Method Descriptions |void| **_init**\ (\ ) |virtual| -.. container:: contribute +Called when the main loop is initialized and creates a new instance of this physics server. See also :ref:`MainLoop._initialize` and :ref:`_finish`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D`'s internal ``init`` method. .. rst-class:: classref-item-separator @@ -1742,9 +1562,9 @@ Method Descriptions :ref:`bool` **_is_flushing_queries**\ (\ ) |virtual| |const| -.. container:: contribute +Overridable method that should return ``true`` when the physics server is processing queries. See also :ref:`_flush_queries`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D`'s internal ``is_flushing_queries`` method. .. rst-class:: classref-item-separator @@ -1756,9 +1576,7 @@ Method Descriptions |void| **_joint_clear**\ (\ joint\: :ref:`RID`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.joint_clear`. .. rst-class:: classref-item-separator @@ -1770,9 +1588,7 @@ Method Descriptions :ref:`RID` **_joint_create**\ (\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.joint_create`. .. rst-class:: classref-item-separator @@ -1784,9 +1600,7 @@ Method Descriptions |void| **_joint_disable_collisions_between_bodies**\ (\ joint\: :ref:`RID`, disable\: :ref:`bool`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.joint_disable_collisions_between_bodies`. .. rst-class:: classref-item-separator @@ -1798,9 +1612,7 @@ Method Descriptions :ref:`float` **_joint_get_param**\ (\ joint\: :ref:`RID`, param\: :ref:`JointParam`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.joint_get_param`. .. rst-class:: classref-item-separator @@ -1812,9 +1624,7 @@ Method Descriptions :ref:`JointType` **_joint_get_type**\ (\ joint\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.joint_get_type`. .. rst-class:: classref-item-separator @@ -1826,9 +1636,7 @@ Method Descriptions :ref:`bool` **_joint_is_disabled_collisions_between_bodies**\ (\ joint\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.joint_is_disabled_collisions_between_bodies`. .. rst-class:: classref-item-separator @@ -1840,9 +1648,7 @@ Method Descriptions |void| **_joint_make_damped_spring**\ (\ joint\: :ref:`RID`, anchor_a\: :ref:`Vector2`, anchor_b\: :ref:`Vector2`, body_a\: :ref:`RID`, body_b\: :ref:`RID`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.joint_make_damped_spring`. .. rst-class:: classref-item-separator @@ -1854,9 +1660,7 @@ Method Descriptions |void| **_joint_make_groove**\ (\ joint\: :ref:`RID`, a_groove1\: :ref:`Vector2`, a_groove2\: :ref:`Vector2`, b_anchor\: :ref:`Vector2`, body_a\: :ref:`RID`, body_b\: :ref:`RID`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.joint_make_groove`. .. rst-class:: classref-item-separator @@ -1868,9 +1672,7 @@ Method Descriptions |void| **_joint_make_pin**\ (\ joint\: :ref:`RID`, anchor\: :ref:`Vector2`, body_a\: :ref:`RID`, body_b\: :ref:`RID`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.joint_make_pin`. .. rst-class:: classref-item-separator @@ -1882,9 +1684,7 @@ Method Descriptions |void| **_joint_set_param**\ (\ joint\: :ref:`RID`, param\: :ref:`JointParam`, value\: :ref:`float`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.joint_set_param`. .. rst-class:: classref-item-separator @@ -1896,9 +1696,7 @@ Method Descriptions :ref:`bool` **_pin_joint_get_flag**\ (\ joint\: :ref:`RID`, flag\: :ref:`PinJointFlag`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.pin_joint_get_flag`. .. rst-class:: classref-item-separator @@ -1910,9 +1708,7 @@ Method Descriptions :ref:`float` **_pin_joint_get_param**\ (\ joint\: :ref:`RID`, param\: :ref:`PinJointParam`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.pin_joint_get_param`. .. rst-class:: classref-item-separator @@ -1924,9 +1720,7 @@ Method Descriptions |void| **_pin_joint_set_flag**\ (\ joint\: :ref:`RID`, flag\: :ref:`PinJointFlag`, enabled\: :ref:`bool`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.pin_joint_set_flag`. .. rst-class:: classref-item-separator @@ -1938,9 +1732,7 @@ Method Descriptions |void| **_pin_joint_set_param**\ (\ joint\: :ref:`RID`, param\: :ref:`PinJointParam`, value\: :ref:`float`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.pin_joint_set_param`. .. rst-class:: classref-item-separator @@ -1952,9 +1744,7 @@ Method Descriptions :ref:`RID` **_rectangle_shape_create**\ (\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.rectangle_shape_create`. .. rst-class:: classref-item-separator @@ -1966,9 +1756,7 @@ Method Descriptions :ref:`RID` **_segment_shape_create**\ (\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.segment_shape_create`. .. rst-class:: classref-item-separator @@ -1980,9 +1768,7 @@ Method Descriptions :ref:`RID` **_separation_ray_shape_create**\ (\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.separation_ray_shape_create`. .. rst-class:: classref-item-separator @@ -1994,9 +1780,7 @@ Method Descriptions |void| **_set_active**\ (\ active\: :ref:`bool`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.set_active`. .. rst-class:: classref-item-separator @@ -2008,9 +1792,9 @@ Method Descriptions :ref:`bool` **_shape_collide**\ (\ shape_A\: :ref:`RID`, xform_A\: :ref:`Transform2D`, motion_A\: :ref:`Vector2`, shape_B\: :ref:`RID`, xform_B\: :ref:`Transform2D`, motion_B\: :ref:`Vector2`, results\: ``void*``, result_max\: :ref:`int`, result_count\: ``int32_t*``\ ) |virtual| -.. container:: contribute +Given two shapes and their parameters, should return ``true`` if a collision between the two would occur, with additional details passed in ``results``. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D`'s internal ``shape_collide`` method. Corresponds to :ref:`PhysicsDirectSpaceState2D.collide_shape`. .. rst-class:: classref-item-separator @@ -2022,9 +1806,9 @@ Method Descriptions :ref:`float` **_shape_get_custom_solver_bias**\ (\ shape\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +Should return the custom solver bias of the given ``shape``, which defines how much bodies are forced to separate on contact when this shape is involved. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D`'s internal ``shape_get_custom_solver_bias`` method. Corresponds to :ref:`Shape2D.custom_solver_bias`. .. rst-class:: classref-item-separator @@ -2036,9 +1820,7 @@ Method Descriptions :ref:`Variant` **_shape_get_data**\ (\ shape\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.shape_get_data`. .. rst-class:: classref-item-separator @@ -2050,9 +1832,7 @@ Method Descriptions :ref:`ShapeType` **_shape_get_type**\ (\ shape\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.shape_get_type`. .. rst-class:: classref-item-separator @@ -2064,9 +1844,9 @@ Method Descriptions |void| **_shape_set_custom_solver_bias**\ (\ shape\: :ref:`RID`, bias\: :ref:`float`\ ) |virtual| -.. container:: contribute +Should set the custom solver bias for the given ``shape``. It defines how much bodies are forced to separate on contact. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D`'s internal ``shape_get_custom_solver_bias`` method. Corresponds to :ref:`Shape2D.custom_solver_bias`. .. rst-class:: classref-item-separator @@ -2078,9 +1858,7 @@ Method Descriptions |void| **_shape_set_data**\ (\ shape\: :ref:`RID`, data\: :ref:`Variant`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.shape_set_data`. .. rst-class:: classref-item-separator @@ -2092,9 +1870,7 @@ Method Descriptions :ref:`RID` **_space_create**\ (\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.space_create`. .. rst-class:: classref-item-separator @@ -2106,9 +1882,9 @@ Method Descriptions :ref:`int` **_space_get_contact_count**\ (\ space\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +Should return how many contacts have occurred during the last physics step in the given ``space``. See also :ref:`_space_get_contacts` and :ref:`_space_set_debug_contacts`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D`'s internal ``space_get_contact_count`` method. .. rst-class:: classref-item-separator @@ -2120,9 +1896,9 @@ Method Descriptions :ref:`PackedVector2Array` **_space_get_contacts**\ (\ space\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +Should return the positions of all contacts that have occurred during the last physics step in the given ``space``. See also :ref:`_space_get_contact_count` and :ref:`_space_set_debug_contacts`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D`'s internal ``space_get_contacts`` method. .. rst-class:: classref-item-separator @@ -2134,9 +1910,7 @@ Method Descriptions :ref:`PhysicsDirectSpaceState2D` **_space_get_direct_state**\ (\ space\: :ref:`RID`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.space_get_direct_state`. .. rst-class:: classref-item-separator @@ -2148,9 +1922,7 @@ Method Descriptions :ref:`float` **_space_get_param**\ (\ space\: :ref:`RID`, param\: :ref:`SpaceParameter`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.space_get_param`. .. rst-class:: classref-item-separator @@ -2162,9 +1934,7 @@ Method Descriptions :ref:`bool` **_space_is_active**\ (\ space\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.space_is_active`. .. rst-class:: classref-item-separator @@ -2176,9 +1946,7 @@ Method Descriptions |void| **_space_set_active**\ (\ space\: :ref:`RID`, active\: :ref:`bool`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.space_set_active`. .. rst-class:: classref-item-separator @@ -2190,9 +1958,9 @@ Method Descriptions |void| **_space_set_debug_contacts**\ (\ space\: :ref:`RID`, max_contacts\: :ref:`int`\ ) |virtual| -.. container:: contribute +Used internally to allow the given ``space`` to store contact points, up to ``max_contacts``. This is automatically set for the main :ref:`World2D`'s space when :ref:`SceneTree.debug_collisions_hint` is ``true``, or by checking "Visible Collision Shapes" in the editor. Only works in debug builds. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D`'s internal ``space_set_debug_contacts`` method. .. rst-class:: classref-item-separator @@ -2204,9 +1972,7 @@ Method Descriptions |void| **_space_set_param**\ (\ space\: :ref:`RID`, param\: :ref:`SpaceParameter`, value\: :ref:`float`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.space_set_param`. .. rst-class:: classref-item-separator @@ -2218,9 +1984,9 @@ Method Descriptions |void| **_step**\ (\ step\: :ref:`float`\ ) |virtual| -.. container:: contribute +Called every physics step to process the physics simulation. ``step`` is the time elapsed since the last physics step, in seconds. It is usually the same as :ref:`Node.get_physics_process_delta_time`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D`'s internal ``step`` method. .. rst-class:: classref-item-separator @@ -2232,9 +1998,9 @@ Method Descriptions |void| **_sync**\ (\ ) |virtual| -.. container:: contribute +Called to indicate that the physics server is synchronizing and cannot access physics states if running on a separate thread. See also :ref:`_end_sync`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D`'s internal ``sync`` method. .. rst-class:: classref-item-separator @@ -2246,9 +2012,7 @@ Method Descriptions :ref:`RID` **_world_boundary_shape_create**\ (\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable version of :ref:`PhysicsServer2D.world_boundary_shape_create`. .. rst-class:: classref-item-separator @@ -2260,9 +2024,7 @@ Method Descriptions :ref:`bool` **body_test_motion_is_excluding_body**\ (\ body\: :ref:`RID`\ ) |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if the body with the given :ref:`RID` is being excluded from :ref:`_body_test_motion`. See also :ref:`Object.get_instance_id`. .. rst-class:: classref-item-separator @@ -2274,9 +2036,7 @@ Method Descriptions :ref:`bool` **body_test_motion_is_excluding_object**\ (\ object\: :ref:`int`\ ) |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if the object with the given instance ID is being excluded from :ref:`_body_test_motion`. See also :ref:`Object.get_instance_id`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_physicsserver3d.rst b/classes/class_physicsserver3d.rst index a6749212442d..fba5e41bd3af 100644 --- a/classes/class_physicsserver3d.rst +++ b/classes/class_physicsserver3d.rst @@ -904,6 +904,42 @@ The velocity that the joint's linear motor will attempt to reach. The maximum force that the linear motor can apply while trying to reach the target velocity. +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_LINEAR_SPRING_STIFFNESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_LINEAR_SPRING_STIFFNESS** = ``7`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_LINEAR_SPRING_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_LINEAR_SPRING_DAMPING** = ``8`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_LINEAR_SPRING_EQUILIBRIUM_POINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_LINEAR_SPRING_EQUILIBRIUM_POINT** = ``9`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + .. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_LOWER_LIMIT: .. rst-class:: classref-enumeration-constant @@ -976,6 +1012,50 @@ Target speed for the motor at the axes. Maximum acceleration for the motor at the axes. +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_SPRING_STIFFNESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_ANGULAR_SPRING_STIFFNESS** = ``19`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_SPRING_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_ANGULAR_SPRING_DAMPING** = ``20`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_SPRING_EQUILIBRIUM_POINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_ANGULAR_SPRING_EQUILIBRIUM_POINT** = ``21`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_MAX** = ``22`` + +Represents the size of the :ref:`G6DOFJointAxisParam` enum. + .. rst-class:: classref-item-separator ---- @@ -1002,6 +1082,30 @@ If set, linear motion is possible within the given limits. If set, rotational motion is possible. +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_FLAG_ENABLE_ANGULAR_SPRING: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisFlag` **G6DOF_JOINT_FLAG_ENABLE_ANGULAR_SPRING** = ``2`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_FLAG_ENABLE_LINEAR_SPRING: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisFlag` **G6DOF_JOINT_FLAG_ENABLE_LINEAR_SPRING** = ``3`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + .. _class_PhysicsServer3D_constant_G6DOF_JOINT_FLAG_ENABLE_MOTOR: .. rst-class:: classref-enumeration-constant @@ -1018,6 +1122,14 @@ If set, there is a rotational motor across these axes. If set, there is a linear motor on this axis that targets a specific velocity. +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_FLAG_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisFlag` **G6DOF_JOINT_FLAG_MAX** = ``6`` + +Represents the size of the :ref:`G6DOFJointAxisFlag` enum. + .. rst-class:: classref-item-separator ---- @@ -1214,7 +1326,7 @@ Constant to set/get the priority (order of processing) of an area. :ref:`AreaParameter` **AREA_PARAM_WIND_FORCE_MAGNITUDE** = ``10`` -Constant to set/get the magnitude of area-specific wind force. +Constant to set/get the magnitude of area-specific wind force. This wind force only applies to :ref:`SoftBody3D` nodes. Other physics bodies are currently not affected by wind. .. _class_PhysicsServer3D_constant_AREA_PARAM_WIND_SOURCE: @@ -2475,7 +2587,7 @@ If ``true``, the continuous collision detection mode is enabled. :ref:`bool` **body_is_omitting_force_integration**\ (\ body\: :ref:`RID`\ ) |const| -Returns whether a body uses a callback function to calculate its own physics (see :ref:`body_set_force_integration_callback`). +Returns ``true`` if the body is omitting the standard force integration. See :ref:`body_set_omit_force_integration`. .. rst-class:: classref-item-separator @@ -2629,11 +2741,17 @@ Continuous collision detection tries to predict where a moving body will collide |void| **body_set_force_integration_callback**\ (\ body\: :ref:`RID`, callable\: :ref:`Callable`, userdata\: :ref:`Variant` = null\ ) -Sets the function used to calculate physics for an object, if that object allows it (see :ref:`body_set_omit_force_integration`). The force integration function takes 2 arguments: +Sets the body's custom force integration callback function to ``callable``. Use an empty :ref:`Callable` (``Callable()``) to clear the custom callback. + +The function ``callable`` will be called every physics tick, before the standard force integration (see :ref:`body_set_omit_force_integration`). It can be used for example to update the body's linear and angular velocity based on contact with other bodies. -- ``state`` — :ref:`PhysicsDirectBodyState3D` used to retrieve and modify the body's state. +If ``userdata`` is not ``null``, the function ``callable`` must take the following two parameters: -- ``userdata`` — optional user data passed to :ref:`body_set_force_integration_callback`. +1. ``state``: a :ref:`PhysicsDirectBodyState3D`, used to retrieve and modify the body's state, + +2. ``userdata``: a :ref:`Variant`; its value will be the ``userdata`` passed into this method. + +If ``userdata`` is ``null``, then ``callable`` must take only the ``state`` parameter. .. rst-class:: classref-item-separator @@ -2669,7 +2787,9 @@ Sets the body mode, from one of the :ref:`BodyMode`, enable\: :ref:`bool`\ ) -Sets whether a body uses a callback function to calculate its own physics (see :ref:`body_set_force_integration_callback`). +Sets whether the body omits the standard force integration. If ``enable`` is ``true``, the body will not automatically use applied forces, torques, and damping to update the body's linear and angular velocity. In this case, :ref:`body_set_force_integration_callback` can be used to manually update the linear and angular velocity instead. + +This method is called when the property :ref:`RigidBody3D.custom_integrator` is set. .. rst-class:: classref-item-separator @@ -2899,7 +3019,7 @@ Destroys any of the objects created by PhysicsServer3D. If the :ref:`RID` **generic_6dof_joint_get_flag**\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag`\ ) |const| -Gets a generic_6_DOF_joint flag (see :ref:`G6DOFJointAxisFlag` constants). +Returns the value of a generic 6DOF joint flag. See :ref:`G6DOFJointAxisFlag` for the list of available flags. .. rst-class:: classref-item-separator @@ -2911,7 +3031,7 @@ Gets a generic_6_DOF_joint flag (see :ref:`G6DOFJointAxisFlag` **generic_6dof_joint_get_param**\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam`\ ) |const| -Gets a generic_6_DOF_joint parameter (see :ref:`G6DOFJointAxisParam` constants). +Returns the value of a generic 6DOF joint parameter. See :ref:`G6DOFJointAxisParam` for the list of available parameters. .. rst-class:: classref-item-separator @@ -2923,7 +3043,7 @@ Gets a generic_6_DOF_joint parameter (see :ref:`G6DOFJointAxisParam`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag`, enable\: :ref:`bool`\ ) -Sets a generic_6_DOF_joint flag (see :ref:`G6DOFJointAxisFlag` constants). +Sets the value of a given generic 6DOF joint flag. See :ref:`G6DOFJointAxisFlag` for the list of available flags. .. rst-class:: classref-item-separator @@ -2935,7 +3055,7 @@ Sets a generic_6_DOF_joint flag (see :ref:`G6DOFJointAxisFlag`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam`, value\: :ref:`float`\ ) -Sets a generic_6_DOF_joint parameter (see :ref:`G6DOFJointAxisParam` constants). +Sets the value of a given generic 6DOF joint parameter. See :ref:`G6DOFJointAxisParam` for the list of available parameters. .. rst-class:: classref-item-separator @@ -3111,9 +3231,7 @@ Returns whether the bodies attached to the :ref:`Joint3D` will co |void| **joint_make_generic_6dof**\ (\ joint\: :ref:`RID`, body_A\: :ref:`RID`, local_ref_A\: :ref:`Transform3D`, body_B\: :ref:`RID`, local_ref_B\: :ref:`Transform3D`\ ) -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Make the joint a generic six degrees of freedom (6DOF) joint. Use :ref:`generic_6dof_joint_set_flag` and :ref:`generic_6dof_joint_set_param` to set the joint's flags and parameters respectively. .. rst-class:: classref-item-separator diff --git a/classes/class_polygon2d.rst b/classes/class_polygon2d.rst index 343794e62ff8..561bdcf71974 100644 --- a/classes/class_polygon2d.rst +++ b/classes/class_polygon2d.rst @@ -225,7 +225,7 @@ The offset applied to each vertex. The polygon's list of vertices. The final point will be connected to the first. -\ **Note:** This returns a copy of the :ref:`PackedVector2Array` rather than a reference. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. .. rst-class:: classref-item-separator @@ -346,6 +346,8 @@ Amount to multiply the :ref:`uv` coordinates when u Texture coordinates for each vertex of the polygon. There should be one UV value per polygon vertex. If there are fewer, undefined vertices will use ``Vector2(0, 0)``. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -363,6 +365,8 @@ Texture coordinates for each vertex of the polygon. There should be one UV value Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use :ref:`color`. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedColorArray` for more details. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_polygonoccluder3d.rst b/classes/class_polygonoccluder3d.rst index 24fc094ec137..cafe861f5ca6 100644 --- a/classes/class_polygonoccluder3d.rst +++ b/classes/class_polygonoccluder3d.rst @@ -66,6 +66,8 @@ The polygon to use for occlusion culling. The polygon can be convex or concave, The polygon must *not* have intersecting lines. Otherwise, triangulation will fail (with an error message printed). +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_popupmenu.rst b/classes/class_popupmenu.rst index d51ca65a8405..411df93de039 100644 --- a/classes/class_popupmenu.rst +++ b/classes/class_popupmenu.rst @@ -48,6 +48,8 @@ Properties +-------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`item_count` | ``0`` | +-------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`prefer_native_menu` | ``false`` | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`submenu_popup_delay` | ``0.3`` | +-------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+ | :ref:`SystemMenus` | :ref:`system_menu_id` | ``0`` | @@ -428,6 +430,23 @@ The number of items currently in the list. ---- +.. _class_PopupMenu_property_prefer_native_menu: + +.. rst-class:: classref-property + +:ref:`bool` **prefer_native_menu** = ``false`` + +.. rst-class:: classref-property-setget + +- |void| **set_prefer_native_menu**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_prefer_native_menu**\ (\ ) + +If ``true``, :ref:`MenuBar` will use native menu when supported. + +.. rst-class:: classref-item-separator + +---- + .. _class_PopupMenu_property_submenu_popup_delay: .. rst-class:: classref-property diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index 428539ef2ce9..16dc7bc1428a 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -32,11 +32,11 @@ When naming a Project Settings property, use the full path to the setting includ Tutorials --------- -- `3D Physics Tests Demo `__ +- `3D Physics Tests Demo `__ -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ -- `OS Test Demo `__ +- `Operating System Testing Demo `__ .. rst-class:: classref-reftable-group @@ -95,6 +95,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`application/run/disable_stdout` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/run/enable_alt_space_menu` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`application/run/flush_stdout_on_print` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`application/run/flush_stdout_on_print.debug` | ``true`` | @@ -679,6 +681,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`input/ui_text_select_word_under_caret.macos` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_skip_selection_for_next_occurrence` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`input/ui_text_submit` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`input/ui_text_toggle_insert_mode` | | @@ -1167,6 +1171,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`navigation/baking/thread_model/baking_use_multiple_threads` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`navigation/baking/use_crash_prevention_checks` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`network/limits/debugger/max_chars_per_second` | ``32768`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`network/limits/debugger/max_errors_per_second` | ``400`` | @@ -1245,6 +1251,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`physics/common/max_physics_steps_per_frame` | ``8`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`physics/common/physics_interpolation` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`physics/common/physics_jitter_fix` | ``0.5`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`physics/common/physics_ticks_per_second` | ``60`` | @@ -1449,6 +1457,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/occlusion_culling/bvh_build_quality` | ``2`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/occlusion_culling/jitter_projection` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/occlusion_culling/occlusion_rays_per_thread` | ``512`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/occlusion_culling/use_occlusion_culling` | ``false`` | @@ -1497,6 +1507,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`rendering/rendering_device/driver.windows` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/rendering_device/pipeline_cache/enable` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`rendering/rendering_device/pipeline_cache/save_chunk_size_mb` | ``3.0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/rendering_device/staging_buffer/block_size_kb` | ``256`` | @@ -1984,6 +1996,22 @@ Changes to this setting will only be applied upon restarting the application. ---- +.. _class_ProjectSettings_property_application/run/enable_alt_space_menu: + +.. rst-class:: classref-property + +:ref:`bool` **application/run/enable_alt_space_menu** = ``false`` + +If ``true``, allows the :kbd:`Alt + Space` keys to display the window menu. This menu allows the user to perform various window management operations such as moving, resizing, or minimizing the window. + +\ **Note:** When the menu is displayed, project execution will pause until the menu is *fully* closed due to Windows behavior. Consider this when enabling this setting in a networked multiplayer game. The menu is only considered fully closed when an option is selected, when the user clicks outside, or when :kbd:`Escape` is pressed after bringing up the window menu *and* another key is pressed afterwards. + +\ **Note:** This setting is implemented only on Windows. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_application/run/flush_stdout_on_print: .. rst-class:: classref-property @@ -2090,7 +2118,7 @@ Limiting the FPS can be useful to reduce system power consumption, which reduces If :ref:`display/window/vsync/vsync_mode` is set to ``Enabled`` or ``Adaptive``, it takes precedence and the forced FPS number cannot exceed the monitor's refresh rate. -If :ref:`display/window/vsync/vsync_mode` is ``Enabled``, on monitors with variable refresh rate enabled (G-Sync/FreeSync), using a FPS limit a few frames lower than the monitor's refresh rate will `reduce input lag while avoiding tearing `__. +If :ref:`display/window/vsync/vsync_mode` is ``Enabled``, on monitors with variable refresh rate enabled (G-Sync/FreeSync), using an FPS limit a few frames lower than the monitor's refresh rate will `reduce input lag while avoiding tearing `__. If :ref:`display/window/vsync/vsync_mode` is ``Disabled``, limiting the FPS to a high value that can be consistently reached on the system can reduce input lag compared to an uncapped framerate. Since this works by ensuring the GPU load is lower than 100%, this latency reduction is only effective in GPU-bottlenecked scenarios, not CPU-bottlenecked scenarios. @@ -2530,6 +2558,8 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w :ref:`int` **debug/gdscript/warnings/constant_used_as_function** = ``1`` +**Deprecated:** This warning is never produced. Instead, an error is generated if the expression type is known at compile time. + When set to ``warn`` or ``error``, produces a warning or an error respectively when a constant is used as a function. .. rst-class:: classref-item-separator @@ -2544,6 +2574,8 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w When set to ``warn`` or ``error``, produces a warning or an error respectively when deprecated keywords are used. +\ **Note:** There are currently no deprecated keywords, so this warning is never produced. + .. rst-class:: classref-item-separator ---- @@ -2590,6 +2622,8 @@ If ``true``, scripts in the ``res://addons`` folder will not generate warnings. :ref:`int` **debug/gdscript/warnings/function_used_as_property** = ``1`` +**Deprecated:** This warning is never produced. When a function is used as a property, a :ref:`Callable` is returned. + When set to ``warn`` or ``error``, produces a warning or an error respectively when using a function as if it is a property. .. rst-class:: classref-item-separator @@ -2724,6 +2758,8 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w :ref:`int` **debug/gdscript/warnings/property_used_as_function** = ``1`` +**Deprecated:** This warning is never produced. Instead, an error is generated if the expression type is known at compile time. + When set to ``warn`` or ``error``, produces a warning or an error respectively when using a property as if it is a function. .. rst-class:: classref-item-separator @@ -2916,7 +2952,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w :ref:`int` **debug/gdscript/warnings/unsafe_cast** = ``0`` -When set to ``warn`` or ``error``, produces a warning or an error respectively when performing an unsafe cast. +When set to ``warn`` or ``error``, produces a warning or an error respectively when a :ref:`Variant` value is cast to a non-Variant. .. rst-class:: classref-item-separator @@ -3014,7 +3050,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w :ref:`int` **debug/gdscript/warnings/unused_signal** = ``1`` -When set to ``warn`` or ``error``, produces a warning or an error respectively when a signal is declared but never emitted. +When set to ``warn`` or ``error``, produces a warning or an error respectively when a signal is declared but never explicitly used in the class. .. rst-class:: classref-item-separator @@ -4420,9 +4456,9 @@ The command-line arguments to append to Godot's own command line when running th It is possible to make another executable run Godot by using the ``%command%`` placeholder. The placeholder will be replaced with Godot's own command line. Program-specific arguments should be placed *before* the placeholder, whereas Godot-specific arguments should be placed *after* the placeholder. -For example, this can be used to force the project to run on the dedicated GPU in a NVIDIA Optimus system on Linux: +For example, this can be used to force the project to run on the dedicated GPU in an NVIDIA Optimus system on Linux: -:: +.. code:: text prime-run %command% @@ -4438,6 +4474,8 @@ For example, this can be used to force the project to run on the dedicated GPU i Text-based file extensions to include in the script editor's "Find in Files" feature. You can add e.g. ``tscn`` if you wish to also parse your scene files, especially if you use built-in scripts which are serialized in the scene files. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + .. rst-class:: classref-item-separator ---- @@ -4528,7 +4566,7 @@ Override for :ref:`filesystem/import/blender/enabled`. +This requires configuring a path to an FBX2glTF executable in the editor settings at :ref:`EditorSettings.filesystem/import/fbx2gltf/fbx2gltf_path`. .. rst-class:: classref-item-separator @@ -5774,6 +5812,24 @@ macOS specific override for the shortcut to select the word currently under the ---- +.. _class_ProjectSettings_property_input/ui_text_skip_selection_for_next_occurrence: + +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_skip_selection_for_next_occurrence** + +If no selection is currently active with the last caret in text fields, searches for the next occurrence of the the word currently under the caret and moves the caret to the next occurrence. The action can be performed sequentially for other occurrences of the word under the last caret. + +If a selection is currently active with the last caret in text fields, searches for the next occurrence of the selection, adds a caret, selects the next occurrence then deselects the previous selection and its associated caret. The action can be performed sequentially for other occurrences of the selection of the last caret. + +The viewport is adjusted to the latest newly added caret. + +\ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_input/ui_text_submit: .. rst-class:: classref-property @@ -8734,6 +8790,18 @@ If enabled the async navmesh baking uses multiple threads. ---- +.. _class_ProjectSettings_property_navigation/baking/use_crash_prevention_checks: + +.. rst-class:: classref-property + +:ref:`bool` **navigation/baking/use_crash_prevention_checks** = ``true`` + +If enabled, and baking would potentially lead to an engine crash, the baking will be interrupted and an error message with explanation will be raised. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_network/limits/debugger/max_chars_per_second: .. rst-class:: classref-property @@ -9316,6 +9384,24 @@ Controls the maximum number of physics steps that can be simulated each rendered ---- +.. _class_ProjectSettings_property_physics/common/physics_interpolation: + +.. rst-class:: classref-property + +:ref:`bool` **physics/common/physics_interpolation** = ``false`` + +If ``true``, the renderer will interpolate the transforms of physics objects between the last two transforms, so that smooth motion is seen even when physics ticks do not coincide with rendered frames. See also :ref:`Node.physics_interpolation_mode` and :ref:`Node.reset_physics_interpolation`. + +\ **Note:** If ``true``, the physics jitter fix should be disabled by setting :ref:`physics/common/physics_jitter_fix` to ``0.0``. + +\ **Note:** This property is only read when the project starts. To toggle physics interpolation at runtime, set :ref:`SceneTree.physics_interpolation` instead. + +\ **Note:** This feature is currently only implemented in the 2D renderer. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_physics/common/physics_jitter_fix: .. rst-class:: classref-property @@ -9324,7 +9410,7 @@ Controls the maximum number of physics steps that can be simulated each rendered Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows smoothing out framerate jitters. The default value of 0.5 should be good enough for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended. -\ **Note:** For best results, when using a custom physics interpolation solution, the physics jitter fix should be disabled by setting :ref:`physics/common/physics_jitter_fix` to ``0``. +\ **Note:** When using a physics interpolation solution (such as enabling :ref:`physics/common/physics_interpolation` or using a custom solution), the physics jitter fix should be disabled by setting :ref:`physics/common/physics_jitter_fix` to ``0.0``. \ **Note:** This property is only read when the project starts. To change the physics jitter fix at runtime, set :ref:`Engine.physics_jitter_fix` instead. @@ -10666,6 +10752,18 @@ The `Bounding Volume Hierarchy ` **rendering/occlusion_culling/jitter_projection** = ``true`` + +If ``true``, the projection used for rendering the occlusion buffer will be jittered. This can help prevent objects being incorrectly culled when visible through small gaps. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/occlusion_culling/occlusion_rays_per_thread: .. rst-class:: classref-property @@ -10972,6 +11070,20 @@ Windows override for :ref:`rendering/rendering_device/driver` **rendering/rendering_device/pipeline_cache/enable** = ``true`` + +Enable the pipeline cache that is saved to disk if the graphics API supports it. + +\ **Note:** This property is unable to control the pipeline caching the GPU driver itself does. Only turn this off along with deleting the contents of the driver's cache if you wish to simulate the experience a user will get when starting the game for the first time. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/rendering_device/pipeline_cache/save_chunk_size_mb: .. rst-class:: classref-property @@ -11450,7 +11562,7 @@ If :ref:`rendering/vrs/mode` The texture *must* use a lossless compression format so that colors can be matched precisely. The following VRS densities are mapped to various colors, with brighter colors representing a lower level of shading precision: -:: +.. code:: text - 1×1 = rgb(0, 0, 0) - #000000 - 1×2 = rgb(0, 85, 0) - #005500 diff --git a/classes/class_quadmesh.rst b/classes/class_quadmesh.rst index f738310a81da..e2046e1fea3d 100644 --- a/classes/class_quadmesh.rst +++ b/classes/class_quadmesh.rst @@ -26,9 +26,9 @@ Class representing a square :ref:`PrimitiveMesh`. This flat Tutorials --------- -- `GUI in 3D Demo `__ +- `GUI in 3D Viewport Demo `__ -- `2D in 3D Demo `__ +- `2D in 3D Viewport Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_quaternion.rst b/classes/class_quaternion.rst index 22be54323092..8315acfb6db9 100644 --- a/classes/class_quaternion.rst +++ b/classes/class_quaternion.rst @@ -42,7 +42,7 @@ Tutorials - `Using 3D transforms <../tutorials/3d/using_transforms.html#interpolating-with-quaternions>`__ -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ - `Advanced Quaternion Visualization `__ diff --git a/classes/class_raycast2d.rst b/classes/class_raycast2d.rst index 8498461d05a6..9d7b4f9eb49a 100644 --- a/classes/class_raycast2d.rst +++ b/classes/class_raycast2d.rst @@ -311,6 +311,27 @@ Returns the :ref:`RID` of the first object that the ray intersects, o Returns the shape ID of the first object that the ray intersects, or ``0`` if no object is intersecting the ray (i.e. :ref:`is_colliding` returns ``false``). +To get the intersected shape node, for a :ref:`CollisionObject2D` target, use: + + +.. tabs:: + + .. code-tab:: gdscript + + var target = get_collider() # A CollisionObject2D. + var shape_id = get_collider_shape() # The shape index in the collider. + var owner_id = target.shape_find_owner(shape_id) # The owner ID in the collider. + var shape = target.shape_owner_get_owner(owner_id) + + .. code-tab:: csharp + + var target = (CollisionObject2D)GetCollider(); // A CollisionObject2D. + var shapeId = GetColliderShape(); // The shape index in the collider. + var ownerId = target.ShapeFindOwner(shapeId); // The owner ID in the collider. + var shape = target.ShapeOwnerGetOwner(ownerId); + + + .. rst-class:: classref-item-separator ---- @@ -335,6 +356,8 @@ Returns whether or not the specified layer of the :ref:`collision_mask` is ``true``. +\ **Note:** Check that :ref:`is_colliding` returns ``true`` before calling this method to ensure the returned normal is valid and up-to-date. + .. rst-class:: classref-item-separator ---- @@ -345,9 +368,9 @@ Returns the normal of the intersecting object's shape at the collision point, or :ref:`Vector2` **get_collision_point**\ (\ ) |const| -Returns the collision point at which the ray intersects the closest object. If :ref:`hit_from_inside` is ``true`` and the ray starts inside of a collision shape, this function will return the origin point of the ray. +Returns the collision point at which the ray intersects the closest object, in the global coordinate system. If :ref:`hit_from_inside` is ``true`` and the ray starts inside of a collision shape, this function will return the origin point of the ray. -\ **Note:** This point is in the **global** coordinate system. +\ **Note:** Check that :ref:`is_colliding` returns ``true`` before calling this method to ensure the returned point is valid and up-to-date. .. rst-class:: classref-item-separator diff --git a/classes/class_raycast3d.rst b/classes/class_raycast3d.rst index 9b67b07195a9..6e2f089a5eed 100644 --- a/classes/class_raycast3d.rst +++ b/classes/class_raycast3d.rst @@ -34,7 +34,7 @@ Tutorials - :doc:`Ray-casting <../tutorials/physics/ray-casting>` -- `3D Voxel Demo `__ +- `3D Voxel Demo `__ .. rst-class:: classref-reftable-group @@ -374,6 +374,27 @@ Returns the :ref:`RID` of the first object that the ray intersects, o Returns the shape ID of the first object that the ray intersects, or ``0`` if no object is intersecting the ray (i.e. :ref:`is_colliding` returns ``false``). +To get the intersected shape node, for a :ref:`CollisionObject3D` target, use: + + +.. tabs:: + + .. code-tab:: gdscript + + var target = get_collider() # A CollisionObject3D. + var shape_id = get_collider_shape() # The shape index in the collider. + var owner_id = target.shape_find_owner(shape_id) # The owner ID in the collider. + var shape = target.shape_owner_get_owner(owner_id) + + .. code-tab:: csharp + + var target = (CollisionObject3D)GetCollider(); // A CollisionObject3D. + var shapeId = GetColliderShape(); // The shape index in the collider. + var ownerId = target.ShapeFindOwner(shapeId); // The owner ID in the collider. + var shape = target.ShapeOwnerGetOwner(ownerId); + + + .. rst-class:: classref-item-separator ---- @@ -410,6 +431,8 @@ Returns whether or not the specified layer of the :ref:`collision_mask` is ``true``. +\ **Note:** Check that :ref:`is_colliding` returns ``true`` before calling this method to ensure the returned normal is valid and up-to-date. + .. rst-class:: classref-item-separator ---- @@ -420,9 +443,9 @@ Returns the normal of the intersecting object's shape at the collision point, or :ref:`Vector3` **get_collision_point**\ (\ ) |const| -Returns the collision point at which the ray intersects the closest object. If :ref:`hit_from_inside` is ``true`` and the ray starts inside of a collision shape, this function will return the origin point of the ray. +Returns the collision point at which the ray intersects the closest object, in the global coordinate system. If :ref:`hit_from_inside` is ``true`` and the ray starts inside of a collision shape, this function will return the origin point of the ray. -\ **Note:** This point is in the **global** coordinate system. +\ **Note:** Check that :ref:`is_colliding` returns ``true`` before calling this method to ensure the returned point is valid and up-to-date. .. rst-class:: classref-item-separator diff --git a/classes/class_rdframebufferpass.rst b/classes/class_rdframebufferpass.rst index 0d4364ddbbd4..c3f25b56bfc3 100644 --- a/classes/class_rdframebufferpass.rst +++ b/classes/class_rdframebufferpass.rst @@ -84,6 +84,8 @@ Property Descriptions Color attachments in order starting from 0. If this attachment is not used by the shader, pass ATTACHMENT_UNUSED to skip. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -118,6 +120,8 @@ Depth attachment. ATTACHMENT_UNUSED should be used if no depth buffer is require Used for multipass framebuffers (more than one render pass). Converts an attachment to an input. Make sure to also supply it properly in the :ref:`RDUniform` for the uniform set. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -135,6 +139,8 @@ Used for multipass framebuffers (more than one render pass). Converts an attachm Attachments to preserve in this pass (otherwise they are erased). +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -152,6 +158,8 @@ Attachments to preserve in this pass (otherwise they are erased). If the color attachments are multisampled, non-multisampled resolve attachments can be provided. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_rdshaderspirv.rst b/classes/class_rdshaderspirv.rst index 169f1b77c367..0b8b16a92244 100644 --- a/classes/class_rdshaderspirv.rst +++ b/classes/class_rdshaderspirv.rst @@ -93,6 +93,8 @@ Property Descriptions The SPIR-V bytecode for the compute shader stage. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray` for more details. + .. rst-class:: classref-item-separator ---- @@ -110,6 +112,8 @@ The SPIR-V bytecode for the compute shader stage. The SPIR-V bytecode for the fragment shader stage. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray` for more details. + .. rst-class:: classref-item-separator ---- @@ -127,6 +131,8 @@ The SPIR-V bytecode for the fragment shader stage. The SPIR-V bytecode for the tessellation control shader stage. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray` for more details. + .. rst-class:: classref-item-separator ---- @@ -144,6 +150,8 @@ The SPIR-V bytecode for the tessellation control shader stage. The SPIR-V bytecode for the tessellation evaluation shader stage. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray` for more details. + .. rst-class:: classref-item-separator ---- @@ -161,6 +169,8 @@ The SPIR-V bytecode for the tessellation evaluation shader stage. The SPIR-V bytecode for the vertex shader stage. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray` for more details. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_rectangleshape2d.rst b/classes/class_rectangleshape2d.rst index 4db6354acd9f..9d28e458ca0c 100644 --- a/classes/class_rectangleshape2d.rst +++ b/classes/class_rectangleshape2d.rst @@ -28,9 +28,9 @@ A 2D rectangle shape, intended for use in physics. Usually used to provide a sha Tutorials --------- -- `2D Pong Demo `__ +- `2D Pong Demo `__ -- `2D Kinematic Character Demo `__ +- `2D Kinematic Character Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_regexmatch.rst b/classes/class_regexmatch.rst index ded48dc51b28..bdd12eaeffa9 100644 --- a/classes/class_regexmatch.rst +++ b/classes/class_regexmatch.rst @@ -92,6 +92,8 @@ A dictionary of named groups and its corresponding group number. Only groups tha An :ref:`Array` of the match and its capturing groups. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_renderingdevice.rst b/classes/class_renderingdevice.rst index 9d89e1899841..973064ab1a7b 100644 --- a/classes/class_renderingdevice.rst +++ b/classes/class_renderingdevice.rst @@ -67,6 +67,8 @@ Methods +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`compute_list_dispatch`\ (\ compute_list\: :ref:`int`, x_groups\: :ref:`int`, y_groups\: :ref:`int`, z_groups\: :ref:`int`\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`compute_list_dispatch_indirect`\ (\ compute_list\: :ref:`int`, buffer\: :ref:`RID`, offset\: :ref:`int`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`compute_list_end`\ (\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`compute_list_set_push_constant`\ (\ compute_list\: :ref:`int`, buffer\: :ref:`PackedByteArray`, size_bytes\: :ref:`int`\ ) | @@ -3791,11 +3793,7 @@ flags **PipelineDynamicStateFlags**: :ref:`PipelineDynamicStateFlags` **DYNAMIC_STATE_LINE_WIDTH** = ``1`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +Allows dynamically changing the width of rendering lines. .. _class_RenderingDevice_constant_DYNAMIC_STATE_DEPTH_BIAS: @@ -3803,11 +3801,7 @@ flags **PipelineDynamicStateFlags**: :ref:`PipelineDynamicStateFlags` **DYNAMIC_STATE_DEPTH_BIAS** = ``2`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +Allows dynamically changing the depth bias. .. _class_RenderingDevice_constant_DYNAMIC_STATE_BLEND_CONSTANTS: @@ -4727,6 +4721,18 @@ Submits the compute list for processing on the GPU. This is the compute equivale ---- +.. _class_RenderingDevice_method_compute_list_dispatch_indirect: + +.. rst-class:: classref-method + +|void| **compute_list_dispatch_indirect**\ (\ compute_list\: :ref:`int`, buffer\: :ref:`RID`, offset\: :ref:`int`\ ) + +Submits the compute list for processing on the GPU with the given group counts stored in the ``buffer`` at ``offset``. Buffer must have been created with :ref:`STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT` flag. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingDevice_method_compute_list_end: .. rst-class:: classref-method diff --git a/classes/class_renderingserver.rst b/classes/class_renderingserver.rst index 8495c35494ff..c3bc4657c267 100644 --- a/classes/class_renderingserver.rst +++ b/classes/class_renderingserver.rst @@ -145,6 +145,8 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`canvas_item_create`\ (\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_reset_physics_interpolation`\ (\ item\: :ref:`RID`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_item_set_canvas_group_mode`\ (\ item\: :ref:`RID`, mode\: :ref:`CanvasGroupMode`, clear_margin\: :ref:`float` = 5.0, fit_empty\: :ref:`bool` = false, fit_margin\: :ref:`float` = 0.0, blur_mipmaps\: :ref:`bool` = false\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_item_set_clip`\ (\ item\: :ref:`RID`, clip\: :ref:`bool`\ ) | @@ -163,6 +165,8 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_item_set_draw_index`\ (\ item\: :ref:`RID`, index\: :ref:`int`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_interpolated`\ (\ item\: :ref:`RID`, interpolated\: :ref:`bool`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_item_set_light_mask`\ (\ item\: :ref:`RID`, mask\: :ref:`int`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_item_set_material`\ (\ item\: :ref:`RID`, material\: :ref:`RID`\ ) | @@ -189,6 +193,8 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_item_set_z_index`\ (\ item\: :ref:`RID`, z_index\: :ref:`int`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_transform_physics_interpolation`\ (\ item\: :ref:`RID`, transform\: :ref:`Transform2D`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_light_attach_to_canvas`\ (\ light\: :ref:`RID`, canvas\: :ref:`RID`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`canvas_light_create`\ (\ ) | @@ -197,16 +203,24 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`canvas_light_occluder_create`\ (\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_occluder_reset_physics_interpolation`\ (\ occluder\: :ref:`RID`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_light_occluder_set_as_sdf_collision`\ (\ occluder\: :ref:`RID`, enable\: :ref:`bool`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_light_occluder_set_enabled`\ (\ occluder\: :ref:`RID`, enabled\: :ref:`bool`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_occluder_set_interpolated`\ (\ occluder\: :ref:`RID`, interpolated\: :ref:`bool`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_light_occluder_set_light_mask`\ (\ occluder\: :ref:`RID`, mask\: :ref:`int`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_light_occluder_set_polygon`\ (\ occluder\: :ref:`RID`, polygon\: :ref:`RID`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_light_occluder_set_transform`\ (\ occluder\: :ref:`RID`, transform\: :ref:`Transform2D`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_occluder_transform_physics_interpolation`\ (\ occluder\: :ref:`RID`, transform\: :ref:`Transform2D`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_reset_physics_interpolation`\ (\ light\: :ref:`RID`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_light_set_blend_mode`\ (\ light\: :ref:`RID`, mode\: :ref:`CanvasLightBlendMode`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_light_set_color`\ (\ light\: :ref:`RID`, color\: :ref:`Color`\ ) | @@ -217,6 +231,8 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_light_set_height`\ (\ light\: :ref:`RID`, height\: :ref:`float`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_set_interpolated`\ (\ light\: :ref:`RID`, interpolated\: :ref:`bool`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_light_set_item_cull_mask`\ (\ light\: :ref:`RID`, mask\: :ref:`int`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_light_set_item_shadow_cull_mask`\ (\ light\: :ref:`RID`, mask\: :ref:`int`\ ) | @@ -243,6 +259,8 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_light_set_z_range`\ (\ light\: :ref:`RID`, min_z\: :ref:`int`, max_z\: :ref:`int`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_transform_physics_interpolation`\ (\ light\: :ref:`RID`, transform\: :ref:`Transform2D`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`canvas_occluder_polygon_create`\ (\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_occluder_polygon_set_cull_mode`\ (\ occluder_polygon\: :ref:`RID`, mode\: :ref:`CanvasOccluderPolygonCullMode`\ ) | @@ -903,6 +921,8 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`viewport_get_texture`\ (\ viewport\: :ref:`RID`\ ) |const| | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ViewportUpdateMode` | :ref:`viewport_get_update_mode`\ (\ viewport\: :ref:`RID`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`viewport_remove_canvas`\ (\ viewport\: :ref:`RID`, canvas\: :ref:`RID`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`viewport_set_active`\ (\ viewport\: :ref:`RID`, active\: :ref:`bool`\ ) | @@ -6228,6 +6248,20 @@ Once finished with your RID, you will want to free the RID using the RenderingSe ---- +.. _class_RenderingServer_method_canvas_item_reset_physics_interpolation: + +.. rst-class:: classref-method + +|void| **canvas_item_reset_physics_interpolation**\ (\ item\: :ref:`RID`\ ) + +Prevents physics interpolation for the current physics tick. + +This is useful when moving a canvas item to a new location, to give an instantaneous change rather than interpolation from the previous location. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_canvas_item_set_canvas_group_mode: .. rst-class:: classref-method @@ -6340,6 +6374,18 @@ Sets the index for the :ref:`CanvasItem`. ---- +.. _class_RenderingServer_method_canvas_item_set_interpolated: + +.. rst-class:: classref-method + +|void| **canvas_item_set_interpolated**\ (\ item\: :ref:`RID`, interpolated\: :ref:`bool`\ ) + +If ``interpolated`` is ``true``, turns on physics interpolation for the canvas item. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_canvas_item_set_light_mask: .. rst-class:: classref-method @@ -6498,6 +6544,20 @@ Sets the :ref:`CanvasItem`'s Z index, i.e. its draw order (low ---- +.. _class_RenderingServer_method_canvas_item_transform_physics_interpolation: + +.. rst-class:: classref-method + +|void| **canvas_item_transform_physics_interpolation**\ (\ item\: :ref:`RID`, transform\: :ref:`Transform2D`\ ) + +Transforms both the current and previous stored transform for a canvas item. + +This allows transforming a canvas item without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilising a shifting origin. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_canvas_light_attach_to_canvas: .. rst-class:: classref-method @@ -6554,6 +6614,20 @@ Once finished with your RID, you will want to free the RID using the RenderingSe ---- +.. _class_RenderingServer_method_canvas_light_occluder_reset_physics_interpolation: + +.. rst-class:: classref-method + +|void| **canvas_light_occluder_reset_physics_interpolation**\ (\ occluder\: :ref:`RID`\ ) + +Prevents physics interpolation for the current physics tick. + +This is useful when moving an occluder to a new location, to give an instantaneous change rather than interpolation from the previous location. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_canvas_light_occluder_set_as_sdf_collision: .. rst-class:: classref-method @@ -6580,6 +6654,18 @@ Enables or disables light occluder. ---- +.. _class_RenderingServer_method_canvas_light_occluder_set_interpolated: + +.. rst-class:: classref-method + +|void| **canvas_light_occluder_set_interpolated**\ (\ occluder\: :ref:`RID`, interpolated\: :ref:`bool`\ ) + +If ``interpolated`` is ``true``, turns on physics interpolation for the light occluder. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_canvas_light_occluder_set_light_mask: .. rst-class:: classref-method @@ -6616,6 +6702,34 @@ Sets a light occluder's :ref:`Transform2D`. ---- +.. _class_RenderingServer_method_canvas_light_occluder_transform_physics_interpolation: + +.. rst-class:: classref-method + +|void| **canvas_light_occluder_transform_physics_interpolation**\ (\ occluder\: :ref:`RID`, transform\: :ref:`Transform2D`\ ) + +Transforms both the current and previous stored transform for a light occluder. + +This allows transforming an occluder without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilising a shifting origin. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingServer_method_canvas_light_reset_physics_interpolation: + +.. rst-class:: classref-method + +|void| **canvas_light_reset_physics_interpolation**\ (\ light\: :ref:`RID`\ ) + +Prevents physics interpolation for the current physics tick. + +This is useful when moving a canvas item to a new location, to give an instantaneous change rather than interpolation from the previous location. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_canvas_light_set_blend_mode: .. rst-class:: classref-method @@ -6676,6 +6790,18 @@ Sets a canvas light's height. ---- +.. _class_RenderingServer_method_canvas_light_set_interpolated: + +.. rst-class:: classref-method + +|void| **canvas_light_set_interpolated**\ (\ light\: :ref:`RID`, interpolated\: :ref:`bool`\ ) + +If ``interpolated`` is ``true``, turns on physics interpolation for the canvas light. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_canvas_light_set_item_cull_mask: .. rst-class:: classref-method @@ -6832,6 +6958,20 @@ Sets the Z range of objects that will be affected by this light. Equivalent to : ---- +.. _class_RenderingServer_method_canvas_light_transform_physics_interpolation: + +.. rst-class:: classref-method + +|void| **canvas_light_transform_physics_interpolation**\ (\ light\: :ref:`RID`, transform\: :ref:`Transform2D`\ ) + +Transforms both the current and previous stored transform for a canvas light. + +This allows transforming a light without creating a "glitch" in the interpolation, which is is particularly useful for large worlds utilising a shifting origin. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_canvas_occluder_polygon_create: .. rst-class:: classref-method @@ -8352,7 +8492,7 @@ Sets the override material of a specific surface. Equivalent to :ref:`MeshInstan |void| **instance_set_transform**\ (\ instance\: :ref:`RID`, transform\: :ref:`Transform3D`\ ) -Sets the world space transform of the instance. Equivalent to :ref:`Node3D.transform`. +Sets the world space transform of the instance. Equivalent to :ref:`Node3D.global_transform`. .. rst-class:: classref-item-separator @@ -9378,7 +9518,7 @@ Set the entire data to use for drawing the ``multimesh`` at once to ``buffer`` ( The per-instance data size and expected data order is: -:: +.. code:: text 2D: - Position: 8 floats (8 floats for Transform2D) @@ -11134,6 +11274,20 @@ Returns the viewport's last rendered frame. ---- +.. _class_RenderingServer_method_viewport_get_update_mode: + +.. rst-class:: classref-method + +:ref:`ViewportUpdateMode` **viewport_get_update_mode**\ (\ viewport\: :ref:`RID`\ ) |const| + +Returns the viewport's update mode. See :ref:`ViewportUpdateMode` constants for options. + +\ **Warning:** Calling this from any thread other than the rendering thread will be detrimental to performance. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_viewport_remove_canvas: .. rst-class:: classref-method @@ -11568,7 +11722,7 @@ If ``true``, enables debanding on the specified viewport. Equivalent to :ref:`Pr |void| **viewport_set_use_hdr_2d**\ (\ viewport\: :ref:`RID`, enabled\: :ref:`bool`\ ) -If ``true``, 2D rendering will use a high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be a ``RGBA16`` framebuffer, while when using the Mobile renderer it will be a ``RGB10_A2`` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the ``0-1`` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients. This setting has the same effect as :ref:`Viewport.use_hdr_2d`. +If ``true``, 2D rendering will use a high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be an ``RGBA16`` framebuffer, while when using the Mobile renderer it will be an ``RGB10_A2`` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the ``0-1`` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients. This setting has the same effect as :ref:`Viewport.use_hdr_2d`. \ **Note:** This setting will have no effect when using the GL Compatibility renderer as the GL Compatibility renderer always renders in low dynamic range for performance reasons. diff --git a/classes/class_resourceimportercsvtranslation.rst b/classes/class_resourceimportercsvtranslation.rst index b4b6510ca84f..b03df9e1b038 100644 --- a/classes/class_resourceimportercsvtranslation.rst +++ b/classes/class_resourceimportercsvtranslation.rst @@ -23,7 +23,7 @@ Comma-separated values are a plain text table storage format. The format's simpl \ **Example CSV file:**\ -:: +.. code:: text keys,en,es,ja GREET,"Hello, friend!","Hola, amigo!",こんにちは diff --git a/classes/class_resourceimporterdynamicfont.rst b/classes/class_resourceimporterdynamicfont.rst index 1ce20bfc5035..8b4103bfc8db 100644 --- a/classes/class_resourceimporterdynamicfont.rst +++ b/classes/class_resourceimporterdynamicfont.rst @@ -47,6 +47,8 @@ Properties +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`compress` | ``true`` | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`disable_embedded_bitmaps` | ``true`` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`Array` | :ref:`fallbacks` | ``[]`` | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`force_autohinter` | ``false`` | @@ -127,6 +129,18 @@ If ``true``, uses lossless compression for the resulting font. ---- +.. _class_ResourceImporterDynamicFont_property_disable_embedded_bitmaps: + +.. rst-class:: classref-property + +:ref:`bool` **disable_embedded_bitmaps** = ``true`` + +If set to ``true``, embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property). + +.. rst-class:: classref-item-separator + +---- + .. _class_ResourceImporterDynamicFont_property_fallbacks: .. rst-class:: classref-property diff --git a/classes/class_resourceimporterimagefont.rst b/classes/class_resourceimporterimagefont.rst index 11f55124644f..8615a9fe0088 100644 --- a/classes/class_resourceimporterimagefont.rst +++ b/classes/class_resourceimporterimagefont.rst @@ -109,6 +109,8 @@ For any range, the character advance and offset can be customized by appending t Make sure :ref:`character_ranges` doesn't exceed the number of :ref:`columns` \* :ref:`rows` defined. Otherwise, the font will fail to import. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + .. rst-class:: classref-item-separator ---- @@ -183,6 +185,8 @@ Kerning pairs for the font. Kerning pair adjust the spacing between two characte Each string consist of three space separated values: "from" string, "to" string and integer offset. Each combination form the two string for a kerning pair, e.g, ``ab cd -3`` will create kerning pairs ``ac``, ``ad``, ``bc``, and ``bd`` with offset ``-3``. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_resourceimportermp3.rst b/classes/class_resourceimportermp3.rst index 36d7bc9f4cbb..919b2f8dd918 100644 --- a/classes/class_resourceimportermp3.rst +++ b/classes/class_resourceimportermp3.rst @@ -12,7 +12,7 @@ ResourceImporterMP3 **Inherits:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` -Imports a MP3 audio file for playback. +Imports an MP3 audio file for playback. .. rst-class:: classref-introduction-group @@ -21,7 +21,7 @@ Description MP3 is a lossy audio format, with worse audio quality compared to :ref:`ResourceImporterOggVorbis` at a given bitrate. -In most cases, it's recommended to use Ogg Vorbis over MP3. However, if you're using a MP3 sound source with no higher quality source available, then it's recommended to use the MP3 file directly to avoid double lossy compression. +In most cases, it's recommended to use Ogg Vorbis over MP3. However, if you're using an MP3 sound source with no higher quality source available, then it's recommended to use the MP3 file directly to avoid double lossy compression. MP3 requires more CPU to decode than :ref:`ResourceImporterWAV`. If you need to play a lot of simultaneous sounds, it's recommended to use WAV for those sounds instead, especially if targeting low-end devices. diff --git a/classes/class_resourceimporteroggvorbis.rst b/classes/class_resourceimporteroggvorbis.rst index 78dfc1c5c8dd..db1720f0a798 100644 --- a/classes/class_resourceimporteroggvorbis.rst +++ b/classes/class_resourceimporteroggvorbis.rst @@ -21,7 +21,7 @@ Description Ogg Vorbis is a lossy audio format, with better audio quality compared to :ref:`ResourceImporterMP3` at a given bitrate. -In most cases, it's recommended to use Ogg Vorbis over MP3. However, if you're using a MP3 sound source with no higher quality source available, then it's recommended to use the MP3 file directly to avoid double lossy compression. +In most cases, it's recommended to use Ogg Vorbis over MP3. However, if you're using an MP3 sound source with no higher quality source available, then it's recommended to use the MP3 file directly to avoid double lossy compression. Ogg Vorbis requires more CPU to decode than :ref:`ResourceImporterWAV`. If you need to play a lot of simultaneous sounds, it's recommended to use WAV for those sounds instead, especially if targeting low-end devices. diff --git a/classes/class_resourceimporterscene.rst b/classes/class_resourceimporterscene.rst index d9101e6333a0..41c171295eb5 100644 --- a/classes/class_resourceimporterscene.rst +++ b/classes/class_resourceimporterscene.rst @@ -47,6 +47,8 @@ Properties +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`animation/import` | ``true`` | +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`animation/import_rest_as_RESET` | ``false`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`animation/remove_immutable_tracks` | ``true`` | +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`animation/trimming` | ``false`` | @@ -123,6 +125,18 @@ If ``true``, import animations from the 3D scene. ---- +.. _class_ResourceImporterScene_property_animation/import_rest_as_RESET: + +.. rst-class:: classref-property + +:ref:`bool` **animation/import_rest_as_RESET** = ``false`` + +If ``true``, adds an :ref:`Animation` named ``RESET``, containing the :ref:`Skeleton3D.get_bone_rest` from :ref:`Skeleton3D` nodes. This can be useful to extract an animation in the reference pose. + +.. rst-class:: classref-item-separator + +---- + .. _class_ResourceImporterScene_property_animation/remove_immutable_tracks: .. rst-class:: classref-property diff --git a/classes/class_resourceloader.rst b/classes/class_resourceloader.rst index df029af21c73..5aa9bd317198 100644 --- a/classes/class_resourceloader.rst +++ b/classes/class_resourceloader.rst @@ -30,7 +30,7 @@ It uses the many :ref:`ResourceFormatLoader` classes Tutorials --------- -- `OS Test Demo `__ +- `Operating System Testing Demo `__ .. rst-class:: classref-reftable-group @@ -280,6 +280,8 @@ GDScript has a simplified :ref:`@GDScript.load` bui \ **Note:** If :ref:`ProjectSettings.editor/export/convert_text_resources_to_binary` is ``true``, :ref:`@GDScript.load` will not be able to read converted files in an exported project. If you rely on run-time loading of files present within the PCK, set :ref:`ProjectSettings.editor/export/convert_text_resources_to_binary` to ``false``. +\ **Note:** Relative paths will be prefixed with ``"res://"`` before loading, to avoid unexpected results make sure your paths are absolute. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index 51d5e97d6604..a44b60d864ce 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -36,9 +36,9 @@ Tutorials - :doc:`BBCode in RichTextLabel <../tutorials/ui/bbcode_in_richtextlabel>` -- `GUI Rich Text/BBcode Demo `__ +- `Rich Text Label with BBCode Demo `__ -- `OS Test Demo `__ +- `Operating System Testing Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_rigidbody2d.rst b/classes/class_rigidbody2d.rst index e1f752bd40e9..39c48fbd2913 100644 --- a/classes/class_rigidbody2d.rst +++ b/classes/class_rigidbody2d.rst @@ -36,9 +36,9 @@ If you need to override the default physics behavior, you can write a custom for Tutorials --------- -- `2D Physics Platformer Demo `__ +- `2D Physics Platformer Demo `__ -- `Instancing Demo `__ +- `Instancing Demo `__ .. rst-class:: classref-reftable-group @@ -538,7 +538,9 @@ Continuous collision detection tries to predict where a moving body will collide - |void| **set_use_custom_integrator**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_using_custom_integrator**\ (\ ) -If ``true``, internal force integration is disabled for this body. Aside from collision response, the body will only move as determined by the :ref:`_integrate_forces` function. +If ``true``, the standard force integration (like gravity or damping) will be disabled for this body. Other than collision response, the body will only move as determined by the :ref:`_integrate_forces` method, if that virtual method is overridden. + +Setting this property will call the method :ref:`PhysicsServer2D.body_set_omit_force_integration` internally. .. rst-class:: classref-item-separator @@ -801,7 +803,7 @@ Method Descriptions |void| **_integrate_forces**\ (\ state\: :ref:`PhysicsDirectBodyState2D`\ ) |virtual| -Allows you to read and safely modify the simulation state for the object. Use this instead of :ref:`Node._physics_process` if you need to directly change the body's ``position`` or other physics properties. By default, it works in addition to the usual physics behavior, but :ref:`custom_integrator` allows you to disable the default behavior and write custom force integration for a body. +Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it is called before the standard force integration, but the :ref:`custom_integrator` property allows you to disable the standard force integration and do fully custom force integration for a body. .. rst-class:: classref-item-separator diff --git a/classes/class_rigidbody3d.rst b/classes/class_rigidbody3d.rst index a33a69d414f8..44086f6b96bc 100644 --- a/classes/class_rigidbody3d.rst +++ b/classes/class_rigidbody3d.rst @@ -38,9 +38,9 @@ Tutorials - :doc:`Physics introduction <../tutorials/physics/physics_introduction>` -- `3D Truck Town Demo `__ +- `3D Truck Town Demo `__ -- `3D Physics Tests Demo `__ +- `3D Physics Tests Demo `__ .. rst-class:: classref-reftable-group @@ -508,7 +508,9 @@ Continuous collision detection tries to predict where a moving body will collide - |void| **set_use_custom_integrator**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_using_custom_integrator**\ (\ ) -If ``true``, internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the :ref:`_integrate_forces` function, if defined. +If ``true``, the standard force integration (like gravity or damping) will be disabled for this body. Other than collision response, the body will only move as determined by the :ref:`_integrate_forces` method, if that virtual method is overridden. + +Setting this property will call the method :ref:`PhysicsServer3D.body_set_omit_force_integration` internally. .. rst-class:: classref-item-separator @@ -771,7 +773,7 @@ Method Descriptions |void| **_integrate_forces**\ (\ state\: :ref:`PhysicsDirectBodyState3D`\ ) |virtual| -Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it works in addition to the usual physics behavior, but the :ref:`custom_integrator` property allows you to disable the default behavior and do fully custom force integration for a body. +Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it is called before the standard force integration, but the :ref:`custom_integrator` property allows you to disable the standard force integration and do fully custom force integration for a body. .. rst-class:: classref-item-separator diff --git a/classes/class_scenetree.rst b/classes/class_scenetree.rst index 07255821999d..0d916e6b10f8 100644 --- a/classes/class_scenetree.rst +++ b/classes/class_scenetree.rst @@ -59,6 +59,8 @@ Properties +-----------------------------+------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`paused` | ``false`` | +-----------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`physics_interpolation` | ``false`` | + +-----------------------------+------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`quit_on_go_back` | ``true`` | +-----------------------------+------------------------------------------------------------------------------+-----------+ | :ref:`Window` | :ref:`root` | | @@ -433,6 +435,25 @@ If ``true``, the scene tree is considered paused. This causes the following beha ---- +.. _class_SceneTree_property_physics_interpolation: + +.. rst-class:: classref-property + +:ref:`bool` **physics_interpolation** = ``false`` + +.. rst-class:: classref-property-setget + +- |void| **set_physics_interpolation_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_physics_interpolation_enabled**\ (\ ) + +If ``true``, the renderer will interpolate the transforms of physics objects between the last two transforms, so that smooth motion is seen even when physics ticks do not coincide with rendered frames. + +The default value of this property is controlled by :ref:`ProjectSettings.physics/common/physics_interpolation`. + +.. rst-class:: classref-item-separator + +---- + .. _class_SceneTree_property_quit_on_go_back: .. rst-class:: classref-property diff --git a/classes/class_scriptextension.rst b/classes/class_scriptextension.rst index 07c2d80efae3..ceca4119e46f 100644 --- a/classes/class_scriptextension.rst +++ b/classes/class_scriptextension.rst @@ -24,77 +24,79 @@ Methods .. table:: :widths: auto - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_can_instantiate`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_editor_can_reload_from_file`\ (\ ) |virtual| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Script` | :ref:`_get_base_script`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_class_icon_path`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_get_constants`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`_get_documentation`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`_get_global_name`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`_get_instance_base_type`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ScriptLanguage` | :ref:`_get_language`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_member_line`\ (\ member\: :ref:`StringName`\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`StringName`\] | :ref:`_get_members`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_get_method_info`\ (\ method\: :ref:`StringName`\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_get_property_default_value`\ (\ property\: :ref:`StringName`\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_get_rpc_config`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`_get_script_method_list`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`_get_script_property_list`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`_get_script_signal_list`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_source_code`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_method`\ (\ method\: :ref:`StringName`\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_property_default_value`\ (\ property\: :ref:`StringName`\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_script_signal`\ (\ signal\: :ref:`StringName`\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_source_code`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_static_method`\ (\ method\: :ref:`StringName`\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_inherits_script`\ (\ script\: :ref:`Script`\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | ``void*`` | :ref:`_instance_create`\ (\ for_object\: :ref:`Object`\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_instance_has`\ (\ object\: :ref:`Object`\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_abstract`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_placeholder_fallback_enabled`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_tool`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_valid`\ (\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_placeholder_erased`\ (\ placeholder\: ``void*``\ ) |virtual| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | ``void*`` | :ref:`_placeholder_instance_create`\ (\ for_object\: :ref:`Object`\ ) |virtual| |const| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_reload`\ (\ keep_state\: :ref:`bool`\ ) |virtual| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_set_source_code`\ (\ code\: :ref:`String`\ ) |virtual| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_update_exports`\ (\ ) |virtual| | - +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_can_instantiate`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_editor_can_reload_from_file`\ (\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Script` | :ref:`_get_base_script`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_class_icon_path`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_constants`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`_get_documentation`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`_get_global_name`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`_get_instance_base_type`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ScriptLanguage` | :ref:`_get_language`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_member_line`\ (\ member\: :ref:`StringName`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`StringName`\] | :ref:`_get_members`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_method_info`\ (\ method\: :ref:`StringName`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_property_default_value`\ (\ property\: :ref:`StringName`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_rpc_config`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_script_method_argument_count`\ (\ method\: :ref:`StringName`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`_get_script_method_list`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`_get_script_property_list`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`_get_script_signal_list`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_source_code`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_method`\ (\ method\: :ref:`StringName`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_property_default_value`\ (\ property\: :ref:`StringName`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_script_signal`\ (\ signal\: :ref:`StringName`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_source_code`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_static_method`\ (\ method\: :ref:`StringName`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_inherits_script`\ (\ script\: :ref:`Script`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``void*`` | :ref:`_instance_create`\ (\ for_object\: :ref:`Object`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_instance_has`\ (\ object\: :ref:`Object`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_abstract`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_placeholder_fallback_enabled`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_tool`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_valid`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_placeholder_erased`\ (\ placeholder\: ``void*``\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``void*`` | :ref:`_placeholder_instance_create`\ (\ for_object\: :ref:`Object`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_reload`\ (\ keep_state\: :ref:`bool`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_source_code`\ (\ code\: :ref:`String`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_update_exports`\ (\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -301,6 +303,18 @@ Method Descriptions ---- +.. _class_ScriptExtension_private_method__get_script_method_argument_count: + +.. rst-class:: classref-method + +:ref:`Variant` **_get_script_method_argument_count**\ (\ method\: :ref:`StringName`\ ) |virtual| |const| + +Return the expected argument count for the given ``method``, or ``null`` if it can't be determined (which will then fall back to the default behavior). + +.. rst-class:: classref-item-separator + +---- + .. _class_ScriptExtension_private_method__get_script_method_list: .. rst-class:: classref-method diff --git a/classes/class_shapecast2d.rst b/classes/class_shapecast2d.rst index ee7ed2c9a50f..b6e233e860b4 100644 --- a/classes/class_shapecast2d.rst +++ b/classes/class_shapecast2d.rst @@ -348,6 +348,8 @@ The fraction from the **ShapeCast2D**'s origin to its :ref:`target_position` (between 0 and 1) of how far the shape must move to trigger a collision. +In ideal conditions this would be the same as :ref:`get_closest_collision_safe_fraction`, however shape casting is calculated in discrete steps, so the precise point of collision can occur between two calculated positions. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_shapecast3d.rst b/classes/class_shapecast3d.rst index 9854997bad66..02f1eb48d724 100644 --- a/classes/class_shapecast3d.rst +++ b/classes/class_shapecast3d.rst @@ -371,6 +371,8 @@ The fraction from the **ShapeCast3D**'s origin to its :ref:`target_position` (between 0 and 1) of how far the shape must move to trigger a collision. +In ideal conditions this would be the same as :ref:`get_closest_collision_safe_fraction`, however shape casting is calculated in discrete steps, so the precise point of collision can occur between two calculated positions. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_skeleton3d.rst b/classes/class_skeleton3d.rst index 4bbe478b692a..95e4ce0072a2 100644 --- a/classes/class_skeleton3d.rst +++ b/classes/class_skeleton3d.rst @@ -30,9 +30,7 @@ Note that "global pose" below refers to the overall transform of the bone with r Tutorials --------- -- `3D Inverse Kinematics Demo `__ - -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group @@ -42,13 +40,13 @@ Properties .. table:: :widths: auto - +---------------------------+---------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`animate_physical_bones` | ``true`` | - +---------------------------+---------------------------------------------------------------------------------+-----------+ - | :ref:`float` | :ref:`motion_scale` | ``1.0`` | - +---------------------------+---------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`show_rest_only` | ``false`` | - +---------------------------+---------------------------------------------------------------------------------+-----------+ + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ + | :ref:`ModifierCallbackModeProcess` | :ref:`modifier_callback_mode_process` | ``1`` | + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`motion_scale` | ``1.0`` | + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`show_rest_only` | ``false`` | + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -73,6 +71,8 @@ Methods +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`force_update_bone_child_transform`\ (\ bone_idx\: :ref:`int`\ ) | +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_animate_physical_bones`\ (\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`get_bone_children`\ (\ bone_idx\: :ref:`int`\ ) |const| | +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_bone_count`\ (\ ) |const| | @@ -121,14 +121,20 @@ Methods +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`reset_bone_poses`\ (\ ) | +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_animate_physical_bones`\ (\ enabled\: :ref:`bool`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_bone_enabled`\ (\ bone_idx\: :ref:`int`, enabled\: :ref:`bool` = true\ ) | +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_global_pose`\ (\ bone_idx\: :ref:`int`, pose\: :ref:`Transform3D`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_bone_global_pose_override`\ (\ bone_idx\: :ref:`int`, pose\: :ref:`Transform3D`, amount\: :ref:`float`, persistent\: :ref:`bool` = false\ ) | +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_bone_name`\ (\ bone_idx\: :ref:`int`, name\: :ref:`String`\ ) | +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_bone_parent`\ (\ bone_idx\: :ref:`int`, parent_idx\: :ref:`int`\ ) | +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_pose`\ (\ bone_idx\: :ref:`int`, pose\: :ref:`Transform3D`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_bone_pose_position`\ (\ bone_idx\: :ref:`int`, position\: :ref:`Vector3`\ ) | +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_bone_pose_rotation`\ (\ bone_idx\: :ref:`int`, rotation\: :ref:`Quaternion`\ ) | @@ -161,6 +167,20 @@ Emitted when the bone at ``bone_idx`` is toggled with :ref:`set_bone_enabled`! + +.. rst-class:: classref-item-separator + +---- + .. _class_Skeleton3D_signal_bone_pose_changed: .. rst-class:: classref-signal @@ -199,6 +219,37 @@ Emitted when the value of :ref:`show_rest_only` **MODIFIER_CALLBACK_MODE_PROCESS_PHYSICS** = ``0`` + +Set a flag to process modification during physics frames (see :ref:`Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS`). + +.. _class_Skeleton3D_constant_MODIFIER_CALLBACK_MODE_PROCESS_IDLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ModifierCallbackModeProcess` **MODIFIER_CALLBACK_MODE_PROCESS_IDLE** = ``1`` + +Set a flag to process modification during process frames (see :ref:`Node.NOTIFICATION_INTERNAL_PROCESS`). + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Constants --------- @@ -221,20 +272,18 @@ This notification is received *before* the related :ref:`pose_updated` **animate_physical_bones** = ``true`` +:ref:`ModifierCallbackModeProcess` **modifier_callback_mode_process** = ``1`` .. rst-class:: classref-property-setget -- |void| **set_animate_physical_bones**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **get_animate_physical_bones**\ (\ ) - -.. container:: contribute +- |void| **set_modifier_callback_mode_process**\ (\ value\: :ref:`ModifierCallbackModeProcess`\ ) +- :ref:`ModifierCallbackModeProcess` **get_modifier_callback_mode_process**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one `! +Sets the processing timing for the Modifier. .. rst-class:: classref-item-separator @@ -313,6 +362,8 @@ Clear all the bones in this skeleton. |void| **clear_bones_global_pose_override**\ (\ ) +**Deprecated:** This method may be changed or removed in future versions. + Removes the global pose override on all bones in the skeleton. .. rst-class:: classref-item-separator @@ -371,6 +422,18 @@ Force updates the bone transform for the bone at ``bone_idx`` and all of its chi ---- +.. _class_Skeleton3D_method_get_animate_physical_bones: + +.. rst-class:: classref-method + +:ref:`bool` **get_animate_physical_bones**\ (\ ) |const| + +**Deprecated:** This method may be changed or removed in future versions. + +.. rst-class:: classref-item-separator + +---- + .. _class_Skeleton3D_method_get_bone_children: .. rst-class:: classref-method @@ -403,6 +466,8 @@ Returns the number of bones in the skeleton. Returns the overall transform of the specified bone, with respect to the skeleton. Being relative to the skeleton frame, this is not the actual "global" transform of the bone. +\ **Note:** This is the global pose you set to the skeleton in the process, the final global pose can get overridden by modifiers in the deferred process, if you want to access the final global pose, use :ref:`SkeletonModifier3D.modification_processed`. + .. rst-class:: classref-item-separator ---- @@ -413,6 +478,8 @@ Returns the overall transform of the specified bone, with respect to the skeleto :ref:`Transform3D` **get_bone_global_pose_no_override**\ (\ bone_idx\: :ref:`int`\ ) |const| +**Deprecated:** This method may be changed or removed in future versions. + Returns the overall transform of the specified bone, with respect to the skeleton, but without any global pose overrides. Being relative to the skeleton frame, this is not the actual "global" transform of the bone. .. rst-class:: classref-item-separator @@ -425,6 +492,8 @@ Returns the overall transform of the specified bone, with respect to the skeleto :ref:`Transform3D` **get_bone_global_pose_override**\ (\ bone_idx\: :ref:`int`\ ) |const| +**Deprecated:** This method may be changed or removed in future versions. + Returns the global pose override transform for ``bone_idx``. .. rst-class:: classref-item-separator @@ -477,6 +546,8 @@ Returns the bone index which is the parent of the bone at ``bone_idx``. If -1, t Returns the pose transform of the specified bone. +\ **Note:** This is the pose you set to the skeleton in the process, the final pose can get overridden by modifiers in the deferred process, if you want to access the final pose, use :ref:`SkeletonModifier3D.modification_processed`. + .. rst-class:: classref-item-separator ---- @@ -587,6 +658,8 @@ Returns all bones in the skeleton to their rest poses. |void| **physical_bones_add_collision_exception**\ (\ exception\: :ref:`RID`\ ) +**Deprecated:** This method may be changed or removed in future versions. + Adds a collision exception to the physical bone. Works just like the :ref:`RigidBody3D` node. @@ -601,6 +674,8 @@ Works just like the :ref:`RigidBody3D` node. |void| **physical_bones_remove_collision_exception**\ (\ exception\: :ref:`RID`\ ) +**Deprecated:** This method may be changed or removed in future versions. + Removes a collision exception to the physical bone. Works just like the :ref:`RigidBody3D` node. @@ -615,6 +690,8 @@ Works just like the :ref:`RigidBody3D` node. |void| **physical_bones_start_simulation**\ (\ bones\: :ref:`Array`\[:ref:`StringName`\] = []\ ) +**Deprecated:** This method may be changed or removed in future versions. + Tells the :ref:`PhysicalBone3D` nodes in the Skeleton to start simulating and reacting to the physics world. Optionally, a list of bone names can be passed-in, allowing only the passed-in bones to be simulated. @@ -629,6 +706,8 @@ Optionally, a list of bone names can be passed-in, allowing only the passed-in b |void| **physical_bones_stop_simulation**\ (\ ) +**Deprecated:** This method may be changed or removed in future versions. + Tells the :ref:`PhysicalBone3D` nodes in the Skeleton to stop simulating. .. rst-class:: classref-item-separator @@ -671,6 +750,18 @@ Sets all bone poses to rests. ---- +.. _class_Skeleton3D_method_set_animate_physical_bones: + +.. rst-class:: classref-method + +|void| **set_animate_physical_bones**\ (\ enabled\: :ref:`bool`\ ) + +**Deprecated:** This method may be changed or removed in future versions. + +.. rst-class:: classref-item-separator + +---- + .. _class_Skeleton3D_method_set_bone_enabled: .. rst-class:: classref-method @@ -683,12 +774,28 @@ Disables the pose for the bone at ``bone_idx`` if ``false``, enables the bone po ---- +.. _class_Skeleton3D_method_set_bone_global_pose: + +.. rst-class:: classref-method + +|void| **set_bone_global_pose**\ (\ bone_idx\: :ref:`int`, pose\: :ref:`Transform3D`\ ) + +Sets the global pose transform, ``pose``, for the bone at ``bone_idx``. + +\ **Note:** If other bone poses have been changed, this method executes an update process and will cause performance to deteriorate. If you know that multiple global poses will be applied, consider using :ref:`set_bone_pose` with precalculation. + +.. rst-class:: classref-item-separator + +---- + .. _class_Skeleton3D_method_set_bone_global_pose_override: .. rst-class:: classref-method |void| **set_bone_global_pose_override**\ (\ bone_idx\: :ref:`int`, pose\: :ref:`Transform3D`, amount\: :ref:`float`, persistent\: :ref:`bool` = false\ ) +**Deprecated:** This method may be changed or removed in future versions. + Sets the global pose transform, ``pose``, for the bone at ``bone_idx``. \ ``amount`` is the interpolation strength that will be used when applying the pose, and ``persistent`` determines if the applied pose will remain. @@ -705,9 +812,7 @@ Sets the global pose transform, ``pose``, for the bone at ``bone_idx``. |void| **set_bone_name**\ (\ bone_idx\: :ref:`int`, name\: :ref:`String`\ ) -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the bone name, ``name``, for the bone at ``bone_idx``. .. rst-class:: classref-item-separator @@ -727,6 +832,18 @@ Sets the bone index ``parent_idx`` as the parent of the bone at ``bone_idx``. If ---- +.. _class_Skeleton3D_method_set_bone_pose: + +.. rst-class:: classref-method + +|void| **set_bone_pose**\ (\ bone_idx\: :ref:`int`, pose\: :ref:`Transform3D`\ ) + +Sets the pose transform, ``pose``, for the bone at ``bone_idx``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Skeleton3D_method_set_bone_pose_position: .. rst-class:: classref-method diff --git a/classes/class_skeletonik3d.rst b/classes/class_skeletonik3d.rst index e110695ac883..e6371d13be86 100644 --- a/classes/class_skeletonik3d.rst +++ b/classes/class_skeletonik3d.rst @@ -12,7 +12,7 @@ SkeletonIK3D **Deprecated:** This class may be changed or removed in future versions. -**Inherits:** :ref:`Node` **<** :ref:`Object` +**Inherits:** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` A node used to rotate all bones of a :ref:`Skeleton3D` bone chain a way that places the end bone at a desired 3D position. @@ -21,7 +21,7 @@ A node used to rotate all bones of a :ref:`Skeleton3D` bone ch Description ----------- -SkeletonIK3D is used to rotate all bones of a :ref:`Skeleton3D` bone chain a way that places the end bone at a desired 3D position. A typical scenario for IK in games is to place a character's feet on the ground or a character's hands on a currently held object. SkeletonIK uses FabrikInverseKinematic internally to solve the bone chain and applies the results to the :ref:`Skeleton3D` ``bones_global_pose_override`` property for all affected bones in the chain. If fully applied, this overwrites any bone transform from :ref:`Animation`\ s or bone custom poses set by users. The applied amount can be controlled with the :ref:`interpolation` property. +SkeletonIK3D is used to rotate all bones of a :ref:`Skeleton3D` bone chain a way that places the end bone at a desired 3D position. A typical scenario for IK in games is to place a character's feet on the ground or a character's hands on a currently held object. SkeletonIK uses FabrikInverseKinematic internally to solve the bone chain and applies the results to the :ref:`Skeleton3D` ``bones_global_pose_override`` property for all affected bones in the chain. If fully applied, this overwrites any bone transform from :ref:`Animation`\ s or bone custom poses set by users. The applied amount can be controlled with the :ref:`SkeletonModifier3D.influence` property. :: @@ -35,20 +35,13 @@ SkeletonIK3D is used to rotate all bones of a :ref:`Skeleton3D skeleton_ik_node.stop() # Apply full IK effect - skeleton_ik_node.set_interpolation(1.0) + skeleton_ik_node.set_influence(1.0) # Apply half IK effect - skeleton_ik_node.set_interpolation(0.5) + skeleton_ik_node.set_influence(0.5) # Apply zero IK effect (a value at or below 0.01 also removes bones_global_pose_override on Skeleton) - skeleton_ik_node.set_interpolation(0.0) - -.. rst-class:: classref-introduction-group - -Tutorials ---------- - -- `3D Inverse Kinematics Demo `__ + skeleton_ik_node.set_influence(0.0) .. rst-class:: classref-reftable-group @@ -58,8 +51,6 @@ Properties .. table:: :widths: auto - +---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ - | :ref:`float` | :ref:`interpolation` | ``1.0`` | +---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`Vector3` | :ref:`magnet` | ``Vector3(0, 0, 0)`` | +---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ @@ -107,23 +98,6 @@ Methods Property Descriptions --------------------- -.. _class_SkeletonIK3D_property_interpolation: - -.. rst-class:: classref-property - -:ref:`float` **interpolation** = ``1.0`` - -.. rst-class:: classref-property-setget - -- |void| **set_interpolation**\ (\ value\: :ref:`float`\ ) -- :ref:`float` **get_interpolation**\ (\ ) - -Interpolation value for how much the IK results are applied to the current skeleton bone chain. A value of ``1.0`` will overwrite all skeleton bone transforms completely while a value of ``0.0`` will visually disable the SkeletonIK. A value at or below ``0.01`` also calls :ref:`Skeleton3D.clear_bones_global_pose_override`. - -.. rst-class:: classref-item-separator - ----- - .. _class_SkeletonIK3D_property_magnet: .. rst-class:: classref-property diff --git a/classes/class_skeletonmodifier3d.rst b/classes/class_skeletonmodifier3d.rst new file mode 100644 index 000000000000..b36d4aa01919 --- /dev/null +++ b/classes/class_skeletonmodifier3d.rst @@ -0,0 +1,109 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/SkeletonModifier3D.xml. + +.. _class_SkeletonModifier3D: + +SkeletonModifier3D +================== + +**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +**Inherited By:** :ref:`OpenXRHand`, :ref:`PhysicalBoneSimulator3D`, :ref:`SkeletonIK3D`, :ref:`XRBodyModifier3D`, :ref:`XRHandModifier3D` + +A Node that may modify Skeleton3D's bone. + +.. rst-class:: classref-introduction-group + +Description +----------- + +**SkeletonModifier3D** retrieves a target :ref:`Skeleton3D` by having a :ref:`Skeleton3D` parent. + +If there is :ref:`AnimationMixer`, modification always performs after playback process of the :ref:`AnimationMixer`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`active` | ``true`` | + +---------------------------+---------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`influence` | ``1.0`` | + +---------------------------+---------------------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_SkeletonModifier3D_signal_modification_processed: + +.. rst-class:: classref-signal + +**modification_processed**\ (\ ) + +Notifies when the modification have been finished. + +\ **Note:** If you want to get the modified bone pose by the modifier, you must use :ref:`Skeleton3D.get_bone_pose` or :ref:`Skeleton3D.get_bone_global_pose` at the moment this signal is fired. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_SkeletonModifier3D_property_active: + +.. rst-class:: classref-property + +:ref:`bool` **active** = ``true`` + +.. rst-class:: classref-property-setget + +- |void| **set_active**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_active**\ (\ ) + +If ``true``, the **SkeletonModifier3D** will be processing. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SkeletonModifier3D_property_influence: + +.. rst-class:: classref-property + +:ref:`float` **influence** = ``1.0`` + +.. rst-class:: classref-property-setget + +- |void| **set_influence**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_influence**\ (\ ) + +Sets the influence of the modification. + +\ **Note:** This value is used by :ref:`Skeleton3D` to blend, so the **SkeletonModifier3D** should always apply only 100% of the result without interpolation. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_skeletonprofile.rst b/classes/class_skeletonprofile.rst index a999793306e3..95864a8c0794 100644 --- a/classes/class_skeletonprofile.rst +++ b/classes/class_skeletonprofile.rst @@ -79,6 +79,8 @@ Methods +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture2D` | :ref:`get_texture`\ (\ group_idx\: :ref:`int`\ ) |const| | +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_required`\ (\ bone_idx\: :ref:`int`\ ) |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_bone_name`\ (\ bone_idx\: :ref:`int`, bone_name\: :ref:`StringName`\ ) | +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_bone_parent`\ (\ bone_idx\: :ref:`int`, bone_parent\: :ref:`StringName`\ ) | @@ -93,6 +95,8 @@ Methods +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_reference_pose`\ (\ bone_idx\: :ref:`int`, bone_name\: :ref:`Transform3D`\ ) | +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_required`\ (\ bone_idx\: :ref:`int`, required\: :ref:`bool`\ ) | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_tail_direction`\ (\ bone_idx\: :ref:`int`, tail_direction\: :ref:`TailDirection`\ ) | +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_texture`\ (\ group_idx\: :ref:`int`, texture\: :ref:`Texture2D`\ ) | @@ -366,6 +370,20 @@ Returns the texture of the group at ``group_idx`` that will be the drawing group ---- +.. _class_SkeletonProfile_method_is_required: + +.. rst-class:: classref-method + +:ref:`bool` **is_required**\ (\ bone_idx\: :ref:`int`\ ) |const| + +Returns whether the bone at ``bone_idx`` is required for retargeting. + +This value is used by the bone map editor. If this method returns ``true``, and no bone is assigned, the handle color will be red on the bone map editor. + +.. rst-class:: classref-item-separator + +---- + .. _class_SkeletonProfile_method_set_bone_name: .. rst-class:: classref-method @@ -454,6 +472,18 @@ Sets the reference pose transform for bone ``bone_idx``. ---- +.. _class_SkeletonProfile_method_set_required: + +.. rst-class:: classref-method + +|void| **set_required**\ (\ bone_idx\: :ref:`int`, required\: :ref:`bool`\ ) + +Sets the required status for bone ``bone_idx`` to ``required``. + +.. rst-class:: classref-item-separator + +---- + .. _class_SkeletonProfile_method_set_tail_direction: .. rst-class:: classref-method diff --git a/classes/class_skeletonprofilehumanoid.rst b/classes/class_skeletonprofilehumanoid.rst index 2f89d331d367..814d3d51ad23 100644 --- a/classes/class_skeletonprofilehumanoid.rst +++ b/classes/class_skeletonprofilehumanoid.rst @@ -23,7 +23,7 @@ A :ref:`SkeletonProfile` as a preset that is optimized fo A humanoid skeleton profile contains 54 bones divided in 4 groups: ``"Body"``, ``"Face"``, ``"LeftHand"``, and ``"RightHand"``. It is structured as follows: -:: +.. code:: text Root └─ Hips diff --git a/classes/class_skinreference.rst b/classes/class_skinreference.rst index b44bd1c069a3..178488890ca0 100644 --- a/classes/class_skinreference.rst +++ b/classes/class_skinreference.rst @@ -12,9 +12,22 @@ SkinReference **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +A reference-counted holder object for a skeleton RID used in the :ref:`RenderingServer`. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +An internal object containing a mapping from a :ref:`Skin` used within the context of a particular :ref:`MeshInstance3D` to refer to the skeleton's :ref:`RID` in the RenderingServer. + +See also :ref:`MeshInstance3D.get_skin_reference` and :ref:`RenderingServer.instance_attach_skeleton`. + +Note that despite the similar naming, the skeleton RID used in the :ref:`RenderingServer` does not have a direct one-to-one correspondence to a :ref:`Skeleton3D` node. + +In particular, a :ref:`Skeleton3D` node with no :ref:`MeshInstance3D` children may be unknown to the :ref:`RenderingServer`. + +On the other hand, a :ref:`Skeleton3D` with multiple :ref:`MeshInstance3D` nodes which each have different :ref:`MeshInstance3D.skin` objects may have multiple SkinReference instances (and hence, multiple skeleton :ref:`RID`\ s). .. rst-class:: classref-reftable-group @@ -45,9 +58,7 @@ Method Descriptions :ref:`RID` **get_skeleton**\ (\ ) |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the :ref:`RID` owned by this SkinReference, as returned by :ref:`RenderingServer.skeleton_create`. .. rst-class:: classref-item-separator @@ -59,9 +70,9 @@ Method Descriptions :ref:`Skin` **get_skin**\ (\ ) |const| -.. container:: contribute +Returns the :ref:`Skin` connected to this SkinReference. In the case of :ref:`MeshInstance3D` with no :ref:`MeshInstance3D.skin` assigned, this will reference an internal default :ref:`Skin` owned by that :ref:`MeshInstance3D`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Note that a single :ref:`Skin` may have more than one **SkinReference** in the case that it is shared by meshes across multiple :ref:`Skeleton3D` nodes. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_sliderjoint3d.rst b/classes/class_sliderjoint3d.rst index 9666bba2833d..360c9eff0ae7 100644 --- a/classes/class_sliderjoint3d.rst +++ b/classes/class_sliderjoint3d.rst @@ -110,7 +110,7 @@ enum **Param**: :ref:`Param` **PARAM_LINEAR_LIMIT_UPPER** = ``0`` -The maximum difference between the pivot points on their X axis before damping happens. +Constant for accessing :ref:`linear_limit/upper_distance`. The maximum difference between the pivot points on their X axis before damping happens. .. _class_SliderJoint3D_constant_PARAM_LINEAR_LIMIT_LOWER: @@ -118,7 +118,7 @@ The maximum difference between the pivot points on their X axis before damping h :ref:`Param` **PARAM_LINEAR_LIMIT_LOWER** = ``1`` -The minimum difference between the pivot points on their X axis before damping happens. +Constant for accessing :ref:`linear_limit/lower_distance`. The minimum difference between the pivot points on their X axis before damping happens. .. _class_SliderJoint3D_constant_PARAM_LINEAR_LIMIT_SOFTNESS: @@ -126,7 +126,7 @@ The minimum difference between the pivot points on their X axis before damping h :ref:`Param` **PARAM_LINEAR_LIMIT_SOFTNESS** = ``2`` -A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. +Constant for accessing :ref:`linear_limit/softness`. A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. .. _class_SliderJoint3D_constant_PARAM_LINEAR_LIMIT_RESTITUTION: @@ -134,7 +134,7 @@ A factor applied to the movement across the slider axis once the limits get surp :ref:`Param` **PARAM_LINEAR_LIMIT_RESTITUTION** = ``3`` -The amount of restitution once the limits are surpassed. The lower, the more velocity-energy gets lost. +Constant for accessing :ref:`linear_limit/restitution`. The amount of restitution once the limits are surpassed. The lower, the more velocity-energy gets lost. .. _class_SliderJoint3D_constant_PARAM_LINEAR_LIMIT_DAMPING: @@ -142,7 +142,7 @@ The amount of restitution once the limits are surpassed. The lower, the more vel :ref:`Param` **PARAM_LINEAR_LIMIT_DAMPING** = ``4`` -The amount of damping once the slider limits are surpassed. +Constant for accessing :ref:`linear_limit/damping`. The amount of damping once the slider limits are surpassed. .. _class_SliderJoint3D_constant_PARAM_LINEAR_MOTION_SOFTNESS: @@ -150,7 +150,7 @@ The amount of damping once the slider limits are surpassed. :ref:`Param` **PARAM_LINEAR_MOTION_SOFTNESS** = ``5`` -A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement. +Constant for accessing :ref:`linear_motion/softness`. A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement. .. _class_SliderJoint3D_constant_PARAM_LINEAR_MOTION_RESTITUTION: @@ -158,7 +158,7 @@ A factor applied to the movement across the slider axis as long as the slider is :ref:`Param` **PARAM_LINEAR_MOTION_RESTITUTION** = ``6`` -The amount of restitution inside the slider limits. +Constant for accessing :ref:`linear_motion/restitution`. The amount of restitution inside the slider limits. .. _class_SliderJoint3D_constant_PARAM_LINEAR_MOTION_DAMPING: @@ -166,7 +166,7 @@ The amount of restitution inside the slider limits. :ref:`Param` **PARAM_LINEAR_MOTION_DAMPING** = ``7`` -The amount of damping inside the slider limits. +Constant for accessing :ref:`linear_motion/damping`. The amount of damping inside the slider limits. .. _class_SliderJoint3D_constant_PARAM_LINEAR_ORTHOGONAL_SOFTNESS: @@ -174,7 +174,7 @@ The amount of damping inside the slider limits. :ref:`Param` **PARAM_LINEAR_ORTHOGONAL_SOFTNESS** = ``8`` -A factor applied to the movement across axes orthogonal to the slider. +Constant for accessing :ref:`linear_ortho/softness`. A factor applied to the movement across axes orthogonal to the slider. .. _class_SliderJoint3D_constant_PARAM_LINEAR_ORTHOGONAL_RESTITUTION: @@ -182,7 +182,7 @@ A factor applied to the movement across axes orthogonal to the slider. :ref:`Param` **PARAM_LINEAR_ORTHOGONAL_RESTITUTION** = ``9`` -The amount of restitution when movement is across axes orthogonal to the slider. +Constant for accessing :ref:`linear_motion/restitution`. The amount of restitution when movement is across axes orthogonal to the slider. .. _class_SliderJoint3D_constant_PARAM_LINEAR_ORTHOGONAL_DAMPING: @@ -190,7 +190,7 @@ The amount of restitution when movement is across axes orthogonal to the slider. :ref:`Param` **PARAM_LINEAR_ORTHOGONAL_DAMPING** = ``10`` -The amount of damping when movement is across axes orthogonal to the slider. +Constant for accessing :ref:`linear_motion/damping`. The amount of damping when movement is across axes orthogonal to the slider. .. _class_SliderJoint3D_constant_PARAM_ANGULAR_LIMIT_UPPER: @@ -198,7 +198,7 @@ The amount of damping when movement is across axes orthogonal to the slider. :ref:`Param` **PARAM_ANGULAR_LIMIT_UPPER** = ``11`` -The upper limit of rotation in the slider. +Constant for accessing :ref:`angular_limit/upper_angle`. The upper limit of rotation in the slider. .. _class_SliderJoint3D_constant_PARAM_ANGULAR_LIMIT_LOWER: @@ -206,7 +206,7 @@ The upper limit of rotation in the slider. :ref:`Param` **PARAM_ANGULAR_LIMIT_LOWER** = ``12`` -The lower limit of rotation in the slider. +Constant for accessing :ref:`angular_limit/lower_angle`. The lower limit of rotation in the slider. .. _class_SliderJoint3D_constant_PARAM_ANGULAR_LIMIT_SOFTNESS: @@ -214,7 +214,7 @@ The lower limit of rotation in the slider. :ref:`Param` **PARAM_ANGULAR_LIMIT_SOFTNESS** = ``13`` -A factor applied to the all rotation once the limit is surpassed. +Constant for accessing :ref:`angular_limit/softness`. A factor applied to the all rotation once the limit is surpassed. .. _class_SliderJoint3D_constant_PARAM_ANGULAR_LIMIT_RESTITUTION: @@ -222,7 +222,7 @@ A factor applied to the all rotation once the limit is surpassed. :ref:`Param` **PARAM_ANGULAR_LIMIT_RESTITUTION** = ``14`` -The amount of restitution of the rotation when the limit is surpassed. +Constant for accessing :ref:`angular_limit/restitution`. The amount of restitution of the rotation when the limit is surpassed. .. _class_SliderJoint3D_constant_PARAM_ANGULAR_LIMIT_DAMPING: @@ -230,7 +230,7 @@ The amount of restitution of the rotation when the limit is surpassed. :ref:`Param` **PARAM_ANGULAR_LIMIT_DAMPING** = ``15`` -The amount of damping of the rotation when the limit is surpassed. +Constant for accessing :ref:`angular_limit/damping`. The amount of damping of the rotation when the limit is surpassed. .. _class_SliderJoint3D_constant_PARAM_ANGULAR_MOTION_SOFTNESS: @@ -238,7 +238,7 @@ The amount of damping of the rotation when the limit is surpassed. :ref:`Param` **PARAM_ANGULAR_MOTION_SOFTNESS** = ``16`` -A factor applied to the all rotation in the limits. +Constant for accessing :ref:`angular_motion/softness`. A factor applied to the all rotation in the limits. .. _class_SliderJoint3D_constant_PARAM_ANGULAR_MOTION_RESTITUTION: @@ -246,7 +246,7 @@ A factor applied to the all rotation in the limits. :ref:`Param` **PARAM_ANGULAR_MOTION_RESTITUTION** = ``17`` -The amount of restitution of the rotation in the limits. +Constant for accessing :ref:`angular_motion/restitution`. The amount of restitution of the rotation in the limits. .. _class_SliderJoint3D_constant_PARAM_ANGULAR_MOTION_DAMPING: @@ -254,7 +254,7 @@ The amount of restitution of the rotation in the limits. :ref:`Param` **PARAM_ANGULAR_MOTION_DAMPING** = ``18`` -The amount of damping of the rotation in the limits. +Constant for accessing :ref:`angular_motion/damping`. The amount of damping of the rotation in the limits. .. _class_SliderJoint3D_constant_PARAM_ANGULAR_ORTHOGONAL_SOFTNESS: @@ -262,7 +262,7 @@ The amount of damping of the rotation in the limits. :ref:`Param` **PARAM_ANGULAR_ORTHOGONAL_SOFTNESS** = ``19`` -A factor applied to the all rotation across axes orthogonal to the slider. +Constant for accessing :ref:`angular_ortho/softness`. A factor applied to the all rotation across axes orthogonal to the slider. .. _class_SliderJoint3D_constant_PARAM_ANGULAR_ORTHOGONAL_RESTITUTION: @@ -270,7 +270,7 @@ A factor applied to the all rotation across axes orthogonal to the slider. :ref:`Param` **PARAM_ANGULAR_ORTHOGONAL_RESTITUTION** = ``20`` -The amount of restitution of the rotation across axes orthogonal to the slider. +Constant for accessing :ref:`angular_ortho/restitution`. The amount of restitution of the rotation across axes orthogonal to the slider. .. _class_SliderJoint3D_constant_PARAM_ANGULAR_ORTHOGONAL_DAMPING: @@ -278,7 +278,7 @@ The amount of restitution of the rotation across axes orthogonal to the slider. :ref:`Param` **PARAM_ANGULAR_ORTHOGONAL_DAMPING** = ``21`` -The amount of damping of the rotation across axes orthogonal to the slider. +Constant for accessing :ref:`angular_ortho/damping`. The amount of damping of the rotation across axes orthogonal to the slider. .. _class_SliderJoint3D_constant_PARAM_MAX: @@ -688,9 +688,7 @@ Method Descriptions :ref:`float` **get_param**\ (\ param\: :ref:`Param`\ ) |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the value of the given parameter (see :ref:`Param` constants). .. rst-class:: classref-item-separator @@ -702,9 +700,7 @@ Method Descriptions |void| **set_param**\ (\ param\: :ref:`Param`, value\: :ref:`float`\ ) -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Assigns ``value`` to the given parameter (see :ref:`Param` constants). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_softbody3d.rst b/classes/class_softbody3d.rst index 2f26ce9ea82b..2983a198b015 100644 --- a/classes/class_softbody3d.rst +++ b/classes/class_softbody3d.rst @@ -21,6 +21,8 @@ Description A deformable 3D physics mesh. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials. +Additionally, **SoftBody3D** is subject to wind forces defined in :ref:`Area3D` (see :ref:`Area3D.wind_source_path`, :ref:`Area3D.wind_force_magnitude`, and :ref:`Area3D.wind_attenuation_factor`). + \ **Note:** There are many known bugs in **SoftBody3D**. Therefore, it's not recommended to use them for things that can affect gameplay (such as trampolines). .. rst-class:: classref-introduction-group diff --git a/classes/class_sphereshape3d.rst b/classes/class_sphereshape3d.rst index fb3fe35645b4..3c8818a9bc0c 100644 --- a/classes/class_sphereshape3d.rst +++ b/classes/class_sphereshape3d.rst @@ -28,7 +28,7 @@ A 3D sphere shape, intended for use in physics. Usually used to provide a shape Tutorials --------- -- `3D Physics Tests Demo `__ +- `3D Physics Tests Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_spotlight3d.rst b/classes/class_spotlight3d.rst index fca3f8fdd6ed..92f89b7f5b88 100644 --- a/classes/class_spotlight3d.rst +++ b/classes/class_spotlight3d.rst @@ -34,7 +34,7 @@ Tutorials - :doc:`Faking global illumination <../tutorials/3d/global_illumination/faking_global_illumination>` -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_sprite2d.rst b/classes/class_sprite2d.rst index edf2334eb82d..c19fa0203c07 100644 --- a/classes/class_sprite2d.rst +++ b/classes/class_sprite2d.rst @@ -26,7 +26,7 @@ A node that displays a 2D texture. The texture displayed can be a region from a Tutorials --------- -- `Instancing Demo `__ +- `Instancing Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_staticbody3d.rst b/classes/class_staticbody3d.rst index 2bfc213e7fd1..1ce9f0f21926 100644 --- a/classes/class_staticbody3d.rst +++ b/classes/class_staticbody3d.rst @@ -32,11 +32,11 @@ When **StaticBody3D** is moved, it is teleported to its new position without aff Tutorials --------- -- `3D Physics Tests Demo `__ +- `3D Physics Tests Demo `__ -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ -- `3D Voxel Demo `__ +- `3D Voxel Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_statusindicator.rst b/classes/class_statusindicator.rst index 44a13273b7ba..7b39b585f8a4 100644 --- a/classes/class_statusindicator.rst +++ b/classes/class_statusindicator.rst @@ -48,7 +48,7 @@ Signals .. rst-class:: classref-signal -**pressed**\ (\ mouse_button\: :ref:`int`, position\: :ref:`Vector2i`\ ) +**pressed**\ (\ mouse_button\: :ref:`int`, mouse_position\: :ref:`Vector2i`\ ) Emitted when the status indicator is pressed. diff --git a/classes/class_streampeerbuffer.rst b/classes/class_streampeerbuffer.rst index eeb93a88266b..c4b6388e540c 100644 --- a/classes/class_streampeerbuffer.rst +++ b/classes/class_streampeerbuffer.rst @@ -79,6 +79,8 @@ Property Descriptions The underlying data buffer. Setting this value resets the cursor. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray` for more details. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_string.rst b/classes/class_string.rst index a9a11302c2f3..6d23cd8f5493 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -89,6 +89,10 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`erase`\ (\ position\: :ref:`int`, chars\: :ref:`int` = 1\ ) |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`filecasecmp_to`\ (\ to\: :ref:`String`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`filenocasecmp_to`\ (\ to\: :ref:`String`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`find`\ (\ what\: :ref:`String`, from\: :ref:`int` = 0\ ) |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`findn`\ (\ what\: :ref:`String`, from\: :ref:`int` = 0\ ) |const| | @@ -482,7 +486,7 @@ Performs a case-sensitive comparison to another string. Returns ``-1`` if less t With different string lengths, returns ``1`` if this string is longer than the ``to`` string, or ``-1`` if shorter. Note that the length of empty strings is *always* ``0``. -To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`nocasecmp_to`, :ref:`naturalcasecmp_to`, and :ref:`naturalnocasecmp_to`. +To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`nocasecmp_to`, :ref:`filecasecmp_to`, and :ref:`naturalcasecmp_to`. .. rst-class:: classref-item-separator @@ -595,6 +599,34 @@ Returns a string with ``chars`` characters erased starting from ``position``. If ---- +.. _class_String_method_filecasecmp_to: + +.. rst-class:: classref-method + +:ref:`int` **filecasecmp_to**\ (\ to\: :ref:`String`\ ) |const| + +Like :ref:`naturalcasecmp_to` but prioritises strings that begin with periods (``.``) and underscores (``_``) before any other character. Useful when sorting folders or file names. + +To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`filenocasecmp_to`, :ref:`naturalcasecmp_to`, and :ref:`casecmp_to`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_String_method_filenocasecmp_to: + +.. rst-class:: classref-method + +:ref:`int` **filenocasecmp_to**\ (\ to\: :ref:`String`\ ) |const| + +Like :ref:`naturalnocasecmp_to` but prioritises strings that begin with periods (``.``) and underscores (``_``) before any other character. Useful when sorting folders or file names. + +To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`filecasecmp_to`, :ref:`naturalnocasecmp_to`, and :ref:`nocasecmp_to`. + +.. rst-class:: classref-item-separator + +---- + .. _class_String_method_find: .. rst-class:: classref-method @@ -671,6 +703,15 @@ Some additional handling is performed when ``values`` is an :ref:`Array` tutorial. +\ **Note:** The replacement of placeholders is not done all at once, instead each placeholder is replaced in the order they are passed, this means that if one of the replacement strings contains a key it will also be replaced. This can be very powerful, but can also cause unexpected results if you are not careful. If you do not need to perform replacement in the replacement strings, make sure your replacements do not contain placeholders to ensure reliable results. + +:: + + print("{0} {1}".format(["{1}", "x"])) # Prints "x x". + print("{0} {1}".format(["x", "{0}"])) # Prints "x {0}". + print("{foo} {bar}".format({"foo": "{bar}", "bar": "baz"})) # Prints "baz baz". + print("{foo} {bar}".format({"bar": "baz", "foo": "{bar}"})) # Prints "{bar} baz". + \ **Note:** In C#, it's recommended to `interpolate strings with "$" `__, instead. .. rst-class:: classref-item-separator @@ -1253,7 +1294,7 @@ When used for sorting, natural order comparison orders sequences of numbers by t With different string lengths, returns ``1`` if this string is longer than the ``to`` string, or ``-1`` if shorter. Note that the length of empty strings is *always* ``0``. -To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`naturalnocasecmp_to`, :ref:`nocasecmp_to`, and :ref:`casecmp_to`. +To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`naturalnocasecmp_to`, :ref:`filecasecmp_to`, and :ref:`nocasecmp_to`. .. rst-class:: classref-item-separator @@ -1271,7 +1312,7 @@ When used for sorting, natural order comparison orders sequences of numbers by t With different string lengths, returns ``1`` if this string is longer than the ``to`` string, or ``-1`` if shorter. Note that the length of empty strings is *always* ``0``. -To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`naturalcasecmp_to`, :ref:`nocasecmp_to`, and :ref:`casecmp_to`. +To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`naturalcasecmp_to`, :ref:`filenocasecmp_to`, and :ref:`casecmp_to`. .. rst-class:: classref-item-separator @@ -1287,7 +1328,7 @@ Performs a **case-insensitive** comparison to another string. Returns ``-1`` if With different string lengths, returns ``1`` if this string is longer than the ``to`` string, or ``-1`` if shorter. Note that the length of empty strings is *always* ``0``. -To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`casecmp_to`, :ref:`naturalcasecmp_to`, and :ref:`naturalnocasecmp_to`. +To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`casecmp_to`, :ref:`filenocasecmp_to`, and :ref:`naturalnocasecmp_to`. .. rst-class:: classref-item-separator diff --git a/classes/class_stringname.rst b/classes/class_stringname.rst index 013beae3326b..dbbd79cf94e5 100644 --- a/classes/class_stringname.rst +++ b/classes/class_stringname.rst @@ -84,6 +84,10 @@ Methods +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`erase`\ (\ position\: :ref:`int`, chars\: :ref:`int` = 1\ ) |const| | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`filecasecmp_to`\ (\ to\: :ref:`String`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`filenocasecmp_to`\ (\ to\: :ref:`String`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`find`\ (\ what\: :ref:`String`, from\: :ref:`int` = 0\ ) |const| | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`findn`\ (\ what\: :ref:`String`, from\: :ref:`int` = 0\ ) |const| | @@ -455,7 +459,7 @@ Performs a case-sensitive comparison to another string. Returns ``-1`` if less t With different string lengths, returns ``1`` if this string is longer than the ``to`` string, or ``-1`` if shorter. Note that the length of empty strings is *always* ``0``. -To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`nocasecmp_to`, :ref:`naturalcasecmp_to`, and :ref:`naturalnocasecmp_to`. +To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`nocasecmp_to`, :ref:`filecasecmp_to`, and :ref:`naturalcasecmp_to`. .. rst-class:: classref-item-separator @@ -551,6 +555,34 @@ Returns a string with ``chars`` characters erased starting from ``position``. If ---- +.. _class_StringName_method_filecasecmp_to: + +.. rst-class:: classref-method + +:ref:`int` **filecasecmp_to**\ (\ to\: :ref:`String`\ ) |const| + +Like :ref:`naturalcasecmp_to` but prioritises strings that begin with periods (``.``) and underscores (``_``) before any other character. Useful when sorting folders or file names. + +To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`filenocasecmp_to`, :ref:`naturalcasecmp_to`, and :ref:`casecmp_to`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_StringName_method_filenocasecmp_to: + +.. rst-class:: classref-method + +:ref:`int` **filenocasecmp_to**\ (\ to\: :ref:`String`\ ) |const| + +Like :ref:`naturalnocasecmp_to` but prioritises strings that begin with periods (``.``) and underscores (``_``) before any other character. Useful when sorting folders or file names. + +To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`filecasecmp_to`, :ref:`naturalnocasecmp_to`, and :ref:`nocasecmp_to`. + +.. rst-class:: classref-item-separator + +---- + .. _class_StringName_method_find: .. rst-class:: classref-method @@ -1195,7 +1227,7 @@ When used for sorting, natural order comparison orders sequences of numbers by t With different string lengths, returns ``1`` if this string is longer than the ``to`` string, or ``-1`` if shorter. Note that the length of empty strings is *always* ``0``. -To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`naturalnocasecmp_to`, :ref:`nocasecmp_to`, and :ref:`casecmp_to`. +To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`naturalnocasecmp_to`, :ref:`filecasecmp_to`, and :ref:`nocasecmp_to`. .. rst-class:: classref-item-separator @@ -1213,7 +1245,7 @@ When used for sorting, natural order comparison orders sequences of numbers by t With different string lengths, returns ``1`` if this string is longer than the ``to`` string, or ``-1`` if shorter. Note that the length of empty strings is *always* ``0``. -To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`naturalcasecmp_to`, :ref:`nocasecmp_to`, and :ref:`casecmp_to`. +To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`naturalcasecmp_to`, :ref:`filenocasecmp_to`, and :ref:`casecmp_to`. .. rst-class:: classref-item-separator @@ -1229,7 +1261,7 @@ Performs a **case-insensitive** comparison to another string. Returns ``-1`` if With different string lengths, returns ``1`` if this string is longer than the ``to`` string, or ``-1`` if shorter. Note that the length of empty strings is *always* ``0``. -To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`casecmp_to`, :ref:`naturalcasecmp_to`, and :ref:`naturalnocasecmp_to`. +To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`casecmp_to`, :ref:`filenocasecmp_to`, and :ref:`naturalnocasecmp_to`. .. rst-class:: classref-item-separator diff --git a/classes/class_styleboxflat.rst b/classes/class_styleboxflat.rst index 628eb37f241d..0fb0426bfb72 100644 --- a/classes/class_styleboxflat.rst +++ b/classes/class_styleboxflat.rst @@ -25,7 +25,7 @@ Setting corner radius to high values is allowed. As soon as corners overlap, the \ **Example:**\ -:: +.. code:: text height = 30 corner_radius_top_left = 50 @@ -33,7 +33,7 @@ Setting corner radius to high values is allowed. As soon as corners overlap, the The relative system now would take the 1:2 ratio of the two left corners to calculate the actual corner width. Both corners added will **never** be more than the height. Result: -:: +.. code:: text corner_radius_top_left: 10 corner_radius_bottom_left: 20 diff --git a/classes/class_subviewport.rst b/classes/class_subviewport.rst index 048fb291b976..ab7fa0a65fc3 100644 --- a/classes/class_subviewport.rst +++ b/classes/class_subviewport.rst @@ -32,17 +32,17 @@ Tutorials - :doc:`Viewport and canvas transforms <../tutorials/2d/2d_transforms>` -- `GUI in 3D Demo `__ +- `GUI in 3D Viewport Demo `__ -- `3D in 2D Demo `__ +- `3D in 2D Viewport Demo `__ -- `2D in 3D Demo `__ +- `2D in 3D Viewport Demo `__ -- `Screen Capture Demo `__ +- `Screen Capture Demo `__ -- `Dynamic Split Screen Demo `__ +- `Dynamic Split Screen Demo `__ -- `3D Viewport Scaling Demo `__ +- `3D Resolution Scaling Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_surfacetool.rst b/classes/class_surfacetool.rst index c135c29b7cdf..6c632817fa4f 100644 --- a/classes/class_surfacetool.rst +++ b/classes/class_surfacetool.rst @@ -59,7 +59,7 @@ Tutorials - :doc:`Using the SurfaceTool <../tutorials/3d/procedural_geometry/surfacetool>` -- `3D Voxel Demo `__ +- `3D Voxel Demo `__ .. rst-class:: classref-reftable-group @@ -401,7 +401,7 @@ Removes the index array by expanding the vertex array. **Deprecated:** This method is unused internally, as it does not preserve normals or UVs. Consider using :ref:`ImporterMesh.generate_lods` instead. -Generates a LOD for a given ``nd_threshold`` in linear units (square root of quadric error metric), using at most ``target_index_count`` indices. +Generates an LOD for a given ``nd_threshold`` in linear units (square root of quadric error metric), using at most ``target_index_count`` indices. .. rst-class:: classref-item-separator diff --git a/classes/class_systemfont.rst b/classes/class_systemfont.rst index 75caadcbee40..9e4e8f2205f3 100644 --- a/classes/class_systemfont.rst +++ b/classes/class_systemfont.rst @@ -42,6 +42,8 @@ Properties +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`FontAntialiasing` | :ref:`antialiasing` | ``1`` | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`disable_embedded_bitmaps` | ``true`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`bool` | :ref:`font_italic` | ``false`` | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`PackedStringArray` | :ref:`font_names` | ``PackedStringArray()`` | @@ -110,6 +112,23 @@ Font anti-aliasing mode. ---- +.. _class_SystemFont_property_disable_embedded_bitmaps: + +.. rst-class:: classref-property + +:ref:`bool` **disable_embedded_bitmaps** = ``true`` + +.. rst-class:: classref-property-setget + +- |void| **set_disable_embedded_bitmaps**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_disable_embedded_bitmaps**\ (\ ) + +If set to ``true``, embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property). + +.. rst-class:: classref-item-separator + +---- + .. _class_SystemFont_property_font_italic: .. rst-class:: classref-property @@ -140,6 +159,8 @@ If set to ``true``, italic or oblique font is preferred. Array of font family names to search, first matching font found is used. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index 07795518c129..6bc4c5def91f 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -55,6 +55,8 @@ Properties +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`CaretType` | :ref:`caret_type` | ``0`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`context_menu_enabled` | ``true`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`deselect_on_focus_loss_enabled` | ``true`` | @@ -403,6 +405,8 @@ Methods +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_tooltip_request_func`\ (\ callback\: :ref:`Callable`\ ) | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`skip_selection_for_next_occurrence`\ (\ ) | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`start_action`\ (\ action\: :ref:`EditAction`\ ) | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`swap_lines`\ (\ from_line\: :ref:`int`, to_line\: :ref:`int`\ ) | @@ -3446,6 +3450,18 @@ Provide custom tooltip text. The callback method must take the following args: ` ---- +.. _class_TextEdit_method_skip_selection_for_next_occurrence: + +.. rst-class:: classref-method + +|void| **skip_selection_for_next_occurrence**\ (\ ) + +Moves a selection and a caret for the next occurrence of the current selection. If there is no active selection, moves to the next occurrence of the word under caret. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_method_start_action: .. rst-class:: classref-method diff --git a/classes/class_textserver.rst b/classes/class_textserver.rst index 76d65a94af35..ae09bcf2942f 100644 --- a/classes/class_textserver.rst +++ b/classes/class_textserver.rst @@ -62,6 +62,8 @@ Methods +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_descent`\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`font_get_disable_embedded_bitmaps`\ (\ font_rid\: :ref:`RID`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_embolden`\ (\ font_rid\: :ref:`RID`\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`font_get_face_count`\ (\ font_rid\: :ref:`RID`\ ) |const| | @@ -194,6 +196,8 @@ Methods +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`font_set_descent`\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, descent\: :ref:`float`\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_disable_embedded_bitmaps`\ (\ font_rid\: :ref:`RID`, disable_embedded_bitmaps\: :ref:`bool`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`font_set_embolden`\ (\ font_rid\: :ref:`RID`, strength\: :ref:`float`\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`font_set_face_index`\ (\ font_rid\: :ref:`RID`, face_index\: :ref:`int`\ ) | @@ -358,6 +362,10 @@ Methods +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`shaped_text_get_line_breaks_adv`\ (\ shaped\: :ref:`RID`, width\: :ref:`PackedFloat32Array`, start\: :ref:`int` = 0, once\: :ref:`bool` = true, break_flags\: |bitfield|\[:ref:`LineBreakFlag`\] = 3\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shaped_text_get_object_glyph`\ (\ shaped\: :ref:`RID`, key\: :ref:`Variant`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`shaped_text_get_object_range`\ (\ shaped\: :ref:`RID`, key\: :ref:`Variant`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2` | :ref:`shaped_text_get_object_rect`\ (\ shaped\: :ref:`RID`, key\: :ref:`Variant`\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`shaped_text_get_objects`\ (\ shaped\: :ref:`RID`\ ) |const| | @@ -440,6 +448,8 @@ Methods +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`string_to_lower`\ (\ string\: :ref:`String`, language\: :ref:`String` = ""\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`string_to_title`\ (\ string\: :ref:`String`, language\: :ref:`String` = ""\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`string_to_upper`\ (\ string\: :ref:`String`, language\: :ref:`String` = ""\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`strip_diacritics`\ (\ string\: :ref:`String`\ ) |const| | @@ -1575,7 +1585,7 @@ Creates a new variation existing font which is reusing the same glyph cache and :ref:`RID` **create_shaped_text**\ (\ direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0\ ) -Creates new buffer for complex text layout, with the given ``direction`` and ``orientation``. To free the resulting buffer, use :ref:`free_rid` method. +Creates a new buffer for complex text layout, with the given ``direction`` and ``orientation``. To free the resulting buffer, use :ref:`free_rid` method. \ **Note:** Direction is ignored if server does not support :ref:`FEATURE_BIDI_LAYOUT` feature (supported by :ref:`TextServerAdvanced`). @@ -1603,7 +1613,7 @@ Draws box displaying character hexadecimal code. Used for replacing missing char |void| **font_clear_glyphs**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`\ ) -Removes all rendered glyphs information from the cache entry. +Removes all rendered glyph information from the cache entry. \ **Note:** This function will not remove textures associated with the glyphs, use :ref:`font_remove_texture` to remove them manually. @@ -1741,6 +1751,18 @@ Returns the font descent (number of pixels below the baseline). ---- +.. _class_TextServer_method_font_get_disable_embedded_bitmaps: + +.. rst-class:: classref-method + +:ref:`bool` **font_get_disable_embedded_bitmaps**\ (\ font_rid\: :ref:`RID`\ ) |const| + +Returns whether the font's embedded bitmap loading is disabled. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_font_get_embolden: .. rst-class:: classref-method @@ -2549,6 +2571,18 @@ Sets the font descent (number of pixels below the baseline). ---- +.. _class_TextServer_method_font_set_disable_embedded_bitmaps: + +.. rst-class:: classref-method + +|void| **font_set_disable_embedded_bitmaps**\ (\ font_rid\: :ref:`RID`, disable_embedded_bitmaps\: :ref:`bool`\ ) + +If set to ``true``, embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property). + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_font_set_embolden: .. rst-class:: classref-method @@ -2925,7 +2959,7 @@ Sets array containing glyph packing data. |void| **font_set_transform**\ (\ font_rid\: :ref:`RID`, transform\: :ref:`Transform2D`\ ) -Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs. +Sets 2D transform, applied to the font outlines, can be used for slanting, flipping, and rotating glyphs. For example, to simulate italic typeface by slanting, apply the following transform ``Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)``. @@ -3193,7 +3227,7 @@ Loads optional TextServer database (e.g. ICU break iterators and dictionaries). :ref:`int` **name_to_tag**\ (\ name\: :ref:`String`\ ) |const| -Converts readable feature, variation, script or language name to OpenType tag. +Converts readable feature, variation, script, or language name to OpenType tag. .. rst-class:: classref-item-separator @@ -3279,7 +3313,7 @@ Returns text span metadata. |void| **shaped_set_span_update_font**\ (\ shaped\: :ref:`RID`, index\: :ref:`int`, fonts\: :ref:`Array`\[:ref:`RID`\], size\: :ref:`int`, opentype_features\: :ref:`Dictionary` = {}\ ) -Changes text span font, font size and OpenType features, without changing the text. +Changes text span font, font size, and OpenType features, without changing the text. .. rst-class:: classref-item-separator @@ -3577,6 +3611,30 @@ Breaks text to the lines and columns. Returns character ranges for each segment. ---- +.. _class_TextServer_method_shaped_text_get_object_glyph: + +.. rst-class:: classref-method + +:ref:`int` **shaped_text_get_object_glyph**\ (\ shaped\: :ref:`RID`, key\: :ref:`Variant`\ ) |const| + +Returns the glyph index of the inline object. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServer_method_shaped_text_get_object_range: + +.. rst-class:: classref-method + +:ref:`Vector2i` **shaped_text_get_object_range**\ (\ shaped\: :ref:`RID`, key\: :ref:`Variant`\ ) |const| + +Returns the character range of the inline object. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_shaped_text_get_object_rect: .. rst-class:: classref-method @@ -4098,6 +4156,22 @@ Returns the string converted to lowercase. ---- +.. _class_TextServer_method_string_to_title: + +.. rst-class:: classref-method + +:ref:`String` **string_to_title**\ (\ string\: :ref:`String`, language\: :ref:`String` = ""\ ) |const| + +Returns the string converted to title case. + +\ **Note:** Casing is locale dependent and context sensitive if server support :ref:`FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION` feature (supported by :ref:`TextServerAdvanced`). + +\ **Note:** The result may be longer or shorter than the original. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_string_to_upper: .. rst-class:: classref-method @@ -4134,7 +4208,7 @@ Strips diacritics from the string. :ref:`String` **tag_to_name**\ (\ tag\: :ref:`int`\ ) |const| -Converts OpenType tag to readable feature, variation, script or language name. +Converts OpenType tag to readable feature, variation, script, or language name. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_textserverextension.rst b/classes/class_textserverextension.rst index 7721d4167ea3..b3f9b183355d 100644 --- a/classes/class_textserverextension.rst +++ b/classes/class_textserverextension.rst @@ -64,6 +64,8 @@ Methods +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_font_get_descent`\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`\ ) |virtual| |const| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_font_get_disable_embedded_bitmaps`\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_font_get_embolden`\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_font_get_face_count`\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| | @@ -198,6 +200,8 @@ Methods +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_font_set_descent`\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, descent\: :ref:`float`\ ) |virtual| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_disable_embedded_bitmaps`\ (\ font_rid\: :ref:`RID`, disable_embedded_bitmaps\: :ref:`bool`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_font_set_embolden`\ (\ font_rid\: :ref:`RID`, strength\: :ref:`float`\ ) |virtual| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_font_set_face_index`\ (\ font_rid\: :ref:`RID`, face_index\: :ref:`int`\ ) |virtual| | @@ -272,7 +276,7 @@ Methods +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`_font_supported_variation_list`\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_format_number`\ (\ string\: :ref:`String`, language\: :ref:`String`\ ) |virtual| |const| | + | :ref:`String` | :ref:`_format_number`\ (\ number\: :ref:`String`, language\: :ref:`String`\ ) |virtual| |const| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_free_rid`\ (\ rid\: :ref:`RID`\ ) |virtual| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -300,7 +304,7 @@ Methods +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_name_to_tag`\ (\ name\: :ref:`String`\ ) |virtual| |const| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_parse_number`\ (\ string\: :ref:`String`, language\: :ref:`String`\ ) |virtual| |const| | + | :ref:`String` | :ref:`_parse_number`\ (\ number\: :ref:`String`, language\: :ref:`String`\ ) |virtual| |const| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Vector3i`\] | :ref:`_parse_structured_text`\ (\ parser_type\: :ref:`StructuredTextParser`, args\: :ref:`Array`, text\: :ref:`String`\ ) |virtual| |const| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -362,6 +366,10 @@ Methods +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`_shaped_text_get_line_breaks_adv`\ (\ shaped\: :ref:`RID`, width\: :ref:`PackedFloat32Array`, start\: :ref:`int`, once\: :ref:`bool`, break_flags\: |bitfield|\[:ref:`LineBreakFlag`\]\ ) |virtual| |const| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_get_object_glyph`\ (\ shaped\: :ref:`RID`, key\: :ref:`Variant`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`_shaped_text_get_object_range`\ (\ shaped\: :ref:`RID`, key\: :ref:`Variant`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2` | :ref:`_shaped_text_get_object_rect`\ (\ shaped\: :ref:`RID`, key\: :ref:`Variant`\ ) |virtual| |const| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`_shaped_text_get_objects`\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| | @@ -446,6 +454,8 @@ Methods +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_string_to_lower`\ (\ string\: :ref:`String`, language\: :ref:`String`\ ) |virtual| |const| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_string_to_title`\ (\ string\: :ref:`String`, language\: :ref:`String`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_string_to_upper`\ (\ string\: :ref:`String`, language\: :ref:`String`\ ) |virtual| |const| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_strip_diacritics`\ (\ string\: :ref:`String`\ ) |virtual| |const| | @@ -468,9 +478,9 @@ Method Descriptions |void| **_cleanup**\ (\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +This method is called before text server is unregistered. .. rst-class:: classref-item-separator @@ -482,9 +492,9 @@ Method Descriptions :ref:`RID` **_create_font**\ (\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Creates a new, empty font cache entry resource. .. rst-class:: classref-item-separator @@ -496,9 +506,9 @@ Method Descriptions :ref:`RID` **_create_font_linked_variation**\ (\ font_rid\: :ref:`RID`\ ) |virtual| -.. container:: contribute +Optional, implement if font supports extra spacing or baseline offset. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Creates a new variation existing font which is reusing the same glyph cache and font data. .. rst-class:: classref-item-separator @@ -510,9 +520,9 @@ Method Descriptions :ref:`RID` **_create_shaped_text**\ (\ direction\: :ref:`Direction`, orientation\: :ref:`Orientation`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Creates a new buffer for complex text layout, with the given ``direction`` and ``orientation``. .. rst-class:: classref-item-separator @@ -524,9 +534,9 @@ Method Descriptions |void| **_draw_hex_code_box**\ (\ canvas\: :ref:`RID`, size\: :ref:`int`, pos\: :ref:`Vector2`, index\: :ref:`int`, color\: :ref:`Color`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Draws box displaying character hexadecimal code. .. rst-class:: classref-item-separator @@ -538,9 +548,9 @@ Method Descriptions |void| **_font_clear_glyphs**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Removes all rendered glyph information from the cache entry. .. rst-class:: classref-item-separator @@ -552,9 +562,9 @@ Method Descriptions |void| **_font_clear_kerning_map**\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Removes all kerning overrides. .. rst-class:: classref-item-separator @@ -566,9 +576,9 @@ Method Descriptions |void| **_font_clear_size_cache**\ (\ font_rid\: :ref:`RID`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Removes all font sizes from the cache entry. .. rst-class:: classref-item-separator @@ -580,9 +590,9 @@ Method Descriptions |void| **_font_clear_textures**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Removes all textures from font cache entry. .. rst-class:: classref-item-separator @@ -594,9 +604,9 @@ Method Descriptions |void| **_font_draw_glyph**\ (\ font_rid\: :ref:`RID`, canvas\: :ref:`RID`, size\: :ref:`int`, pos\: :ref:`Vector2`, index\: :ref:`int`, color\: :ref:`Color`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Draws single glyph into a canvas item at the position, using ``font_rid`` at the size ``size``. .. rst-class:: classref-item-separator @@ -608,9 +618,9 @@ Method Descriptions |void| **_font_draw_glyph_outline**\ (\ font_rid\: :ref:`RID`, canvas\: :ref:`RID`, size\: :ref:`int`, outline_size\: :ref:`int`, pos\: :ref:`Vector2`, index\: :ref:`int`, color\: :ref:`Color`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Draws single glyph outline of size ``outline_size`` into a canvas item at the position, using ``font_rid`` at the size ``size``. .. rst-class:: classref-item-separator @@ -622,9 +632,9 @@ Method Descriptions :ref:`FontAntialiasing` **_font_get_antialiasing**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns font anti-aliasing mode. .. rst-class:: classref-item-separator @@ -636,9 +646,9 @@ Method Descriptions :ref:`float` **_font_get_ascent**\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the font ascent (number of pixels above the baseline). .. rst-class:: classref-item-separator @@ -650,9 +660,9 @@ Method Descriptions :ref:`float` **_font_get_baseline_offset**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns extra baseline offset (as a fraction of font height). .. rst-class:: classref-item-separator @@ -664,9 +674,9 @@ Method Descriptions :ref:`int` **_font_get_char_from_glyph_index**\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, glyph_index\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns character code associated with ``glyph_index``, or ``0`` if ``glyph_index`` is invalid. .. rst-class:: classref-item-separator @@ -678,9 +688,23 @@ Method Descriptions :ref:`float` **_font_get_descent**\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ + +Returns the font descent (number of pixels below the baseline). + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_get_disable_embedded_bitmaps: + +.. rst-class:: classref-method + +:ref:`bool` **_font_get_disable_embedded_bitmaps**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| - There is currently no description for this method. Please help us by :ref:`contributing one `! +**Optional.**\ + +Returns whether the font's embedded bitmap loading is disabled. .. rst-class:: classref-item-separator @@ -692,9 +716,9 @@ Method Descriptions :ref:`float` **_font_get_embolden**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns font embolden strength. .. rst-class:: classref-item-separator @@ -706,9 +730,9 @@ Method Descriptions :ref:`int` **_font_get_face_count**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns number of faces in the TrueType / OpenType collection. .. rst-class:: classref-item-separator @@ -720,9 +744,9 @@ Method Descriptions :ref:`int` **_font_get_face_index**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns an active face index in the TrueType / OpenType collection. .. rst-class:: classref-item-separator @@ -734,9 +758,9 @@ Method Descriptions :ref:`int` **_font_get_fixed_size**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns bitmap font fixed size. .. rst-class:: classref-item-separator @@ -748,9 +772,9 @@ Method Descriptions :ref:`FixedSizeScaleMode` **_font_get_fixed_size_scale_mode**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns bitmap font scaling mode. .. rst-class:: classref-item-separator @@ -762,9 +786,9 @@ Method Descriptions :ref:`bool` **_font_get_generate_mipmaps**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if font texture mipmap generation is enabled. .. rst-class:: classref-item-separator @@ -776,9 +800,9 @@ Method Descriptions :ref:`float` **_font_get_global_oversampling**\ (\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the font oversampling factor, shared by all fonts in the TextServer. .. rst-class:: classref-item-separator @@ -790,9 +814,9 @@ Method Descriptions :ref:`Vector2` **_font_get_glyph_advance**\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, glyph\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns glyph advance (offset of the next glyph). .. rst-class:: classref-item-separator @@ -804,9 +828,9 @@ Method Descriptions :ref:`Dictionary` **_font_get_glyph_contours**\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, index\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns outline contours of the glyph. .. rst-class:: classref-item-separator @@ -818,9 +842,9 @@ Method Descriptions :ref:`int` **_font_get_glyph_index**\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, char\: :ref:`int`, variation_selector\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the glyph index of a ``char``, optionally modified by the ``variation_selector``. .. rst-class:: classref-item-separator @@ -832,9 +856,9 @@ Method Descriptions :ref:`PackedInt32Array` **_font_get_glyph_list**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns list of rendered glyphs in the cache entry. .. rst-class:: classref-item-separator @@ -846,9 +870,9 @@ Method Descriptions :ref:`Vector2` **_font_get_glyph_offset**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`, glyph\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns glyph offset from the baseline. .. rst-class:: classref-item-separator @@ -860,9 +884,9 @@ Method Descriptions :ref:`Vector2` **_font_get_glyph_size**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`, glyph\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns size of the glyph. .. rst-class:: classref-item-separator @@ -874,9 +898,9 @@ Method Descriptions :ref:`int` **_font_get_glyph_texture_idx**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`, glyph\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns index of the cache texture containing the glyph. .. rst-class:: classref-item-separator @@ -888,9 +912,9 @@ Method Descriptions :ref:`RID` **_font_get_glyph_texture_rid**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`, glyph\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns resource ID of the cache texture containing the glyph. .. rst-class:: classref-item-separator @@ -902,9 +926,9 @@ Method Descriptions :ref:`Vector2` **_font_get_glyph_texture_size**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`, glyph\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns size of the cache texture containing the glyph. .. rst-class:: classref-item-separator @@ -916,9 +940,9 @@ Method Descriptions :ref:`Rect2` **_font_get_glyph_uv_rect**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`, glyph\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns rectangle in the cache texture containing the glyph. .. rst-class:: classref-item-separator @@ -930,9 +954,9 @@ Method Descriptions :ref:`Hinting` **_font_get_hinting**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the font hinting mode. Used by dynamic fonts only. .. rst-class:: classref-item-separator @@ -944,9 +968,9 @@ Method Descriptions :ref:`Vector2` **_font_get_kerning**\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, glyph_pair\: :ref:`Vector2i`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns kerning for the pair of glyphs. .. rst-class:: classref-item-separator @@ -958,9 +982,9 @@ Method Descriptions :ref:`Array`\[:ref:`Vector2i`\] **_font_get_kerning_list**\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns list of the kerning overrides. .. rst-class:: classref-item-separator @@ -972,9 +996,9 @@ Method Descriptions :ref:`bool` **_font_get_language_support_override**\ (\ font_rid\: :ref:`RID`, language\: :ref:`String`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if support override is enabled for the ``language``. .. rst-class:: classref-item-separator @@ -986,9 +1010,9 @@ Method Descriptions :ref:`PackedStringArray` **_font_get_language_support_overrides**\ (\ font_rid\: :ref:`RID`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns list of language support overrides. .. rst-class:: classref-item-separator @@ -1000,9 +1024,9 @@ Method Descriptions :ref:`int` **_font_get_msdf_pixel_range**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the width of the range around the shape between the minimum and maximum representable signed distance. .. rst-class:: classref-item-separator @@ -1014,9 +1038,9 @@ Method Descriptions :ref:`int` **_font_get_msdf_size**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns source font size used to generate MSDF textures. .. rst-class:: classref-item-separator @@ -1028,9 +1052,9 @@ Method Descriptions :ref:`String` **_font_get_name**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns font family name. .. rst-class:: classref-item-separator @@ -1042,9 +1066,9 @@ Method Descriptions :ref:`Dictionary` **_font_get_opentype_feature_overrides**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns font OpenType feature set override. .. rst-class:: classref-item-separator @@ -1056,9 +1080,9 @@ Method Descriptions :ref:`Dictionary` **_font_get_ot_name_strings**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns :ref:`Dictionary` with OpenType font name strings (localized font names, version, description, license information, sample text, etc.). .. rst-class:: classref-item-separator @@ -1070,9 +1094,9 @@ Method Descriptions :ref:`float` **_font_get_oversampling**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only. .. rst-class:: classref-item-separator @@ -1084,9 +1108,9 @@ Method Descriptions :ref:`float` **_font_get_scale**\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns scaling factor of the color bitmap font. .. rst-class:: classref-item-separator @@ -1098,9 +1122,9 @@ Method Descriptions :ref:`bool` **_font_get_script_support_override**\ (\ font_rid\: :ref:`RID`, script\: :ref:`String`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if support override is enabled for the ``script``. .. rst-class:: classref-item-separator @@ -1112,9 +1136,9 @@ Method Descriptions :ref:`PackedStringArray` **_font_get_script_support_overrides**\ (\ font_rid\: :ref:`RID`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns list of script support overrides. .. rst-class:: classref-item-separator @@ -1126,9 +1150,9 @@ Method Descriptions :ref:`Array`\[:ref:`Vector2i`\] **_font_get_size_cache_list**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns list of the font sizes in the cache. Each size is :ref:`Vector2i` with font size and outline size. .. rst-class:: classref-item-separator @@ -1140,9 +1164,9 @@ Method Descriptions :ref:`int` **_font_get_spacing**\ (\ font_rid\: :ref:`RID`, spacing\: :ref:`SpacingType`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the spacing for ``spacing`` (see :ref:`SpacingType`) in pixels (not relative to the font size). .. rst-class:: classref-item-separator @@ -1154,9 +1178,9 @@ Method Descriptions :ref:`int` **_font_get_stretch**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``. .. rst-class:: classref-item-separator @@ -1168,9 +1192,9 @@ Method Descriptions |bitfield|\[:ref:`FontStyle`\] **_font_get_style**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns font style flags, see :ref:`FontStyle`. .. rst-class:: classref-item-separator @@ -1182,9 +1206,9 @@ Method Descriptions :ref:`String` **_font_get_style_name**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns font style name. .. rst-class:: classref-item-separator @@ -1196,9 +1220,9 @@ Method Descriptions :ref:`SubpixelPositioning` **_font_get_subpixel_positioning**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns font subpixel glyph positioning mode. .. rst-class:: classref-item-separator @@ -1210,9 +1234,9 @@ Method Descriptions :ref:`String` **_font_get_supported_chars**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns a string containing all the characters available in the font. .. rst-class:: classref-item-separator @@ -1224,9 +1248,9 @@ Method Descriptions :ref:`int` **_font_get_texture_count**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns number of textures used by font cache entry. .. rst-class:: classref-item-separator @@ -1238,9 +1262,9 @@ Method Descriptions :ref:`Image` **_font_get_texture_image**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`, texture_index\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns font cache texture image data. .. rst-class:: classref-item-separator @@ -1252,9 +1276,9 @@ Method Descriptions :ref:`PackedInt32Array` **_font_get_texture_offsets**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`, texture_index\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns array containing glyph packing data. .. rst-class:: classref-item-separator @@ -1266,9 +1290,9 @@ Method Descriptions :ref:`Transform2D` **_font_get_transform**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns 2D transform applied to the font outlines. .. rst-class:: classref-item-separator @@ -1280,9 +1304,9 @@ Method Descriptions :ref:`float` **_font_get_underline_position**\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns pixel offset of the underline below the baseline. .. rst-class:: classref-item-separator @@ -1294,9 +1318,9 @@ Method Descriptions :ref:`float` **_font_get_underline_thickness**\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns thickness of the underline in pixels. .. rst-class:: classref-item-separator @@ -1308,9 +1332,9 @@ Method Descriptions :ref:`Dictionary` **_font_get_variation_coordinates**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns variation coordinates for the specified font cache entry. .. rst-class:: classref-item-separator @@ -1322,9 +1346,9 @@ Method Descriptions :ref:`int` **_font_get_weight**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``. .. rst-class:: classref-item-separator @@ -1336,9 +1360,9 @@ Method Descriptions :ref:`bool` **_font_has_char**\ (\ font_rid\: :ref:`RID`, char\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if a Unicode ``char`` is available in the font. .. rst-class:: classref-item-separator @@ -1350,9 +1374,9 @@ Method Descriptions :ref:`bool` **_font_is_allow_system_fallback**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if system fonts can be automatically used as fallbacks. .. rst-class:: classref-item-separator @@ -1364,9 +1388,9 @@ Method Descriptions :ref:`bool` **_font_is_force_autohinter**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if auto-hinting is supported and preferred over font built-in hinting. .. rst-class:: classref-item-separator @@ -1378,9 +1402,9 @@ Method Descriptions :ref:`bool` **_font_is_language_supported**\ (\ font_rid\: :ref:`RID`, language\: :ref:`String`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true``, if font supports given language (`ISO 639 `__ code). .. rst-class:: classref-item-separator @@ -1392,9 +1416,9 @@ Method Descriptions :ref:`bool` **_font_is_multichannel_signed_distance_field**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. .. rst-class:: classref-item-separator @@ -1406,9 +1430,9 @@ Method Descriptions :ref:`bool` **_font_is_script_supported**\ (\ font_rid\: :ref:`RID`, script\: :ref:`String`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true``, if font supports given script (ISO 15924 code). .. rst-class:: classref-item-separator @@ -1420,9 +1444,9 @@ Method Descriptions |void| **_font_remove_glyph**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`, glyph\: :ref:`int`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Removes specified rendered glyph information from the cache entry. .. rst-class:: classref-item-separator @@ -1434,9 +1458,9 @@ Method Descriptions |void| **_font_remove_kerning**\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, glyph_pair\: :ref:`Vector2i`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Removes kerning override for the pair of glyphs. .. rst-class:: classref-item-separator @@ -1448,9 +1472,9 @@ Method Descriptions |void| **_font_remove_language_support_override**\ (\ font_rid\: :ref:`RID`, language\: :ref:`String`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Remove language support override. .. rst-class:: classref-item-separator @@ -1462,9 +1486,9 @@ Method Descriptions |void| **_font_remove_script_support_override**\ (\ font_rid\: :ref:`RID`, script\: :ref:`String`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Removes script support override. .. rst-class:: classref-item-separator @@ -1476,9 +1500,9 @@ Method Descriptions |void| **_font_remove_size_cache**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Removes specified font size from the cache entry. .. rst-class:: classref-item-separator @@ -1490,9 +1514,9 @@ Method Descriptions |void| **_font_remove_texture**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`, texture_index\: :ref:`int`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Removes specified texture from the cache entry. .. rst-class:: classref-item-separator @@ -1504,9 +1528,9 @@ Method Descriptions |void| **_font_render_glyph**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`, index\: :ref:`int`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Renders specified glyph to the font cache texture. .. rst-class:: classref-item-separator @@ -1518,9 +1542,9 @@ Method Descriptions |void| **_font_render_range**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`, start\: :ref:`int`, end\: :ref:`int`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Renders the range of characters to the font cache texture. .. rst-class:: classref-item-separator @@ -1532,9 +1556,9 @@ Method Descriptions |void| **_font_set_allow_system_fallback**\ (\ font_rid\: :ref:`RID`, allow_system_fallback\: :ref:`bool`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +If set to ``true``, system fonts can be automatically used as fallbacks. .. rst-class:: classref-item-separator @@ -1546,9 +1570,9 @@ Method Descriptions |void| **_font_set_antialiasing**\ (\ font_rid\: :ref:`RID`, antialiasing\: :ref:`FontAntialiasing`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets font anti-aliasing mode. .. rst-class:: classref-item-separator @@ -1560,9 +1584,9 @@ Method Descriptions |void| **_font_set_ascent**\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, ascent\: :ref:`float`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the font ascent (number of pixels above the baseline). .. rst-class:: classref-item-separator @@ -1574,9 +1598,9 @@ Method Descriptions |void| **_font_set_baseline_offset**\ (\ font_rid\: :ref:`RID`, baseline_offset\: :ref:`float`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets extra baseline offset (as a fraction of font height). .. rst-class:: classref-item-separator @@ -1588,9 +1612,9 @@ Method Descriptions |void| **_font_set_data**\ (\ font_rid\: :ref:`RID`, data\: :ref:`PackedByteArray`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets font source data, e.g contents of the dynamic font source file. .. rst-class:: classref-item-separator @@ -1602,9 +1626,9 @@ Method Descriptions |void| **_font_set_data_ptr**\ (\ font_rid\: :ref:`RID`, data_ptr\: ``const uint8_t*``, data_size\: :ref:`int`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets pointer to the font source data, e.g contents of the dynamic font source file. .. rst-class:: classref-item-separator @@ -1616,9 +1640,23 @@ Method Descriptions |void| **_font_set_descent**\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, descent\: :ref:`float`\ ) |virtual| -.. container:: contribute +**Required.**\ + +Sets the font descent (number of pixels below the baseline). + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_set_disable_embedded_bitmaps: - There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-method + +|void| **_font_set_disable_embedded_bitmaps**\ (\ font_rid\: :ref:`RID`, disable_embedded_bitmaps\: :ref:`bool`\ ) |virtual| + +**Optional.**\ + +If set to ``true``, embedded font bitmap loading is disabled. .. rst-class:: classref-item-separator @@ -1630,9 +1668,7 @@ Method Descriptions |void| **_font_set_embolden**\ (\ font_rid\: :ref:`RID`, strength\: :ref:`float`\ ) |virtual| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets font embolden strength. If ``strength`` is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. .. rst-class:: classref-item-separator @@ -1644,9 +1680,9 @@ Method Descriptions |void| **_font_set_face_index**\ (\ font_rid\: :ref:`RID`, face_index\: :ref:`int`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets an active face index in the TrueType / OpenType collection. .. rst-class:: classref-item-separator @@ -1658,9 +1694,9 @@ Method Descriptions |void| **_font_set_fixed_size**\ (\ font_rid\: :ref:`RID`, fixed_size\: :ref:`int`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes. .. rst-class:: classref-item-separator @@ -1672,9 +1708,9 @@ Method Descriptions |void| **_font_set_fixed_size_scale_mode**\ (\ font_rid\: :ref:`RID`, fixed_size_scale_mode\: :ref:`FixedSizeScaleMode`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets bitmap font scaling mode. This property is used only if ``fixed_size`` is greater than zero. .. rst-class:: classref-item-separator @@ -1686,9 +1722,9 @@ Method Descriptions |void| **_font_set_force_autohinter**\ (\ font_rid\: :ref:`RID`, force_autohinter\: :ref:`bool`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +If set to ``true`` auto-hinting is preferred over font built-in hinting. .. rst-class:: classref-item-separator @@ -1700,9 +1736,9 @@ Method Descriptions |void| **_font_set_generate_mipmaps**\ (\ font_rid\: :ref:`RID`, generate_mipmaps\: :ref:`bool`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +If set to ``true`` font texture mipmap generation is enabled. .. rst-class:: classref-item-separator @@ -1714,9 +1750,9 @@ Method Descriptions |void| **_font_set_global_oversampling**\ (\ oversampling\: :ref:`float`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets oversampling factor, shared by all font in the TextServer. .. rst-class:: classref-item-separator @@ -1728,9 +1764,9 @@ Method Descriptions |void| **_font_set_glyph_advance**\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, glyph\: :ref:`int`, advance\: :ref:`Vector2`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets glyph advance (offset of the next glyph). .. rst-class:: classref-item-separator @@ -1742,9 +1778,9 @@ Method Descriptions |void| **_font_set_glyph_offset**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`, glyph\: :ref:`int`, offset\: :ref:`Vector2`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets glyph offset from the baseline. .. rst-class:: classref-item-separator @@ -1756,9 +1792,9 @@ Method Descriptions |void| **_font_set_glyph_size**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`, glyph\: :ref:`int`, gl_size\: :ref:`Vector2`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets size of the glyph. .. rst-class:: classref-item-separator @@ -1770,9 +1806,9 @@ Method Descriptions |void| **_font_set_glyph_texture_idx**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`, glyph\: :ref:`int`, texture_idx\: :ref:`int`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets index of the cache texture containing the glyph. .. rst-class:: classref-item-separator @@ -1784,9 +1820,9 @@ Method Descriptions |void| **_font_set_glyph_uv_rect**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`, glyph\: :ref:`int`, uv_rect\: :ref:`Rect2`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets rectangle in the cache texture containing the glyph. .. rst-class:: classref-item-separator @@ -1798,9 +1834,9 @@ Method Descriptions |void| **_font_set_hinting**\ (\ font_rid\: :ref:`RID`, hinting\: :ref:`Hinting`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets font hinting mode. Used by dynamic fonts only. .. rst-class:: classref-item-separator @@ -1812,9 +1848,9 @@ Method Descriptions |void| **_font_set_kerning**\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, glyph_pair\: :ref:`Vector2i`, kerning\: :ref:`Vector2`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets kerning for the pair of glyphs. .. rst-class:: classref-item-separator @@ -1826,9 +1862,9 @@ Method Descriptions |void| **_font_set_language_support_override**\ (\ font_rid\: :ref:`RID`, language\: :ref:`String`, supported\: :ref:`bool`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Adds override for :ref:`_font_is_language_supported`. .. rst-class:: classref-item-separator @@ -1840,9 +1876,9 @@ Method Descriptions |void| **_font_set_msdf_pixel_range**\ (\ font_rid\: :ref:`RID`, msdf_pixel_range\: :ref:`int`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the width of the range around the shape between the minimum and maximum representable signed distance. .. rst-class:: classref-item-separator @@ -1854,9 +1890,9 @@ Method Descriptions |void| **_font_set_msdf_size**\ (\ font_rid\: :ref:`RID`, msdf_size\: :ref:`int`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets source font size used to generate MSDF textures. .. rst-class:: classref-item-separator @@ -1868,9 +1904,9 @@ Method Descriptions |void| **_font_set_multichannel_signed_distance_field**\ (\ font_rid\: :ref:`RID`, msdf\: :ref:`bool`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +If set to ``true``, glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. MSDF rendering allows displaying the font at any scaling factor without blurriness, and without incurring a CPU cost when the font size changes (since the font no longer needs to be rasterized on the CPU). As a downside, font hinting is not available with MSDF. The lack of font hinting may result in less crisp and less readable fonts at small sizes. .. rst-class:: classref-item-separator @@ -1882,9 +1918,9 @@ Method Descriptions |void| **_font_set_name**\ (\ font_rid\: :ref:`RID`, name\: :ref:`String`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the font family name. .. rst-class:: classref-item-separator @@ -1896,9 +1932,9 @@ Method Descriptions |void| **_font_set_opentype_feature_overrides**\ (\ font_rid\: :ref:`RID`, overrides\: :ref:`Dictionary`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets font OpenType feature set override. .. rst-class:: classref-item-separator @@ -1910,9 +1946,9 @@ Method Descriptions |void| **_font_set_oversampling**\ (\ font_rid\: :ref:`RID`, oversampling\: :ref:`float`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only. .. rst-class:: classref-item-separator @@ -1924,9 +1960,9 @@ Method Descriptions |void| **_font_set_scale**\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, scale\: :ref:`float`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets scaling factor of the color bitmap font. .. rst-class:: classref-item-separator @@ -1938,9 +1974,9 @@ Method Descriptions |void| **_font_set_script_support_override**\ (\ font_rid\: :ref:`RID`, script\: :ref:`String`, supported\: :ref:`bool`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Adds override for :ref:`_font_is_script_supported`. .. rst-class:: classref-item-separator @@ -1952,9 +1988,9 @@ Method Descriptions |void| **_font_set_spacing**\ (\ font_rid\: :ref:`RID`, spacing\: :ref:`SpacingType`, value\: :ref:`int`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the spacing for ``spacing`` (see :ref:`SpacingType`) to ``value`` in pixels (not relative to the font size). .. rst-class:: classref-item-separator @@ -1966,9 +2002,9 @@ Method Descriptions |void| **_font_set_stretch**\ (\ font_rid\: :ref:`RID`, stretch\: :ref:`int`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``. .. rst-class:: classref-item-separator @@ -1980,9 +2016,9 @@ Method Descriptions |void| **_font_set_style**\ (\ font_rid\: :ref:`RID`, style\: |bitfield|\[:ref:`FontStyle`\]\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the font style flags, see :ref:`FontStyle`. .. rst-class:: classref-item-separator @@ -1994,9 +2030,9 @@ Method Descriptions |void| **_font_set_style_name**\ (\ font_rid\: :ref:`RID`, name_style\: :ref:`String`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the font style name. .. rst-class:: classref-item-separator @@ -2008,9 +2044,9 @@ Method Descriptions |void| **_font_set_subpixel_positioning**\ (\ font_rid\: :ref:`RID`, subpixel_positioning\: :ref:`SubpixelPositioning`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets font subpixel glyph positioning mode. .. rst-class:: classref-item-separator @@ -2022,9 +2058,9 @@ Method Descriptions |void| **_font_set_texture_image**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`, texture_index\: :ref:`int`, image\: :ref:`Image`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets font cache texture image data. .. rst-class:: classref-item-separator @@ -2036,9 +2072,9 @@ Method Descriptions |void| **_font_set_texture_offsets**\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`, texture_index\: :ref:`int`, offset\: :ref:`PackedInt32Array`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets array containing glyph packing data. .. rst-class:: classref-item-separator @@ -2050,9 +2086,9 @@ Method Descriptions |void| **_font_set_transform**\ (\ font_rid\: :ref:`RID`, transform\: :ref:`Transform2D`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets 2D transform, applied to the font outlines, can be used for slanting, flipping, and rotating glyphs. .. rst-class:: classref-item-separator @@ -2064,9 +2100,9 @@ Method Descriptions |void| **_font_set_underline_position**\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, underline_position\: :ref:`float`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets pixel offset of the underline below the baseline. .. rst-class:: classref-item-separator @@ -2078,9 +2114,9 @@ Method Descriptions |void| **_font_set_underline_thickness**\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, underline_thickness\: :ref:`float`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets thickness of the underline in pixels. .. rst-class:: classref-item-separator @@ -2092,9 +2128,9 @@ Method Descriptions |void| **_font_set_variation_coordinates**\ (\ font_rid\: :ref:`RID`, variation_coordinates\: :ref:`Dictionary`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets variation coordinates for the specified font cache entry. .. rst-class:: classref-item-separator @@ -2106,9 +2142,9 @@ Method Descriptions |void| **_font_set_weight**\ (\ font_rid\: :ref:`RID`, weight\: :ref:`int`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``. .. rst-class:: classref-item-separator @@ -2120,9 +2156,9 @@ Method Descriptions :ref:`Dictionary` **_font_supported_feature_list**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the dictionary of the supported OpenType features. .. rst-class:: classref-item-separator @@ -2134,9 +2170,9 @@ Method Descriptions :ref:`Dictionary` **_font_supported_variation_list**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the dictionary of the supported OpenType variation coordinates. .. rst-class:: classref-item-separator @@ -2146,11 +2182,11 @@ Method Descriptions .. rst-class:: classref-method -:ref:`String` **_format_number**\ (\ string\: :ref:`String`, language\: :ref:`String`\ ) |virtual| |const| +:ref:`String` **_format_number**\ (\ number\: :ref:`String`, language\: :ref:`String`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Converts a number from the Western Arabic (0..9) to the numeral systems used in ``language``. .. rst-class:: classref-item-separator @@ -2162,9 +2198,9 @@ Method Descriptions |void| **_free_rid**\ (\ rid\: :ref:`RID`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Frees an object created by this :ref:`TextServer`. .. rst-class:: classref-item-separator @@ -2176,9 +2212,9 @@ Method Descriptions :ref:`int` **_get_features**\ (\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns text server features, see :ref:`Feature`. .. rst-class:: classref-item-separator @@ -2190,9 +2226,9 @@ Method Descriptions :ref:`Vector2` **_get_hex_code_box_size**\ (\ size\: :ref:`int`, index\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters). .. rst-class:: classref-item-separator @@ -2204,9 +2240,9 @@ Method Descriptions :ref:`String` **_get_name**\ (\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the name of the server interface. .. rst-class:: classref-item-separator @@ -2218,9 +2254,9 @@ Method Descriptions :ref:`String` **_get_support_data_filename**\ (\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename. .. rst-class:: classref-item-separator @@ -2232,9 +2268,9 @@ Method Descriptions :ref:`String` **_get_support_data_info**\ (\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns TextServer database (e.g. ICU break iterators and dictionaries) description. .. rst-class:: classref-item-separator @@ -2246,9 +2282,9 @@ Method Descriptions :ref:`bool` **_has**\ (\ rid\: :ref:`RID`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if ``rid`` is valid resource owned by this text server. .. rst-class:: classref-item-separator @@ -2260,9 +2296,9 @@ Method Descriptions :ref:`bool` **_has_feature**\ (\ feature\: :ref:`Feature`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if the server supports a feature. .. rst-class:: classref-item-separator @@ -2274,9 +2310,9 @@ Method Descriptions :ref:`int` **_is_confusable**\ (\ string\: :ref:`String`, dict\: :ref:`PackedStringArray`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns index of the first string in ``dict`` which is visually confusable with the ``string``, or ``-1`` if none is found. .. rst-class:: classref-item-separator @@ -2288,9 +2324,9 @@ Method Descriptions :ref:`bool` **_is_locale_right_to_left**\ (\ locale\: :ref:`String`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if locale is right-to-left. .. rst-class:: classref-item-separator @@ -2302,9 +2338,9 @@ Method Descriptions :ref:`bool` **_is_valid_identifier**\ (\ string\: :ref:`String`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if ``string`` is a valid identifier. .. rst-class:: classref-item-separator @@ -2316,9 +2352,9 @@ Method Descriptions :ref:`bool` **_load_support_data**\ (\ filename\: :ref:`String`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Loads optional TextServer database (e.g. ICU break iterators and dictionaries). .. rst-class:: classref-item-separator @@ -2330,9 +2366,9 @@ Method Descriptions :ref:`int` **_name_to_tag**\ (\ name\: :ref:`String`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Converts readable feature, variation, script, or language name to OpenType tag. .. rst-class:: classref-item-separator @@ -2342,11 +2378,11 @@ Method Descriptions .. rst-class:: classref-method -:ref:`String` **_parse_number**\ (\ string\: :ref:`String`, language\: :ref:`String`\ ) |virtual| |const| +:ref:`String` **_parse_number**\ (\ number\: :ref:`String`, language\: :ref:`String`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Converts ``number`` from the numeral systems used in ``language`` to Western Arabic (0..9). .. rst-class:: classref-item-separator @@ -2358,9 +2394,9 @@ Method Descriptions :ref:`Array`\[:ref:`Vector3i`\] **_parse_structured_text**\ (\ parser_type\: :ref:`StructuredTextParser`, args\: :ref:`Array`, text\: :ref:`String`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Default implementation of the BiDi algorithm override function. See :ref:`StructuredTextParser` for more info. .. rst-class:: classref-item-separator @@ -2372,9 +2408,9 @@ Method Descriptions :ref:`String` **_percent_sign**\ (\ language\: :ref:`String`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns percent sign used in the ``language``. .. rst-class:: classref-item-separator @@ -2386,9 +2422,9 @@ Method Descriptions :ref:`bool` **_save_support_data**\ (\ filename\: :ref:`String`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file. .. rst-class:: classref-item-separator @@ -2400,9 +2436,9 @@ Method Descriptions :ref:`int` **_shaped_get_span_count**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns number of text spans added using :ref:`_shaped_text_add_string` or :ref:`_shaped_text_add_object`. .. rst-class:: classref-item-separator @@ -2414,9 +2450,9 @@ Method Descriptions :ref:`Variant` **_shaped_get_span_meta**\ (\ shaped\: :ref:`RID`, index\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns text span metadata. .. rst-class:: classref-item-separator @@ -2428,9 +2464,9 @@ Method Descriptions |void| **_shaped_set_span_update_font**\ (\ shaped\: :ref:`RID`, index\: :ref:`int`, fonts\: :ref:`Array`\[:ref:`RID`\], size\: :ref:`int`, opentype_features\: :ref:`Dictionary`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Changes text span font, font size, and OpenType features, without changing the text. .. rst-class:: classref-item-separator @@ -2442,9 +2478,9 @@ Method Descriptions :ref:`bool` **_shaped_text_add_object**\ (\ shaped\: :ref:`RID`, key\: :ref:`Variant`, size\: :ref:`Vector2`, inline_align\: :ref:`InlineAlignment`, length\: :ref:`int`, baseline\: :ref:`float`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Adds inline object to the text buffer, ``key`` must be unique. In the text, object is represented as ``length`` object replacement characters. .. rst-class:: classref-item-separator @@ -2456,9 +2492,9 @@ Method Descriptions :ref:`bool` **_shaped_text_add_string**\ (\ shaped\: :ref:`RID`, text\: :ref:`String`, fonts\: :ref:`Array`\[:ref:`RID`\], size\: :ref:`int`, opentype_features\: :ref:`Dictionary`, language\: :ref:`String`, meta\: :ref:`Variant`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Adds text span and font to draw it to the text buffer. .. rst-class:: classref-item-separator @@ -2470,9 +2506,9 @@ Method Descriptions |void| **_shaped_text_clear**\ (\ shaped\: :ref:`RID`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Clears text buffer (removes text and inline objects). .. rst-class:: classref-item-separator @@ -2484,9 +2520,9 @@ Method Descriptions :ref:`int` **_shaped_text_closest_character_pos**\ (\ shaped\: :ref:`RID`, pos\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns composite character position closest to the ``pos``. .. rst-class:: classref-item-separator @@ -2498,9 +2534,9 @@ Method Descriptions |void| **_shaped_text_draw**\ (\ shaped\: :ref:`RID`, canvas\: :ref:`RID`, pos\: :ref:`Vector2`, clip_l\: :ref:`float`, clip_r\: :ref:`float`, color\: :ref:`Color`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Draw shaped text into a canvas item at a given position, with ``color``. ``pos`` specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout). .. rst-class:: classref-item-separator @@ -2512,9 +2548,9 @@ Method Descriptions |void| **_shaped_text_draw_outline**\ (\ shaped\: :ref:`RID`, canvas\: :ref:`RID`, pos\: :ref:`Vector2`, clip_l\: :ref:`float`, clip_r\: :ref:`float`, outline_size\: :ref:`int`, color\: :ref:`Color`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Draw the outline of the shaped text into a canvas item at a given position, with ``color``. ``pos`` specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout). .. rst-class:: classref-item-separator @@ -2526,9 +2562,9 @@ Method Descriptions :ref:`float` **_shaped_text_fit_to_width**\ (\ shaped\: :ref:`RID`, width\: :ref:`float`, justification_flags\: |bitfield|\[:ref:`JustificationFlag`\]\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Adjusts text width to fit to specified width, returns new text width. .. rst-class:: classref-item-separator @@ -2540,9 +2576,9 @@ Method Descriptions :ref:`float` **_shaped_text_get_ascent**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical). .. rst-class:: classref-item-separator @@ -2554,9 +2590,9 @@ Method Descriptions |void| **_shaped_text_get_carets**\ (\ shaped\: :ref:`RID`, position\: :ref:`int`, caret\: ``CaretInfo*``\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns shapes of the carets corresponding to the character offset ``position`` in the text. Returned caret shape is 1 pixel wide rectangle. .. rst-class:: classref-item-separator @@ -2568,9 +2604,9 @@ Method Descriptions :ref:`PackedInt32Array` **_shaped_text_get_character_breaks**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns array of the composite character boundaries. .. rst-class:: classref-item-separator @@ -2582,9 +2618,9 @@ Method Descriptions :ref:`int` **_shaped_text_get_custom_ellipsis**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ellipsis character used for text clipping. .. rst-class:: classref-item-separator @@ -2596,9 +2632,9 @@ Method Descriptions :ref:`String` **_shaped_text_get_custom_punctuation**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used. .. rst-class:: classref-item-separator @@ -2610,9 +2646,9 @@ Method Descriptions :ref:`float` **_shaped_text_get_descent**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical). .. rst-class:: classref-item-separator @@ -2624,9 +2660,9 @@ Method Descriptions :ref:`Direction` **_shaped_text_get_direction**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns direction of the text. .. rst-class:: classref-item-separator @@ -2638,9 +2674,9 @@ Method Descriptions :ref:`int` **_shaped_text_get_dominant_direction_in_range**\ (\ shaped\: :ref:`RID`, start\: :ref:`int`, end\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns dominant direction of in the range of text. .. rst-class:: classref-item-separator @@ -2652,9 +2688,9 @@ Method Descriptions :ref:`int` **_shaped_text_get_ellipsis_glyph_count**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns number of glyphs in the ellipsis. .. rst-class:: classref-item-separator @@ -2666,9 +2702,9 @@ Method Descriptions ``const Glyph*`` **_shaped_text_get_ellipsis_glyphs**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns array of the glyphs in the ellipsis. .. rst-class:: classref-item-separator @@ -2680,9 +2716,9 @@ Method Descriptions :ref:`int` **_shaped_text_get_ellipsis_pos**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns position of the ellipsis. .. rst-class:: classref-item-separator @@ -2694,9 +2730,9 @@ Method Descriptions :ref:`int` **_shaped_text_get_glyph_count**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns number of glyphs in the buffer. .. rst-class:: classref-item-separator @@ -2708,9 +2744,9 @@ Method Descriptions ``const Glyph*`` **_shaped_text_get_glyphs**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns an array of glyphs in the visual order. .. rst-class:: classref-item-separator @@ -2722,9 +2758,9 @@ Method Descriptions :ref:`Vector2` **_shaped_text_get_grapheme_bounds**\ (\ shaped\: :ref:`RID`, pos\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns composite character's bounds as offsets from the start of the line. .. rst-class:: classref-item-separator @@ -2736,9 +2772,9 @@ Method Descriptions :ref:`Direction` **_shaped_text_get_inferred_direction**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns direction of the text, inferred by the BiDi algorithm. .. rst-class:: classref-item-separator @@ -2750,9 +2786,9 @@ Method Descriptions :ref:`PackedInt32Array` **_shaped_text_get_line_breaks**\ (\ shaped\: :ref:`RID`, width\: :ref:`float`, start\: :ref:`int`, break_flags\: |bitfield|\[:ref:`LineBreakFlag`\]\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Breaks text to the lines and returns character ranges for each line. .. rst-class:: classref-item-separator @@ -2764,9 +2800,37 @@ Method Descriptions :ref:`PackedInt32Array` **_shaped_text_get_line_breaks_adv**\ (\ shaped\: :ref:`RID`, width\: :ref:`PackedFloat32Array`, start\: :ref:`int`, once\: :ref:`bool`, break_flags\: |bitfield|\[:ref:`LineBreakFlag`\]\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ + +Breaks text to the lines and columns. Returns character ranges for each segment. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__shaped_text_get_object_glyph: + +.. rst-class:: classref-method + +:ref:`int` **_shaped_text_get_object_glyph**\ (\ shaped\: :ref:`RID`, key\: :ref:`Variant`\ ) |virtual| |const| + +**Required.**\ + +Returns the glyph index of the inline object. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__shaped_text_get_object_range: - There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-method + +:ref:`Vector2i` **_shaped_text_get_object_range**\ (\ shaped\: :ref:`RID`, key\: :ref:`Variant`\ ) |virtual| |const| + +**Required.**\ + +Returns the character range of the inline object. .. rst-class:: classref-item-separator @@ -2778,9 +2842,9 @@ Method Descriptions :ref:`Rect2` **_shaped_text_get_object_rect**\ (\ shaped\: :ref:`RID`, key\: :ref:`Variant`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns bounding rectangle of the inline object. .. rst-class:: classref-item-separator @@ -2792,9 +2856,9 @@ Method Descriptions :ref:`Array` **_shaped_text_get_objects**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns array of inline objects. .. rst-class:: classref-item-separator @@ -2806,9 +2870,9 @@ Method Descriptions :ref:`Orientation` **_shaped_text_get_orientation**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns text orientation. .. rst-class:: classref-item-separator @@ -2820,9 +2884,9 @@ Method Descriptions :ref:`RID` **_shaped_text_get_parent**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the parent buffer from which the substring originates. .. rst-class:: classref-item-separator @@ -2834,9 +2898,9 @@ Method Descriptions :ref:`bool` **_shaped_text_get_preserve_control**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if text buffer is configured to display control characters. .. rst-class:: classref-item-separator @@ -2848,9 +2912,9 @@ Method Descriptions :ref:`bool` **_shaped_text_get_preserve_invalid**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if text buffer is configured to display hexadecimal codes in place of invalid characters. .. rst-class:: classref-item-separator @@ -2862,9 +2926,9 @@ Method Descriptions :ref:`Vector2i` **_shaped_text_get_range**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns substring buffer character range in the parent buffer. .. rst-class:: classref-item-separator @@ -2876,9 +2940,9 @@ Method Descriptions :ref:`PackedVector2Array` **_shaped_text_get_selection**\ (\ shaped\: :ref:`RID`, start\: :ref:`int`, end\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns selection rectangles for the specified character range. .. rst-class:: classref-item-separator @@ -2890,9 +2954,9 @@ Method Descriptions :ref:`Vector2` **_shaped_text_get_size**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns size of the text. .. rst-class:: classref-item-separator @@ -2904,9 +2968,9 @@ Method Descriptions :ref:`int` **_shaped_text_get_spacing**\ (\ shaped\: :ref:`RID`, spacing\: :ref:`SpacingType`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns extra spacing added between glyphs or lines in pixels. .. rst-class:: classref-item-separator @@ -2918,9 +2982,9 @@ Method Descriptions :ref:`int` **_shaped_text_get_trim_pos**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the position of the overrun trim. .. rst-class:: classref-item-separator @@ -2932,9 +2996,9 @@ Method Descriptions :ref:`float` **_shaped_text_get_underline_position**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns pixel offset of the underline below the baseline. .. rst-class:: classref-item-separator @@ -2946,9 +3010,9 @@ Method Descriptions :ref:`float` **_shaped_text_get_underline_thickness**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns thickness of the underline. .. rst-class:: classref-item-separator @@ -2960,9 +3024,9 @@ Method Descriptions :ref:`float` **_shaped_text_get_width**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns width (for horizontal layout) or height (for vertical) of the text. .. rst-class:: classref-item-separator @@ -2974,9 +3038,9 @@ Method Descriptions :ref:`PackedInt32Array` **_shaped_text_get_word_breaks**\ (\ shaped\: :ref:`RID`, grapheme_flags\: |bitfield|\[:ref:`GraphemeFlag`\]\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Breaks text into words and returns array of character ranges. Use ``grapheme_flags`` to set what characters are used for breaking (see :ref:`GraphemeFlag`). .. rst-class:: classref-item-separator @@ -2988,9 +3052,9 @@ Method Descriptions :ref:`int` **_shaped_text_hit_test_grapheme**\ (\ shaped\: :ref:`RID`, coord\: :ref:`float`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns grapheme index at the specified pixel offset at the baseline, or ``-1`` if none is found. .. rst-class:: classref-item-separator @@ -3002,9 +3066,9 @@ Method Descriptions :ref:`int` **_shaped_text_hit_test_position**\ (\ shaped\: :ref:`RID`, coord\: :ref:`float`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position. .. rst-class:: classref-item-separator @@ -3016,9 +3080,9 @@ Method Descriptions :ref:`bool` **_shaped_text_is_ready**\ (\ shaped\: :ref:`RID`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if buffer is successfully shaped. .. rst-class:: classref-item-separator @@ -3030,9 +3094,9 @@ Method Descriptions :ref:`int` **_shaped_text_next_character_pos**\ (\ shaped\: :ref:`RID`, pos\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns composite character end position closest to the ``pos``. .. rst-class:: classref-item-separator @@ -3044,9 +3108,9 @@ Method Descriptions :ref:`int` **_shaped_text_next_grapheme_pos**\ (\ shaped\: :ref:`RID`, pos\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns grapheme end position closest to the ``pos``. .. rst-class:: classref-item-separator @@ -3058,9 +3122,9 @@ Method Descriptions |void| **_shaped_text_overrun_trim_to_width**\ (\ shaped\: :ref:`RID`, width\: :ref:`float`, trim_flags\: |bitfield|\[:ref:`TextOverrunFlag`\]\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Trims text if it exceeds the given width. .. rst-class:: classref-item-separator @@ -3072,9 +3136,9 @@ Method Descriptions :ref:`int` **_shaped_text_prev_character_pos**\ (\ shaped\: :ref:`RID`, pos\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns composite character start position closest to the ``pos``. .. rst-class:: classref-item-separator @@ -3086,9 +3150,9 @@ Method Descriptions :ref:`int` **_shaped_text_prev_grapheme_pos**\ (\ shaped\: :ref:`RID`, pos\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns grapheme start position closest to the ``pos``. .. rst-class:: classref-item-separator @@ -3100,9 +3164,9 @@ Method Descriptions :ref:`bool` **_shaped_text_resize_object**\ (\ shaped\: :ref:`RID`, key\: :ref:`Variant`, size\: :ref:`Vector2`, inline_align\: :ref:`InlineAlignment`, baseline\: :ref:`float`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets new size and alignment of embedded object. .. rst-class:: classref-item-separator @@ -3114,9 +3178,9 @@ Method Descriptions |void| **_shaped_text_set_bidi_override**\ (\ shaped\: :ref:`RID`, override\: :ref:`Array`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overrides BiDi for the structured text. .. rst-class:: classref-item-separator @@ -3128,9 +3192,9 @@ Method Descriptions |void| **_shaped_text_set_custom_ellipsis**\ (\ shaped\: :ref:`RID`, char\: :ref:`int`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets ellipsis character used for text clipping. .. rst-class:: classref-item-separator @@ -3142,9 +3206,9 @@ Method Descriptions |void| **_shaped_text_set_custom_punctuation**\ (\ shaped\: :ref:`RID`, punct\: :ref:`String`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used. .. rst-class:: classref-item-separator @@ -3156,9 +3220,9 @@ Method Descriptions |void| **_shaped_text_set_direction**\ (\ shaped\: :ref:`RID`, direction\: :ref:`Direction`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets desired text direction. If set to :ref:`TextServer.DIRECTION_AUTO`, direction will be detected based on the buffer contents and current locale. .. rst-class:: classref-item-separator @@ -3170,9 +3234,9 @@ Method Descriptions |void| **_shaped_text_set_orientation**\ (\ shaped\: :ref:`RID`, orientation\: :ref:`Orientation`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets desired text orientation. .. rst-class:: classref-item-separator @@ -3184,9 +3248,9 @@ Method Descriptions |void| **_shaped_text_set_preserve_control**\ (\ shaped\: :ref:`RID`, enabled\: :ref:`bool`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +If set to ``true`` text buffer will display control characters. .. rst-class:: classref-item-separator @@ -3198,9 +3262,9 @@ Method Descriptions |void| **_shaped_text_set_preserve_invalid**\ (\ shaped\: :ref:`RID`, enabled\: :ref:`bool`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +If set to ``true`` text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed. .. rst-class:: classref-item-separator @@ -3212,9 +3276,9 @@ Method Descriptions |void| **_shaped_text_set_spacing**\ (\ shaped\: :ref:`RID`, spacing\: :ref:`SpacingType`, value\: :ref:`int`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets extra spacing added between glyphs or lines in pixels. .. rst-class:: classref-item-separator @@ -3226,9 +3290,9 @@ Method Descriptions :ref:`bool` **_shaped_text_shape**\ (\ shaped\: :ref:`RID`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Shapes buffer if it's not shaped. Returns ``true`` if the string is shaped successfully. .. rst-class:: classref-item-separator @@ -3240,9 +3304,9 @@ Method Descriptions ``const Glyph*`` **_shaped_text_sort_logical**\ (\ shaped\: :ref:`RID`\ ) |virtual| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns text glyphs in the logical order. .. rst-class:: classref-item-separator @@ -3254,9 +3318,9 @@ Method Descriptions :ref:`RID` **_shaped_text_substr**\ (\ shaped\: :ref:`RID`, start\: :ref:`int`, length\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns text buffer for the substring of the text in the ``shaped`` text buffer (including inline objects). .. rst-class:: classref-item-separator @@ -3268,9 +3332,9 @@ Method Descriptions :ref:`float` **_shaped_text_tab_align**\ (\ shaped\: :ref:`RID`, tab_stops\: :ref:`PackedFloat32Array`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Aligns shaped text to the given tab-stops. .. rst-class:: classref-item-separator @@ -3282,9 +3346,9 @@ Method Descriptions :ref:`bool` **_shaped_text_update_breaks**\ (\ shaped\: :ref:`RID`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Updates break points in the shaped text. This method is called by default implementation of text breaking functions. .. rst-class:: classref-item-separator @@ -3296,9 +3360,9 @@ Method Descriptions :ref:`bool` **_shaped_text_update_justification_ops**\ (\ shaped\: :ref:`RID`\ ) |virtual| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Updates justification points in the shaped text. This method is called by default implementation of text justification functions. .. rst-class:: classref-item-separator @@ -3310,9 +3374,9 @@ Method Descriptions :ref:`bool` **_spoof_check**\ (\ string\: :ref:`String`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if ``string`` is likely to be an attempt at confusing the reader. .. rst-class:: classref-item-separator @@ -3324,9 +3388,9 @@ Method Descriptions :ref:`PackedInt32Array` **_string_get_character_breaks**\ (\ string\: :ref:`String`, language\: :ref:`String`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns array of the composite character boundaries. .. rst-class:: classref-item-separator @@ -3338,9 +3402,9 @@ Method Descriptions :ref:`PackedInt32Array` **_string_get_word_breaks**\ (\ string\: :ref:`String`, language\: :ref:`String`, chars_per_line\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns an array of the word break boundaries. Elements in the returned array are the offsets of the start and end of words. Therefore the length of the array is always even. .. rst-class:: classref-item-separator @@ -3352,9 +3416,23 @@ Method Descriptions :ref:`String` **_string_to_lower**\ (\ string\: :ref:`String`, language\: :ref:`String`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ + +Returns the string converted to lowercase. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__string_to_title: + +.. rst-class:: classref-method + +:ref:`String` **_string_to_title**\ (\ string\: :ref:`String`, language\: :ref:`String`\ ) |virtual| |const| + +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the string converted to title case. .. rst-class:: classref-item-separator @@ -3366,9 +3444,9 @@ Method Descriptions :ref:`String` **_string_to_upper**\ (\ string\: :ref:`String`, language\: :ref:`String`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the string converted to uppercase. .. rst-class:: classref-item-separator @@ -3380,9 +3458,9 @@ Method Descriptions :ref:`String` **_strip_diacritics**\ (\ string\: :ref:`String`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Strips diacritics from the string. .. rst-class:: classref-item-separator @@ -3394,9 +3472,9 @@ Method Descriptions :ref:`String` **_tag_to_name**\ (\ tag\: :ref:`int`\ ) |virtual| |const| -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +Converts OpenType tag to readable feature, variation, script, or language name. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_texturebutton.rst b/classes/class_texturebutton.rst index f6e54b07a742..57cc5d956d8f 100644 --- a/classes/class_texturebutton.rst +++ b/classes/class_texturebutton.rst @@ -30,7 +30,7 @@ See also :ref:`BaseButton` which contains common properties an Tutorials --------- -- `3D Voxel Demo `__ +- `3D Voxel Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_texturerect.rst b/classes/class_texturerect.rst index 7757575eab02..ab9d5711c5fd 100644 --- a/classes/class_texturerect.rst +++ b/classes/class_texturerect.rst @@ -26,7 +26,7 @@ A control that displays a texture, for example an icon inside a GUI. The texture Tutorials --------- -- `3D Voxel Demo `__ +- `3D Voxel Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_thread.rst b/classes/class_thread.rst index 1fb8bcef9704..4a99c43a32fa 100644 --- a/classes/class_thread.rst +++ b/classes/class_thread.rst @@ -40,7 +40,7 @@ Tutorials - :doc:`Thread-safe APIs <../tutorials/performance/thread_safe_apis>` -- `3D Voxel Demo `__ +- `3D Voxel Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_tiledata.rst b/classes/class_tiledata.rst index be595fb6adfb..f476383f76b2 100644 --- a/classes/class_tiledata.rst +++ b/classes/class_tiledata.rst @@ -86,6 +86,8 @@ Methods +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_collision_polygon_one_way`\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`\ ) |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_valid_terrain_peering_bit`\ (\ peering_bit\: :ref:`CellNeighbor`\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`remove_collision_polygon`\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`\ ) | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_collision_polygon_one_way`\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`, one_way\: :ref:`bool`\ ) | @@ -459,7 +461,7 @@ Returns the occluder polygon of the tile for the TileSet occlusion layer with in :ref:`int` **get_terrain_peering_bit**\ (\ peering_bit\: :ref:`CellNeighbor`\ ) |const| -Returns the tile's terrain bit for the given ``peering_bit`` direction. +Returns the tile's terrain bit for the given ``peering_bit`` direction. To check that a direction is valid, use :ref:`is_valid_terrain_peering_bit`. .. rst-class:: classref-item-separator @@ -477,6 +479,18 @@ Returns whether one-way collisions are enabled for the polygon at index ``polygo ---- +.. _class_TileData_method_is_valid_terrain_peering_bit: + +.. rst-class:: classref-method + +:ref:`bool` **is_valid_terrain_peering_bit**\ (\ peering_bit\: :ref:`CellNeighbor`\ ) |const| + +Returns whether the given ``peering_bit`` direction is valid for this tile. + +.. rst-class:: classref-item-separator + +---- + .. _class_TileData_method_remove_collision_polygon: .. rst-class:: classref-method @@ -615,7 +629,7 @@ Sets the occluder for the TileSet occlusion layer with index ``layer_id``. |void| **set_terrain_peering_bit**\ (\ peering_bit\: :ref:`CellNeighbor`, terrain\: :ref:`int`\ ) -Sets the tile's terrain bit for the given ``peering_bit`` direction. +Sets the tile's terrain bit for the given ``peering_bit`` direction. To check that a direction is valid, use :ref:`is_valid_terrain_peering_bit`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_tilemap.rst b/classes/class_tilemap.rst index f417a78b3bdd..759f3bccdd78 100644 --- a/classes/class_tilemap.rst +++ b/classes/class_tilemap.rst @@ -13,7 +13,9 @@ TileMap ======= -**Inherits:** :ref:`TileMapLayerGroup` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**Deprecated:** Use multiple :ref:`TileMapLayer` nodes instead. + +**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` Node for 2D tile-based maps. @@ -35,17 +37,17 @@ Tutorials - :doc:`Using Tilemaps <../tutorials/2d/using_tilemaps>` -- `2D Platformer Demo `__ +- `2D Platformer Demo `__ -- `2D Isometric Demo `__ +- `2D Isometric Demo `__ -- `2D Hexagonal Demo `__ +- `2D Hexagonal Demo `__ -- `2D Navigation Astar Demo `__ +- `2D Grid-based Navigation with AStarGrid2D Demo `__ -- `2D Role Playing Game Demo `__ +- `2D Role Playing Game (RPG) Demo `__ -- `2D Kinematic Character Demo `__ +- `2D Kinematic Character Demo `__ .. rst-class:: classref-reftable-group @@ -64,6 +66,8 @@ Properties +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`rendering_quadrant_size` | ``16`` | +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ + | :ref:`TileSet` | :ref:`tile_set` | | + +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -310,6 +314,23 @@ The quadrant size does not apply on Y-sorted layers, as tiles are be grouped by \ **Note:** As quadrants are created according to the map's coordinate system, the quadrant's "square shape" might not look like square in the TileMap's local coordinate system. +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMap_property_tile_set: + +.. rst-class:: classref-property + +:ref:`TileSet` **tile_set** + +.. rst-class:: classref-property-setget + +- |void| **set_tileset**\ (\ value\: :ref:`TileSet`\ ) +- :ref:`TileSet` **get_tileset**\ (\ ) + +The :ref:`TileSet` used by this **TileMap**. The textures, collisions, and additional behavior of all available tiles are stored here. + .. rst-class:: classref-section-separator ---- @@ -437,7 +458,9 @@ Forces the TileMap and the layer ``layer`` to update. :ref:`int` **get_cell_alternative_tile**\ (\ layer\: :ref:`int`, coords\: :ref:`Vector2i`, use_proxies\: :ref:`bool` = false\ ) |const| -Returns the tile alternative ID of the cell on layer ``layer`` at ``coords``. If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s tile proxies, returning the raw alternative identifier. See :ref:`TileSet.map_tile_proxy`. +Returns the tile alternative ID of the cell on layer ``layer`` at ``coords``. + +If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s tile proxies, returning the raw alternative identifier. See :ref:`TileSet.map_tile_proxy`. If ``layer`` is negative, the layers are accessed from the last one. @@ -453,7 +476,7 @@ If ``layer`` is negative, the layers are accessed from the last one. Returns the tile atlas coordinates ID of the cell on layer ``layer`` at coordinates ``coords``. Returns ``Vector2i(-1, -1)`` if the cell does not exist. -If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s tile proxies, returning the raw alternative identifier. See :ref:`TileSet.map_tile_proxy`. +If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s tile proxies, returning the raw atlas coordinate identifier. See :ref:`TileSet.map_tile_proxy`. If ``layer`` is negative, the layers are accessed from the last one. @@ -469,7 +492,7 @@ If ``layer`` is negative, the layers are accessed from the last one. Returns the tile source ID of the cell on layer ``layer`` at coordinates ``coords``. Returns ``-1`` if the cell does not exist. -If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s tile proxies, returning the raw alternative identifier. See :ref:`TileSet.map_tile_proxy`. +If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s tile proxies, returning the raw source identifier. See :ref:`TileSet.map_tile_proxy`. If ``layer`` is negative, the layers are accessed from the last one. @@ -487,8 +510,6 @@ Returns the :ref:`TileData` object associated with the given cel If ``layer`` is negative, the layers are accessed from the last one. -If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s tile proxies, returning the raw alternative identifier. See :ref:`TileSet.map_tile_proxy`. - :: func get_clicked_tile_power(): @@ -499,6 +520,8 @@ If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s til else: return 0 +If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s tile proxies. See :ref:`TileSet.map_tile_proxy`. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_tilemaplayer.rst b/classes/class_tilemaplayer.rst new file mode 100644 index 000000000000..50fb0bb187e7 --- /dev/null +++ b/classes/class_tilemaplayer.rst @@ -0,0 +1,763 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/TileMapLayer.xml. + +.. _class_TileMapLayer: + +TileMapLayer +============ + +**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` + +Node for 2D tile-based maps. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Node for 2D tile-based maps. A **TileMapLayer** uses a :ref:`TileSet` which contain a list of tiles which are used to create grid-based maps. Unlike the :ref:`TileMap` node, which is deprecated, **TileMapLayer** has only one layer of tiles. You can use several **TileMapLayer** to achieve the same result as a :ref:`TileMap` node. + +For performance reasons, all TileMap updates are batched at the end of a frame. Notably, this means that scene tiles from a :ref:`TileSetScenesCollectionSource` may be initialized after their parent. This is only queued when inside the scene tree. + +To force an update earlier on, call :ref:`update_internals`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`bool` | :ref:`collision_enabled` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`DebugVisibilityMode` | :ref:`collision_visibility_mode` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`bool` | :ref:`enabled` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`bool` | :ref:`navigation_enabled` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`DebugVisibilityMode` | :ref:`navigation_visibility_mode` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`rendering_quadrant_size` | ``16`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`PackedByteArray` | :ref:`tile_map_data` | ``PackedByteArray("AAA=")`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`TileSet` | :ref:`tile_set` | | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`bool` | :ref:`use_kinematic_bodies` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`y_sort_origin` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_tile_data_runtime_update`\ (\ coords\: :ref:`Vector2i`, tile_data\: :ref:`TileData`\ ) |virtual| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_use_tile_data_runtime_update`\ (\ coords\: :ref:`Vector2i`\ ) |virtual| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear`\ (\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`erase_cell`\ (\ coords\: :ref:`Vector2i`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fix_invalid_tiles`\ (\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_cell_alternative_tile`\ (\ coords\: :ref:`Vector2i`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_cell_atlas_coords`\ (\ coords\: :ref:`Vector2i`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_cell_source_id`\ (\ coords\: :ref:`Vector2i`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TileData` | :ref:`get_cell_tile_data`\ (\ coords\: :ref:`Vector2i`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_coords_for_body_rid`\ (\ body\: :ref:`RID`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_navigation_map`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_neighbor_cell`\ (\ coords\: :ref:`Vector2i`, neighbor\: :ref:`CellNeighbor`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TileMapPattern` | :ref:`get_pattern`\ (\ coords_array\: :ref:`Array`\[:ref:`Vector2i`\]\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Vector2i`\] | :ref:`get_surrounding_cells`\ (\ coords\: :ref:`Vector2i`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Vector2i`\] | :ref:`get_used_cells`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Vector2i`\] | :ref:`get_used_cells_by_id`\ (\ source_id\: :ref:`int` = -1, atlas_coords\: :ref:`Vector2i` = Vector2i(-1, -1), alternative_tile\: :ref:`int` = -1\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`get_used_rect`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_body_rid`\ (\ body\: :ref:`RID`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`local_to_map`\ (\ local_position\: :ref:`Vector2`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`map_pattern`\ (\ position_in_tilemap\: :ref:`Vector2i`, coords_in_pattern\: :ref:`Vector2i`, pattern\: :ref:`TileMapPattern`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`map_to_local`\ (\ map_position\: :ref:`Vector2i`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`notify_runtime_tile_data_update`\ (\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cell`\ (\ coords\: :ref:`Vector2i`, source_id\: :ref:`int` = -1, atlas_coords\: :ref:`Vector2i` = Vector2i(-1, -1), alternative_tile\: :ref:`int` = 0\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cells_terrain_connect`\ (\ cells\: :ref:`Array`\[:ref:`Vector2i`\], terrain_set\: :ref:`int`, terrain\: :ref:`int`, ignore_empty_terrains\: :ref:`bool` = true\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cells_terrain_path`\ (\ path\: :ref:`Array`\[:ref:`Vector2i`\], terrain_set\: :ref:`int`, terrain\: :ref:`int`, ignore_empty_terrains\: :ref:`bool` = true\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_navigation_map`\ (\ map\: :ref:`RID`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_pattern`\ (\ position\: :ref:`Vector2i`, pattern\: :ref:`TileMapPattern`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_internals`\ (\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_TileMapLayer_signal_changed: + +.. rst-class:: classref-signal + +**changed**\ (\ ) + +Emitted when this **TileMapLayer**'s properties changes. This includes modified cells, properties, or changes made to its assigned :ref:`TileSet`. + +\ **Note:** This signal may be emitted very often when batch-modifying a **TileMapLayer**. Avoid executing complex processing in a connected function, and consider delaying it to the end of the frame instead (i.e. calling :ref:`Object.call_deferred`). + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_TileMapLayer_DebugVisibilityMode: + +.. rst-class:: classref-enumeration + +enum **DebugVisibilityMode**: + +.. _class_TileMapLayer_constant_DEBUG_VISIBILITY_MODE_DEFAULT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugVisibilityMode` **DEBUG_VISIBILITY_MODE_DEFAULT** = ``0`` + +Hide the collisions or navigation debug shapes in the editor, and use the debug settings to determine their visibility in game (i.e. :ref:`SceneTree.debug_collisions_hint` or :ref:`SceneTree.debug_navigation_hint`). + +.. _class_TileMapLayer_constant_DEBUG_VISIBILITY_MODE_FORCE_HIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugVisibilityMode` **DEBUG_VISIBILITY_MODE_FORCE_HIDE** = ``2`` + +Always hide the collisions or navigation debug shapes. + +.. _class_TileMapLayer_constant_DEBUG_VISIBILITY_MODE_FORCE_SHOW: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugVisibilityMode` **DEBUG_VISIBILITY_MODE_FORCE_SHOW** = ``1`` + +Always show the collisions or navigation debug shapes. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_TileMapLayer_property_collision_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **collision_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- |void| **set_collision_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_collision_enabled**\ (\ ) + +Enable or disable collisions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_property_collision_visibility_mode: + +.. rst-class:: classref-property + +:ref:`DebugVisibilityMode` **collision_visibility_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- |void| **set_collision_visibility_mode**\ (\ value\: :ref:`DebugVisibilityMode`\ ) +- :ref:`DebugVisibilityMode` **get_collision_visibility_mode**\ (\ ) + +Show or hide the **TileMapLayer**'s collision shapes. If set to :ref:`DEBUG_VISIBILITY_MODE_DEFAULT`, this depends on the show collision debug settings. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_property_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- |void| **set_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_enabled**\ (\ ) + +If ``false``, disables this **TileMapLayer** completely (rendering, collision, navigation, scene tiles, etc.) + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_property_navigation_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **navigation_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- |void| **set_navigation_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_navigation_enabled**\ (\ ) + +If ``true``, navigation regions are enabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_property_navigation_visibility_mode: + +.. rst-class:: classref-property + +:ref:`DebugVisibilityMode` **navigation_visibility_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- |void| **set_navigation_visibility_mode**\ (\ value\: :ref:`DebugVisibilityMode`\ ) +- :ref:`DebugVisibilityMode` **get_navigation_visibility_mode**\ (\ ) + +Show or hide the **TileMapLayer**'s navigation meshes. If set to :ref:`DEBUG_VISIBILITY_MODE_DEFAULT`, this depends on the show navigation debug settings. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_property_rendering_quadrant_size: + +.. rst-class:: classref-property + +:ref:`int` **rendering_quadrant_size** = ``16`` + +.. rst-class:: classref-property-setget + +- |void| **set_rendering_quadrant_size**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_rendering_quadrant_size**\ (\ ) + +The **TileMapLayer**'s quadrant size. A quadrant is a group of tiles to be drawn together on a single canvas item, for optimization purposes. :ref:`rendering_quadrant_size` defines the length of a square's side, in the map's coordinate system, that forms the quadrant. Thus, the default quandrant size groups together ``16 * 16 = 256`` tiles. + +The quadrant size does not apply on a Y-sorted **TileMapLayer**, as tiles are be grouped by Y position instead in that case. + +\ **Note:** As quadrants are created according to the map's coordinate system, the quadrant's "square shape" might not look like square in the **TileMapLayer**'s local coordinate system. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_property_tile_map_data: + +.. rst-class:: classref-property + +:ref:`PackedByteArray` **tile_map_data** = ``PackedByteArray("AAA=")`` + +.. rst-class:: classref-property-setget + +- |void| **set_tile_map_data_from_array**\ (\ value\: :ref:`PackedByteArray`\ ) +- :ref:`PackedByteArray` **get_tile_map_data_as_array**\ (\ ) + +The raw tile map data as a byte array. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray` for more details. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_property_tile_set: + +.. rst-class:: classref-property + +:ref:`TileSet` **tile_set** + +.. rst-class:: classref-property-setget + +- |void| **set_tile_set**\ (\ value\: :ref:`TileSet`\ ) +- :ref:`TileSet` **get_tile_set**\ (\ ) + +The :ref:`TileSet` used by this layer. The textures, collisions, and additional behavior of all available tiles are stored here. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_property_use_kinematic_bodies: + +.. rst-class:: classref-property + +:ref:`bool` **use_kinematic_bodies** = ``false`` + +.. rst-class:: classref-property-setget + +- |void| **set_use_kinematic_bodies**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_using_kinematic_bodies**\ (\ ) + +If ``true``, this **TileMapLayer** collision shapes will be instantiated as kinematic bodies. This can be needed for moving **TileMapLayer** nodes (i.e. moving platforms). + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_property_y_sort_origin: + +.. rst-class:: classref-property + +:ref:`int` **y_sort_origin** = ``0`` + +.. rst-class:: classref-property-setget + +- |void| **set_y_sort_origin**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_y_sort_origin**\ (\ ) + +This Y-sort origin value is added to each tile's Y-sort origin value. This allows, for example, to fake a different height level. This can be useful for top-down view games. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_TileMapLayer_private_method__tile_data_runtime_update: + +.. rst-class:: classref-method + +|void| **_tile_data_runtime_update**\ (\ coords\: :ref:`Vector2i`, tile_data\: :ref:`TileData`\ ) |virtual| + +Called with a :ref:`TileData` object about to be used internally by the **TileMapLayer**, allowing its modification at runtime. + +This method is only called if :ref:`_use_tile_data_runtime_update` is implemented and returns ``true`` for the given tile ``coords``. + +\ **Warning:** The ``tile_data`` object's sub-resources are the same as the one in the TileSet. Modifying them might impact the whole TileSet. Instead, make sure to duplicate those resources. + +\ **Note:** If the properties of ``tile_data`` object should change over time, use :ref:`notify_runtime_tile_data_update` to notify the **TileMapLayer** it needs an update. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_private_method__use_tile_data_runtime_update: + +.. rst-class:: classref-method + +:ref:`bool` **_use_tile_data_runtime_update**\ (\ coords\: :ref:`Vector2i`\ ) |virtual| + +Should return ``true`` if the tile at coordinates ``coords`` requires a runtime update. + +\ **Warning:** Make sure this function only returns ``true`` when needed. Any tile processed at runtime without a need for it will imply a significant performance penalty. + +\ **Note:** If the result of this function should change, use :ref:`notify_runtime_tile_data_update` to notify the **TileMapLayer** it needs an update. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_clear: + +.. rst-class:: classref-method + +|void| **clear**\ (\ ) + +Clears all cells. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_erase_cell: + +.. rst-class:: classref-method + +|void| **erase_cell**\ (\ coords\: :ref:`Vector2i`\ ) + +Erases the cell at coordinates ``coords``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_fix_invalid_tiles: + +.. rst-class:: classref-method + +|void| **fix_invalid_tiles**\ (\ ) + +Clears cells containing tiles that do not exist in the :ref:`tile_set`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_cell_alternative_tile: + +.. rst-class:: classref-method + +:ref:`int` **get_cell_alternative_tile**\ (\ coords\: :ref:`Vector2i`\ ) |const| + +Returns the tile alternative ID of the cell at coordinates ``coords``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_cell_atlas_coords: + +.. rst-class:: classref-method + +:ref:`Vector2i` **get_cell_atlas_coords**\ (\ coords\: :ref:`Vector2i`\ ) |const| + +Returns the tile atlas coordinates ID of the cell at coordinates ``coords``. Returns ``Vector2i(-1, -1)`` if the cell does not exist. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_cell_source_id: + +.. rst-class:: classref-method + +:ref:`int` **get_cell_source_id**\ (\ coords\: :ref:`Vector2i`\ ) |const| + +Returns the tile source ID of the cell at coordinates ``coords``. Returns ``-1`` if the cell does not exist. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_cell_tile_data: + +.. rst-class:: classref-method + +:ref:`TileData` **get_cell_tile_data**\ (\ coords\: :ref:`Vector2i`\ ) |const| + +Returns the :ref:`TileData` object associated with the given cell, or ``null`` if the cell does not exist or is not a :ref:`TileSetAtlasSource`. + +:: + + func get_clicked_tile_power(): + var clicked_cell = tile_map_layer.local_to_map(tile_map_layer.get_local_mouse_position()) + var data = tile_map_layer.get_cell_tile_data(clicked_cell) + if data: + return data.get_custom_data("power") + else: + return 0 + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_coords_for_body_rid: + +.. rst-class:: classref-method + +:ref:`Vector2i` **get_coords_for_body_rid**\ (\ body\: :ref:`RID`\ ) |const| + +Returns the coordinates of the tile for given physics body :ref:`RID`. Such an :ref:`RID` can be retrieved from :ref:`KinematicCollision2D.get_collider_rid`, when colliding with a tile. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_navigation_map: + +.. rst-class:: classref-method + +:ref:`RID` **get_navigation_map**\ (\ ) |const| + +Returns the :ref:`RID` of the :ref:`NavigationServer2D` navigation used by this **TileMapLayer**. + +By default this returns the default :ref:`World2D` navigation map, unless a custom map was provided using :ref:`set_navigation_map`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_neighbor_cell: + +.. rst-class:: classref-method + +:ref:`Vector2i` **get_neighbor_cell**\ (\ coords\: :ref:`Vector2i`, neighbor\: :ref:`CellNeighbor`\ ) |const| + +Returns the neighboring cell to the one at coordinates ``coords``, identified by the ``neighbor`` direction. This method takes into account the different layouts a TileMap can take. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_pattern: + +.. rst-class:: classref-method + +:ref:`TileMapPattern` **get_pattern**\ (\ coords_array\: :ref:`Array`\[:ref:`Vector2i`\]\ ) + +Creates and returns a new :ref:`TileMapPattern` from the given array of cells. See also :ref:`set_pattern`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_surrounding_cells: + +.. rst-class:: classref-method + +:ref:`Array`\[:ref:`Vector2i`\] **get_surrounding_cells**\ (\ coords\: :ref:`Vector2i`\ ) + +Returns the list of all neighboring cells to the one at ``coords``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_used_cells: + +.. rst-class:: classref-method + +:ref:`Array`\[:ref:`Vector2i`\] **get_used_cells**\ (\ ) |const| + +Returns a :ref:`Vector2i` array with the positions of all cells containing a tile. A cell is considered empty if its source identifier equals ``-1``, its atlas coordinate identifier is ``Vector2(-1, -1)`` and its alternative identifier is ``-1``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_used_cells_by_id: + +.. rst-class:: classref-method + +:ref:`Array`\[:ref:`Vector2i`\] **get_used_cells_by_id**\ (\ source_id\: :ref:`int` = -1, atlas_coords\: :ref:`Vector2i` = Vector2i(-1, -1), alternative_tile\: :ref:`int` = -1\ ) |const| + +Returns a :ref:`Vector2i` array with the positions of all cells containing a tile. Tiles may be filtered according to their source (``source_id``), their atlas coordinates (``atlas_coords``), or alternative id (``alternative_tile``). + +If a parameter has its value set to the default one, this parameter is not used to filter a cell. Thus, if all parameters have their respective default values, this method returns the same result as :ref:`get_used_cells`. + +A cell is considered empty if its source identifier equals ``-1``, its atlas coordinate identifier is ``Vector2(-1, -1)`` and its alternative identifier is ``-1``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_used_rect: + +.. rst-class:: classref-method + +:ref:`Rect2i` **get_used_rect**\ (\ ) |const| + +Returns a rectangle enclosing the used (non-empty) tiles of the map. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_has_body_rid: + +.. rst-class:: classref-method + +:ref:`bool` **has_body_rid**\ (\ body\: :ref:`RID`\ ) |const| + +Returns whether the provided ``body`` :ref:`RID` belongs to one of this **TileMapLayer**'s cells. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_local_to_map: + +.. rst-class:: classref-method + +:ref:`Vector2i` **local_to_map**\ (\ local_position\: :ref:`Vector2`\ ) |const| + +Returns the map coordinates of the cell containing the given ``local_position``. If ``local_position`` is in global coordinates, consider using :ref:`Node2D.to_local` before passing it to this method. See also :ref:`map_to_local`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_map_pattern: + +.. rst-class:: classref-method + +:ref:`Vector2i` **map_pattern**\ (\ position_in_tilemap\: :ref:`Vector2i`, coords_in_pattern\: :ref:`Vector2i`, pattern\: :ref:`TileMapPattern`\ ) + +Returns for the given coordinates ``coords_in_pattern`` in a :ref:`TileMapPattern` the corresponding cell coordinates if the pattern was pasted at the ``position_in_tilemap`` coordinates (see :ref:`set_pattern`). This mapping is required as in half-offset tile shapes, the mapping might not work by calculating ``position_in_tile_map + coords_in_pattern``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_map_to_local: + +.. rst-class:: classref-method + +:ref:`Vector2` **map_to_local**\ (\ map_position\: :ref:`Vector2i`\ ) |const| + +Returns the centered position of a cell in the **TileMapLayer**'s local coordinate space. To convert the returned value into global coordinates, use :ref:`Node2D.to_global`. See also :ref:`local_to_map`. + +\ **Note:** This may not correspond to the visual position of the tile, i.e. it ignores the :ref:`TileData.texture_origin` property of individual tiles. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_notify_runtime_tile_data_update: + +.. rst-class:: classref-method + +|void| **notify_runtime_tile_data_update**\ (\ ) + +Notifies the **TileMapLayer** node that calls to :ref:`_use_tile_data_runtime_update` or :ref:`_tile_data_runtime_update` will lead to different results. This will thus trigger a **TileMapLayer** update. + +\ **Warning:** Updating the **TileMapLayer** is computationally expensive and may impact performance. Try to limit the number of calls to this function to avoid unnecessary update. + +\ **Note:** This does not trigger a direct update of the **TileMapLayer**, the update will be done at the end of the frame as usual (unless you call :ref:`update_internals`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_set_cell: + +.. rst-class:: classref-method + +|void| **set_cell**\ (\ coords\: :ref:`Vector2i`, source_id\: :ref:`int` = -1, atlas_coords\: :ref:`Vector2i` = Vector2i(-1, -1), alternative_tile\: :ref:`int` = 0\ ) + +Sets the tile identifiers for the cell at coordinates ``coords``. Each tile of the :ref:`TileSet` is identified using three parts: + +- The source identifier ``source_id`` identifies a :ref:`TileSetSource` identifier. See :ref:`TileSet.set_source_id`, + +- The atlas coordinate identifier ``atlas_coords`` identifies a tile coordinates in the atlas (if the source is a :ref:`TileSetAtlasSource`). For :ref:`TileSetScenesCollectionSource` it should always be ``Vector2i(0, 0)``, + +- The alternative tile identifier ``alternative_tile`` identifies a tile alternative in the atlas (if the source is a :ref:`TileSetAtlasSource`), and the scene for a :ref:`TileSetScenesCollectionSource`. + +If ``source_id`` is set to ``-1``, ``atlas_coords`` to ``Vector2i(-1, -1)``, or ``alternative_tile`` to ``-1``, the cell will be erased. An erased cell gets **all** its identifiers automatically set to their respective invalid values, namely ``-1``, ``Vector2i(-1, -1)`` and ``-1``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_set_cells_terrain_connect: + +.. rst-class:: classref-method + +|void| **set_cells_terrain_connect**\ (\ cells\: :ref:`Array`\[:ref:`Vector2i`\], terrain_set\: :ref:`int`, terrain\: :ref:`int`, ignore_empty_terrains\: :ref:`bool` = true\ ) + +Update all the cells in the ``cells`` coordinates array so that they use the given ``terrain`` for the given ``terrain_set``. If an updated cell has the same terrain as one of its neighboring cells, this function tries to join the two. This function might update neighboring tiles if needed to create correct terrain transitions. + +If ``ignore_empty_terrains`` is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. + +\ **Note:** To work correctly, this method requires the **TileMapLayer**'s TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_set_cells_terrain_path: + +.. rst-class:: classref-method + +|void| **set_cells_terrain_path**\ (\ path\: :ref:`Array`\[:ref:`Vector2i`\], terrain_set\: :ref:`int`, terrain\: :ref:`int`, ignore_empty_terrains\: :ref:`bool` = true\ ) + +Update all the cells in the ``path`` coordinates array so that they use the given ``terrain`` for the given ``terrain_set``. The function will also connect two successive cell in the path with the same terrain. This function might update neighboring tiles if needed to create correct terrain transitions. + +If ``ignore_empty_terrains`` is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. + +\ **Note:** To work correctly, this method requires the **TileMapLayer**'s TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_set_navigation_map: + +.. rst-class:: classref-method + +|void| **set_navigation_map**\ (\ map\: :ref:`RID`\ ) + +Sets a custom ``map`` as a :ref:`NavigationServer2D` navigation map. If not set, uses the default :ref:`World2D` navigation map instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_set_pattern: + +.. rst-class:: classref-method + +|void| **set_pattern**\ (\ position\: :ref:`Vector2i`, pattern\: :ref:`TileMapPattern`\ ) + +Pastes the :ref:`TileMapPattern` at the given ``position`` in the tile map. See also :ref:`get_pattern`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_update_internals: + +.. rst-class:: classref-method + +|void| **update_internals**\ (\ ) + +Triggers a direct update of the **TileMapLayer**. Usually, calling this function is not needed, as **TileMapLayer** node updates automatically when one of its properties or cells is modified. + +However, for performance reasons, those updates are batched and delayed to the end of the frame. Calling this function will force the **TileMapLayer** to update right away instead. + +\ **Warning:** Updating the **TileMapLayer** is computationally expensive and may impact performance. Try to limit the number of updates and how many tiles they impact. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_tileset.rst b/classes/class_tileset.rst index acf225d13872..b7aec4811f69 100644 --- a/classes/class_tileset.rst +++ b/classes/class_tileset.rst @@ -38,17 +38,17 @@ Tutorials - :doc:`Using Tilemaps <../tutorials/2d/using_tilemaps>` -- `2D Platformer Demo `__ +- `2D Platformer Demo `__ -- `2D Isometric Demo `__ +- `2D Isometric Demo `__ -- `2D Hexagonal Demo `__ +- `2D Hexagonal Demo `__ -- `2D Navigation Astar Demo `__ +- `2D Grid-based Navigation with AStarGrid2D Demo `__ -- `2D Role Playing Game Demo `__ +- `2D Role Playing Game (RPG) Demo `__ -- `2D Kinematic Character Demo `__ +- `2D Kinematic Character Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_time.rst b/classes/class_time.rst index 8455fd4d4fca..de5b71e42d8c 100644 --- a/classes/class_time.rst +++ b/classes/class_time.rst @@ -25,7 +25,7 @@ This class conforms with as many of the ISO 8601 standards as possible. All date Conversion methods assume "the same timezone", and do not handle timezone conversions or DST automatically. Leap seconds are also not handled, they must be done manually if desired. Suffixes such as "Z" are not handled, you need to strip them away manually. -When getting time information from the system, the time can either be in the local timezone or UTC depending on the ``utc`` parameter. However, the :ref:`get_unix_time_from_system` method always returns the time in UTC. +When getting time information from the system, the time can either be in the local timezone or UTC depending on the ``utc`` parameter. However, the :ref:`get_unix_time_from_system` method always uses UTC as it returns the seconds passed since the `Unix epoch `__. \ **Important:** The ``_from_system`` methods use the system clock that the user can manually set. **Never use** this method for precise time calculation since its results are subject to automatic adjustments by the user or the operating system. **Always use** :ref:`get_ticks_usec` or :ref:`get_ticks_msec` for precise time calculation instead, since they are guaranteed to be monotonic (i.e. never decrease). @@ -559,7 +559,7 @@ Converts the given ISO 8601 date and/or time string to a Unix timestamp. The str :ref:`float` **get_unix_time_from_system**\ (\ ) |const| -Returns the current Unix timestamp in seconds based on the system time in UTC. This method is implemented by the operating system and always returns the time in UTC. +Returns the current Unix timestamp in seconds based on the system time in UTC. This method is implemented by the operating system and always returns the time in UTC. The Unix timestamp is the number of seconds passed since 1970-01-01 at 00:00:00, the `Unix epoch `__. \ **Note:** Unlike other methods that use integer timestamps, this method returns the timestamp as a :ref:`float` for sub-second precision. diff --git a/classes/class_timer.rst b/classes/class_timer.rst index e3a934e72014..f30a3d323235 100644 --- a/classes/class_timer.rst +++ b/classes/class_timer.rst @@ -39,7 +39,7 @@ Without requiring much code, a timer node can be added and configured in the edi Tutorials --------- -- `2D Dodge The Creeps Demo `__ +- `2D Dodge The Creeps Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_transform2d.rst b/classes/class_transform2d.rst index 3f22eac7eaf7..c88057f0b3b4 100644 --- a/classes/class_transform2d.rst +++ b/classes/class_transform2d.rst @@ -34,9 +34,9 @@ Tutorials - :doc:`Matrices and transforms <../tutorials/math/matrices_and_transforms>` -- `Matrix Transform Demo `__ +- `Matrix Transform Demo `__ -- `2.5D Demo `__ +- `2.5D Game Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_transform3d.rst b/classes/class_transform3d.rst index b71703dac48c..81bd3ebb2001 100644 --- a/classes/class_transform3d.rst +++ b/classes/class_transform3d.rst @@ -38,11 +38,11 @@ Tutorials - :doc:`Using 3D transforms <../tutorials/3d/using_transforms>` -- `Matrix Transform Demo `__ +- `Matrix Transform Demo `__ -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ -- `2.5D Demo `__ +- `2.5D Game Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_tree.rst b/classes/class_tree.rst index f1356fb73a99..e156f6e5372a 100644 --- a/classes/class_tree.rst +++ b/classes/class_tree.rst @@ -399,7 +399,7 @@ Emitted when a cell with the :ref:`TreeItem.CELL_MODE_CUSTOM`, mouse_button_index\: :ref:`int`\ ) +**empty_clicked**\ (\ click_position\: :ref:`Vector2`, mouse_button_index\: :ref:`int`\ ) Emitted when a mouse button is clicked in the empty space of the tree. @@ -459,7 +459,7 @@ Emitted when an item's icon is double-clicked. For a signal that emits when any .. rst-class:: classref-signal -**item_mouse_selected**\ (\ position\: :ref:`Vector2`, mouse_button_index\: :ref:`int`\ ) +**item_mouse_selected**\ (\ mouse_position\: :ref:`Vector2`, mouse_button_index\: :ref:`int`\ ) Emitted when an item is selected with a mouse button. diff --git a/classes/class_undoredo.rst b/classes/class_undoredo.rst index 25d7793f6e1a..8fc8c1b1f4cf 100644 --- a/classes/class_undoredo.rst +++ b/classes/class_undoredo.rst @@ -230,7 +230,7 @@ Makes "do"/"undo" operations stay in separate actions. :ref:`MergeMode` **MERGE_ENDS** = ``1`` -Makes so that the action's "undo" operations are from the first action created and the "do" operations are from the last subsequent action with the same name. +Merges this action with the previous one if they have the same name. Keeps only the first action's "undo" operations and the last action's "do" operations. Useful for sequential changes to a single value. .. _class_UndoRedo_constant_MERGE_ALL: @@ -238,7 +238,7 @@ Makes so that the action's "undo" operations are from the first action created a :ref:`MergeMode` **MERGE_ALL** = ``2`` -Makes subsequent actions with the same name be merged into one. +Merges this action with the previous one if they have the same name. .. rst-class:: classref-section-separator @@ -301,7 +301,9 @@ Register a ``property`` that would change its value to ``value`` when the action |void| **add_do_reference**\ (\ object\: :ref:`Object`\ ) -Register a reference for "do" that will be erased if the "do" history is lost. This is useful mostly for new nodes created for the "do" call. Do not use for resources. +Register a reference to an object that will be erased if the "do" history is deleted. This is useful for objects added by the "do" action and removed by the "undo" action. + +When the "do" history is deleted, if the object is a :ref:`RefCounted`, it will be unreferenced. Otherwise, it will be freed. Do not use for resources. :: @@ -346,7 +348,9 @@ Register a ``property`` that would change its value to ``value`` when the action |void| **add_undo_reference**\ (\ object\: :ref:`Object`\ ) -Register a reference for "undo" that will be erased if the "undo" history is lost. This is useful mostly for nodes removed with the "do" call (not the "undo" call!). +Register a reference to an object that will be erased if the "undo" history is deleted. This is useful for objects added by the "undo" action and removed by the "do" action. + +When the "undo" history is deleted, if the object is a :ref:`RefCounted`, it will be unreferenced. Otherwise, it will be freed. Do not use for resources. :: diff --git a/classes/class_upnpdevice.rst b/classes/class_upnpdevice.rst index 8fc31a54f619..5fb89a4a4f6f 100644 --- a/classes/class_upnpdevice.rst +++ b/classes/class_upnpdevice.rst @@ -106,6 +106,8 @@ Empty HTTP response. :ref:`IGDStatus` **IGD_STATUS_NO_URLS** = ``3`` +**Deprecated:** This value is no longer used. + Returned response contained no URLs. .. _class_UPNPDevice_constant_IGD_STATUS_NO_IGD: @@ -146,6 +148,8 @@ Invalid control. :ref:`IGDStatus` **IGD_STATUS_MALLOC_ERROR** = ``8`` +**Deprecated:** This value is no longer used. + Memory allocation error. .. _class_UPNPDevice_constant_IGD_STATUS_UNKNOWN_ERROR: diff --git a/classes/class_variant.rst b/classes/class_variant.rst index 21ddd7b2b681..94420d854bdb 100644 --- a/classes/class_variant.rst +++ b/classes/class_variant.rst @@ -28,7 +28,7 @@ In computer programming, a Variant class is a class that is designed to store a foo = "Now foo is a string!" foo = RefCounted.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!" + # bar = "Uh oh! I can't make statically typed variables become a different type!" .. code-tab:: csharp @@ -62,7 +62,7 @@ The global :ref:`@GlobalScope.typeof` function match typeof(foo): TYPE_NIL: print("foo is null") - TYPE_INTEGER: + TYPE_INT: print("foo is an integer") TYPE_OBJECT: # Note that Objects are their own special category. diff --git a/classes/class_vboxcontainer.rst b/classes/class_vboxcontainer.rst index 21b6e0a68e6e..320831064d6f 100644 --- a/classes/class_vboxcontainer.rst +++ b/classes/class_vboxcontainer.rst @@ -30,7 +30,7 @@ Tutorials - :doc:`Using Containers <../tutorials/ui/gui_containers>` -- `3D Voxel Demo `__ +- `3D Voxel Demo `__ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_vector2.rst b/classes/class_vector2.rst index e04c02f2d2e4..475ea51fe30c 100644 --- a/classes/class_vector2.rst +++ b/classes/class_vector2.rst @@ -38,7 +38,7 @@ Tutorials - `3Blue1Brown Essence of Linear Algebra `__ -- `Matrix Transform Demo `__ +- `Matrix Transform Demo `__ - `All 2D Demos `__ @@ -153,7 +153,7 @@ Methods +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`project`\ (\ b\: :ref:`Vector2`\ ) |const| | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`reflect`\ (\ n\: :ref:`Vector2`\ ) |const| | + | :ref:`Vector2` | :ref:`reflect`\ (\ line\: :ref:`Vector2`\ ) |const| | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`rotated`\ (\ angle\: :ref:`float`\ ) |const| | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -482,7 +482,9 @@ Returns the point at the given ``t`` on the `Bézier curve ` **bounce**\ (\ n\: :ref:`Vector2`\ ) |const| -Returns a new vector "bounced off" from a plane defined by the given normal. +Returns the vector "bounced off" from a line defined by the given normal ``n`` perpendicular to the line. + +\ **Note:** :ref:`bounce` performs the operation that most engines and frameworks call ``reflect()``. .. rst-class:: classref-item-separator @@ -520,7 +522,7 @@ Returns a new vector with all components clamped between the components of ``min Returns the 2D analog of the cross product for this vector and ``with``. -This is the signed area of the parallelogram formed by the two vectors. If the second vector is clockwise from the first vector, then the cross product is the positive area. If counter-clockwise, the cross product is the negative area. +This is the signed area of the parallelogram formed by the two vectors. If the second vector is clockwise from the first vector, then the cross product is the positive area. If counter-clockwise, the cross product is the negative area. If the two vectors are parallel this returns zero, making it useful for testing if two vectors are parallel. \ **Note:** Cross product is not defined in 2D mathematically. This method embeds the 2D vectors in the XY plane of 3D space and uses their cross product's Z component as the analog. @@ -844,9 +846,11 @@ Returns a new vector resulting from projecting this vector onto the given vector .. rst-class:: classref-method -:ref:`Vector2` **reflect**\ (\ n\: :ref:`Vector2`\ ) |const| +:ref:`Vector2` **reflect**\ (\ line\: :ref:`Vector2`\ ) |const| + +Returns the result of reflecting the vector from a line defined by the given direction vector ``line``. -Returns the result of reflecting the vector from a line defined by the given direction vector ``n``. +\ **Note:** :ref:`reflect` differs from what other engines and frameworks call ``reflect()``. In other engines, ``reflect()`` takes a normal direction which is a direction perpendicular to the line. In Godot, you specify the direction of the line directly. See also :ref:`bounce` which does what most engines call ``reflect()``. .. rst-class:: classref-item-separator diff --git a/classes/class_vector3.rst b/classes/class_vector3.rst index 09a908de3a9e..70a41ac6f9e7 100644 --- a/classes/class_vector3.rst +++ b/classes/class_vector3.rst @@ -38,7 +38,7 @@ Tutorials - `3Blue1Brown Essence of Linear Algebra `__ -- `Matrix Transform Demo `__ +- `Matrix Transform Demo `__ - `All 3D Demos `__ @@ -153,7 +153,7 @@ Methods +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`project`\ (\ b\: :ref:`Vector3`\ ) |const| | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`reflect`\ (\ n\: :ref:`Vector3`\ ) |const| | + | :ref:`Vector3` | :ref:`reflect`\ (\ direction\: :ref:`Vector3`\ ) |const| | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`rotated`\ (\ axis\: :ref:`Vector3`, angle\: :ref:`float`\ ) |const| | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -524,7 +524,9 @@ Returns the point at the given ``t`` on the `Bézier curve ` **bounce**\ (\ n\: :ref:`Vector3`\ ) |const| -Returns the vector "bounced off" from a plane defined by the given normal. +Returns the vector "bounced off" from a plane defined by the given normal ``n``. + +\ **Note:** :ref:`bounce` performs the operation that most engines and frameworks call ``reflect()``. .. rst-class:: classref-item-separator @@ -562,6 +564,8 @@ Returns a new vector with all components clamped between the components of ``min Returns the cross product of this vector and ``with``. +This returns a vector perpendicular to both this and ``with``, which would be the normal vector of the plane defined by the two vectors. As there are two such vectors, in opposite directions, this method returns the vector defined by a right-handed coordinate system. If the two vectors are parallel this returns an empty vector, making it useful for testing if two vectors are parallel. + .. rst-class:: classref-item-separator ---- @@ -904,9 +908,11 @@ Returns a new vector resulting from projecting this vector onto the given vector .. rst-class:: classref-method -:ref:`Vector3` **reflect**\ (\ n\: :ref:`Vector3`\ ) |const| +:ref:`Vector3` **reflect**\ (\ direction\: :ref:`Vector3`\ ) |const| + +Returns the result of reflecting the vector from a plane defined by the given direction vector ``direction``. -Returns the result of reflecting the vector from a plane defined by the given normal ``n``. +\ **Note:** :ref:`reflect` differs from what other engines and frameworks call ``reflect()``. In other engines, ``reflect()`` takes a normal direction which is a direction perpendicular to the plane. In Godot, you specify a direction parallel to the plane. See also :ref:`bounce` which does what most engines call ``reflect()``. .. rst-class:: classref-item-separator diff --git a/classes/class_vehiclebody3d.rst b/classes/class_vehiclebody3d.rst index cbd02afe97bd..34960605904f 100644 --- a/classes/class_vehiclebody3d.rst +++ b/classes/class_vehiclebody3d.rst @@ -30,7 +30,7 @@ This physics body implements all the physics logic needed to simulate a car. It Tutorials --------- -- `3D Truck Town Demo `__ +- `3D Truck Town Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_vehiclewheel3d.rst b/classes/class_vehiclewheel3d.rst index 16ffdeb294f1..5a4d42d5f2be 100644 --- a/classes/class_vehiclewheel3d.rst +++ b/classes/class_vehiclewheel3d.rst @@ -28,7 +28,7 @@ A node used as a child of a :ref:`VehicleBody3D` parent to Tutorials --------- -- `3D Truck Town Demo `__ +- `3D Truck Town Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index e10a7f07d77b..febfa7cb8faf 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -40,17 +40,17 @@ Tutorials - :doc:`Viewport and canvas transforms <../tutorials/2d/2d_transforms>` -- `GUI in 3D Demo `__ +- `GUI in 3D Viewport Demo `__ -- `3D in 2D Demo `__ +- `3D in 2D Viewport Demo `__ -- `2D in 3D Demo `__ +- `2D in 3D Viewport Demo `__ -- `Screen Capture Demo `__ +- `Screen Capture Demo `__ -- `Dynamic Split Screen Demo `__ +- `Dynamic Split Screen Demo `__ -- `3D Viewport Scaling Demo `__ +- `3D Resolution Scaling Demo `__ .. rst-class:: classref-reftable-group @@ -514,11 +514,7 @@ enum **RenderInfoType**: :ref:`RenderInfoType` **RENDER_INFO_TYPE_VISIBLE** = ``0`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +Visible render pass (excluding shadows). .. _class_Viewport_constant_RENDER_INFO_TYPE_SHADOW: @@ -526,23 +522,23 @@ enum **RenderInfoType**: :ref:`RenderInfoType` **RENDER_INFO_TYPE_SHADOW** = ``1`` -.. container:: contribute +Shadow render pass. Objects will be rendered several times depending on the number of amounts of lights with shadows and the number of directional shadow splits. - There is currently no description for this enum. Please help us by :ref:`contributing one `! +.. _class_Viewport_constant_RENDER_INFO_TYPE_CANVAS: + +.. rst-class:: classref-enumeration-constant +:ref:`RenderInfoType` **RENDER_INFO_TYPE_CANVAS** = ``2`` +Canvas item rendering. This includes all 2D rendering. .. _class_Viewport_constant_RENDER_INFO_TYPE_MAX: .. rst-class:: classref-enumeration-constant -:ref:`RenderInfoType` **RENDER_INFO_TYPE_MAX** = ``2`` - -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - +:ref:`RenderInfoType` **RENDER_INFO_TYPE_MAX** = ``3`` +Represents the size of the :ref:`RenderInfoType` enum. .. rst-class:: classref-item-separator @@ -576,11 +572,7 @@ Objects are displayed without light information. :ref:`DebugDraw` **DEBUG_DRAW_LIGHTING** = ``2`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +Objects are displayed without textures and only with lighting information. .. _class_Viewport_constant_DEBUG_DRAW_OVERDRAW: @@ -596,7 +588,7 @@ Objects are displayed semi-transparent with additive blending so you can see whe :ref:`DebugDraw` **DEBUG_DRAW_WIREFRAME** = ``4`` -Objects are displayed in wireframe style. +Objects are displayed as wireframe models. .. _class_Viewport_constant_DEBUG_DRAW_NORMAL_BUFFER: @@ -604,11 +596,7 @@ Objects are displayed in wireframe style. :ref:`DebugDraw` **DEBUG_DRAW_NORMAL_BUFFER** = ``5`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +Objects are displayed without lighting information and their textures replaced by normal mapping. .. _class_Viewport_constant_DEBUG_DRAW_VOXEL_GI_ALBEDO: @@ -656,11 +644,7 @@ Draws the shadow atlas that stores shadows from :ref:`DirectionalLight3D` **DEBUG_DRAW_SCENE_LUMINANCE** = ``11`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +Draws the scene luminance buffer (if available) in the upper left quadrant of the **Viewport**. .. _class_Viewport_constant_DEBUG_DRAW_SSAO: @@ -700,11 +684,9 @@ Draws the decal atlas used by :ref:`Decal`\ s and light projector t :ref:`DebugDraw` **DEBUG_DRAW_SDFGI** = ``16`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - +Draws the cascades used to render signed distance field global illumination (SDFGI). +Does nothing if the current environment's :ref:`Environment.sdfgi_enabled` is ``false`` or SDFGI is not supported on the platform. .. _class_Viewport_constant_DEBUG_DRAW_SDFGI_PROBES: @@ -712,11 +694,9 @@ Draws the decal atlas used by :ref:`Decal`\ s and light projector t :ref:`DebugDraw` **DEBUG_DRAW_SDFGI_PROBES** = ``17`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - +Draws the probes used for signed distance field global illumination (SDFGI). +Does nothing if the current environment's :ref:`Environment.sdfgi_enabled` is ``false`` or SDFGI is not supported on the platform. .. _class_Viewport_constant_DEBUG_DRAW_GI_BUFFER: @@ -724,11 +704,7 @@ Draws the decal atlas used by :ref:`Decal`\ s and light projector t :ref:`DebugDraw` **DEBUG_DRAW_GI_BUFFER** = ``18`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +Draws the buffer used for global illumination (GI). .. _class_Viewport_constant_DEBUG_DRAW_DISABLE_LOD: @@ -736,11 +712,7 @@ Draws the decal atlas used by :ref:`Decal`\ s and light projector t :ref:`DebugDraw` **DEBUG_DRAW_DISABLE_LOD** = ``19`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +Draws all of the objects at their highest polycount, without low level of detail (LOD). .. _class_Viewport_constant_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS: @@ -748,11 +720,7 @@ Draws the decal atlas used by :ref:`Decal`\ s and light projector t :ref:`DebugDraw` **DEBUG_DRAW_CLUSTER_OMNI_LIGHTS** = ``20`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +Draws the cluster used by :ref:`OmniLight3D` nodes to optimize light rendering. .. _class_Viewport_constant_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS: @@ -760,11 +728,7 @@ Draws the decal atlas used by :ref:`Decal`\ s and light projector t :ref:`DebugDraw` **DEBUG_DRAW_CLUSTER_SPOT_LIGHTS** = ``21`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +Draws the cluster used by :ref:`SpotLight3D` nodes to optimize light rendering. .. _class_Viewport_constant_DEBUG_DRAW_CLUSTER_DECALS: @@ -772,11 +736,7 @@ Draws the decal atlas used by :ref:`Decal`\ s and light projector t :ref:`DebugDraw` **DEBUG_DRAW_CLUSTER_DECALS** = ``22`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +Draws the cluster used by :ref:`Decal` nodes to optimize decal rendering. .. _class_Viewport_constant_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES: @@ -784,11 +744,7 @@ Draws the decal atlas used by :ref:`Decal`\ s and light projector t :ref:`DebugDraw` **DEBUG_DRAW_CLUSTER_REFLECTION_PROBES** = ``23`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +Draws the cluster used by :ref:`ReflectionProbe` nodes to optimize decal rendering. .. _class_Viewport_constant_DEBUG_DRAW_OCCLUDERS: @@ -796,11 +752,7 @@ Draws the decal atlas used by :ref:`Decal`\ s and light projector t :ref:`DebugDraw` **DEBUG_DRAW_OCCLUDERS** = ``24`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +Draws the buffer used for occlusion culling. .. _class_Viewport_constant_DEBUG_DRAW_MOTION_VECTORS: @@ -808,11 +760,7 @@ Draws the decal atlas used by :ref:`Decal`\ s and light projector t :ref:`DebugDraw` **DEBUG_DRAW_MOTION_VECTORS** = ``25`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +Draws vector lines over the viewport to indicate the movement of pixels between frames. .. _class_Viewport_constant_DEBUG_DRAW_INTERNAL_BUFFER: @@ -874,7 +822,7 @@ Use this for non-pixel art textures that may be viewed at a low scale (e.g. due :ref:`DefaultCanvasItemTextureFilter` **DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_MAX** = ``4`` -Max value for :ref:`DefaultCanvasItemTextureFilter` enum. +Represents the size of the :ref:`DefaultCanvasItemTextureFilter` enum. .. rst-class:: classref-item-separator @@ -916,7 +864,7 @@ Flip the texture when repeating so that the edge lines up instead of abruptly ch :ref:`DefaultCanvasItemTextureRepeat` **DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_MAX** = ``3`` -Max value for :ref:`DefaultCanvasItemTextureRepeat` enum. +Represents the size of the :ref:`DefaultCanvasItemTextureRepeat` enum. .. rst-class:: classref-item-separator @@ -934,11 +882,7 @@ enum **SDFOversize**: :ref:`SDFOversize` **SDF_OVERSIZE_100_PERCENT** = ``0`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +The signed distance field only covers the viewport's own rectangle. .. _class_Viewport_constant_SDF_OVERSIZE_120_PERCENT: @@ -946,11 +890,7 @@ enum **SDFOversize**: :ref:`SDFOversize` **SDF_OVERSIZE_120_PERCENT** = ``1`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +The signed distance field is expanded to cover 20% of the viewport's size around the borders. .. _class_Viewport_constant_SDF_OVERSIZE_150_PERCENT: @@ -958,11 +898,7 @@ enum **SDFOversize**: :ref:`SDFOversize` **SDF_OVERSIZE_150_PERCENT** = ``2`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +The signed distance field is expanded to cover 50% of the viewport's size around the borders. .. _class_Viewport_constant_SDF_OVERSIZE_200_PERCENT: @@ -970,11 +906,7 @@ enum **SDFOversize**: :ref:`SDFOversize` **SDF_OVERSIZE_200_PERCENT** = ``3`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +The signed distance field is expanded to cover 100% (double) of the viewport's size around the borders. .. _class_Viewport_constant_SDF_OVERSIZE_MAX: @@ -982,11 +914,7 @@ enum **SDFOversize**: :ref:`SDFOversize` **SDF_OVERSIZE_MAX** = ``4`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +Represents the size of the :ref:`SDFOversize` enum. .. rst-class:: classref-item-separator @@ -1004,11 +932,7 @@ enum **SDFScale**: :ref:`SDFScale` **SDF_SCALE_100_PERCENT** = ``0`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +The signed distance field is rendered at full resolution. .. _class_Viewport_constant_SDF_SCALE_50_PERCENT: @@ -1016,11 +940,7 @@ enum **SDFScale**: :ref:`SDFScale` **SDF_SCALE_50_PERCENT** = ``1`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +The signed distance field is rendered at half the resolution of this viewport. .. _class_Viewport_constant_SDF_SCALE_25_PERCENT: @@ -1028,11 +948,7 @@ enum **SDFScale**: :ref:`SDFScale` **SDF_SCALE_25_PERCENT** = ``2`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +The signed distance field is rendered at a quarter the resolution of this viewport. .. _class_Viewport_constant_SDF_SCALE_MAX: @@ -1040,11 +956,7 @@ enum **SDFScale**: :ref:`SDFScale` **SDF_SCALE_MAX** = ``3`` -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - +Represents the size of the :ref:`SDFScale` enum. .. rst-class:: classref-item-separator @@ -1062,7 +974,7 @@ enum **VRSMode**: :ref:`VRSMode` **VRS_DISABLED** = ``0`` -VRS is disabled. +Variable Rate Shading is disabled. .. _class_Viewport_constant_VRS_TEXTURE: @@ -1070,7 +982,7 @@ VRS is disabled. :ref:`VRSMode` **VRS_TEXTURE** = ``1`` -VRS uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view. +Variable Rate Shading uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view. .. _class_Viewport_constant_VRS_XR: @@ -1078,7 +990,7 @@ VRS uses a texture. Note, for stereoscopic use a texture atlas with a texture fo :ref:`VRSMode` **VRS_XR** = ``2`` -VRS texture is supplied by the primary :ref:`XRInterface`. +Variable Rate Shading's texture is supplied by the primary :ref:`XRInterface`. .. _class_Viewport_constant_VRS_MAX: @@ -1646,9 +1558,9 @@ Sets the screen-space antialiasing method used. Screen-space antialiasing works - |void| **set_sdf_oversize**\ (\ value\: :ref:`SDFOversize`\ ) - :ref:`SDFOversize` **get_sdf_oversize**\ (\ ) -.. container:: contribute +Controls how much of the original viewport's size should be covered by the 2D signed distance field. This SDF can be sampled in :ref:`CanvasItem` shaders and is also used for :ref:`GPUParticles2D` collision. Higher values allow portions of occluders located outside the viewport to still be taken into account in the generated signed distance field, at the cost of performance. If you notice particles falling through :ref:`LightOccluder2D`\ s as the occluders leave the viewport, increase this setting. - There is currently no description for this property. Please help us by :ref:`contributing one `! +The percentage is added on each axis and on both sides. For example, with the default :ref:`SDF_OVERSIZE_120_PERCENT`, the signed distance field will cover 20% of the viewport's size outside the viewport on each side (top, right, bottom, left). .. rst-class:: classref-item-separator @@ -1665,9 +1577,7 @@ Sets the screen-space antialiasing method used. Screen-space antialiasing works - |void| **set_sdf_scale**\ (\ value\: :ref:`SDFScale`\ ) - :ref:`SDFScale` **get_sdf_scale**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The resolution scale to use for the 2D signed distance field. Higher values lead to a more precise and more stable signed distance field as the camera moves, at the cost of performance. .. rst-class:: classref-item-separator @@ -1684,9 +1594,7 @@ Sets the screen-space antialiasing method used. Screen-space antialiasing works - |void| **set_snap_2d_transforms_to_pixel**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_snap_2d_transforms_to_pixel_enabled**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If ``true``, :ref:`CanvasItem` nodes will internally snap to full pixels. Their position can still be sub-pixel, but the decimals will not have effect. This can lead to a crisper appearance at the cost of less smooth movement, especially when :ref:`Camera2D` smoothing is enabled. .. rst-class:: classref-item-separator @@ -1703,9 +1611,7 @@ Sets the screen-space antialiasing method used. Screen-space antialiasing works - |void| **set_snap_2d_vertices_to_pixel**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_snap_2d_vertices_to_pixel_enabled**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If ``true``, vertices of :ref:`CanvasItem` nodes will snap to full pixels. Only affects the final vertex positions, not the transforms. This can lead to a crisper appearance at the cost of less smooth movement, especially when :ref:`Camera2D` smoothing is enabled. .. rst-class:: classref-item-separator @@ -1781,7 +1687,7 @@ In some cases, debanding may introduce a slightly noticeable dithering pattern. - |void| **set_use_hdr_2d**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_using_hdr_2d**\ (\ ) -If ``true``, 2D rendering will use an high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be a ``RGBA16`` framebuffer, while when using the Mobile renderer it will be a ``RGB10_A2`` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the ``0-1`` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients. +If ``true``, 2D rendering will use an high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be an ``RGBA16`` framebuffer, while when using the Mobile renderer it will be an ``RGB10_A2`` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the ``0-1`` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients. \ **Note:** This setting will have no effect when using the GL Compatibility renderer as the GL Compatibility renderer always renders in low dynamic range for performance reasons. @@ -1878,7 +1784,7 @@ Texture to use when :ref:`vrs_mode` is set to The texture *must* use a lossless compression format so that colors can be matched precisely. The following VRS densities are mapped to various colors, with brighter colors representing a lower level of shading precision: -:: +.. code:: text - 1×1 = rgb(0, 0, 0) - #000000 - 1×2 = rgb(0, 85, 0) - #005500 diff --git a/classes/class_viewporttexture.rst b/classes/class_viewporttexture.rst index bd16350a863b..8373e35c2566 100644 --- a/classes/class_viewporttexture.rst +++ b/classes/class_viewporttexture.rst @@ -19,24 +19,26 @@ Provides the content of a :ref:`Viewport` as a dynamic texture. Description ----------- -Provides the content of a :ref:`Viewport` as a dynamic :ref:`Texture2D`. This can be used to mix controls, 2D game objects, and 3D game objects in the same scene. +A **ViewportTexture** provides the content of a :ref:`Viewport` as a dynamic :ref:`Texture2D`. This can be used to combine the rendering of :ref:`Control`, :ref:`Node2D` and :ref:`Node3D` nodes. For example, you can use this texture to display a 3D scene inside a :ref:`TextureRect`, or a 2D overlay in a :ref:`Sprite3D`. -To create a **ViewportTexture** in code, use the :ref:`Viewport.get_texture` method on the target viewport. +To get a **ViewportTexture** in code, use the :ref:`Viewport.get_texture` method on the target viewport. \ **Note:** A **ViewportTexture** is always local to its scene (see :ref:`Resource.resource_local_to_scene`). If the scene root is not ready, it may return incorrect data (see :ref:`Node.ready`). +\ **Note:** Instantiating scenes containing a high-resolution **ViewportTexture** may cause noticeable stutter. + .. rst-class:: classref-introduction-group Tutorials --------- -- `GUI in 3D Demo `__ +- `GUI in 3D Viewport Demo `__ -- `3D in 2D Demo `__ +- `3D in 2D Viewport Demo `__ -- `2D in 3D Demo `__ +- `2D in 3D Viewport Demo `__ -- `3D Viewport Scaling Demo `__ +- `3D Resolution Scaling Demo `__ .. rst-class:: classref-reftable-group @@ -70,9 +72,9 @@ Property Descriptions - |void| **set_viewport_path_in_scene**\ (\ value\: :ref:`NodePath`\ ) - :ref:`NodePath` **get_viewport_path_in_scene**\ (\ ) -The path to the :ref:`Viewport` node to display. This is relative to the scene root, not to the node that uses the texture. +The path to the :ref:`Viewport` node to display. This is relative to the local scene root (see :ref:`Resource.get_local_scene`), **not** to the nodes that use this texture. -\ **Note:** In the editor, this path is automatically updated when the target viewport or one of its ancestors is renamed or moved. At runtime, the path may not be able to automatically update due to the inability to determine the scene root. +\ **Note:** In the editor, this path is automatically updated when the target viewport or one of its ancestors is renamed or moved. At runtime, this path may not automatically update if the scene root cannot be found. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_visibleonscreennotifier2d.rst b/classes/class_visibleonscreennotifier2d.rst index 831071de0d65..600c8dd3e14e 100644 --- a/classes/class_visibleonscreennotifier2d.rst +++ b/classes/class_visibleonscreennotifier2d.rst @@ -32,7 +32,7 @@ If you want a node to be enabled automatically when this region is visible on sc Tutorials --------- -- `2D Dodge The Creeps Demo `__ +- `2D Dodge The Creeps Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_visualshader.rst b/classes/class_visualshader.rst index e8928d08e6c5..8ea6a2a9876f 100644 --- a/classes/class_visualshader.rst +++ b/classes/class_visualshader.rst @@ -53,12 +53,16 @@ Methods +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_varying`\ (\ name\: :ref:`String`, mode\: :ref:`VaryingMode`, type\: :ref:`VaryingType`\ ) | +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`attach_node_to_frame`\ (\ type\: :ref:`Type`, id\: :ref:`int`, frame\: :ref:`int`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`can_connect_nodes`\ (\ type\: :ref:`Type`, from_node\: :ref:`int`, from_port\: :ref:`int`, to_node\: :ref:`int`, to_port\: :ref:`int`\ ) |const| | +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`connect_nodes`\ (\ type\: :ref:`Type`, from_node\: :ref:`int`, from_port\: :ref:`int`, to_node\: :ref:`int`, to_port\: :ref:`int`\ ) | +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`connect_nodes_forced`\ (\ type\: :ref:`Type`, from_node\: :ref:`int`, from_port\: :ref:`int`, to_node\: :ref:`int`, to_port\: :ref:`int`\ ) | +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`detach_node_from_frame`\ (\ type\: :ref:`Type`, id\: :ref:`int`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`disconnect_nodes`\ (\ type\: :ref:`Type`, from_node\: :ref:`int`, from_port\: :ref:`int`, to_node\: :ref:`int`, to_port\: :ref:`int`\ ) | +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`VisualShaderNode` | :ref:`get_node`\ (\ type\: :ref:`Type`, id\: :ref:`int`\ ) |const| | @@ -385,6 +389,18 @@ Adds a new varying value node to the shader. ---- +.. _class_VisualShader_method_attach_node_to_frame: + +.. rst-class:: classref-method + +|void| **attach_node_to_frame**\ (\ type\: :ref:`Type`, id\: :ref:`int`, frame\: :ref:`int`\ ) + +Attaches the given node to the given frame. + +.. rst-class:: classref-item-separator + +---- + .. _class_VisualShader_method_can_connect_nodes: .. rst-class:: classref-method @@ -421,6 +437,18 @@ Connects the specified nodes and ports, even if they can't be connected. Such co ---- +.. _class_VisualShader_method_detach_node_from_frame: + +.. rst-class:: classref-method + +|void| **detach_node_from_frame**\ (\ type\: :ref:`Type`, id\: :ref:`int`\ ) + +Detaches the given node from the frame it is attached to. + +.. rst-class:: classref-item-separator + +---- + .. _class_VisualShader_method_disconnect_nodes: .. rst-class:: classref-method diff --git a/classes/class_visualshadernode.rst b/classes/class_visualshadernode.rst index b134c13f7269..d8126ad897d6 100644 --- a/classes/class_visualshadernode.rst +++ b/classes/class_visualshadernode.rst @@ -38,9 +38,11 @@ Properties .. table:: :widths: auto - +-----------------------+-----------------------------------------------------------------------------------------+--------+ - | :ref:`int` | :ref:`output_port_for_preview` | ``-1`` | - +-----------------------+-----------------------------------------------------------------------------------------+--------+ + +-----------------------+---------------------------------------------------------------------------------------------+--------+ + | :ref:`int` | :ref:`linked_parent_graph_frame` | ``-1`` | + +-----------------------+---------------------------------------------------------------------------------------------+--------+ + | :ref:`int` | :ref:`output_port_for_preview` | ``-1`` | + +-----------------------+---------------------------------------------------------------------------------------------+--------+ .. rst-class:: classref-reftable-group @@ -170,6 +172,23 @@ Represents the size of the :ref:`PortType` enum. Property Descriptions --------------------- +.. _class_VisualShaderNode_property_linked_parent_graph_frame: + +.. rst-class:: classref-property + +:ref:`int` **linked_parent_graph_frame** = ``-1`` + +.. rst-class:: classref-property-setget + +- |void| **set_frame**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_frame**\ (\ ) + +Represents the index of the frame this node is linked to. If set to ``-1`` the node is not linked to any frame. + +.. rst-class:: classref-item-separator + +---- + .. _class_VisualShaderNode_property_output_port_for_preview: .. rst-class:: classref-property diff --git a/classes/class_visualshadernodecomment.rst b/classes/class_visualshadernodecomment.rst deleted file mode 100644 index 04d40fd55280..000000000000 --- a/classes/class_visualshadernodecomment.rst +++ /dev/null @@ -1,84 +0,0 @@ -:github_url: hide - -.. DO NOT EDIT THIS FILE!!! -.. Generated automatically from Godot engine sources. -.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. -.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/VisualShaderNodeComment.xml. - -.. _class_VisualShaderNodeComment: - -VisualShaderNodeComment -======================= - -**Inherits:** :ref:`VisualShaderNodeResizableBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -A comment node to be placed on visual shader graph. - -.. rst-class:: classref-introduction-group - -Description ------------ - -A resizable rectangular area with changeable :ref:`title` and :ref:`description` used for better organizing of other visual shader nodes. - -.. rst-class:: classref-reftable-group - -Properties ----------- - -.. table:: - :widths: auto - - +-----------------------------+------------------------------------------------------------------------+---------------+ - | :ref:`String` | :ref:`description` | ``""`` | - +-----------------------------+------------------------------------------------------------------------+---------------+ - | :ref:`String` | :ref:`title` | ``"Comment"`` | - +-----------------------------+------------------------------------------------------------------------+---------------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Property Descriptions ---------------------- - -.. _class_VisualShaderNodeComment_property_description: - -.. rst-class:: classref-property - -:ref:`String` **description** = ``""`` - -.. rst-class:: classref-property-setget - -- |void| **set_description**\ (\ value\: :ref:`String`\ ) -- :ref:`String` **get_description**\ (\ ) - -An additional description which placed below the title. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VisualShaderNodeComment_property_title: - -.. rst-class:: classref-property - -:ref:`String` **title** = ``"Comment"`` - -.. rst-class:: classref-property-setget - -- |void| **set_title**\ (\ value\: :ref:`String`\ ) -- :ref:`String` **get_title**\ (\ ) - -A title of the node. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` -.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeframe.rst b/classes/class_visualshadernodeframe.rst new file mode 100644 index 000000000000..af385e5e9f31 --- /dev/null +++ b/classes/class_visualshadernodeframe.rst @@ -0,0 +1,190 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/VisualShaderNodeFrame.xml. + +.. _class_VisualShaderNodeFrame: + +VisualShaderNodeFrame +===================== + +**Inherits:** :ref:`VisualShaderNodeResizableBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +A frame other visual shader nodes can be attached to for better organization. + +.. rst-class:: classref-introduction-group + +Description +----------- + +A rectangular frame that can be used to group visual shader nodes together to improve organization. + +Nodes attached to the frame will move with it when it is dragged and it can automatically resize to enclose all attached nodes. + +Its title, description and color can be customized. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------------------------------+------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`PackedInt32Array` | :ref:`attached_nodes` | ``PackedInt32Array()`` | + +-------------------------------------------------+------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`bool` | :ref:`autoshrink` | ``true`` | + +-------------------------------------------------+------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`Color` | :ref:`tint_color` | ``Color(0.3, 0.3, 0.3, 0.75)`` | + +-------------------------------------------------+------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`bool` | :ref:`tint_color_enabled` | ``false`` | + +-------------------------------------------------+------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`String` | :ref:`title` | ``"Title"`` | + +-------------------------------------------------+------------------------------------------------------------------------------------+--------------------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +--------+--------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_attached_node`\ (\ node\: :ref:`int`\ ) | + +--------+--------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_attached_node`\ (\ node\: :ref:`int`\ ) | + +--------+--------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_VisualShaderNodeFrame_property_attached_nodes: + +.. rst-class:: classref-property + +:ref:`PackedInt32Array` **attached_nodes** = ``PackedInt32Array()`` + +.. rst-class:: classref-property-setget + +- |void| **set_attached_nodes**\ (\ value\: :ref:`PackedInt32Array`\ ) +- :ref:`PackedInt32Array` **get_attached_nodes**\ (\ ) + +The list of nodes attached to the frame. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. + +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeFrame_property_autoshrink: + +.. rst-class:: classref-property + +:ref:`bool` **autoshrink** = ``true`` + +.. rst-class:: classref-property-setget + +- |void| **set_autoshrink_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_autoshrink_enabled**\ (\ ) + +If ``true``, the frame will automatically resize to enclose all attached nodes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeFrame_property_tint_color: + +.. rst-class:: classref-property + +:ref:`Color` **tint_color** = ``Color(0.3, 0.3, 0.3, 0.75)`` + +.. rst-class:: classref-property-setget + +- |void| **set_tint_color**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_tint_color**\ (\ ) + +The color of the frame when :ref:`tint_color_enabled` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeFrame_property_tint_color_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **tint_color_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- |void| **set_tint_color_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_tint_color_enabled**\ (\ ) + +If ``true``, the frame will be tinted with the color specified in :ref:`tint_color`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeFrame_property_title: + +.. rst-class:: classref-property + +:ref:`String` **title** = ``"Title"`` + +.. rst-class:: classref-property-setget + +- |void| **set_title**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_title**\ (\ ) + +The title of the node. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_VisualShaderNodeFrame_method_add_attached_node: + +.. rst-class:: classref-method + +|void| **add_attached_node**\ (\ node\: :ref:`int`\ ) + +Adds a node to the list of nodes attached to the frame. Should not be called directly, use the :ref:`VisualShader.attach_node_to_frame` method instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeFrame_method_remove_attached_node: + +.. rst-class:: classref-method + +|void| **remove_attached_node**\ (\ node\: :ref:`int`\ ) + +Removes a node from the list of nodes attached to the frame. Should not be called directly, use the :ref:`VisualShader.detach_node_from_frame` method instead. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernoderesizablebase.rst b/classes/class_visualshadernoderesizablebase.rst index 79742d780dd5..656712c60bcd 100644 --- a/classes/class_visualshadernoderesizablebase.rst +++ b/classes/class_visualshadernoderesizablebase.rst @@ -12,7 +12,7 @@ VisualShaderNodeResizableBase **Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`VisualShaderNodeComment`, :ref:`VisualShaderNodeCurveTexture`, :ref:`VisualShaderNodeCurveXYZTexture`, :ref:`VisualShaderNodeGroupBase` +**Inherited By:** :ref:`VisualShaderNodeCurveTexture`, :ref:`VisualShaderNodeCurveXYZTexture`, :ref:`VisualShaderNodeFrame`, :ref:`VisualShaderNodeGroupBase` Base class for resizable nodes in a visual shader graph. diff --git a/classes/class_voxelgi.rst b/classes/class_voxelgi.rst index a26b9443042d..7e07e410c735 100644 --- a/classes/class_voxelgi.rst +++ b/classes/class_voxelgi.rst @@ -36,7 +36,7 @@ Tutorials - :doc:`Using Voxel global illumination <../tutorials/3d/global_illumination/using_voxel_gi>` -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_voxelgidata.rst b/classes/class_voxelgidata.rst index 44ae597c6b72..9535b135ffac 100644 --- a/classes/class_voxelgidata.rst +++ b/classes/class_voxelgidata.rst @@ -28,7 +28,7 @@ Description Tutorials --------- -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_websocketmultiplayerpeer.rst b/classes/class_websocketmultiplayerpeer.rst index d4734cc3ef0c..f8e3a590a037 100644 --- a/classes/class_websocketmultiplayerpeer.rst +++ b/classes/class_websocketmultiplayerpeer.rst @@ -87,6 +87,8 @@ Property Descriptions The extra headers to use during handshake. See :ref:`WebSocketPeer.handshake_headers` for more details. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + .. rst-class:: classref-item-separator ---- @@ -172,6 +174,8 @@ The outbound buffer size for connected peers. See :ref:`WebSocketPeer.outbound_b The supported WebSocket sub-protocols. See :ref:`WebSocketPeer.supported_protocols` for more details. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_websocketpeer.rst b/classes/class_websocketpeer.rst index bbeacb47fdd4..586650c14473 100644 --- a/classes/class_websocketpeer.rst +++ b/classes/class_websocketpeer.rst @@ -215,6 +215,8 @@ The extra HTTP headers to be sent during the WebSocket handshake. \ **Note:** Not supported in Web exports due to browsers' restrictions. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + .. rst-class:: classref-item-separator ---- @@ -283,6 +285,8 @@ The size of the input buffer in bytes (roughly the maximum amount of memory that The WebSocket sub-protocols allowed during the WebSocket handshake. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_window.rst b/classes/class_window.rst index 1061765f0137..6f7d814b7862 100644 --- a/classes/class_window.rst +++ b/classes/class_window.rst @@ -1257,6 +1257,8 @@ Passing an empty array will disable passthrough support (all mouse events will b \ **Note:** This property is implemented on Linux (X11), macOS and Windows. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_worldenvironment.rst b/classes/class_worldenvironment.rst index a99c040ac173..e21d74081a26 100644 --- a/classes/class_worldenvironment.rst +++ b/classes/class_worldenvironment.rst @@ -35,11 +35,9 @@ Tutorials - :doc:`Environment and post-processing <../tutorials/3d/environment_and_post_processing>` -- `3D Material Testers Demo `__ +- `3D Material Testers Demo `__ -- `2D HDR Demo `__ - -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_xmlparser.rst b/classes/class_xmlparser.rst index c851c896a0b1..81b9c95f57cf 100644 --- a/classes/class_xmlparser.rst +++ b/classes/class_xmlparser.rst @@ -23,7 +23,7 @@ Provides a low-level interface for creating parsers for `XML ` method or a buffer with the :ref:`open_buffer` method. Then, the :ref:`read` method must be called to parse the next nodes. Most of the methods take into consideration the currently parsed node. -Here is an example of using **XMLParser** to parse a SVG file (which is based on XML), printing each element and its attributes as a dictionary: +Here is an example of using **XMLParser** to parse an SVG file (which is based on XML), printing each element and its attributes as a dictionary: .. tabs:: diff --git a/classes/class_xrbodymodifier3d.rst b/classes/class_xrbodymodifier3d.rst index e9b890045b95..dfb34c61cdbc 100644 --- a/classes/class_xrbodymodifier3d.rst +++ b/classes/class_xrbodymodifier3d.rst @@ -12,7 +12,7 @@ XRBodyModifier3D **Experimental:** This class may be changed or removed in future versions. -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**Inherits:** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` A node for driving body meshes from :ref:`XRBodyTracker` data. @@ -51,8 +51,6 @@ Properties +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------+ | :ref:`bool` | :ref:`show_when_tracked` | ``true`` | +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------+ - | :ref:`NodePath` | :ref:`target` | ``NodePath("")`` | - +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------+ .. rst-class:: classref-section-separator @@ -200,23 +198,6 @@ Specifies the type of updates to perform on the bones. If true then the nodes visibility is determined by whether tracking data is available. -.. rst-class:: classref-item-separator - ----- - -.. _class_XRBodyModifier3D_property_target: - -.. rst-class:: classref-property - -:ref:`NodePath` **target** = ``NodePath("")`` - -.. rst-class:: classref-property-setget - -- |void| **set_target**\ (\ value\: :ref:`NodePath`\ ) -- :ref:`NodePath` **get_target**\ (\ ) - -A :ref:`NodePath` to a :ref:`Skeleton3D` to animate. - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_xrfacetracker.rst b/classes/class_xrfacetracker.rst index f337d90d699c..4e17474afb1c 100644 --- a/classes/class_xrfacetracker.rst +++ b/classes/class_xrfacetracker.rst @@ -1247,6 +1247,8 @@ Property Descriptions The array of face blend shape weights with indices corresponding to the :ref:`BlendShapeEntry` enum. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedFloat32Array` for more details. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_xrhandmodifier3d.rst b/classes/class_xrhandmodifier3d.rst index 3db73adab8a5..d5beb25f3bc0 100644 --- a/classes/class_xrhandmodifier3d.rst +++ b/classes/class_xrhandmodifier3d.rst @@ -10,7 +10,7 @@ XRHandModifier3D ================ -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**Inherits:** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` A node for driving hand meshes from :ref:`XRHandTracker` data. @@ -45,8 +45,6 @@ Properties +-----------------------------------------------------+-------------------------------------------------------------------+-------------------+ | :ref:`StringName` | :ref:`hand_tracker` | ``&"/user/left"`` | +-----------------------------------------------------+-------------------------------------------------------------------+-------------------+ - | :ref:`NodePath` | :ref:`target` | ``NodePath("")`` | - +-----------------------------------------------------+-------------------------------------------------------------------+-------------------+ .. rst-class:: classref-section-separator @@ -126,23 +124,6 @@ Specifies the type of updates to perform on the bones. The name of the :ref:`XRHandTracker` registered with :ref:`XRServer` to obtain the hand tracking data from. -.. rst-class:: classref-item-separator - ----- - -.. _class_XRHandModifier3D_property_target: - -.. rst-class:: classref-property - -:ref:`NodePath` **target** = ``NodePath("")`` - -.. rst-class:: classref-property-setget - -- |void| **set_target**\ (\ value\: :ref:`NodePath`\ ) -- :ref:`NodePath` **get_target**\ (\ ) - -A :ref:`NodePath` to a :ref:`Skeleton3D` to animate. - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/index.rst b/classes/index.rst index 10174ff3f9f0..06e0c52945b4 100644 --- a/classes/index.rst +++ b/classes/index.rst @@ -119,6 +119,7 @@ Nodes class_gpuparticlescollisionsphere3d class_graphedit class_graphelement + class_graphframe class_graphnode class_gridcontainer class_gridmap @@ -171,6 +172,10 @@ Nodes class_node3d class_occluderinstance3d class_omnilight3d + class_openxrcompositionlayer + class_openxrcompositionlayercylinder + class_openxrcompositionlayerequirect + class_openxrcompositionlayerquad class_openxrhand class_optionbutton class_panel @@ -184,6 +189,7 @@ Nodes class_pathfollow3d class_physicalbone2d class_physicalbone3d + class_physicalbonesimulator3d class_physicsbody2d class_physicsbody3d class_pinjoint2d @@ -218,6 +224,7 @@ Nodes class_skeleton2d class_skeleton3d class_skeletonik3d + class_skeletonmodifier3d class_slider class_sliderjoint3d class_softbody3d @@ -240,7 +247,7 @@ Nodes class_textureprogressbar class_texturerect class_tilemap - class_tilemaplayergroup + class_tilemaplayer class_timer class_touchscreenbutton class_tree @@ -320,6 +327,7 @@ Resources class_audioeffecteq21 class_audioeffecteq6 class_audioeffectfilter + class_audioeffecthardlimiter class_audioeffecthighpassfilter class_audioeffecthighshelffilter class_audioeffectlimiter @@ -335,11 +343,14 @@ Resources class_audioeffectstereoenhance class_audiostream class_audiostreamgenerator + class_audiostreaminteractive class_audiostreammicrophone class_audiostreammp3 class_audiostreamoggvorbis + class_audiostreamplaylist class_audiostreampolyphonic class_audiostreamrandomizer + class_audiostreamsynchronized class_audiostreamwav class_basematerial3d class_bitmap @@ -567,7 +578,6 @@ Resources class_visualshadernodecolorfunc class_visualshadernodecolorop class_visualshadernodecolorparameter - class_visualshadernodecomment class_visualshadernodecompare class_visualshadernodeconstant class_visualshadernodecubemap @@ -585,6 +595,7 @@ Resources class_visualshadernodefloatfunc class_visualshadernodefloatop class_visualshadernodefloatparameter + class_visualshadernodeframe class_visualshadernodefresnel class_visualshadernodeglobalexpression class_visualshadernodegroupbase @@ -691,9 +702,12 @@ Other objects class_audioserver class_audiostreamgeneratorplayback class_audiostreamplayback + class_audiostreamplaybackinteractive class_audiostreamplaybackoggvorbis + class_audiostreamplaybackplaylist class_audiostreamplaybackpolyphonic class_audiostreamplaybackresampled + class_audiostreamplaybacksynchronized class_callbacktweener class_camerafeed class_cameraserver diff --git a/community/asset_library/submitting_to_assetlib.rst b/community/asset_library/submitting_to_assetlib.rst index a7288511c01f..89a38c03ad30 100644 --- a/community/asset_library/submitting_to_assetlib.rst +++ b/community/asset_library/submitting_to_assetlib.rst @@ -178,6 +178,10 @@ is required in the submission form here as well. The **icon** must be square (1:1 aspect ratio). It should have a minimum resolution of 128×128 pixels. +.. note:: + + For icons hosted on GitHub, URLs must be provided in the form of `https://raw.githubusercontent.com////Icon.png`. + * **License**: The license under which you are distributing the asset. The list includes a variety of free and open source software licenses, such as GPL diff --git a/community/channels.rst b/community/channels.rst index b34f5c11f00e..584b1d3acd21 100644 --- a/community/channels.rst +++ b/community/channels.rst @@ -40,7 +40,7 @@ Social networks and other sites - `YouTube `_ - `Steam `_ - `itch.io `_ -- `linkin.bio `_ +- `Links `_ Language-based communities -------------------------- diff --git a/conf.py b/conf.py index 82e4c88e1b22..49616ce43b2e 100644 --- a/conf.py +++ b/conf.py @@ -18,6 +18,7 @@ "notfound.extension", "sphinxext.opengraph", "sphinx_copybutton", + "sphinxcontrib.video", ] # Warning when the Sphinx Tabs extension is used with unknown @@ -317,3 +318,6 @@ def godot_get_image_filename_for_language(filename, env): image_locale="-" if language == "en" else language, target_locale="" if language == "en" else "/" + language, ) + +# Needed so the table of contents is created for EPUB +epub_tocscope = 'includehidden' diff --git a/contributing/development/compiling/compiling_for_linuxbsd.rst b/contributing/development/compiling/compiling_for_linuxbsd.rst index c87c29849797..f5f5b50a242c 100644 --- a/contributing/development/compiling/compiling_for_linuxbsd.rst +++ b/contributing/development/compiling/compiling_for_linuxbsd.rst @@ -266,14 +266,15 @@ Manager. would not build. For RISC-V architecture devices, use the Clang compiler instead of the GCC compiler. -.. note:: If you are compiling Godot for production use, then you can - make the final executable smaller and faster by adding the - SCons options ``target=template_release production=yes``. - - If you are compiling Godot with GCC, you can make the binary - even smaller and faster by adding the SCons option ``lto=full``. - As link-time optimization is a memory-intensive process, - this will require about 7 GB of available RAM while compiling. +.. tip:: If you are compiling Godot for production use, you can + make the final executable smaller and faster by adding the + SCons option ``production=yes``. This enables additional compiler + optimizations and link-time optimization. + + LTO takes some time to run and requires about 7 GB of available RAM + while compiling. If you're running out of memory with the above option, + use ``production=yes lto=none`` or ``production=yes lto=thin`` for a + lightweight but less effective form of LTO. .. note:: If you want to use separate editor settings for your own Godot builds and official releases, you can enable diff --git a/contributing/development/compiling/compiling_for_windows.rst b/contributing/development/compiling/compiling_for_windows.rst index de487eee53f8..c8200e128193 100644 --- a/contributing/development/compiling/compiling_for_windows.rst +++ b/contributing/development/compiling/compiling_for_windows.rst @@ -17,8 +17,9 @@ For compiling under Windows, the following is required: - `Visual Studio Community `_, version 2019 or later. Visual Studio 2022 is recommended. - **Make sure to read "Installing Visual Studio caveats" below or you - will have to run/download the installer again.** + **Make sure to enable C++ in the list of workflows to install.** + If you've already installed Visual Studio without C++ support, run the installer + again; it should present you a **Modify** button. - `MinGW-w64 `_ with GCC can be used as an alternative to Visual Studio. Be sure to install/configure it to use the ``posix`` thread model. **Important:** When using MinGW to compile the ``master`` branch, you need GCC 9 or later. @@ -76,20 +77,6 @@ SCons version is too old. Update it to the latest version with .. _doc_compiling_for_windows_install_vs: -Installing Visual Studio caveats --------------------------------- - -If installing Visual Studio 2017 or 2019, make sure to enable **C++** in -the list of workflows to install. - -If installing Visual Studio 2015, make sure to run a **Custom** -installation instead of **Typical** and select **C++** as a language there. - -If you've already made the mistake of installing Visual Studio without -C++ support, run the installer again; it should present you a **Modify** button. -Running the installer from *Add/Remove Programs* will only give you -a **Repair** option, which won't let you install C++ tools. - Downloading Godot's source -------------------------- @@ -159,14 +146,15 @@ your CPU architecture, but this can be overridden using ``arch=x86_64`` or This executable file contains the whole engine and runs without any dependencies. Running it will bring up the Project Manager. -.. note:: If you are compiling Godot for production use, then you can - make the final executable smaller and faster by adding the - SCons option ``target=template_release``. +.. tip:: If you are compiling Godot for production use, you can + make the final executable smaller and faster by adding the + SCons option ``production=yes``. This enables additional compiler + optimizations and link-time optimization. - If you are compiling Godot with MinGW, you can make the binary - even smaller and faster by adding the SCons option ``lto=full``. - As link-time optimization is a memory-intensive process, - this will require about 7 GB of available RAM while compiling. + LTO takes some time to run and requires about 7 GB of available RAM + while compiling. If you're running out of memory with the above option, + use ``production=yes lto=none`` or ``production=yes lto=thin`` for a + lightweight but less effective form of LTO. .. note:: If you want to use separate editor settings for your own Godot builds and official releases, you can enable @@ -203,7 +191,7 @@ To compile Godot with Direct3D 12 support you need at least the following: ./update_mesa.sh scons - If you are buildng with MinGW, add ``use_mingw=yes`` to the ``scons`` + If you are building with MinGW, add ``use_mingw=yes`` to the ``scons`` command, you can also specify build architecture using ``arch={architecture}``. Mesa static library should be built using the same compiler you are diff --git a/contributing/development/compiling/introduction_to_the_buildsystem.rst b/contributing/development/compiling/introduction_to_the_buildsystem.rst index 08cb8c5e2f26..9fdeddccf69a 100644 --- a/contributing/development/compiling/introduction_to_the_buildsystem.rst +++ b/contributing/development/compiling/introduction_to_the_buildsystem.rst @@ -397,7 +397,7 @@ For the folders accelerated by this option, multiple ``.cpp`` files are compiled in each translation unit, so headers can be shared between multiple files, which can dramatically decrease build times. -To make a SCU build, use the ``scu_build=yes`` SCons option. +To peform an SCU build, use the ``scu_build=yes`` SCons option. .. note:: When developing a Pull Request using SCU builds, be sure to make a regular build prior to submitting the PR. This is because SCU builds diff --git a/contributing/development/configuring_an_ide/img/vscode_edit_configurations.webp b/contributing/development/configuring_an_ide/img/vscode_edit_configurations.webp new file mode 100644 index 000000000000..ba64ba19970b Binary files /dev/null and b/contributing/development/configuring_an_ide/img/vscode_edit_configurations.webp differ diff --git a/contributing/development/configuring_an_ide/visual_studio_code.rst b/contributing/development/configuring_an_ide/visual_studio_code.rst index 349592316dc5..f3c58214df1e 100644 --- a/contributing/development/configuring_an_ide/visual_studio_code.rst +++ b/contributing/development/configuring_an_ide/visual_studio_code.rst @@ -156,6 +156,60 @@ The name under ``program`` depends on your build configuration, e.g. ``godot.linuxbsd.editor.dev.x86_64`` for 64-bit LinuxBSD platform with ``platform=editor`` and ``dev_build=yes``. +Configuring Intellisense +------------------------ + +For the C/C++ extension: + +To fix include errors you may be having, you need to configure some settings in the ``c_cpp_properties.json`` file. + +- First, make sure to build the project since some files need to be generated. + +- Edit the C/C++ Configuration file either with the UI or with text: + +.. figure:: img/vscode_edit_configurations.webp + :align: center + +- Add an include path for your platform, for example, ``${workspaceFolder}/platform/windows``. + +- Add defines for the editor ``TOOLS_ENABLED``, debug builds ``DEBUG_ENABLED``, and tests ``TESTS_ENABLED``. + +- Make sure the compiler path is configured correctly to the compiler you are using. See :ref:`doc_introduction_to_the_buildsystem` for further information on your platform. + +- The ``c_cpp_properties.json`` file should look similar to this for Windows: + + .. code-block:: js + + { + "configurations": [ + { + "name": "Win32", + "includePath": [ + "${workspaceFolder}/**", + "${workspaceFolder}/platform/windows" + ], + "defines": [ + "_DEBUG", + "UNICODE", + "_UNICODE", + "TOOLS_ENABLED", + "DEBUG_ENABLED", + "TESTS_ENABLED" + ], + "windowsSdkVersion": "10.0.22621.0", + "compilerPath": "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe", + "cStandard": "c17", + "cppStandard": "c++17", + "intelliSenseMode": "windows-msvc-x64" + } + ], + "version": 4 + } + +- Alternatively, you can use the scons argument ``compiledb=yes`` and set the compile commands setting ``compileCommands`` to ``compile_commands.json``, found in the advanced section of the C/C++ Configuration UI. + + - This argument can be added to your build task in ``tasks.json`` since it will need to be run whenever files are added or moved. + If you run into any issues, ask for help in one of `Godot's community channels `__. diff --git a/contributing/development/core_and_modules/binding_to_external_libraries.rst b/contributing/development/core_and_modules/binding_to_external_libraries.rst index a92b3a063bc8..b8bc8c40afe7 100644 --- a/contributing/development/core_and_modules/binding_to_external_libraries.rst +++ b/contributing/development/core_and_modules/binding_to_external_libraries.rst @@ -109,7 +109,7 @@ These files should contain the following: // Nothing to do here in this example. } -Next, you need to create a ``SCsub`` file so the build system compiles +Next, you need to create an ``SCsub`` file so the build system compiles this module: .. code-block:: python diff --git a/contributing/development/core_and_modules/custom_modules_in_cpp.rst b/contributing/development/core_and_modules/custom_modules_in_cpp.rst index bce51bee4686..28ada3372525 100644 --- a/contributing/development/core_and_modules/custom_modules_in_cpp.rst +++ b/contributing/development/core_and_modules/custom_modules_in_cpp.rst @@ -148,7 +148,7 @@ These files should contain the following: // Nothing to do here in this example. } -Next, we need to create a ``SCsub`` file so the build system compiles +Next, we need to create an ``SCsub`` file so the build system compiles this module: .. code-block:: python diff --git a/contributing/development/core_and_modules/internal_rendering_architecture.rst b/contributing/development/core_and_modules/internal_rendering_architecture.rst index d5747a68dab6..03dfc9dc82de 100644 --- a/contributing/development/core_and_modules/internal_rendering_architecture.rst +++ b/contributing/development/core_and_modules/internal_rendering_architecture.rst @@ -72,7 +72,7 @@ pass. The first important change in the mobile renderer is that the mobile renderer does not use the RGBA16F texture formats that the desktop renderer does. -Instead, it is using a R10G10B10A2 UNORM texture format. This halves the bandwidth +Instead, it is using an R10G10B10A2 UNORM texture format. This halves the bandwidth required and has further improvements as mobile hardware often further optimizes for 32-bit formats. The tradeoff is that the mobile renderer has limited HDR capabilities due to the reduced precision and maximum values in the color data. @@ -421,7 +421,7 @@ begins. Godot's 2D drawing methods such as the Line2D node or some CanvasItem strips and vertex colors, which don't require MSAA to work. A 2D signed distance field representing LightOccluder2D nodes in the viewport is -automatically generated if an user shader requests it. This can be used for +automatically generated if a user shader requests it. This can be used for various effects in custom shaders, such as 2D global illumination. It is also used to calculate particle collisions in 2D. diff --git a/contributing/development/core_and_modules/unit_testing.rst b/contributing/development/core_and_modules/unit_testing.rst index db276d4c27c8..b6de4085ff75 100644 --- a/contributing/development/core_and_modules/unit_testing.rst +++ b/contributing/development/core_and_modules/unit_testing.rst @@ -202,7 +202,7 @@ macros which allow to log test output in a format written by doctest. +----------------+-----------------------------------------------------------------------------------------------------------+ Different reporters can be chosen at run-time. For instance, here's how the -output can be redirected to a XML file: +output can be redirected to an XML file: .. code-block:: shell diff --git a/contributing/development/file_formats/tscn.rst b/contributing/development/file_formats/tscn.rst index 1b53c55cacfd..d5e4871a5575 100644 --- a/contributing/development/file_formats/tscn.rst +++ b/contributing/development/file_formats/tscn.rst @@ -54,7 +54,7 @@ If the file has no resources, ``load_steps`` is omitted. The engine will still load the file correctly if ``load_steps`` is incorrect, but this will affect loading bars and any other piece of code relying on that value. -``uid`` is an unique string-based identifier representing the scene. This is +``uid`` is a unique string-based identifier representing the scene. This is used by the engine to track files that are moved around, even while the editor is closed. Scripts can also load UID-based resources using the ``uid://`` path prefix to avoid relying on filesystem paths. This makes it possible to move @@ -279,8 +279,8 @@ External resources ~~~~~~~~~~~~~~~~~~ External resources are links to resources not contained within the TSCN file -itself. An external resource consists of a path, a type, an UID (used to map its -filesystem location to an unique identifier) and an ID (used to refer to the +itself. An external resource consists of a path, a type, a UID (used to map its +filesystem location to a unique identifier) and an ID (used to refer to the resource in the scene file). Godot always generates absolute paths relative to the resource directory and diff --git a/contributing/documentation/docs_image_guidelines.rst b/contributing/documentation/docs_image_guidelines.rst index 36002f8fff89..7ff36660b8ee 100644 --- a/contributing/documentation/docs_image_guidelines.rst +++ b/contributing/documentation/docs_image_guidelines.rst @@ -1,16 +1,19 @@ .. _docs_image_guidelines: -Creating documentation images -============================= +Creating documentation images and videos +======================================== -Throughout documentation images are often needed to make the explanation +Throughout the documentation, images are often needed to make the explanation of a feature or concept as clear as possible for a reader. This page will explain the process from beginning to end. +Images +------ + Capturing an image ------------------- +^^^^^^^^^^^^^^^^^^ -To take a picture of something in Godot a screen capture tool can be used. +To take a picture of something in Godot, a screen capture tool can be used. On Windows 10 and 11 that would be the Snip & Sketch program. Pressing :kbd:`Windows + Shift + S` lets you take a screenshot @@ -34,7 +37,7 @@ resolution screen the screenshot should be scaled down. There are instructions on how to do this later on this page. Format conversion ------------------ +^^^^^^^^^^^^^^^^^ The current format for images in Godot's documentation is WebP (``.webp``). While some Linux programs will support saving screenshots in this format, macOS @@ -43,7 +46,7 @@ editing, such as precise cropping or adding outlines, Squoosh can be used. `Squoosh `_ is a converter developed by Google, is open source, and doesn't give Google any image rights by using it. When choosing compression if you can get an image that's under 300KB in size use lossless -compression. If it's over 300KB use just enough lossy compression to get it +compression. If it's over 300KB, use just enough lossy compression to get it under that size. If this results in noticable compression artifacts using less compression is fine, even if the file size is bigger. @@ -51,9 +54,9 @@ If you already have an image editor such as GIMP, Krita or Photoshop installed it may have the ability to open an image then save it as a WebP file. Cropping --------- +^^^^^^^^ -For a screenshot of a 2D or 3D scene in the editor the above steps will be enough. +For a screenshot of a 2D or 3D scene in the editor, the above steps will be enough. But for most UI images some extra work should be done, specifically cropping to make an image look clean. Below is an example of good cropping. @@ -86,7 +89,7 @@ Krita and can be adjusted. Click on the image with your cropping tool still sele and the controls will return. Scaling down an image ---------------------- +^^^^^^^^^^^^^^^^^^^^^ As explained earlier on this page, all images taken on a screen that is a higher resolution than 1080p should be scaled down. To do this in Krita click on **Image** on the top bar, and @@ -98,7 +101,7 @@ sure the **Constrain Proportions** box at the bottom of the menu is checked so y to change 1 value. Saving as WebP in Krita ------------------------ +^^^^^^^^^^^^^^^^^^^^^^^ To save an image as webp if it isn't already one, Go to **File > Save As**. Select **webp** from the **Save as type:** dropdown, then choose wherever you want to save it. After clicking **Save** a menu @@ -110,8 +113,8 @@ If it's still over 300KB change to lossy compression and slowly increase the com 300KB. If this results in noticable compression artifacts using less compression is fine, even if the file size is bigger. -Outlines arrows and text ------------------------- +Outlines, arrows and text +^^^^^^^^^^^^^^^^^^^^^^^^^ Sometimes an image needs something extra to properly direct the readers attention, or make something clear. Outlines and arrows can be used @@ -136,7 +139,7 @@ be used if appropriate. For example, if yellow blends into the image, or if ther multiple outlines in multiple colors. Adding an image to a documentation page ---------------------------------------- +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Once you've finished working on your image, it can be added to the documentation. All images are stored in folders named ``img`` next to the page they are used in. @@ -150,3 +153,93 @@ images should be included with the following code snippet:: Where ``documentation_image.webp`` would be changed to the name of the image you created. Name your images in a way that makes their meaning clear, possibly with a prefix that makes their relationship to a documentation page explicit. + +Videos +------ + +Capturing a video +^^^^^^^^^^^^^^^^^ + +To record a video of something in Godot, a screen capture tool can be used. +Operating systems generally don't come with tools that are flexible enough +for this, so you'll need to install a third-party utility. + +`OBS Studio `__ is the most popular option, but +`SimpleScreenRecorder `__ +can be used as an alternative on Linux. `ShareX `__ +can be used as an alternative on Windows. All these tools can be configured +to record the entire screen, a specific window or a predetermined rectangle. + +The recommended framerate for video recordings is 60 FPS, although you can use +30 FPS for longer videos to reduce their file size. For fullscreen videos, +use a resolution of 1280×720. + +.. note:: + + Godot's :ref:`Movie Maker mode ` can be used to record + the output of a running project, including its audio. This doesn't require + installing any third-party software and avoids any frame drops (even when + recording on a slow device), but it's less flexible. + +Compressing the captured video +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The recommendation is to record your video in the highest quality possible +(without dropping frames due to excessive CPU/GPU utilization), then re-encode +it later to reduce its file size. This results in more efficient compression +than directly aiming for a small file size, as real-time compression methods are +less efficient than slower compression methods. + +To re-encode videos for a smaller file size, use `HandBrake `__ +or the `FFmpeg ` command line below: + +:: + + ffmpeg -i input.mp4 -crf 23 output.webm + +The number after ``-crf`` adjusts the video quality, with higher numbers +resulting in *lower* quality (and smaller file sizes). A CRF of ``23`` is a good +starting point, but you may need to use a higher value for longer videos to +ensure the file size remains reasonable. Try to aim for a file size under 2 MB +if possible. + +If the video was recorded in a higher resolution or framerate, you can adjust +its output resolution and framerate as follows: + +:: + + ffmpeg -i input.mp4 -crf 23 -vf scale=1280:-2 -r 30 output.webm + +This results in a video resolution around 1280×720 at 30 FPS. The exact +video resolution will vary depending on the source's aspect ratio. + +.. tip:: + + If the video was recorded with an audio track but this audio track is not + necessary, consider stripping it by adding the ``-an`` option to the FFmpeg + command line (before the output file name). This will reduce file size and + also ensure audio controls don't show up on the video when played in a + browser. + +Adding a video to a documentation page +-------------------------------------- + +Once you've finished working on your video, it can be added to the documentation. +All videos are stored in folders named ``video`` next to the page they are used in. + +To add your video, add it to the ``video`` folder that's in the same folder as the +``.rst`` file for the page (create it if it doesn't exist). In the ``.rst`` page, +videos should be included with the following code snippet:: + + .. video:: video/csg_tools.webm + :alt: Put a text description of the video here + :autoplay: + :loop: + :muted: + +Where ``documentation_video.webp`` would be changed to the name of the video you +created. Name your videos in a way that makes their meaning clear, possibly with +a prefix that makes their relationship to a documentation page explicit. + +The ``:autoplay:``, ``:loop:`` and ``:muted:`` flags should always be specified +unless the video needs to play audio. In this case, do not specify *any* of these flags. diff --git a/getting_started/first_2d_game/06.heads_up_display.rst b/getting_started/first_2d_game/06.heads_up_display.rst index 35ce6bd6cca0..abda7b816a69 100644 --- a/getting_started/first_2d_game/06.heads_up_display.rst +++ b/getting_started/first_2d_game/06.heads_up_display.rst @@ -185,7 +185,7 @@ Add the code below to ``HUD`` to update the score } Connect the ``pressed()`` signal of ``StartButton`` and the ``timeout()`` -signal of ``MessageTimer``, and add the following code to the new functions: +signal of ``MessageTimer`` to the ``HUD`` node, and add the following code to the new functions: .. tabs:: .. code-tab:: gdscript GDScript diff --git a/getting_started/first_2d_game/07.finishing-up.rst b/getting_started/first_2d_game/07.finishing-up.rst index dfcad97d2959..8ca8d5fd7a8e 100644 --- a/getting_started/first_2d_game/07.finishing-up.rst +++ b/getting_started/first_2d_game/07.finishing-up.rst @@ -18,7 +18,7 @@ the first node under ``Main`` so that it will be drawn behind the other nodes. select "Layout" -> "Anchors Preset" -> "Full Rect" either in the toolbar at the top of the viewport or in the inspector so that it covers the screen. You could also add a background image, if you have one, by using a -``TextureRect`` node instead. +:ref:`TextureRect ` node instead. Sound effects ~~~~~~~~~~~~~ diff --git a/getting_started/first_2d_game/img/input-mapping-event-configuration.webp b/getting_started/first_2d_game/img/input-mapping-event-configuration.webp index f1cf7692d2a9..fe61bb00e7e1 100644 Binary files a/getting_started/first_2d_game/img/input-mapping-event-configuration.webp and b/getting_started/first_2d_game/img/input-mapping-event-configuration.webp differ diff --git a/getting_started/first_3d_game/going_further.rst b/getting_started/first_3d_game/going_further.rst index 5138f213e191..8f645f02ec7e 100644 --- a/getting_started/first_3d_game/going_further.rst +++ b/getting_started/first_3d_game/going_further.rst @@ -17,7 +17,7 @@ Where should you begin? Below, you'll find a few pages to start exploring and build upon what you've learned so far. But before that, here's a link to download a completed version of the project: -``_. +``_. Exploring the manual -------------------- diff --git a/getting_started/introduction/godot_design_philosophy.rst b/getting_started/introduction/godot_design_philosophy.rst index c7845d5f87df..df307079ad20 100644 --- a/getting_started/introduction/godot_design_philosophy.rst +++ b/getting_started/introduction/godot_design_philosophy.rst @@ -132,7 +132,7 @@ that drive the core updates. New features from the core developers often focus on what will benefit the most users first. That said, although a handful of core developers work on it full-time, -the project has over 600 contributors at the time of writing. Benevolent +the project has thousands of contributors at the time of writing. Benevolent programmers work on features they may need themselves, so you'll see improvements in all corners of the engine at the same time in every major release. diff --git a/getting_started/introduction/learning_new_features.rst b/getting_started/introduction/learning_new_features.rst index cd458f2a680d..b6802b6b186f 100644 --- a/getting_started/introduction/learning_new_features.rst +++ b/getting_started/introduction/learning_new_features.rst @@ -56,7 +56,7 @@ A class reference's page tells you: `_ GitHub repository to report it. -You can Ctrl-click any underlined text like the name of a class, property, +You can Ctrl-click (Cmd-click on MacOS) any underlined text like the name of a class, property, method, signal, or constant to jump to it. Learning to think like a programmer diff --git a/getting_started/step_by_step/instancing.rst b/getting_started/step_by_step/instancing.rst index 6cd8567126b7..91bfcba84ab6 100644 --- a/getting_started/step_by_step/instancing.rst +++ b/getting_started/step_by_step/instancing.rst @@ -20,7 +20,7 @@ and bounce on walls, a :ref:`Sprite2D ` node, and a .. image:: img/instancing_ball_scene.webp -Once you saved a scene, it works as a blueprint: you can reproduce it in other +Once you have saved a scene, it works as a blueprint: you can reproduce it in other scenes as many times as you'd like. Replicating an object from a template like this is called **instancing**. diff --git a/getting_started/step_by_step/nodes_and_scenes.rst b/getting_started/step_by_step/nodes_and_scenes.rst index 8153c2679bca..87703aa18a46 100644 --- a/getting_started/step_by_step/nodes_and_scenes.rst +++ b/getting_started/step_by_step/nodes_and_scenes.rst @@ -58,7 +58,7 @@ you or a player runs the game. On top of acting like nodes, scenes have the following characteristics: -1. They always have one root node, like the "Character" in our example. +1. They always have one root node, like the "Player" in our example. 2. You can save them to your local drive and load them later. 3. You can create as many instances of a scene as you'd like. You could have five or ten characters in your game, created from your Character scene. diff --git a/getting_started/step_by_step/scripting_first_script.rst b/getting_started/step_by_step/scripting_first_script.rst index fb9b2f0fee07..66e2129990ca 100644 --- a/getting_started/step_by_step/scripting_first_script.rst +++ b/getting_started/step_by_step/scripting_first_script.rst @@ -245,7 +245,7 @@ our sprite's rotation every frame. Here, ``rotation`` is a property inherited from the class ``Node2D``, which ``Sprite2D`` extends. It controls the rotation of our node and works with radians. -.. tip:: In the code editor, you can ctrl-click on any built-in property or +.. tip:: In the code editor, you can Ctrl-click (Cmd-click on MacOS) on any built-in property or function like ``position``, ``rotation``, or ``_process`` to open the corresponding documentation in a new tab. diff --git a/getting_started/step_by_step/signals.rst b/getting_started/step_by_step/signals.rst index c2bb15f792b7..e3086e27346d 100644 --- a/getting_started/step_by_step/signals.rst +++ b/getting_started/step_by_step/signals.rst @@ -139,6 +139,12 @@ methods "_on_node_name_signal_name". Here, it'll be "_on_button_pressed". toggle the mode in the window's bottom-right by clicking the Advanced button. +.. note:: + + If you are using an external editor (such as VS Code) this + automatic code generation might not work. In this case you need to to connect + the signal via code as explained in the next section. + Click the Connect button to complete the signal connection and jump to the Script workspace. You should see the new method with a connection icon in the left margin. diff --git a/requirements.txt b/requirements.txt index 1476ab73234b..bc435feb3169 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,3 +26,6 @@ sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 sphinxcontrib-devhelp==1.0.2 + +# `.. video::` directive support to embed videos in documentation pages. +sphinxcontrib-video==0.2.1rc0 diff --git a/tutorials/3d/3d_text.rst b/tutorials/3d/3d_text.rst index ccb2c6d28cf1..99e8902d3cd3 100644 --- a/tutorials/3d/3d_text.rst +++ b/tutorials/3d/3d_text.rst @@ -45,7 +45,7 @@ Advantages - Label3D can use bitmap fonts and dynamic fonts (with and without :abbr:`MSDF (Multi-channel Signed Distance Font)` or mipmaps). This makes it more flexible on that aspect compared to TextMesh, especially for rendering - fonts with self-intersecting outlines. + fonts with self-intersecting outlines or colored fonts (emoji). .. seealso:: @@ -70,6 +70,10 @@ cast shadows, but some transparency sorting issues will remain. See :ref:`Transparency sorting ` section in the 3D rendering limitations page for more information. +Text rendering quality can also suffer when the Label3D is viewed at a distance. To improve +text rendering quality, :ref:`enable mipmaps on the font ` or +:ref:`switch the font to use MSDF rendering `. + TextMesh -------- @@ -111,6 +115,10 @@ There are some limitations to TextMesh: If you notice rendering issues on fonts downloaded from websites such as Google Fonts, try downloading the font from the font author's official website instead. +- Antialiasing the text rendering requires a full-scene antialiasing method to + be enabled such as MSAA, FXAA and temporal antialiasing (TAA). If no + antialiasing method is enabled, text will appear grainy, especially at a + distance. See :ref:`doc_3d_antialiasing` for more information. Projected Label node (or any other Control) ------------------------------------------- diff --git a/tutorials/3d/csg_tools.rst b/tutorials/3d/csg_tools.rst index d9e416af9839..90881b1c5b66 100644 --- a/tutorials/3d/csg_tools.rst +++ b/tutorials/3d/csg_tools.rst @@ -25,7 +25,11 @@ Interior environments can be created by using inverted primitives. `TrenchBroom `__ and import them in Godot. -.. image:: img/csg.gif +.. video:: video/csg_tools.webm + :alt: CSG being used to subtract a torus shape from a box + :autoplay: + :loop: + :muted: .. seealso:: diff --git a/tutorials/3d/global_illumination/using_lightmap_gi.rst b/tutorials/3d/global_illumination/using_lightmap_gi.rst index 4ba1a2d2d052..15fc5c1277c1 100644 --- a/tutorials/3d/global_illumination/using_lightmap_gi.rst +++ b/tutorials/3d/global_illumination/using_lightmap_gi.rst @@ -78,7 +78,7 @@ Setting up ---------- First of all, before the lightmapper can do anything, the objects to be baked need -an UV2 layer and a texture size. An UV2 layer is a set of secondary texture coordinates +a UV2 layer and a texture size. A UV2 layer is a set of secondary texture coordinates that ensures any face in the object has its own place in the UV map. Faces must not share pixels in the texture. diff --git a/tutorials/3d/img/csg.gif b/tutorials/3d/img/csg.gif deleted file mode 100644 index 26e073effa3f..000000000000 Binary files a/tutorials/3d/img/csg.gif and /dev/null differ diff --git a/tutorials/3d/img/decals_sorting_offset.webp b/tutorials/3d/img/decals_sorting_offset.webp new file mode 100644 index 000000000000..e665913f571c Binary files /dev/null and b/tutorials/3d/img/decals_sorting_offset.webp differ diff --git a/tutorials/3d/img/spatial_material2.png b/tutorials/3d/img/spatial_material2.png deleted file mode 100644 index 160958767f64..000000000000 Binary files a/tutorials/3d/img/spatial_material2.png and /dev/null differ diff --git a/tutorials/3d/img/spatial_material6.png b/tutorials/3d/img/spatial_material6.png deleted file mode 100644 index 8d87cd2dce5e..000000000000 Binary files a/tutorials/3d/img/spatial_material6.png and /dev/null differ diff --git a/tutorials/3d/img/spatial_material6.webp b/tutorials/3d/img/spatial_material6.webp new file mode 100644 index 000000000000..b7a5dc0ccdd2 Binary files /dev/null and b/tutorials/3d/img/spatial_material6.webp differ diff --git a/tutorials/3d/img/standart_material_distance_fade_object_dither_mode.webp b/tutorials/3d/img/standart_material_distance_fade_object_dither_mode.webp new file mode 100644 index 000000000000..814b3725cf8a Binary files /dev/null and b/tutorials/3d/img/standart_material_distance_fade_object_dither_mode.webp differ diff --git a/tutorials/3d/img/standart_material_distance_fade_pixel_alpha_mode.webp b/tutorials/3d/img/standart_material_distance_fade_pixel_alpha_mode.webp new file mode 100644 index 000000000000..04b0939386a7 Binary files /dev/null and b/tutorials/3d/img/standart_material_distance_fade_pixel_alpha_mode.webp differ diff --git a/tutorials/3d/img/standart_material_distance_fade_pixel_dither_mode.webp b/tutorials/3d/img/standart_material_distance_fade_pixel_dither_mode.webp new file mode 100644 index 000000000000..d175d5415306 Binary files /dev/null and b/tutorials/3d/img/standart_material_distance_fade_pixel_dither_mode.webp differ diff --git a/tutorials/3d/introduction_to_3d.rst b/tutorials/3d/introduction_to_3d.rst index 943ce63b1f5f..a314805dbaf6 100644 --- a/tutorials/3d/introduction_to_3d.rst +++ b/tutorials/3d/introduction_to_3d.rst @@ -28,7 +28,7 @@ node for everything 3D. Node3Ds have a local transform, which is relative to the parent node (as long as the parent node is also of **or inherits from** the type -Node3D). This transform can be accessed as a 4×3 +Node3D). This transform can be accessed as a 3×4 :ref:`Transform3D `, or as 3 :ref:`Vector3 ` members representing location, Euler rotation (X, Y and Z angles) and scale. diff --git a/tutorials/3d/standard_material_3d.rst b/tutorials/3d/standard_material_3d.rst index b07d2cbd4772..dbd5892c63a7 100644 --- a/tutorials/3d/standard_material_3d.rst +++ b/tutorials/3d/standard_material_3d.rst @@ -244,46 +244,49 @@ Shading Shading mode ~~~~~~~~~~~~ -Godot has a more or less uniform cost per pixel thanks to depth pre-pass. All -lighting calculations are made by running the lighting shader on every pixel. +Godot has a more or less uniform cost per pixel thanks to the depth pre-pass. +All lighting calculations are made by running the lighting shader on every +pixel. As these calculations are costly, performance can be brought down considerably in some corner cases such as drawing several layers of transparency (which is -common in particle systems). Switching to per-vertex lighting may help in these -cases. +common in particle systems). Switching to the **Unshaded** shading mode may help improve +performance in these cases, especially when the camera is close to particles. -Additionally, on low-end or mobile devices, switching to vertex lighting +Additionally, on low-end or mobile devices, switching to unshaded rendering can considerably increase rendering performance. -.. image:: img/spatial_material2.png +.. image:: img/spatial_material26.png + +Keep in mind that when unshaded rendering is enabled, lights will not affect the +material at all. -Keep in mind that when vertex lighting is enabled, only directional lighting -can produce shadows (for performance reasons). +.. note:: -However, in some cases you might want to show just the albedo (color) and -ignore the rest. To do this you can set the shading mode to unshaded + **Per-Vertex** shading is listed as an option in the shading mode property. + However, per-vertex shading is currently unimplemented and will act + identical to per-pixel shading. -.. image:: img/spatial_material26.png + Support for per-vertex shading is planned to be reimplemented in a future + Godot release. Diffuse Mode ~~~~~~~~~~~~ Specifies the algorithm used by diffuse scattering of light when hitting -the object. The default is *Burley*. Other modes are also available: +the object. The default is **Burley**. Other modes are also available: * **Burley:** Default mode, the original Disney Principled PBS diffuse algorithm. * **Lambert:** Is not affected by roughness. * **Lambert Wrap:** Extends Lambert to cover more than 90 degrees when roughness increases. Works great for hair and simulating cheap subsurface scattering. This implementation is energy conserving. -* **Oren Nayar:** This implementation aims to take microsurfacing into account - (via roughness). Works well for clay-like materials and some types of cloth. * **Toon:** Provides a hard cut for lighting, with smoothing affected by roughness. It is recommended you disable sky contribution from your environment's ambient light settings or disable ambient light in the StandardMaterial3D to achieve a better effect. -.. image:: img/spatial_material6.png +.. image:: img/spatial_material6.webp Specular Mode ~~~~~~~~~~~~~ @@ -701,9 +704,28 @@ Keep in mind enabling proximity fade or distance fade with **Pixel Alpha** mode enables alpha blending. Alpha blending is more GPU-intensive and can cause transparency sorting issues. Alpha blending also disables many material features such as the ability to cast shadows. -To hide a character when they get too close to the camera, consider using -**Pixel Dither** or better, **Object Dither** (which is even faster than -**Pixel Dither**). + +.. note:: + + To hide a character when they get too close to the camera, consider using + **Pixel Dither** or better, **Object Dither** (which is even faster than + **Pixel Dither**). + +**Pixel Alpha** mode: The actual transparency of a pixel of the object changes +with distance to the camera. This is the most effect, but forces the material +into the transparency pipeline (which leads, for example, to no shadows). + +.. image:: img/standart_material_distance_fade_pixel_alpha_mode.webp + +**Pixel Dither** mode: What this does is sort of approximate the transparency +by only having a fraction of the pixels rendered. + +.. image:: img/standart_material_distance_fade_pixel_dither_mode.webp + +**Object Dither** mode: Like the previous mode, but the calculated transparency +is the same across the entire object's surface. + +.. image:: img/standart_material_distance_fade_object_dither_mode.webp Material Settings ----------------- diff --git a/tutorials/3d/using_decals.rst b/tutorials/3d/using_decals.rst index 29c9bed97e40..9998865d5a52 100644 --- a/tutorials/3d/using_decals.rst +++ b/tutorials/3d/using_decals.rst @@ -192,6 +192,34 @@ Cull Mask so you can ensure that dynamic objects don't accidentally receive a Decal intended for the terrain under them. +Decal rendering order +--------------------- + +By default, decals are ordered based on the size of their :abbr:`AABB +(Axis-Aligned Bounding Box)` and the distance to the camera. AABBs that are +closer to the camera are rendered first, which means that decal rendering order +can sometimes appear to change depending on camera position if some decals are +positioned at the same location. + +To resolve this, you can adjust the **Sorting Offset** property in the +VisualInstance3D section of the Decal node inspector. This offset is not a +strict priority order, but a *guideline* that the renderer will use as the AABB +size still affects how decal sorting works. Therefore, higher values will +*always* result in the decal being drawn above other decals with a lower sorting +offset. + +If you want to ensure a decal is always rendered on top of other decals, +you need to set its **Sorting Offset** property to a positive value greater than +the AABB length of the largest decal that may overlap it. To make this decal +drawn behind other decals instead, set the **Sorting Offset** to the same +negative value. + +.. figure:: img/decals_sorting_offset.webp + :align: center + :alt: VisualInstance3D Sorting Offset comparison on Decals + + VisualInstance3D Sorting Offset comparison on Decals + Tweaking performance and quality -------------------------------- diff --git a/tutorials/3d/video/csg_tools.webm b/tutorials/3d/video/csg_tools.webm new file mode 100644 index 000000000000..4efb4bab0f6a Binary files /dev/null and b/tutorials/3d/video/csg_tools.webm differ diff --git a/tutorials/animation/animation_track_types.rst b/tutorials/animation/animation_track_types.rst index 80fad1b29fbb..9f9dca0bd5fe 100644 --- a/tutorials/animation/animation_track_types.rst +++ b/tutorials/animation/animation_track_types.rst @@ -74,6 +74,13 @@ editor, click the curve icon to the right of the animation track. In the editor, keys are represented by filled diamonds and the outlined diamonds connected to them by a line control curve's shape. +.. tip:: + + For better precision while manually working with curves, you might want to alter + the zoom levels of the editor. The slider on the bottom right of the editor can be used to + zoom in and out on the time axis, you can also do that with :kbd:`Ctrl + Shift + Mouse wheel`. + Using :kbd:`Ctrl + Alt + Mouse wheel` will zoom in and out on the Y axis + .. image:: img/bezier_curves.webp In the right click panel of the editor, you can select the handle mode: diff --git a/tutorials/animation/creating_movies.rst b/tutorials/animation/creating_movies.rst index e1b373623927..49885b4a5cca 100644 --- a/tutorials/animation/creating_movies.rst +++ b/tutorials/animation/creating_movies.rst @@ -359,7 +359,7 @@ others will require a conversion step beforehand. `HandBrake `__ (CLI) are popular open source tools for this purpose. FFmpeg has a steeper learning curve, but it's more powerful. -The command below converts an AVI video to a MP4 (H.264) video with a Constant +The command below converts an AVI video to an MP4 (H.264) video with a Constant Rate Factor (CRF) of 15. This results in a relatively large file, but is well-suited for platforms that will re-encode your videos to reduce their size (such as most video sharing websites): diff --git a/tutorials/animation/playing_videos.rst b/tutorials/animation/playing_videos.rst index 959d0464303b..9862d8e42825 100644 --- a/tutorials/animation/playing_videos.rst +++ b/tutorials/animation/playing_videos.rst @@ -185,7 +185,7 @@ of disk space. (GUI) and `FFmpeg `__ (CLI) are popular open source tools for this purpose. FFmpeg has a steeper learning curve, but it's more powerful. -Here are example FFmpeg commands to convert a MP4 video to Ogg Theora. Since +Here are example FFmpeg commands to convert an MP4 video to Ogg Theora. Since FFmpeg supports a lot of input formats, you should be able to use the commands below with almost any input video format (AVI, MOV, WebM, …). @@ -297,13 +297,13 @@ To implement the chroma key effect, follow these steps: COLOR = vec4(color.rgb, fade_factor); } -The shader uses the distance calculation to identify pixels close to the chroma key color and discards them, -effectively removing the selected color. Pixels that are slightly further away from the chroma key color are -faded based on the fade_factor, blending them smoothly with the surrounding colors. -This process creates the desired chroma key effect, making it appear as if the background has been replaced with +The shader uses the distance calculation to identify pixels close to the chroma key color and discards them, +effectively removing the selected color. Pixels that are slightly further away from the chroma key color are +faded based on the fade_factor, blending them smoothly with the surrounding colors. +This process creates the desired chroma key effect, making it appear as if the background has been replaced with another image or video. -The code above represents a simple demonstration of the Chroma Key shader, +The code above represents a simple demonstration of the Chroma Key shader, and users can customize it according to their specific requirements. UI Controls @@ -338,11 +338,11 @@ also make sure that the range of the sliders are appropriate, our settings are : Signal Handling ^^^^^^^^^^^^^^^^ -Connect the appropriate signal from the UI elements to the `Control` node's script. -you created in the `Control` node's script to control the chroma key effect. -These signal handlers will update the shader's uniform variables +Connect the appropriate signal from the UI elements to the `Control` node's script. +you created in the `Control` node's script to control the chroma key effect. +These signal handlers will update the shader's uniform variables in response to user input. -Save and run the scene to see the chroma key effect in action! With the provided UI controls, -you can now adjust the chroma key color, pickup range, and fade amount in real-time, achieving the desired +Save and run the scene to see the chroma key effect in action! With the provided UI controls, +you can now adjust the chroma key color, pickup range, and fade amount in real-time, achieving the desired chroma key functionality for your video content. diff --git a/tutorials/assets_pipeline/escn_exporter/material.rst b/tutorials/assets_pipeline/escn_exporter/material.rst index a423a6f63891..9e3ef90305b0 100644 --- a/tutorials/assets_pipeline/escn_exporter/material.rst +++ b/tutorials/assets_pipeline/escn_exporter/material.rst @@ -64,6 +64,6 @@ file when the ``escn`` file opens in Godot. .. image:: img/external_mat_option.jpg -``.material`` file can be assigned to any material slot to be a external resource. +``.material`` file can be assigned to any material slot to be an external resource. .. image:: img/gd_dot_material.jpg diff --git a/tutorials/assets_pipeline/escn_exporter/skeleton.rst b/tutorials/assets_pipeline/escn_exporter/skeleton.rst index ea4cb5177850..58eca4ec4aaa 100644 --- a/tutorials/assets_pipeline/escn_exporter/skeleton.rst +++ b/tutorials/assets_pipeline/escn_exporter/skeleton.rst @@ -21,9 +21,9 @@ that the skeleton is reset to its T-pose or default rest pose. Bone Weights ------------ -Blender put rigged mesh vertices which has no bone weights at its original +Blender puts rigged mesh vertices which have no bone weights at their original position, but these vertices would be placed at (0, 0, 0) in Godot, making the mesh -deformed. Therefore, the exporter would raise an error for any vertex with no bone weights +deformed. Therefore, the exporter will raise an error for any vertex with no bone weights detected in a rigged mesh. Non-Deform Bone diff --git a/tutorials/assets_pipeline/import_process.rst b/tutorials/assets_pipeline/import_process.rst index 5965f2493d22..21c492cac7af 100644 --- a/tutorials/assets_pipeline/import_process.rst +++ b/tutorials/assets_pipeline/import_process.rst @@ -115,6 +115,12 @@ select the relevant type of resource desired then click **Reimport**: .. image:: img/import_process_changing_import_type.webp +Select ``Keep File (exported as is)`` as resource type to skip file import, files +with this resource type will be preserved as is during project export. + +Select ``Skip File (not exported)`` as resource type to skip file import and ignore +file during project export. + Changing default import parameters ---------------------------------- diff --git a/tutorials/assets_pipeline/importing_3d_scenes/import_configuration.rst b/tutorials/assets_pipeline/importing_3d_scenes/import_configuration.rst index 941d2759c758..d2dddf32a239 100644 --- a/tutorials/assets_pipeline/importing_3d_scenes/import_configuration.rst +++ b/tutorials/assets_pipeline/importing_3d_scenes/import_configuration.rst @@ -225,7 +225,7 @@ These options are only visible if some of the above options are enabled: use cases. - **Occluder > Simplification Distance:** Only visible if **Generate > Occluder** is set to **Mesh + Occluder** or **Occluder Only**. Higher values - result in a occluder mesh with fewer vertices (resulting in decreased CPU + result in an occluder mesh with fewer vertices (resulting in decreased CPU utilization), at the cost of more occlusion culling issues (such as false positives or false negatives). If you run into objects disappearing when they shouldn't when the camera is near a certain mesh, try decreasing this value. diff --git a/tutorials/assets_pipeline/importing_audio_samples.rst b/tutorials/assets_pipeline/importing_audio_samples.rst index 6cfe0e51ca96..fff2e16a099d 100644 --- a/tutorials/assets_pipeline/importing_audio_samples.rst +++ b/tutorials/assets_pipeline/importing_audio_samples.rst @@ -17,7 +17,7 @@ Each format has different advantages: smaller file size, but require significantly more processing power to play back. - MP3 files use better compression than WAV with IMA-ADPCM, but worse than - Ogg Vorbis. This means that a MP3 file with roughly equal quality to + Ogg Vorbis. This means that an MP3 file with roughly equal quality to Ogg Vorbis will be significantly larger. On the bright side, MP3 requires less CPU usage to play back compared to Ogg Vorbis. @@ -71,13 +71,13 @@ the FileSystem dock: Import options in the Import dock after selecting a WAV file in the FileSystem dock -The set of options available after selecting a Ogg Vorbis or MP3 file is different: +The set of options available after selecting an Ogg Vorbis or MP3 file is different: .. figure:: img/importing_audio_samples_import_options_mp3.webp :align: center - :alt: Import options in the Import dock after selecting a MP3 file in the FileSystem dock + :alt: Import options in the Import dock after selecting an MP3 file in the FileSystem dock - Import options in the Import dock after selecting a MP3 file in the + Import options in the Import dock after selecting an MP3 file in the FileSystem dock. Options are identical for Ogg Vorbis files. After importing a sound, you can play it back using the AudioStreamPlayer, @@ -246,9 +246,9 @@ If you double-click an Ogg Vorbis or MP3 file in the FileSystem dock (or choose .. figure:: img/importing_audio_samples_advanced_import_settings.webp :align: center - :alt: Advanced dialog when double-clicking a Ogg Vorbis or MP3 file in the FileSystem dock + :alt: Advanced dialog when double-clicking an Ogg Vorbis or MP3 file in the FileSystem dock - Advanced dialog when double-clicking a Ogg Vorbis or MP3 file in the FileSystem dock + Advanced dialog when double-clicking an Ogg Vorbis or MP3 file in the FileSystem dock This dialog allows you to edit the audio's loop point with a real-time preview, in addition to the :abbr:`BPM (Beats Per Minute)`, beat count and bar beats. diff --git a/tutorials/assets_pipeline/importing_images.rst b/tutorials/assets_pipeline/importing_images.rst index b96b8b60cf7c..34934d7b0ca7 100644 --- a/tutorials/assets_pipeline/importing_images.rst +++ b/tutorials/assets_pipeline/importing_images.rst @@ -526,7 +526,7 @@ editing the original text afterwards: - Select your text object in Inkscape, then duplicate it in place by pressing :kbd:`Ctrl + D` and use **Path > Object to Path**. Hide the original text object afterwards using the **Layers and Objects** dock. -- Use the Inkscape command line to export a SVG from another SVG file with text +- Use the Inkscape command line to export an SVG from another SVG file with text converted to paths: :: diff --git a/tutorials/assets_pipeline/retargeting_3d_skeletons.rst b/tutorials/assets_pipeline/retargeting_3d_skeletons.rst index 59a19481ca09..5a44548da245 100644 --- a/tutorials/assets_pipeline/retargeting_3d_skeletons.rst +++ b/tutorials/assets_pipeline/retargeting_3d_skeletons.rst @@ -47,8 +47,8 @@ With the Skeleton node selected, first set up a new :ref:`class_bonemap` and :re Godot has a preset called :ref:`class_skeletonprofilehumanoid` for humanoid models. This tutorial proceeds with the assumption that you are using :ref:`class_skeletonprofilehumanoid`. -.. note:: If you need a profile for a model such as a beast or creature, you can export - a :ref:`class_skeletonprofile` from SkeletonEditor with some information converted from Skeleton. +.. note:: If you need a profile that is different from :ref:`class_skeletonprofilehumanoid`, you can export + a :ref:`class_skeletonprofile` from the editor by selecting a Skeleton3D and using the **Skeleton3D** menu in the 3D viewport's toolbar. When you use :ref:`class_skeletonprofilehumanoid`, auto-mapping will be performed when the :ref:`class_skeletonprofile` is set. If the auto-mapping does not work well, you can map bones manually. diff --git a/tutorials/best_practices/scene_organization.rst b/tutorials/best_practices/scene_organization.rst index d63859956ea1..749bf76ee0e9 100644 --- a/tutorials/best_practices/scene_organization.rst +++ b/tutorials/best_practices/scene_organization.rst @@ -65,7 +65,7 @@ initialize it: .. code-tab:: csharp // Parent - GetNode("Child").Connect("SignalName", ObjectWithMethod, "MethodOnTheObject"); + GetNode("Child").Connect("SignalName", Callable.From(ObjectWithMethod.MethodOnTheObject)); // Child EmitSignal("SignalName"); // Triggers parent-defined behavior. diff --git a/tutorials/editor/default_key_mapping.rst b/tutorials/editor/default_key_mapping.rst index 4cc511515169..70640c858999 100644 --- a/tutorials/editor/default_key_mapping.rst +++ b/tutorials/editor/default_key_mapping.rst @@ -454,37 +454,41 @@ Animation Track Editor Tile Map Editor --------------- -+-------------------+-----------------+-------------------+-------------------------------------+ -| Action name | Windows, Linux | macOS | Editor setting | -+===================+=================+===================+=====================================+ -| Find Tile | :kbd:`Ctrl + F` | :kbd:`Cmd + F` | ``tile_map_editor/find_tile`` | -+-------------------+-----------------+-------------------+-------------------------------------+ -| Pick Tile | :kbd:`I` | :kbd:`I` | ``tile_map_editor/pick_tile`` | -+-------------------+-----------------+-------------------+-------------------------------------+ -| Paint Tile | :kbd:`P` | :kbd:`P` | ``tile_map_editor/paint_tile`` | -+-------------------+-----------------+-------------------+-------------------------------------+ -| Bucket Fill | :kbd:`G` | :kbd:`G` | ``tile_map_editor/bucket_fill`` | -+-------------------+-----------------+-------------------+-------------------------------------+ -| Transpose | :kbd:`T` | :kbd:`T` | ``tile_map_editor/transpose`` | -+-------------------+-----------------+-------------------+-------------------------------------+ -| Flip Horizontally | :kbd:`X` | :kbd:`X` | ``tile_map_editor/flip_horizontal`` | -+-------------------+-----------------+-------------------+-------------------------------------+ -| Flip Vertically | :kbd:`Z` | :kbd:`Z` | ``tile_map_editor/flip_vertical`` | -+-------------------+-----------------+-------------------+-------------------------------------+ -| Rotate Left | :kbd:`A` | :kbd:`A` | ``tile_map_editor/rotate_left`` | -+-------------------+-----------------+-------------------+-------------------------------------+ -| Rotate Right | :kbd:`S` | :kbd:`S` | ``tile_map_editor/rotate_right`` | -+-------------------+-----------------+-------------------+-------------------------------------+ -| Clear Transform | :kbd:`W` | :kbd:`W` | ``tile_map_editor/clear_transform`` | -+-------------------+-----------------+-------------------+-------------------------------------+ -| Select | :kbd:`M` | :kbd:`M` | ``tile_map_editor/select`` | -+-------------------+-----------------+-------------------+-------------------------------------+ -| Cut Selection | :kbd:`Ctrl + X` | :kbd:`Cmd + X` | ``tile_map_editor/cut_selection`` | -+-------------------+-----------------+-------------------+-------------------------------------+ -| Copy Selection | :kbd:`Ctrl + C` | :kbd:`Cmd + C` | ``tile_map_editor/copy_selection`` | -+-------------------+-----------------+-------------------+-------------------------------------+ -| Erase Selection | :kbd:`Del` | :kbd:`Cmd + BkSp` | ``tile_map_editor/erase_selection`` | -+-------------------+-----------------+-------------------+-------------------------------------+ ++-------------------+-----------------+-------------------+---------------------------------------+ +| Action name | Windows, Linux | macOS | Editor setting | ++===================+=================+===================+=======================================+ +| Select | :kbd:`S` | :kbd:`S` | ``tiles_editor/selection_tool`` | ++-------------------+-----------------+-------------------+---------------------------------------+ +| Cut Selection | :kbd:`Ctrl + X` | :kbd:`Cmd + X` | ``tiles_editor/cut`` | ++-------------------+-----------------+-------------------+---------------------------------------+ +| Copy Selection | :kbd:`Ctrl + C` | :kbd:`Cmd + C` | ``tiles_editor/copy`` | ++-------------------+-----------------+-------------------+---------------------------------------+ +| Paste Selection | :kbd:`Ctrl + V` | :kbd:`Cmd + V` | ``tiles_editor/paste`` | ++-------------------+-----------------+-------------------+---------------------------------------+ +| Delete Selection | :kbd:`Del` | :kbd:`Cmd + BkSp` | ``tiles_editor/delete`` | ++-------------------+-----------------+-------------------+---------------------------------------+ +| Cancel | :kbd:`Esc` | :kbd:`Esc` | ``tiles_editor/cancel`` | ++-------------------+-----------------+-------------------+---------------------------------------+ +| Paint | :kbd:`D` | :kbd:`D` | ``tiles_editor/paint_tool`` | ++-------------------+-----------------+-------------------+---------------------------------------+ +| Line | :kbd:`L` | :kbd:`L` | ``tiles_editor/line_tool`` | ++-------------------+-----------------+-------------------+---------------------------------------+ +| Rect | :kbd:`R` | :kbd:`R` | ``tiles_editor/rect_tool`` | ++-------------------+-----------------+-------------------+---------------------------------------+ +| Bucket | :kbd:`B` | :kbd:`B` | ``tiles_editor/bucket_tool`` | ++-------------------+-----------------+-------------------+---------------------------------------+ +| Picker | :kbd:`P` | :kbd:`P` | ``tiles_editor/picker`` | ++-------------------+-----------------+-------------------+---------------------------------------+ +| Eraser | :kbd:`E` | :kbd:`E` | ``tiles_editor/eraser`` | ++-------------------+-----------------+-------------------+---------------------------------------+ +| Flip Horizontally | :kbd:`C` | :kbd:`C` | ``tiles_editor/flip_tile_horizontal`` | ++-------------------+-----------------+-------------------+---------------------------------------+ +| Flip Vertically | :kbd:`V` | :kbd:`V` | ``tiles_editor/flip_tile_vertical`` | ++-------------------+-----------------+-------------------+---------------------------------------+ +| Rotate Left | :kbd:`Z` | :kbd:`Z` | ``tiles_editor/rotate_tile_left`` | ++-------------------+-----------------+-------------------+---------------------------------------+ +| Rotate Right | :kbd:`X` | :kbd:`X` | ``tiles_editor/rotate_tile_right`` | ++-------------------+-----------------+-------------------+---------------------------------------+ Tileset Editor -------------- diff --git a/tutorials/editor/using_the_android_editor.rst b/tutorials/editor/using_the_android_editor.rst index 7118588d665f..04b8804ffb11 100644 --- a/tutorials/editor/using_the_android_editor.rst +++ b/tutorials/editor/using_the_android_editor.rst @@ -4,7 +4,7 @@ Using the Android editor ======================== In 2023, `we added `__ -a `Android port of the editor `__ +an `Android port of the editor `__ that can be used to work on new or existing projects on Android devices. .. note:: @@ -45,7 +45,7 @@ Here are the known limitations and issues of the Android editor: - UX not optimized for Android phones form-factor - `Android Go devices `__ lacks the *All files access* permission required for device read/write access. - As a workaround, when using a Android Go device, it's recommended to create new projects only in the Android *Documents* or *Downloads* directories. + As a workaround, when using an Android Go device, it's recommended to create new projects only in the Android *Documents* or *Downloads* directories. - The editor doesn't properly resume when *Don't keep activities* is enabled in the *Developer Options* .. seealso:: diff --git a/tutorials/export/exporting_for_android.rst b/tutorials/export/exporting_for_android.rst index bc97e95d1a48..9cd37422e6de 100644 --- a/tutorials/export/exporting_for_android.rst +++ b/tutorials/export/exporting_for_android.rst @@ -144,6 +144,7 @@ keystore file; such file can be generated like this: keytool -v -genkey -keystore mygame.keystore -alias mygame -keyalg RSA -validity 10000 This keystore and key are used to verify your developer identity, remember the password and keep it in a safe place! +It is suggested to use only upper and lowercase letters and numbers. Special characters may cause errors. Use Google's Android Developer guides to learn more about `APK signing `__. Now fill in the following forms in your Android Export Presets: diff --git a/tutorials/export/exporting_for_macos.rst b/tutorials/export/exporting_for_macos.rst index d0b33d5bede5..ddc3c60a4e7e 100644 --- a/tutorials/export/exporting_for_macos.rst +++ b/tutorials/export/exporting_for_macos.rst @@ -82,7 +82,8 @@ If you do not have an Apple Developer ID Certificate - Select ``Built-in (ad-hoc only)`` in the ``Code Signing > Codesign`` option. - Select ``Disabled`` in the ``Notarization > Notarization`` option. -In this case Godot will use a ad-hoc signature, which will make running an exported app easier for the end users, see the :ref:`Running Godot apps on macOS ` page for more information. +In this case Godot will use an ad-hoc signature, which will make running an exported app easier for the end users, +see the :ref:`Running Godot apps on macOS ` page for more information. Signing Options ~~~~~~~~~~~~~~~ diff --git a/tutorials/export/exporting_for_web.rst b/tutorials/export/exporting_for_web.rst index e5619c8abd07..b582f80f13e1 100644 --- a/tutorials/export/exporting_for_web.rst +++ b/tutorials/export/exporting_for_web.rst @@ -57,6 +57,8 @@ If a runnable web export template is available, a button appears between the *Stop scene* and *Play edited Scene* buttons in the editor to quickly open the game in the default browser for testing. +If your project uses GDExtension **Extension Support** needs to be enabled. + If you plan to use :ref:`VRAM compression ` make sure that **Vram Texture Compression** is enabled for the targeted platforms (enabling both **For Desktop** and **For Mobile** will result in a bigger, but more diff --git a/tutorials/export/one-click_deploy.rst b/tutorials/export/one-click_deploy.rst index 579f04a737e8..2513ae03afd9 100644 --- a/tutorials/export/one-click_deploy.rst +++ b/tutorials/export/one-click_deploy.rst @@ -155,7 +155,7 @@ Web > Use TLS**. and bypass the warning by clicking **Advanced** and then **Proceed to (address)**. - If you have a SSL/TLS certificate that is trusted by browsers, you can specify + If you have an SSL/TLS certificate that is trusted by browsers, you can specify the paths to the key and certificate files in the **Export > Web > TLS Key** and **Export > Web > TLS Certificate**. This will only work if the project is accessed through a domain name that is part of the TLS certificate. diff --git a/tutorials/i18n/localization_using_gettext.rst b/tutorials/i18n/localization_using_gettext.rst index 7961d0986096..6935bab99569 100644 --- a/tutorials/i18n/localization_using_gettext.rst +++ b/tutorials/i18n/localization_using_gettext.rst @@ -207,7 +207,7 @@ it can be worth it to use binary (compiled) MO message files instead of text-bas PO files. Binary MO files are smaller and faster to read than the equivalent PO files. -You can generate a MO file with the command below: +You can generate an MO file with the command below: .. code-block:: shell @@ -218,7 +218,7 @@ the PO file. This MO file can then be loaded in Godot as described above. The original PO file should be kept in version control so you can update your translation in the future. In case you lose the original PO file and -wish to decompile a MO file into a text-based PO file, you can do so with: +wish to decompile an MO file into a text-based PO file, you can do so with: .. code-block:: shell diff --git a/tutorials/inputs/inputevent.rst b/tutorials/inputs/inputevent.rst index 04639af5d8ad..25fa9c0b5962 100644 --- a/tutorials/inputs/inputevent.rst +++ b/tutorials/inputs/inputevent.rst @@ -99,7 +99,7 @@ received input, in order: 6. If so far no one consumed the event, the :ref:`Node._unhandled_key_input() ` callback will be called if overridden (and not disabled with :ref:`Node.set_process_unhandled_key_input() `). - This happens only if the event is a :ref:`InputEventKey `. + This happens only if the event is an :ref:`InputEventKey `. If any function consumes the event, it can call :ref:`Viewport.set_input_as_handled() `, and the event will not spread any more. The unhandled key input callback is ideal for key events. 7. If so far no one consumed the event, the :ref:`Node._unhandled_input() ` callback diff --git a/tutorials/io/background_loading.rst b/tutorials/io/background_loading.rst index 2222a1d2c844..9384be4c890f 100644 --- a/tutorials/io/background_loading.rst +++ b/tutorials/io/background_loading.rst @@ -42,7 +42,7 @@ Example ------- This example demonstrates how to load a scene in the background. -We will have a button spawn a enemy when pressed. +We will have a button spawn an enemy when pressed. The enemy will be ``Enemy.tscn`` which we will load on ``_ready`` and instantiate when pressed. The path will be ``"Enemy.tscn"`` which is located at ``res://Enemy.tscn``. diff --git a/tutorials/io/runtime_file_loading_and_saving.rst b/tutorials/io/runtime_file_loading_and_saving.rst index 84df82005593..7fc32ddd9264 100644 --- a/tutorials/io/runtime_file_loading_and_saving.rst +++ b/tutorials/io/runtime_file_loading_and_saving.rst @@ -76,7 +76,7 @@ Image's :ref:`Image.load_from_file ` static m handles everything, from format detection based on file extension to reading the file from disk. -If you need error handling or more control (such as changing the scale a SVG is +If you need error handling or more control (such as changing the scale an SVG is loaded at), use one of the following methods depending on the file format: - :ref:`Image.load_jpg_from_buffer ` diff --git a/tutorials/math/random_number_generation.rst b/tutorials/math/random_number_generation.rst index 39efffca52a7..c28b05d1a8bb 100644 --- a/tutorials/math/random_number_generation.rst +++ b/tutorials/math/random_number_generation.rst @@ -422,7 +422,7 @@ ends up empty. When that happens, you reinitialize it to its default value:: func get_fruit(): - if _fruits.empty(): + if _fruits.is_empty(): # Fill the fruits array again and shuffle it. _fruits = _fruits_full.duplicate() _fruits.shuffle() diff --git a/tutorials/migrating/upgrading_to_godot_4.rst b/tutorials/migrating/upgrading_to_godot_4.rst index 8e74b4dc536c..f4930420067e 100644 --- a/tutorials/migrating/upgrading_to_godot_4.rst +++ b/tutorials/migrating/upgrading_to_godot_4.rst @@ -519,6 +519,7 @@ Some notable renames you will need to perform in shaders are: - Texture filter and repeat modes are now set on individual uniforms, rather than the texture files themselves. - ``hint_albedo`` is now ``source_color``. +- ``hint_color`` is now ``source_color``. - :ref:`Built in matrix variables were renamed. ` - Particles shaders no longer use the ``vertex()`` processor function. Instead they use ``start()`` and ``process()``. diff --git a/tutorials/navigation/navigation_introduction_2d.rst b/tutorials/navigation/navigation_introduction_2d.rst index e7f5ae59caa5..41d9ba78dbdd 100644 --- a/tutorials/navigation/navigation_introduction_2d.rst +++ b/tutorials/navigation/navigation_introduction_2d.rst @@ -14,7 +14,7 @@ Godot provides the following objects and classes for 2D navigation: The AStar2D class is best suited for cell-based 2D gameplay that does not require actors to reach any possible position within an area but only predefined, distinct positions. - :ref:`NavigationServer2D` - ``NavigationServer2D`` provides a powerful server API to find the shortest path between two positions on a area defined by a navigation mesh. + ``NavigationServer2D`` provides a powerful server API to find the shortest path between two positions on an area defined by a navigation mesh. The NavigationServer is best suited for 2D realtime gameplay that does require actors to reach any possible position within a navigation mesh defined area. Mesh-based navigation scales well with large game worlds as a large area can often be defined with a single polygon when it would require many, many grid cells. diff --git a/tutorials/networking/high_level_multiplayer.rst b/tutorials/networking/high_level_multiplayer.rst index 9bac86d50cd1..5cdff4bbc16b 100644 --- a/tutorials/networking/high_level_multiplayer.rst +++ b/tutorials/networking/high_level_multiplayer.rst @@ -90,7 +90,7 @@ residential connections use a `NAT high-level multiplayer API only uses UDP, so you must forward the port in UDP, not just TCP. -After forwarding an UDP port and making sure your server uses that port, you can +After forwarding a UDP port and making sure your server uses that port, you can use `this website `__ to find your public IP address. Then give this public IP address to any Internet clients that wish to connect to your server. @@ -196,7 +196,7 @@ For a remote call to be successful, the sending and receiving node need to have must have the same name. When using ``add_child()`` for nodes which are expected to use RPCs, set the argument ``force_readable_name`` to ``true``. -.. warning:: +.. warning:: If a function is annotated with ``@rpc`` on the client script (resp. server script), then this function must also be declared on the server script (resp. client script). diff --git a/tutorials/networking/http_request_class.rst b/tutorials/networking/http_request_class.rst index 27cba42edfb5..fdb5cc179a42 100644 --- a/tutorials/networking/http_request_class.rst +++ b/tutorials/networking/http_request_class.rst @@ -51,7 +51,7 @@ Preparing the scene ------------------- Create a new empty scene, add a root :ref:`Node ` and add a script to it. -Then add a :ref:`HTTPRequest ` node as a child. +Then add an :ref:`HTTPRequest ` node as a child. .. image:: img/rest_api_scene.webp diff --git a/tutorials/networking/img/add_crt.png b/tutorials/networking/img/add_crt.png deleted file mode 100644 index 309a359dd677..000000000000 Binary files a/tutorials/networking/img/add_crt.png and /dev/null differ diff --git a/tutorials/networking/img/ssl_certs.png b/tutorials/networking/img/ssl_certs.png deleted file mode 100644 index 77ea9305f7d1..000000000000 Binary files a/tutorials/networking/img/ssl_certs.png and /dev/null differ diff --git a/tutorials/networking/img/tls_certificates_export_filter.webp b/tutorials/networking/img/tls_certificates_export_filter.webp new file mode 100644 index 000000000000..ee83fa504362 Binary files /dev/null and b/tutorials/networking/img/tls_certificates_export_filter.webp differ diff --git a/tutorials/networking/img/tls_certificates_project_setting.webp b/tutorials/networking/img/tls_certificates_project_setting.webp new file mode 100644 index 000000000000..026511aa5e42 Binary files /dev/null and b/tutorials/networking/img/tls_certificates_project_setting.webp differ diff --git a/tutorials/networking/ssl_certificates.rst b/tutorials/networking/ssl_certificates.rst index 09da65d085d7..bfa62d3471c8 100644 --- a/tutorials/networking/ssl_certificates.rst +++ b/tutorials/networking/ssl_certificates.rst @@ -1,74 +1,79 @@ -:article_outdated: True - .. _doc_ssl_certificates: -SSL certificates -================ +SSL/TLS certificates +==================== Introduction ------------ -It is often desired to use SSL connections for communications to avoid -"man in the middle" attacks. Godot has a connection wrapper, -:ref:`StreamPeerTLS `, -which can take a regular connection and add security around it. The -:ref:`HTTPClient ` -class also supports HTTPS by using this same wrapper. - -Godot includes SSL certificates from Mozilla, but you can provide your own -with a .crt file in the project settings: +It is often desired to use :abbr:`SSL (Secure Sockets Layer)` connections (also +known as :abbr:`TLS (Transport Layer Security)` connections) for communications +to avoid "man in the middle" attacks. Godot has a connection wrapper, +:ref:`StreamPeerTLS `, which can take a regular connection +and add security around it. The :ref:`HTTPClient ` and +:ref:`HTTPRequest ` classes also support HTTPS using +this same wrapper. -.. image:: img/ssl_certs.png +Godot includes the +`SSL certificate bundle from Mozilla `__, +but you can provide your own with a CRT file in the Project Settings: -This file should contain any number of public certificates in -`PEM format `__. +.. figure:: img/tls_certificates_project_setting.webp + :align: center + :alt: Setting the TLS certificate bundle override project setting -Of course, remember to add .crt as filter so the exporter recognizes -this when exporting your project. + Setting the TLS certificate bundle override project setting -.. image:: img/add_crt.png +When set, this file *overrides* the Mozilla certificate bundle Godot uses +by default. This file should contain any number of public certificates in +`PEM format `__. -There are two ways to obtain certificates: +Remember to add ``*.crt`` as the non-resource export filter to your export +preset, so that the exporter recognizes this when exporting your project: -Approach 1: self signed cert ----------------------------- +.. figure:: img/tls_certificates_export_filter.webp + :align: center + :alt: Adding ``*.crt`` to non-resource export filter in the export preset -The first approach is the simplest: generate a private and public -key pair and add the public key (in PEM format) to the .crt file. -The private key should go to your server. + Adding ``*.crt`` to non-resource export filter in the export preset -OpenSSL has `some -documentation `__ about -this. This approach also **does not require domain validation** nor -requires you to spend a considerable amount of money in purchasing -certificates from a CA. +There are two ways to obtain certificates: -Approach 2: CA cert -------------------- +Acquire a certificate from a certificate authority +-------------------------------------------------- -The second approach consists of using a certificate authority (CA) -such as Verisign, Geotrust, etc. This is a more cumbersome process, -but it's more "official" and ensures your identity is clearly -represented. +The main approach to getting a certificate is to use a certificate authority +(CA) such as `Let's Encrypt `__. This is a more +cumbersome process than a self-signed certificate, but it's more "official" and +ensures your identity is clearly represented. The resulting certificate is also +trusted by applications such as web browsers, unlike a self-signed certificate +which requires additional configuration on the client side before it's +considered trusted. -Unless you are working with large companies or corporations, or need -to connect to someone else's servers (i.e., connecting to Google or some -other REST API provider via HTTPS), this method is not as useful. +These certificates do not require any configuration on the client to work, since +Godot already bundles the Mozilla certificate bundle in the editor and exported +projects. -Also, when using a CA issued cert, **you must enable domain -validation**, to ensure the domain you are connecting to is the one -intended, otherwise any website can issue any certificate in the same CA -and it will work. +Generate a self-signed certificate +---------------------------------- -If you are using Linux, you can use the supplied certs file, generally -located in: +For most use cases, it's recommended to go through certificate authority as the +process is free with certificate authorities such as Let's Encrypt. However, if +using a certificate authority is not an option, then you can generate a +self-signed certificate and tell the client to consider your self-signed +certificate as trusted. -.. code-block:: none +To create a self-signed certificate, generate a private and public key pair and +add the public key (in PEM format) to the CRT file specified in the Project +Settings. - /etc/ssl/certs/ca-certificates.crt +.. warning:: -This file allows HTTPS connections to virtually any website (i.e., -Google, Microsoft, etc.). + The private key should **only** go to your server. The client must not have + access to it: otherwise, the security of the certificate will be + compromised. -Or pick any of the more specific certificates there if you are -connecting to a specific one. +OpenSSL has `some documentation +`__ +about this. For local development purposes **only**, `mkcert +`__ can be used as an alternative. diff --git a/tutorials/physics/ray-casting.rst b/tutorials/physics/ray-casting.rst index 43908e8f6fcd..5d6b240b20bf 100644 --- a/tutorials/physics/ray-casting.rst +++ b/tutorials/physics/ray-casting.rst @@ -63,7 +63,7 @@ Use the following code in 2D: public override void _PhysicsProcess(double delta) { var spaceRid = GetWorld2D().Space; - var spaceState = Physics2DServer.SpaceGetDirectState(spaceRid); + var spaceState = PhysicsServer2D.SpaceGetDirectState(spaceRid); } Or more directly: diff --git a/tutorials/physics/soft_body.rst b/tutorials/physics/soft_body.rst index afc67e6c8212..626fd6a542c7 100644 --- a/tutorials/physics/soft_body.rst +++ b/tutorials/physics/soft_body.rst @@ -46,7 +46,7 @@ Open the ``PlaneMesh`` properties and set the size(x: 0.5 y: 1) then set ``Subdi Add a :ref:`BoneAttachment3D ` node under the skeleton node and select the Neck bone to attach the cloak to the character skeleton. -.. note:: ``BoneAttachment3D`` node is to attach objects to a bone of a armature. The attached object will follow the bone's movement, weapon of a character can be attached this way. +.. note:: ``BoneAttachment3D`` node is to attach objects to a bone of an armature. The attached object will follow the bone's movement, weapon of a character can be attached this way. .. image:: img/softbody_cloak_bone_attach.png diff --git a/tutorials/platform/android/android_in_app_purchases.rst b/tutorials/platform/android/android_in_app_purchases.rst index 4b5d4d09b315..dd14739db4c8 100644 --- a/tutorials/platform/android/android_in_app_purchases.rst +++ b/tutorials/platform/android/android_in_app_purchases.rst @@ -82,7 +82,7 @@ Query available items ********************* Once the API has connected, query SKUs using ``querySkuDetails()``. You must successfully complete -a SKU query before calling the ``purchase()`` or ``queryPurchases()`` functions, +an SKU query before calling the ``purchase()`` or ``queryPurchases()`` functions, or they will return an error. ``querySkuDetails()`` takes two parameters: an array of SKU name strings, and a string specifying the type of SKU being queried. The SKU type string should be ``"inapp"`` for normal in-app purchases or ``"subs"`` for subscriptions. diff --git a/tutorials/plugins/editor/making_plugins.rst b/tutorials/plugins/editor/making_plugins.rst index 82dcca8d9743..9f5eac2323a5 100644 --- a/tutorials/plugins/editor/making_plugins.rst +++ b/tutorials/plugins/editor/making_plugins.rst @@ -96,7 +96,7 @@ editor, and it must inherit from :ref:`class_EditorPlugin`. .. warning:: In addition to the EditorPlugin script, any other GDScript that your plugin uses - must *also* be a tool. Any GDScript without ``@tool`` imported into the editor + must *also* be a tool. Any GDScript without ``@tool`` used by the editor will act like an empty file! It's important to deal with initialization and clean-up of resources. diff --git a/tutorials/plugins/running_code_in_the_editor.rst b/tutorials/plugins/running_code_in_the_editor.rst index b957d7047532..768c8a7dc094 100644 --- a/tutorials/plugins/running_code_in_the_editor.rst +++ b/tutorials/plugins/running_code_in_the_editor.rst @@ -105,18 +105,20 @@ Here is how a ``_process()`` function might look for you: // Code to execute both in editor and in game. } -.. note:: +Important information +--------------------- - Modifications in the editor are permanent. For example, in the following - case, when we remove the script, the node will keep its rotation. Be careful - to avoid making unwanted modifications. +Any other GDScript that your tool script uses must *also* be a tool. Any +GDScript without ``@tool`` used by the editor will act like an empty file! -.. note:: +Extending a ``@tool`` script does not automatically make the extending script +a ``@tool``. Omitting ``@tool`` from the extending script will disable tool +behavior from the super class. Therefore the extending script should also +specify the ``@tool`` annotation. - Extending a ``@tool`` script does not automatically make the extending script - a ``@tool``. Omitting ``@tool`` from the extending script will disable tool - behavior from the super class. Therefore the extending script should also - specify the ``@tool`` annotation. +Modifications in the editor are permanent. For example, in the next +section when we remove the script, the node will keep its rotation. Be careful +to avoid making unwanted modifications. Try ``@tool`` out ----------------- diff --git a/tutorials/rendering/img/screenres.png b/tutorials/rendering/img/screenres.png deleted file mode 100644 index f053dafa9d4c..000000000000 Binary files a/tutorials/rendering/img/screenres.png and /dev/null differ diff --git a/tutorials/rendering/img/screenres.webp b/tutorials/rendering/img/screenres.webp new file mode 100644 index 000000000000..a1f799f57e07 Binary files /dev/null and b/tutorials/rendering/img/screenres.webp differ diff --git a/tutorials/rendering/img/stretch.png b/tutorials/rendering/img/stretch.png deleted file mode 100644 index 6a0fd74cc65f..000000000000 Binary files a/tutorials/rendering/img/stretch.png and /dev/null differ diff --git a/tutorials/rendering/img/stretch.svg b/tutorials/rendering/img/stretch.svg deleted file mode 100644 index 4822f72c73cb..000000000000 --- a/tutorials/rendering/img/stretch.svg +++ /dev/null @@ -1 +0,0 @@ -Disabled2DViewport diff --git a/tutorials/rendering/img/stretchsettings.png b/tutorials/rendering/img/stretchsettings.png deleted file mode 100644 index 8e90154a5983..000000000000 Binary files a/tutorials/rendering/img/stretchsettings.png and /dev/null differ diff --git a/tutorials/rendering/img/stretchsettings.webp b/tutorials/rendering/img/stretchsettings.webp new file mode 100644 index 000000000000..f43a74d1b668 Binary files /dev/null and b/tutorials/rendering/img/stretchsettings.webp differ diff --git a/tutorials/rendering/multiple_resolutions.rst b/tutorials/rendering/multiple_resolutions.rst index 6c9f0adc3af2..f44db43fa5e3 100644 --- a/tutorials/rendering/multiple_resolutions.rst +++ b/tutorials/rendering/multiple_resolutions.rst @@ -59,7 +59,7 @@ Base size A base size for the window can be specified in the Project Settings under **Display → Window**. -.. image:: img/screenres.png +.. image:: img/screenres.webp However, what it does is not completely obvious; the engine will *not* attempt to switch the monitor to this resolution. Rather, think of this @@ -84,7 +84,7 @@ To configure the stretch base size at runtime from a script, use the ``get_tree().root.content_scale_size`` property (see :ref:`Window.content_scale_size `). Changing this value can indirectly change the size of 2D elements. However, to -provide an user-accessible scaling option, using +provide a user-accessible scaling option, using :ref:`doc_multiple_resolutions_stretch_scale` is recommended as it's easier to adjust. @@ -127,20 +127,16 @@ Stretch settings Stretch settings are located in the project settings and provide several options: -.. image:: img/stretchsettings.png +.. image:: img/stretchsettings.webp Stretch Mode ^^^^^^^^^^^^ The **Stretch Mode** setting defines how the base size is stretched to fit -the resolution of the window or screen. - -.. image:: img/stretch.png - -The animations below use a "base size" of just 16×9 pixels to -demonstrate the effect of different stretch modes. A single sprite, also -16×9 pixels in size, covers the entire viewport, and a diagonal -:ref:`Line2D ` is added on top of it: +the resolution of the window or screen. The animations below use a "base +size" of just 16×9 pixels to demonstrate the effect of different stretch +modes. A single sprite, also 16×9 pixels in size, covers the entire viewport, +and a diagonal :ref:`Line2D ` is added on top of it: .. image:: img/stretch_demo_scene.png @@ -467,7 +463,7 @@ Non-game application - Keep the stretch mode to its default value, ``disabled``. - Keep the stretch aspect to its default value, ``ignore`` (its value won't be used since the stretch mode is ``disabled``). -- You can define a minimum window size by setting ``OS.min_window_size`` in a +- You can define a minimum window size by calling ``get_window().set_min_size()`` in a script's ``_ready()`` function. This prevents the user from resizing the application below a certain size, which could break the UI layout. diff --git a/tutorials/scripting/c_sharp/c_sharp_style_guide.rst b/tutorials/scripting/c_sharp/c_sharp_style_guide.rst index 2787d3552411..d82472e9050d 100644 --- a/tutorials/scripting/c_sharp/c_sharp_style_guide.rst +++ b/tutorials/scripting/c_sharp/c_sharp_style_guide.rst @@ -20,9 +20,10 @@ of the language, we encourage you to do the same, especially if you do not have Language specification ---------------------- -Godot currently uses **C# version 7.0** in its engine and example source code. So, before we move to -a newer version, care must be taken to avoid mixing language features only available in C# 7.1 or -later. +Godot currently uses **C# version 10.0** in its engine and example source code, +as this is the version supported by .NET 6.0 (the current baseline requirement). +So, before we move to a newer version, care must be taken to avoid mixing +language features only available in C# 11.0 or later. For detailed information on C# features in different versions, please see `What's New in C# `_. @@ -153,11 +154,11 @@ Insert a space: * Around a colon in a type declaration. * Around a lambda arrow. * After a single-line comment symbol (``//``), and before it if used at the end of a line. +* After the opening brace, and before the closing brace in a single line initializer. Do not use a space: * After type cast parentheses. -* Within single line initializer braces. The following example shows a proper use of spaces, according to some of the above mentioned conventions: @@ -174,7 +175,7 @@ The following example shows a proper use of spaces, according to some of the abo public void MyMethod() { - int[] values = {1, 2, 3, 4}; // No space within initializer brackets. + int[] values = { 1, 2, 3, 4 }; int sum = 0; // Single line comment. diff --git a/tutorials/scripting/c_sharp/c_sharp_variant.rst b/tutorials/scripting/c_sharp/c_sharp_variant.rst index ea94059696d4..365056f6745d 100644 --- a/tutorials/scripting/c_sharp/c_sharp_variant.rst +++ b/tutorials/scripting/c_sharp/c_sharp_variant.rst @@ -65,7 +65,7 @@ may be useful when the type of Variant is completely unknown. However, when poss specific conversions. ``Variant.Obj`` evaluates a ``switch`` on ``Variant.VariantType`` and it may not be necessary. Also, if the result is a value type, it is boxed. -For example, if the potential for ``Variant.As()`` to throw a invalid cast exception isn't +For example, if the potential for ``Variant.As()`` to throw an invalid cast exception isn't acceptable, consider using a ``Variant.As() is MyNode n`` type pattern instead. .. note:: diff --git a/tutorials/scripting/change_scenes_manually.rst b/tutorials/scripting/change_scenes_manually.rst index 3b9b297952c9..7e9e19f62400 100644 --- a/tutorials/scripting/change_scenes_manually.rst +++ b/tutorials/scripting/change_scenes_manually.rst @@ -118,7 +118,7 @@ access and integrity. access. There are also cases where one may wish to have many scenes present at the same -time. Perhaps one is adding their own singleton at runtime, or preserving a +time. Perhaps one is adding their own singleton at runtime, or preserving a scene's data between scene changes (adding the scene to the root node). .. tabs:: diff --git a/tutorials/scripting/creating_script_templates.rst b/tutorials/scripting/creating_script_templates.rst index cebcfba0eb30..8836e455f927 100644 --- a/tutorials/scripting/creating_script_templates.rst +++ b/tutorials/scripting/creating_script_templates.rst @@ -203,7 +203,7 @@ Base placeholders +==========================+====================================================+ | ``_BINDINGS_NAMESPACE_`` | The name of the Godot namespace (used in C# only). | +--------------------------+----------------------------------------------------+ -| ``_CLASS_`` | The name of the new class (used in C# only). | +| ``_CLASS_`` | The name of the new class. | +--------------------------+----------------------------------------------------+ | ``_BASE_`` | The base type a new script inherits from. | +--------------------------+----------------------------------------------------+ diff --git a/tutorials/scripting/debug/img/customize_run_instances.webp b/tutorials/scripting/debug/img/customize_run_instances.webp new file mode 100644 index 000000000000..3c314fe9d683 Binary files /dev/null and b/tutorials/scripting/debug/img/customize_run_instances.webp differ diff --git a/tutorials/scripting/debug/img/overview_debug.webp b/tutorials/scripting/debug/img/overview_debug.webp index 53d7ac315bee..ab640bf494c9 100644 Binary files a/tutorials/scripting/debug/img/overview_debug.webp and b/tutorials/scripting/debug/img/overview_debug.webp differ diff --git a/tutorials/scripting/debug/overview_of_debugging_tools.rst b/tutorials/scripting/debug/overview_of_debugging_tools.rst index 2baec1de272f..954619cbc1e0 100644 --- a/tutorials/scripting/debug/overview_of_debugging_tools.rst +++ b/tutorials/scripting/debug/overview_of_debugging_tools.rst @@ -35,43 +35,163 @@ Here are the descriptions of the options: Deploy with Remote Debug ++++++++++++++++++++++++ -When exporting and deploying, the resulting executable will attempt to connect -to the IP of your computer for debugging. +When this option is enabled, using one-click deploy will make the executable +attempt to connect to this computer's IP so the running project can be debugged. +This option is intended to be used for remote debugging (typically with a mobile +device). +You don't need to enable it to use the GDScript debugger locally. -Small Deploy with Network FS -++++++++++++++++++++++++++++ +Small Deploy with Network Filesystem +++++++++++++++++++++++++++++++++++++ This option speeds up testing for games with a large footprint on remote devices. -When **Small Deploy with Network FS** is on, instead of exporting the full game, -deploying the game builds a minimal executable. The editor then provides files -from the project over the network. +When **Small Deploy with Network Filesystem** is on, instead of exporting the +full game, deploying the game builds a minimal executable. The editor then +provides files from the project over the network. -Also, on Android, the game is deployed using the USB cable to speed up deployment. +Also, on Android, the game is deployed using the USB cable to speed up +deployment. Visible Collision Shapes ++++++++++++++++++++++++ -This option makes collision shapes and raycast nodes visible in the running game. +When this option is enabled, collision shapes and raycast nodes (for 2D and 3D) +will be visible in the running project. + +Visible Paths ++++++++++++++ + +When this option is enabled, curve resources used by path nodes will be visible +in the running project. Visible Navigation ++++++++++++++++++ -Navigation meshes and polygons will be visible on the running game. +When this option is enabled, navigation meshes, and polygons will be visible in +the running project. -Sync Scene Changes -++++++++++++++++++ +Visible Avoidance ++++++++++++++++++ + +When this option is enabled, avoidance object shapes, radiuses, and velocities +will be visible in the running project. + +Debug CanvasItem Redraws +++++++++++++++++++++++++ + +When this option is enabled, redraw requests of 2D objects will become visible +(as a short flash) in the running project. +This is useful to troubleshoot low processor mode. + +Synchronize Scene Changes +++++++++++++++++++++++++++ -With this option, any change you make to a scene in the editor at runtime -appears instantly. When used remotely on a device, this is more efficient -with the network filesystem. +When this option is enabled, any changes made to the scene in the editor will be +replicated in the running project. +When used remotely on a device, this is more efficient when the network +filesystem option is enabled. -Sync Script Changes -+++++++++++++++++++ +Synchronize Script Changes ++++++++++++++++++++++++++++ -Any script that is saved will be reloaded on the running game. When used +When this option is enabled, any changes made to the script in the editor will +be reloaded in the running project. When used remotely on a device, this is more efficient with the network filesystem. +Keep Debug Server Open +++++++++++++++++++++++ + +When this option is enabled, the editor debug server will stay open and listen +for new sessions started outside of the editor itself. + +Customize Run Instances... +++++++++++++++++++++++++++ + +This opens a dialog allowing you to tell Godot to run multiple instances of the +game at once, and to specify the command line arguments for each instance. This +is especially useful when building and debugging multiplayer games. + +.. image:: img/customize_run_instances.webp + +Enable Multiple Instances +^^^^^^^^^^^^^^^^^^^^^^^^^ + +When this option is enabled, the editor will run multiple instances of the +project at once when you Run Project. + +Below this checkbox is a selector to pick how many instances to run. + +Checking the box and setting this to only 1 is the same as not checking this box +at all. + +Main Run Args +^^^^^^^^^^^^^ + +These are the arguments that will be passed to **every** instance of the project +when you Run Project, unless you select "Enabled" under "Override Main Run Args" +for a specific instance. + +Note that these arguments are space-separated. + +.. tip:: + + These arguments can be accessed in your script by using + :ref:`get_cmdline_args`. + +.. warning:: + + Even if you uncheck "Enable Multiple Instances" these arguments will be + passed when you Run Project. + +Main Feature Tags +^^^^^^^^^^^^^^^^^ + +These are the feature tags that will be passed to **every** instance of the +project when you Run Project, unless you select "Enabled" under "Override Main +Tags" for a specific instance. + +Override Main Run Args +^^^^^^^^^^^^^^^^^^^^^^ + +When this is enabled, the arguments in the "Main Run Args" field will **not be +passed** to this specific instance of the project when you Run Project. + +Launch Arguments +^^^^^^^^^^^^^^^^ + +These are the arguments that will be passed to this specific instance of the +project when you Run Project. They will be **combined with** the "Main Run Args" +unless you select "Enabled" under "Override Main Run Args". + +Override Main Tags +^^^^^^^^^^^^^^^^^^ + +When this is enabled, the tags in the "Main Feature Tags" field will **not be +passed** to this specific instance of the project when you Run Project. + +Feature Tags +^^^^^^^^^^^^ + +These are the feature tags that will be passed to this specific instance of the +project when you Run Project. They will be **combined with** the "Main Feature +Tags" unless you select "Enabled" under "Override Main Tags". + +.. warning:: + If you want to pass "User" arguments, that can be accessed with + :ref:`get_cmdline_user_args` then you + must prefix them with two dashes **and a space** like `-- one two three`. + + Be aware that these dashes will apply to arguments added later in the + "Launch Arguments" on a per instance basis, which can cause some confusion + when combining the `Main Run Args` and `Launch Arguments`. + + If you place `-- one two three` in the "Main Run Args" and `-- four five + six` in the "Launch Arguments" then the final command line arguments will be + `one two three -- four five six`. This is because the `--` is repeated in + the "Launch Arguments". + + .. _doc_debugger_tools_and_options: Script editor debug tools and options @@ -102,8 +222,6 @@ The **Break** button causes a break in the script like a breakpoint would. **Step Over** goes to the next line of code, and **Step Into** goes into a function if possible. Otherwise, it does the same thing as **Step Over**. -The **Keep Debugger Open** option keeps the debugger open after a scene -has been closed. The **Debug with External Editor** option lets you debug your game with an external editor. This option is also accessible in **Editor Settings > Debugger**. diff --git a/tutorials/scripting/evaluating_expressions.rst b/tutorials/scripting/evaluating_expressions.rst index 6b45a1eedae5..579893535075 100644 --- a/tutorials/scripting/evaluating_expressions.rst +++ b/tutorials/scripting/evaluating_expressions.rst @@ -9,7 +9,7 @@ An expression can be: - A mathematical expression such as ``(2 + 4) * 16/4.0``. - A built-in method call like ``deg_to_rad(90)``. -- A method call on an user-provided script like ``update_health()``, +- A method call on a user-provided script like ``update_health()``, if ``base_instance`` is set to a value other than ``null`` when calling :ref:`Expression.execute() `. diff --git a/tutorials/scripting/gdextension/what_is_gdextension.rst b/tutorials/scripting/gdextension/what_is_gdextension.rst index 2709e26c80b7..48732c58f272 100644 --- a/tutorials/scripting/gdextension/what_is_gdextension.rst +++ b/tutorials/scripting/gdextension/what_is_gdextension.rst @@ -118,6 +118,6 @@ not compatible with Godot 3.x. GDExtension add-ons are also only compatible with engine builds that use the level of floating-point precision the extension was compiled for. This means -that if you use a engine build with double-precision floats, the extension must +that if you use an engine build with double-precision floats, the extension must also be compiled for double-precision floats. See :ref:`doc_large_world_coordinates` for details. diff --git a/tutorials/scripting/gdscript/gdscript_basics.rst b/tutorials/scripting/gdscript/gdscript_basics.rst index 65588bf0a1f5..2f2cc1e38b00 100644 --- a/tutorials/scripting/gdscript/gdscript_basics.rst +++ b/tutorials/scripting/gdscript/gdscript_basics.rst @@ -224,7 +224,9 @@ in case you want to take a look under the hood. Operators ~~~~~~~~~ -The following is the list of supported operators and their precedence. +The following is the list of supported operators and their precedence. All binary operators are `left-associative `_, +including the ``**`` operator. This means that ``2 ** 2 ** 3`` is equal to ``(2 ** 2) ** 3``. Use parentheses to explicitly specify precedence you need, for +example ``2 ** (2 ** 3)``. The ternary ``if/else`` operator is right-associative. +---------------------------------------+-----------------------------------------------------------------------------+ | **Operator** | **Description** | @@ -251,10 +253,6 @@ The following is the list of supported operators and their precedence. | | | | | Multiplies ``x`` by itself ``y`` times, similar to calling | | | :ref:`pow() ` function. | -| | | -| | **Note:** In GDScript, the ``**`` operator is | -| | `left-associative `_. | -| | See a detailed note after the table. | +---------------------------------------+-----------------------------------------------------------------------------+ | ``~x`` | Bitwise NOT | +---------------------------------------+-----------------------------------------------------------------------------+ @@ -330,9 +328,7 @@ The following is the list of supported operators and their precedence. 3. For negative values, the ``%`` operator and ``fmod()`` use `truncation `_ instead of rounding towards negative infinity. This means that the remainder has a sign. If you need the remainder in a mathematical sense, use the :ref:`posmod() ` and :ref:`fposmod() ` functions instead. - 4. The ``**`` operator is `left-associative `_. This means that ``2 ** 2 ** 3`` is equal to ``(2 ** 2) ** 3``. - Use parentheses to explicitly specify precedence you need, for example ``2 ** (2 ** 3)``. - 5. The ``==`` and ``!=`` operators sometimes allow you to compare values of different types (for example, ``1 == 1.0`` is true), but in other cases it can cause + 4. The ``==`` and ``!=`` operators sometimes allow you to compare values of different types (for example, ``1 == 1.0`` is true), but in other cases it can cause a runtime error. If you're not sure about the types of the operands, you can safely use the :ref:`is_same() ` function (but note that it is more strict about types and references). To compare floats, use the :ref:`is_equal_approx() ` and :ref:`is_zero_approx() ` functions instead. @@ -433,14 +429,22 @@ A string enclosed in quotes of one type (for example ``"``) can contain quotes o two consecutive quotes of the same type (unless they are adjacent to the string edges). **Raw string literals** always encode the string as it appears in the source code. -This is especially useful for regular expressions. Raw strings do not process escape sequences, -but you can "escape" a quote or backslash (they replace themselves). +This is especially useful for regular expressions. A raw string literal doesn't process escape sequences, +however it does recognize ``\\`` and ``\"`` (``\'``) and replaces them with themselves. +Thus, a string can have a quote that matches the opening one, but only if it's preceded by a backslash. :: print("\tchar=\"\\t\"") # Prints ` char="\t"`. print(r"\tchar=\"\\t\"") # Prints `\tchar=\"\\t\"`. +.. note:: + + Some strings cannot be represented using raw string literals: you cannot have an odd number + of backslashes at the end of a string or have an unescaped opening quote inside the string. + However, in practice this doesn't matter since you can use a different quote type + or use concatenation with a regular string literal. + GDScript also supports :ref:`format strings `. Annotations diff --git a/tutorials/scripting/gdscript/gdscript_exports.rst b/tutorials/scripting/gdscript/gdscript_exports.rst index 05ec50b40a28..e8577aab82d9 100644 --- a/tutorials/scripting/gdscript/gdscript_exports.rst +++ b/tutorials/scripting/gdscript/gdscript_exports.rst @@ -368,6 +368,15 @@ Packed type arrays also work, but only initialized empty: @export var vector3s = PackedVector3Array() @export var strings = PackedStringArray() +Other export variants can also be used when exporting arrays: + +:: + + @export_range(-360, 360, 0.001, "radians") var laser_angles: Array[float] = [] + @export_file("*.json") var skill_trees: Array[String] = [] + @export_color_no_alpha var hair_colors = PackedColorArray() + @export_enum("Espresso", "Mocha", "Latte", "Capuccino") var barista_suggestions: Array[String] = [] + ``@export_storage`` ------------------- diff --git a/tutorials/scripting/gdscript/gdscript_styleguide.rst b/tutorials/scripting/gdscript/gdscript_styleguide.rst index 8ee74a82259d..b2e636412b40 100644 --- a/tutorials/scripting/gdscript/gdscript_styleguide.rst +++ b/tutorials/scripting/gdscript/gdscript_styleguide.rst @@ -307,8 +307,8 @@ editor. For example, when looking at a differential revision. One statement per line ~~~~~~~~~~~~~~~~~~~~~~ -Never combine multiple statements on a single line. No, C programmers, -not even with a single line conditional statement. +Avoid combining multiple statements on a single line, including conditional +statements, to adhere to the GDScript style guidelines for readability. **Good**: diff --git a/tutorials/shaders/advanced_postprocessing.rst b/tutorials/shaders/advanced_postprocessing.rst index 8b68b9053b52..1461cabaab6d 100644 --- a/tutorials/shaders/advanced_postprocessing.rst +++ b/tutorials/shaders/advanced_postprocessing.rst @@ -41,16 +41,21 @@ of the screen. This is why the QuadMesh needs to have height and width of ``2``. Godot handles the transform from model to view space to clip space behind the scenes, so we need to nullify the effects of Godot's transformations. We do this by setting the ``POSITION`` built-in to our desired position. ``POSITION`` bypasses the built-in transformations -and sets the vertex position directly. +and sets the vertex position in clip space directly. .. code-block:: glsl shader_type spatial; void vertex() { - POSITION = vec4(VERTEX, 1.0); + POSITION = vec4(VERTEX.xy, 1.0, 1.0); } +.. note:: In versions of Godot earlier than 4.3, this code recommended using ``POSITION = vec4(VERTEX, 1.0);`` + which implicitly assumed the clip-space near plane was at ``0.0``. + That code is now incorrect and will not work in versions 4.3+ as we + use a "reversed-z" depth buffer now where the near plane is at ``1.0``. + Even with this vertex shader, the quad keeps disappearing. This is due to frustum culling, which is done on the CPU. Frustum culling uses the camera matrix and the AABBs of Meshes to determine if the Mesh will be visible *before* passing it to the GPU. diff --git a/tutorials/shaders/screen-reading_shaders.rst b/tutorials/shaders/screen-reading_shaders.rst index 75d4e298e5a8..ae4ae37bd820 100644 --- a/tutorials/shaders/screen-reading_shaders.rst +++ b/tutorials/shaders/screen-reading_shaders.rst @@ -47,7 +47,7 @@ you. .. warning:: If the filter mode is not changed to a filter mode that contains ``mipmap`` in its name, - ``textureLod`` with a LOD parameter greater than ``0.0`` will have the same appearance + ``textureLod`` with an LOD parameter greater than ``0.0`` will have the same appearance as with the ``0.0`` LOD parameter. Screen texture example diff --git a/tutorials/shaders/shader_reference/canvas_item_shader.rst b/tutorials/shaders/shader_reference/canvas_item_shader.rst index 581f77543d14..fb9ad8be3e0c 100644 --- a/tutorials/shaders/shader_reference/canvas_item_shader.rst +++ b/tutorials/shaders/shader_reference/canvas_item_shader.rst @@ -65,7 +65,7 @@ Global built-ins are available everywhere, including custom functions. | in float **TAU** | A ``TAU`` constant (``6.283185``). | | | An equivalent of ``PI * 2`` and amount of radians in full turn. | +-------------------+----------------------------------------------------------------------------------------+ -| in float **E** | A ``E`` constant (``2.718281``). | +| in float **E** | An ``E`` constant (``2.718281``). | | | Euler's number and a base of the natural logarithm. | +-------------------+----------------------------------------------------------------------------------------+ @@ -214,7 +214,7 @@ words, Godot no longer draws the object again for each light. Use render_mode ``unshaded`` if you do not want the light processor function to run. Use render_mode ``light_only`` if you only want to see the impact of lighting on an object; this can be useful when you only want the object visible -where it is covered by light. +where it is covered by light. If you define a light function it will replace the built in light function, even if your light function is empty. @@ -289,7 +289,7 @@ documentation for more information. +-----------------------------------------------+-------------------------------------------+ | vec2 **texture_sdf_normal** (vec2 sdf_pos) | Calculates a normal from the SDF texture. | +-----------------------------------------------+-------------------------------------------+ -| vec2 **sdf_to_screen_uv** (vec2 sdf_pos) | Converts a SDF to screen UV. | +| vec2 **sdf_to_screen_uv** (vec2 sdf_pos) | Converts an SDF to screen UV. | +-----------------------------------------------+-------------------------------------------+ -| vec2 **screen_uv_to_sdf** (vec2 uv) | Converts screen UV to a SDF. | +| vec2 **screen_uv_to_sdf** (vec2 uv) | Converts screen UV to an SDF. | +-----------------------------------------------+-------------------------------------------+ diff --git a/tutorials/shaders/shader_reference/fog_shader.rst b/tutorials/shaders/shader_reference/fog_shader.rst index 509df9a2b72e..677db5be5d26 100644 --- a/tutorials/shaders/shader_reference/fog_shader.rst +++ b/tutorials/shaders/shader_reference/fog_shader.rst @@ -16,13 +16,13 @@ camera. Fog shaders are a special form of compute shader that is called once for every froxel that is touched by an axis aligned bounding box of the associated :ref:`FogVolume `. This means that froxels that just barely -touch a given :ref:`FogVolume ` will still be used. +touch a given :ref:`FogVolume ` will still be used. Built-ins ^^^^^^^^^ Values marked as "in" are read-only. Values marked as "out" are for optional -writing and will not necessarily contain sensible values. Samplers cannot be +writing and will not necessarily contain sensible values. Samplers cannot be written to so they are not marked. @@ -43,7 +43,7 @@ Global built-ins are available everywhere, including in custom functions. | in float **TAU** | A ``TAU`` constant (``6.283185``). | | | An equivalent of ``PI * 2`` and amount of radians in full turn. | +---------------------------------+-----------------------------------------------------------------------------------------+ -| in float **E** | A ``E`` constant (``2.718281``). | +| in float **E** | An ``E`` constant (``2.718281``). | | | Euler's number and a base of the natural logarithm. | +---------------------------------+-----------------------------------------------------------------------------------------+ diff --git a/tutorials/shaders/shader_reference/particle_shader.rst b/tutorials/shaders/shader_reference/particle_shader.rst index 2eeae8c36f1f..177eee4204d9 100644 --- a/tutorials/shaders/shader_reference/particle_shader.rst +++ b/tutorials/shaders/shader_reference/particle_shader.rst @@ -66,13 +66,13 @@ Global built-ins are available everywhere, including custom functions. | in float **TAU** | A ``TAU`` constant (``6.283185``). | | | An equivalent of ``PI * 2`` and amount of radians in full turn. | +-------------------+----------------------------------------------------------------------------------------+ -| in float **E** | A ``E`` constant (``2.718281``). Euler's number and a base of the natural logarithm. | +| in float **E** | An ``E`` constant (``2.718281``). Euler's number and a base of the natural logarithm. | +-------------------+----------------------------------------------------------------------------------------+ Start and Process built-ins ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -These properties can be accessed from both the ``start()`` and ``process()`` functions. +These properties can be accessed from both the ``start()`` and ``process()`` functions. +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | Function | Description | diff --git a/tutorials/shaders/shader_reference/shading_language.rst b/tutorials/shaders/shader_reference/shading_language.rst index e63bfccef23d..3982f6149f6e 100644 --- a/tutorials/shaders/shader_reference/shading_language.rst +++ b/tutorials/shaders/shader_reference/shading_language.rst @@ -1018,6 +1018,10 @@ Per-instance uniforms Per-instance uniforms are only available in ``spatial`` (3D) shaders. +.. note:: + + Per-instance uniforms are not supported when using the Compatibility renderer. + Sometimes, you want to modify a parameter on each node using the material. As an example, in a forest full of trees, when you want each tree to have a slightly different color that is editable by hand. Without per-instance uniforms, this diff --git a/tutorials/shaders/shader_reference/sky_shader.rst b/tutorials/shaders/shader_reference/sky_shader.rst index 00d114c500df..08a9424fc57e 100644 --- a/tutorials/shaders/shader_reference/sky_shader.rst +++ b/tutorials/shaders/shader_reference/sky_shader.rst @@ -183,7 +183,7 @@ There are 4 ``LIGHTX`` lights, accessed as ``LIGHT0``, ``LIGHT1``, ``LIGHT2``, a | in float **TAU** | A ``TAU`` constant (``6.283185``). | | | An equivalent of ``PI * 2`` and amount of radians in full turn. | +---------------------------------+--------------------------------------------------------------------------------------------------------------------------+ -| in float **E** | A ``E`` constant (``2.718281``). | +| in float **E** | An ``E`` constant (``2.718281``). | | | Euler's number and a base of the natural logarithm. | +---------------------------------+--------------------------------------------------------------------------------------------------------------------------+ diff --git a/tutorials/shaders/shader_reference/spatial_shader.rst b/tutorials/shaders/shader_reference/spatial_shader.rst index ac6e21ddd67e..e2deb399254e 100644 --- a/tutorials/shaders/shader_reference/spatial_shader.rst +++ b/tutorials/shaders/shader_reference/spatial_shader.rst @@ -107,7 +107,7 @@ Global built-ins are available everywhere, including custom functions. | in float **TAU** | A ``TAU`` constant (``6.283185``). | | | An equivalent of ``PI * 2`` and amount of radians in full turn. | +-------------------+----------------------------------------------------------------------------------------+ -| in float **E** | A ``E`` constant (``2.718281``). Euler's number and a base of the natural logarithm. | +| in float **E** | An ``E`` constant (``2.718281``). Euler's number and a base of the natural logarithm. | +-------------------+----------------------------------------------------------------------------------------+ Vertex built-ins @@ -130,7 +130,8 @@ it manually with the following code: void vertex() { VERTEX = (MODELVIEW_MATRIX * vec4(VERTEX, 1.0)).xyz; NORMAL = normalize((MODELVIEW_MATRIX * vec4(NORMAL, 0.0)).xyz); - // same as above for binormal and tangent, if normal mapping is used + BINORMAL = normalize((MODELVIEW_MATRIX * vec4(BINORMAL, 0.0)).xyz); + TANGENT = normalize((MODELVIEW_MATRIX * vec4(TANGENT, 0.0)).xyz); } Other built-ins, such as UV, UV2 and COLOR, are also passed through to the fragment function if not modified. diff --git a/tutorials/ui/gui_containers.rst b/tutorials/ui/gui_containers.rst index 9dcd19567a28..f5aac4ab123f 100644 --- a/tutorials/ui/gui_containers.rst +++ b/tutorials/ui/gui_containers.rst @@ -74,7 +74,7 @@ Box Containers Arranges child controls vertically or horizontally (via :ref:`HBoxContainer ` and :ref:`VBoxContainer `). In the opposite of the designated direction -(as in, vertical for an horizontal container), it just expands the children. +(as in, vertical for a horizontal container), it just expands the children. .. image:: img/containers_box.png @@ -162,15 +162,15 @@ As in the example above, one of the most common ways to use this container is to AspectRatioContainer ^^^^^^^^^^^^^^^^^^^^ -A container type that arranges its child controls in a way that preserves their proportions +A container type that arranges its child controls in a way that preserves their proportions automatically when the container is resized. (via :ref:`AspectRatioContainer `). -It has multiple stretch modes, providing options for adjusting the child controls' sizes concerning the container: +It has multiple stretch modes, providing options for adjusting the child controls' sizes concerning the container: "fill," "width control height," "height control width," and "cover." .. image:: img/containers_aspectratio.webp -useful when you have a container that needs to be dynamic and responsive to different screen sizes, +useful when you have a container that needs to be dynamic and responsive to different screen sizes, and you want the child elements to scale proportionally without losing their intended shapes. .. image:: img/containers_aspectratio_drag.webp @@ -178,9 +178,9 @@ and you want the child elements to scale proportionally without losing their int FlowContainer ^^^^^^^^^^^^^^ -FlowContainer is a container that arranges its child controls either horizontally or vertically, +FlowContainer is a container that arranges its child controls either horizontally or vertically, (via :ref:`HFlowContainer ` and via :ref:`VFlowContainer `). -and when the available space runs out, it wraps the children to the next line or column, similar to how text wraps in a book. +and when the available space runs out, it wraps the children to the next line or column, similar to how text wraps in a book. .. image:: img/containers_hflow.webp @@ -192,7 +192,7 @@ useful for creating flexible layouts where the child controls adjust automatical CenterContainer ^^^^^^^^^^^^^^^^^^^^ -CenterContainer is a container that automatically keeps all of its child controls centered within it at their minimum size. +CenterContainer is a container that automatically keeps all of its child controls centered within it at their minimum size. It ensures that the child controls are always aligned to the center, making it easier to create centered layouts without manual positioning. (via :ref:`CenterContainer `). diff --git a/tutorials/ui/gui_using_theme_editor.rst b/tutorials/ui/gui_using_theme_editor.rst index 6ef02d42f380..8fcf9e683f60 100644 --- a/tutorials/ui/gui_using_theme_editor.rst +++ b/tutorials/ui/gui_using_theme_editor.rst @@ -109,7 +109,7 @@ edited in the Inspector dock instead. .. figure:: img/theme_item_inspector.png :align: center -Styleboxes have an unique feature available, where you can pin an individual +Styleboxes have a unique feature available, where you can pin an individual stylebox from the list. Pinned stylebox acts like the leader of the pack, and all styleboxes of the same type are updated alongside it when you change its properties. This allows you to edit properties of several styleboxes at the diff --git a/tutorials/xr/deploying_to_android.rst b/tutorials/xr/deploying_to_android.rst index 639701c0bd03..ea7aac83633b 100644 --- a/tutorials/xr/deploying_to_android.rst +++ b/tutorials/xr/deploying_to_android.rst @@ -62,6 +62,12 @@ Enable the **GodotOpenXRVendors** plugin. .. image:: img/xr_enable_vendors_plugin.webp +.. note:: + This is no longer required from vendors plugin 2.0.3 onwards as it now uses GDExtension. + The plugin will not be shown in this list. + You can verify it is installed correctly by checking if the export presets contain + the entries described below. + Creating the export presets --------------------------- You will need to setup a separate export preset for each device, as each device will need its own loader included. diff --git a/tutorials/xr/img/openxr_eye_gaze_interaction.webp b/tutorials/xr/img/openxr_eye_gaze_interaction.webp new file mode 100644 index 000000000000..81b683247a53 Binary files /dev/null and b/tutorials/xr/img/openxr_eye_gaze_interaction.webp differ diff --git a/tutorials/xr/img/openxr_settings.webp b/tutorials/xr/img/openxr_settings.webp new file mode 100644 index 000000000000..b6047feef511 Binary files /dev/null and b/tutorials/xr/img/openxr_settings.webp differ diff --git a/tutorials/xr/index.rst b/tutorials/xr/index.rst index 44c884d378a2..5cbd5acae3a1 100644 --- a/tutorials/xr/index.rst +++ b/tutorials/xr/index.rst @@ -3,6 +3,9 @@ XR == +This section of the manual covers everything related to XR ( +Virtual Reality and Augmented Reality). + Basic Tutorial -------------- @@ -23,12 +26,8 @@ Advanced topics :maxdepth: 1 :name: openxr-advanced-topics + openxr_settings xr_action_map xr_room_scale openxr_hand_tracking openxr_passthrough - -.. note:: - - Documentation for XR in Godot 4.0 XR is still a work in progress. - Please check back in the future. diff --git a/tutorials/xr/openxr_settings.rst b/tutorials/xr/openxr_settings.rst new file mode 100644 index 000000000000..a668267df42e --- /dev/null +++ b/tutorials/xr/openxr_settings.rst @@ -0,0 +1,253 @@ +.. _doc_openxr_settings: + +OpenXR Settings +=============== + +OpenXR has its own set of settings that are applied when OpenXR starts. +While it is possible for OpenXR extensions implemented through Godot plugins to add additional settings, +we will only discuss the settings in the core of Godot here. + +.. image:: img/openxr_settings.png + +Enabled +------- + +This setting enables the OpenXR module when Godot starts. +This is required when the Vulkan backend is used. +For other backends you can enable OpenXR at any time by calling ``initialize`` on the :ref:`OpenXRInterface `. + +This also needs to be enabled to get access to the action map editor. + +You can use the ``--xr-mode on`` command line switch to force this to on. + +Default Action Map +------------------ + +This specifies the path of the action map file that OpenXR will load and communicate to the XR Runtime. + +Form Factor +----------- + +This specifies whether your game is designed for: + +- ``Head Mounted`` devices such as a Meta Quest, Valve Index, or Magic Leap, +- ``Handheld`` devices such as phones. + +If the device on which you run your game does not match the selection here, OpenXR will fail to initialise. + +View Configuration +------------------ + +This specifies the view configuration your game is designed for: + +- ``Mono``, your game provides a single image output. E.g. phone based AR; +- ``Stereo``, your game provides stereo image output. E.g. head mounted devices. + +If the device on which you run your game does not match the selection here, OpenXR will fail to initialise. + +.. note:: + OpenXR has additional view configurations for very specific devices that Godot doesn't support yet. + For instance, Varjo headsets have a quad view configuration that outputs two sets of stereo images. + These may be supported in the near future. + +Reference Space +--------------- + +Within XR all elements like the player's head and hands are tracked within a tracking volume. +At the base of this tracking volume is our origin point, which maps our virtual space to the real space. +There are however different scenarios that place this point in different locations, +depending on the XR system used. +In OpenXR these scenarios are well defined and selected by setting a reference space. + +Local +^^^^^ + +The local reference space places our origin point at the player's head by default. +Some XR runtimes will do this each time your game starts, others will make the position persist over sessions. + +This reference space however does not prevent the user from walking away so you will need to detect if the user does so +if you wish to prevent the user from leaving the vehicle they are controlling, which could potentially be game breaking. + +This reference space is the best option for games like flight simulators or racing simulators +where we want to place the :ref:`XROrigin3D ` node where the player's head should be. + +When the user enacts the recenter option on their headset, the method of which is different per XR runtime, +the XR runtime will move the :ref:`XRCamera3D ` to the :ref:`XROrigin3D ` node. +The :ref:`OpenXRInterface ` will also emit the ``pose_recentered`` signal +so your game can react accordingly. + +.. Note:: + Any other XR tracked elements such as controllers or anchors will also be adjusted accordingly. + +.. Warning:: + You should **not** call ``center_on_hmd`` when using this reference space. + +Stage +^^^^^ + +The stage reference space is our default reference space and places our origin point at the center of our play space. +For XR runtimes that allow you to draw out a guardian boundary this location and its orientation is often set by the user. +Other XR runtimes may decide on the placement of this point by other means. +It is however a stationary point in the real world. + +This reference space is the best option for room scale games where the user is expected to walk around a larger space, +or for games where there is a need to switch between game modes. +See :ref:`Room Scale ` for more information. + +When the user enacts the recenter option on their headset, the method of which is different per XR runtime, +the XR runtime will not change the origin point. +The :ref:`OpenXRInterface ` will emit the ``pose_recentered`` signal +and it is up to the game to react appropriately. +Not doing so will prevent your game from being accepted on various stores. + +In Godot you can do this by calling the ``center_on_hmd`` function on the :ref:`XRServer `: + +- Calling ``XRServer.center_on_hmd(XRServer.RESET_BUT_KEEP_TILT, true)`` will move the :ref:`XRCamera3D ` node + to the :ref:`XROrigin3D ` node similar to the ``Local`` reference space. +- Calling ``XRServer.center_on_hmd(XRServer.RESET_BUT_KEEP_TILT, true)`` will move the :ref:`XRCamera3D ` node + above the :ref:`XROrigin3D ` node keeping the player's height, similar to the ``Local Floor`` reference space. + +.. Note:: + Any other XR tracked elements such as controllers or anchors will also be adjusted accordingly. + +Local Floor +^^^^^^^^^^^ + +The local floor reference space is similar to the local reference space as it positions the origin point where the player is. +In this mode however the height of the player is kept. +Same as with the local reference space, some XR runtimes will persist this location over sessions. + +It is thus not guaranteed the player will be standing on the origin point, +the only guarantee is that they were standing there when the user last recentered. +The player is thus also free to walk away. + +This reference space is the best option of games where the user is expected to stand in the same location +or for AR type games where the user's interface elements are bound to the origin node +and are quickly placed at the player's location on recenter. + +When the user enacts the recenter option on their headset, the method of which is different per XR runtime, +the XR runtime will move the :ref:`XRCamera3D ` above the :ref:`XROrigin3D ` node +but keeping the player's height. +The :ref:`OpenXRInterface ` will also emit the ``pose_recentered`` signal +so your game can react accordingly. + +.. Warning:: + Be careful using this mode in combination with virtual movement of the player. + The user recentering in this scenario can be unpredictable unless you counter the move when handling the recenter signal. + This can even be game breaking as the effect in this scenario would be the player teleporting to whatever abstract location + the origin point was placed at during virtual movement, including the ability for players teleporting into + locations that should be off limits. + It is better to use the Stage mode in this scenario and limit resetting to orientation only when a ``pose_recentered`` signal is received. + +.. Note:: + Any other XR tracked elements such as controllers or anchors will also be adjusted accordingly. + +.. Warning:: + You should **not** call ``center_on_hmd`` when using this reference space. + +Environment Blend Mode +---------------------- + +The environment blend mode defines how our rendered output is blended into "the real world" provided this is supported by the headset. + +- ``Opaque`` means our output obscures the real world, we are in VR mode. +- ``Additive`` means our output is added to the real world, + this is an AR mode where optics do not allow us to fully obscure the real world (e.g. Hololens), +- ``Alpha`` means our output is blended with the real world using the alpha output (viewport should have transparent background enabled), + this is an AR mode where optics can fully obscure the real world (Magic Leap, all pass through devices, etc.). + +If a mode is selected that is not supported by the headset, the first available mode will be selected. + +.. Note:: + Some OpenXR devices have separate systems for enabling/disabling passthrough. + From Godot 4.3 onwards selecting the alpha blend mode will also perform these extra steps. + This does require the latest vendor plugin to be installed. + +Foveation Level +--------------- + +Sets the foveation level used when rendering provided this feature is supported by the hardware used. +Foveation is a technique where the further away from the center of the viewport we render content, the lower resolution we render at. +Most XR runtimes only support fixed foveation, but some will take eye tracking into account and use the focal point for this effect. + +The higher the level, the better the performance gains, but also the more reduction in quality there is in the users peripheral vision. + +.. Note:: + **Compatibility renderer only**, + for Mobile and Forward+ renderer, set the ``vrs_mode`` property on :ref:`Viewport ` to ``VRS_XR``. + +.. Warning:: + This feature is disabled if post effects are used such as glow, bloom, or DOF. + +Foveation Dynamic +----------------- + +When enabled the foveation level will be adjusted automatically depending on current GPU load. +It will be adjusted between low and the select foveation level in the previous setting. +It is therefore best to combine this setting with foveation level set to high. + +.. Note:: + **Compatibility renderer only** + +Submit Depth Buffer +------------------- + +If enabled an OpenXR supplied depth buffer will be used while rendering which is submitted alongside the rendered image. +The XR runtime can use this for improved reprojection. + +.. Note:: + Enabling this feature will disable stencil support during rendering. + Not many XR runtimes make use of this, + it is advised to leave this setting off unless it provides noticeable benefits for your use case. + +Startup Alert +------------- + +If enabled this will result in an alert message presented to the user if OpenXR fails to start. +We don't always receive feedback from the XR system as to why starting fails. If we do we log this to the console. +Common failure reasons are: + +- No OpenXR runtime is installed on the host system. +- Microsofts WMR OpenXR runtime is currently active, this only supports DirectX and will fail if OpenGL or Vulkan is used. +- SteamVR is used but no headset is connected/turned on. + +Disable this if you support a fallback mode in your game so it can be played in desktop mode when no VR headset is connected, +or if you're handling the failure condition yourself by checking ``OpenXRInterface.is_initialized()``. + +Extensions +---------- + +This subsection provides access to various optional OpenXR extensions. + +Hand Tracking +^^^^^^^^^^^^^ + +This enables the hand tracking extension when supported by the device used. This is on by default for legacy reasons. +The hand tracking extension provides access to data that allows you to visualise the user's hands with correct finger positions. +Depending on platform capabilities the hand tracking data can be inferred from controller inputs, come from data gloves, +come from optical hand tracking sensors or any other applicable source. + +If your game only supports controllers this should be turned off. + +See the chapter on :ref:`hand tracking ` for additional details. + +Eye Gaze Interaction +^^^^^^^^^^^^^^^^^^^^ + +This enables the eye gaze interaction extension when supported by the device used. +When enabled we will get feedback from eye tracking through a pose situated between the user's eyes +orientated in the direction the user is looking. This will be a unified orientation. + +In order to use this functionality you need to edit your action map and add a new pose action, +say ``eye_pose``. +Now add a new interaction profile for the eye gaze interaction and map the ``eye_pose``: + +.. image:: img/openxr_eye_gaze_interaction.webp + +Don't forget to save! + +Next add a new :ref:`XRController3D ` node to your origin node +and set its ``tracker`` property to ``/user/eyes_ext`` +and set its ``pose`` property to ``eye_pose``. + +Now you can add things to this controller node such as a raycast, and control things with your eyes. diff --git a/tutorials/xr/xr_room_scale.rst b/tutorials/xr/xr_room_scale.rst index 0d5c9fdb49bb..97f4fc919db6 100644 --- a/tutorials/xr/xr_room_scale.rst +++ b/tutorials/xr/xr_room_scale.rst @@ -22,7 +22,7 @@ This node is moved by processing traditional controller, mouse or keyboard input A camera is attached to this node at a location roughly where the player's head will be. Applying this model to the XR setup, we add an :ref:`XROrigin3D ` node as a child of the character body, -and add a :ref:`XRCamera3D ` as a child of the origin node. At face value this seems to work. +and add an :ref:`XRCamera3D ` as a child of the origin node. At face value this seems to work. However, upon closer examination this model does not take into account that there are two forms of movement in XR. The movement through controller input, and the physical movement of the player in the real world.