diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index 598bf2ad0..4f5e6008a 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -673,7 +673,7 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_RANGE` -Export a property with :ref:`@GlobalScope.PROPERTY_USAGE_STORAGE` flag. The property is not displayed in the editor, but it is serialized and stored in the scene or resource file. This can be useful for :ref:`@tool` scripts. Also the property value is copied when :ref:`Resource.duplicate` or :ref:`Node.duplicate` is called, unlike non-exported variables. +Export a property with :ref:`@GlobalScope.PROPERTY_USAGE_STORAGE` flag. The property is not displayed in the editor, but it is serialized and stored in the scene or resource file. This can be useful for :ref:`@tool` scripts. Also the property value is copied when :ref:`Resource.duplicate()` or :ref:`Node.duplicate()` is called, unlike non-exported variables. :: @@ -732,7 +732,7 @@ See also :ref:`@GlobalScope.PROPERTY_USAGE_SUBGROUP` property as a clickable button with the label ``text``. When the button is pressed, the callable is called. -If ``icon`` is specified, it is used to fetch an icon for the button via :ref:`Control.get_theme_icon`, from the ``"EditorIcons"`` theme type. If ``icon`` is omitted, the default ``"Callable"`` icon is used instead. +If ``icon`` is specified, it is used to fetch an icon for the button via :ref:`Control.get_theme_icon()`, from the ``"EditorIcons"`` theme type. If ``icon`` is omitted, the default ``"Callable"`` icon is used instead. Consider using the :ref:`EditorUndoRedoManager` to allow the action to be reverted safely. @@ -759,13 +759,13 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_TOOL_BUTTON` flag because a :ref:`Callable` cannot be properly serialized and stored in a file. -\ **Note:** In an exported project neither :ref:`EditorInterface` nor :ref:`EditorUndoRedoManager` exist, which may cause some scripts to break. To prevent this, you can use :ref:`Engine.get_singleton` and omit the static type from the variable declaration: +\ **Note:** In an exported project neither :ref:`EditorInterface` nor :ref:`EditorUndoRedoManager` exist, which may cause some scripts to break. To prevent this, you can use :ref:`Engine.get_singleton()` and omit the static type from the variable declaration: :: var undo_redo = Engine.get_singleton(&"EditorInterface").get_editor_undo_redo() -\ **Note:** Avoid storing lambda callables in member variables of :ref:`RefCounted`-based classes (e.g. resources), as this can lead to memory leaks. Use only method callables and optionally :ref:`Callable.bind` or :ref:`Callable.unbind`. +\ **Note:** Avoid storing lambda callables in member variables of :ref:`RefCounted`-based classes (e.g. resources), as this can lead to memory leaks. Use only method callables and optionally :ref:`Callable.bind()` or :ref:`Callable.unbind()`. .. rst-class:: classref-item-separator @@ -799,7 +799,7 @@ Add a custom icon to the current script. The icon specified at ``icon_path`` is **@onready**\ (\ ) :ref:`πŸ”—` -Mark the following property as assigned when the :ref:`Node` is ready. Values for these properties are not assigned immediately when the node is initialized (:ref:`Object._init`), and instead are computed and stored right before :ref:`Node._ready`. +Mark the following property as assigned when the :ref:`Node` is ready. Values for these properties are not assigned immediately when the node is initialized (:ref:`Object._init()`), and instead are computed and stored right before :ref:`Node._ready()`. :: @@ -817,9 +817,9 @@ Mark the following property as assigned when the :ref:`Node` is read Mark the following method for remote procedure calls. See :doc:`High-level multiplayer <../tutorials/networking/high_level_multiplayer>`. -If ``mode`` is set as ``"any_peer"``, allows any peer to call this RPC function. Otherwise, only the authority peer is allowed to call it and ``mode`` should be kept as ``"authority"``. When configuring functions as RPCs with :ref:`Node.rpc_config`, each of these modes respectively corresponds to the :ref:`MultiplayerAPI.RPC_MODE_AUTHORITY` and :ref:`MultiplayerAPI.RPC_MODE_ANY_PEER` RPC modes. See :ref:`RPCMode`. If a peer that is not the authority tries to call a function that is only allowed for the authority, the function will not be executed. If the error can be detected locally (when the RPC configuration is consistent between the local and the remote peer), an error message will be displayed on the sender peer. Otherwise, the remote peer will detect the error and print an error there. +If ``mode`` is set as ``"any_peer"``, allows any peer to call this RPC function. Otherwise, only the authority peer is allowed to call it and ``mode`` should be kept as ``"authority"``. When configuring functions as RPCs with :ref:`Node.rpc_config()`, each of these modes respectively corresponds to the :ref:`MultiplayerAPI.RPC_MODE_AUTHORITY` and :ref:`MultiplayerAPI.RPC_MODE_ANY_PEER` RPC modes. See :ref:`RPCMode`. If a peer that is not the authority tries to call a function that is only allowed for the authority, the function will not be executed. If the error can be detected locally (when the RPC configuration is consistent between the local and the remote peer), an error message will be displayed on the sender peer. Otherwise, the remote peer will detect the error and print an error there. -If ``sync`` is set as ``"call_remote"``, the function will only be executed on the remote peer, but not locally. To run this function locally too, set ``sync`` to ``"call_local"``. When configuring functions as RPCs with :ref:`Node.rpc_config`, this is equivalent to setting ``call_local`` to ``true``. +If ``sync`` is set as ``"call_remote"``, the function will only be executed on the remote peer, but not locally. To run this function locally too, set ``sync`` to ``"call_local"``. When configuring functions as RPCs with :ref:`Node.rpc_config()`, this is equivalent to setting ``call_local`` to ``true``. The ``transfer_mode`` accepted values are ``"unreliable"``, ``"unreliable_ordered"``, or ``"reliable"``. It sets the transfer mode of the underlying :ref:`MultiplayerPeer`. See :ref:`MultiplayerPeer.transfer_mode`. @@ -950,9 +950,9 @@ Method Descriptions :ref:`Color` **Color8**\ (\ r8\: :ref:`int`, g8\: :ref:`int`, b8\: :ref:`int`, a8\: :ref:`int` = 255\ ) :ref:`πŸ”—` -**Deprecated:** Use :ref:`Color.from_rgba8` instead. +**Deprecated:** Use :ref:`Color.from_rgba8()` instead. -Returns a :ref:`Color` constructed from red (``r8``), green (``g8``), blue (``b8``), and optionally alpha (``a8``) integer channels, each divided by ``255.0`` for their final value. Using :ref:`Color8` instead of the standard :ref:`Color` constructor is useful when you need to match exact color values in an :ref:`Image`. +Returns a :ref:`Color` constructed from red (``r8``), green (``g8``), blue (``b8``), and optionally alpha (``a8``) integer channels, each divided by ``255.0`` for their final value. Using :ref:`Color8()` instead of the standard :ref:`Color` constructor is useful when you need to match exact color values in an :ref:`Image`. :: @@ -960,7 +960,7 @@ Returns a :ref:`Color` constructed from red (``r8``), green (``g8`` var dark_blue = Color8(0, 0, 51) # Same as Color(0, 0, 0.2). var my_color = Color8(306, 255, 0, 102) # Same as Color(1.2, 1, 0, 0.4). -\ **Note:** Due to the lower precision of :ref:`Color8` compared to the standard :ref:`Color` constructor, a color created with :ref:`Color8` will generally not be equal to the same color created with the standard :ref:`Color` constructor. Use :ref:`Color.is_equal_approx` for comparisons to avoid issues with floating-point precision error. +\ **Note:** Due to the lower precision of :ref:`Color8()` compared to the standard :ref:`Color` constructor, a color created with :ref:`Color8()` will generally not be equal to the same color created with the standard :ref:`Color` constructor. Use :ref:`Color.is_equal_approx()` for comparisons to avoid issues with floating-point precision error. .. rst-class:: classref-item-separator @@ -972,11 +972,11 @@ Returns a :ref:`Color` constructed from red (``r8``), green (``g8`` |void| **assert**\ (\ condition\: :ref:`bool`, message\: :ref:`String` = ""\ ) :ref:`πŸ”—` -Asserts that the ``condition`` is ``true``. If the ``condition`` is ``false``, an error is generated. When running from the editor, the running project will also be paused until you resume it. This can be used as a stronger form of :ref:`@GlobalScope.push_error` for reporting errors to project developers or add-on users. +Asserts that the ``condition`` is ``true``. If the ``condition`` is ``false``, an error is generated. When running from the editor, the running project will also be paused until you resume it. This can be used as a stronger form of :ref:`@GlobalScope.push_error()` for reporting errors to project developers or add-on users. An optional ``message`` can be shown in addition to the generic "Assertion failed" message. You can use this to provide additional details about why the assertion failed. -\ **Warning:** For performance reasons, the code inside :ref:`assert` is only executed in debug builds or when running the project from the editor. Don't include code that has side effects in an :ref:`assert` call. Otherwise, the project will behave differently when exported in release mode. +\ **Warning:** For performance reasons, the code inside :ref:`assert()` is only executed in debug builds or when running the project from the editor. Don't include code that has side effects in an :ref:`assert()` call. Otherwise, the project will behave differently when exported in release mode. :: @@ -987,7 +987,7 @@ 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. +\ **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 @@ -1017,7 +1017,7 @@ Returns a single character (as a :ref:`String`) of the given Unico :ref:`Variant` **convert**\ (\ what\: :ref:`Variant`, type\: :ref:`Variant.Type`\ ) :ref:`πŸ”—` -**Deprecated:** Use :ref:`@GlobalScope.type_convert` instead. +**Deprecated:** Use :ref:`@GlobalScope.type_convert()` instead. Converts ``what`` to ``type`` in the best way possible. The ``type`` uses the :ref:`Variant.Type` values. @@ -1040,9 +1040,9 @@ Converts ``what`` to ``type`` in the best way possible. The ``type`` uses the :r :ref:`Object` **dict_to_inst**\ (\ dictionary\: :ref:`Dictionary`\ ) :ref:`πŸ”—` -**Deprecated:** Consider using :ref:`JSON.to_native` or :ref:`Object.get_property_list` instead. +**Deprecated:** Consider using :ref:`JSON.to_native()` or :ref:`Object.get_property_list()` instead. -Converts a ``dictionary`` (created with :ref:`inst_to_dict`) back to an Object instance. Can be useful for deserializing. +Converts a ``dictionary`` (created with :ref:`inst_to_dict()`) back to an Object instance. Can be useful for deserializing. .. rst-class:: classref-item-separator @@ -1054,7 +1054,7 @@ Converts a ``dictionary`` (created with :ref:`inst_to_dict` **get_stack**\ (\ ) :ref:`πŸ”—` -Returns an array of dictionaries representing the current call stack. See also :ref:`print_stack`. +Returns an array of dictionaries representing the current call stack. See also :ref:`print_stack()`. :: @@ -1073,7 +1073,7 @@ Starting from ``_ready()``, ``bar()`` would print: [{function:bar, line:12, source:res://script.gd}, {function:foo, line:9, source:res://script.gd}, {function:_ready, line:6, source:res://script.gd}] -\ **Note:** This function only works if the running instance is connected to a debugging server (i.e. an editor instance). :ref:`get_stack` will not work in projects exported in release mode, or in projects exported in debug mode if not connected to a debugging server. +\ **Note:** This function only works if the running instance is connected to a debugging server (i.e. an editor instance). :ref:`get_stack()` will not work in projects exported in release mode, or in projects exported in debug mode if not connected to a debugging server. \ **Note:** Calling this function from a :ref:`Thread` is not supported. Doing so will return an empty array. @@ -1087,7 +1087,7 @@ Starting from ``_ready()``, ``bar()`` would print: :ref:`Dictionary` **inst_to_dict**\ (\ instance\: :ref:`Object`\ ) :ref:`πŸ”—` -**Deprecated:** Consider using :ref:`JSON.from_native` or :ref:`Object.get_property_list` instead. +**Deprecated:** Consider using :ref:`JSON.from_native()` or :ref:`Object.get_property_list()` instead. Returns the passed ``instance`` converted to a Dictionary. Can be useful for serializing. @@ -1139,9 +1139,9 @@ Unlike the right operand of the ``is`` operator, ``type`` can be a non-constant print(is_instance_of(a, MyClass)) print(is_instance_of(a, MyClass.InnerClass)) -\ **Note:** If ``value`` and/or ``type`` are freed objects (see :ref:`@GlobalScope.is_instance_valid`), or ``type`` is not one of the above options, this method will raise a runtime error. +\ **Note:** If ``value`` and/or ``type`` are freed objects (see :ref:`@GlobalScope.is_instance_valid()`), or ``type`` is not one of the above options, this method will raise a runtime error. -See also :ref:`@GlobalScope.typeof`, :ref:`type_exists`, :ref:`Array.is_same_typed` (and other :ref:`Array` methods). +See also :ref:`@GlobalScope.typeof()`, :ref:`type_exists()`, :ref:`Array.is_same_typed()` (and other :ref:`Array` methods). .. rst-class:: classref-item-separator @@ -1173,7 +1173,7 @@ Returns the length of the given Variant ``var``. The length can be the character :ref:`Resource` **load**\ (\ path\: :ref:`String`\ ) :ref:`πŸ”—` -Returns a :ref:`Resource` from the filesystem located at the absolute ``path``. Unless it's already referenced elsewhere (such as in another script or in the scene), the resource is loaded from disk on function call, which might cause a slight delay, especially when loading large scenes. To avoid unnecessary delays when loading something multiple times, either store the resource in a variable or use :ref:`preload`. This method is equivalent of using :ref:`ResourceLoader.load` with :ref:`ResourceLoader.CACHE_MODE_REUSE`. +Returns a :ref:`Resource` from the filesystem located at the absolute ``path``. Unless it's already referenced elsewhere (such as in another script or in the scene), the resource is loaded from disk on function call, which might cause a slight delay, especially when loading large scenes. To avoid unnecessary delays when loading something multiple times, either store the resource in a variable or use :ref:`preload()`. This method is equivalent of using :ref:`ResourceLoader.load()` with :ref:`ResourceLoader.CACHE_MODE_REUSE`. \ **Note:** Resource paths can be obtained by right-clicking on a resource in the FileSystem dock and choosing "Copy Path", or by dragging the file from the FileSystem dock into the current script. @@ -1184,11 +1184,11 @@ Returns a :ref:`Resource` from the filesystem located at the abs \ **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. +This function is a simplified version of :ref:`ResourceLoader.load()`, which can be used for more advanced scenarios. -\ **Note:** Files have to be imported into the engine first to load them using this function. If you want to load :ref:`Image`\ s at run-time, you may use :ref:`Image.load`. If you want to import audio files, you can use the snippet described in :ref:`AudioStreamMP3.data`. +\ **Note:** Files have to be imported into the engine first to load them using this function. If you want to load :ref:`Image`\ s at run-time, you may use :ref:`Image.load()`. If you want to import audio files, you can use the snippet described in :ref:`AudioStreamMP3.data`. -\ **Note:** If :ref:`ProjectSettings.editor/export/convert_text_resources_to_binary` is ``true``, :ref:`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:** If :ref:`ProjectSettings.editor/export/convert_text_resources_to_binary` is ``true``, :ref:`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``. .. rst-class:: classref-item-separator @@ -1200,7 +1200,7 @@ This function is a simplified version of :ref:`ResourceLoader.load` **preload**\ (\ path\: :ref:`String`\ ) :ref:`πŸ”—` -Returns a :ref:`Resource` from the filesystem located at ``path``. During run-time, the resource is loaded when the script is being parsed. This function effectively acts as a reference to that resource. Note that this function requires ``path`` to be a constant :ref:`String`. If you want to load a resource from a dynamic/variable path, use :ref:`load`. +Returns a :ref:`Resource` from the filesystem located at ``path``. During run-time, the resource is loaded when the script is being parsed. This function effectively acts as a reference to that resource. Note that this function requires ``path`` to be a constant :ref:`String`. If you want to load a resource from a dynamic/variable path, use :ref:`load()`. \ **Note:** Resource paths can be obtained by right-clicking on a resource in the Assets Panel and choosing "Copy Path", or by dragging the file from the FileSystem dock into the current script. @@ -1209,7 +1209,7 @@ 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`. +\ **Note:** :ref:`preload()` is a keyword, not a function. So you cannot access it as a :ref:`Callable`. .. rst-class:: classref-item-separator @@ -1221,7 +1221,7 @@ Returns a :ref:`Resource` from the filesystem located at ``path` |void| **print_debug**\ (\ ...\ ) |vararg| :ref:`πŸ”—` -Like :ref:`@GlobalScope.print`, but includes the current stack frame when running with the debugger turned on. +Like :ref:`@GlobalScope.print()`, but includes the current stack frame when running with the debugger turned on. The output in the console may look like the following: @@ -1242,7 +1242,7 @@ The output in the console may look like the following: |void| **print_stack**\ (\ ) :ref:`πŸ”—` -Prints a stack trace at the current code location. See also :ref:`get_stack`. +Prints a stack trace at the current code location. See also :ref:`get_stack()`. The output in the console may look like the following: @@ -1250,7 +1250,7 @@ The output in the console may look like the following: Frame 0 - res://test.gd:16 in function '_process' -\ **Note:** This function only works if the running instance is connected to a debugging server (i.e. an editor instance). :ref:`print_stack` will not work in projects exported in release mode, or in projects exported in debug mode if not connected to a debugging server. +\ **Note:** This function only works if the running instance is connected to a debugging server (i.e. an editor instance). :ref:`print_stack()` will not work in projects exported in release mode, or in projects exported in debug mode if not connected to a debugging server. \ **Note:** Calling this function from a :ref:`Thread` is not supported. Doing so will instead print the thread ID. @@ -1264,7 +1264,7 @@ The output in the console may look like the following: :ref:`Array` **range**\ (\ ...\ ) |vararg| :ref:`πŸ”—` -Returns an array with the given range. :ref:`range` can be called in three ways: +Returns an array with the given range. :ref:`range()` can be called in three ways: \ ``range(n: int)``: Starts from 0, increases by steps of 1, and stops *before* ``n``. The argument ``n`` is **exclusive**. @@ -1272,7 +1272,7 @@ Returns an array with the given range. :ref:`range \ ``range(b: int, n: int, s: int)``: Starts from ``b``, increases/decreases by steps of ``s``, and stops *before* ``n``. The arguments ``b`` and ``n`` are **inclusive** and **exclusive**, respectively. The argument ``s`` **can** be negative, but not ``0``. If ``s`` is ``0``, an error message is printed. -\ :ref:`range` converts all arguments to :ref:`int` before processing. +\ :ref:`range()` converts all arguments to :ref:`int` before processing. \ **Note:** Returns an empty array if no value meets the value constraint (e.g. ``range(2, 5, -1)`` or ``range(5, 5, 1)``). diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 4b0abb5f6..646670bd6 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -487,7 +487,7 @@ enum **ClockDirection**: :ref:`πŸ”—` :ref:`ClockDirection` **CLOCKWISE** = ``0`` -Clockwise rotation. Used by some methods (e.g. :ref:`Image.rotate_90`). +Clockwise rotation. Used by some methods (e.g. :ref:`Image.rotate_90()`). .. _class_@GlobalScope_constant_COUNTERCLOCKWISE: @@ -495,7 +495,7 @@ Clockwise rotation. Used by some methods (e.g. :ref:`Image.rotate_90` **COUNTERCLOCKWISE** = ``1`` -Counter-clockwise rotation. Used by some methods (e.g. :ref:`Image.rotate_90`). +Counter-clockwise rotation. Used by some methods (e.g. :ref:`Image.rotate_90()`). .. rst-class:: classref-item-separator @@ -2407,7 +2407,7 @@ enum **KeyLocation**: :ref:`πŸ”—` Used for keys which only appear once, or when a comparison doesn't need to differentiate the ``LEFT`` and ``RIGHT`` versions. -For example, when using :ref:`InputEvent.is_match`, an event which has :ref:`KEY_LOCATION_UNSPECIFIED` will match any :ref:`KeyLocation` on the passed event. +For example, when using :ref:`InputEvent.is_match()`, an event which has :ref:`KEY_LOCATION_UNSPECIFIED` will match any :ref:`KeyLocation` on the passed event. .. _class_@GlobalScope_constant_KEY_LOCATION_LEFT: @@ -3995,7 +3995,7 @@ Editing the property prompts the user for restarting the editor. :ref:`PropertyUsageFlags` **PROPERTY_USAGE_SCRIPT_VARIABLE** = ``4096`` -The property is a script variable. :ref:`PROPERTY_USAGE_SCRIPT_VARIABLE` can be used to distinguish between exported script variables from built-in variables (which don't have this usage flag). By default, :ref:`PROPERTY_USAGE_SCRIPT_VARIABLE` is **not** applied to variables that are created by overriding :ref:`Object._get_property_list` in a script. +The property is a script variable. :ref:`PROPERTY_USAGE_SCRIPT_VARIABLE` can be used to distinguish between exported script variables from built-in variables (which don't have this usage flag). By default, :ref:`PROPERTY_USAGE_SCRIPT_VARIABLE` is **not** applied to variables that are created by overriding :ref:`Object._get_property_list()` in a script. .. _class_@GlobalScope_constant_PROPERTY_USAGE_STORE_IF_NULL: @@ -4053,7 +4053,7 @@ The property is an array. :ref:`PropertyUsageFlags` **PROPERTY_USAGE_ALWAYS_DUPLICATE** = ``524288`` -When duplicating a resource with :ref:`Resource.duplicate`, and this flag is set on a property of that resource, the property should always be duplicated, regardless of the ``subresources`` bool parameter. +When duplicating a resource with :ref:`Resource.duplicate()`, and this flag is set on a property of that resource, the property should always be duplicated, regardless of the ``subresources`` bool parameter. .. _class_@GlobalScope_constant_PROPERTY_USAGE_NEVER_DUPLICATE: @@ -4061,7 +4061,7 @@ When duplicating a resource with :ref:`Resource.duplicate` **PROPERTY_USAGE_NEVER_DUPLICATE** = ``1048576`` -When duplicating a resource with :ref:`Resource.duplicate`, and this flag is set on a property of that resource, the property should never be duplicated, regardless of the ``subresources`` bool parameter. +When duplicating a resource with :ref:`Resource.duplicate()`, and this flag is set on a property of that resource, the property should never be duplicated, regardless of the ``subresources`` bool parameter. .. _class_@GlobalScope_constant_PROPERTY_USAGE_HIGH_END_GFX: @@ -4217,7 +4217,7 @@ Flag for a static method. :ref:`MethodFlags` **METHOD_FLAG_OBJECT_CORE** = ``64`` -Used internally. Allows to not dump core virtual methods (such as :ref:`Object._notification`) to the JSON API. +Used internally. Allows to not dump core virtual methods (such as :ref:`Object._notification()`) to the JSON API. .. _class_@GlobalScope_constant_METHOD_FLAGS_DEFAULT: @@ -5269,7 +5269,7 @@ Returns the absolute value of a :ref:`Variant` parameter ``x`` (i var f = abs(Vector3i(-7, -8, -9)) # f is (7, 8, 9) -\ **Note:** For better type safety, use :ref:`absf`, :ref:`absi`, :ref:`Vector2.abs`, :ref:`Vector2i.abs`, :ref:`Vector3.abs`, :ref:`Vector3i.abs`, :ref:`Vector4.abs`, or :ref:`Vector4i.abs`. +\ **Note:** For better type safety, use :ref:`absf()`, :ref:`absi()`, :ref:`Vector2.abs()`, :ref:`Vector2i.abs()`, :ref:`Vector3.abs()`, :ref:`Vector3i.abs()`, :ref:`Vector4.abs()`, or :ref:`Vector4i.abs()`. .. rst-class:: classref-item-separator @@ -5315,7 +5315,7 @@ Returns the absolute value of int parameter ``x`` (i.e. positive value). :ref:`float` **acos**\ (\ x\: :ref:`float`\ ) :ref:`πŸ”—` -Returns the arc cosine of ``x`` in radians. Use to get the angle of cosine ``x``. ``x`` will be clamped between ``-1.0`` and ``1.0`` (inclusive), in order to prevent :ref:`acos` from returning :ref:`@GDScript.NAN`. +Returns the arc cosine of ``x`` in radians. Use to get the angle of cosine ``x``. ``x`` will be clamped between ``-1.0`` and ``1.0`` (inclusive), in order to prevent :ref:`acos()` from returning :ref:`@GDScript.NAN`. :: @@ -5332,7 +5332,7 @@ Returns the arc cosine of ``x`` in radians. Use to get the angle of cosine ``x`` :ref:`float` **acosh**\ (\ x\: :ref:`float`\ ) :ref:`πŸ”—` -Returns the hyperbolic arc (also called inverse) cosine of ``x``, returning a value in radians. Use it to get the angle from an angle's cosine in hyperbolic space if ``x`` is larger or equal to 1. For values of ``x`` lower than 1, it will return 0, in order to prevent :ref:`acosh` from returning :ref:`@GDScript.NAN`. +Returns the hyperbolic arc (also called inverse) cosine of ``x``, returning a value in radians. Use it to get the angle from an angle's cosine in hyperbolic space if ``x`` is larger or equal to 1. For values of ``x`` lower than 1, it will return 0, in order to prevent :ref:`acosh()` from returning :ref:`@GDScript.NAN`. :: @@ -5363,7 +5363,7 @@ Returns the difference between the two angles (in radians), in the range of ``[- :ref:`float` **asin**\ (\ x\: :ref:`float`\ ) :ref:`πŸ”—` -Returns the arc sine of ``x`` in radians. Use to get the angle of sine ``x``. ``x`` will be clamped between ``-1.0`` and ``1.0`` (inclusive), in order to prevent :ref:`asin` from returning :ref:`@GDScript.NAN`. +Returns the arc sine of ``x`` in radians. Use to get the angle of sine ``x``. ``x`` will be clamped between ``-1.0`` and ``1.0`` (inclusive), in order to prevent :ref:`asin()` from returning :ref:`@GDScript.NAN`. :: @@ -5399,7 +5399,7 @@ Returns the hyperbolic arc (also called inverse) sine of ``x``, returning a valu Returns the arc tangent of ``x`` in radians. Use it to get the angle from an angle's tangent in trigonometry. -The method cannot know in which quadrant the angle should fall. See :ref:`atan2` if you have both ``y`` and ``x``. +The method cannot know in which quadrant the angle should fall. See :ref:`atan2()` if you have both ``y`` and ``x``. :: @@ -5437,7 +5437,7 @@ Important note: The Y coordinate comes first, by convention. Returns the hyperbolic arc (also called inverse) tangent of ``x``, returning a value in radians. Use it to get the angle from an angle's tangent in hyperbolic space if ``x`` is between -1 and 1 (non-inclusive). -In mathematics, the inverse hyperbolic tangent is only defined for -1 < ``x`` < 1 in the real set, so values equal or lower to -1 for ``x`` return negative :ref:`@GDScript.INF` and values equal or higher than 1 return positive :ref:`@GDScript.INF` in order to prevent :ref:`atanh` from returning :ref:`@GDScript.NAN`. +In mathematics, the inverse hyperbolic tangent is only defined for -1 < ``x`` < 1 in the real set, so values equal or lower to -1 for ``x`` return negative :ref:`@GDScript.INF` and values equal or higher than 1 return positive :ref:`@GDScript.INF` in order to prevent :ref:`atanh()` from returning :ref:`@GDScript.NAN`. :: @@ -5483,7 +5483,7 @@ Returns the point at the given ``t`` on a one-dimensional `BΓ©zier curve ` value, without decoding objects. -\ **Note:** If you need object deserialization, see :ref:`bytes_to_var_with_objects`. +\ **Note:** If you need object deserialization, see :ref:`bytes_to_var_with_objects()`. .. rst-class:: classref-item-separator @@ -5516,9 +5516,9 @@ Rounds ``x`` upward (towards positive infinity), returning the smallest whole nu var i = ceil(1.45) # i is 2.0 i = ceil(1.001) # i is 2.0 -See also :ref:`floor`, :ref:`round`, and :ref:`snapped`. +See also :ref:`floor()`, :ref:`round()`, and :ref:`snapped()`. -\ **Note:** For better type safety, use :ref:`ceilf`, :ref:`ceili`, :ref:`Vector2.ceil`, :ref:`Vector3.ceil`, or :ref:`Vector4.ceil`. +\ **Note:** For better type safety, use :ref:`ceilf()`, :ref:`ceili()`, :ref:`Vector2.ceil()`, :ref:`Vector3.ceil()`, or :ref:`Vector4.ceil()`. .. rst-class:: classref-item-separator @@ -5532,7 +5532,7 @@ See also :ref:`floor`, :ref:`round`, returning a :ref:`float`. +A type-safe version of :ref:`ceil()`, returning a :ref:`float`. .. rst-class:: classref-item-separator @@ -5546,7 +5546,7 @@ A type-safe version of :ref:`ceil`, returning a Rounds ``x`` upward (towards positive infinity), returning the smallest whole number that is not less than ``x``. -A type-safe version of :ref:`ceil`, returning an :ref:`int`. +A type-safe version of :ref:`ceil()`, returning an :ref:`int`. .. rst-class:: classref-item-separator @@ -5568,7 +5568,7 @@ Clamps the ``value``, returning a :ref:`Variant` not less than `` var b = clamp(8.1, 0.9, 5.5) # b is 5.5 -\ **Note:** For better type safety, use :ref:`clampf`, :ref:`clampi`, :ref:`Vector2.clamp`, :ref:`Vector2i.clamp`, :ref:`Vector3.clamp`, :ref:`Vector3i.clamp`, :ref:`Vector4.clamp`, :ref:`Vector4i.clamp`, or :ref:`Color.clamp` (not currently supported by this method). +\ **Note:** For better type safety, use :ref:`clampf()`, :ref:`clampi()`, :ref:`Vector2.clamp()`, :ref:`Vector2i.clamp()`, :ref:`Vector3.clamp()`, :ref:`Vector3i.clamp()`, :ref:`Vector4.clamp()`, :ref:`Vector4i.clamp()`, or :ref:`Color.clamp()` (not currently supported by this method). \ **Note:** When using this on vectors it will *not* perform component-wise clamping, and will pick ``min`` if ``value < min`` or ``max`` if ``value > max``. To perform component-wise clamping use the methods listed above. @@ -5668,7 +5668,7 @@ Cubic interpolates between two values by the factor defined in ``weight`` with ` :ref:`float` **cubic_interpolate_angle**\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`\ ) :ref:`πŸ”—` -Cubic interpolates between two rotation values with shortest path by the factor defined in ``weight`` with ``pre`` and ``post`` values. See also :ref:`lerp_angle`. +Cubic interpolates between two rotation values with shortest path by the factor defined in ``weight`` with ``pre`` and ``post`` values. See also :ref:`lerp_angle()`. .. rst-class:: classref-item-separator @@ -5680,9 +5680,9 @@ Cubic interpolates between two rotation values with shortest path by the factor :ref:`float` **cubic_interpolate_angle_in_time**\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`, to_t\: :ref:`float`, pre_t\: :ref:`float`, post_t\: :ref:`float`\ ) :ref:`πŸ”—` -Cubic interpolates between two rotation values with shortest path by the factor defined in ``weight`` with ``pre`` and ``post`` values. See also :ref:`lerp_angle`. +Cubic interpolates between two rotation values with shortest path by the factor defined in ``weight`` with ``pre`` and ``post`` values. See also :ref:`lerp_angle()`. -It can perform smoother interpolation than :ref:`cubic_interpolate` by the time values. +It can perform smoother interpolation than :ref:`cubic_interpolate()` by the time values. .. rst-class:: classref-item-separator @@ -5696,7 +5696,7 @@ It can perform smoother interpolation than :ref:`cubic_interpolate` by the time values. +It can perform smoother interpolation than :ref:`cubic_interpolate()` by the time values. .. rst-class:: classref-item-separator @@ -5750,7 +5750,7 @@ Returns an "eased" value of ``x`` based on an easing function defined with ``cur \ `ease() curve values cheatsheet `__\ -See also :ref:`smoothstep`. If you need to perform more advanced transitions, use :ref:`Tween.interpolate_value`. +See also :ref:`smoothstep()`. If you need to perform more advanced transitions, use :ref:`Tween.interpolate_value()`. .. rst-class:: classref-item-separator @@ -5785,7 +5785,7 @@ The natural exponential function. It raises the mathematical constant *e* to the \ *e* has an approximate value of 2.71828, and can be obtained with ``exp(1)``. -For exponents to other bases use the method :ref:`pow`. +For exponents to other bases use the method :ref:`pow()`. :: @@ -5808,9 +5808,9 @@ Rounds ``x`` downward (towards negative infinity), returning the largest whole n var a = floor(2.99) # a is 2.0 a = floor(-2.99) # a is -3.0 -See also :ref:`ceil`, :ref:`round`, and :ref:`snapped`. +See also :ref:`ceil()`, :ref:`round()`, and :ref:`snapped()`. -\ **Note:** For better type safety, use :ref:`floorf`, :ref:`floori`, :ref:`Vector2.floor`, :ref:`Vector3.floor`, or :ref:`Vector4.floor`. +\ **Note:** For better type safety, use :ref:`floorf()`, :ref:`floori()`, :ref:`Vector2.floor()`, :ref:`Vector3.floor()`, or :ref:`Vector4.floor()`. .. rst-class:: classref-item-separator @@ -5824,7 +5824,7 @@ See also :ref:`ceil`, :ref:`round`, returning a :ref:`float`. +A type-safe version of :ref:`floor()`, returning a :ref:`float`. .. rst-class:: classref-item-separator @@ -5838,7 +5838,7 @@ A type-safe version of :ref:`floor`, returning Rounds ``x`` downward (towards negative infinity), returning the largest whole number that is not more than ``x``. -A type-safe version of :ref:`floor`, returning an :ref:`int`. +A type-safe version of :ref:`floor()`, returning an :ref:`int`. \ **Note:** This function is *not* the same as ``int(x)``, which rounds towards 0. @@ -5927,7 +5927,7 @@ Returns the integer hash of the passed ``variable``. :ref:`Object` **instance_from_id**\ (\ instance_id\: :ref:`int`\ ) :ref:`πŸ”—` -Returns the :ref:`Object` that corresponds to ``instance_id``. All Objects have a unique instance ID. See also :ref:`Object.get_instance_id`. +Returns the :ref:`Object` that corresponds to ``instance_id``. All Objects have a unique instance ID. See also :ref:`Object.get_instance_id()`. .. tabs:: @@ -5967,7 +5967,7 @@ Returns the :ref:`Object` that corresponds to ``instance_id``. All :ref:`float` **inverse_lerp**\ (\ from\: :ref:`float`, to\: :ref:`float`, weight\: :ref:`float`\ ) :ref:`πŸ”—` -Returns an interpolation or extrapolation factor considering the range specified in ``from`` and ``to``, and the interpolated value specified in ``weight``. The returned value will be between ``0.0`` and ``1.0`` if ``weight`` is between ``from`` and ``to`` (inclusive). If ``weight`` is located outside this range, then an extrapolation factor will be returned (return value lower than ``0.0`` or greater than ``1.0``). Use :ref:`clamp` on the result of :ref:`inverse_lerp` if this is not desired. +Returns an interpolation or extrapolation factor considering the range specified in ``from`` and ``to``, and the interpolated value specified in ``weight``. The returned value will be between ``0.0`` and ``1.0`` if ``weight`` is between ``from`` and ``to`` (inclusive). If ``weight`` is located outside this range, then an extrapolation factor will be returned (return value lower than ``0.0`` or greater than ``1.0``). Use :ref:`clamp()` on the result of :ref:`inverse_lerp()` if this is not desired. :: @@ -5979,7 +5979,7 @@ Returns an interpolation or extrapolation factor considering the range specified var ratio = inverse_lerp(20, 30, 27.5) # ratio is now 0.75. -See also :ref:`lerp`, which performs the reverse of this operation, and :ref:`remap` to map a continuous series of values to another. +See also :ref:`lerp()`, which performs the reverse of this operation, and :ref:`remap()` to map a continuous series of values to another. .. rst-class:: classref-item-separator @@ -6101,7 +6101,7 @@ These are :ref:`Variant` reference types: :ref:`Object` with one value as zero. +This function is faster than using :ref:`is_equal_approx()` with one value as zero. .. rst-class:: classref-item-separator @@ -6113,7 +6113,7 @@ This function is faster than using :ref:`is_equal_approx` **lerp**\ (\ from\: :ref:`Variant`, to\: :ref:`Variant`, weight\: :ref:`Variant`\ ) :ref:`πŸ”—` -Linearly interpolates between two values by the factor defined in ``weight``. To perform interpolation, ``weight`` should be between ``0.0`` and ``1.0`` (inclusive). However, values outside this range are allowed and can be used to perform *extrapolation*. If this is not desired, use :ref:`clampf` to limit ``weight``. +Linearly interpolates between two values by the factor defined in ``weight``. To perform interpolation, ``weight`` should be between ``0.0`` and ``1.0`` (inclusive). However, values outside this range are allowed and can be used to perform *extrapolation*. If this is not desired, use :ref:`clampf()` to limit ``weight``. Both ``from`` and ``to`` must be the same type. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector3`, :ref:`Vector4`, :ref:`Color`, :ref:`Quaternion`, :ref:`Basis`, :ref:`Transform2D`, :ref:`Transform3D`. @@ -6121,9 +6121,9 @@ Both ``from`` and ``to`` must be the same type. Supported types: :ref:`int` which performs the reverse of this operation. To perform eased interpolation with :ref:`lerp`, combine it with :ref:`ease` or :ref:`smoothstep`. See also :ref:`remap` to map a continuous series of values to another. +See also :ref:`inverse_lerp()` which performs the reverse of this operation. To perform eased interpolation with :ref:`lerp()`, combine it with :ref:`ease()` or :ref:`smoothstep()`. See also :ref:`remap()` to map a continuous series of values to another. -\ **Note:** For better type safety, use :ref:`lerpf`, :ref:`Vector2.lerp`, :ref:`Vector3.lerp`, :ref:`Vector4.lerp`, :ref:`Color.lerp`, :ref:`Quaternion.slerp`, :ref:`Basis.slerp`, :ref:`Transform2D.interpolate_with`, or :ref:`Transform3D.interpolate_with`. +\ **Note:** For better type safety, use :ref:`lerpf()`, :ref:`Vector2.lerp()`, :ref:`Vector3.lerp()`, :ref:`Vector4.lerp()`, :ref:`Color.lerp()`, :ref:`Quaternion.slerp()`, :ref:`Basis.slerp()`, :ref:`Transform2D.interpolate_with()`, or :ref:`Transform3D.interpolate_with()`. .. rst-class:: classref-item-separator @@ -6137,7 +6137,7 @@ See also :ref:`inverse_lerp` which perfo Linearly interpolates between two angles (in radians) by a ``weight`` value between 0.0 and 1.0. -Similar to :ref:`lerp`, but interpolates correctly when the angles wrap around :ref:`@GDScript.TAU`. To perform eased interpolation with :ref:`lerp_angle`, combine it with :ref:`ease` or :ref:`smoothstep`. +Similar to :ref:`lerp()`, but interpolates correctly when the angles wrap around :ref:`@GDScript.TAU`. To perform eased interpolation with :ref:`lerp_angle()`, combine it with :ref:`ease()` or :ref:`smoothstep()`. :: @@ -6161,13 +6161,13 @@ Similar to :ref:`lerp`, but interpolates correct :ref:`float` **lerpf**\ (\ from\: :ref:`float`, to\: :ref:`float`, weight\: :ref:`float`\ ) :ref:`πŸ”—` -Linearly interpolates between two values by the factor defined in ``weight``. To perform interpolation, ``weight`` should be between ``0.0`` and ``1.0`` (inclusive). However, values outside this range are allowed and can be used to perform *extrapolation*. If this is not desired, use :ref:`clampf` on the result of this function. +Linearly interpolates between two values by the factor defined in ``weight``. To perform interpolation, ``weight`` should be between ``0.0`` and ``1.0`` (inclusive). However, values outside this range are allowed and can be used to perform *extrapolation*. If this is not desired, use :ref:`clampf()` on the result of this function. :: lerpf(0, 4, 0.75) # Returns 3.0 -See also :ref:`inverse_lerp` which performs the reverse of this operation. To perform eased interpolation with :ref:`lerp`, combine it with :ref:`ease` or :ref:`smoothstep`. +See also :ref:`inverse_lerp()` which performs the reverse of this operation. To perform eased interpolation with :ref:`lerp()`, combine it with :ref:`ease()` or :ref:`smoothstep()`. .. rst-class:: classref-item-separator @@ -6223,7 +6223,7 @@ Returns the maximum of the given numeric values. This function can take any numb max(1, 7, 3, -6, 5) # Returns 7 -\ **Note:** When using this on vectors it will *not* perform component-wise maximum, and will pick the largest value when compared using ``x < y``. To perform component-wise maximum, use :ref:`Vector2.max`, :ref:`Vector2i.max`, :ref:`Vector3.max`, :ref:`Vector3i.max`, :ref:`Vector4.max`, and :ref:`Vector4i.max`. +\ **Note:** When using this on vectors it will *not* perform component-wise maximum, and will pick the largest value when compared using ``x < y``. To perform component-wise maximum, use :ref:`Vector2.max()`, :ref:`Vector2i.max()`, :ref:`Vector3.max()`, :ref:`Vector3i.max()`, :ref:`Vector4.max()`, and :ref:`Vector4i.max()`. .. rst-class:: classref-item-separator @@ -6275,7 +6275,7 @@ Returns the minimum of the given numeric values. This function can take any numb min(1, 7, 3, -6, 5) # Returns -6 -\ **Note:** When using this on vectors it will *not* perform component-wise minimum, and will pick the smallest value when compared using ``x < y``. To perform component-wise minimum, use :ref:`Vector2.min`, :ref:`Vector2i.min`, :ref:`Vector3.min`, :ref:`Vector3i.min`, :ref:`Vector4.min`, and :ref:`Vector4i.min`. +\ **Note:** When using this on vectors it will *not* perform component-wise minimum, and will pick the smallest value when compared using ``x < y``. To perform component-wise minimum, use :ref:`Vector2.min()`, :ref:`Vector2i.min()`, :ref:`Vector3.min()`, :ref:`Vector3i.min()`, :ref:`Vector4.min()`, and :ref:`Vector4i.min()`. .. rst-class:: classref-item-separator @@ -6457,7 +6457,7 @@ Converts one or more arguments of any type to string in the best way possible an -\ **Note:** Consider using :ref:`push_error` and :ref:`push_warning` to print error and warning messages instead of :ref:`print` or :ref:`print_rich`. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. See also :ref:`Engine.print_to_stdout` and :ref:`ProjectSettings.application/run/disable_stdout`. +\ **Note:** Consider using :ref:`push_error()` and :ref:`push_warning()` to print error and warning messages instead of :ref:`print()` or :ref:`print_rich()`. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. See also :ref:`Engine.print_to_stdout` and :ref:`ProjectSettings.application/run/disable_stdout`. .. rst-class:: classref-item-separator @@ -6490,11 +6490,11 @@ When printing to standard output, the supported subset of BBCode is converted to -\ **Note:** Consider using :ref:`push_error` and :ref:`push_warning` to print error and warning messages instead of :ref:`print` or :ref:`print_rich`. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. +\ **Note:** Consider using :ref:`push_error()` and :ref:`push_warning()` to print error and warning messages instead of :ref:`print()` or :ref:`print_rich()`. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. \ **Note:** On Windows, only Windows 10 and later correctly displays ANSI escape codes in standard output. -\ **Note:** Output displayed in the editor supports clickable ``[url=address]text[/url]`` tags. The ``[url]`` tag's ``address`` value is handled by :ref:`OS.shell_open` when clicked. +\ **Note:** Output displayed in the editor supports clickable ``[url=address]text[/url]`` tags. The ``[url]`` tag's ``address`` value is handled by :ref:`OS.shell_open()` when clicked. .. rst-class:: classref-item-separator @@ -6506,7 +6506,7 @@ When printing to standard output, the supported subset of BBCode is converted to |void| **print_verbose**\ (\ ...\ ) |vararg| :ref:`πŸ”—` -If verbose mode is enabled (:ref:`OS.is_stdout_verbose` returning ``true``), converts one or more arguments of any type to string in the best way possible and prints them to the console. +If verbose mode is enabled (:ref:`OS.is_stdout_verbose()` returning ``true``), converts one or more arguments of any type to string in the best way possible and prints them to the console. .. rst-class:: classref-item-separator @@ -6543,7 +6543,7 @@ Prints one or more arguments to strings in the best way possible to standard err |void| **printraw**\ (\ ...\ ) |vararg| :ref:`πŸ”—` -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. +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. @@ -6843,7 +6843,7 @@ Returns a random signed 32-bit integer between ``from`` and ``to`` (inclusive). Randomizes the seed (or the internal state) of the random number generator. The current implementation uses a number based on the device's time. -\ **Note:** This function is called automatically when the project is run. If you need to fix the seed to have consistent, reproducible results, use :ref:`seed` to initialize the random number generator. +\ **Note:** This function is called automatically when the project is run. If you need to fix the seed to have consistent, reproducible results, use :ref:`seed()` to initialize the random number generator. .. rst-class:: classref-item-separator @@ -6855,7 +6855,7 @@ Randomizes the seed (or the internal state) of the random number generator. The :ref:`float` **remap**\ (\ value\: :ref:`float`, istart\: :ref:`float`, istop\: :ref:`float`, ostart\: :ref:`float`, ostop\: :ref:`float`\ ) :ref:`πŸ”—` -Maps a ``value`` from range ``[istart, istop]`` to ``[ostart, ostop]``. See also :ref:`lerp` and :ref:`inverse_lerp`. If ``value`` is outside ``[istart, istop]``, then the resulting value will also be outside ``[ostart, ostop]``. If this is not desired, use :ref:`clamp` on the result of this function. +Maps a ``value`` from range ``[istart, istop]`` to ``[ostart, ostop]``. See also :ref:`lerp()` and :ref:`inverse_lerp()`. If ``value`` is outside ``[istart, istop]``, then the resulting value will also be outside ``[ostart, ostop]``. If this is not desired, use :ref:`clamp()` on the result of this function. :: @@ -6901,7 +6901,7 @@ Creates an RID from a ``base``. This is used mainly from native extensions to bu Rotates ``from`` toward ``to`` by the ``delta`` amount. Will not go past ``to``. -Similar to :ref:`move_toward`, but interpolates correctly when the angles wrap around :ref:`@GDScript.TAU`. +Similar to :ref:`move_toward()`, but interpolates correctly when the angles wrap around :ref:`@GDScript.TAU`. If ``delta`` is negative, this function will rotate away from ``to``, toward the opposite angle, and will not go past the opposite angle. @@ -6923,9 +6923,9 @@ Rounds ``x`` to the nearest whole number, with halfway cases rounded away from 0 round(2.5) # Returns 3 round(2.6) # Returns 3 -See also :ref:`floor`, :ref:`ceil`, and :ref:`snapped`. +See also :ref:`floor()`, :ref:`ceil()`, and :ref:`snapped()`. -\ **Note:** For better type safety, use :ref:`roundf`, :ref:`roundi`, :ref:`Vector2.round`, :ref:`Vector3.round`, or :ref:`Vector4.round`. +\ **Note:** For better type safety, use :ref:`roundf()`, :ref:`roundi()`, :ref:`Vector2.round()`, :ref:`Vector3.round()`, or :ref:`Vector4.round()`. .. rst-class:: classref-item-separator @@ -6939,7 +6939,7 @@ See also :ref:`floor`, :ref:`ceil`, returning a :ref:`float`. +A type-safe version of :ref:`round()`, returning a :ref:`float`. .. rst-class:: classref-item-separator @@ -6953,7 +6953,7 @@ A type-safe version of :ref:`round`, returning Rounds ``x`` to the nearest whole number, with halfway cases rounded away from 0. -A type-safe version of :ref:`round`, returning an :ref:`int`. +A type-safe version of :ref:`round()`, returning an :ref:`int`. .. rst-class:: classref-item-separator @@ -7013,7 +7013,7 @@ Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2 sign(Vector3(-6.0, 0.0, 6.0)) # Returns (-1, 0, 1) -\ **Note:** For better type safety, use :ref:`signf`, :ref:`signi`, :ref:`Vector2.sign`, :ref:`Vector2i.sign`, :ref:`Vector3.sign`, :ref:`Vector3i.sign`, :ref:`Vector4.sign`, or :ref:`Vector4i.sign`. +\ **Note:** For better type safety, use :ref:`signf()`, :ref:`signi()`, :ref:`Vector2.sign()`, :ref:`Vector2i.sign()`, :ref:`Vector3.sign()`, :ref:`Vector3i.sign()`, :ref:`Vector4.sign()`, or :ref:`Vector4i.sign()`. .. rst-class:: classref-item-separator @@ -7111,7 +7111,7 @@ This S-shaped curve is the cubic Hermite interpolator, given by ``f(y) = 3*y^2 - smoothstep(0, 2, 1.0) # Returns 0.5 smoothstep(0, 2, 2.0) # Returns 1.0 -Compared to :ref:`ease` with a curve value of ``-1.6521``, :ref:`smoothstep` returns the smoothest possible curve with no sudden changes in the derivative. If you need to perform more advanced transitions, use :ref:`Tween` or :ref:`AnimationPlayer`. +Compared to :ref:`ease()` with a curve value of ``-1.6521``, :ref:`smoothstep()` returns the smoothest possible curve with no sudden changes in the derivative. If you need to perform more advanced transitions, use :ref:`Tween` or :ref:`AnimationPlayer`. \ `Comparison between smoothstep() and ease(x, -1.6521) return values `__\ @@ -7138,9 +7138,9 @@ The returned value is the same type of :ref:`Variant` as ``step`` snapped(Vector2(34, 70), Vector2(8, 8)) # Returns (32, 72) -See also :ref:`ceil`, :ref:`floor`, and :ref:`round`. +See also :ref:`ceil()`, :ref:`floor()`, and :ref:`round()`. -\ **Note:** For better type safety, use :ref:`snappedf`, :ref:`snappedi`, :ref:`Vector2.snapped`, :ref:`Vector2i.snapped`, :ref:`Vector3.snapped`, :ref:`Vector3i.snapped`, :ref:`Vector4.snapped`, or :ref:`Vector4i.snapped`. +\ **Note:** For better type safety, use :ref:`snappedf()`, :ref:`snappedi()`, :ref:`Vector2.snapped()`, :ref:`Vector2i.snapped()`, :ref:`Vector3.snapped()`, :ref:`Vector3i.snapped()`, :ref:`Vector4.snapped()`, or :ref:`Vector4i.snapped()`. .. rst-class:: classref-item-separator @@ -7154,7 +7154,7 @@ See also :ref:`ceil`, :ref:`floor`, returning a :ref:`float`. +A type-safe version of :ref:`snapped()`, returning a :ref:`float`. :: @@ -7173,7 +7173,7 @@ A type-safe version of :ref:`snapped`, return Returns the multiple of ``step`` that is the closest to ``x``. -A type-safe version of :ref:`snapped`, returning an :ref:`int`. +A type-safe version of :ref:`snapped()`, returning an :ref:`int`. :: @@ -7247,7 +7247,7 @@ Converts one or more arguments of any :ref:`Variant` type to a :r :ref:`Variant` **str_to_var**\ (\ string\: :ref:`String`\ ) :ref:`πŸ”—` -Converts a formatted ``string`` that was returned by :ref:`var_to_str` to the original :ref:`Variant`. +Converts a formatted ``string`` that was returned by :ref:`var_to_str()` to the original :ref:`Variant`. .. tabs:: @@ -7341,7 +7341,7 @@ Returns a human-readable name of the given ``type``, using the :ref:`Variant.Typ print(type_string(TYPE_INT)) # Prints "int" print(type_string(TYPE_STRING)) # Prints "String" -See also :ref:`typeof`. +See also :ref:`typeof()`. .. rst-class:: classref-item-separator @@ -7365,7 +7365,7 @@ Returns the internal type of the given ``variable``, using the :ref:`Variant.Typ else: print("Unexpected result!") -See also :ref:`type_string`. +See also :ref:`type_string()`. .. rst-class:: classref-item-separator @@ -7377,9 +7377,9 @@ See also :ref:`type_string`. :ref:`PackedByteArray` **var_to_bytes**\ (\ variable\: :ref:`Variant`\ ) :ref:`πŸ”—` -Encodes a :ref:`Variant` value to a byte array, without encoding objects. Deserialization can be done with :ref:`bytes_to_var`. +Encodes a :ref:`Variant` value to a byte array, without encoding objects. Deserialization can be done with :ref:`bytes_to_var()`. -\ **Note:** If you need object serialization, see :ref:`var_to_bytes_with_objects`. +\ **Note:** If you need object serialization, see :ref:`var_to_bytes_with_objects()`. \ **Note:** Encoding :ref:`Callable` is not supported and will result in an empty value, regardless of the data. @@ -7393,7 +7393,7 @@ Encodes a :ref:`Variant` value to a byte array, without encoding :ref:`PackedByteArray` **var_to_bytes_with_objects**\ (\ variable\: :ref:`Variant`\ ) :ref:`πŸ”—` -Encodes a :ref:`Variant` value to a byte array. Encoding objects is allowed (and can potentially include executable code). Deserialization can be done with :ref:`bytes_to_var_with_objects`. +Encodes a :ref:`Variant` value to a byte array. Encoding objects is allowed (and can potentially include executable code). Deserialization can be done with :ref:`bytes_to_var_with_objects()`. \ **Note:** Encoding :ref:`Callable` is not supported and will result in an empty value, regardless of the data. @@ -7407,7 +7407,7 @@ Encodes a :ref:`Variant` value to a byte array. Encoding objects :ref:`String` **var_to_str**\ (\ variable\: :ref:`Variant`\ ) :ref:`πŸ”—` -Converts a :ref:`Variant` ``variable`` to a formatted :ref:`String` that can then be parsed using :ref:`str_to_var`. +Converts a :ref:`Variant` ``variable`` to a formatted :ref:`String` that can then be parsed using :ref:`str_to_var()`. .. tabs:: @@ -7501,9 +7501,9 @@ Wraps the float ``value`` between ``min`` and ``max``. Can be used for creating # Infinite rotation (in radians) angle = wrapf(angle + 0.1, -PI, PI) -\ **Note:** If ``min`` is ``0``, this is equivalent to :ref:`fposmod`, so prefer using that instead. +\ **Note:** If ``min`` is ``0``, this is equivalent to :ref:`fposmod()`, so prefer using that instead. -\ :ref:`wrapf` is more flexible than using the :ref:`fposmod` approach by giving the user control over the minimum value. +\ :ref:`wrapf()` is more flexible than using the :ref:`fposmod()` approach by giving the user control over the minimum value. .. rst-class:: classref-item-separator diff --git a/classes/class_aabb.rst b/classes/class_aabb.rst index 68f3a2eef..cff1cd256 100644 --- a/classes/class_aabb.rst +++ b/classes/class_aabb.rst @@ -17,11 +17,11 @@ A 3D axis-aligned bounding box. Description ----------- -The **AABB** built-in :ref:`Variant` type represents an axis-aligned bounding box in a 3D space. It is defined by its :ref:`position` and :ref:`size`, which are :ref:`Vector3`. It is frequently used for fast overlap tests (see :ref:`intersects`). Although **AABB** itself is axis-aligned, it can be combined with :ref:`Transform3D` to represent a rotated or skewed bounding box. +The **AABB** built-in :ref:`Variant` type represents an axis-aligned bounding box in a 3D space. It is defined by its :ref:`position` and :ref:`size`, which are :ref:`Vector3`. It is frequently used for fast overlap tests (see :ref:`intersects()`). Although **AABB** itself is axis-aligned, it can be combined with :ref:`Transform3D` to represent a rotated or skewed bounding box. It uses floating-point coordinates. The 2D counterpart to **AABB** is :ref:`Rect2`. There is no version of **AABB** that uses integer coordinates. -\ **Note:** Negative values for :ref:`size` are not supported. With negative size, most **AABB** methods do not work correctly. Use :ref:`abs` to get an equivalent **AABB** with a non-negative size. +\ **Note:** Negative values for :ref:`size` are not supported. With negative size, most **AABB** methods do not work correctly. Use :ref:`abs()` to get an equivalent **AABB** with a non-negative size. \ **Note:** In a boolean context, a **AABB** evaluates to ``false`` if both :ref:`position` and :ref:`size` are zero (equal to :ref:`Vector3.ZERO`). Otherwise, it always evaluates to ``true``. @@ -189,7 +189,7 @@ The origin point. This is usually the corner on the bottom-left and forward of t The bounding box's width, height, and depth starting from :ref:`position`. Setting this value also affects the :ref:`end` point. -\ **Note:** It's recommended setting the width, height, and depth to non-negative values. This is because most methods in Godot assume that the :ref:`position` is the bottom-left-forward corner, and the :ref:`end` is the top-right-back corner. To get an equivalent bounding box with non-negative size, use :ref:`abs`. +\ **Note:** It's recommended setting the width, height, and depth to non-negative values. This is because most methods in Godot assume that the :ref:`position` is the bottom-left-forward corner, and the :ref:`end` is the top-right-back corner. To get an equivalent bounding box with non-negative size, use :ref:`abs()`. .. rst-class:: classref-section-separator @@ -401,7 +401,7 @@ Returns the longest normalized axis of this bounding box's :ref:`size` and :ref:`get_longest_axis_size`. +See also :ref:`get_longest_axis_index()` and :ref:`get_longest_axis_size()`. .. rst-class:: classref-item-separator @@ -415,7 +415,7 @@ See also :ref:`get_longest_axis_index` Returns the index to the longest axis of this bounding box's :ref:`size` (see :ref:`Vector3.AXIS_X`, :ref:`Vector3.AXIS_Y`, and :ref:`Vector3.AXIS_Z`). -For an example, see :ref:`get_longest_axis`. +For an example, see :ref:`get_longest_axis()`. .. rst-class:: classref-item-separator @@ -429,7 +429,7 @@ For an example, see :ref:`get_longest_axis`. Returns the longest dimension of this bounding box's :ref:`size`. -For an example, see :ref:`get_longest_axis`. +For an example, see :ref:`get_longest_axis()`. .. rst-class:: classref-item-separator @@ -464,7 +464,7 @@ Returns the shortest normalized axis of this bounding box's :ref:`size` and :ref:`get_shortest_axis_size`. +See also :ref:`get_shortest_axis_index()` and :ref:`get_shortest_axis_size()`. .. rst-class:: classref-item-separator @@ -478,7 +478,7 @@ See also :ref:`get_shortest_axis_index` (see :ref:`Vector3.AXIS_X`, :ref:`Vector3.AXIS_Y`, and :ref:`Vector3.AXIS_Z`). -For an example, see :ref:`get_shortest_axis`. +For an example, see :ref:`get_shortest_axis()`. .. rst-class:: classref-item-separator @@ -492,7 +492,7 @@ For an example, see :ref:`get_shortest_axis Returns the shortest dimension of this bounding box's :ref:`size`. -For an example, see :ref:`get_shortest_axis`. +For an example, see :ref:`get_shortest_axis()`. .. rst-class:: classref-item-separator @@ -516,7 +516,7 @@ Returns the vertex's position of this bounding box that's the farthest in the gi :ref:`float` **get_volume**\ (\ ) |const| :ref:`πŸ”—` -Returns the bounding box's volume. This is equivalent to ``size.x * size.y * size.z``. See also :ref:`has_volume`. +Returns the bounding box's volume. This is equivalent to ``size.x * size.y * size.z``. See also :ref:`has_volume()`. .. rst-class:: classref-item-separator @@ -567,7 +567,7 @@ Returns a copy of this bounding box extended on all sides by the given amount `` Returns ``true`` if the bounding box contains the given ``point``. By convention, points exactly on the right, top, and front sides are **not** included. -\ **Note:** This method is not reliable for **AABB** with a *negative* :ref:`size`. Use :ref:`abs` first to get a valid bounding box. +\ **Note:** This method is not reliable for **AABB** with a *negative* :ref:`size`. Use :ref:`abs()` first to get a valid bounding box. .. rst-class:: classref-item-separator @@ -591,7 +591,7 @@ Returns ``true`` if this bounding box has a surface or a length, that is, at lea :ref:`bool` **has_volume**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this bounding box's width, height, and depth are all positive. See also :ref:`get_volume`. +Returns ``true`` if this bounding box's width, height, and depth are all positive. See also :ref:`get_volume()`. .. rst-class:: classref-item-separator @@ -603,7 +603,7 @@ Returns ``true`` if this bounding box's width, height, and depth are all positiv :ref:`AABB` **intersection**\ (\ with\: :ref:`AABB`\ ) |const| :ref:`πŸ”—` -Returns the intersection between this bounding box and ``with``. If the boxes do not intersect, returns an empty **AABB**. If the boxes intersect at the edge, returns a flat **AABB** with no volume (see :ref:`has_surface` and :ref:`has_volume`). +Returns the intersection between this bounding box and ``with``. If the boxes do not intersect, returns an empty **AABB**. If the boxes intersect at the edge, returns a flat **AABB** with no volume (see :ref:`has_surface()` and :ref:`has_volume()`). .. tabs:: @@ -628,7 +628,7 @@ Returns the intersection between this bounding box and ``with``. If the boxes do -\ **Note:** If you only need to know whether two bounding boxes are intersecting, use :ref:`intersects`, instead. +\ **Note:** If you only need to know whether two bounding boxes are intersecting, use :ref:`intersects()`, instead. .. rst-class:: classref-item-separator @@ -692,7 +692,7 @@ The segment begins at ``from`` and ends at ``to``. :ref:`bool` **is_equal_approx**\ (\ aabb\: :ref:`AABB`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this bounding box and ``aabb`` are approximately equal, by calling :ref:`Vector3.is_equal_approx` on the :ref:`position` and the :ref:`size`. +Returns ``true`` if this bounding box and ``aabb`` are approximately equal, by calling :ref:`Vector3.is_equal_approx()` on the :ref:`position` and the :ref:`size`. .. rst-class:: classref-item-separator @@ -704,7 +704,7 @@ Returns ``true`` if this bounding box and ``aabb`` are approximately equal, by c :ref:`bool` **is_finite**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this bounding box's values are finite, by calling :ref:`Vector3.is_finite` on the :ref:`position` and the :ref:`size`. +Returns ``true`` if this bounding box's values are finite, by calling :ref:`Vector3.is_finite()` on the :ref:`position` and the :ref:`size`. .. rst-class:: classref-item-separator @@ -716,7 +716,7 @@ Returns ``true`` if this bounding box's values are finite, by calling :ref:`Vect :ref:`AABB` **merge**\ (\ with\: :ref:`AABB`\ ) |const| :ref:`πŸ”—` -Returns an **AABB** that encloses both this bounding box and ``with`` around the edges. See also :ref:`encloses`. +Returns an **AABB** that encloses both this bounding box and ``with`` around the edges. See also :ref:`encloses()`. .. rst-class:: classref-section-separator @@ -735,7 +735,7 @@ Operator Descriptions Returns ``true`` if the :ref:`position` or :ref:`size` of both bounding boxes are not equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. rst-class:: classref-item-separator @@ -749,9 +749,9 @@ Returns ``true`` if the :ref:`position` or :ref:`s Inversely transforms (multiplies) the **AABB** by the given :ref:`Transform3D` transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). -\ ``aabb * transform`` is equivalent to ``transform.inverse() * aabb``. See :ref:`Transform3D.inverse`. +\ ``aabb * transform`` is equivalent to ``transform.inverse() * aabb``. See :ref:`Transform3D.inverse()`. -For transforming by inverse of an affine transformation (e.g. with scaling) ``transform.affine_inverse() * aabb`` can be used instead. See :ref:`Transform3D.affine_inverse`. +For transforming by inverse of an affine transformation (e.g. with scaling) ``transform.affine_inverse() * aabb`` can be used instead. See :ref:`Transform3D.affine_inverse()`. .. rst-class:: classref-item-separator @@ -765,7 +765,7 @@ For transforming by inverse of an affine transformation (e.g. with scaling) ``tr Returns ``true`` if both :ref:`position` and :ref:`size` of the bounding boxes are exactly equal, respectively. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. |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_acceptdialog.rst b/classes/class_acceptdialog.rst index 2b2c4273d..7b24b3ced 100644 --- a/classes/class_acceptdialog.rst +++ b/classes/class_acceptdialog.rst @@ -21,7 +21,7 @@ A base dialog used for user notification. Description ----------- -The default use of **AcceptDialog** is to allow it to only be accepted or closed, with the same result. However, the :ref:`confirmed` and :ref:`canceled` signals allow to make the two actions different, and the :ref:`add_button` method allows to add custom buttons and actions. +The default use of **AcceptDialog** is to allow it to only be accepted or closed, with the same result. However, the :ref:`confirmed` and :ref:`canceled` signals allow to make the two actions different, and the :ref:`add_button()` method allows to add custom buttons and actions. .. rst-class:: classref-reftable-group @@ -110,7 +110,7 @@ Signals **canceled**\ (\ ) :ref:`πŸ”—` -Emitted when the dialog is closed or the button created with :ref:`add_cancel_button` is pressed. +Emitted when the dialog is closed or the button created with :ref:`add_cancel_button()` is pressed. .. rst-class:: classref-item-separator @@ -134,7 +134,7 @@ Emitted when the dialog is accepted, i.e. the OK button is pressed. **custom_action**\ (\ action\: :ref:`StringName`\ ) :ref:`πŸ”—` -Emitted when a custom button is pressed. See :ref:`add_button`. +Emitted when a custom button is pressed. See :ref:`add_button()`. .. rst-class:: classref-section-separator @@ -226,7 +226,7 @@ The text displayed by the dialog. - |void| **set_ok_button_text**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_ok_button_text**\ (\ ) -The text displayed by the OK button (see :ref:`get_ok_button`). +The text displayed by the OK button (see :ref:`get_ok_button()`). .. rst-class:: classref-section-separator @@ -247,7 +247,7 @@ Adds a button with label ``text`` and a custom ``action`` to the dialog and retu If ``true``, ``right`` will place the button to the right of any sibling buttons. -You can use :ref:`remove_button` method to remove a button created with this method from the dialog. +You can use :ref:`remove_button()` method to remove a button created with this method from the dialog. .. rst-class:: classref-item-separator @@ -261,7 +261,7 @@ You can use :ref:`remove_button` method Adds a button with label ``name`` and a cancel action to the dialog and returns the created button. -You can use :ref:`remove_button` method to remove a button created with this method from the dialog. +You can use :ref:`remove_button()` method to remove a button created with this method from the dialog. .. rst-class:: classref-item-separator @@ -313,7 +313,7 @@ Registers a :ref:`LineEdit` in the dialog. When the enter key is |void| **remove_button**\ (\ button\: :ref:`Button`\ ) :ref:`πŸ”—` -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. +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. .. rst-class:: classref-section-separator diff --git a/classes/class_aescontext.rst b/classes/class_aescontext.rst index 064fc6b0b..3e43943df 100644 --- a/classes/class_aescontext.rst +++ b/classes/class_aescontext.rst @@ -184,7 +184,7 @@ Method Descriptions |void| **finish**\ (\ ) :ref:`πŸ”—` -Close this AES context so it can be started again. See :ref:`start`. +Close this AES context so it can be started again. See :ref:`start()`. .. rst-class:: classref-item-separator @@ -196,7 +196,7 @@ Close this AES context so it can be started again. See :ref:`start` **get_iv_state**\ (\ ) :ref:`πŸ”—` -Get the current IV state for this context (IV gets updated when calling :ref:`update`). You normally don't need this function. +Get the current IV state for this context (IV gets updated when calling :ref:`update()`). You normally don't need this function. \ **Note:** This function only makes sense when the context is started with :ref:`MODE_CBC_ENCRYPT` or :ref:`MODE_CBC_DECRYPT`. @@ -222,7 +222,7 @@ Start the AES context in the given ``mode``. A ``key`` of either 16 or 32 bytes :ref:`PackedByteArray` **update**\ (\ src\: :ref:`PackedByteArray`\ ) :ref:`πŸ”—` -Run the desired operation for this AES context. Will return a :ref:`PackedByteArray` containing the result of encrypting (or decrypting) the given ``src``. See :ref:`start` for mode of operation. +Run the desired operation for this AES context. Will return a :ref:`PackedByteArray` containing the result of encrypting (or decrypting) the given ``src``. See :ref:`start()` for mode of operation. \ **Note:** The size of ``src`` must be a multiple of 16. Apply some padding if needed. diff --git a/classes/class_animatablebody2d.rst b/classes/class_animatablebody2d.rst index 98c5ae614..fb68cf93d 100644 --- a/classes/class_animatablebody2d.rst +++ b/classes/class_animatablebody2d.rst @@ -55,7 +55,7 @@ Property Descriptions - |void| **set_sync_to_physics**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_sync_to_physics_enabled**\ (\ ) -If ``true``, the body's movement will be synchronized to the physics frame. This is useful when animating movement via :ref:`AnimationPlayer`, for example on moving platforms. Do **not** use together with :ref:`PhysicsBody2D.move_and_collide`. +If ``true``, the body's movement will be synchronized to the physics frame. This is useful when animating movement via :ref:`AnimationPlayer`, for example on moving platforms. Do **not** use together with :ref:`PhysicsBody2D.move_and_collide()`. .. |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_animatablebody3d.rst b/classes/class_animatablebody3d.rst index 9d1cd5e62..d96fc1efa 100644 --- a/classes/class_animatablebody3d.rst +++ b/classes/class_animatablebody3d.rst @@ -66,7 +66,7 @@ Property Descriptions - |void| **set_sync_to_physics**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_sync_to_physics_enabled**\ (\ ) -If ``true``, the body's movement will be synchronized to the physics frame. This is useful when animating movement via :ref:`AnimationPlayer`, for example on moving platforms. Do **not** use together with :ref:`PhysicsBody3D.move_and_collide`. +If ``true``, the body's movement will be synchronized to the physics frame. This is useful when animating movement via :ref:`AnimationPlayer`, for example on moving platforms. Do **not** use together with :ref:`PhysicsBody3D.move_and_collide()`. .. |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_animatedsprite2d.rst b/classes/class_animatedsprite2d.rst index dc63037b2..0810c8ffc 100644 --- a/classes/class_animatedsprite2d.rst +++ b/classes/class_animatedsprite2d.rst @@ -258,7 +258,7 @@ If ``true``, texture is flipped vertically. - |void| **set_frame**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_frame**\ (\ ) -The displayed animation frame's index. Setting this property also resets :ref:`frame_progress`. If this is not desired, use :ref:`set_frame_and_progress`. +The displayed animation frame's index. Setting this property also resets :ref:`frame_progress`. If this is not desired, use :ref:`set_frame_and_progress()`. .. rst-class:: classref-item-separator @@ -345,7 +345,7 @@ Method Descriptions :ref:`float` **get_playing_speed**\ (\ ) |const| :ref:`πŸ”—` -Returns the actual playing speed of current animation or ``0`` if not playing. This speed is the :ref:`speed_scale` property multiplied by ``custom_speed`` argument specified when calling the :ref:`play` method. +Returns the actual playing speed of current animation or ``0`` if not playing. This speed is the :ref:`speed_scale` property multiplied by ``custom_speed`` argument specified when calling the :ref:`play()` method. Returns a negative value if the current animation is playing backwards. @@ -371,9 +371,9 @@ Returns ``true`` if an animation is currently playing (even if :ref:`speed_scale |void| **pause**\ (\ ) :ref:`πŸ”—` -Pauses the currently playing animation. The :ref:`frame` and :ref:`frame_progress` will be kept and calling :ref:`play` or :ref:`play_backwards` without arguments will resume the animation from the current playback position. +Pauses the currently playing animation. The :ref:`frame` and :ref:`frame_progress` will be kept and calling :ref:`play()` or :ref:`play_backwards()` without arguments will resume the animation from the current playback position. -See also :ref:`stop`. +See also :ref:`stop()`. .. rst-class:: classref-item-separator @@ -385,7 +385,7 @@ See also :ref:`stop`. |void| **play**\ (\ name\: :ref:`StringName` = &"", custom_speed\: :ref:`float` = 1.0, from_end\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Plays the animation with key ``name``. If ``custom_speed`` is negative and ``from_end`` is ``true``, the animation will play backwards (which is equivalent to calling :ref:`play_backwards`). +Plays the animation with key ``name``. If ``custom_speed`` is negative and ``from_end`` is ``true``, the animation will play backwards (which is equivalent to calling :ref:`play_backwards()`). If this method is called with that same animation ``name``, or with no ``name`` parameter, the assigned animation will resume playing if it was paused. @@ -401,7 +401,7 @@ If this method is called with that same animation ``name``, or with no ``name`` Plays the animation with key ``name`` in reverse. -This method is a shorthand for :ref:`play` with ``custom_speed = -1.0`` and ``from_end = true``, so see its description for more information. +This method is a shorthand for :ref:`play()` with ``custom_speed = -1.0`` and ``from_end = true``, so see its description for more information. .. rst-class:: classref-item-separator @@ -439,7 +439,7 @@ Sets :ref:`frame` the :ref:`frame_progres |void| **stop**\ (\ ) :ref:`πŸ”—` -Stops the currently playing animation. The animation position is reset to ``0`` and the ``custom_speed`` is reset to ``1.0``. See also :ref:`pause`. +Stops the currently playing animation. The animation position is reset to ``0`` and the ``custom_speed`` is reset to ``1.0``. See also :ref:`pause()`. .. |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_animatedsprite3d.rst b/classes/class_animatedsprite3d.rst index 744c7ff23..d42a4c0c3 100644 --- a/classes/class_animatedsprite3d.rst +++ b/classes/class_animatedsprite3d.rst @@ -195,7 +195,7 @@ The key of the animation to play when the scene loads. - |void| **set_frame**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_frame**\ (\ ) -The displayed animation frame's index. Setting this property also resets :ref:`frame_progress`. If this is not desired, use :ref:`set_frame_and_progress`. +The displayed animation frame's index. Setting this property also resets :ref:`frame_progress`. If this is not desired, use :ref:`set_frame_and_progress()`. .. rst-class:: classref-item-separator @@ -265,7 +265,7 @@ Method Descriptions :ref:`float` **get_playing_speed**\ (\ ) |const| :ref:`πŸ”—` -Returns the actual playing speed of current animation or ``0`` if not playing. This speed is the :ref:`speed_scale` property multiplied by ``custom_speed`` argument specified when calling the :ref:`play` method. +Returns the actual playing speed of current animation or ``0`` if not playing. This speed is the :ref:`speed_scale` property multiplied by ``custom_speed`` argument specified when calling the :ref:`play()` method. Returns a negative value if the current animation is playing backwards. @@ -291,9 +291,9 @@ Returns ``true`` if an animation is currently playing (even if :ref:`speed_scale |void| **pause**\ (\ ) :ref:`πŸ”—` -Pauses the currently playing animation. The :ref:`frame` and :ref:`frame_progress` will be kept and calling :ref:`play` or :ref:`play_backwards` without arguments will resume the animation from the current playback position. +Pauses the currently playing animation. The :ref:`frame` and :ref:`frame_progress` will be kept and calling :ref:`play()` or :ref:`play_backwards()` without arguments will resume the animation from the current playback position. -See also :ref:`stop`. +See also :ref:`stop()`. .. rst-class:: classref-item-separator @@ -305,7 +305,7 @@ See also :ref:`stop`. |void| **play**\ (\ name\: :ref:`StringName` = &"", custom_speed\: :ref:`float` = 1.0, from_end\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Plays the animation with key ``name``. If ``custom_speed`` is negative and ``from_end`` is ``true``, the animation will play backwards (which is equivalent to calling :ref:`play_backwards`). +Plays the animation with key ``name``. If ``custom_speed`` is negative and ``from_end`` is ``true``, the animation will play backwards (which is equivalent to calling :ref:`play_backwards()`). If this method is called with that same animation ``name``, or with no ``name`` parameter, the assigned animation will resume playing if it was paused. @@ -321,7 +321,7 @@ If this method is called with that same animation ``name``, or with no ``name`` Plays the animation with key ``name`` in reverse. -This method is a shorthand for :ref:`play` with ``custom_speed = -1.0`` and ``from_end = true``, so see its description for more information. +This method is a shorthand for :ref:`play()` with ``custom_speed = -1.0`` and ``from_end = true``, so see its description for more information. .. rst-class:: classref-item-separator @@ -359,7 +359,7 @@ Sets :ref:`frame` the :ref:`frame_progres |void| **stop**\ (\ ) :ref:`πŸ”—` -Stops the currently playing animation. The animation position is reset to ``0`` and the ``custom_speed`` is reset to ``1.0``. See also :ref:`pause`. +Stops the currently playing animation. The animation position is reset to ``0`` and the ``custom_speed`` is reset to ``1.0``. See also :ref:`pause()`. .. |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_animatedtexture.rst b/classes/class_animatedtexture.rst index da38191a1..0ec02d591 100644 --- a/classes/class_animatedtexture.rst +++ b/classes/class_animatedtexture.rst @@ -23,7 +23,7 @@ Description **AnimatedTexture** is a resource format for frame-based animations, where multiple textures can be chained automatically with a predefined delay for each frame. Unlike :ref:`AnimationPlayer` or :ref:`AnimatedSprite2D`, it isn't a :ref:`Node`, but has the advantage of being usable anywhere a :ref:`Texture2D` resource can be used, e.g. in a :ref:`TileSet`. -The playback of the animation is controlled by the :ref:`speed_scale` property, as well as each frame's duration (see :ref:`set_frame_duration`). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame. +The playback of the animation is controlled by the :ref:`speed_scale` property, as well as each frame's duration (see :ref:`set_frame_duration()`). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame. \ **AnimatedTexture** currently requires all frame textures to have the same size, otherwise the bigger ones will be cropped to match the smallest one. @@ -125,7 +125,7 @@ Sets the currently visible frame of the texture. Setting this frame while playin - |void| **set_frames**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_frames**\ (\ ) -Number of frames to use in the animation. While you can create the frames independently with :ref:`set_frame_texture`, you need to set this value for the animation to take new frames into account. The maximum number of frames is :ref:`MAX_FRAMES`. +Number of frames to use in the animation. While you can create the frames independently with :ref:`set_frame_texture()`, you need to set this value for the animation to take new frames into account. The maximum number of frames is :ref:`MAX_FRAMES`. .. rst-class:: classref-item-separator diff --git a/classes/class_animation.rst b/classes/class_animation.rst index 94979b016..3b7189ba0 100644 --- a/classes/class_animation.rst +++ b/classes/class_animation.rst @@ -416,7 +416,7 @@ Update at the keyframes. :ref:`UpdateMode` **UPDATE_CAPTURE** = ``2`` -Same as :ref:`UPDATE_CONTINUOUS` but works as a flag to capture the value of the current object and perform interpolation in some methods. See also :ref:`AnimationMixer.capture`, :ref:`AnimationPlayer.playback_auto_capture`, and :ref:`AnimationPlayer.play_with_capture`. +Same as :ref:`UPDATE_CONTINUOUS` but works as a flag to capture the value of the current object and perform interpolation in some methods. See also :ref:`AnimationMixer.capture()`, :ref:`AnimationPlayer.playback_auto_capture`, and :ref:`AnimationPlayer.play_with_capture()`. .. rst-class:: classref-item-separator @@ -917,7 +917,7 @@ Clear the animation (clear all tracks and reset all). |void| **compress**\ (\ page_size\: :ref:`int` = 8192, fps\: :ref:`int` = 120, split_tolerance\: :ref:`float` = 4.0\ ) :ref:`πŸ”—` -Compress the animation and all its tracks in-place. This will make :ref:`track_is_compressed` return ``true`` once called on this **Animation**. Compressed tracks require less memory to be played, and are designed to be used for complex 3D animations (such as cutscenes) imported from external 3D software. Compression is lossy, but the difference is usually not noticeable in real world conditions. +Compress the animation and all its tracks in-place. This will make :ref:`track_is_compressed()` return ``true`` once called on this **Animation**. Compressed tracks require less memory to be played, and are designed to be used for complex 3D animations (such as cutscenes) imported from external 3D software. Compression is lossy, but the difference is usually not noticeable in real world conditions. \ **Note:** Compressed tracks have various limitations (such as not being editable from the editor), so only use compressed animations if you actually need them. @@ -1261,7 +1261,7 @@ Returns the time at which the key is located. :ref:`float` **track_get_key_transition**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the transition curve (easing) for a specific key (see the built-in math function :ref:`@GlobalScope.ease`). +Returns the transition curve (easing) for a specific key (see the built-in math function :ref:`@GlobalScope.ease()`). .. rst-class:: classref-item-separator @@ -1285,7 +1285,7 @@ Returns the value of a given key in a given track. :ref:`NodePath` **track_get_path**\ (\ track_idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Gets the path of a track. For more information on the path format, see :ref:`track_set_path`. +Gets the path of a track. For more information on the path format, see :ref:`track_set_path()`. .. rst-class:: classref-item-separator @@ -1321,7 +1321,7 @@ Inserts a generic key in a given track. Returns the key index. :ref:`bool` **track_is_compressed**\ (\ track_idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the track is compressed, ``false`` otherwise. See also :ref:`compress`. +Returns ``true`` if the track is compressed, ``false`` otherwise. See also :ref:`compress()`. .. rst-class:: classref-item-separator @@ -1477,7 +1477,7 @@ Sets the time of an existing key. |void| **track_set_key_transition**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`, transition\: :ref:`float`\ ) :ref:`πŸ”—` -Sets the transition curve (easing) for a specific key (see the built-in math function :ref:`@GlobalScope.ease`). +Sets the transition curve (easing) for a specific key (see the built-in math function :ref:`@GlobalScope.ease()`). .. rst-class:: classref-item-separator @@ -1541,7 +1541,7 @@ Returns the update mode of a value track. Returns the interpolated value at the given time (in seconds). The ``track_idx`` must be the index of a value track. -A ``backward`` mainly affects the direction of key retrieval of the track with :ref:`UPDATE_DISCRETE` converted by :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS` to match the result with :ref:`track_find_key`. +A ``backward`` mainly affects the direction of key retrieval of the track with :ref:`UPDATE_DISCRETE` converted by :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS` to match the result with :ref:`track_find_key()`. .. rst-class:: classref-item-separator diff --git a/classes/class_animationmixer.rst b/classes/class_animationmixer.rst index b85842942..950ce0d96 100644 --- a/classes/class_animationmixer.rst +++ b/classes/class_animationmixer.rst @@ -179,7 +179,7 @@ Notifies when an animation starts playing. **caches_cleared**\ (\ ) :ref:`πŸ”—` -Notifies when the caches have been cleared, either automatically, or manually via :ref:`clear_caches`. +Notifies when the caches have been cleared, either automatically, or manually via :ref:`clear_caches()`. .. rst-class:: classref-item-separator @@ -242,7 +242,7 @@ Process animation during process frames (see :ref:`Node.NOTIFICATION_INTERNAL_PR :ref:`AnimationCallbackModeProcess` **ANIMATION_CALLBACK_MODE_PROCESS_MANUAL** = ``2`` -Do not process animation. Use :ref:`advance` to process the animation manually. +Do not process animation. Use :ref:`advance()` to process the animation manually. .. rst-class:: classref-item-separator @@ -487,7 +487,7 @@ This makes it more convenient to preview and edit animations in the editor, as c - |void| **set_root_motion_local**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_root_motion_local**\ (\ ) -If ``true``, :ref:`get_root_motion_position` value is extracted as a local translation value before blending. In other words, it is treated like the translation is done after the rotation. +If ``true``, :ref:`get_root_motion_position()` value is extracted as a local translation value before blending. In other words, it is treated like the translation is done after the rotation. .. rst-class:: classref-item-separator @@ -504,9 +504,9 @@ If ``true``, :ref:`get_root_motion_position`\ ) - :ref:`NodePath` **get_root_motion_track**\ (\ ) -The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. The :ref:`root_motion_track` uses the same format as :ref:`Animation.track_set_path`, but note that a bone must be specified. +The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. The :ref:`root_motion_track` uses the same format as :ref:`Animation.track_set_path()`, but note that a bone must be specified. -If the track has type :ref:`Animation.TYPE_POSITION_3D`, :ref:`Animation.TYPE_ROTATION_3D`, or :ref:`Animation.TYPE_SCALE_3D` the transformation will be canceled visually, and the animation will appear to stay in place. See also :ref:`get_root_motion_position`, :ref:`get_root_motion_rotation`, :ref:`get_root_motion_scale`, and :ref:`RootMotionView`. +If the track has type :ref:`Animation.TYPE_POSITION_3D`, :ref:`Animation.TYPE_ROTATION_3D`, or :ref:`Animation.TYPE_SCALE_3D` the transformation will be canceled visually, and the animation will appear to stay in place. See also :ref:`get_root_motion_position()`, :ref:`get_root_motion_rotation()`, :ref:`get_root_motion_scale()`, and :ref:`RootMotionView`. .. rst-class:: classref-item-separator @@ -604,7 +604,7 @@ You can specify ``trans_type`` as the curve for the interpolation. For better re |void| **clear_caches**\ (\ ) :ref:`πŸ”—` -**AnimationMixer** caches animated nodes. It may not notice if a node disappears; :ref:`clear_caches` forces it to update the cache again. +**AnimationMixer** caches animated nodes. It may not notice if a node disappears; :ref:`clear_caches()` forces it to update the cache again. .. rst-class:: classref-item-separator @@ -715,7 +715,7 @@ The most basic example is applying position to :ref:`CharacterBody3D`, you can apply the root motion position more correctly to account for the rotation of the node. +By using this in combination with :ref:`get_root_motion_rotation_accumulator()`, you can apply the root motion position more correctly to account for the rotation of the node. .. tabs:: @@ -828,7 +828,7 @@ The most basic example is applying rotation to :ref:`CharacterBody3D` as a :ref:`Quaternion` that can be used elsewhere. -This is necessary to apply the root motion position correctly, taking rotation into account. See also :ref:`get_root_motion_position`. +This is necessary to apply the root motion position correctly, taking rotation into account. See also :ref:`get_root_motion_position()`. Also, this is useful in cases where you want to respect the initial key values of the animation. diff --git a/classes/class_animationnode.rst b/classes/class_animationnode.rst index 4e6151ed6..93372bff6 100644 --- a/classes/class_animationnode.rst +++ b/classes/class_animationnode.rst @@ -283,7 +283,7 @@ When inheriting from :ref:`AnimationRootNode`, implemen :ref:`Array` **_get_parameter_list**\ (\ ) |virtual| |const| :ref:`πŸ”—` -When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return a list of the properties on this animation node. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees. Format is similar to :ref:`Object.get_property_list`. +When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return a list of the properties on this animation node. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees. Format is similar to :ref:`Object.get_property_list()`. .. rst-class:: classref-item-separator @@ -323,7 +323,7 @@ When inheriting from :ref:`AnimationRootNode`, implemen 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. +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 delta. @@ -437,7 +437,7 @@ Gets the value of a parameter. Parameters are custom local memory used for your Returns the object id of the :ref:`AnimationTree` that owns this node. -\ **Note:** This method should only be called from within the :ref:`AnimationNodeExtension._process_animation_node` method, and will return an invalid id otherwise. +\ **Note:** This method should only be called from within the :ref:`AnimationNodeExtension._process_animation_node()` method, and will return an invalid id otherwise. .. rst-class:: classref-item-separator diff --git a/classes/class_animationnodeanimation.rst b/classes/class_animationnodeanimation.rst index 7f25c8bfb..2d14e3dbd 100644 --- a/classes/class_animationnodeanimation.rst +++ b/classes/class_animationnodeanimation.rst @@ -111,7 +111,7 @@ Property Descriptions If ``true``, on receiving a request to play an animation from the start, the first frame is not drawn, but only processed, and playback starts from the next frame. -See also the notes of :ref:`AnimationPlayer.play`. +See also the notes of :ref:`AnimationPlayer.play()`. .. rst-class:: classref-item-separator @@ -147,7 +147,7 @@ Animation to use as an output. It is one of the animations provided by :ref:`Ani If :ref:`use_custom_timeline` is ``true``, override the loop settings of the original :ref:`Animation` resource with the value. -\ **Note:** If the :ref:`Animation.loop_mode` isn't set to looping, the :ref:`Animation.track_set_interpolation_loop_wrap` option will not be respected. If you cannot get the expected behavior, consider duplicating the :ref:`Animation` resource and changing the loop settings. +\ **Note:** If the :ref:`Animation.loop_mode` isn't set to looping, the :ref:`Animation.track_set_interpolation_loop_wrap()` option will not be respected. If you cannot get the expected behavior, consider duplicating the :ref:`Animation` resource and changing the loop settings. .. rst-class:: classref-item-separator diff --git a/classes/class_animationnodeblendspace1d.rst b/classes/class_animationnodeblendspace1d.rst index a2647c286..e302b7582 100644 --- a/classes/class_animationnodeblendspace1d.rst +++ b/classes/class_animationnodeblendspace1d.rst @@ -21,7 +21,7 @@ Description A resource used by :ref:`AnimationNodeBlendTree`. -\ **AnimationNodeBlendSpace1D** represents a virtual axis on which any type of :ref:`AnimationRootNode`\ s can be added using :ref:`add_blend_point`. Outputs the linear blend of the two :ref:`AnimationRootNode`\ s adjacent to the current value. +\ **AnimationNodeBlendSpace1D** represents a virtual axis on which any type of :ref:`AnimationRootNode`\ s can be added using :ref:`add_blend_point()`. Outputs the linear blend of the two :ref:`AnimationRootNode`\ s adjacent to the current value. You can set the extents of the axis with :ref:`min_space` and :ref:`max_space`. @@ -154,7 +154,7 @@ Controls the interpolation between animations. See :ref:`BlendMode`\ ) - :ref:`float` **get_max_space**\ (\ ) -The blend space's axis's upper limit for the points' position. See :ref:`add_blend_point`. +The blend space's axis's upper limit for the points' position. See :ref:`add_blend_point()`. .. rst-class:: classref-item-separator @@ -171,7 +171,7 @@ The blend space's axis's upper limit for the points' position. See :ref:`add_ble - |void| **set_min_space**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_min_space**\ (\ ) -The blend space's axis's lower limit for the points' position. See :ref:`add_blend_point`. +The blend space's axis's lower limit for the points' position. See :ref:`add_blend_point()`. .. rst-class:: classref-item-separator diff --git a/classes/class_animationnodeblendspace2d.rst b/classes/class_animationnodeblendspace2d.rst index c107fffa9..f555b0367 100644 --- a/classes/class_animationnodeblendspace2d.rst +++ b/classes/class_animationnodeblendspace2d.rst @@ -23,7 +23,7 @@ A resource used by :ref:`AnimationNodeBlendTree`. \ **AnimationNodeBlendSpace2D** represents a virtual 2D space on which :ref:`AnimationRootNode`\ s are placed. Outputs the linear blend of the three adjacent animations using a :ref:`Vector2` weight. Adjacent in this context means the three :ref:`AnimationRootNode`\ s making up the triangle that contains the current value. -You can add vertices to the blend space with :ref:`add_blend_point` and automatically triangulate it by setting :ref:`auto_triangles` to ``true``. Otherwise, use :ref:`add_triangle` and :ref:`remove_triangle` to triangulate the blend space by hand. +You can add vertices to the blend space with :ref:`add_blend_point()` and automatically triangulate it by setting :ref:`auto_triangles` to ``true``. Otherwise, use :ref:`add_triangle()` and :ref:`remove_triangle()` to triangulate the blend space by hand. .. rst-class:: classref-introduction-group @@ -168,7 +168,7 @@ Property Descriptions - |void| **set_auto_triangles**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_auto_triangles**\ (\ ) -If ``true``, the blend space is triangulated automatically. The mesh updates every time you add or remove points with :ref:`add_blend_point` and :ref:`remove_blend_point`. +If ``true``, the blend space is triangulated automatically. The mesh updates every time you add or remove points with :ref:`add_blend_point()` and :ref:`remove_blend_point()`. .. rst-class:: classref-item-separator @@ -202,7 +202,7 @@ Controls the interpolation between animations. See :ref:`BlendMode`\ ) - :ref:`Vector2` **get_max_space**\ (\ ) -The blend space's X and Y axes' upper limit for the points' position. See :ref:`add_blend_point`. +The blend space's X and Y axes' upper limit for the points' position. See :ref:`add_blend_point()`. .. rst-class:: classref-item-separator @@ -219,7 +219,7 @@ The blend space's X and Y axes' upper limit for the points' position. See :ref:` - |void| **set_min_space**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_min_space**\ (\ ) -The blend space's X and Y axes' lower limit for the points' position. See :ref:`add_blend_point`. +The blend space's X and Y axes' lower limit for the points' position. See :ref:`add_blend_point()`. .. rst-class:: classref-item-separator diff --git a/classes/class_animationnodeextension.rst b/classes/class_animationnodeextension.rst index eead231f8..3bb6932ae 100644 --- a/classes/class_animationnodeextension.rst +++ b/classes/class_animationnodeextension.rst @@ -54,7 +54,7 @@ Method Descriptions :ref:`PackedFloat32Array` **_process_animation_node**\ (\ playback_info\: :ref:`PackedFloat64Array`, test_only\: :ref:`bool`\ ) |virtual| :ref:`πŸ”—` -A version of the :ref:`AnimationNode._process` method that is meant to be overridden by custom nodes. It returns a :ref:`PackedFloat32Array` with the processed animation data. +A version of the :ref:`AnimationNode._process()` method that is meant to be overridden by custom nodes. It returns a :ref:`PackedFloat32Array` with the processed animation data. The :ref:`PackedFloat64Array` parameter contains the playback information, containing the following values encoded as floating point numbers (in order): playback time and delta, start and end times, whether a seek was requested (encoded as a float greater than ``0``), whether the seek request was externally requested (encoded as a float greater than ``0``), the current :ref:`LoopedFlag` (encoded as a float), and the current blend weight. diff --git a/classes/class_animationnodestatemachine.rst b/classes/class_animationnodestatemachine.rst index d5e14462e..f22a1a63f 100644 --- a/classes/class_animationnodestatemachine.rst +++ b/classes/class_animationnodestatemachine.rst @@ -166,7 +166,7 @@ Property Descriptions - |void| **set_allow_transition_to_self**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_allow_transition_to_self**\ (\ ) -If ``true``, allows teleport to the self state with :ref:`AnimationNodeStateMachinePlayback.travel`. When the reset option is enabled in :ref:`AnimationNodeStateMachinePlayback.travel`, the animation is restarted. If ``false``, nothing happens on the teleportation to the self state. +If ``true``, allows teleport to the self state with :ref:`AnimationNodeStateMachinePlayback.travel()`. When the reset option is enabled in :ref:`AnimationNodeStateMachinePlayback.travel()`, the animation is restarted. If ``false``, nothing happens on the teleportation to the self state. .. rst-class:: classref-item-separator diff --git a/classes/class_animationnodestatemachinetransition.rst b/classes/class_animationnodestatemachinetransition.rst index 71c45f7a8..140a4a06c 100644 --- a/classes/class_animationnodestatemachinetransition.rst +++ b/classes/class_animationnodestatemachinetransition.rst @@ -19,7 +19,7 @@ A transition within an :ref:`AnimationNodeStateMachine` is limited to the nodes connected by **AnimationNodeStateMachineTransition**. +The path generated when using :ref:`AnimationNodeStateMachinePlayback.travel()` is limited to the nodes connected by **AnimationNodeStateMachineTransition**. You can set the timing and conditions of the transition in detail. @@ -138,7 +138,7 @@ Don't use this transition. :ref:`AdvanceMode` **ADVANCE_MODE_ENABLED** = ``1`` -Only use this transition during :ref:`AnimationNodeStateMachinePlayback.travel`. +Only use this transition during :ref:`AnimationNodeStateMachinePlayback.travel()`. .. _class_AnimationNodeStateMachineTransition_constant_ADVANCE_MODE_AUTO: @@ -215,7 +215,7 @@ Use an expression as a condition for state machine transitions. It is possible t - |void| **set_advance_mode**\ (\ value\: :ref:`AdvanceMode`\ ) - :ref:`AdvanceMode` **get_advance_mode**\ (\ ) -Determines whether the transition should be disabled, enabled when using :ref:`AnimationNodeStateMachinePlayback.travel`, or traversed automatically if the :ref:`advance_condition` and :ref:`advance_expression` checks are ``true`` (if assigned). +Determines whether the transition should be disabled, enabled when using :ref:`AnimationNodeStateMachinePlayback.travel()`, or traversed automatically if the :ref:`advance_condition` and :ref:`advance_expression` checks are ``true`` (if assigned). .. rst-class:: classref-item-separator @@ -249,7 +249,7 @@ If ``true``, breaks the loop at the end of the loop cycle for transition, even i - |void| **set_priority**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_priority**\ (\ ) -Lower priority transitions are preferred when travelling through the tree via :ref:`AnimationNodeStateMachinePlayback.travel` or :ref:`advance_mode` is set to :ref:`ADVANCE_MODE_AUTO`. +Lower priority transitions are preferred when travelling through the tree via :ref:`AnimationNodeStateMachinePlayback.travel()` or :ref:`advance_mode` is set to :ref:`ADVANCE_MODE_AUTO`. .. rst-class:: classref-item-separator diff --git a/classes/class_animationplayer.rst b/classes/class_animationplayer.rst index c43c0d34d..bb1c21323 100644 --- a/classes/class_animationplayer.rst +++ b/classes/class_animationplayer.rst @@ -159,9 +159,9 @@ Signals **animation_changed**\ (\ old_name\: :ref:`StringName`, new_name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Emitted when a queued animation plays after the previous animation finished. See also :ref:`queue`. +Emitted when a queued animation plays after the previous animation finished. See also :ref:`queue()`. -\ **Note:** The signal is not emitted when the animation is changed via :ref:`play` or by an :ref:`AnimationTree`. +\ **Note:** The signal is not emitted when the animation is changed via :ref:`play()` or by an :ref:`AnimationTree`. .. rst-class:: classref-item-separator @@ -304,7 +304,7 @@ The key of the animation to play when the scene loads. - |void| **set_current_animation**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_current_animation**\ (\ ) -The key of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See :ref:`play` for more information on playing animations. +The key of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See :ref:`play()` for more information on playing animations. \ **Note:** While this property appears in the Inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see :ref:`Animation`. @@ -355,7 +355,7 @@ The position (in seconds) of the currently playing animation. - |void| **set_movie_quit_on_finish_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_movie_quit_on_finish_enabled**\ (\ ) -If ``true`` and the engine is running in Movie Maker mode (see :ref:`MovieWriter`), exits the engine with :ref:`SceneTree.quit` as soon as an animation is done playing in this **AnimationPlayer**. A message is printed when the engine quits for this reason. +If ``true`` and the engine is running in Movie Maker mode (see :ref:`MovieWriter`), exits the engine with :ref:`SceneTree.quit()` as soon as an animation is done playing in this **AnimationPlayer**. A message is printed when the engine quits for this reason. \ **Note:** This obeys the same logic as the :ref:`AnimationMixer.animation_finished` signal, so it will not quit the engine if the animation is set to be looping. @@ -374,7 +374,7 @@ If ``true`` and the engine is running in Movie Maker mode (see :ref:`MovieWriter - |void| **set_auto_capture**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_auto_capture**\ (\ ) -If ``true``, performs :ref:`AnimationMixer.capture` before playback automatically. This means just :ref:`play_with_capture` is executed with default arguments instead of :ref:`play`. +If ``true``, performs :ref:`AnimationMixer.capture()` before playback automatically. This means just :ref:`play_with_capture()` is executed with default arguments instead of :ref:`play()`. \ **Note:** Capture interpolation is only performed if the animation contains a capture track. See also :ref:`Animation.UPDATE_CAPTURE`. @@ -393,7 +393,7 @@ If ``true``, performs :ref:`AnimationMixer.capture`\ ) - :ref:`float` **get_auto_capture_duration**\ (\ ) -See also :ref:`play_with_capture` and :ref:`AnimationMixer.capture`. +See also :ref:`play_with_capture()` and :ref:`AnimationMixer.capture()`. If :ref:`playback_auto_capture_duration` is negative value, the duration is set to the interval between the current position and the first key. @@ -544,7 +544,7 @@ Returns the call mode used for "Call Method" tracks. :ref:`float` **get_playing_speed**\ (\ ) |const| :ref:`πŸ”—` -Returns the actual playing speed of current animation or ``0`` if not playing. This speed is the :ref:`speed_scale` property multiplied by ``custom_speed`` argument specified when calling the :ref:`play` method. +Returns the actual playing speed of current animation or ``0`` if not playing. This speed is the :ref:`speed_scale` property multiplied by ``custom_speed`` argument specified when calling the :ref:`play()` method. Returns a negative value if the current animation is playing backwards. @@ -646,9 +646,9 @@ Returns ``true`` if an animation is currently playing (even if :ref:`speed_scale |void| **pause**\ (\ ) :ref:`πŸ”—` -Pauses the currently playing animation. The :ref:`current_animation_position` will be kept and calling :ref:`play` or :ref:`play_backwards` without arguments or with the same animation name as :ref:`assigned_animation` will resume the animation. +Pauses the currently playing animation. The :ref:`current_animation_position` will be kept and calling :ref:`play()` or :ref:`play_backwards()` without arguments or with the same animation name as :ref:`assigned_animation` will resume the animation. -See also :ref:`stop`. +See also :ref:`stop()`. .. rst-class:: classref-item-separator @@ -662,7 +662,7 @@ See also :ref:`stop`. Plays the animation with key ``name``. Custom blend times and speed can be set. -The ``from_end`` option only affects when switching to a new animation track, or if the same track but at the start or end. It does not affect resuming playback that was paused in the middle of an animation. If ``custom_speed`` is negative and ``from_end`` is ``true``, the animation will play backwards (which is equivalent to calling :ref:`play_backwards`). +The ``from_end`` option only affects when switching to a new animation track, or if the same track but at the start or end. It does not affect resuming playback that was paused in the middle of an animation. If ``custom_speed`` is negative and ``from_end`` is ``true``, the animation will play backwards (which is equivalent to calling :ref:`play_backwards()`). The **AnimationPlayer** keeps track of its current or last played animation with :ref:`assigned_animation`. If this method is called with that same animation ``name``, or with no ``name`` parameter, the assigned animation will resume playing if it was paused. @@ -680,7 +680,7 @@ The **AnimationPlayer** keeps track of its current or last played animation with Plays the animation with key ``name`` in reverse. -This method is a shorthand for :ref:`play` with ``custom_speed = -1.0`` and ``from_end = true``, so see its description for more information. +This method is a shorthand for :ref:`play()` with ``custom_speed = -1.0`` and ``from_end = true``, so see its description for more information. .. rst-class:: classref-item-separator @@ -692,7 +692,7 @@ This method is a shorthand for :ref:`play` wi |void| **play_section**\ (\ name\: :ref:`StringName` = &"", start_time\: :ref:`float` = -1, end_time\: :ref:`float` = -1, custom_blend\: :ref:`float` = -1, custom_speed\: :ref:`float` = 1.0, from_end\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Plays the animation with key ``name`` and the section starting from ``start_time`` and ending on ``end_time``. See also :ref:`play`. +Plays the animation with key ``name`` and the section starting from ``start_time`` and ending on ``end_time``. See also :ref:`play()`. Setting ``start_time`` to a value outside the range of the animation means the start of the animation will be used instead, and setting ``end_time`` to a value outside the range of the animation means the end of the animation will be used instead. ``start_time`` cannot be equal to ``end_time``. @@ -708,7 +708,7 @@ Setting ``start_time`` to a value outside the range of the animation means the s Plays the animation with key ``name`` and the section starting from ``start_time`` and ending on ``end_time`` in reverse. -This method is a shorthand for :ref:`play_section` with ``custom_speed = -1.0`` and ``from_end = true``, see its description for more information. +This method is a shorthand for :ref:`play_section()` with ``custom_speed = -1.0`` and ``from_end = true``, see its description for more information. .. rst-class:: classref-item-separator @@ -722,7 +722,7 @@ This method is a shorthand for :ref:`play_section`. +If the start marker is empty, the section starts from the beginning of the animation. If the end marker is empty, the section ends on the end of the animation. See also :ref:`play()`. .. rst-class:: classref-item-separator @@ -736,7 +736,7 @@ If the start marker is empty, the section starts from the beginning of the anima Plays the animation with key ``name`` and the section starting from ``start_marker`` and ending on ``end_marker`` in reverse. -This method is a shorthand for :ref:`play_section_with_markers` with ``custom_speed = -1.0`` and ``from_end = true``, see its description for more information. +This method is a shorthand for :ref:`play_section_with_markers()` with ``custom_speed = -1.0`` and ``from_end = true``, see its description for more information. .. rst-class:: classref-item-separator @@ -748,7 +748,7 @@ This method is a shorthand for :ref:`play_section_with_markers` = &"", duration\: :ref:`float` = -1.0, custom_blend\: :ref:`float` = -1, custom_speed\: :ref:`float` = 1.0, from_end\: :ref:`bool` = false, trans_type\: :ref:`TransitionType` = 0, ease_type\: :ref:`EaseType` = 0\ ) :ref:`πŸ”—` -See also :ref:`AnimationMixer.capture`. +See also :ref:`AnimationMixer.capture()`. You can use this method to use more detailed options for capture than those performed by :ref:`playback_auto_capture`. When :ref:`playback_auto_capture` is ``false``, this method is almost the same as the following: @@ -803,7 +803,7 @@ Seeks the animation to the ``seconds`` point in time (in seconds). If ``update`` If ``update_only`` is ``true``, the method / audio / animation playback tracks will not be processed. -\ **Note:** Seeking to the end of the animation doesn't emit :ref:`AnimationMixer.animation_finished`. If you want to skip animation and emit the signal, use :ref:`AnimationMixer.advance`. +\ **Note:** Seeking to the end of the animation doesn't emit :ref:`AnimationMixer.animation_finished`. If you want to skip animation and emit the signal, use :ref:`AnimationMixer.advance()`. .. rst-class:: classref-item-separator @@ -869,7 +869,7 @@ Sets the node which node path references will travel from. |void| **set_section**\ (\ start_time\: :ref:`float` = -1, end_time\: :ref:`float` = -1\ ) :ref:`πŸ”—` -Changes the start and end times of the section being played. The current playback position will be clamped within the new section. See also :ref:`play_section`. +Changes the start and end times of the section being played. The current playback position will be clamped within the new section. See also :ref:`play_section()`. .. rst-class:: classref-item-separator @@ -881,7 +881,7 @@ Changes the start and end times of the section being played. The current playbac |void| **set_section_with_markers**\ (\ start_marker\: :ref:`StringName` = &"", end_marker\: :ref:`StringName` = &""\ ) :ref:`πŸ”—` -Changes the start and end markers of the section being played. The current playback position will be clamped within the new section. See also :ref:`play_section_with_markers`. +Changes the start and end markers of the section being played. The current playback position will be clamped within the new section. See also :ref:`play_section_with_markers()`. If the argument is empty, the section uses the beginning or end of the animation. If both are empty, it means that the section is not set. @@ -895,7 +895,7 @@ If the argument is empty, the section uses the beginning or end of the animation |void| **stop**\ (\ keep_state\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Stops the currently playing animation. The animation position is reset to ``0`` and the ``custom_speed`` is reset to ``1.0``. See also :ref:`pause`. +Stops the currently playing animation. The animation position is reset to ``0`` and the ``custom_speed`` is reset to ``1.0``. See also :ref:`pause()`. If ``keep_state`` is ``true``, the animation state is not updated visually. diff --git a/classes/class_array.rst b/classes/class_array.rst index 08cfcfc6b..7dccd4243 100644 --- a/classes/class_array.rst +++ b/classes/class_array.rst @@ -46,11 +46,11 @@ An array data structure that can contain a sequence of elements of any :ref:`Var -\ **Note:** 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`. +\ **Note:** 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()`. \ **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. +\ **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:: @@ -257,7 +257,7 @@ Creates a typed array from the ``base`` array. A typed array can only contain el - ``type`` is the built-in :ref:`Variant` type, as one the :ref:`Variant.Type` constants. -- ``class_name`` is the built-in class name (see :ref:`Object.get_class`). +- ``class_name`` is the built-in class name (see :ref:`Object.get_class()`). - ``script`` is the associated script. It must be a :ref:`Script` instance or ``null``. @@ -297,7 +297,7 @@ In GDScript, this constructor is usually not necessary, as it is possible to cre :ref:`Array` **Array**\ (\ from\: :ref:`Array`\ ) -Returns the same array as ``from``. If you need a copy of the array, use :ref:`duplicate`. +Returns the same array as ``from``. If you need a copy of the array, use :ref:`duplicate()`. .. rst-class:: classref-item-separator @@ -459,9 +459,9 @@ The ``method`` should take one :ref:`Variant` parameter (the curr -See also :ref:`any`, :ref:`filter`, :ref:`map` and :ref:`reduce`. +See also :ref:`any()`, :ref:`filter()`, :ref:`map()` and :ref:`reduce()`. -\ **Note:** Unlike relying on the size of an array returned by :ref:`filter`, this method will return as early as possible to improve performance (especially with large arrays). +\ **Note:** Unlike relying on the size of an array returned by :ref:`filter()`, this method will return as early as possible to improve performance (especially with large arrays). \ **Note:** For an empty array, this method `always `__ returns ``true``. @@ -493,9 +493,9 @@ The ``method`` should take one :ref:`Variant` parameter (the curr # Same as the first line above, but using a lambda function. print([6, 10, 6].any(func(number): return number > 5)) # Prints true -See also :ref:`all`, :ref:`filter`, :ref:`map` and :ref:`reduce`. +See also :ref:`all()`, :ref:`filter()`, :ref:`map()` and :ref:`reduce()`. -\ **Note:** Unlike relying on the size of an array returned by :ref:`filter`, this method will return as early as possible to improve performance (especially with large arrays). +\ **Note:** Unlike relying on the size of an array returned by :ref:`filter()`, this method will return as early as possible to improve performance (especially with large arrays). \ **Note:** For an empty array, this method always returns ``false``. @@ -509,7 +509,7 @@ See also :ref:`all`, :ref:`filter`\ ) :ref:`πŸ”—` -Appends ``value`` at the end of the array (alias of :ref:`push_back`). +Appends ``value`` at the end of the array (alias of :ref:`push_back()`). .. rst-class:: classref-item-separator @@ -552,7 +552,7 @@ Assigns elements of another ``array`` into the array. Resizes the array to match :ref:`Variant` **back**\ (\ ) |const| :ref:`πŸ”—` -Returns the last element of the array. If the array is empty, fails and returns ``null``. See also :ref:`front`. +Returns the last element of the array. If the array is empty, fails and returns ``null``. See also :ref:`front()`. \ **Note:** Unlike with the ``[]`` operator (``array[-1]``), an error is generated without stopping project execution. @@ -582,7 +582,7 @@ If ``before`` is ``true`` (as by default), the returned index comes before all e print(fruits.bsearch("Lemon", true)) # Prints 1, points at the first "Lemon". print(fruits.bsearch("Lemon", false)) # Prints 3, points at "Orange". -\ **Note:** Calling :ref:`bsearch` on an *unsorted* array will result in unexpected behavior. Use :ref:`sort` before calling this method. +\ **Note:** Calling :ref:`bsearch()` on an *unsorted* array will result in unexpected behavior. Use :ref:`sort()` before calling this method. .. rst-class:: classref-item-separator @@ -596,7 +596,7 @@ If ``before`` is ``true`` (as by default), the returned index comes before all e Returns the index of ``value`` in the sorted array. If it cannot be found, returns where ``value`` should be inserted to keep the array sorted (using ``func`` for the comparisons). The algorithm used is `binary search `__. -Similar to :ref:`sort_custom`, ``func`` is called as many times as necessary, receiving one array element and ``value`` as arguments. The function should return ``true`` if the array element should be *behind* ``value``, otherwise it should return ``false``. +Similar to :ref:`sort_custom()`, ``func`` is called as many times as necessary, receiving one array element and ``value`` as arguments. The function should return ``true`` if the array element should be *behind* ``value``, otherwise it should return ``false``. If ``before`` is ``true`` (as by default), the returned index comes before all existing elements equal to ``value`` in the array. @@ -621,7 +621,7 @@ If ``before`` is ``true`` (as by default), the returned index comes before all e # Prints [["Tomato", 2], ["Apple", 5], ["Kiwi", 5], ["Banana", 5], ["Rice", 9]] print(my_items) -\ **Note:** Calling :ref:`bsearch_custom` on an *unsorted* array will result in unexpected behavior. Use :ref:`sort_custom` with ``func`` before calling this method. +\ **Note:** Calling :ref:`bsearch_custom()` on an *unsorted* array will result in unexpected behavior. Use :ref:`sort_custom()` with ``func`` before calling this method. .. rst-class:: classref-item-separator @@ -633,7 +633,7 @@ If ``before`` is ``true`` (as by default), the returned index comes before all e |void| **clear**\ (\ ) :ref:`πŸ”—` -Removes all elements from the array. This is equivalent to using :ref:`resize` with a size of ``0``. +Removes all elements from the array. This is equivalent to using :ref:`resize()` with a size of ``0``. .. rst-class:: classref-item-separator @@ -647,7 +647,7 @@ Removes all elements from the array. This is equivalent to using :ref:`resize`. +To count how many elements in an array satisfy a condition, see :ref:`reduce()`. .. rst-class:: classref-item-separator @@ -675,7 +675,7 @@ If ``deep`` is ``true``, a **deep** copy is returned: all nested arrays and dict |void| **erase**\ (\ value\: :ref:`Variant`\ ) :ref:`πŸ”—` -Finds and removes the first occurrence of ``value`` from the array. If ``value`` does not exist in the array, nothing happens. To remove an element by index, use :ref:`remove_at` instead. +Finds and removes the first occurrence of ``value`` from the array. If ``value`` does not exist in the array, nothing happens. To remove an element by index, use :ref:`remove_at()` instead. \ **Note:** This method shifts every element's index after the removed ``value`` back, which may have a noticeable performance cost, especially on larger arrays. @@ -693,7 +693,7 @@ Finds and removes the first occurrence of ``value`` from the array. If ``value`` Assigns the given ``value`` to all elements in the array. -This method can often be combined with :ref:`resize` to create an array with a given size and initialized elements: +This method can often be combined with :ref:`resize()` to create an array with a given size and initialized elements: .. tabs:: @@ -741,7 +741,7 @@ The ``method`` receives one of the array elements as an argument, and should ret # Same as above, but using a lambda function. print([1, 4, 5, 8].filter(func(number): return number % 2 == 0)) -See also :ref:`any`, :ref:`all`, :ref:`map` and :ref:`reduce`. +See also :ref:`any()`, :ref:`all()`, :ref:`map()` and :ref:`reduce()`. .. rst-class:: classref-item-separator @@ -755,7 +755,7 @@ See also :ref:`any`, :ref:`all`, Returns the index of the **first** occurrence of ``what`` in this array, or ``-1`` if there are none. The search's start can be specified with ``from``, continuing to the end of the array. -\ **Note:** If you just want to know whether the array contains ``what``, use :ref:`has` (``Contains`` in C#). In GDScript, you may also use the ``in`` operator. +\ **Note:** If you just want to know whether the array contains ``what``, use :ref:`has()` (``Contains`` in C#). In GDScript, you may also use the ``in`` operator. \ **Note:** For performance reasons, the search is affected by ``what``'s :ref:`Variant.Type`. For example, ``7`` (:ref:`int`) and ``7.0`` (:ref:`float`) are not considered equal for this method. @@ -773,7 +773,7 @@ Returns the index of the **first** element in the array that causes ``method`` t \ ``method`` is a callable that takes an element of the array, and returns a :ref:`bool`. -\ **Note:** If you just want to know whether the array contains *anything* that satisfies ``method``, use :ref:`any`. +\ **Note:** If you just want to know whether the array contains *anything* that satisfies ``method``, use :ref:`any()`. .. tabs:: @@ -798,7 +798,7 @@ Returns the index of the **first** element in the array that causes ``method`` t :ref:`Variant` **front**\ (\ ) |const| :ref:`πŸ”—` -Returns the first element of the array. If the array is empty, fails and returns ``null``. See also :ref:`back`. +Returns the first element of the array. If the array is empty, fails and returns ``null``. See also :ref:`back()`. \ **Note:** Unlike with the ``[]`` operator (``array[0]``), an error is generated without stopping project execution. @@ -824,7 +824,7 @@ Returns the element at the given ``index`` in the array. This is the same as usi :ref:`int` **get_typed_builtin**\ (\ ) |const| :ref:`πŸ”—` -Returns the built-in :ref:`Variant` type of the typed array as a :ref:`Variant.Type` constant. If the array is not typed, returns :ref:`@GlobalScope.TYPE_NIL`. See also :ref:`is_typed`. +Returns the built-in :ref:`Variant` type of the typed array as a :ref:`Variant.Type` constant. If the array is not typed, returns :ref:`@GlobalScope.TYPE_NIL`. See also :ref:`is_typed()`. .. rst-class:: classref-item-separator @@ -836,7 +836,7 @@ Returns the built-in :ref:`Variant` type of the typed array as a :ref:`StringName` **get_typed_class_name**\ (\ ) |const| :ref:`πŸ”—` -Returns the **built-in** class name of the typed array, if the built-in :ref:`Variant` type :ref:`@GlobalScope.TYPE_OBJECT`. Otherwise, returns an empty :ref:`StringName`. See also :ref:`is_typed` and :ref:`Object.get_class`. +Returns the **built-in** class name of the typed array, if the built-in :ref:`Variant` type :ref:`@GlobalScope.TYPE_OBJECT`. Otherwise, returns an empty :ref:`StringName`. See also :ref:`is_typed()` and :ref:`Object.get_class()`. .. rst-class:: classref-item-separator @@ -848,7 +848,7 @@ Returns the **built-in** class name of the typed array, if the built-in :ref:`Va :ref:`Variant` **get_typed_script**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`Script` instance associated with this typed array, or ``null`` if it does not exist. See also :ref:`is_typed`. +Returns the :ref:`Script` instance associated with this typed array, or ``null`` if it does not exist. See also :ref:`is_typed()`. .. rst-class:: classref-item-separator @@ -916,7 +916,7 @@ Returns a hashed 32-bit integer value representing the array and its contents. :ref:`int` **insert**\ (\ position\: :ref:`int`, value\: :ref:`Variant`\ ) :ref:`πŸ”—` -Inserts a new element (``value``) at a given index (``position``) in the array. ``position`` should be between ``0`` and the array's :ref:`size`. +Inserts a new element (``value``) at a given index (``position``) in the array. ``position`` should be between ``0`` and the array's :ref:`size()`. Returns :ref:`@GlobalScope.OK` on success, or one of the other :ref:`Error` constants if this method fails. @@ -932,7 +932,7 @@ Returns :ref:`@GlobalScope.OK` on success, or on :ref:`bool` **is_empty**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the array is empty (``[]``). See also :ref:`size`. +Returns ``true`` if the array is empty (``[]``). See also :ref:`size()`. .. rst-class:: classref-item-separator @@ -944,7 +944,7 @@ Returns ``true`` if the array is empty (``[]``). See also :ref:`size` **is_read_only**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the array is read-only. See :ref:`make_read_only`. +Returns ``true`` if the array is read-only. See :ref:`make_read_only()`. In GDScript, arrays are automatically read-only if declared with the ``const`` keyword. @@ -958,7 +958,7 @@ In GDScript, arrays are automatically read-only if declared with the ``const`` k :ref:`bool` **is_same_typed**\ (\ array\: :ref:`Array`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this array is typed the same as the given ``array``. See also :ref:`is_typed`. +Returns ``true`` if this array is typed the same as the given ``array``. See also :ref:`is_typed()`. .. rst-class:: classref-item-separator @@ -1018,7 +1018,7 @@ The ``method`` should take one :ref:`Variant` parameter (the curr # Same as above, but using a lambda function. print([1, 2, 3].map(func(element): return element * 2)) -See also :ref:`filter`, :ref:`reduce`, :ref:`any` and :ref:`all`. +See also :ref:`filter()`, :ref:`reduce()`, :ref:`any()` and :ref:`all()`. .. rst-class:: classref-item-separator @@ -1030,9 +1030,9 @@ See also :ref:`filter`, :ref:`reduce` **max**\ (\ ) |const| :ref:`πŸ”—` -Returns the maximum value contained in the array, if all elements can be compared. Otherwise, returns ``null``. See also :ref:`min`. +Returns the maximum value contained in the array, if all elements can be compared. Otherwise, returns ``null``. See also :ref:`min()`. -To find the maximum value using a custom comparator, you can use :ref:`reduce`. +To find the maximum value using a custom comparator, you can use :ref:`reduce()`. .. rst-class:: classref-item-separator @@ -1044,7 +1044,7 @@ To find the maximum value using a custom comparator, you can use :ref:`reduce` **min**\ (\ ) |const| :ref:`πŸ”—` -Returns the minimum value contained in the array, if all elements can be compared. Otherwise, returns ``null``. See also :ref:`max`. +Returns the minimum value contained in the array, if all elements can be compared. Otherwise, returns ``null``. See also :ref:`max()`. .. rst-class:: classref-item-separator @@ -1073,7 +1073,7 @@ Returns a random element from the array. Generates an error and returns ``null`` -\ **Note:** Like many similar functions in the engine (such as :ref:`@GlobalScope.randi` or :ref:`shuffle`), this method uses a common, global random seed. To get a predictable outcome from this method, see :ref:`@GlobalScope.seed`. +\ **Note:** Like many similar functions in the engine (such as :ref:`@GlobalScope.randi()` or :ref:`shuffle()`), this method uses a common, global random seed. To get a predictable outcome from this method, see :ref:`@GlobalScope.seed()`. .. rst-class:: classref-item-separator @@ -1099,7 +1099,7 @@ Removes and returns the element of the array at index ``position``. If negative, :ref:`Variant` **pop_back**\ (\ ) :ref:`πŸ”—` -Removes and returns the last element of the array. Returns ``null`` if the array is empty, without generating an error. See also :ref:`pop_front`. +Removes and returns the last element of the array. Returns ``null`` if the array is empty, without generating an error. See also :ref:`pop_front()`. .. rst-class:: classref-item-separator @@ -1111,7 +1111,7 @@ Removes and returns the last element of the array. Returns ``null`` if the array :ref:`Variant` **pop_front**\ (\ ) :ref:`πŸ”—` -Removes and returns the first element of the array. Returns ``null`` if the array is empty, without generating an error. See also :ref:`pop_back`. +Removes and returns the first element of the array. Returns ``null`` if the array is empty, without generating an error. See also :ref:`pop_back()`. \ **Note:** This method shifts every other element's index back, which may have a noticeable performance cost, especially on larger arrays. @@ -1125,7 +1125,7 @@ Removes and returns the first element of the array. Returns ``null`` if the arra |void| **push_back**\ (\ value\: :ref:`Variant`\ ) :ref:`πŸ”—` -Appends an element at the end of the array. See also :ref:`push_front`. +Appends an element at the end of the array. See also :ref:`push_front()`. .. rst-class:: classref-item-separator @@ -1137,7 +1137,7 @@ Appends an element at the end of the array. See also :ref:`push_front`\ ) :ref:`πŸ”—` -Adds an element at the beginning of the array. See also :ref:`push_back`. +Adds an element at the beginning of the array. See also :ref:`push_back()`. \ **Note:** This method shifts every other element's index forward, which may have a noticeable performance cost, especially on larger arrays. @@ -1167,7 +1167,7 @@ The ``method`` takes two arguments: the current value of ``accum`` and the curre # Same as above, but using a lambda function. print([1, 2, 3].reduce(func(accum, number): return accum + number, 10)) -If :ref:`max` is not desirable, this method may also be used to implement a custom comparator: +If :ref:`max()` is not desirable, this method may also be used to implement a custom comparator: :: @@ -1180,7 +1180,7 @@ If :ref:`max` is not desirable, this method may also be func is_length_greater(a, b): return a.length() > b.length() -This method can also be used to count how many elements in an array satisfy a certain condition, similar to :ref:`count`: +This method can also be used to count how many elements in an array satisfy a certain condition, similar to :ref:`count()`: :: @@ -1193,7 +1193,7 @@ This method can also be used to count how many elements in an array satisfy a ce var even_count = arr.reduce(func(count, next): return count + 1 if is_even(next) else count, 0) print(even_count) # Prints 2 -See also :ref:`map`, :ref:`filter`, :ref:`any`, and :ref:`all`. +See also :ref:`map()`, :ref:`filter()`, :ref:`any()`, and :ref:`all()`. .. rst-class:: classref-item-separator @@ -1207,7 +1207,7 @@ See also :ref:`map`, :ref:`filter`. To remove an element by value, use :ref:`erase` instead. +If you need to return the removed element, use :ref:`pop_at()`. To remove an element by value, use :ref:`erase()` instead. \ **Note:** This method shifts every element's index after ``position`` back, which may have a noticeable performance cost, especially on larger arrays. @@ -1227,7 +1227,7 @@ Sets the array's number of elements to ``size``. If ``size`` is smaller than the Returns :ref:`@GlobalScope.OK` on success, or one of the other :ref:`Error` constants if this method fails. -\ **Note:** Calling this method once and assigning the new values is faster than calling :ref:`append` for every new element. +\ **Note:** Calling this method once and assigning the new values is faster than calling :ref:`append()` for every new element. .. rst-class:: classref-item-separator @@ -1251,7 +1251,7 @@ Reverses the order of all elements in the array. :ref:`int` **rfind**\ (\ what\: :ref:`Variant`, from\: :ref:`int` = -1\ ) |const| :ref:`πŸ”—` -Returns the index of the **last** occurrence of ``what`` in this array, or ``-1`` if there are none. The search's start can be specified with ``from``, continuing to the beginning of the array. This method is the reverse of :ref:`find`. +Returns the index of the **last** occurrence of ``what`` in this array, or ``-1`` if there are none. The search's start can be specified with ``from``, continuing to the beginning of the array. This method is the reverse of :ref:`find()`. .. rst-class:: classref-item-separator @@ -1263,7 +1263,7 @@ Returns the index of the **last** occurrence of ``what`` in this array, or ``-1` :ref:`int` **rfind_custom**\ (\ method\: :ref:`Callable`, from\: :ref:`int` = -1\ ) |const| :ref:`πŸ”—` -Returns the index of the **last** element of the array that causes ``method`` to return ``true``, or ``-1`` if there are none. The search's start can be specified with ``from``, continuing to the beginning of the array. This method is the reverse of :ref:`find_custom`. +Returns the index of the **last** element of the array that causes ``method`` to return ``true``, or ``-1`` if there are none. The search's start can be specified with ``from``, continuing to the beginning of the array. This method is the reverse of :ref:`find_custom()`. .. rst-class:: classref-item-separator @@ -1289,7 +1289,7 @@ Sets the value of the element at the given ``index`` to the given ``value``. Thi Shuffles all elements of the array in a random order. -\ **Note:** Like many similar functions in the engine (such as :ref:`@GlobalScope.randi` or :ref:`pick_random`), this method uses a common, global random seed. To get a predictable outcome from this method, see :ref:`@GlobalScope.seed`. +\ **Note:** Like many similar functions in the engine (such as :ref:`@GlobalScope.randi()` or :ref:`pick_random()`), this method uses a common, global random seed. To get a predictable outcome from this method, see :ref:`@GlobalScope.seed()`. .. rst-class:: classref-item-separator @@ -1301,7 +1301,7 @@ Shuffles all elements of the array in a random order. :ref:`int` **size**\ (\ ) |const| :ref:`πŸ”—` -Returns the number of elements in the array. Empty arrays (``[]``) always return ``0``. See also :ref:`is_empty`. +Returns the number of elements in the array. Empty arrays (``[]``) always return ``0``. See also :ref:`is_empty()`. .. rst-class:: classref-item-separator @@ -1319,7 +1319,7 @@ If either ``begin`` or ``end`` are negative, their value is relative to the end If ``step`` is negative, this method iterates through the array in reverse, returning a slice ordered backwards. For this to work, ``begin`` must be greater than ``end``. -If ``deep`` is ``true``, all nested **Array** and :ref:`Dictionary` elements in the slice are duplicated from the original, recursively. See also :ref:`duplicate`). +If ``deep`` is ``true``, all nested **Array** and :ref:`Dictionary` elements in the slice are duplicated from the original, recursively. See also :ref:`duplicate()`). :: @@ -1361,7 +1361,7 @@ Sorts the array in ascending order. The final order is dependent on the "less th -\ **Note:** The sorting algorithm used is not `stable `__. This means that equivalent elements (such as ``2`` and ``2.0``) may have their order changed when calling :ref:`sort`. +\ **Note:** The sorting algorithm used is not `stable `__. This means that equivalent elements (such as ``2`` and ``2.0``) may have their order changed when calling :ref:`sort()`. .. rst-class:: classref-item-separator @@ -1393,7 +1393,7 @@ Sorts the array using a custom :ref:`Callable`. my_items.sort_custom(func(a, b): return a[1] > b[1]) print(my_items) # Prints [["Apple", 9], ["Tomato", 5], ["Rice", 4]] -It may also be necessary to use this method to sort strings by natural order, with :ref:`String.naturalnocasecmp_to`, as in the following example: +It may also be necessary to use this method to sort strings by natural order, with :ref:`String.naturalnocasecmp_to()`, as in the following example: :: @@ -1454,7 +1454,7 @@ Appends the ``right`` array to the left operand, creating a new **Array**. This -\ **Note:** For existing arrays, :ref:`append_array` is much more efficient than concatenation and assignment with the ``+=`` operator. +\ **Note:** For existing arrays, :ref:`append_array()` is much more efficient than concatenation and assignment with the ``+=`` operator. .. rst-class:: classref-item-separator diff --git a/classes/class_arraymesh.rst b/classes/class_arraymesh.rst index 5c662eafa..933c78db6 100644 --- a/classes/class_arraymesh.rst +++ b/classes/class_arraymesh.rst @@ -218,7 +218,7 @@ Method Descriptions |void| **add_blend_shape**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Adds name for a blend shape that will be added with :ref:`add_surface_from_arrays`. Must be called before surface is added. +Adds name for a blend shape that will be added with :ref:`add_surface_from_arrays()`. Must be called before surface is added. .. rst-class:: classref-item-separator @@ -230,7 +230,7 @@ Adds name for a blend shape that will be added with :ref:`add_surface_from_array |void| **add_surface_from_arrays**\ (\ primitive\: :ref:`PrimitiveType`, arrays\: :ref:`Array`, blend_shapes\: :ref:`Array`\[:ref:`Array`\] = [], lods\: :ref:`Dictionary` = {}, flags\: |bitfield|\[:ref:`ArrayFormat`\] = 0\ ) :ref:`πŸ”—` -Creates a new surface. :ref:`Mesh.get_surface_count` will become the ``surf_idx`` for this new surface. +Creates a new surface. :ref:`Mesh.get_surface_count()` will become the ``surf_idx`` for this new surface. Surfaces are created to be rendered using a ``primitive``, which may be any of the values defined in :ref:`PrimitiveType`. @@ -350,7 +350,7 @@ Returns the index of the first surface with this name held within this **ArrayMe :ref:`int` **surface_get_array_index_len**\ (\ surf_idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the length in indices of the index array in the requested surface (see :ref:`add_surface_from_arrays`). +Returns the length in indices of the index array in the requested surface (see :ref:`add_surface_from_arrays()`). .. rst-class:: classref-item-separator @@ -362,7 +362,7 @@ Returns the length in indices of the index array in the requested surface (see : :ref:`int` **surface_get_array_len**\ (\ surf_idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the length in vertices of the vertex array in the requested surface (see :ref:`add_surface_from_arrays`). +Returns the length in vertices of the vertex array in the requested surface (see :ref:`add_surface_from_arrays()`). .. rst-class:: classref-item-separator @@ -374,7 +374,7 @@ Returns the length in vertices of the vertex array in the requested surface (see |bitfield|\[:ref:`ArrayFormat`\] **surface_get_format**\ (\ surf_idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the format mask of the requested surface (see :ref:`add_surface_from_arrays`). +Returns the format mask of the requested surface (see :ref:`add_surface_from_arrays()`). .. rst-class:: classref-item-separator @@ -398,7 +398,7 @@ Gets the name assigned to this surface. :ref:`PrimitiveType` **surface_get_primitive_type**\ (\ surf_idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the primitive type of the requested surface (see :ref:`add_surface_from_arrays`). +Returns the primitive type of the requested surface (see :ref:`add_surface_from_arrays()`). .. rst-class:: classref-item-separator diff --git a/classes/class_arrayoccluder3d.rst b/classes/class_arrayoccluder3d.rst index 5bdd43482..dc12f90d6 100644 --- a/classes/class_arrayoccluder3d.rst +++ b/classes/class_arrayoccluder3d.rst @@ -78,7 +78,7 @@ Property Descriptions The occluder's index position. Indices determine which points from the :ref:`vertices` array should be drawn, and in which order. -\ **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 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. @@ -99,7 +99,7 @@ The occluder's index position. Indices determine which points from the :ref:`ver 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 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. diff --git a/classes/class_astar2d.rst b/classes/class_astar2d.rst index 0d09e9b47..0163a1909 100644 --- a/classes/class_astar2d.rst +++ b/classes/class_astar2d.rst @@ -128,7 +128,7 @@ Note that this function is hidden in the default **AStar2D** class. Adds a new point at the given position with the given identifier. The ``id`` must be 0 or larger, and the ``weight_scale`` must be 0.0 or greater. -The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower ``weight_scale``\ s to form a path. +The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost()` when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower ``weight_scale``\ s to form a path. .. tabs:: @@ -337,7 +337,7 @@ If you change the 2nd point's weight to 3, then the result will be ``[1, 4, 3]`` :ref:`int` **get_point_capacity**\ (\ ) |const| :ref:`πŸ”—` -Returns the capacity of the structure backing the points, useful in conjunction with :ref:`reserve_space`. +Returns the capacity of the structure backing the points, useful in conjunction with :ref:`reserve_space()`. .. rst-class:: classref-item-separator @@ -530,7 +530,7 @@ Sets the ``position`` for the point with the given ``id``. |void| **set_point_weight_scale**\ (\ id\: :ref:`int`, weight_scale\: :ref:`float`\ ) :ref:`πŸ”—` -Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. +Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost()` when determining the overall cost of traveling across a segment from a neighboring point to this point. .. |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_astar3d.rst b/classes/class_astar3d.rst index c3f899995..27cc83369 100644 --- a/classes/class_astar3d.rst +++ b/classes/class_astar3d.rst @@ -21,9 +21,9 @@ Description A\* (A star) is a computer algorithm used in pathfinding and graph traversal, the process of plotting short paths among vertices (points), passing through a given set of edges (segments). It enjoys widespread use due to its performance and accuracy. Godot's A\* implementation uses points in 3D space and Euclidean distances by default. -You must add points manually with :ref:`add_point` and create segments manually with :ref:`connect_points`. Once done, you can test if there is a path between two points with the :ref:`are_points_connected` function, get a path containing indices by :ref:`get_id_path`, or one containing actual coordinates with :ref:`get_point_path`. +You must add points manually with :ref:`add_point()` and create segments manually with :ref:`connect_points()`. Once done, you can test if there is a path between two points with the :ref:`are_points_connected()` function, get a path containing indices by :ref:`get_id_path()`, or one containing actual coordinates with :ref:`get_point_path()`. -It is also possible to use non-Euclidean distances. To do so, create a script that extends **AStar3D** and override the methods :ref:`_compute_cost` and :ref:`_estimate_cost`. Both should take two point IDs and return the distance between the corresponding points. +It is also possible to use non-Euclidean distances. To do so, create a script that extends **AStar3D** and override the methods :ref:`_compute_cost()` and :ref:`_estimate_cost()`. Both should take two point IDs and return the distance between the corresponding points. \ **Example:** Use Manhattan distance instead of Euclidean distance: @@ -70,9 +70,9 @@ It is also possible to use non-Euclidean distances. To do so, create a script th -\ :ref:`_estimate_cost` should return a lower bound of the distance, i.e. ``_estimate_cost(u, v) <= _compute_cost(u, v)``. This serves as a hint to the algorithm because the custom :ref:`_compute_cost` might be computation-heavy. If this is not the case, make :ref:`_estimate_cost` return the same value as :ref:`_compute_cost` to provide the algorithm with the most accurate information. +\ :ref:`_estimate_cost()` should return a lower bound of the distance, i.e. ``_estimate_cost(u, v) <= _compute_cost(u, v)``. This serves as a hint to the algorithm because the custom :ref:`_compute_cost()` might be computation-heavy. If this is not the case, make :ref:`_estimate_cost()` return the same value as :ref:`_compute_cost()` to provide the algorithm with the most accurate information. -If the default :ref:`_estimate_cost` and :ref:`_compute_cost` methods are used, or if the supplied :ref:`_estimate_cost` method returns a lower bound of the cost, then the paths returned by A\* will be the lowest-cost paths. Here, the cost of a path equals the sum of the :ref:`_compute_cost` results of all segments in the path multiplied by the ``weight_scale``\ s of the endpoints of the respective segments. If the default methods are used and the ``weight_scale``\ s of all points are set to ``1.0``, then this equals the sum of Euclidean distances of all segments in the path. +If the default :ref:`_estimate_cost()` and :ref:`_compute_cost()` methods are used, or if the supplied :ref:`_estimate_cost()` method returns a lower bound of the cost, then the paths returned by A\* will be the lowest-cost paths. Here, the cost of a path equals the sum of the :ref:`_compute_cost()` results of all segments in the path multiplied by the ``weight_scale``\ s of the endpoints of the respective segments. If the default methods are used and the ``weight_scale``\ s of all points are set to ``1.0``, then this equals the sum of Euclidean distances of all segments in the path. .. rst-class:: classref-reftable-group @@ -179,7 +179,7 @@ Note that this function is hidden in the default **AStar3D** class. Adds a new point at the given position with the given identifier. The ``id`` must be 0 or larger, and the ``weight_scale`` must be 0.0 or greater. -The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower ``weight_scale``\ s to form a path. +The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost()` when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower ``weight_scale``\ s to form a path. .. tabs:: @@ -387,7 +387,7 @@ If you change the 2nd point's weight to 3, then the result will be ``[1, 4, 3]`` :ref:`int` **get_point_capacity**\ (\ ) |const| :ref:`πŸ”—` -Returns the capacity of the structure backing the points, useful in conjunction with :ref:`reserve_space`. +Returns the capacity of the structure backing the points, useful in conjunction with :ref:`reserve_space()`. .. rst-class:: classref-item-separator @@ -579,7 +579,7 @@ Sets the ``position`` for the point with the given ``id``. |void| **set_point_weight_scale**\ (\ id\: :ref:`int`, weight_scale\: :ref:`float`\ ) :ref:`πŸ”—` -Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. +Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost()` when determining the overall cost of traveling across a segment from a neighboring point to this point. .. |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_astargrid2d.rst b/classes/class_astargrid2d.rst index 6f7aef781..1f39894da 100644 --- a/classes/class_astargrid2d.rst +++ b/classes/class_astargrid2d.rst @@ -21,7 +21,7 @@ Description **AStarGrid2D** is a variant of :ref:`AStar2D` that is specialized for partial 2D grids. It is simpler to use because it doesn't require you to manually create points and connect them together. This class also supports multiple types of heuristics, modes for diagonal movement, and a jumping mode to speed up calculations. -To use **AStarGrid2D**, you only need to set the :ref:`region` of the grid, optionally set the :ref:`cell_size`, and then call the :ref:`update` method: +To use **AStarGrid2D**, you only need to set the :ref:`region` of the grid, optionally set the :ref:`cell_size`, and then call the :ref:`update()` method: .. tabs:: @@ -46,7 +46,7 @@ To use **AStarGrid2D**, you only need to set the :ref:`region`. +To remove a point from the pathfinding grid, it must be set as "solid" with :ref:`set_point_solid()`. .. rst-class:: classref-reftable-group @@ -316,7 +316,7 @@ Property Descriptions - |void| **set_cell_shape**\ (\ value\: :ref:`CellShape`\ ) - :ref:`CellShape` **get_cell_shape**\ (\ ) -The cell shape. Affects how the positions are placed in the grid. If changed, :ref:`update` needs to be called before finding the next path. +The cell shape. Affects how the positions are placed in the grid. If changed, :ref:`update()` needs to be called before finding the next path. .. rst-class:: classref-item-separator @@ -333,7 +333,7 @@ The cell shape. Affects how the positions are placed in the grid. If changed, :r - |void| **set_cell_size**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_cell_size**\ (\ ) -The size of the point cell which will be applied to calculate the resulting point position returned by :ref:`get_point_path`. If changed, :ref:`update` needs to be called before finding the next path. +The size of the point cell which will be applied to calculate the resulting point position returned by :ref:`get_point_path()`. If changed, :ref:`update()` needs to be called before finding the next path. .. rst-class:: classref-item-separator @@ -350,7 +350,7 @@ The size of the point cell which will be applied to calculate the resulting poin - |void| **set_default_compute_heuristic**\ (\ value\: :ref:`Heuristic`\ ) - :ref:`Heuristic` **get_default_compute_heuristic**\ (\ ) -The default :ref:`Heuristic` which will be used to calculate the cost between two points if :ref:`_compute_cost` was not overridden. +The default :ref:`Heuristic` which will be used to calculate the cost between two points if :ref:`_compute_cost()` was not overridden. .. rst-class:: classref-item-separator @@ -367,7 +367,7 @@ The default :ref:`Heuristic` which will be used to c - |void| **set_default_estimate_heuristic**\ (\ value\: :ref:`Heuristic`\ ) - :ref:`Heuristic` **get_default_estimate_heuristic**\ (\ ) -The default :ref:`Heuristic` which will be used to calculate the cost between the point and the end point if :ref:`_estimate_cost` was not overridden. +The default :ref:`Heuristic` which will be used to calculate the cost between the point and the end point if :ref:`_estimate_cost()` was not overridden. .. rst-class:: classref-item-separator @@ -420,7 +420,7 @@ Enables or disables jumping to skip up the intermediate points and speeds up the - |void| **set_offset**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_offset**\ (\ ) -The offset of the grid which will be applied to calculate the resulting point position returned by :ref:`get_point_path`. If changed, :ref:`update` needs to be called before finding the next path. +The offset of the grid which will be applied to calculate the resulting point position returned by :ref:`get_point_path()`. If changed, :ref:`update()` needs to be called before finding the next path. .. rst-class:: classref-item-separator @@ -437,7 +437,7 @@ The offset of the grid which will be applied to calculate the resulting point po - |void| **set_region**\ (\ value\: :ref:`Rect2i`\ ) - :ref:`Rect2i` **get_region**\ (\ ) -The region of grid cells available for pathfinding. If changed, :ref:`update` needs to be called before finding the next path. +The region of grid cells available for pathfinding. If changed, :ref:`update()` needs to be called before finding the next path. .. rst-class:: classref-item-separator @@ -456,7 +456,7 @@ The region of grid cells available for pathfinding. If changed, :ref:`update` instead. -The size of the grid (number of cells of size :ref:`cell_size` on each axis). If changed, :ref:`update` needs to be called before finding the next path. +The size of the grid (number of cells of size :ref:`cell_size` on each axis). If changed, :ref:`update()` needs to be called before finding the next path. .. rst-class:: classref-section-separator @@ -515,7 +515,7 @@ Clears the grid and sets the :ref:`region` to Fills the given ``region`` on the grid with the specified value for the solid flag. -\ **Note:** Calling :ref:`update` is not needed after the call of this function. +\ **Note:** Calling :ref:`update()` is not needed after the call of this function. .. rst-class:: classref-item-separator @@ -529,7 +529,7 @@ Fills the given ``region`` on the grid with the specified value for the solid fl Fills the given ``region`` on the grid with the specified value for the weight scale. -\ **Note:** Calling :ref:`update` is not needed after the call of this function. +\ **Note:** Calling :ref:`update()` is not needed after the call of this function. .. rst-class:: classref-item-separator @@ -611,7 +611,7 @@ Returns the weight scale of the point associated with the given ``id``. :ref:`bool` **is_dirty**\ (\ ) |const| :ref:`πŸ”—` -Indicates that the grid parameters were changed and :ref:`update` needs to be called. +Indicates that the grid parameters were changed and :ref:`update()` needs to be called. .. rst-class:: classref-item-separator @@ -661,7 +661,7 @@ Returns ``true`` if a point is disabled for pathfinding. By default, all points Disables or enables the specified point for pathfinding. Useful for making an obstacle. By default, all points are enabled. -\ **Note:** Calling :ref:`update` is not needed after the call of this function. +\ **Note:** Calling :ref:`update()` is not needed after the call of this function. .. rst-class:: classref-item-separator @@ -673,9 +673,9 @@ Disables or enables the specified point for pathfinding. Useful for making an ob |void| **set_point_weight_scale**\ (\ id\: :ref:`Vector2i`, weight_scale\: :ref:`float`\ ) :ref:`πŸ”—` -Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. +Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost()` when determining the overall cost of traveling across a segment from a neighboring point to this point. -\ **Note:** Calling :ref:`update` is not needed after the call of this function. +\ **Note:** Calling :ref:`update()` is not needed after the call of this function. .. rst-class:: classref-item-separator @@ -687,7 +687,7 @@ Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scal |void| **update**\ (\ ) :ref:`πŸ”—` -Updates the internal state of the grid according to the parameters to prepare it to search the path. Needs to be called if parameters like :ref:`region`, :ref:`cell_size` or :ref:`offset` are changed. :ref:`is_dirty` will return ``true`` if this is the case and this needs to be called. +Updates the internal state of the grid according to the parameters to prepare it to search the path. Needs to be called if parameters like :ref:`region`, :ref:`cell_size` or :ref:`offset` are changed. :ref:`is_dirty()` will return ``true`` if this is the case and this needs to be called. \ **Note:** All point data (solidity and weight scale) will be cleared. diff --git a/classes/class_audioeffect.rst b/classes/class_audioeffect.rst index 21fc6d268..37e650c80 100644 --- a/classes/class_audioeffect.rst +++ b/classes/class_audioeffect.rst @@ -21,7 +21,7 @@ Base class for audio effect resources. Description ----------- -The base :ref:`Resource` for every audio effect. In the editor, an audio effect can be added to the current bus layout through the Audio panel. At run-time, it is also possible to manipulate audio effects through :ref:`AudioServer.add_bus_effect`, :ref:`AudioServer.remove_bus_effect`, and :ref:`AudioServer.get_bus_effect`. +The base :ref:`Resource` for every audio effect. In the editor, an audio effect can be added to the current bus layout through the Audio panel. At run-time, it is also possible to manipulate audio effects through :ref:`AudioServer.add_bus_effect()`, :ref:`AudioServer.remove_bus_effect()`, and :ref:`AudioServer.get_bus_effect()`. When applied on a bus, an audio effect creates a corresponding :ref:`AudioEffectInstance`. The instance is directly responsible for manipulating the sound, based on the original audio effect's properties. @@ -61,7 +61,7 @@ Method Descriptions :ref:`AudioEffectInstance` **_instantiate**\ (\ ) |virtual| :ref:`πŸ”—` -Override this method to customize the :ref:`AudioEffectInstance` created when this effect is applied on a bus in the editor's Audio panel, or through :ref:`AudioServer.add_bus_effect`. +Override this method to customize the :ref:`AudioEffectInstance` created when this effect is applied on a bus in the editor's Audio panel, or through :ref:`AudioServer.add_bus_effect()`. :: diff --git a/classes/class_audioeffectamplify.rst b/classes/class_audioeffectamplify.rst index 9f79168ab..d34dc304d 100644 --- a/classes/class_audioeffectamplify.rst +++ b/classes/class_audioeffectamplify.rst @@ -81,7 +81,7 @@ Amount of amplification in decibels. Positive values make the sound louder, nega Amount of amplification as a linear value. -\ **Note:** This member modifies :ref:`volume_db` for convenience. The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear` on :ref:`volume_db`. Setting this member is equivalent to setting :ref:`volume_db` to the result of :ref:`@GlobalScope.linear_to_db` on a value. +\ **Note:** This member modifies :ref:`volume_db` for convenience. The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear()` on :ref:`volume_db`. Setting this member is equivalent to setting :ref:`volume_db` to the result of :ref:`@GlobalScope.linear_to_db()` on a 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.)` diff --git a/classes/class_audioeffectcapture.rst b/classes/class_audioeffectcapture.rst index 46470fef1..0bf82ded8 100644 --- a/classes/class_audioeffectcapture.rst +++ b/classes/class_audioeffectcapture.rst @@ -21,7 +21,7 @@ Description AudioEffectCapture is an AudioEffect which copies all audio frames from the attached audio effect bus into its internal ring buffer. -Application code should consume these audio frames from this ring buffer using :ref:`get_buffer` and process it as needed, for example to capture data from an :ref:`AudioStreamMicrophone`, implement application-defined effects, or to transmit audio over the network. When capturing audio data from a microphone, the format of the samples will be stereo 32-bit floating-point PCM. +Application code should consume these audio frames from this ring buffer using :ref:`get_buffer()` and process it as needed, for example to capture data from an :ref:`AudioStreamMicrophone`, implement application-defined effects, or to transmit audio over the network. When capturing audio data from a microphone, the format of the samples will be stereo 32-bit floating-point PCM. Unlike :ref:`AudioEffectRecord`, this effect only returns the raw audio samples instead of encoding them into an :ref:`AudioStream`. @@ -171,7 +171,7 @@ Returns the number of audio frames discarded from the audio bus due to full buff :ref:`int` **get_frames_available**\ (\ ) |const| :ref:`πŸ”—` -Returns the number of frames available to read using :ref:`get_buffer`. +Returns the number of frames available to read using :ref:`get_buffer()`. .. rst-class:: classref-item-separator diff --git a/classes/class_audioeffectinstance.rst b/classes/class_audioeffectinstance.rst index 64b4ca1de..663b8cfdf 100644 --- a/classes/class_audioeffectinstance.rst +++ b/classes/class_audioeffectinstance.rst @@ -21,7 +21,7 @@ Manipulates the audio it receives for a given effect. Description ----------- -An audio effect instance manipulates the audio it receives for a given effect. This instance is automatically created by an :ref:`AudioEffect` when it is added to a bus, and should usually not be created directly. If necessary, it can be fetched at run-time with :ref:`AudioServer.get_bus_effect_instance`. +An audio effect instance manipulates the audio it receives for a given effect. This instance is automatically created by an :ref:`AudioEffect` when it is added to a bus, and should usually not be created directly. If necessary, it can be fetched at run-time with :ref:`AudioServer.get_bus_effect_instance()`. .. rst-class:: classref-introduction-group @@ -59,7 +59,7 @@ Method Descriptions |void| **_process**\ (\ src_buffer\: ``const void*``, dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -Called by the :ref:`AudioServer` to process this effect. When :ref:`_process_silence` is not overridden or it returns ``false``, this method is called only when the bus is active. +Called by the :ref:`AudioServer` to process this effect. When :ref:`_process_silence()` is not overridden or it returns ``false``, this method is called only when the bus is active. \ **Note:** It is not useful to override this method in GDScript or C#. Only GDExtension can take advantage of it. @@ -75,7 +75,7 @@ Called by the :ref:`AudioServer` to process this effect. When Override this method to customize the processing behavior of this effect instance. -Should return ``true`` to force the :ref:`AudioServer` to always call :ref:`_process`, even if the bus has been muted or cannot otherwise be heard. +Should return ``true`` to force the :ref:`AudioServer` to always call :ref:`_process()`, even if the bus has been muted or cannot otherwise be heard. .. |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_audioeffectspectrumanalyzer.rst b/classes/class_audioeffectspectrumanalyzer.rst index 4e01dc5d2..c2a69ce0e 100644 --- a/classes/class_audioeffectspectrumanalyzer.rst +++ b/classes/class_audioeffectspectrumanalyzer.rst @@ -21,7 +21,7 @@ Description This audio effect does not affect sound output, but can be used for real-time audio visualizations. -This resource configures an :ref:`AudioEffectSpectrumAnalyzerInstance`, which performs the actual analysis at runtime. An instance can be obtained with :ref:`AudioServer.get_bus_effect_instance`. +This resource configures an :ref:`AudioEffectSpectrumAnalyzerInstance`, which performs the actual analysis at runtime. An instance can be obtained with :ref:`AudioServer.get_bus_effect_instance()`. See also :ref:`AudioStreamGenerator` for procedurally generating sounds. diff --git a/classes/class_audioeffectspectrumanalyzerinstance.rst b/classes/class_audioeffectspectrumanalyzerinstance.rst index 00f953b39..2fd45adc7 100644 --- a/classes/class_audioeffectspectrumanalyzerinstance.rst +++ b/classes/class_audioeffectspectrumanalyzerinstance.rst @@ -21,7 +21,7 @@ Description The runtime part of an :ref:`AudioEffectSpectrumAnalyzer`, which can be used to query the magnitude of a frequency range on its host bus. -An instance of this class can be obtained with :ref:`AudioServer.get_bus_effect_instance`. +An instance of this class can be obtained with :ref:`AudioServer.get_bus_effect_instance()`. .. rst-class:: classref-introduction-group diff --git a/classes/class_audiolistener2d.rst b/classes/class_audiolistener2d.rst index 7fed4577a..4f058e447 100644 --- a/classes/class_audiolistener2d.rst +++ b/classes/class_audiolistener2d.rst @@ -22,7 +22,7 @@ Overrides the location sounds are heard from. Description ----------- -Once added to the scene tree and enabled using :ref:`make_current`, this node will override the location sounds are heard from. Only one **AudioListener2D** can be current. Using :ref:`make_current` will disable the previous **AudioListener2D**. +Once added to the scene tree and enabled using :ref:`make_current()`, this node will override the location sounds are heard from. Only one **AudioListener2D** can be current. Using :ref:`make_current()` will disable the previous **AudioListener2D**. If there is no active **AudioListener2D** in the current :ref:`Viewport`, center of the screen will be used as a hearing point for the audio. **AudioListener2D** needs to be inside :ref:`SceneTree` to function. diff --git a/classes/class_audiolistener3d.rst b/classes/class_audiolistener3d.rst index d90896c68..c38a44640 100644 --- a/classes/class_audiolistener3d.rst +++ b/classes/class_audiolistener3d.rst @@ -22,7 +22,7 @@ Overrides the location sounds are heard from. Description ----------- -Once added to the scene tree and enabled using :ref:`make_current`, this node will override the location sounds are heard from. This can be used to listen from a location different from the :ref:`Camera3D`. +Once added to the scene tree and enabled using :ref:`make_current()`, this node will override the location sounds are heard from. This can be used to listen from a location different from the :ref:`Camera3D`. .. rst-class:: classref-reftable-group @@ -81,7 +81,7 @@ Returns the listener's global orthonormalized :ref:`Transform3D` **is_current**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the listener was made current using :ref:`make_current`, ``false`` otherwise. +Returns ``true`` if the listener was made current using :ref:`make_current()`, ``false`` otherwise. \ **Note:** There may be more than one AudioListener3D marked as "current" in the scene tree, but only the one that was made current last will be used. diff --git a/classes/class_audioserver.rst b/classes/class_audioserver.rst index 24d740017..68f979002 100644 --- a/classes/class_audioserver.rst +++ b/classes/class_audioserver.rst @@ -319,7 +319,7 @@ Number of available audio buses. - |void| **set_input_device**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_input_device**\ (\ ) -Name of the current device for audio input (see :ref:`get_input_device_list`). On systems with multiple audio inputs (such as analog, USB and HDMI audio), this can be used to select the audio input device. The value ``"Default"`` will record audio on the system-wide default audio input. If an invalid device name is set, the value will be reverted back to ``"Default"``. +Name of the current device for audio input (see :ref:`get_input_device_list()`). On systems with multiple audio inputs (such as analog, USB and HDMI audio), this can be used to select the audio input device. The value ``"Default"`` will record audio on the system-wide default audio input. If an invalid device name is set, the value will be reverted back to ``"Default"``. \ **Note:** :ref:`ProjectSettings.audio/driver/enable_input` must be ``true`` for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings. @@ -338,7 +338,7 @@ Name of the current device for audio input (see :ref:`get_input_device_list`\ ) - :ref:`String` **get_output_device**\ (\ ) -Name of the current device for audio output (see :ref:`get_output_device_list`). On systems with multiple audio outputs (such as analog, USB and HDMI audio), this can be used to select the audio output device. The value ``"Default"`` will play audio on the system-wide default audio output. If an invalid device name is set, the value will be reverted back to ``"Default"``. +Name of the current device for audio output (see :ref:`get_output_device_list()`). On systems with multiple audio outputs (such as analog, USB and HDMI audio), this can be used to select the audio output device. The value ``"Default"`` will play audio on the system-wide default audio output. If an invalid device name is set, the value will be reverted back to ``"Default"``. .. rst-class:: classref-item-separator @@ -530,7 +530,7 @@ Returns the volume of the bus at index ``bus_idx`` in dB. Returns the volume of the bus at index ``bus_idx`` as a linear value. -\ **Note:** The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear` on the result of :ref:`get_bus_volume_db`. +\ **Note:** The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear()` on the result of :ref:`get_bus_volume_db()`. .. rst-class:: classref-item-separator @@ -606,7 +606,7 @@ Returns the names of all audio output devices detected on the system. Returns the audio driver's effective output latency. This is based on :ref:`ProjectSettings.audio/driver/output_latency`, but the exact returned value will differ depending on the operating system and audio driver. -\ **Note:** This can be expensive; it is not recommended to call :ref:`get_output_latency` every frame. +\ **Note:** This can be expensive; it is not recommended to call :ref:`get_output_latency()` every frame. .. rst-class:: classref-item-separator @@ -706,7 +706,7 @@ If ``true``, the bus at index ``bus_idx`` is in solo mode. If ``true``, the stream is registered as a sample. The engine will not have to register it before playing the sample. -If ``false``, the stream will have to be registered before playing it. To prevent lag spikes, register the stream as sample with :ref:`register_stream_as_sample`. +If ``false``, the stream will have to be registered before playing it. To prevent lag spikes, register the stream as sample with :ref:`register_stream_as_sample()`. .. rst-class:: classref-item-separator @@ -882,7 +882,7 @@ Sets the volume in decibels of the bus at index ``bus_idx`` to ``volume_db``. Sets the volume as a linear value of the bus at index ``bus_idx`` to ``volume_linear``. -\ **Note:** Using this method is equivalent to calling :ref:`set_bus_volume_db` with the result of :ref:`@GlobalScope.linear_to_db` on a value. +\ **Note:** Using this method is equivalent to calling :ref:`set_bus_volume_db()` with the result of :ref:`@GlobalScope.linear_to_db()` on a value. .. rst-class:: classref-item-separator @@ -894,7 +894,7 @@ Sets the volume as a linear value of the bus at index ``bus_idx`` to ``volume_li |void| **set_enable_tagging_used_audio_streams**\ (\ enable\: :ref:`bool`\ ) :ref:`πŸ”—` -If set to ``true``, all instances of :ref:`AudioStreamPlayback` will call :ref:`AudioStreamPlayback._tag_used_streams` every mix step. +If set to ``true``, all instances of :ref:`AudioStreamPlayback` will call :ref:`AudioStreamPlayback._tag_used_streams()` every mix step. \ **Note:** This is enabled by default in the editor, as it is used by editor plugins for the audio stream previews. diff --git a/classes/class_audiostream.rst b/classes/class_audiostream.rst index d380b39e1..58df2edb1 100644 --- a/classes/class_audiostream.rst +++ b/classes/class_audiostream.rst @@ -148,7 +148,7 @@ Ideally, the returned value should be based off the stream's sample rate (:ref:` :ref:`float` **_get_length**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to customize the returned value of :ref:`get_length`. Should return the length of this audio stream, in seconds. +Override this method to customize the returned value of :ref:`get_length()`. Should return the length of this audio stream, in seconds. .. rst-class:: classref-item-separator @@ -160,7 +160,7 @@ Override this method to customize the returned value of :ref:`get_length`\[:ref:`Dictionary`\] **_get_parameter_list**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Return the controllable parameters of this stream. This array contains dictionaries with a property info description format (see :ref:`Object.get_property_list`). Additionally, the default value for this parameter must be added tho each dictionary in "default_value" field. +Return the controllable parameters of this stream. This array contains dictionaries with a property info description format (see :ref:`Object.get_property_list()`). Additionally, the default value for this parameter must be added tho each dictionary in "default_value" field. .. rst-class:: classref-item-separator @@ -196,7 +196,7 @@ Override this method to return ``true`` if this stream has a loop. :ref:`AudioStreamPlayback` **_instantiate_playback**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to customize the returned value of :ref:`instantiate_playback`. Should return a new :ref:`AudioStreamPlayback` created when the stream is played (such as by an :ref:`AudioStreamPlayer`). +Override this method to customize the returned value of :ref:`instantiate_playback()`. Should return a new :ref:`AudioStreamPlayback` created when the stream is played (such as by an :ref:`AudioStreamPlayer`). .. rst-class:: classref-item-separator @@ -208,7 +208,7 @@ Override this method to customize the returned value of :ref:`instantiate_playba :ref:`bool` **_is_monophonic**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to customize the returned value of :ref:`is_monophonic`. Should return ``true`` if this audio stream only supports one channel. +Override this method to customize the returned value of :ref:`is_monophonic()`. Should return ``true`` if this audio stream only supports one channel. .. rst-class:: classref-item-separator @@ -260,7 +260,7 @@ Returns the length of the audio stream in seconds. :ref:`AudioStreamPlayback` **instantiate_playback**\ (\ ) :ref:`πŸ”—` -Returns a newly created :ref:`AudioStreamPlayback` intended to play this audio stream. Useful for when you want to extend :ref:`_instantiate_playback` but call :ref:`instantiate_playback` from an internally held AudioStream subresource. An example of this can be found in the source code for ``AudioStreamRandomPitch::instantiate_playback``. +Returns a newly created :ref:`AudioStreamPlayback` intended to play this audio stream. Useful for when you want to extend :ref:`_instantiate_playback()` but call :ref:`instantiate_playback()` from an internally held AudioStream subresource. An example of this can be found in the source code for ``AudioStreamRandomPitch::instantiate_playback``. .. rst-class:: classref-item-separator diff --git a/classes/class_audiostreamgenerator.rst b/classes/class_audiostreamgenerator.rst index 7dd0128d2..06fb9b4f3 100644 --- a/classes/class_audiostreamgenerator.rst +++ b/classes/class_audiostreamgenerator.rst @@ -101,11 +101,60 @@ Properties .. table:: :widths: auto - +---------------------------+-------------------------------------------------------------------------+-------------+ - | :ref:`float` | :ref:`buffer_length` | ``0.5`` | - +---------------------------+-------------------------------------------------------------------------+-------------+ - | :ref:`float` | :ref:`mix_rate` | ``44100.0`` | - +---------------------------+-------------------------------------------------------------------------+-------------+ + +-------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`buffer_length` | ``0.5`` | + +-------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`mix_rate` | ``44100.0`` | + +-------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+-------------+ + | :ref:`AudioStreamGeneratorMixRate` | :ref:`mix_rate_mode` | ``2`` | + +-------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+-------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_AudioStreamGenerator_AudioStreamGeneratorMixRate: + +.. rst-class:: classref-enumeration + +enum **AudioStreamGeneratorMixRate**: :ref:`πŸ”—` + +.. _class_AudioStreamGenerator_constant_MIX_RATE_OUTPUT: + +.. rst-class:: classref-enumeration-constant + +:ref:`AudioStreamGeneratorMixRate` **MIX_RATE_OUTPUT** = ``0`` + +Current :ref:`AudioServer` output mixing rate. + +.. _class_AudioStreamGenerator_constant_MIX_RATE_INPUT: + +.. rst-class:: classref-enumeration-constant + +:ref:`AudioStreamGeneratorMixRate` **MIX_RATE_INPUT** = ``1`` + +Current :ref:`AudioServer` input mixing rate. + +.. _class_AudioStreamGenerator_constant_MIX_RATE_CUSTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`AudioStreamGeneratorMixRate` **MIX_RATE_CUSTOM** = ``2`` + +Custom mixing rate, specified by :ref:`mix_rate`. + +.. _class_AudioStreamGenerator_constant_MIX_RATE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`AudioStreamGeneratorMixRate` **MIX_RATE_MAX** = ``3`` + +Maximum value for the mixing rate mode enum. .. rst-class:: classref-section-separator @@ -150,6 +199,27 @@ In games, common sample rates in use are ``11025``, ``16000``, ``22050``, ``3200 According to the `Nyquist-Shannon sampling theorem `__, there is no quality difference to human hearing when going past 40,000 Hz (since most humans can only hear up to ~20,000 Hz, often less). If you are generating lower-pitched sounds such as voices, lower sample rates such as ``32000`` or ``22050`` may be usable with no loss in quality. +\ **Note:** **AudioStreamGenerator** is not automatically resampling input data, to produce expected result :ref:`mix_rate_mode` should match the sampling rate of input data. + +\ **Note:** If you are using :ref:`AudioEffectCapture` as the source of your data, set :ref:`mix_rate_mode` to :ref:`MIX_RATE_INPUT` or :ref:`MIX_RATE_OUTPUT` to automatically match current :ref:`AudioServer` mixing rate. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamGenerator_property_mix_rate_mode: + +.. rst-class:: classref-property + +:ref:`AudioStreamGeneratorMixRate` **mix_rate_mode** = ``2`` :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_mix_rate_mode**\ (\ value\: :ref:`AudioStreamGeneratorMixRate`\ ) +- :ref:`AudioStreamGeneratorMixRate` **get_mix_rate_mode**\ (\ ) + +Mixing rate mode. If set to :ref:`MIX_RATE_CUSTOM`, :ref:`mix_rate` is used, otherwise current :ref:`AudioServer` mixing rate is used. + .. |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_audiostreamgeneratorplayback.rst b/classes/class_audiostreamgeneratorplayback.rst index dcbd2c577..872605bb1 100644 --- a/classes/class_audiostreamgeneratorplayback.rst +++ b/classes/class_audiostreamgeneratorplayback.rst @@ -115,7 +115,7 @@ Returns the number of times the playback skipped due to a buffer underrun in the :ref:`bool` **push_buffer**\ (\ frames\: :ref:`PackedVector2Array`\ ) :ref:`πŸ”—` -Pushes several audio data frames to the buffer. This is usually more efficient than :ref:`push_frame` in C# and compiled languages via GDExtension, but :ref:`push_buffer` may be *less* efficient in GDScript. +Pushes several audio data frames to the buffer. This is usually more efficient than :ref:`push_frame()` in C# and compiled languages via GDExtension, but :ref:`push_buffer()` may be *less* efficient in GDScript. .. rst-class:: classref-item-separator @@ -127,7 +127,7 @@ Pushes several audio data frames to the buffer. This is usually more efficient t :ref:`bool` **push_frame**\ (\ frame\: :ref:`Vector2`\ ) :ref:`πŸ”—` -Pushes a single audio data frame to the buffer. This is usually less efficient than :ref:`push_buffer` in C# and compiled languages via GDExtension, but :ref:`push_frame` may be *more* efficient in GDScript. +Pushes a single audio data frame to the buffer. This is usually less efficient than :ref:`push_buffer()` in C# and compiled languages via GDExtension, but :ref:`push_frame()` may be *more* efficient in GDScript. .. |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_audiostreaminteractive.rst b/classes/class_audiostreaminteractive.rst index 544b64695..0c4d5248b 100644 --- a/classes/class_audiostreaminteractive.rst +++ b/classes/class_audiostreaminteractive.rst @@ -19,7 +19,7 @@ Audio stream that can playback music interactively, combining clips and a transi Description ----------- -This is an audio stream that can playback music interactively, combining clips and a transition table. Clips must be added first, and then the transition rules via the :ref:`add_transition`. Additionally, this stream exports a property parameter to control the playback via :ref:`AudioStreamPlayer`, :ref:`AudioStreamPlayer2D`, or :ref:`AudioStreamPlayer3D`. +This is an audio stream that can playback music interactively, combining clips and a transition table. Clips must be added first, and then the transition rules via the :ref:`add_transition()`. Additionally, this stream exports 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. @@ -240,7 +240,7 @@ Enable auto-advance, a clip must be specified. :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`). +Enable auto-advance, but instead of specifying a clip, the playback will return to hold (see :ref:`add_transition()`). .. rst-class:: classref-section-separator @@ -351,7 +351,7 @@ Erase a transition by providing ``from_clip`` and ``to_clip`` clip indices. :ref :ref:`AutoAdvanceMode` **get_clip_auto_advance**\ (\ clip_index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Return whether a clip has auto-advance enabled. See :ref:`set_clip_auto_advance`. +Return whether a clip has auto-advance enabled. See :ref:`set_clip_auto_advance()`. .. rst-class:: classref-item-separator @@ -399,7 +399,7 @@ Return the :ref:`AudioStream` associated with a clip. :ref:`float` **get_transition_fade_beats**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Return the time (in beats) for a transition (see :ref:`add_transition`). +Return the time (in beats) for a transition (see :ref:`add_transition()`). .. rst-class:: classref-item-separator @@ -411,7 +411,7 @@ Return the time (in beats) for a transition (see :ref:`add_transition` **get_transition_fade_mode**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Return the mode for a transition (see :ref:`add_transition`). +Return the mode for a transition (see :ref:`add_transition()`). .. rst-class:: classref-item-separator @@ -423,7 +423,7 @@ Return the mode for a transition (see :ref:`add_transition` **get_transition_filler_clip**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Return the filler clip for a transition (see :ref:`add_transition`). +Return the filler clip for a transition (see :ref:`add_transition()`). .. rst-class:: classref-item-separator @@ -435,7 +435,7 @@ Return the filler clip for a transition (see :ref:`add_transition` **get_transition_from_time**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Return the source time position for a transition (see :ref:`add_transition`). +Return the source time position for a transition (see :ref:`add_transition()`). .. rst-class:: classref-item-separator @@ -459,7 +459,7 @@ Return the list of transitions (from, to interleaved). :ref:`TransitionToTime` **get_transition_to_time**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Return the destination time position for a transition (see :ref:`add_transition`). +Return the destination time position for a transition (see :ref:`add_transition()`). .. rst-class:: classref-item-separator @@ -471,7 +471,7 @@ Return the destination time position for a transition (see :ref:`add_transition< :ref:`bool` **has_transition**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if a given transition exists (was added via :ref:`add_transition`). +Returns ``true`` if a given transition exists (was added via :ref:`add_transition()`). .. rst-class:: classref-item-separator @@ -483,7 +483,7 @@ Returns ``true`` if a given transition exists (was added via :ref:`add_transitio :ref:`bool` **is_transition_holding_previous**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Return whether a transition uses the *hold previous* functionality (see :ref:`add_transition`). +Return whether a transition uses the *hold previous* functionality (see :ref:`add_transition()`). .. rst-class:: classref-item-separator @@ -495,7 +495,7 @@ Return whether a transition uses the *hold previous* functionality (see :ref:`ad :ref:`bool` **is_transition_using_filler_clip**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Return whether a transition uses the *filler clip* functionality (see :ref:`add_transition`). +Return whether a transition uses the *filler clip* functionality (see :ref:`add_transition()`). .. rst-class:: classref-item-separator diff --git a/classes/class_audiostreamplayback.rst b/classes/class_audiostreamplayback.rst index 57a110599..3c2d25c59 100644 --- a/classes/class_audiostreamplayback.rst +++ b/classes/class_audiostreamplayback.rst @@ -105,7 +105,7 @@ Overridable method. Should return how many times this audio stream has looped. M :ref:`Variant` **_get_parameter**\ (\ name\: :ref:`StringName`\ ) |virtual| |const| :ref:`πŸ”—` -Return the current value of a playback parameter by name (see :ref:`AudioStream._get_parameter_list`). +Return the current value of a playback parameter by name (see :ref:`AudioStream._get_parameter_list()`). .. rst-class:: classref-item-separator @@ -155,7 +155,7 @@ Override this method to customize how the audio stream is mixed. This method is |void| **_seek**\ (\ position\: :ref:`float`\ ) |virtual| :ref:`πŸ”—` -Override this method to customize what happens when seeking this audio stream at the given ``position``, such as by calling :ref:`AudioStreamPlayer.seek`. +Override this method to customize what happens when seeking this audio stream at the given ``position``, such as by calling :ref:`AudioStreamPlayer.seek()`. .. rst-class:: classref-item-separator @@ -167,7 +167,7 @@ Override this method to customize what happens when seeking this audio stream at |void| **_set_parameter**\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) |virtual| :ref:`πŸ”—` -Set the current value of a playback parameter by name (see :ref:`AudioStream._get_parameter_list`). +Set the current value of a playback parameter by name (see :ref:`AudioStream._get_parameter_list()`). .. rst-class:: classref-item-separator @@ -179,7 +179,7 @@ Set the current value of a playback parameter by name (see :ref:`AudioStream._ge |void| **_start**\ (\ from_pos\: :ref:`float`\ ) |virtual| :ref:`πŸ”—` -Override this method to customize what happens when the playback starts at the given position, such as by calling :ref:`AudioStreamPlayer.play`. +Override this method to customize what happens when the playback starts at the given position, such as by calling :ref:`AudioStreamPlayer.play()`. .. rst-class:: classref-item-separator @@ -191,7 +191,7 @@ Override this method to customize what happens when the playback starts at the g |void| **_stop**\ (\ ) |virtual| :ref:`πŸ”—` -Override this method to customize what happens when the playback is stopped, such as by calling :ref:`AudioStreamPlayer.stop`. +Override this method to customize what happens when the playback is stopped, such as by calling :ref:`AudioStreamPlayer.stop()`. .. rst-class:: classref-item-separator @@ -203,7 +203,7 @@ Override this method to customize what happens when the playback is stopped, suc |void| **_tag_used_streams**\ (\ ) |virtual| :ref:`πŸ”—` -Overridable method. Called whenever the audio stream is mixed if the playback is active and :ref:`AudioServer.set_enable_tagging_used_audio_streams` has been set to ``true``. Editor plugins may use this method to "tag" the current position along the audio stream and display it in a preview. +Overridable method. Called whenever the audio stream is mixed if the playback is active and :ref:`AudioServer.set_enable_tagging_used_audio_streams()` has been set to ``true``. Editor plugins may use this method to "tag" the current position along the audio stream and display it in a preview. .. rst-class:: classref-item-separator diff --git a/classes/class_audiostreamplaybackinteractive.rst b/classes/class_audiostreamplaybackinteractive.rst index 5b0ebeaca..31d606266 100644 --- a/classes/class_audiostreamplaybackinteractive.rst +++ b/classes/class_audiostreamplaybackinteractive.rst @@ -52,7 +52,7 @@ Method Descriptions :ref:`int` **get_current_clip_index**\ (\ ) |const| :ref:`πŸ”—` -Return the index of the currently playing clip. You can use this to get the name of the currently playing clip with :ref:`AudioStreamInteractive.get_clip_name`. +Return the index of the currently playing clip. You can use this to get the name of the currently playing clip with :ref:`AudioStreamInteractive.get_clip_name()`. \ **Example:** Get the currently playing clip name from inside an :ref:`AudioStreamPlayer` node. diff --git a/classes/class_audiostreamplaybackpolyphonic.rst b/classes/class_audiostreamplaybackpolyphonic.rst index 7ca1d3ce9..0bdeaf1d7 100644 --- a/classes/class_audiostreamplaybackpolyphonic.rst +++ b/classes/class_audiostreamplaybackpolyphonic.rst @@ -19,7 +19,7 @@ Playback instance for :ref:`AudioStreamPolyphonic`. Description ----------- -Playback instance for :ref:`AudioStreamPolyphonic`. After setting the ``stream`` property of :ref:`AudioStreamPlayer`, :ref:`AudioStreamPlayer2D`, or :ref:`AudioStreamPlayer3D`, the playback instance can be obtained by calling :ref:`AudioStreamPlayer.get_stream_playback`, :ref:`AudioStreamPlayer2D.get_stream_playback` or :ref:`AudioStreamPlayer3D.get_stream_playback` methods. +Playback instance for :ref:`AudioStreamPolyphonic`. After setting the ``stream`` property of :ref:`AudioStreamPlayer`, :ref:`AudioStreamPlayer2D`, or :ref:`AudioStreamPlayer3D`, the playback instance can be obtained by calling :ref:`AudioStreamPlayer.get_stream_playback()`, :ref:`AudioStreamPlayer2D.get_stream_playback()` or :ref:`AudioStreamPlayer3D.get_stream_playback()` methods. .. rst-class:: classref-reftable-group @@ -56,7 +56,7 @@ Constants **INVALID_ID** = ``-1`` :ref:`πŸ”—` -Returned by :ref:`play_stream` in case it could not allocate a stream for playback. +Returned by :ref:`play_stream()` in case it could not allocate a stream for playback. .. rst-class:: classref-section-separator @@ -73,7 +73,7 @@ Method Descriptions :ref:`bool` **is_stream_playing**\ (\ stream\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the stream associated with the given integer ID is still playing. Check :ref:`play_stream` for information on when this ID becomes invalid. +Returns ``true`` if the stream associated with the given integer ID is still playing. Check :ref:`play_stream()` for information on when this ID becomes invalid. .. rst-class:: classref-item-separator @@ -89,7 +89,7 @@ Play an :ref:`AudioStream` at a given offset, volume, pitch s The return value is a unique integer ID that is associated to this playback stream and which can be used to control it. -This ID becomes invalid when the stream ends (if it does not loop), when the **AudioStreamPlaybackPolyphonic** is stopped, or when :ref:`stop_stream` is called. +This ID becomes invalid when the stream ends (if it does not loop), when the **AudioStreamPlaybackPolyphonic** is stopped, or when :ref:`stop_stream()` is called. This function returns :ref:`INVALID_ID` if the amount of streams currently playing equals :ref:`AudioStreamPolyphonic.polyphony`. If you need a higher amount of maximum polyphony, raise this value. @@ -103,7 +103,7 @@ This function returns :ref:`INVALID_ID`, pitch_scale\: :ref:`float`\ ) :ref:`πŸ”—` -Change the stream pitch scale. The ``stream`` argument is an integer ID returned by :ref:`play_stream`. +Change the stream pitch scale. The ``stream`` argument is an integer ID returned by :ref:`play_stream()`. .. rst-class:: classref-item-separator @@ -115,7 +115,7 @@ Change the stream pitch scale. The ``stream`` argument is an integer ID returned |void| **set_stream_volume**\ (\ stream\: :ref:`int`, volume_db\: :ref:`float`\ ) :ref:`πŸ”—` -Change the stream volume (in db). The ``stream`` argument is an integer ID returned by :ref:`play_stream`. +Change the stream volume (in db). The ``stream`` argument is an integer ID returned by :ref:`play_stream()`. .. rst-class:: classref-item-separator @@ -127,7 +127,7 @@ Change the stream volume (in db). The ``stream`` argument is an integer ID retur |void| **stop_stream**\ (\ stream\: :ref:`int`\ ) :ref:`πŸ”—` -Stop a stream. The ``stream`` argument is an integer ID returned by :ref:`play_stream`, which becomes invalid after calling this function. +Stop a stream. The ``stream`` argument is an integer ID returned by :ref:`play_stream()`, which becomes invalid after calling this function. .. |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_audiostreamplayer.rst b/classes/class_audiostreamplayer.rst index 7ec001643..8cd8f769f 100644 --- a/classes/class_audiostreamplayer.rst +++ b/classes/class_audiostreamplayer.rst @@ -114,7 +114,7 @@ Signals **finished**\ (\ ) :ref:`πŸ”—` -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. +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 @@ -175,7 +175,7 @@ Property Descriptions - |void| **set_autoplay**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_autoplay_enabled**\ (\ ) -If ``true``, this node calls :ref:`play` when entering the tree. +If ``true``, this node calls :ref:`play()` when entering the tree. .. rst-class:: classref-item-separator @@ -194,7 +194,7 @@ If ``true``, this node calls :ref:`play` wh The target bus name. All sounds from this node will be playing on this bus. -\ **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`. +\ **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 @@ -211,7 +211,7 @@ The target bus name. All sounds from this node will be playing on this bus. - |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. Calling :ref:`play` 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 @@ -281,7 +281,7 @@ The playback type of the stream player. If set other than to the default value, - |void| **set_playing**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_playing**\ (\ ) -If ``true``, this node is playing sounds. Setting this property has the same effect as :ref:`play` and :ref:`stop`. +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 @@ -336,7 +336,7 @@ If ``true``, the sounds are paused. Setting :ref:`stream_paused`'s volume. -\ **Note:** To convert between decibel and linear energy (like most volume sliders do), use :ref:`volume_linear`, or :ref:`@GlobalScope.db_to_linear` and :ref:`@GlobalScope.linear_to_db`. +\ **Note:** To convert between decibel and linear energy (like most volume sliders do), use :ref:`volume_linear`, or :ref:`@GlobalScope.db_to_linear()` and :ref:`@GlobalScope.linear_to_db()`. .. rst-class:: classref-item-separator @@ -355,7 +355,7 @@ Volume of sound, in decibels. This is an offset of the :ref:`stream` for convenience. The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear` on :ref:`volume_db`. Setting this member is equivalent to setting :ref:`volume_db` to the result of :ref:`@GlobalScope.linear_to_db` on a value. +\ **Note:** This member modifies :ref:`volume_db` for convenience. The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear()` on :ref:`volume_db`. Setting this member is equivalent to setting :ref:`volume_db` to the result of :ref:`@GlobalScope.linear_to_db()` on a value. .. rst-class:: classref-section-separator @@ -374,7 +374,7 @@ Method Descriptions 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. +\ **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. \ **Note:** This method always returns ``0.0`` if the :ref:`stream` is an :ref:`AudioStreamInteractive`, since it can have multiple clips playing at once. @@ -388,7 +388,7 @@ Returns the position in the :ref:`AudioStream` of the latest :ref:`AudioStreamPlayback` **get_stream_playback**\ (\ ) :ref:`πŸ”—` -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. +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 @@ -400,7 +400,7 @@ Returns the latest :ref:`AudioStreamPlayback` of this :ref:`bool` **has_stream_playback**\ (\ ) :ref:`πŸ”—` -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`. +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 diff --git a/classes/class_audiostreamplayer2d.rst b/classes/class_audiostreamplayer2d.rst index 4c8c88d8e..49a8cbd79 100644 --- a/classes/class_audiostreamplayer2d.rst +++ b/classes/class_audiostreamplayer2d.rst @@ -24,7 +24,7 @@ Description Plays audio that is attenuated with distance to the listener. -By default, audio is heard from the screen center. This can be changed by adding an :ref:`AudioListener2D` node to the scene and enabling it by calling :ref:`AudioListener2D.make_current` on it. +By default, audio is heard from the screen center. This can be changed by adding an :ref:`AudioListener2D` node to the scene and enabling it by calling :ref:`AudioListener2D.make_current()` on it. See also :ref:`AudioStreamPlayer` to play a sound non-positionally. @@ -291,7 +291,7 @@ The playback type of the stream player. If set other than to the default value, - |void| **set_playing**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_playing**\ (\ ) -If ``true``, audio is playing or is queued to be played (see :ref:`play`). +If ``true``, audio is playing or is queued to be played (see :ref:`play()`). .. rst-class:: classref-item-separator @@ -361,7 +361,7 @@ Base volume before attenuation, in decibels. Base volume before attenuation, as a linear value. -\ **Note:** This member modifies :ref:`volume_db` for convenience. The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear` on :ref:`volume_db`. Setting this member is equivalent to setting :ref:`volume_db` to the result of :ref:`@GlobalScope.linear_to_db` on a value. +\ **Note:** This member modifies :ref:`volume_db` for convenience. The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear()` on :ref:`volume_db`. Setting this member is equivalent to setting :ref:`volume_db` to the result of :ref:`@GlobalScope.linear_to_db()` on a value. .. rst-class:: classref-section-separator diff --git a/classes/class_audiostreamplayer3d.rst b/classes/class_audiostreamplayer3d.rst index c247afa03..66cf3ebb2 100644 --- a/classes/class_audiostreamplayer3d.rst +++ b/classes/class_audiostreamplayer3d.rst @@ -24,7 +24,7 @@ Description Plays audio with positional sound effects, based on the relative position of the audio listener. Positional effects include distance attenuation, directionality, and the Doppler effect. For greater realism, a low-pass filter is applied to distant sounds. This can be disabled by setting :ref:`attenuation_filter_cutoff_hz` to ``20500``. -By default, audio is heard from the camera position. This can be changed by adding an :ref:`AudioListener3D` node to the scene and enabling it by calling :ref:`AudioListener3D.make_current` on it. +By default, audio is heard from the camera position. This can be changed by adding an :ref:`AudioListener3D` node to the scene and enabling it by calling :ref:`AudioListener3D.make_current()` on it. See also :ref:`AudioStreamPlayer` to play a sound non-positionally. @@ -507,7 +507,7 @@ The playback type of the stream player. If set other than to the default value, - |void| **set_playing**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_playing**\ (\ ) -If ``true``, audio is playing or is queued to be played (see :ref:`play`). +If ``true``, audio is playing or is queued to be played (see :ref:`play()`). .. rst-class:: classref-item-separator @@ -594,7 +594,7 @@ The base sound level before attenuation, in decibels. The base sound level before attenuation, as a linear value. -\ **Note:** This member modifies :ref:`volume_db` for convenience. The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear` on :ref:`volume_db`. Setting this member is equivalent to setting :ref:`volume_db` to the result of :ref:`@GlobalScope.linear_to_db` on a value. +\ **Note:** This member modifies :ref:`volume_db` for convenience. The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear()` on :ref:`volume_db`. Setting this member is equivalent to setting :ref:`volume_db` to the result of :ref:`@GlobalScope.linear_to_db()` on a value. .. rst-class:: classref-section-separator diff --git a/classes/class_audiostreampolyphonic.rst b/classes/class_audiostreampolyphonic.rst index cb9d7ae96..e71345027 100644 --- a/classes/class_audiostreampolyphonic.rst +++ b/classes/class_audiostreampolyphonic.rst @@ -21,7 +21,7 @@ Description AudioStream that lets the user play custom streams at any time from code, simultaneously using a single player. -Playback control is done via the :ref:`AudioStreamPlaybackPolyphonic` instance set inside the player, which can be obtained via :ref:`AudioStreamPlayer.get_stream_playback`, :ref:`AudioStreamPlayer2D.get_stream_playback` or :ref:`AudioStreamPlayer3D.get_stream_playback` methods. Obtaining the playback instance is only valid after the ``stream`` property is set as an **AudioStreamPolyphonic** in those players. +Playback control is done via the :ref:`AudioStreamPlaybackPolyphonic` instance set inside the player, which can be obtained via :ref:`AudioStreamPlayer.get_stream_playback()`, :ref:`AudioStreamPlayer2D.get_stream_playback()` or :ref:`AudioStreamPlayer3D.get_stream_playback()` methods. Obtaining the playback instance is only valid after the ``stream`` property is set as an **AudioStreamPolyphonic** in those players. .. rst-class:: classref-reftable-group diff --git a/classes/class_audiostreamwav.rst b/classes/class_audiostreamwav.rst index 57f8e6fd7..dacce63ef 100644 --- a/classes/class_audiostreamwav.rst +++ b/classes/class_audiostreamwav.rst @@ -310,7 +310,7 @@ Method Descriptions Creates a new **AudioStreamWAV** instance from the given buffer. The buffer must contain WAV data. -The keys and values of ``options`` match the properties of :ref:`ResourceImporterWAV`. The usage of ``options`` is identical to :ref:`load_from_file`. +The keys and values of ``options`` match the properties of :ref:`ResourceImporterWAV`. The usage of ``options`` is identical to :ref:`load_from_file()`. .. rst-class:: classref-item-separator diff --git a/classes/class_basebutton.rst b/classes/class_basebutton.rst index b5f9ec04a..f7bd067ae 100644 --- a/classes/class_basebutton.rst +++ b/classes/class_basebutton.rst @@ -288,7 +288,7 @@ To allow both left-click and right-click, use ``MOUSE_BUTTON_MASK_LEFT | MOUSE_B If ``true``, the button's state is pressed. Means the button is pressed down or toggled (if :ref:`toggle_mode` is active). Only works if :ref:`toggle_mode` is ``true``. -\ **Note:** Changing the value of :ref:`button_pressed` will result in :ref:`toggled` to be emitted. If you want to change the pressed state without emitting that signal, use :ref:`set_pressed_no_signal`. +\ **Note:** Changing the value of :ref:`button_pressed` will result in :ref:`toggled` to be emitted. If you want to change the pressed state without emitting that signal, use :ref:`set_pressed_no_signal()`. .. rst-class:: classref-item-separator @@ -377,7 +377,7 @@ If ``true``, the button will highlight for a short amount of time when its short If ``true``, the button will add information about its shortcut in the tooltip. -\ **Note:** This property does nothing when the tooltip control is customized using :ref:`Control._make_custom_tooltip`. +\ **Note:** This property does nothing when the tooltip control is customized using :ref:`Control._make_custom_tooltip()`. .. rst-class:: classref-item-separator @@ -411,7 +411,7 @@ Method Descriptions |void| **_pressed**\ (\ ) |virtual| :ref:`πŸ”—` -Called when the button is pressed. If you need to know the button's pressed state (and :ref:`toggle_mode` is active), use :ref:`_toggled` instead. +Called when the button is pressed. If you need to know the button's pressed state (and :ref:`toggle_mode` is active), use :ref:`_toggled()` instead. .. rst-class:: classref-item-separator diff --git a/classes/class_basematerial3d.rst b/classes/class_basematerial3d.rst index 1a8c9f0a0..859d9b665 100644 --- a/classes/class_basematerial3d.rst +++ b/classes/class_basematerial3d.rst @@ -2238,7 +2238,7 @@ If ``true``, the object is rendered at the same size regardless of distance. If ``true``, enables the vertex grow setting. This can be used to create mesh-based outlines using a second material pass and its :ref:`cull_mode` set to :ref:`CULL_FRONT`. See also :ref:`grow_amount`. -\ **Note:** Vertex growth cannot create new vertices, which means that visible gaps may occur in sharp corners. This can be alleviated by designing the mesh to use smooth normals exclusively using `face weighted normals `__ in the 3D authoring software. In this case, grow will be able to join every outline together, just like in the original mesh. +\ **Note:** Vertex growth cannot create new vertices, which means that visible gaps may occur in sharp corners. This can be alleviated by designing the mesh to use smooth normals exclusively using `face weighted normals `__ in the 3D authoring software. In this case, grow will be able to join every outline together, just like in the original mesh. .. rst-class:: classref-item-separator @@ -2596,7 +2596,7 @@ The strength of the normal map's effect. Texture used to specify the normal at a given pixel. The :ref:`normal_texture` only uses the red and green channels; the blue and alpha channels are ignored. The normal read from :ref:`normal_texture` is oriented around the surface normal provided by the :ref:`Mesh`. -\ **Note:** The mesh must have both normals and tangents defined in its vertex data. Otherwise, the normal map won't render correctly and will only appear to darken the whole surface. If creating geometry with :ref:`SurfaceTool`, you can use :ref:`SurfaceTool.generate_normals` and :ref:`SurfaceTool.generate_tangents` to automatically generate normals and tangents respectively. +\ **Note:** The mesh must have both normals and tangents defined in its vertex data. Otherwise, the normal map won't render correctly and will only appear to darken the whole surface. If creating geometry with :ref:`SurfaceTool`, you can use :ref:`SurfaceTool.generate_normals()` and :ref:`SurfaceTool.generate_tangents()` to automatically generate normals and tangents respectively. \ **Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See `this page `__ for a comparison of normal map coordinates expected by popular engines. diff --git a/classes/class_basis.rst b/classes/class_basis.rst index 9705b3ac4..1ab97291e 100644 --- a/classes/class_basis.rst +++ b/classes/class_basis.rst @@ -19,7 +19,7 @@ Description The **Basis** built-in :ref:`Variant` type is a 3Γ—3 `matrix `__ used to represent 3D rotation, scale, and shear. It is frequently used within a :ref:`Transform3D`. -A **Basis** is composed by 3 axis vectors, each representing a column of the matrix: :ref:`x`, :ref:`y`, and :ref:`z`. The length of each axis (:ref:`Vector3.length`) influences the basis's scale, while the direction of all axes influence the rotation. Usually, these axes are perpendicular to one another. However, when you rotate any axis individually, the basis becomes sheared. Applying a sheared basis to a 3D model will make the model appear distorted. +A **Basis** is composed by 3 axis vectors, each representing a column of the matrix: :ref:`x`, :ref:`y`, and :ref:`z`. The length of each axis (:ref:`Vector3.length()`) influences the basis's scale, while the direction of all axes influence the rotation. Usually, these axes are perpendicular to one another. However, when you rotate any axis individually, the basis becomes sheared. Applying a sheared basis to a 3D model will make the model appear distorted. A **Basis** is: @@ -27,9 +27,9 @@ A **Basis** is: - **Normalized** if the length of every axis is ``1.0``. -- **Uniform** if all axes share the same length (see :ref:`get_scale`). +- **Uniform** if all axes share the same length (see :ref:`get_scale()`). -- **Orthonormal** if it is both orthogonal and normalized, which allows it to only represent rotations (see :ref:`orthonormalized`). +- **Orthonormal** if it is both orthogonal and normalized, which allows it to only represent rotations (see :ref:`orthonormalized()`). - **Conformal** if it is both orthogonal and uniform, which ensures it is not distorted. @@ -330,7 +330,7 @@ Constructs a **Basis** as a copy of the given **Basis**. Constructs a **Basis** that only represents rotation, rotated around the ``axis`` by the given ``angle``, in radians. The axis must be a normalized vector. -\ **Note:** This is the same as using :ref:`rotated` on the :ref:`IDENTITY` basis. With more than one angle consider using :ref:`from_euler`, instead. +\ **Note:** This is the same as using :ref:`rotated()` on the :ref:`IDENTITY` basis. With more than one angle consider using :ref:`from_euler()`, instead. .. rst-class:: classref-item-separator @@ -371,7 +371,7 @@ Method Descriptions Returns the `determinant `__ of this basis's matrix. For advanced math, this number can be used to determine a few attributes: -- If the determinant is exactly ``0.0``, the basis is not invertible (see :ref:`inverse`). +- If the determinant is exactly ``0.0``, the basis is not invertible (see :ref:`inverse()`). - If the determinant is a negative number, the basis represents a negative scale. @@ -414,7 +414,7 @@ Constructs a new **Basis** that only represents rotation from the given :ref:`Ve -The order of each consecutive rotation can be changed with ``order`` (see :ref:`EulerOrder` constants). By default, the YXZ convention is used (:ref:`@GlobalScope.EULER_ORDER_YXZ`): the basis rotates first around the Y axis (yaw), then X (pitch), and lastly Z (roll). When using the opposite method :ref:`get_euler`, this order is reversed. +The order of each consecutive rotation can be changed with ``order`` (see :ref:`EulerOrder` constants). By default, the YXZ convention is used (:ref:`@GlobalScope.EULER_ORDER_YXZ`): the basis rotates first around the Y axis (yaw), then X (pitch), and lastly Z (roll). When using the opposite method :ref:`get_euler()`, this order is reversed. .. rst-class:: classref-item-separator @@ -469,11 +469,11 @@ Returns this basis's rotation as a :ref:`Vector3` of `Euler angle - The :ref:`Vector3.z` contains the angle around the :ref:`z` axis (roll). -The order of each consecutive rotation can be changed with ``order`` (see :ref:`EulerOrder` constants). By default, the YXZ convention is used (:ref:`@GlobalScope.EULER_ORDER_YXZ`): Z (roll) is calculated first, then X (pitch), and lastly Y (yaw). When using the opposite method :ref:`from_euler`, this order is reversed. +The order of each consecutive rotation can be changed with ``order`` (see :ref:`EulerOrder` constants). By default, the YXZ convention is used (:ref:`@GlobalScope.EULER_ORDER_YXZ`): Z (roll) is calculated first, then X (pitch), and lastly Y (yaw). When using the opposite method :ref:`from_euler()`, this order is reversed. -\ **Note:** For this method to return correctly, the basis needs to be *orthonormal* (see :ref:`orthonormalized`). +\ **Note:** For this method to return correctly, the basis needs to be *orthonormal* (see :ref:`orthonormalized()`). -\ **Note:** Euler angles are much more intuitive but are not suitable for 3D math. Because of this, consider using the :ref:`get_rotation_quaternion` method instead, which returns a :ref:`Quaternion`. +\ **Note:** Euler angles are much more intuitive but are not suitable for 3D math. Because of this, consider using the :ref:`get_rotation_quaternion()` method instead, which returns a :ref:`Quaternion`. \ **Note:** In the Inspector dock, a basis's rotation is often displayed in Euler angles (in degrees), as is the case with the :ref:`Node3D.rotation` property. @@ -489,7 +489,7 @@ The order of each consecutive rotation can be changed with ``order`` (see :ref:` Returns this basis's rotation as a :ref:`Quaternion`. -\ **Note:** Quaternions are much more suitable for 3D math but are less intuitive. For user interfaces, consider using the :ref:`get_euler` method, which returns Euler angles. +\ **Note:** Quaternions are much more suitable for 3D math but are less intuitive. For user interfaces, consider using the :ref:`get_euler()` method, which returns Euler angles. .. rst-class:: classref-item-separator @@ -534,7 +534,7 @@ Returns the length of each axis of this basis, as a :ref:`Vector3 -\ **Note:** If the value returned by :ref:`determinant` is negative, the scale is also negative. +\ **Note:** If the value returned by :ref:`determinant()` is negative, the scale is also negative. .. rst-class:: classref-item-separator @@ -570,7 +570,7 @@ Returns ``true`` if this basis is conformal. A conformal basis is both *orthogon :ref:`bool` **is_equal_approx**\ (\ b\: :ref:`Basis`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this basis and ``b`` are approximately equal, by calling :ref:`@GlobalScope.is_equal_approx` on all vector components. +Returns ``true`` if this basis and ``b`` are approximately equal, by calling :ref:`@GlobalScope.is_equal_approx()` on all vector components. .. rst-class:: classref-item-separator @@ -582,7 +582,7 @@ Returns ``true`` if this basis and ``b`` are approximately equal, by calling :re :ref:`bool` **is_finite**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this basis is finite, by calling :ref:`@GlobalScope.is_finite` on all vector components. +Returns ``true`` if this basis is finite, by calling :ref:`@GlobalScope.is_finite()` on all vector components. .. rst-class:: classref-item-separator @@ -598,7 +598,7 @@ Creates a new **Basis** with a rotation such that the forward axis (-Z) points t By default, the -Z axis (camera forward) is treated as forward (implies +X is right). If ``use_model_front`` is ``true``, the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the ``target`` position. -The up axis (+Y) points as close to the ``up`` vector as possible while staying perpendicular to the forward axis. The returned basis is orthonormalized (see :ref:`orthonormalized`). +The up axis (+Y) points as close to the ``up`` vector as possible while staying perpendicular to the forward axis. The returned basis is orthonormalized (see :ref:`orthonormalized()`). The ``target`` and the ``up`` cannot be :ref:`Vector3.ZERO`, and shouldn't be colinear to avoid unintended rotation around local Z axis. @@ -652,7 +652,7 @@ It is often useful to call this method to avoid rounding errors on a rotating ba Returns a copy of this basis rotated around the given ``axis`` by the given ``angle`` (in radians). -The ``axis`` must be a normalized vector (see :ref:`Vector3.normalized`). If ``angle`` is positive, the basis is rotated counter-clockwise around the axis. +The ``axis`` must be a normalized vector (see :ref:`Vector3.normalized()`). If ``angle`` is positive, the basis is rotated counter-clockwise around the axis. .. tabs:: @@ -757,7 +757,7 @@ Performs a spherical-linear interpolation with the ``to`` basis, given a ``weigh :ref:`float` **tdotx**\ (\ with\: :ref:`Vector3`\ ) |const| :ref:`πŸ”—` -Returns the transposed dot product between ``with`` and the :ref:`x` axis (see :ref:`transposed`). +Returns the transposed dot product between ``with`` and the :ref:`x` axis (see :ref:`transposed()`). This is equivalent to ``basis.x.dot(vector)``. @@ -771,7 +771,7 @@ This is equivalent to ``basis.x.dot(vector)``. :ref:`float` **tdoty**\ (\ with\: :ref:`Vector3`\ ) |const| :ref:`πŸ”—` -Returns the transposed dot product between ``with`` and the :ref:`y` axis (see :ref:`transposed`). +Returns the transposed dot product between ``with`` and the :ref:`y` axis (see :ref:`transposed()`). This is equivalent to ``basis.y.dot(vector)``. @@ -785,7 +785,7 @@ This is equivalent to ``basis.y.dot(vector)``. :ref:`float` **tdotz**\ (\ with\: :ref:`Vector3`\ ) |const| :ref:`πŸ”—` -Returns the transposed dot product between ``with`` and the :ref:`z` axis (see :ref:`transposed`). +Returns the transposed dot product between ``with`` and the :ref:`z` axis (see :ref:`transposed()`). This is equivalent to ``basis.z.dot(vector)``. @@ -849,7 +849,7 @@ Operator Descriptions Returns ``true`` if the components of both **Basis** matrices are not equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. rst-class:: classref-item-separator @@ -954,7 +954,7 @@ Divides all components of the **Basis** by the given :ref:`int`. This Returns ``true`` if the components of both **Basis** matrices are exactly equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. rst-class:: classref-item-separator diff --git a/classes/class_bitmap.rst b/classes/class_bitmap.rst index 69b3b3ae7..217f31b88 100644 --- a/classes/class_bitmap.rst +++ b/classes/class_bitmap.rst @@ -156,7 +156,7 @@ Returns the number of bitmap elements that are set to ``true``. |void| **grow_mask**\ (\ pixels\: :ref:`int`, rect\: :ref:`Rect2i`\ ) :ref:`πŸ”—` -Applies morphological dilation or erosion to the bitmap. If ``pixels`` is positive, dilation is applied to the bitmap. If ``pixels`` is negative, erosion is applied to the bitmap. ``rect`` defines the area where the morphological operation is applied. Pixels located outside the ``rect`` are unaffected by :ref:`grow_mask`. +Applies morphological dilation or erosion to the bitmap. If ``pixels`` is positive, dilation is applied to the bitmap. If ``pixels`` is negative, erosion is applied to the bitmap. ``rect`` defines the area where the morphological operation is applied. Pixels located outside the ``rect`` are unaffected by :ref:`grow_mask()`. .. rst-class:: classref-item-separator diff --git a/classes/class_bone2d.rst b/classes/class_bone2d.rst index 1e6460eb4..eac814b82 100644 --- a/classes/class_bone2d.rst +++ b/classes/class_bone2d.rst @@ -23,7 +23,7 @@ A hierarchy of **Bone2D**\ s can be bound to a :ref:`Skeleton2D` nodes to animate 2D meshes created with the :ref:`Polygon2D` UV editor. -Each bone has a :ref:`rest` transform that you can reset to with :ref:`apply_rest`. These rest poses are relative to the bone's parent. +Each bone has a :ref:`rest` transform that you can reset to with :ref:`apply_rest()`. These rest poses are relative to the bone's parent. If in the editor, you can set the rest pose of an entire skeleton using a menu option, from the code, you need to iterate over the bones to set their individual rest poses. @@ -87,7 +87,7 @@ Property Descriptions - |void| **set_rest**\ (\ value\: :ref:`Transform2D`\ ) - :ref:`Transform2D` **get_rest**\ (\ ) -Rest transform of the bone. You can reset the node's transforms to this value using :ref:`apply_rest`. +Rest transform of the bone. You can reset the node's transforms to this value using :ref:`apply_rest()`. .. rst-class:: classref-section-separator diff --git a/classes/class_boneattachment3d.rst b/classes/class_boneattachment3d.rst index 94b63075d..7e2a1328a 100644 --- a/classes/class_boneattachment3d.rst +++ b/classes/class_boneattachment3d.rst @@ -183,7 +183,7 @@ A function that is called automatically when the :ref:`Skeleton3D`\ ) :ref:`πŸ”—` -Sets the :ref:`NodePath` to the external skeleton that the BoneAttachment3D node should use. See :ref:`set_use_external_skeleton` to enable the external :ref:`Skeleton3D` node. +Sets the :ref:`NodePath` to the external skeleton that the BoneAttachment3D node should use. See :ref:`set_use_external_skeleton()` to enable the external :ref:`Skeleton3D` node. .. rst-class:: classref-item-separator @@ -195,7 +195,7 @@ Sets the :ref:`NodePath` to the external skeleton that the BoneA |void| **set_use_external_skeleton**\ (\ use_external_skeleton\: :ref:`bool`\ ) :ref:`πŸ”—` -Sets whether the BoneAttachment3D node will use an external :ref:`Skeleton3D` node rather than attempting to use its parent node as the :ref:`Skeleton3D`. When set to ``true``, the BoneAttachment3D node will use the external :ref:`Skeleton3D` node set in :ref:`set_external_skeleton`. +Sets whether the BoneAttachment3D node will use an external :ref:`Skeleton3D` node rather than attempting to use its parent node as the :ref:`Skeleton3D`. When set to ``true``, the BoneAttachment3D node will use the external :ref:`Skeleton3D` node set in :ref:`set_external_skeleton()`. .. |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_bool.rst b/classes/class_bool.rst index 9b6508e32..1fc69b312 100644 --- a/classes/class_bool.rst +++ b/classes/class_bool.rst @@ -71,7 +71,7 @@ Booleans can be combined with the logical operators ``and``, ``or``, ``not`` to \ **Note:** In modern programming languages, logical operators are evaluated in order. All remaining conditions are skipped if their result would have no effect on the final value. This concept is known as `short-circuit evaluation `__ and can be useful to avoid evaluating expensive conditions in some performance-critical cases. -\ **Note:** By convention, built-in methods and properties that return booleans are usually defined as yes-no questions, single adjectives, or similar (:ref:`String.is_empty`, :ref:`Node.can_process`, :ref:`Camera2D.enabled`, etc.). +\ **Note:** By convention, built-in methods and properties that return booleans are usually defined as yes-no questions, single adjectives, or similar (:ref:`String.is_empty()`, :ref:`Node.can_process()`, :ref:`Camera2D.enabled`, etc.). .. rst-class:: classref-reftable-group diff --git a/classes/class_callable.rst b/classes/class_callable.rst index 66ddfef6d..077d514ff 100644 --- a/classes/class_callable.rst +++ b/classes/class_callable.rst @@ -17,7 +17,7 @@ A built-in type representing a method or a standalone function. Description ----------- -**Callable** is a built-in :ref:`Variant` type that represents a function. It can either be a method within an :ref:`Object` instance, or a custom callable used for different purposes (see :ref:`is_custom`). Like all :ref:`Variant` types, it can be stored in variables and passed to other functions. It is most commonly used for signal callbacks. +**Callable** is a built-in :ref:`Variant` type that represents a function. It can either be a method within an :ref:`Object` instance, or a custom callable used for different purposes (see :ref:`is_custom()`). Like all :ref:`Variant` types, it can be stored in variables and passed to other functions. It is most commonly used for signal callbacks. .. tabs:: @@ -52,7 +52,7 @@ Description -In GDScript, it's possible to create lambda functions within a method. Lambda functions are custom callables that are not associated with an :ref:`Object` instance. Optionally, lambda functions can also be named. The name will be displayed in the debugger, or when calling :ref:`get_method`. +In GDScript, it's possible to create lambda functions within a method. Lambda functions are custom callables that are not associated with an :ref:`Object` instance. Optionally, lambda functions can also be named. The name will be displayed in the debugger, or when calling :ref:`get_method()`. :: @@ -209,7 +209,7 @@ Constructs a **Callable** as a copy of the given **Callable**. Creates a new **Callable** for the method named ``method`` in the specified ``object``. -\ **Note:** For methods of built-in :ref:`Variant` types, use :ref:`create` instead. +\ **Note:** For methods of built-in :ref:`Variant` types, use :ref:`create()` instead. .. rst-class:: classref-section-separator @@ -226,7 +226,7 @@ Method Descriptions :ref:`Callable` **bind**\ (\ ...\ ) |vararg| |const| :ref:`πŸ”—` -Returns a copy of this **Callable** with one or more arguments bound. When called, the bound arguments are passed *after* the arguments supplied by :ref:`call`. See also :ref:`unbind`. +Returns a copy of this **Callable** with one or more arguments bound. When called, the bound arguments are passed *after* the arguments supplied by :ref:`call()`. See also :ref:`unbind()`. \ **Note:** When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left. @@ -240,7 +240,7 @@ Returns a copy of this **Callable** with one or more arguments bound. When calle :ref:`Callable` **bindv**\ (\ arguments\: :ref:`Array`\ ) :ref:`πŸ”—` -Returns a copy of this **Callable** with one or more arguments bound, reading them from an array. When called, the bound arguments are passed *after* the arguments supplied by :ref:`call`. See also :ref:`unbind`. +Returns a copy of this **Callable** with one or more arguments bound, reading them from an array. When called, the bound arguments are passed *after* the arguments supplied by :ref:`call()`. See also :ref:`unbind()`. \ **Note:** When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left. @@ -287,7 +287,7 @@ Calls the method represented by this **Callable** in deferred mode, i.e. at the \ **Note:** Deferred calls are processed at idle time. Idle time happens mainly at the end of process and physics frames. In it, deferred calls will be run until there are none left, which means you can defer calls from other deferred calls and they'll still be run in the current idle time cycle. This means you should not call a method deferred from itself (or from a method called by it), as this causes infinite recursion the same way as if you had called the method directly. -See also :ref:`Object.call_deferred`. +See also :ref:`Object.call_deferred()`. .. rst-class:: classref-item-separator @@ -299,7 +299,7 @@ See also :ref:`Object.call_deferred`. :ref:`Variant` **callv**\ (\ arguments\: :ref:`Array`\ ) |const| :ref:`πŸ”—` -Calls the method represented by this **Callable**. Unlike :ref:`call`, this method expects all arguments to be contained inside the ``arguments`` :ref:`Array`. +Calls the method represented by this **Callable**. Unlike :ref:`call()`, this method expects all arguments to be contained inside the ``arguments`` :ref:`Array`. .. rst-class:: classref-item-separator @@ -311,7 +311,7 @@ Calls the method represented by this **Callable**. Unlike :ref:`call` **create**\ (\ variant\: :ref:`Variant`, method\: :ref:`StringName`\ ) |static| :ref:`πŸ”—` -Creates a new **Callable** for the method named ``method`` in the specified ``variant``. To represent a method of a built-in :ref:`Variant` type, a custom callable is used (see :ref:`is_custom`). If ``variant`` is :ref:`Object`, then a standard callable will be created instead. +Creates a new **Callable** for the method named ``method`` in the specified ``variant``. To represent a method of a built-in :ref:`Variant` type, a custom callable is used (see :ref:`is_custom()`). If ``variant`` is :ref:`Object`, then a standard callable will be created instead. \ **Note:** This method is always necessary for the :ref:`Dictionary` type, as property syntax is used to access its entries. You may also use this method when ``variant``'s type is not known in advance (for polymorphism). @@ -325,7 +325,7 @@ Creates a new **Callable** for the method named ``method`` in the specified ``va :ref:`int` **get_argument_count**\ (\ ) |const| :ref:`πŸ”—` -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. +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 @@ -337,7 +337,7 @@ Returns the total number of arguments this **Callable** should take, including o :ref:`Array` **get_bound_arguments**\ (\ ) |const| :ref:`πŸ”—` -Returns the array of arguments bound via successive :ref:`bind` or :ref:`unbind` calls. These arguments will be added *after* the arguments passed to the call, from which :ref:`get_unbound_arguments_count` arguments on the right have been previously excluded. +Returns the array of arguments bound via successive :ref:`bind()` or :ref:`unbind()` calls. These arguments will be added *after* the arguments passed to the call, from which :ref:`get_unbound_arguments_count()` arguments on the right have been previously excluded. :: @@ -357,9 +357,9 @@ Returns the array of arguments bound via successive :ref:`bind` **get_bound_arguments_count**\ (\ ) |const| :ref:`πŸ”—` -Returns the total amount of arguments bound via successive :ref:`bind` or :ref:`unbind` calls. This is the same as the size of the array returned by :ref:`get_bound_arguments`. See :ref:`get_bound_arguments` for details. +Returns the total amount of arguments bound via successive :ref:`bind()` or :ref:`unbind()` calls. This is the same as the size of the array returned by :ref:`get_bound_arguments()`. See :ref:`get_bound_arguments()` for details. -\ **Note:** The :ref:`get_bound_arguments_count` and :ref:`get_unbound_arguments_count` methods can both return positive values. +\ **Note:** The :ref:`get_bound_arguments_count()` and :ref:`get_unbound_arguments_count()` methods can both return positive values. .. rst-class:: classref-item-separator @@ -395,7 +395,7 @@ Returns the object on which this **Callable** is called. :ref:`int` **get_object_id**\ (\ ) |const| :ref:`πŸ”—` -Returns the ID of this **Callable**'s object (see :ref:`Object.get_instance_id`). +Returns the ID of this **Callable**'s object (see :ref:`Object.get_instance_id()`). .. rst-class:: classref-item-separator @@ -407,9 +407,9 @@ Returns the ID of this **Callable**'s object (see :ref:`Object.get_instance_id` **get_unbound_arguments_count**\ (\ ) |const| :ref:`πŸ”—` -Returns the total amount of arguments unbound via successive :ref:`bind` or :ref:`unbind` calls. See :ref:`get_bound_arguments` for details. +Returns the total amount of arguments unbound via successive :ref:`bind()` or :ref:`unbind()` calls. See :ref:`get_bound_arguments()` for details. -\ **Note:** The :ref:`get_bound_arguments_count` and :ref:`get_unbound_arguments_count` methods can both return positive values. +\ **Note:** The :ref:`get_bound_arguments_count()` and :ref:`get_unbound_arguments_count()` methods can both return positive values. .. rst-class:: classref-item-separator @@ -423,7 +423,7 @@ Returns the total amount of arguments unbound via successive :ref:`bind`. +\ **Note:** **Callable**\ s with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does *not* imply the callables are equal, because different callables can have identical hash values due to hash collisions. The engine uses a 32-bit hash algorithm for :ref:`hash()`. .. rst-class:: classref-item-separator @@ -437,9 +437,9 @@ Returns the 32-bit hash value of this **Callable**'s object. Returns ``true`` if this **Callable** is a custom callable. Custom callables are used: -- for binding/unbinding arguments (see :ref:`bind` and :ref:`unbind`); +- for binding/unbinding arguments (see :ref:`bind()` and :ref:`unbind()`); -- for representing methods of built-in :ref:`Variant` types (see :ref:`create`); +- for representing methods of built-in :ref:`Variant` types (see :ref:`create()`); - for representing global, lambda, and RPC functions in GDScript; @@ -457,7 +457,7 @@ Returns ``true`` if this **Callable** is a custom callable. Custom callables are Returns ``true`` if this **Callable** has no target to call the method on. Equivalent to ``callable == Callable()``. -\ **Note:** This is *not* the same as ``not is_valid()`` and using ``not is_null()`` will *not* guarantee that this callable can be called. Use :ref:`is_valid` instead. +\ **Note:** This is *not* the same as ``not is_valid()`` and using ``not is_null()`` will *not* guarantee that this callable can be called. Use :ref:`is_valid()` instead. .. rst-class:: classref-item-separator @@ -469,7 +469,7 @@ Returns ``true`` if this **Callable** has no target to call the method on. Equiv :ref:`bool` **is_standard**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this **Callable** is a standard callable. This method is the opposite of :ref:`is_custom`. Returns ``false`` if this callable is a lambda function. +Returns ``true`` if this **Callable** is a standard callable. This method is the opposite of :ref:`is_custom()`. Returns ``false`` if this callable is a lambda function. .. rst-class:: classref-item-separator @@ -493,7 +493,7 @@ Returns ``true`` if the callable's object exists and has a valid method name ass |void| **rpc**\ (\ ...\ ) |vararg| |const| :ref:`πŸ”—` -Perform an RPC (Remote Procedure Call) on all connected peers. This is used for multiplayer and is normally not available, unless the function being called has been marked as *RPC* (using :ref:`@GDScript.@rpc` or :ref:`Node.rpc_config`). Calling this method on unsupported functions will result in an error. See :ref:`Node.rpc`. +Perform an RPC (Remote Procedure Call) on all connected peers. This is used for multiplayer and is normally not available, unless the function being called has been marked as *RPC* (using :ref:`@GDScript.@rpc` or :ref:`Node.rpc_config()`). Calling this method on unsupported functions will result in an error. See :ref:`Node.rpc()`. .. rst-class:: classref-item-separator @@ -505,7 +505,7 @@ Perform an RPC (Remote Procedure Call) on all connected peers. This is used for |void| **rpc_id**\ (\ peer_id\: :ref:`int`, ...\ ) |vararg| |const| :ref:`πŸ”—` -Perform an RPC (Remote Procedure Call) on a specific peer ID (see multiplayer documentation for reference). This is used for multiplayer and is normally not available unless the function being called has been marked as *RPC* (using :ref:`@GDScript.@rpc` or :ref:`Node.rpc_config`). Calling this method on unsupported functions will result in an error. See :ref:`Node.rpc_id`. +Perform an RPC (Remote Procedure Call) on a specific peer ID (see multiplayer documentation for reference). This is used for multiplayer and is normally not available unless the function being called has been marked as *RPC* (using :ref:`@GDScript.@rpc` or :ref:`Node.rpc_config()`). Calling this method on unsupported functions will result in an error. See :ref:`Node.rpc_id()`. .. rst-class:: classref-item-separator @@ -517,7 +517,7 @@ Perform an RPC (Remote Procedure Call) on a specific peer ID (see multiplayer do :ref:`Callable` **unbind**\ (\ argcount\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns a copy of this **Callable** with a number of arguments unbound. In other words, when the new callable is called the last few arguments supplied by the user are ignored, according to ``argcount``. The remaining arguments are passed to the callable. This allows to use the original callable in a context that attempts to pass more arguments than this callable can handle, e.g. a signal with a fixed number of arguments. See also :ref:`bind`. +Returns a copy of this **Callable** with a number of arguments unbound. In other words, when the new callable is called the last few arguments supplied by the user are ignored, according to ``argcount``. The remaining arguments are passed to the callable. This allows to use the original callable in a context that attempts to pass more arguments than this callable can handle, e.g. a signal with a fixed number of arguments. See also :ref:`bind()`. \ **Note:** When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left. diff --git a/classes/class_callbacktweener.rst b/classes/class_callbacktweener.rst index b65c79a45..78a138fb1 100644 --- a/classes/class_callbacktweener.rst +++ b/classes/class_callbacktweener.rst @@ -19,11 +19,11 @@ Calls the specified method after optional delay. Description ----------- -**CallbackTweener** is used to call a method in a tweening sequence. See :ref:`Tween.tween_callback` for more usage information. +**CallbackTweener** is used to call a method in a tweening sequence. See :ref:`Tween.tween_callback()` for more usage information. The tweener will finish automatically if the callback's target object is freed. -\ **Note:** :ref:`Tween.tween_callback` is the only correct way to create **CallbackTweener**. Any **CallbackTweener** created manually will not function correctly. +\ **Note:** :ref:`Tween.tween_callback()` is the only correct way to create **CallbackTweener**. Any **CallbackTweener** created manually will not function correctly. .. rst-class:: classref-reftable-group @@ -54,7 +54,7 @@ Method Descriptions Makes the callback call delayed by given time in seconds. -\ **Example:** Call :ref:`Node.queue_free` after 2 seconds: +\ **Example:** Call :ref:`Node.queue_free()` after 2 seconds: :: diff --git a/classes/class_camera2d.rst b/classes/class_camera2d.rst index e9c3bece4..8db1e180a 100644 --- a/classes/class_camera2d.rst +++ b/classes/class_camera2d.rst @@ -23,9 +23,9 @@ Camera node for 2D scenes. It forces the screen (current layer) to scroll follow Cameras register themselves in the nearest :ref:`Viewport` node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport. -This node is intended to be a simple helper to get things going quickly, but more functionality may be desired to change how the camera works. To make your own custom camera node, inherit it from :ref:`Node2D` and change the transform of the canvas by setting :ref:`Viewport.canvas_transform` in :ref:`Viewport` (you can obtain the current :ref:`Viewport` by using :ref:`Node.get_viewport`). +This node is intended to be a simple helper to get things going quickly, but more functionality may be desired to change how the camera works. To make your own custom camera node, inherit it from :ref:`Node2D` and change the transform of the canvas by setting :ref:`Viewport.canvas_transform` in :ref:`Viewport` (you can obtain the current :ref:`Viewport` by using :ref:`Node.get_viewport()`). -Note that the **Camera2D** node's ``position`` doesn't represent the actual position of the screen, which may differ due to applied smoothing or limits. You can use :ref:`get_screen_center_position` to get the real position. +Note that the **Camera2D** node's ``position`` doesn't represent the actual position of the screen, which may differ due to applied smoothing or limits. You can use :ref:`get_screen_center_position()` to get the real position. .. rst-class:: classref-introduction-group @@ -434,7 +434,7 @@ If ``true``, draws the camera's screen rectangle in the editor. - |void| **set_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_enabled**\ (\ ) -Controls whether the camera can be active or not. If ``true``, the **Camera2D** will become the main camera when it enters the scene tree and there is no active camera currently (see :ref:`Viewport.get_camera_2d`). +Controls whether the camera can be active or not. If ``true``, the **Camera2D** will become the main camera when it enters the scene tree and there is no active camera currently (see :ref:`Viewport.get_camera_2d()`). When the camera is currently active and :ref:`enabled` is set to ``false``, the next enabled **Camera2D** in the scene tree will become active. @@ -525,7 +525,7 @@ If ``true``, the camera smoothly stops when reaches its limits. This property has no effect if :ref:`position_smoothing_enabled` is ``false``. -\ **Note:** To immediately update the camera's position to be within limits without smoothing, even with this setting enabled, invoke :ref:`reset_smoothing`. +\ **Note:** To immediately update the camera's position to be within limits without smoothing, even with this setting enabled, invoke :ref:`reset_smoothing()`. .. rst-class:: classref-item-separator @@ -732,7 +732,7 @@ Returns the camera limit for the specified :ref:`Side`. Returns the center of the screen from this camera's point of view, in global coordinates. -\ **Note:** The exact targeted position of the camera may be different. See :ref:`get_target_position`. +\ **Note:** The exact targeted position of the camera may be different. See :ref:`get_target_position()`. .. rst-class:: classref-item-separator @@ -746,7 +746,7 @@ Returns the center of the screen from this camera's point of view, in global coo Returns this camera's target position, in global coordinates. -\ **Note:** The returned value is not the same as :ref:`Node2D.global_position`, as it is affected by the drag properties. It is also not the same as the current position if :ref:`position_smoothing_enabled` is ``true`` (see :ref:`get_screen_center_position`). +\ **Note:** The returned value is not the same as :ref:`Node2D.global_position`, as it is affected by the drag properties. It is also not the same as the current position if :ref:`position_smoothing_enabled` is ``true`` (see :ref:`get_screen_center_position()`). .. rst-class:: classref-item-separator @@ -758,7 +758,7 @@ Returns this camera's target position, in global coordinates. :ref:`bool` **is_current**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this **Camera2D** is the active camera (see :ref:`Viewport.get_camera_2d`). +Returns ``true`` if this **Camera2D** is the active camera (see :ref:`Viewport.get_camera_2d()`). .. rst-class:: classref-item-separator diff --git a/classes/class_camera3d.rst b/classes/class_camera3d.rst index 21b31fa7a..011a4ff2f 100644 --- a/classes/class_camera3d.rst +++ b/classes/class_camera3d.rst @@ -275,7 +275,7 @@ The culling mask that describes which :ref:`VisualInstance3D.layers` allows for 32 layers to be stored in total, there are an additional 12 layers that are only used internally by the engine and aren't exposed in the editor. Setting :ref:`cull_mask` using a script allows you to toggle those reserved layers, which can be useful for editor plugins. -To adjust :ref:`cull_mask` more easily using a script, use :ref:`get_cull_mask_value` and :ref:`set_cull_mask_value`. +To adjust :ref:`cull_mask` more easily using a script, use :ref:`get_cull_mask_value()` and :ref:`set_cull_mask_value()`. \ **Note:** :ref:`VoxelGI`, SDFGI and :ref:`LightmapGI` will always take all layers into account to determine what contributes to global illumination. If this is an issue, set :ref:`GeometryInstance3D.gi_mode` to :ref:`GeometryInstance3D.GI_MODE_DISABLED` for meshes and :ref:`Light3D.light_bake_mode` to :ref:`Light3D.BAKE_DISABLED` for lights to exclude them from global illumination. @@ -732,7 +732,7 @@ Sets the camera projection to perspective mode (see :ref:`PROJECTION_PERSPECTIVE Returns the 2D coordinate in the :ref:`Viewport` rectangle that maps to the given 3D point in world space. -\ **Note:** When using this to position GUI elements over a 3D viewport, use :ref:`is_position_behind` to prevent them from appearing if the 3D point is behind the camera: +\ **Note:** When using this to position GUI elements over a 3D viewport, use :ref:`is_position_behind()` to prevent them from appearing if the 3D point is behind the camera: :: diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index 5cbc59cbd..68319c65f 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -23,7 +23,7 @@ Description Abstract base class for everything in 2D space. Canvas items are laid out in a tree; children inherit and extend their parent's transform. **CanvasItem** is extended by :ref:`Control` for GUI-related nodes, and by :ref:`Node2D` for 2D game objects. -Any **CanvasItem** can draw. For this, :ref:`queue_redraw` is called by the engine, then :ref:`NOTIFICATION_DRAW` will be received on idle time to request a redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the **CanvasItem** are provided (see ``draw_*`` functions). However, they can only be used inside :ref:`_draw`, its corresponding :ref:`Object._notification` or methods connected to the :ref:`draw` signal. +Any **CanvasItem** can draw. For this, :ref:`queue_redraw()` is called by the engine, then :ref:`NOTIFICATION_DRAW` will be received on idle time to request a redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the **CanvasItem** are provided (see ``draw_*`` functions). However, they can only be used inside :ref:`_draw()`, its corresponding :ref:`Object._notification()` or methods connected to the :ref:`draw` signal. Canvas items are drawn in tree order on their canvas layer. By default, children are on top of their parents, so a root **CanvasItem** will be drawn behind everything. This behavior can be changed on a per-item basis. @@ -227,7 +227,7 @@ Signals **draw**\ (\ ) :ref:`πŸ”—` -Emitted when the **CanvasItem** must redraw, *after* the related :ref:`NOTIFICATION_DRAW` notification, and *before* :ref:`_draw` is called. +Emitted when the **CanvasItem** must redraw, *after* the related :ref:`NOTIFICATION_DRAW` notification, and *before* :ref:`_draw()` is called. \ **Note:** Deferred connections do not allow drawing through the ``draw_*`` methods. @@ -241,7 +241,7 @@ Emitted when the **CanvasItem** must redraw, *after* the related :ref:`NOTIFICAT **hidden**\ (\ ) :ref:`πŸ”—` -Emitted when the **CanvasItem** is hidden, i.e. it's no longer visible in the tree (see :ref:`is_visible_in_tree`). +Emitted when the **CanvasItem** is hidden, i.e. it's no longer visible in the tree (see :ref:`is_visible_in_tree()`). .. rst-class:: classref-item-separator @@ -265,7 +265,7 @@ Emitted when the **CanvasItem**'s boundaries (position or size) change, or when **visibility_changed**\ (\ ) :ref:`πŸ”—` -Emitted when the **CanvasItem**'s visibility changes, either because its own :ref:`visible` property changed or because its visibility in the tree changed (see :ref:`is_visible_in_tree`). +Emitted when the **CanvasItem**'s visibility changes, either because its own :ref:`visible` property changed or because its visibility in the tree changed (see :ref:`is_visible_in_tree()`). .. rst-class:: classref-section-separator @@ -461,7 +461,7 @@ Constants **NOTIFICATION_TRANSFORM_CHANGED** = ``2000`` :ref:`πŸ”—` -The **CanvasItem**'s global transform has changed. This notification is only received if enabled by :ref:`set_notify_transform`. +The **CanvasItem**'s global transform has changed. This notification is only received if enabled by :ref:`set_notify_transform()`. .. _class_CanvasItem_constant_NOTIFICATION_LOCAL_TRANSFORM_CHANGED: @@ -469,7 +469,7 @@ The **CanvasItem**'s global transform has changed. This notification is only rec **NOTIFICATION_LOCAL_TRANSFORM_CHANGED** = ``35`` :ref:`πŸ”—` -The **CanvasItem**'s local transform has changed. This notification is only received if enabled by :ref:`set_notify_local_transform`. +The **CanvasItem**'s local transform has changed. This notification is only received if enabled by :ref:`set_notify_local_transform()`. .. _class_CanvasItem_constant_NOTIFICATION_DRAW: @@ -477,7 +477,7 @@ The **CanvasItem**'s local transform has changed. This notification is only rece **NOTIFICATION_DRAW** = ``30`` :ref:`πŸ”—` -The **CanvasItem** is requested to draw (see :ref:`_draw`). +The **CanvasItem** is requested to draw (see :ref:`_draw()`). .. _class_CanvasItem_constant_NOTIFICATION_VISIBILITY_CHANGED: @@ -603,7 +603,7 @@ The color applied to this **CanvasItem**. This property does affect child **Canv The color applied to this **CanvasItem**. This property does **not** affect child **CanvasItem**\ s, unlike :ref:`modulate` which affects both the node itself and its children. -\ **Note:** Internal children (e.g. sliders in :ref:`ColorPicker` or tab bar in :ref:`TabContainer`) are also not affected by this property (see ``include_internal`` parameter of :ref:`Node.get_child` and other similar methods). +\ **Note:** Internal children (e.g. sliders in :ref:`ColorPicker` or tab bar in :ref:`TabContainer`) are also not affected by this property (see ``include_internal`` parameter of :ref:`Node.get_child()` and other similar methods). .. rst-class:: classref-item-separator @@ -722,7 +722,7 @@ The rendering layer in which this **CanvasItem** is rendered by :ref:`Viewport`\ ) - :ref:`bool` **is_visible**\ (\ ) -If ``true``, this **CanvasItem** may be drawn. Whether this **CanvasItem** is actually drawn depends on the visibility of all of its **CanvasItem** ancestors. In other words: this **CanvasItem** will be drawn when :ref:`is_visible_in_tree` returns ``true`` and all **CanvasItem** ancestors share at least one :ref:`visibility_layer` with this **CanvasItem**. +If ``true``, this **CanvasItem** may be drawn. Whether this **CanvasItem** is actually drawn depends on the visibility of all of its **CanvasItem** ancestors. In other words: this **CanvasItem** will be drawn when :ref:`is_visible_in_tree()` returns ``true`` and all **CanvasItem** ancestors share at least one :ref:`visibility_layer` with this **CanvasItem**. \ **Note:** For controls that inherit :ref:`Popup`, the correct way to make them visible is to call one of the multiple ``popup*()`` functions instead. @@ -798,9 +798,9 @@ Method Descriptions |void| **_draw**\ (\ ) |virtual| :ref:`πŸ”—` -Called when **CanvasItem** has been requested to redraw (after :ref:`queue_redraw` is called, either manually or by the engine). +Called when **CanvasItem** has been requested to redraw (after :ref:`queue_redraw()` is called, either manually or by the engine). -Corresponds to the :ref:`NOTIFICATION_DRAW` notification in :ref:`Object._notification`. +Corresponds to the :ref:`NOTIFICATION_DRAW` notification in :ref:`Object._notification()`. .. rst-class:: classref-item-separator @@ -824,7 +824,7 @@ Subsequent drawing commands will be ignored unless they fall within the specifie |void| **draw_arc**\ (\ center\: :ref:`Vector2`, radius\: :ref:`float`, start_angle\: :ref:`float`, end_angle\: :ref:`float`, point_count\: :ref:`int`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws an unfilled arc between the given angles with a uniform ``color`` and ``width`` and optional antialiasing (supported only for positive ``width``). The larger the value of ``point_count``, the smoother the curve. See also :ref:`draw_circle`. +Draws an unfilled arc between the given angles with a uniform ``color`` and ``width`` and optional antialiasing (supported only for positive ``width``). The larger the value of ``point_count``, the smoother the curve. See also :ref:`draw_circle()`. If ``width`` is negative, it will be ignored and the arc will be drawn using :ref:`RenderingServer.PRIMITIVE_LINE_STRIP`. This means that when the CanvasItem is scaled, the arc will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. @@ -864,7 +864,7 @@ Draws a string first character outline using a custom font. |void| **draw_circle**\ (\ position\: :ref:`Vector2`, radius\: :ref:`float`, color\: :ref:`Color`, filled\: :ref:`bool` = true, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws a circle. See also :ref:`draw_arc`, :ref:`draw_polyline`, and :ref:`draw_polygon`. +Draws a circle. See also :ref:`draw_arc()`, :ref:`draw_polyline()`, and :ref:`draw_polygon()`. If ``filled`` is ``true``, the circle will be filled with the ``color`` specified. If ``filled`` is ``false``, the circle will be drawn as a stroke with the ``color`` and ``width`` specified. @@ -884,9 +884,9 @@ If ``antialiased`` is ``true``, half transparent "feathers" will be attached to |void| **draw_colored_polygon**\ (\ points\: :ref:`PackedVector2Array`, color\: :ref:`Color`, uvs\: :ref:`PackedVector2Array` = PackedVector2Array(), texture\: :ref:`Texture2D` = null\ ) :ref:`πŸ”—` -Draws a colored polygon of any number of points, convex or concave. Unlike :ref:`draw_polygon`, a single color must be specified for the whole polygon. +Draws a colored polygon of any number of points, convex or concave. Unlike :ref:`draw_polygon()`, a single color must be specified for the whole polygon. -\ **Note:** If you frequently redraw the same polygon with a large number of vertices, consider pre-calculating the triangulation with :ref:`Geometry2D.triangulate_polygon` and using :ref:`draw_mesh`, :ref:`draw_multimesh`, or :ref:`RenderingServer.canvas_item_add_triangle_array`. +\ **Note:** If you frequently redraw the same polygon with a large number of vertices, consider pre-calculating the triangulation with :ref:`Geometry2D.triangulate_polygon()` and using :ref:`draw_mesh()`, :ref:`draw_multimesh()`, or :ref:`RenderingServer.canvas_item_add_triangle_array()`. .. rst-class:: classref-item-separator @@ -898,10 +898,12 @@ Draws a colored polygon of any number of points, convex or concave. Unlike :ref: |void| **draw_dashed_line**\ (\ from\: :ref:`Vector2`, to\: :ref:`Vector2`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, dash\: :ref:`float` = 2.0, aligned\: :ref:`bool` = true, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws a dashed line from a 2D point to another, with a given color and width. See also :ref:`draw_multiline` and :ref:`draw_polyline`. +Draws a dashed line from a 2D point to another, with a given color and width. See also :ref:`draw_line()`, :ref:`draw_multiline()`, and :ref:`draw_polyline()`. If ``width`` is negative, then a two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the line parts will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. +\ ``dash`` is the length of each dash in pixels, with the gap between each dash being the same length. If ``aligned`` is ``true``, the length of the first and last dashes may be shortened or lengthened to allow the line to begin and end at the precise points defined by ``from`` and ``to``. Both ends are always symmetrical when ``aligned`` is ``true``. If ``aligned`` is ``false``, all dashes will have the same length, but the line may appear incomplete at the end due to the dash length not dividing evenly into the line length. Only full dashes are drawn when ``aligned`` is ``false``. + If ``antialiased`` is ``true``, half transparent "feathers" will be attached to the boundary, making outlines smooth. \ **Note:** ``antialiased`` is only effective if ``width`` is greater than ``0.0``. @@ -916,7 +918,7 @@ If ``antialiased`` is ``true``, half transparent "feathers" will be attached to |void| **draw_end_animation**\ (\ ) :ref:`πŸ”—` -After submitting all animations slices via :ref:`draw_animation_slice`, this function can be used to revert drawing to its default state (all subsequent drawing commands will be visible). If you don't care about this particular use case, usage of this function after submitting the slices is not required. +After submitting all animations slices via :ref:`draw_animation_slice()`, this function can be used to revert drawing to its default state (all subsequent drawing commands will be visible). If you don't care about this particular use case, usage of this function after submitting the slices is not required. .. rst-class:: classref-item-separator @@ -949,7 +951,7 @@ Texture is drawn using the following blend operation, blend mode of the :ref:`Ca |void| **draw_line**\ (\ from\: :ref:`Vector2`, to\: :ref:`Vector2`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws a line from a 2D point to another, with a given color and width. It can be optionally antialiased. See also :ref:`draw_multiline` and :ref:`draw_polyline`. +Draws a line from a 2D point to another, with a given color and width. It can be optionally antialiased. See also :ref:`draw_dashed_line()`, :ref:`draw_multiline()`, and :ref:`draw_polyline()`. If ``width`` is negative, then a two-point primitive will be drawn instead of a four-point one. This means that when the CanvasItem is scaled, the line will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. @@ -991,7 +993,7 @@ Value of the ``pixel_range`` should the same that was used during distance field |void| **draw_multiline**\ (\ points\: :ref:`PackedVector2Array`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws multiple disconnected lines with a uniform ``width`` and ``color``. Each line is defined by two consecutive points from ``points`` array, i.e. i-th segment consists of ``points[2 * i]``, ``points[2 * i + 1]`` endpoints. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line` calls. To draw interconnected lines, use :ref:`draw_polyline` instead. +Draws multiple disconnected lines with a uniform ``width`` and ``color``. Each line is defined by two consecutive points from ``points`` array, i.e. i-th segment consists of ``points[2 * i]``, ``points[2 * i + 1]`` endpoints. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line()` calls. To draw interconnected lines, use :ref:`draw_polyline()` instead. If ``width`` is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. @@ -1007,7 +1009,7 @@ If ``width`` is negative, then two-point primitives will be drawn instead of a f |void| **draw_multiline_colors**\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws multiple disconnected lines with a uniform ``width`` and segment-by-segment coloring. Each segment is defined by two consecutive points from ``points`` array and a corresponding color from ``colors`` array, i.e. i-th segment consists of ``points[2 * i]``, ``points[2 * i + 1]`` endpoints and has ``colors[i]`` color. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line` calls. To draw interconnected lines, use :ref:`draw_polyline_colors` instead. +Draws multiple disconnected lines with a uniform ``width`` and segment-by-segment coloring. Each segment is defined by two consecutive points from ``points`` array and a corresponding color from ``colors`` array, i.e. i-th segment consists of ``points[2 * i]``, ``points[2 * i + 1]`` endpoints and has ``colors[i]`` color. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line()` calls. To draw interconnected lines, use :ref:`draw_polyline_colors()` instead. If ``width`` is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. @@ -1059,9 +1061,9 @@ Draws a :ref:`MultiMesh` in 2D with the provided texture. See : |void| **draw_polygon**\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, uvs\: :ref:`PackedVector2Array` = PackedVector2Array(), texture\: :ref:`Texture2D` = null\ ) :ref:`πŸ”—` -Draws a solid polygon of any number of points, convex or concave. Unlike :ref:`draw_colored_polygon`, each point's color can be changed individually. See also :ref:`draw_polyline` and :ref:`draw_polyline_colors`. If you need more flexibility (such as being able to use bones), use :ref:`RenderingServer.canvas_item_add_triangle_array` instead. +Draws a solid polygon of any number of points, convex or concave. Unlike :ref:`draw_colored_polygon()`, each point's color can be changed individually. See also :ref:`draw_polyline()` and :ref:`draw_polyline_colors()`. If you need more flexibility (such as being able to use bones), use :ref:`RenderingServer.canvas_item_add_triangle_array()` instead. -\ **Note:** If you frequently redraw the same polygon with a large number of vertices, consider pre-calculating the triangulation with :ref:`Geometry2D.triangulate_polygon` and using :ref:`draw_mesh`, :ref:`draw_multimesh`, or :ref:`RenderingServer.canvas_item_add_triangle_array`. +\ **Note:** If you frequently redraw the same polygon with a large number of vertices, consider pre-calculating the triangulation with :ref:`Geometry2D.triangulate_polygon()` and using :ref:`draw_mesh()`, :ref:`draw_multimesh()`, or :ref:`RenderingServer.canvas_item_add_triangle_array()`. .. rst-class:: classref-item-separator @@ -1073,7 +1075,7 @@ Draws a solid polygon of any number of points, convex or concave. Unlike :ref:`d |void| **draw_polyline**\ (\ points\: :ref:`PackedVector2Array`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws interconnected line segments with a uniform ``color`` and ``width`` and optional antialiasing (supported only for positive ``width``). When drawing large amounts of lines, this is faster than using individual :ref:`draw_line` calls. To draw disconnected lines, use :ref:`draw_multiline` instead. See also :ref:`draw_polygon`. +Draws interconnected line segments with a uniform ``color`` and ``width`` and optional antialiasing (supported only for positive ``width``). When drawing large amounts of lines, this is faster than using individual :ref:`draw_line()` calls. To draw disconnected lines, use :ref:`draw_multiline()` instead. See also :ref:`draw_polygon()`. If ``width`` is negative, it will be ignored and the polyline will be drawn using :ref:`RenderingServer.PRIMITIVE_LINE_STRIP`. This means that when the CanvasItem is scaled, the polyline will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. @@ -1087,7 +1089,7 @@ If ``width`` is negative, it will be ignored and the polyline will be drawn usin |void| **draw_polyline_colors**\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws interconnected line segments with a uniform ``width``, point-by-point coloring, and optional antialiasing (supported only for positive ``width``). Colors assigned to line points match by index between ``points`` and ``colors``, i.e. each line segment is filled with a gradient between the colors of the endpoints. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line` calls. To draw disconnected lines, use :ref:`draw_multiline_colors` instead. See also :ref:`draw_polygon`. +Draws interconnected line segments with a uniform ``width``, point-by-point coloring, and optional antialiasing (supported only for positive ``width``). Colors assigned to line points match by index between ``points`` and ``colors``, i.e. each line segment is filled with a gradient between the colors of the endpoints. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line()` calls. To draw disconnected lines, use :ref:`draw_multiline_colors()` instead. See also :ref:`draw_polygon()`. If ``width`` is negative, it will be ignored and the polyline will be drawn using :ref:`RenderingServer.PRIMITIVE_LINE_STRIP`. This means that when the CanvasItem is scaled, the polyline will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. @@ -1101,7 +1103,7 @@ If ``width`` is negative, it will be ignored and the polyline will be drawn usin |void| **draw_primitive**\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, uvs\: :ref:`PackedVector2Array`, texture\: :ref:`Texture2D` = null\ ) :ref:`πŸ”—` -Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad. If 0 points or more than 4 points are specified, nothing will be drawn and an error message will be printed. See also :ref:`draw_line`, :ref:`draw_polyline`, :ref:`draw_polygon`, and :ref:`draw_rect`. +Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad. If 0 points or more than 4 points are specified, nothing will be drawn and an error message will be printed. See also :ref:`draw_line()`, :ref:`draw_polyline()`, :ref:`draw_polygon()`, and :ref:`draw_rect()`. .. rst-class:: classref-item-separator @@ -1113,7 +1115,7 @@ Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for |void| **draw_rect**\ (\ rect\: :ref:`Rect2`, color\: :ref:`Color`, filled\: :ref:`bool` = true, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws a rectangle. If ``filled`` is ``true``, the rectangle will be filled with the ``color`` specified. If ``filled`` is ``false``, the rectangle will be drawn as a stroke with the ``color`` and ``width`` specified. See also :ref:`draw_texture_rect`. +Draws a rectangle. If ``filled`` is ``true``, the rectangle will be filled with the ``color`` specified. If ``filled`` is ``false``, the rectangle will be drawn as a stroke with the ``color`` and ``width`` specified. See also :ref:`draw_texture_rect()`. If ``width`` is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. @@ -1186,7 +1188,7 @@ Draws ``text`` using the specified ``font`` at the ``pos`` (bottom-left corner u -See also :ref:`Font.draw_string`. +See also :ref:`Font.draw_string()`. .. rst-class:: classref-item-separator @@ -1234,7 +1236,7 @@ Draws a texture at a given position. |void| **draw_texture_rect**\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, tile\: :ref:`bool`, modulate\: :ref:`Color` = Color(1, 1, 1, 1), transpose\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws a textured rectangle at a given position, optionally modulated by a color. If ``transpose`` is ``true``, the texture will have its X and Y coordinates swapped. See also :ref:`draw_rect` and :ref:`draw_texture_rect_region`. +Draws a textured rectangle at a given position, optionally modulated by a color. If ``transpose`` is ``true``, the texture will have its X and Y coordinates swapped. See also :ref:`draw_rect()` and :ref:`draw_texture_rect_region()`. .. rst-class:: classref-item-separator @@ -1246,7 +1248,7 @@ Draws a textured rectangle at a given position, optionally modulated by a color. |void| **draw_texture_rect_region**\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, src_rect\: :ref:`Rect2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1), transpose\: :ref:`bool` = false, clip_uv\: :ref:`bool` = true\ ) :ref:`πŸ”—` -Draws a textured rectangle from a texture's region (specified by ``src_rect``) at a given position, optionally modulated by a color. If ``transpose`` is ``true``, the texture will have its X and Y coordinates swapped. See also :ref:`draw_texture_rect`. +Draws a textured rectangle from a texture's region (specified by ``src_rect``) at a given position, optionally modulated by a color. If ``transpose`` is ``true``, the texture will have its X and Y coordinates swapped. See also :ref:`draw_texture_rect()`. .. rst-class:: classref-item-separator @@ -1320,7 +1322,7 @@ Returns the transform from the coordinate system of the canvas, this item is in, Returns the mouse's position in the :ref:`CanvasLayer` that this **CanvasItem** is in using the coordinate system of the :ref:`CanvasLayer`. -\ **Note:** For screen-space coordinates (e.g. when using a non-embedded :ref:`Popup`), you can use :ref:`DisplayServer.mouse_get_position`. +\ **Note:** For screen-space coordinates (e.g. when using a non-embedded :ref:`Popup`), you can use :ref:`DisplayServer.mouse_get_position()`. .. rst-class:: classref-item-separator @@ -1382,7 +1384,7 @@ Returns the mouse's position in this **CanvasItem** using the local coordinate s Returns the transform of this **CanvasItem** in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins. -Equals to :ref:`get_global_transform` if the window is embedded (see :ref:`Viewport.gui_embed_subwindows`). +Equals to :ref:`get_global_transform()` if the window is embedded (see :ref:`Viewport.gui_embed_subwindows`). .. rst-class:: classref-item-separator @@ -1490,7 +1492,7 @@ Returns ``true`` if global transform notifications are communicated to children. :ref:`bool` **is_visible_in_tree**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the node is present in the :ref:`SceneTree`, its :ref:`visible` property is ``true`` and all its ancestors are also visible. If any ancestor is hidden, this node will not be visible in the scene tree, and is therefore not drawn (see :ref:`_draw`). +Returns ``true`` if the node is present in the :ref:`SceneTree`, its :ref:`visible` property is ``true`` and all its ancestors are also visible. If any ancestor is hidden, this node will not be visible in the scene tree, and is therefore not drawn (see :ref:`_draw()`). Visibility is checked only in parent nodes that inherit from **CanvasItem**, :ref:`CanvasLayer`, and :ref:`Window`. If the parent is of any other type (such as :ref:`Node`, :ref:`AnimationPlayer`, or :ref:`Node3D`), it is assumed to be visible. @@ -1508,7 +1510,7 @@ Visibility is checked only in parent nodes that inherit from **CanvasItem**, :re Transforms ``viewport_point`` from the viewport's coordinates to this node's local coordinates. -For the opposite operation, use :ref:`get_global_transform_with_canvas`. +For the opposite operation, use :ref:`get_global_transform_with_canvas()`. :: @@ -1550,7 +1552,7 @@ Internally, the node is moved to the bottom of parent's child list. The method h |void| **queue_redraw**\ (\ ) :ref:`πŸ”—` -Queues the **CanvasItem** to redraw. During idle time, if **CanvasItem** is visible, :ref:`NOTIFICATION_DRAW` is sent and :ref:`_draw` is called. This only occurs **once** per frame, even if this method has been called multiple times. +Queues the **CanvasItem** to redraw. During idle time, if **CanvasItem** is visible, :ref:`NOTIFICATION_DRAW` is sent and :ref:`_draw()` is called. This only occurs **once** per frame, even if this method has been called multiple times. .. rst-class:: classref-item-separator @@ -1562,7 +1564,7 @@ Queues the **CanvasItem** to redraw. During idle time, if **CanvasItem** is visi |void| **set_instance_shader_parameter**\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) :ref:`πŸ”—` -Set the value of a shader uniform for this instance only (`per-instance uniform <../tutorials/shaders/shader_reference/shading_language.html#per-instance-uniforms>`__). See also :ref:`ShaderMaterial.set_shader_parameter` to assign a uniform on all instances using the same :ref:`ShaderMaterial`. +Set the value of a shader uniform for this instance only (`per-instance uniform <../tutorials/shaders/shader_reference/shading_language.html#per-instance-uniforms>`__). See also :ref:`ShaderMaterial.set_shader_parameter()` to assign a uniform on all instances using the same :ref:`ShaderMaterial`. \ **Note:** For a shader uniform to be assignable on a per-instance basis, it *must* be defined with ``instance uniform ...`` rather than ``uniform ...`` in the shader code. diff --git a/classes/class_characterbody2d.rst b/classes/class_characterbody2d.rst index 078c9009f..f6466d0d7 100644 --- a/classes/class_characterbody2d.rst +++ b/classes/class_characterbody2d.rst @@ -19,7 +19,7 @@ A 2D physics body specialized for characters moved by script. Description ----------- -**CharacterBody2D** is a specialized class for physics bodies that are meant to be user-controlled. They are not affected by physics at all, but they affect other physics bodies in their path. They are mainly used to provide high-level API to move objects with wall and slope detection (:ref:`move_and_slide` method) in addition to the general collision detection provided by :ref:`PhysicsBody2D.move_and_collide`. This makes it useful for highly configurable physics bodies that must move in specific ways and collide with the world, as is often the case with user-controlled characters. +**CharacterBody2D** is a specialized class for physics bodies that are meant to be user-controlled. They are not affected by physics at all, but they affect other physics bodies in their path. They are mainly used to provide high-level API to move objects with wall and slope detection (:ref:`move_and_slide()` method) in addition to the general collision detection provided by :ref:`PhysicsBody2D.move_and_collide()`. This makes it useful for highly configurable physics bodies that must move in specific ways and collide with the world, as is often the case with user-controlled characters. For game objects that don't require complex movement or collision detection, such as moving platforms, :ref:`AnimatableBody2D` is simpler to configure. @@ -243,7 +243,7 @@ If ``true``, the body will always move at the same speed on the ground no matter - |void| **set_floor_max_angle**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_floor_max_angle**\ (\ ) -Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling :ref:`move_and_slide`. The default value equals 45 degrees. +Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling :ref:`move_and_slide()`. The default value equals 45 degrees. .. rst-class:: classref-item-separator @@ -260,9 +260,9 @@ Maximum angle (in radians) where a slope is still considered a floor (or a ceili - |void| **set_floor_snap_length**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_floor_snap_length**\ (\ ) -Sets a snapping distance. When set to a value different from ``0.0``, the body is kept attached to slopes when calling :ref:`move_and_slide`. The snapping vector is determined by the given distance along the opposite direction of the :ref:`up_direction`. +Sets a snapping distance. When set to a value different from ``0.0``, the body is kept attached to slopes when calling :ref:`move_and_slide()`. The snapping vector is determined by the given distance along the opposite direction of the :ref:`up_direction`. -As long as the snapping vector is in contact with the ground and the body moves against :ref:`up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along :ref:`up_direction`, meaning it contains vertical rising velocity, so it will be able to detach from the ground when jumping or when the body is pushed up by something. If you want to apply a snap without taking into account the velocity, use :ref:`apply_floor_snap`. +As long as the snapping vector is in contact with the ground and the body moves against :ref:`up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along :ref:`up_direction`, meaning it contains vertical rising velocity, so it will be able to detach from the ground when jumping or when the body is pushed up by something. If you want to apply a snap without taking into account the velocity, use :ref:`apply_floor_snap()`. .. rst-class:: classref-item-separator @@ -279,7 +279,7 @@ As long as the snapping vector is in contact with the ground and the body moves - |void| **set_floor_stop_on_slope_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_floor_stop_on_slope_enabled**\ (\ ) -If ``true``, the body will not slide on slopes when calling :ref:`move_and_slide` when the body is standing still. +If ``true``, the body will not slide on slopes when calling :ref:`move_and_slide()` when the body is standing still. If ``false``, the body will slide on floor's slopes when :ref:`velocity` applies a downward force. @@ -298,7 +298,7 @@ If ``false``, the body will slide on floor's slopes when :ref:`velocity`\ ) - :ref:`int` **get_max_slides**\ (\ ) -Maximum number of times the body can change direction before it stops when calling :ref:`move_and_slide`. +Maximum number of times the body can change direction before it stops when calling :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -315,7 +315,7 @@ Maximum number of times the body can change direction before it stops when calli - |void| **set_motion_mode**\ (\ value\: :ref:`MotionMode`\ ) - :ref:`MotionMode` **get_motion_mode**\ (\ ) -Sets the motion mode which defines the behavior of :ref:`move_and_slide`. See :ref:`MotionMode` constants for available modes. +Sets the motion mode which defines the behavior of :ref:`move_and_slide()`. See :ref:`MotionMode` constants for available modes. .. rst-class:: classref-item-separator @@ -383,7 +383,7 @@ Collision layers that will be included for detecting wall bodies that will act a - |void| **set_safe_margin**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_safe_margin**\ (\ ) -Extra margin used for collision recovery when calling :ref:`move_and_slide`. +Extra margin used for collision recovery when calling :ref:`move_and_slide()`. If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion. @@ -423,7 +423,7 @@ If ``true``, during a jump against the ceiling, the body will slide, if ``false` - |void| **set_up_direction**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_up_direction**\ (\ ) -Vector pointing upwards, used to determine what is a wall and what is a floor (or a ceiling) when calling :ref:`move_and_slide`. Defaults to :ref:`Vector2.UP`. As the vector will be normalized it can't be equal to :ref:`Vector2.ZERO`, if you want all collisions to be reported as walls, consider using :ref:`MOTION_MODE_FLOATING` as :ref:`motion_mode`. +Vector pointing upwards, used to determine what is a wall and what is a floor (or a ceiling) when calling :ref:`move_and_slide()`. Defaults to :ref:`Vector2.UP`. As the vector will be normalized it can't be equal to :ref:`Vector2.ZERO`, if you want all collisions to be reported as walls, consider using :ref:`MOTION_MODE_FLOATING` as :ref:`motion_mode`. .. rst-class:: classref-item-separator @@ -440,7 +440,7 @@ Vector pointing upwards, used to determine what is a wall and what is a floor (o - |void| **set_velocity**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_velocity**\ (\ ) -Current velocity vector in pixels per second, used and modified during calls to :ref:`move_and_slide`. +Current velocity vector in pixels per second, used and modified during calls to :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -474,7 +474,7 @@ Method Descriptions |void| **apply_floor_snap**\ (\ ) :ref:`πŸ”—` -Allows to manually apply a snap to the floor regardless of the body's velocity. This function does nothing when :ref:`is_on_floor` returns ``true``. +Allows to manually apply a snap to the floor regardless of the body's velocity. This function does nothing when :ref:`is_on_floor()` returns ``true``. .. rst-class:: classref-item-separator @@ -486,7 +486,7 @@ Allows to manually apply a snap to the floor regardless of the body's velocity. :ref:`float` **get_floor_angle**\ (\ up_direction\: :ref:`Vector2` = Vector2(0, -1)\ ) |const| :ref:`πŸ”—` -Returns the floor's collision angle at the last collision point according to ``up_direction``, which is :ref:`Vector2.UP` by default. This value is always positive and only valid after calling :ref:`move_and_slide` and when :ref:`is_on_floor` returns ``true``. +Returns the floor's collision angle at the last collision point according to ``up_direction``, which is :ref:`Vector2.UP` by default. This value is always positive and only valid after calling :ref:`move_and_slide()` and when :ref:`is_on_floor()` returns ``true``. .. rst-class:: classref-item-separator @@ -498,7 +498,7 @@ Returns the floor's collision angle at the last collision point according to ``u :ref:`Vector2` **get_floor_normal**\ (\ ) |const| :ref:`πŸ”—` -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``. +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. @@ -512,7 +512,7 @@ Returns the collision normal of the floor at the last collision point. Only vali :ref:`Vector2` **get_last_motion**\ (\ ) |const| :ref:`πŸ”—` -Returns the last motion applied to the **CharacterBody2D** during the last call to :ref:`move_and_slide`. The movement can be split into multiple motions when sliding occurs, and this method return the last one, which is useful to retrieve the current direction of the movement. +Returns the last motion applied to the **CharacterBody2D** during the last call to :ref:`move_and_slide()`. The movement can be split into multiple motions when sliding occurs, and this method return the last one, which is useful to retrieve the current direction of the movement. .. rst-class:: classref-item-separator @@ -524,7 +524,7 @@ Returns the last motion applied to the **CharacterBody2D** during the last call :ref:`KinematicCollision2D` **get_last_slide_collision**\ (\ ) :ref:`πŸ”—` -Returns a :ref:`KinematicCollision2D`, which contains information about the latest collision that occurred during the last call to :ref:`move_and_slide`. +Returns a :ref:`KinematicCollision2D`, which contains information about the latest collision that occurred during the last call to :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -536,7 +536,7 @@ Returns a :ref:`KinematicCollision2D`, which contain :ref:`Vector2` **get_platform_velocity**\ (\ ) |const| :ref:`πŸ”—` -Returns the linear velocity of the platform at the last collision point. Only valid after calling :ref:`move_and_slide`. +Returns the linear velocity of the platform at the last collision point. Only valid after calling :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -548,7 +548,7 @@ Returns the linear velocity of the platform at the last collision point. Only va :ref:`Vector2` **get_position_delta**\ (\ ) |const| :ref:`πŸ”—` -Returns the travel (position delta) that occurred during the last call to :ref:`move_and_slide`. +Returns the travel (position delta) that occurred during the last call to :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -560,7 +560,7 @@ Returns the travel (position delta) that occurred during the last call to :ref:` :ref:`Vector2` **get_real_velocity**\ (\ ) |const| :ref:`πŸ”—` -Returns the current real velocity since the last call to :ref:`move_and_slide`. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to :ref:`velocity` which returns the requested velocity. +Returns the current real velocity since the last call to :ref:`move_and_slide()`. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to :ref:`velocity` which returns the requested velocity. .. rst-class:: classref-item-separator @@ -572,7 +572,7 @@ Returns the current real velocity since the last call to :ref:`move_and_slide` **get_slide_collision**\ (\ slide_idx\: :ref:`int`\ ) :ref:`πŸ”—` -Returns a :ref:`KinematicCollision2D`, which contains information about a collision that occurred during the last call to :ref:`move_and_slide`. Since the body can collide several times in a single call to :ref:`move_and_slide`, you must specify the index of the collision in the range 0 to (:ref:`get_slide_collision_count` - 1). +Returns a :ref:`KinematicCollision2D`, which contains information about a collision that occurred during the last call to :ref:`move_and_slide()`. Since the body can collide several times in a single call to :ref:`move_and_slide()`, you must specify the index of the collision in the range 0 to (:ref:`get_slide_collision_count()` - 1). \ **Example:** Iterate through the collisions with a ``for`` loop: @@ -605,7 +605,7 @@ Returns a :ref:`KinematicCollision2D`, which contain :ref:`int` **get_slide_collision_count**\ (\ ) |const| :ref:`πŸ”—` -Returns the number of times the body collided and changed direction during the last call to :ref:`move_and_slide`. +Returns the number of times the body collided and changed direction during the last call to :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -617,7 +617,7 @@ Returns the number of times the body collided and changed direction during the l :ref:`Vector2` **get_wall_normal**\ (\ ) |const| :ref:`πŸ”—` -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``. +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. @@ -631,7 +631,7 @@ Returns the collision normal of the wall at the last collision point. Only valid :ref:`bool` **is_on_ceiling**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided with the ceiling on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "ceiling" or not. +Returns ``true`` if the body collided with the ceiling on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "ceiling" or not. .. rst-class:: classref-item-separator @@ -643,7 +643,7 @@ Returns ``true`` if the body collided with the ceiling on the last call of :ref: :ref:`bool` **is_on_ceiling_only**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided only with the ceiling on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "ceiling" or not. +Returns ``true`` if the body collided only with the ceiling on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "ceiling" or not. .. rst-class:: classref-item-separator @@ -655,7 +655,7 @@ Returns ``true`` if the body collided only with the ceiling on the last call of :ref:`bool` **is_on_floor**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided with the floor on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "floor" or not. +Returns ``true`` if the body collided with the floor on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "floor" or not. .. rst-class:: classref-item-separator @@ -667,7 +667,7 @@ Returns ``true`` if the body collided with the floor on the last call of :ref:`m :ref:`bool` **is_on_floor_only**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided only with the floor on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "floor" or not. +Returns ``true`` if the body collided only with the floor on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "floor" or not. .. rst-class:: classref-item-separator @@ -679,7 +679,7 @@ Returns ``true`` if the body collided only with the floor on the last call of :r :ref:`bool` **is_on_wall**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided with a wall on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "wall" or not. +Returns ``true`` if the body collided with a wall on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "wall" or not. .. rst-class:: classref-item-separator @@ -691,7 +691,7 @@ Returns ``true`` if the body collided with a wall on the last call of :ref:`move :ref:`bool` **is_on_wall_only**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided only with a wall on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "wall" or not. +Returns ``true`` if the body collided only with a wall on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "wall" or not. .. rst-class:: classref-item-separator @@ -705,7 +705,7 @@ Returns ``true`` if the body collided only with a wall on the last call of :ref: Moves the body based on :ref:`velocity`. If the body collides with another, it will slide along the other body (by default only on floor) rather than stop immediately. If the other body is a **CharacterBody2D** or :ref:`RigidBody2D`, it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. -Modifies :ref:`velocity` if a slide collision occurred. To get the latest collision call :ref:`get_last_slide_collision`, for detailed information about collisions that occurred, use :ref:`get_slide_collision`. +Modifies :ref:`velocity` if a slide collision occurred. To get the latest collision call :ref:`get_last_slide_collision()`, for detailed information about collisions that occurred, use :ref:`get_slide_collision()`. When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions. diff --git a/classes/class_characterbody3d.rst b/classes/class_characterbody3d.rst index 7ea1e95f4..fe884d888 100644 --- a/classes/class_characterbody3d.rst +++ b/classes/class_characterbody3d.rst @@ -19,7 +19,7 @@ A 3D physics body specialized for characters moved by script. Description ----------- -**CharacterBody3D** is a specialized class for physics bodies that are meant to be user-controlled. They are not affected by physics at all, but they affect other physics bodies in their path. They are mainly used to provide high-level API to move objects with wall and slope detection (:ref:`move_and_slide` method) in addition to the general collision detection provided by :ref:`PhysicsBody3D.move_and_collide`. This makes it useful for highly configurable physics bodies that must move in specific ways and collide with the world, as is often the case with user-controlled characters. +**CharacterBody3D** is a specialized class for physics bodies that are meant to be user-controlled. They are not affected by physics at all, but they affect other physics bodies in their path. They are mainly used to provide high-level API to move objects with wall and slope detection (:ref:`move_and_slide()` method) in addition to the general collision detection provided by :ref:`PhysicsBody3D.move_and_collide()`. This makes it useful for highly configurable physics bodies that must move in specific ways and collide with the world, as is often the case with user-controlled characters. For game objects that don't require complex movement or collision detection, such as moving platforms, :ref:`AnimatableBody3D` is simpler to configure. @@ -247,7 +247,7 @@ If ``true``, the body will always move at the same speed on the ground no matter - |void| **set_floor_max_angle**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_floor_max_angle**\ (\ ) -Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling :ref:`move_and_slide`. The default value equals 45 degrees. +Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling :ref:`move_and_slide()`. The default value equals 45 degrees. .. rst-class:: classref-item-separator @@ -264,9 +264,9 @@ Maximum angle (in radians) where a slope is still considered a floor (or a ceili - |void| **set_floor_snap_length**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_floor_snap_length**\ (\ ) -Sets a snapping distance. When set to a value different from ``0.0``, the body is kept attached to slopes when calling :ref:`move_and_slide`. The snapping vector is determined by the given distance along the opposite direction of the :ref:`up_direction`. +Sets a snapping distance. When set to a value different from ``0.0``, the body is kept attached to slopes when calling :ref:`move_and_slide()`. The snapping vector is determined by the given distance along the opposite direction of the :ref:`up_direction`. -As long as the snapping vector is in contact with the ground and the body moves against :ref:`up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along :ref:`up_direction`, meaning it contains vertical rising velocity, so it will be able to detach from the ground when jumping or when the body is pushed up by something. If you want to apply a snap without taking into account the velocity, use :ref:`apply_floor_snap`. +As long as the snapping vector is in contact with the ground and the body moves against :ref:`up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along :ref:`up_direction`, meaning it contains vertical rising velocity, so it will be able to detach from the ground when jumping or when the body is pushed up by something. If you want to apply a snap without taking into account the velocity, use :ref:`apply_floor_snap()`. .. rst-class:: classref-item-separator @@ -283,7 +283,7 @@ As long as the snapping vector is in contact with the ground and the body moves - |void| **set_floor_stop_on_slope_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_floor_stop_on_slope_enabled**\ (\ ) -If ``true``, the body will not slide on slopes when calling :ref:`move_and_slide` when the body is standing still. +If ``true``, the body will not slide on slopes when calling :ref:`move_and_slide()` when the body is standing still. If ``false``, the body will slide on floor's slopes when :ref:`velocity` applies a downward force. @@ -302,7 +302,7 @@ If ``false``, the body will slide on floor's slopes when :ref:`velocity`\ ) - :ref:`int` **get_max_slides**\ (\ ) -Maximum number of times the body can change direction before it stops when calling :ref:`move_and_slide`. +Maximum number of times the body can change direction before it stops when calling :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -319,7 +319,7 @@ Maximum number of times the body can change direction before it stops when calli - |void| **set_motion_mode**\ (\ value\: :ref:`MotionMode`\ ) - :ref:`MotionMode` **get_motion_mode**\ (\ ) -Sets the motion mode which defines the behavior of :ref:`move_and_slide`. See :ref:`MotionMode` constants for available modes. +Sets the motion mode which defines the behavior of :ref:`move_and_slide()`. See :ref:`MotionMode` constants for available modes. .. rst-class:: classref-item-separator @@ -387,7 +387,7 @@ Collision layers that will be included for detecting wall bodies that will act a - |void| **set_safe_margin**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_safe_margin**\ (\ ) -Extra margin used for collision recovery when calling :ref:`move_and_slide`. +Extra margin used for collision recovery when calling :ref:`move_and_slide()`. If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion. @@ -427,7 +427,7 @@ If ``true``, during a jump against the ceiling, the body will slide, if ``false` - |void| **set_up_direction**\ (\ value\: :ref:`Vector3`\ ) - :ref:`Vector3` **get_up_direction**\ (\ ) -Vector pointing upwards, used to determine what is a wall and what is a floor (or a ceiling) when calling :ref:`move_and_slide`. Defaults to :ref:`Vector3.UP`. As the vector will be normalized it can't be equal to :ref:`Vector3.ZERO`, if you want all collisions to be reported as walls, consider using :ref:`MOTION_MODE_FLOATING` as :ref:`motion_mode`. +Vector pointing upwards, used to determine what is a wall and what is a floor (or a ceiling) when calling :ref:`move_and_slide()`. Defaults to :ref:`Vector3.UP`. As the vector will be normalized it can't be equal to :ref:`Vector3.ZERO`, if you want all collisions to be reported as walls, consider using :ref:`MOTION_MODE_FLOATING` as :ref:`motion_mode`. .. rst-class:: classref-item-separator @@ -444,7 +444,7 @@ Vector pointing upwards, used to determine what is a wall and what is a floor (o - |void| **set_velocity**\ (\ value\: :ref:`Vector3`\ ) - :ref:`Vector3` **get_velocity**\ (\ ) -Current velocity vector (typically meters per second), used and modified during calls to :ref:`move_and_slide`. +Current velocity vector (typically meters per second), used and modified during calls to :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -478,7 +478,7 @@ Method Descriptions |void| **apply_floor_snap**\ (\ ) :ref:`πŸ”—` -Allows to manually apply a snap to the floor regardless of the body's velocity. This function does nothing when :ref:`is_on_floor` returns ``true``. +Allows to manually apply a snap to the floor regardless of the body's velocity. This function does nothing when :ref:`is_on_floor()` returns ``true``. .. rst-class:: classref-item-separator @@ -490,7 +490,7 @@ Allows to manually apply a snap to the floor regardless of the body's velocity. :ref:`float` **get_floor_angle**\ (\ up_direction\: :ref:`Vector3` = Vector3(0, 1, 0)\ ) |const| :ref:`πŸ”—` -Returns the floor's collision angle at the last collision point according to ``up_direction``, which is :ref:`Vector3.UP` by default. This value is always positive and only valid after calling :ref:`move_and_slide` and when :ref:`is_on_floor` returns ``true``. +Returns the floor's collision angle at the last collision point according to ``up_direction``, which is :ref:`Vector3.UP` by default. This value is always positive and only valid after calling :ref:`move_and_slide()` and when :ref:`is_on_floor()` returns ``true``. .. rst-class:: classref-item-separator @@ -502,7 +502,7 @@ Returns the floor's collision angle at the last collision point according to ``u :ref:`Vector3` **get_floor_normal**\ (\ ) |const| :ref:`πŸ”—` -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``. +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. @@ -516,7 +516,7 @@ Returns the collision normal of the floor at the last collision point. Only vali :ref:`Vector3` **get_last_motion**\ (\ ) |const| :ref:`πŸ”—` -Returns the last motion applied to the **CharacterBody3D** during the last call to :ref:`move_and_slide`. The movement can be split into multiple motions when sliding occurs, and this method return the last one, which is useful to retrieve the current direction of the movement. +Returns the last motion applied to the **CharacterBody3D** during the last call to :ref:`move_and_slide()`. The movement can be split into multiple motions when sliding occurs, and this method return the last one, which is useful to retrieve the current direction of the movement. .. rst-class:: classref-item-separator @@ -528,7 +528,7 @@ Returns the last motion applied to the **CharacterBody3D** during the last call :ref:`KinematicCollision3D` **get_last_slide_collision**\ (\ ) :ref:`πŸ”—` -Returns a :ref:`KinematicCollision3D`, which contains information about the latest collision that occurred during the last call to :ref:`move_and_slide`. +Returns a :ref:`KinematicCollision3D`, which contains information about the latest collision that occurred during the last call to :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -540,7 +540,7 @@ Returns a :ref:`KinematicCollision3D`, which contain :ref:`Vector3` **get_platform_angular_velocity**\ (\ ) |const| :ref:`πŸ”—` -Returns the angular velocity of the platform at the last collision point. Only valid after calling :ref:`move_and_slide`. +Returns the angular velocity of the platform at the last collision point. Only valid after calling :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -552,7 +552,7 @@ Returns the angular velocity of the platform at the last collision point. Only v :ref:`Vector3` **get_platform_velocity**\ (\ ) |const| :ref:`πŸ”—` -Returns the linear velocity of the platform at the last collision point. Only valid after calling :ref:`move_and_slide`. +Returns the linear velocity of the platform at the last collision point. Only valid after calling :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -564,7 +564,7 @@ Returns the linear velocity of the platform at the last collision point. Only va :ref:`Vector3` **get_position_delta**\ (\ ) |const| :ref:`πŸ”—` -Returns the travel (position delta) that occurred during the last call to :ref:`move_and_slide`. +Returns the travel (position delta) that occurred during the last call to :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -576,7 +576,7 @@ Returns the travel (position delta) that occurred during the last call to :ref:` :ref:`Vector3` **get_real_velocity**\ (\ ) |const| :ref:`πŸ”—` -Returns the current real velocity since the last call to :ref:`move_and_slide`. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to :ref:`velocity` which returns the requested velocity. +Returns the current real velocity since the last call to :ref:`move_and_slide()`. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to :ref:`velocity` which returns the requested velocity. .. rst-class:: classref-item-separator @@ -588,7 +588,7 @@ Returns the current real velocity since the last call to :ref:`move_and_slide` **get_slide_collision**\ (\ slide_idx\: :ref:`int`\ ) :ref:`πŸ”—` -Returns a :ref:`KinematicCollision3D`, which contains information about a collision that occurred during the last call to :ref:`move_and_slide`. Since the body can collide several times in a single call to :ref:`move_and_slide`, you must specify the index of the collision in the range 0 to (:ref:`get_slide_collision_count` - 1). +Returns a :ref:`KinematicCollision3D`, which contains information about a collision that occurred during the last call to :ref:`move_and_slide()`. Since the body can collide several times in a single call to :ref:`move_and_slide()`, you must specify the index of the collision in the range 0 to (:ref:`get_slide_collision_count()` - 1). .. rst-class:: classref-item-separator @@ -600,7 +600,7 @@ Returns a :ref:`KinematicCollision3D`, which contain :ref:`int` **get_slide_collision_count**\ (\ ) |const| :ref:`πŸ”—` -Returns the number of times the body collided and changed direction during the last call to :ref:`move_and_slide`. +Returns the number of times the body collided and changed direction during the last call to :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -612,7 +612,7 @@ Returns the number of times the body collided and changed direction during the l :ref:`Vector3` **get_wall_normal**\ (\ ) |const| :ref:`πŸ”—` -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``. +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. @@ -626,7 +626,7 @@ Returns the collision normal of the wall at the last collision point. Only valid :ref:`bool` **is_on_ceiling**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided with the ceiling on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "ceiling" or not. +Returns ``true`` if the body collided with the ceiling on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "ceiling" or not. .. rst-class:: classref-item-separator @@ -638,7 +638,7 @@ Returns ``true`` if the body collided with the ceiling on the last call of :ref: :ref:`bool` **is_on_ceiling_only**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided only with the ceiling on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "ceiling" or not. +Returns ``true`` if the body collided only with the ceiling on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "ceiling" or not. .. rst-class:: classref-item-separator @@ -650,7 +650,7 @@ Returns ``true`` if the body collided only with the ceiling on the last call of :ref:`bool` **is_on_floor**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided with the floor on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "floor" or not. +Returns ``true`` if the body collided with the floor on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "floor" or not. .. rst-class:: classref-item-separator @@ -662,7 +662,7 @@ Returns ``true`` if the body collided with the floor on the last call of :ref:`m :ref:`bool` **is_on_floor_only**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided only with the floor on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "floor" or not. +Returns ``true`` if the body collided only with the floor on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "floor" or not. .. rst-class:: classref-item-separator @@ -674,7 +674,7 @@ Returns ``true`` if the body collided only with the floor on the last call of :r :ref:`bool` **is_on_wall**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided with a wall on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "wall" or not. +Returns ``true`` if the body collided with a wall on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "wall" or not. .. rst-class:: classref-item-separator @@ -686,7 +686,7 @@ Returns ``true`` if the body collided with a wall on the last call of :ref:`move :ref:`bool` **is_on_wall_only**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided only with a wall on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "wall" or not. +Returns ``true`` if the body collided only with a wall on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "wall" or not. .. rst-class:: classref-item-separator @@ -700,7 +700,7 @@ Returns ``true`` if the body collided only with a wall on the last call of :ref: Moves the body based on :ref:`velocity`. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a **CharacterBody3D** or :ref:`RigidBody3D`, it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. -Modifies :ref:`velocity` if a slide collision occurred. To get the latest collision call :ref:`get_last_slide_collision`, for more detailed information about collisions that occurred, use :ref:`get_slide_collision`. +Modifies :ref:`velocity` if a slide collision occurred. To get the latest collision call :ref:`get_last_slide_collision()`, for more detailed information about collisions that occurred, use :ref:`get_slide_collision()`. When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions. diff --git a/classes/class_charfxtransform.rst b/classes/class_charfxtransform.rst index f22053793..5e26548f6 100644 --- a/classes/class_charfxtransform.rst +++ b/classes/class_charfxtransform.rst @@ -200,7 +200,7 @@ Glyph flags. See :ref:`GraphemeFlag` for more info - |void| **set_glyph_index**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_glyph_index**\ (\ ) -Glyph index specific to the :ref:`font`. If you want to replace this glyph, use :ref:`TextServer.font_get_glyph_index` with :ref:`font` to get a new glyph index for a single character. +Glyph index specific to the :ref:`font`. If you want to replace this glyph, use :ref:`TextServer.font_get_glyph_index()` with :ref:`font` to get a new glyph index for a single character. .. rst-class:: classref-item-separator diff --git a/classes/class_classdb.rst b/classes/class_classdb.rst index 14724e0be..350e85d51 100644 --- a/classes/class_classdb.rst +++ b/classes/class_classdb.rst @@ -367,7 +367,7 @@ Returns the ``signal`` data of ``class`` or its ancestry. The returned value is :ref:`Array`\[:ref:`Dictionary`\] **class_get_signal_list**\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| :ref:`πŸ”—` -Returns an array with all the signals of ``class`` or its ancestry if ``no_inheritance`` is ``false``. Every element of the array is a :ref:`Dictionary` as described in :ref:`class_get_signal`. +Returns an array with all the signals of ``class`` or its ancestry if ``no_inheritance`` is ``false``. Every element of the array is a :ref:`Dictionary` as described in :ref:`class_get_signal()`. .. rst-class:: classref-item-separator diff --git a/classes/class_codeedit.rst b/classes/class_codeedit.rst index 252c23376..16206bd74 100644 --- a/classes/class_codeedit.rst +++ b/classes/class_codeedit.rst @@ -322,7 +322,7 @@ Emitted when a breakpoint is added or removed from a line. If the line is moved **code_completion_requested**\ (\ ) :ref:`πŸ”—` -Emitted when the user requests code completion. This signal will not be sent if :ref:`_request_code_completion` is overridden or :ref:`code_completion_enabled` is ``false``. +Emitted when the user requests code completion. This signal will not be sent if :ref:`_request_code_completion()` is overridden or :ref:`code_completion_enabled` is ``false``. .. rst-class:: classref-item-separator @@ -360,7 +360,7 @@ Emitted when the user has clicked on a valid symbol. **symbol_validate**\ (\ symbol\: :ref:`String`\ ) :ref:`πŸ”—` -Emitted when the user hovers over a symbol. The symbol should be validated and responded to, by calling :ref:`set_symbol_lookup_word_as_valid`. +Emitted when the user hovers over a symbol. The symbol should be validated and responded to, by calling :ref:`set_symbol_lookup_word_as_valid()`. \ **Note:** :ref:`symbol_lookup_on_click` must be ``true`` for this signal to be emitted. @@ -572,7 +572,7 @@ Sets the brace pairs to be autocompleted. For each entry in the dictionary, the - |void| **set_code_completion_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_code_completion_enabled**\ (\ ) -If ``true``, the :ref:`ProjectSettings.input/ui_text_completion_query` action requests code completion. To handle it, see :ref:`_request_code_completion` or :ref:`code_completion_requested`. +If ``true``, the :ref:`ProjectSettings.input/ui_text_completion_query` action requests code completion. To handle it, see :ref:`_request_code_completion()` or :ref:`code_completion_requested`. .. rst-class:: classref-item-separator @@ -640,7 +640,7 @@ Sets the string delimiters. All existing string delimiters will be removed. - |void| **set_draw_bookmarks_gutter**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_drawing_bookmarks_gutter**\ (\ ) -If ``true``, bookmarks are drawn in the gutter. This gutter is shared with breakpoints and executing lines. See :ref:`set_line_as_bookmarked`. +If ``true``, bookmarks are drawn in the gutter. This gutter is shared with breakpoints and executing lines. See :ref:`set_line_as_bookmarked()`. .. rst-class:: classref-item-separator @@ -657,7 +657,7 @@ If ``true``, bookmarks are drawn in the gutter. This gutter is shared with break - |void| **set_draw_breakpoints_gutter**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_drawing_breakpoints_gutter**\ (\ ) -If ``true``, breakpoints are drawn in the gutter. This gutter is shared with bookmarks and executing lines. Clicking the gutter will toggle the breakpoint for the line, see :ref:`set_line_as_breakpoint`. +If ``true``, breakpoints are drawn in the gutter. This gutter is shared with bookmarks and executing lines. Clicking the gutter will toggle the breakpoint for the line, see :ref:`set_line_as_breakpoint()`. .. rst-class:: classref-item-separator @@ -674,7 +674,7 @@ If ``true``, breakpoints are drawn in the gutter. This gutter is shared with boo - |void| **set_draw_executing_lines_gutter**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_drawing_executing_lines_gutter**\ (\ ) -If ``true``, executing lines are marked in the gutter. This gutter is shared with breakpoints and bookmarks. See :ref:`set_line_as_executing`. +If ``true``, executing lines are marked in the gutter. This gutter is shared with breakpoints and bookmarks. See :ref:`set_line_as_executing()`. .. rst-class:: classref-item-separator @@ -691,7 +691,7 @@ If ``true``, executing lines are marked in the gutter. This gutter is shared wit - |void| **set_draw_fold_gutter**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_drawing_fold_gutter**\ (\ ) -If ``true``, the fold gutter is drawn. In this gutter, the :ref:`can_fold_code_region` icon is drawn for each foldable line (see :ref:`can_fold_line`) and the :ref:`folded_code_region` icon is drawn for each folded line (see :ref:`is_line_folded`). These icons can be clicked to toggle the fold state, see :ref:`toggle_foldable_line`. :ref:`line_folding` must be ``true`` to show icons. +If ``true``, the fold gutter is drawn. In this gutter, the :ref:`can_fold_code_region` icon is drawn for each foldable line (see :ref:`can_fold_line()`) and the :ref:`folded_code_region` icon is drawn for each folded line (see :ref:`is_line_folded()`). These icons can be clicked to toggle the fold state, see :ref:`toggle_foldable_line()`. :ref:`line_folding` must be ``true`` to show icons. .. rst-class:: classref-item-separator @@ -810,7 +810,7 @@ Use spaces instead of tabs for indentation. - |void| **set_line_folding_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_line_folding_enabled**\ (\ ) -If ``true``, lines can be folded. Otherwise, line folding methods like :ref:`fold_line` will not work and :ref:`can_fold_line` will always return ``false``. See :ref:`gutters_draw_fold_gutter`. +If ``true``, lines can be folded. Otherwise, line folding methods like :ref:`fold_line()` will not work and :ref:`can_fold_line()` will always return ``false``. See :ref:`gutters_draw_fold_gutter`. .. rst-class:: classref-item-separator @@ -892,7 +892,7 @@ Override this method to define how the selected entry should be inserted. If ``r Override this method to define what items in ``candidates`` should be displayed. -Both ``candidates`` and the return is a :ref:`Array` of :ref:`Dictionary`, see :ref:`get_code_completion_option` for :ref:`Dictionary` content. +Both ``candidates`` and the return is a :ref:`Array` of :ref:`Dictionary`, see :ref:`get_code_completion_option()` for :ref:`Dictionary` content. .. rst-class:: classref-item-separator @@ -930,7 +930,7 @@ Both the start and end keys must be symbols. Only the start key has to be unique |void| **add_code_completion_option**\ (\ type\: :ref:`CodeCompletionKind`, display_text\: :ref:`String`, insert_text\: :ref:`String`, text_color\: :ref:`Color` = Color(1, 1, 1, 1), icon\: :ref:`Resource` = null, value\: :ref:`Variant` = null, location\: :ref:`int` = 1024\ ) :ref:`πŸ”—` -Submits an item to the queue of potential candidates for the autocomplete menu. Call :ref:`update_code_completion_options` to update the list. +Submits an item to the queue of potential candidates for the autocomplete menu. Call :ref:`update_code_completion_options()` to update the list. \ ``location`` indicates location of the option relative to the location of the code completion query. See :ref:`CodeCompletionLocation` for how to set this value. @@ -974,7 +974,7 @@ If ``line_only`` is ``true`` or ``end_key`` is an empty :ref:`String` **can_fold_line**\ (\ line\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the given line is foldable. A line is foldable if it is the start of a valid code region (see :ref:`get_code_region_start_tag`), if it is the start of a comment or string block, or if the next non-empty line is more indented (see :ref:`TextEdit.get_indent_level`). +Returns ``true`` if the given line is foldable. A line is foldable if it is the start of a valid code region (see :ref:`get_code_region_start_tag()`), if it is the start of a comment or string block, or if the next non-empty line is more indented (see :ref:`TextEdit.get_indent_level()`). .. rst-class:: classref-item-separator @@ -1084,11 +1084,11 @@ Values of ``-1`` convert the entire text. |void| **create_code_region**\ (\ ) :ref:`πŸ”—` -Creates a new code region with the selection. At least one single line comment delimiter have to be defined (see :ref:`add_comment_delimiter`). +Creates a new code region with the selection. At least one single line comment delimiter have to be defined (see :ref:`add_comment_delimiter()`). A code region is a part of code that is highlighted when folded and can help organize your script. -Code region start and end tags can be customized (see :ref:`set_code_region_tags`). +Code region start and end tags can be customized (see :ref:`set_code_region_tags()`). Code regions are delimited using start and end tags (respectively ``region`` and ``endregion`` by default) preceded by one line comment delimiter. (eg. ``#region`` and ``#endregion``) @@ -1114,7 +1114,7 @@ Deletes all lines that are selected or have a caret on them. |void| **do_indent**\ (\ ) :ref:`πŸ”—` -If there is no selection, indentation is inserted at the caret. Otherwise, the selected lines are indented like :ref:`indent_lines`. Equivalent to the :ref:`ProjectSettings.input/ui_text_indent` action. The indentation characters used depend on :ref:`indent_use_spaces` and :ref:`indent_size`. +If there is no selection, indentation is inserted at the caret. Otherwise, the selected lines are indented like :ref:`indent_lines()`. Equivalent to the :ref:`ProjectSettings.input/ui_text_indent` action. The indentation characters used depend on :ref:`indent_use_spaces` and :ref:`indent_size`. .. rst-class:: classref-item-separator @@ -1150,7 +1150,7 @@ Duplicates all selected text and duplicates all lines with a caret on them. |void| **fold_all_lines**\ (\ ) :ref:`πŸ”—` -Folds all lines that are possible to be folded (see :ref:`can_fold_line`). +Folds all lines that are possible to be folded (see :ref:`can_fold_line()`). .. rst-class:: classref-item-separator @@ -1162,7 +1162,7 @@ Folds all lines that are possible to be folded (see :ref:`can_fold_line`\ ) :ref:`πŸ”—` -Folds the given line, if possible (see :ref:`can_fold_line`). +Folds the given line, if possible (see :ref:`can_fold_line()`). .. rst-class:: classref-item-separator @@ -1234,7 +1234,7 @@ Gets the completion option at ``index``. The return :ref:`Dictionary`\[:ref:`Dictionary`\] **get_code_completion_options**\ (\ ) |const| :ref:`πŸ”—` -Gets all completion options, see :ref:`get_code_completion_option` for return content. +Gets all completion options, see :ref:`get_code_completion_option()` for return content. .. rst-class:: classref-item-separator @@ -1438,7 +1438,7 @@ Returns ``true`` if string ``start_key`` exists. |void| **indent_lines**\ (\ ) :ref:`πŸ”—` -Indents all lines that are selected or have a caret on them. Uses spaces or a tab depending on :ref:`indent_use_spaces`. See :ref:`unindent_lines`. +Indents all lines that are selected or have a caret on them. Uses spaces or a tab depending on :ref:`indent_use_spaces`. See :ref:`unindent_lines()`. .. rst-class:: classref-item-separator @@ -1474,7 +1474,7 @@ Returns the delimiter index if ``line`` ``column`` is in a string. If ``column`` :ref:`bool` **is_line_bookmarked**\ (\ line\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the given line is bookmarked. See :ref:`set_line_as_bookmarked`. +Returns ``true`` if the given line is bookmarked. See :ref:`set_line_as_bookmarked()`. .. rst-class:: classref-item-separator @@ -1486,7 +1486,7 @@ Returns ``true`` if the given line is bookmarked. See :ref:`set_line_as_bookmark :ref:`bool` **is_line_breakpointed**\ (\ line\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the given line is breakpointed. See :ref:`set_line_as_breakpoint`. +Returns ``true`` if the given line is breakpointed. See :ref:`set_line_as_breakpoint()`. .. rst-class:: classref-item-separator @@ -1498,7 +1498,7 @@ Returns ``true`` if the given line is breakpointed. See :ref:`set_line_as_breakp :ref:`bool` **is_line_code_region_end**\ (\ line\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the given line is a code region end. See :ref:`set_code_region_tags`. +Returns ``true`` if the given line is a code region end. See :ref:`set_code_region_tags()`. .. rst-class:: classref-item-separator @@ -1510,7 +1510,7 @@ Returns ``true`` if the given line is a code region end. See :ref:`set_code_regi :ref:`bool` **is_line_code_region_start**\ (\ line\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the given line is a code region start. See :ref:`set_code_region_tags`. +Returns ``true`` if the given line is a code region start. See :ref:`set_code_region_tags()`. .. rst-class:: classref-item-separator @@ -1522,7 +1522,7 @@ Returns ``true`` if the given line is a code region start. See :ref:`set_code_re :ref:`bool` **is_line_executing**\ (\ line\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the given line is marked as executing. See :ref:`set_line_as_executing`. +Returns ``true`` if the given line is marked as executing. See :ref:`set_line_as_executing()`. .. rst-class:: classref-item-separator @@ -1534,7 +1534,7 @@ Returns ``true`` if the given line is marked as executing. See :ref:`set_line_as :ref:`bool` **is_line_folded**\ (\ line\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the given line is folded. See :ref:`fold_line`. +Returns ``true`` if the given line is folded. See :ref:`fold_line()`. .. rst-class:: classref-item-separator @@ -1630,7 +1630,7 @@ Sets the code hint text. Pass an empty string to clear. |void| **set_code_hint_draw_below**\ (\ draw_below\: :ref:`bool`\ ) :ref:`πŸ”—` -If ``true``, the code hint will draw below the main caret. If ``false``, the code hint will draw above the main caret. See :ref:`set_code_hint`. +If ``true``, the code hint will draw below the main caret. If ``false``, the code hint will draw above the main caret. See :ref:`set_code_hint()`. .. rst-class:: classref-item-separator @@ -1654,7 +1654,7 @@ Sets the code region start and end tags (without comment delimiter). |void| **set_line_as_bookmarked**\ (\ line\: :ref:`int`, bookmarked\: :ref:`bool`\ ) :ref:`πŸ”—` -Sets the given line as bookmarked. If ``true`` and :ref:`gutters_draw_bookmarks` is ``true``, draws the :ref:`bookmark` icon in the gutter for this line. See :ref:`get_bookmarked_lines` and :ref:`is_line_bookmarked`. +Sets the given line as bookmarked. If ``true`` and :ref:`gutters_draw_bookmarks` is ``true``, draws the :ref:`bookmark` icon in the gutter for this line. See :ref:`get_bookmarked_lines()` and :ref:`is_line_bookmarked()`. .. rst-class:: classref-item-separator @@ -1666,7 +1666,7 @@ Sets the given line as bookmarked. If ``true`` and :ref:`gutters_draw_bookmarks< |void| **set_line_as_breakpoint**\ (\ line\: :ref:`int`, breakpointed\: :ref:`bool`\ ) :ref:`πŸ”—` -Sets the given line as a breakpoint. If ``true`` and :ref:`gutters_draw_breakpoints_gutter` is ``true``, draws the :ref:`breakpoint` icon in the gutter for this line. See :ref:`get_breakpointed_lines` and :ref:`is_line_breakpointed`. +Sets the given line as a breakpoint. If ``true`` and :ref:`gutters_draw_breakpoints_gutter` is ``true``, draws the :ref:`breakpoint` icon in the gutter for this line. See :ref:`get_breakpointed_lines()` and :ref:`is_line_breakpointed()`. .. rst-class:: classref-item-separator @@ -1678,7 +1678,7 @@ Sets the given line as a breakpoint. If ``true`` and :ref:`gutters_draw_breakpoi |void| **set_line_as_executing**\ (\ line\: :ref:`int`, executing\: :ref:`bool`\ ) :ref:`πŸ”—` -Sets the given line as executing. If ``true`` and :ref:`gutters_draw_executing_lines` is ``true``, draws the :ref:`executing_line` icon in the gutter for this line. See :ref:`get_executing_lines` and :ref:`is_line_executing`. +Sets the given line as executing. If ``true`` and :ref:`gutters_draw_executing_lines` is ``true``, draws the :ref:`executing_line` icon in the gutter for this line. See :ref:`get_executing_lines()` and :ref:`is_line_executing()`. .. rst-class:: classref-item-separator @@ -1750,7 +1750,7 @@ Unfolds the given line if it is folded or if it is hidden under a folded line. |void| **unindent_lines**\ (\ ) :ref:`πŸ”—` -Unindents all lines that are selected or have a caret on them. Uses spaces or a tab depending on :ref:`indent_use_spaces`. Equivalent to the :ref:`ProjectSettings.input/ui_text_dedent` action. See :ref:`indent_lines`. +Unindents all lines that are selected or have a caret on them. Uses spaces or a tab depending on :ref:`indent_use_spaces`. Equivalent to the :ref:`ProjectSettings.input/ui_text_dedent` action. See :ref:`indent_lines()`. .. rst-class:: classref-item-separator @@ -1762,7 +1762,7 @@ Unindents all lines that are selected or have a caret on them. Uses spaces or a |void| **update_code_completion_options**\ (\ force\: :ref:`bool`\ ) :ref:`πŸ”—` -Submits all completion options added with :ref:`add_code_completion_option`. Will try to force the autocomplete menu to popup, if ``force`` is ``true``. +Submits all completion options added with :ref:`add_code_completion_option()`. Will try to force the autocomplete menu to popup, if ``force`` is ``true``. \ **Note:** This will replace all current candidates. diff --git a/classes/class_collisionobject2d.rst b/classes/class_collisionobject2d.rst index 8ea2227dc..35be627b2 100644 --- a/classes/class_collisionobject2d.rst +++ b/classes/class_collisionobject2d.rst @@ -128,7 +128,7 @@ Signals **input_event**\ (\ viewport\: :ref:`Node`, event\: :ref:`InputEvent`, shape_idx\: :ref:`int`\ ) :ref:`πŸ”—` -Emitted when an input event occurs. Requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. See :ref:`_input_event` for details. +Emitted when an input event occurs. Requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. See :ref:`_input_event()` for details. .. rst-class:: classref-item-separator @@ -336,7 +336,7 @@ Method Descriptions Accepts unhandled :ref:`InputEvent`\ s. ``shape_idx`` is the child index of the clicked :ref:`Shape2D`. Connect to :ref:`input_event` to easily pick up these events. -\ **Note:** :ref:`_input_event` requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. +\ **Note:** :ref:`_input_event()` requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. .. rst-class:: classref-item-separator diff --git a/classes/class_collisionobject3d.rst b/classes/class_collisionobject3d.rst index 137370614..c5ded0020 100644 --- a/classes/class_collisionobject3d.rst +++ b/classes/class_collisionobject3d.rst @@ -319,7 +319,7 @@ Method Descriptions 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. +\ **Note:** :ref:`_input_event()` requires :ref:`input_ray_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. .. rst-class:: classref-item-separator diff --git a/classes/class_collisionshape2d.rst b/classes/class_collisionshape2d.rst index d55889de9..7affb6366 100644 --- a/classes/class_collisionshape2d.rst +++ b/classes/class_collisionshape2d.rst @@ -93,7 +93,7 @@ The collision shape color that is displayed in the editor, or in the running pro - |void| **set_disabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_disabled**\ (\ ) -A disabled collision shape has no effect in the world. This property should be changed with :ref:`Object.set_deferred`. +A disabled collision shape has no effect in the world. This property should be changed with :ref:`Object.set_deferred()`. .. rst-class:: classref-item-separator diff --git a/classes/class_color.rst b/classes/class_color.rst index a8b112dc1..18deb2abd 100644 --- a/classes/class_color.rst +++ b/classes/class_color.rst @@ -19,7 +19,7 @@ Description A color represented in RGBA format by a red (:ref:`r`), green (:ref:`g`), blue (:ref:`b`), and alpha (:ref:`a`) component. Each component is a 32-bit floating-point value, usually ranging from ``0.0`` to ``1.0``. Some properties (such as :ref:`CanvasItem.modulate`) may support values greater than ``1.0``, for overbright or HDR (High Dynamic Range) colors. -Colors can be created in various ways: By the various **Color** constructors, by static methods such as :ref:`from_hsv`, and by using a name from the set of standardized colors based on `X11 color names `__ with the addition of :ref:`TRANSPARENT`. GDScript also provides :ref:`@GDScript.Color8`, which uses integers from ``0`` to ``255`` and doesn't support overbright colors. +Colors can be created in various ways: By the various **Color** constructors, by static methods such as :ref:`from_hsv()`, and by using a name from the set of standardized colors based on `X11 color names `__ with the addition of :ref:`TRANSPARENT`. GDScript also provides :ref:`@GDScript.Color8()`, which uses integers from ``0`` to ``255`` and doesn't support overbright colors. \ **Note:** In a boolean context, a Color will evaluate to ``false`` if it is equal to ``Color(0, 0, 0, 1)`` (opaque black). Otherwise, a Color will always evaluate to ``true``. @@ -1712,7 +1712,7 @@ Returns a new color resulting from overlaying this color over the given color. I :ref:`Color` **clamp**\ (\ min\: :ref:`Color` = Color(0, 0, 0, 0), max\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| :ref:`πŸ”—` -Returns a new color with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp` on each component. +Returns a new color with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp()` on each component. .. rst-class:: classref-item-separator @@ -1724,7 +1724,7 @@ Returns a new color with all components clamped between the components of ``min` :ref:`Color` **darkened**\ (\ amount\: :ref:`float`\ ) |const| :ref:`πŸ”—` -Returns a new color resulting from making this color darker by the specified ``amount`` (ratio from 0.0 to 1.0). See also :ref:`lightened`. +Returns a new color resulting from making this color darker by the specified ``amount`` (ratio from 0.0 to 1.0). See also :ref:`lightened()`. .. tabs:: @@ -1809,7 +1809,7 @@ Returns a **Color** constructed from red (``r8``), green (``g8``), blue (``b8``) var dark_blue = Color.from_rgba8(0, 0, 51) # Same as Color(0, 0, 0.2). var my_color = Color.from_rgba8(306, 255, 0, 102) # Same as Color(1.2, 1, 0, 0.4). -\ **Note:** Due to the lower precision of :ref:`from_rgba8` compared to the standard **Color** constructor, a color created with :ref:`from_rgba8` will generally not be equal to the same color created with the standard **Color** constructor. Use :ref:`is_equal_approx` for comparisons to avoid issues with floating-point precision error. +\ **Note:** Due to the lower precision of :ref:`from_rgba8()` compared to the standard **Color** constructor, a color created with :ref:`from_rgba8()` will generally not be equal to the same color created with the standard **Color** constructor. Use :ref:`is_equal_approx()` for comparisons to avoid issues with floating-point precision error. .. rst-class:: classref-item-separator @@ -1849,7 +1849,7 @@ If you want to create a color from String in a constant expression, use the equi Returns the light intensity of the color, as a value between 0.0 and 1.0 (inclusive). This is useful when determining light or dark color. Colors with a luminance smaller than 0.5 can be generally considered dark. -\ **Note:** :ref:`get_luminance` relies on the color being in the linear color space to return an accurate relative luminance value. If the color is in the sRGB color space, use :ref:`srgb_to_linear` to convert it to the linear color space first. +\ **Note:** :ref:`get_luminance()` relies on the color being in the linear color space to return an accurate relative luminance value. If the color is in the sRGB color space, use :ref:`srgb_to_linear()` to convert it to the linear color space first. .. rst-class:: classref-item-separator @@ -1861,7 +1861,7 @@ Returns the light intensity of the color, as a value between 0.0 and 1.0 (inclus :ref:`Color` **hex**\ (\ hex\: :ref:`int`\ ) |static| :ref:`πŸ”—` -Returns the **Color** associated with the provided ``hex`` integer in 32-bit RGBA format (8 bits per channel). This method is the inverse of :ref:`to_rgba32`. +Returns the **Color** associated with the provided ``hex`` integer in 32-bit RGBA format (8 bits per channel). This method is the inverse of :ref:`to_rgba32()`. In GDScript and C#, the :ref:`int` is best visualized with hexadecimal notation (``"0x"`` prefix, making it ``"0xRRGGBBAA"``). @@ -1894,7 +1894,7 @@ If you want to use hex notation in a constant expression, use the equivalent con :ref:`Color` **hex64**\ (\ hex\: :ref:`int`\ ) |static| :ref:`πŸ”—` -Returns the **Color** associated with the provided ``hex`` integer in 64-bit RGBA format (16 bits per channel). This method is the inverse of :ref:`to_rgba64`. +Returns the **Color** associated with the provided ``hex`` integer in 64-bit RGBA format (16 bits per channel). This method is the inverse of :ref:`to_rgba64()`. In GDScript and C#, the :ref:`int` is best visualized with hexadecimal notation (``"0x"`` prefix, making it ``"0xRRRRGGGGBBBBAAAA"``). @@ -1939,7 +1939,7 @@ Returns a new color from ``rgba``, an HTML hexadecimal color string. ``rgba`` is :ref:`bool` **html_is_valid**\ (\ color\: :ref:`String`\ ) |static| :ref:`πŸ”—` -Returns ``true`` if ``color`` is a valid HTML hexadecimal color string. The string must be a hexadecimal value (case-insensitive) of either 3, 4, 6 or 8 digits, and may be prefixed by a hash sign (``#``). This method is identical to :ref:`String.is_valid_html_color`. +Returns ``true`` if ``color`` is a valid HTML hexadecimal color string. The string must be a hexadecimal value (case-insensitive) of either 3, 4, 6 or 8 digits, and may be prefixed by a hash sign (``#``). This method is identical to :ref:`String.is_valid_html_color()`. .. tabs:: @@ -2005,7 +2005,7 @@ Returns the color with its :ref:`r`, :ref:`g` **is_equal_approx**\ (\ to\: :ref:`Color`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this color and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. +Returns ``true`` if this color and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx()` on each component. .. rst-class:: classref-item-separator @@ -2017,7 +2017,7 @@ Returns ``true`` if this color and ``to`` are approximately equal, by running :r :ref:`Color` **lerp**\ (\ to\: :ref:`Color`, weight\: :ref:`float`\ ) |const| :ref:`πŸ”—` -Returns the linear interpolation between this color's components and ``to``'s components. The interpolation factor ``weight`` should be between 0.0 and 1.0 (inclusive). See also :ref:`@GlobalScope.lerp`. +Returns the linear interpolation between this color's components and ``to``'s components. The interpolation factor ``weight`` should be between 0.0 and 1.0 (inclusive). See also :ref:`@GlobalScope.lerp()`. .. tabs:: @@ -2052,7 +2052,7 @@ Returns the linear interpolation between this color's components and ``to``'s co :ref:`Color` **lightened**\ (\ amount\: :ref:`float`\ ) |const| :ref:`πŸ”—` -Returns a new color resulting from making this color lighter by the specified ``amount``, which should be a ratio from 0.0 to 1.0. See also :ref:`darkened`. +Returns a new color resulting from making this color lighter by the specified ``amount``, which should be a ratio from 0.0 to 1.0. See also :ref:`darkened()`. .. tabs:: @@ -2079,7 +2079,7 @@ Returns a new color resulting from making this color lighter by the specified `` :ref:`Color` **linear_to_srgb**\ (\ ) |const| :ref:`πŸ”—` -Returns the color converted to the `sRGB `__ color space. This method assumes the original color is in the linear color space. See also :ref:`srgb_to_linear` which performs the opposite operation. +Returns the color converted to the `sRGB `__ color space. This method assumes the original color is in the linear color space. See also :ref:`srgb_to_linear()` which performs the opposite operation. .. rst-class:: classref-item-separator @@ -2091,7 +2091,7 @@ Returns the color converted to the `sRGB `__ :ref:`Color` **srgb_to_linear**\ (\ ) |const| :ref:`πŸ”—` -Returns the color converted to the linear color space. This method assumes the original color already is in the sRGB color space. See also :ref:`linear_to_srgb` which performs the opposite operation. +Returns the color converted to the linear color space. This method assumes the original color already is in the sRGB color space. See also :ref:`linear_to_srgb()` which performs the opposite operation. .. rst-class:: classref-item-separator @@ -2242,7 +2242,7 @@ Setting ``with_alpha`` to ``false``, excludes alpha from the hexadecimal string, :ref:`int` **to_rgba32**\ (\ ) |const| :ref:`πŸ”—` -Returns the color converted to a 32-bit integer in RGBA format (each component is 8 bits). RGBA is Godot's default format. This method is the inverse of :ref:`hex`. +Returns the color converted to a 32-bit integer in RGBA format (each component is 8 bits). RGBA is Godot's default format. This method is the inverse of :ref:`hex()`. .. tabs:: @@ -2269,7 +2269,7 @@ Returns the color converted to a 32-bit integer in RGBA format (each component i :ref:`int` **to_rgba64**\ (\ ) |const| :ref:`πŸ”—` -Returns the color converted to a 64-bit integer in RGBA format (each component is 16 bits). RGBA is Godot's default format. This method is the inverse of :ref:`hex64`. +Returns the color converted to a 64-bit integer in RGBA format (each component is 16 bits). RGBA is Godot's default format. This method is the inverse of :ref:`hex64()`. .. tabs:: @@ -2303,7 +2303,7 @@ Operator Descriptions Returns ``true`` if the colors are not exactly equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. rst-class:: classref-item-separator @@ -2413,7 +2413,7 @@ Divides each component of the **Color** by the given :ref:`int`. Returns ``true`` if the colors are exactly equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. rst-class:: classref-item-separator @@ -2449,7 +2449,7 @@ Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, :ref:`Color` **operator unary-**\ (\ ) :ref:`πŸ”—` -Inverts the given color. This is equivalent to ``Color.WHITE - c`` or ``Color(1 - c.r, 1 - c.g, 1 - c.b, 1 - c.a)``. Unlike with :ref:`inverted`, the :ref:`a` component is inverted, too. +Inverts the given color. This is equivalent to ``Color.WHITE - c`` or ``Color(1 - c.r, 1 - c.g, 1 - c.b, 1 - c.a)``. Unlike with :ref:`inverted()`, the :ref:`a` component is inverted, too. .. |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_compositoreffect.rst b/classes/class_compositoreffect.rst index 1a7a302cb..06ff40bea 100644 --- a/classes/class_compositoreffect.rst +++ b/classes/class_compositoreffect.rst @@ -151,7 +151,7 @@ Property Descriptions If ``true`` and MSAA is enabled, this will trigger a color buffer resolve before the effect is run. -\ **Note:** In :ref:`_render_callback`, to access the resolved buffer use: +\ **Note:** In :ref:`_render_callback()`, to access the resolved buffer use: :: @@ -175,7 +175,7 @@ If ``true`` and MSAA is enabled, this will trigger a color buffer resolve before If ``true`` and MSAA is enabled, this will trigger a depth buffer resolve before the effect is run. -\ **Note:** In :ref:`_render_callback`, to access the resolved buffer use: +\ **Note:** In :ref:`_render_callback()`, to access the resolved buffer use: :: @@ -233,7 +233,7 @@ If ``true`` this rendering effect is applied to any viewport it is added to. If ``true`` this triggers motion vectors being calculated during the opaque render state. -\ **Note:** In :ref:`_render_callback`, to access the motion vector buffer use: +\ **Note:** In :ref:`_render_callback()`, to access the motion vector buffer use: :: @@ -257,7 +257,7 @@ If ``true`` this triggers motion vectors being calculated during the opaque rend If ``true`` this triggers normal and roughness data to be output during our depth pre-pass, only applicable for the Forward+ renderer. -\ **Note:** In :ref:`_render_callback`, to access the roughness buffer use: +\ **Note:** In :ref:`_render_callback()`, to access the roughness buffer use: :: diff --git a/classes/class_configfile.rst b/classes/class_configfile.rst index 156dff9c7..be80c75a6 100644 --- a/classes/class_configfile.rst +++ b/classes/class_configfile.rst @@ -114,7 +114,7 @@ This example shows how the above file could be loaded: -Any operation that mutates the ConfigFile such as :ref:`set_value`, :ref:`clear`, or :ref:`erase_section`, only changes what is loaded in memory. If you want to write the change to a file, you have to save the changes with :ref:`save`, :ref:`save_encrypted`, or :ref:`save_encrypted_pass`. +Any operation that mutates the ConfigFile such as :ref:`set_value()`, :ref:`clear()`, or :ref:`erase_section()`, only changes what is loaded in memory. If you want to write the change to a file, you have to save the changes with :ref:`save()`, :ref:`save_encrypted()`, or :ref:`save_encrypted_pass()`. Keep in mind that section and property names can't contain spaces. Anything after a space will be ignored on save and on load. diff --git a/classes/class_confirmationdialog.rst b/classes/class_confirmationdialog.rst index 6ab194cb2..9e47bbe24 100644 --- a/classes/class_confirmationdialog.rst +++ b/classes/class_confirmationdialog.rst @@ -88,7 +88,7 @@ Property Descriptions - |void| **set_cancel_button_text**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_cancel_button_text**\ (\ ) -The text displayed by the cancel button (see :ref:`get_cancel_button`). +The text displayed by the cancel button (see :ref:`get_cancel_button()`). .. rst-class:: classref-section-separator diff --git a/classes/class_control.rst b/classes/class_control.rst index 1c1804e85..8ea934ec2 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -31,17 +31,17 @@ For more information on Godot's UI system, anchors, offsets, and containers, see Godot propagates input events via viewports. Each :ref:`Viewport` is responsible for propagating :ref:`InputEvent`\ s to their child nodes. As the :ref:`SceneTree.root` is a :ref:`Window`, this already happens automatically for all UI elements in your game. -Input events are propagated through the :ref:`SceneTree` from the root node to all child nodes by calling :ref:`Node._input`. For UI elements specifically, it makes more sense to override the virtual method :ref:`_gui_input`, which filters out unrelated input events, such as by checking z-order, :ref:`mouse_filter`, focus, or if the event was inside of the control's bounding box. +Input events are propagated through the :ref:`SceneTree` from the root node to all child nodes by calling :ref:`Node._input()`. For UI elements specifically, it makes more sense to override the virtual method :ref:`_gui_input()`, which filters out unrelated input events, such as by checking z-order, :ref:`mouse_filter`, focus, or if the event was inside of the control's bounding box. -Call :ref:`accept_event` so no other node receives the event. Once you accept an input, it becomes handled so :ref:`Node._unhandled_input` will not process it. +Call :ref:`accept_event()` so no other node receives the event. Once you accept an input, it becomes handled so :ref:`Node._unhandled_input()` will not process it. -Only one **Control** node can be in focus. Only the node in focus will receive events. To get the focus, call :ref:`grab_focus`. **Control** nodes lose focus when another node grabs it, or if you hide the node in focus. +Only one **Control** node can be in focus. Only the node in focus will receive events. To get the focus, call :ref:`grab_focus()`. **Control** nodes lose focus when another node grabs it, or if you hide the node in focus. Sets :ref:`mouse_filter` to :ref:`MOUSE_FILTER_IGNORE` to tell a **Control** node to ignore mouse or touch events. You'll need it if you place an icon on top of a button. -\ :ref:`Theme` resources change the control's appearance. The :ref:`theme` of a **Control** node affects all of its direct and indirect children (as long as a chain of controls is uninterrupted). To override some of the theme items, call one of the ``add_theme_*_override`` methods, like :ref:`add_theme_font_override`. You can also override theme items in the Inspector. +\ :ref:`Theme` resources change the control's appearance. The :ref:`theme` of a **Control** node affects all of its direct and indirect children (as long as a chain of controls is uninterrupted). To override some of the theme items, call one of the ``add_theme_*_override`` methods, like :ref:`add_theme_font_override()`. You can also override theme items in the Inspector. -\ **Note:** Theme items are *not* :ref:`Object` properties. This means you can't access their values using :ref:`Object.get` and :ref:`Object.set`. Instead, use the ``get_theme_*`` and ``add_theme_*_override`` methods provided by this class. +\ **Note:** Theme items are *not* :ref:`Object` properties. This means you can't access their values using :ref:`Object.get()` and :ref:`Object.set()`. Instead, use the ``get_theme_*`` and ``add_theme_*_override`` methods provided by this class. .. rst-class:: classref-introduction-group @@ -658,7 +658,7 @@ enum **LayoutPreset**: :ref:`πŸ”—` :ref:`LayoutPreset` **PRESET_TOP_LEFT** = ``0`` -Snap all 4 anchors to the top-left of the parent control's bounds. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the top-left of the parent control's bounds. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_TOP_RIGHT: @@ -666,7 +666,7 @@ Snap all 4 anchors to the top-left of the parent control's bounds. Use with :ref :ref:`LayoutPreset` **PRESET_TOP_RIGHT** = ``1`` -Snap all 4 anchors to the top-right of the parent control's bounds. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the top-right of the parent control's bounds. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_BOTTOM_LEFT: @@ -674,7 +674,7 @@ Snap all 4 anchors to the top-right of the parent control's bounds. Use with :re :ref:`LayoutPreset` **PRESET_BOTTOM_LEFT** = ``2`` -Snap all 4 anchors to the bottom-left of the parent control's bounds. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the bottom-left of the parent control's bounds. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_BOTTOM_RIGHT: @@ -682,7 +682,7 @@ Snap all 4 anchors to the bottom-left of the parent control's bounds. Use with : :ref:`LayoutPreset` **PRESET_BOTTOM_RIGHT** = ``3`` -Snap all 4 anchors to the bottom-right of the parent control's bounds. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the bottom-right of the parent control's bounds. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_CENTER_LEFT: @@ -690,7 +690,7 @@ Snap all 4 anchors to the bottom-right of the parent control's bounds. Use with :ref:`LayoutPreset` **PRESET_CENTER_LEFT** = ``4`` -Snap all 4 anchors to the center of the left edge of the parent control's bounds. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the center of the left edge of the parent control's bounds. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_CENTER_TOP: @@ -698,7 +698,7 @@ Snap all 4 anchors to the center of the left edge of the parent control's bounds :ref:`LayoutPreset` **PRESET_CENTER_TOP** = ``5`` -Snap all 4 anchors to the center of the top edge of the parent control's bounds. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the center of the top edge of the parent control's bounds. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_CENTER_RIGHT: @@ -706,7 +706,7 @@ Snap all 4 anchors to the center of the top edge of the parent control's bounds. :ref:`LayoutPreset` **PRESET_CENTER_RIGHT** = ``6`` -Snap all 4 anchors to the center of the right edge of the parent control's bounds. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the center of the right edge of the parent control's bounds. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_CENTER_BOTTOM: @@ -714,7 +714,7 @@ Snap all 4 anchors to the center of the right edge of the parent control's bound :ref:`LayoutPreset` **PRESET_CENTER_BOTTOM** = ``7`` -Snap all 4 anchors to the center of the bottom edge of the parent control's bounds. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the center of the bottom edge of the parent control's bounds. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_CENTER: @@ -722,7 +722,7 @@ Snap all 4 anchors to the center of the bottom edge of the parent control's boun :ref:`LayoutPreset` **PRESET_CENTER** = ``8`` -Snap all 4 anchors to the center of the parent control's bounds. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the center of the parent control's bounds. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_LEFT_WIDE: @@ -730,7 +730,7 @@ Snap all 4 anchors to the center of the parent control's bounds. Use with :ref:` :ref:`LayoutPreset` **PRESET_LEFT_WIDE** = ``9`` -Snap all 4 anchors to the left edge of the parent control. The left offset becomes relative to the left edge and the top offset relative to the top left corner of the node's parent. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the left edge of the parent control. The left offset becomes relative to the left edge and the top offset relative to the top left corner of the node's parent. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_TOP_WIDE: @@ -738,7 +738,7 @@ Snap all 4 anchors to the left edge of the parent control. The left offset becom :ref:`LayoutPreset` **PRESET_TOP_WIDE** = ``10`` -Snap all 4 anchors to the top edge of the parent control. The left offset becomes relative to the top left corner, the top offset relative to the top edge, and the right offset relative to the top right corner of the node's parent. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the top edge of the parent control. The left offset becomes relative to the top left corner, the top offset relative to the top edge, and the right offset relative to the top right corner of the node's parent. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_RIGHT_WIDE: @@ -746,7 +746,7 @@ Snap all 4 anchors to the top edge of the parent control. The left offset become :ref:`LayoutPreset` **PRESET_RIGHT_WIDE** = ``11`` -Snap all 4 anchors to the right edge of the parent control. The right offset becomes relative to the right edge and the top offset relative to the top right corner of the node's parent. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the right edge of the parent control. The right offset becomes relative to the right edge and the top offset relative to the top right corner of the node's parent. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_BOTTOM_WIDE: @@ -754,7 +754,7 @@ Snap all 4 anchors to the right edge of the parent control. The right offset bec :ref:`LayoutPreset` **PRESET_BOTTOM_WIDE** = ``12`` -Snap all 4 anchors to the bottom edge of the parent control. The left offset becomes relative to the bottom left corner, the bottom offset relative to the bottom edge, and the right offset relative to the bottom right corner of the node's parent. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the bottom edge of the parent control. The left offset becomes relative to the bottom left corner, the bottom offset relative to the bottom edge, and the right offset relative to the bottom right corner of the node's parent. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_VCENTER_WIDE: @@ -762,7 +762,7 @@ Snap all 4 anchors to the bottom edge of the parent control. The left offset bec :ref:`LayoutPreset` **PRESET_VCENTER_WIDE** = ``13`` -Snap all 4 anchors to a vertical line that cuts the parent control in half. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to a vertical line that cuts the parent control in half. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_HCENTER_WIDE: @@ -770,7 +770,7 @@ Snap all 4 anchors to a vertical line that cuts the parent control in half. Use :ref:`LayoutPreset` **PRESET_HCENTER_WIDE** = ``14`` -Snap all 4 anchors to a horizontal line that cuts the parent control in half. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to a horizontal line that cuts the parent control in half. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_FULL_RECT: @@ -778,7 +778,7 @@ Snap all 4 anchors to a horizontal line that cuts the parent control in half. Us :ref:`LayoutPreset` **PRESET_FULL_RECT** = ``15`` -Snap all 4 anchors to the respective corners of the parent control. Set all 4 offsets to 0 after you applied this preset and the **Control** will fit its parent control. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the respective corners of the parent control. Set all 4 offsets to 0 after you applied this preset and the **Control** will fit its parent control. Use with :ref:`set_anchors_preset()`. .. rst-class:: classref-item-separator @@ -898,7 +898,7 @@ enum **MouseFilter**: :ref:`πŸ”—` :ref:`MouseFilter` **MOUSE_FILTER_STOP** = ``0`` -The control will receive mouse movement input events and mouse button input events if clicked on through :ref:`_gui_input`. The control will also receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls. +The control will receive mouse movement input events and mouse button input events if clicked on through :ref:`_gui_input()`. The control will also receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls. .. _class_Control_constant_MOUSE_FILTER_PASS: @@ -906,9 +906,9 @@ The control will receive mouse movement input events and mouse button input even :ref:`MouseFilter` **MOUSE_FILTER_PASS** = ``1`` -The control will receive mouse movement input events and mouse button input events if clicked on through :ref:`_gui_input`. The control will also receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. +The control will receive mouse movement input events and mouse button input events if clicked on through :ref:`_gui_input()`. The control will also receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. -If this control does not handle the event, the event will propagate up to its parent control if it has one. The event is bubbled up the node hierarchy until it reaches a non-:ref:`CanvasItem`, a control with :ref:`MOUSE_FILTER_STOP`, or a :ref:`CanvasItem` with :ref:`CanvasItem.top_level` enabled. This will allow signals to fire in all controls it reaches. If no control handled it, the event will be passed to :ref:`Node._shortcut_input` for further processing. +If this control does not handle the event, the event will propagate up to its parent control if it has one. The event is bubbled up the node hierarchy until it reaches a non-:ref:`CanvasItem`, a control with :ref:`MOUSE_FILTER_STOP`, or a :ref:`CanvasItem` with :ref:`CanvasItem.top_level` enabled. This will allow signals to fire in all controls it reaches. If no control handled it, the event will be passed to :ref:`Node._shortcut_input()` for further processing. .. _class_Control_constant_MOUSE_FILTER_IGNORE: @@ -916,7 +916,7 @@ If this control does not handle the event, the event will propagate up to its pa :ref:`MouseFilter` **MOUSE_FILTER_IGNORE** = ``2`` -The control will not receive any mouse movement input events nor mouse button input events through :ref:`_gui_input`. The control will also not receive the :ref:`mouse_entered` nor :ref:`mouse_exited` signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. If a child has :ref:`MOUSE_FILTER_PASS` and an event was passed to this control, the event will further propagate up to the control's parent. +The control will not receive any mouse movement input events nor mouse button input events through :ref:`_gui_input()`. The control will also not receive the :ref:`mouse_entered` nor :ref:`mouse_exited` signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. If a child has :ref:`MOUSE_FILTER_PASS` and an event was passed to this control, the event will further propagate up to the control's parent. \ **Note:** If the control has received :ref:`mouse_entered` but not :ref:`mouse_exited`, changing the :ref:`mouse_filter` to :ref:`MOUSE_FILTER_IGNORE` will cause :ref:`mouse_exited` to be emitted. @@ -970,7 +970,7 @@ enum **Anchor**: :ref:`πŸ”—` :ref:`Anchor` **ANCHOR_BEGIN** = ``0`` -Snaps one of the 4 anchor's sides to the origin of the node's ``Rect``, in the top left. Use it with one of the ``anchor_*`` member variables, like :ref:`anchor_left`. To change all 4 anchors at once, use :ref:`set_anchors_preset`. +Snaps one of the 4 anchor's sides to the origin of the node's ``Rect``, in the top left. Use it with one of the ``anchor_*`` member variables, like :ref:`anchor_left`. To change all 4 anchors at once, use :ref:`set_anchors_preset()`. .. _class_Control_constant_ANCHOR_END: @@ -978,7 +978,7 @@ Snaps one of the 4 anchor's sides to the origin of the node's ``Rect``, in the t :ref:`Anchor` **ANCHOR_END** = ``1`` -Snaps one of the 4 anchor's sides to the end of the node's ``Rect``, in the bottom right. Use it with one of the ``anchor_*`` member variables, like :ref:`anchor_left`. To change all 4 anchors at once, use :ref:`set_anchors_preset`. +Snaps one of the 4 anchor's sides to the end of the node's ``Rect``, in the bottom right. Use it with one of the ``anchor_*`` member variables, like :ref:`anchor_left`. To change all 4 anchors at once, use :ref:`set_anchors_preset()`. .. rst-class:: classref-item-separator @@ -1004,7 +1004,7 @@ Automatic layout direction, determined from the parent control layout direction. :ref:`LayoutDirection` **LAYOUT_DIRECTION_APPLICATION_LOCALE** = ``1`` -Automatic layout direction, determined from the current locale. +Automatic layout direction, determined from the current locale. Right-to-left layout direction is automatically used for languages that require it such as Arabic and Hebrew, but only if a valid translation file is loaded for the given language (unless said language is configured as a fallback in :ref:`ProjectSettings.internationalization/locale/fallback`). For all other languages (or if no valid translation file is found by Godot), left-to-right layout direction is used. If using :ref:`TextServerFallback` (:ref:`ProjectSettings.internationalization/rendering/text_driver`), left-to-right layout direction is always used regardless of the language. Right-to-left layout direction can also be forced using :ref:`ProjectSettings.internationalization/rendering/force_right_to_left_layout_direction`. .. _class_Control_constant_LAYOUT_DIRECTION_LTR: @@ -1028,7 +1028,7 @@ Right-to-left layout direction. :ref:`LayoutDirection` **LAYOUT_DIRECTION_SYSTEM_LOCALE** = ``4`` -Automatic layout direction, determined from the system locale. +Automatic layout direction, determined from the system locale. Right-to-left layout direction is automatically used for languages that require it such as Arabic and Hebrew, but only if a valid translation file is loaded for the given language.. For all other languages (or if no valid translation file is found by Godot), left-to-right layout direction is used. If using :ref:`TextServerFallback` (:ref:`ProjectSettings.internationalization/rendering/text_driver`), left-to-right layout direction is always used regardless of the language. .. _class_Control_constant_LAYOUT_DIRECTION_MAX: @@ -1193,7 +1193,7 @@ 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`. +\ **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()`. :: @@ -1229,7 +1229,7 @@ Sent when this node is inside a :ref:`ScrollContainer` wh **NOTIFICATION_LAYOUT_DIRECTION_CHANGED** = ``49`` :ref:`πŸ”—` -Sent when control layout direction is changed. +Sent when the control layout direction is changed from LTR or RTL or vice versa. This notification is propagated to child Control nodes as result of a change to :ref:`layout_direction`. .. rst-class:: classref-section-separator @@ -1351,7 +1351,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. 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`). +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 @@ -1541,7 +1541,7 @@ Controls the direction on the vertical axis in which the control should grow if - |void| **set_layout_direction**\ (\ value\: :ref:`LayoutDirection`\ ) - :ref:`LayoutDirection` **get_layout_direction**\ (\ ) -Controls layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew). +Controls layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew). See also :ref:`is_layout_rtl()`. .. rst-class:: classref-item-separator @@ -1560,7 +1560,7 @@ Controls layout direction and text writing direction. Right-to-left layouts are If ``true``, automatically converts code line numbers, list indices, :ref:`SpinBox` and :ref:`ProgressBar` values from the Western Arabic (0..9) to the numeral systems used in current locale. -\ **Note:** Numbers within the text are not automatically converted, it can be done manually, using :ref:`TextServer.format_number`. +\ **Note:** Numbers within the text are not automatically converted, it can be done manually, using :ref:`TextServer.format_number()`. .. rst-class:: classref-item-separator @@ -1596,7 +1596,7 @@ The default cursor shape for this control. Useful for Godot plugins and applicat - |void| **set_mouse_filter**\ (\ value\: :ref:`MouseFilter`\ ) - :ref:`MouseFilter` **get_mouse_filter**\ (\ ) -Controls whether the control will be able to receive mouse button input events through :ref:`_gui_input` and how these events should be handled. Also controls whether the control can receive the :ref:`mouse_entered`, and :ref:`mouse_exited` signals. See the constants to learn what each does. +Controls whether the control will be able to receive mouse button input events through :ref:`_gui_input()` and how these events should be handled. Also controls whether the control can receive the :ref:`mouse_entered`, and :ref:`mouse_exited` signals. See the constants to learn what each does. .. rst-class:: classref-item-separator @@ -1613,9 +1613,9 @@ Controls whether the control will be able to receive mouse button input events t - |void| **set_force_pass_scroll_events**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_force_pass_scroll_events**\ (\ ) -When enabled, scroll wheel events processed by :ref:`_gui_input` will be passed to the parent control even if :ref:`mouse_filter` is set to :ref:`MOUSE_FILTER_STOP`. +When enabled, scroll wheel events processed by :ref:`_gui_input()` will be passed to the parent control even if :ref:`mouse_filter` is set to :ref:`MOUSE_FILTER_STOP`. -You should disable it on the root of your UI if you do not want scroll events to go to the :ref:`Node._unhandled_input` processing. +You should disable it on the root of your UI if you do not want scroll events to go to the :ref:`Node._unhandled_input()` processing. \ **Note:** Because this property defaults to ``true``, this allows nested scrollable containers to work out of the box. @@ -1907,7 +1907,7 @@ The :ref:`Theme` resource this node and all its **Control** and :re The name of a theme type variation used by this **Control** to look up its own theme items. When empty, the class name of the node is used (e.g. ``Button`` for the :ref:`Button` control), as well as the class names of all parent classes (in order of inheritance). -When set, this property gives the highest priority to the type of the specified name. This type can in turn extend another type, forming a dependency chain. See :ref:`Theme.set_type_variation`. If the theme item cannot be found using this type or its base types, lookup falls back on the class names. +When set, this property gives the highest priority to the type of the specified name. This type can in turn extend another type, forming a dependency chain. See :ref:`Theme.set_type_variation()`. If the theme item cannot be found using this type or its base types, lookup falls back on the class names. \ **Note:** To look up **Control**'s own items use various ``get_theme_*`` methods without specifying ``theme_type``. @@ -1930,7 +1930,7 @@ When set, this property gives the highest priority to the type of the specified Defines if tooltip text should automatically change to its translated version depending on the current locale. Uses the same auto translate mode as this control when set to :ref:`Node.AUTO_TRANSLATE_MODE_INHERIT`. -\ **Note:** Tooltips customized using :ref:`_make_custom_tooltip` do not use this auto translate mode automatically. +\ **Note:** Tooltips customized using :ref:`_make_custom_tooltip()` do not use this auto translate mode automatically. .. rst-class:: classref-item-separator @@ -1949,9 +1949,9 @@ Defines if tooltip text should automatically change to its translated version de The default tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the :ref:`mouse_filter` property is not :ref:`MOUSE_FILTER_IGNORE`. The time required for the tooltip to appear can be changed with the :ref:`ProjectSettings.gui/timers/tooltip_delay_sec` setting. -This string is the default return value of :ref:`get_tooltip`. Override :ref:`_get_tooltip` to generate tooltip text dynamically. Override :ref:`_make_custom_tooltip` to customize the tooltip interface and behavior. +This string is the default return value of :ref:`get_tooltip()`. Override :ref:`_get_tooltip()` to generate tooltip text dynamically. Override :ref:`_make_custom_tooltip()` to customize the tooltip interface and behavior. -The tooltip popup will use either a default implementation, or a custom one that you can provide by overriding :ref:`_make_custom_tooltip`. The default tooltip includes a :ref:`PopupPanel` and :ref:`Label` whose theme properties can be customized using :ref:`Theme` methods with the ``"TooltipPanel"`` and ``"TooltipLabel"`` respectively. For example: +The tooltip popup will use either a default implementation, or a custom one that you can provide by overriding :ref:`_make_custom_tooltip()`. The default tooltip includes a :ref:`PopupPanel` and :ref:`Label` whose theme properties can be customized using :ref:`Theme` methods with the ``"TooltipPanel"`` and ``"TooltipLabel"`` respectively. For example: .. tabs:: @@ -1991,9 +1991,9 @@ Method Descriptions :ref:`bool` **_can_drop_data**\ (\ at_position\: :ref:`Vector2`, data\: :ref:`Variant`\ ) |virtual| |const| :ref:`πŸ”—` -Godot calls this method to test if ``data`` from a control's :ref:`_get_drag_data` can be dropped at ``at_position``. ``at_position`` is local to this control. +Godot calls this method to test if ``data`` from a control's :ref:`_get_drag_data()` can be dropped at ``at_position``. ``at_position`` is local to this control. -This method should only be used to test the data. Process the data in :ref:`_drop_data`. +This method should only be used to test the data. Process the data in :ref:`_drop_data()`. .. tabs:: @@ -2026,7 +2026,7 @@ This method should only be used to test the data. Process the data in :ref:`_dro |void| **_drop_data**\ (\ at_position\: :ref:`Vector2`, data\: :ref:`Variant`\ ) |virtual| :ref:`πŸ”—` -Godot calls this method to pass you the ``data`` from a control's :ref:`_get_drag_data` result. Godot first calls :ref:`_can_drop_data` to test if ``data`` is allowed to drop at ``at_position`` where ``at_position`` is local to this control. +Godot calls this method to pass you the ``data`` from a control's :ref:`_get_drag_data()` result. Godot first calls :ref:`_can_drop_data()` to test if ``data`` is allowed to drop at ``at_position`` where ``at_position`` is local to this control. .. tabs:: @@ -2063,9 +2063,9 @@ Godot calls this method to pass you the ``data`` from a control's :ref:`_get_dra :ref:`Variant` **_get_drag_data**\ (\ at_position\: :ref:`Vector2`\ ) |virtual| :ref:`πŸ”—` -Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns ``null`` if there is no data to drag. Controls that want to receive drop data should implement :ref:`_can_drop_data` and :ref:`_drop_data`. ``at_position`` is local to this control. Drag may be forced with :ref:`force_drag`. +Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns ``null`` if there is no data to drag. Controls that want to receive drop data should implement :ref:`_can_drop_data()` and :ref:`_drop_data()`. ``at_position`` is local to this control. Drag may be forced with :ref:`force_drag()`. -A preview that will follow the mouse that should represent the data can be set with :ref:`set_drag_preview`. A good time to set the preview is in this method. +A preview that will follow the mouse that should represent the data can be set with :ref:`set_drag_preview()`. A good time to set the preview is in this method. .. tabs:: @@ -2114,9 +2114,9 @@ If not overridden, defaults to :ref:`Vector2.ZERO`. :ref:`String` **_get_tooltip**\ (\ at_position\: :ref:`Vector2`\ ) |virtual| |const| :ref:`πŸ”—` -Virtual method to be implemented by the user. Returns the tooltip text for the position ``at_position`` in control's local coordinates, which will typically appear when the cursor is resting over this control. See :ref:`get_tooltip`. +Virtual method to be implemented by the user. Returns the tooltip text for the position ``at_position`` in control's local coordinates, which will typically appear when the cursor is resting over this control. See :ref:`get_tooltip()`. -\ **Note:** If this method returns an empty :ref:`String` and :ref:`_make_custom_tooltip` is not overridden, no tooltip is displayed. +\ **Note:** If this method returns an empty :ref:`String` and :ref:`_make_custom_tooltip()` is not overridden, no tooltip is displayed. .. rst-class:: classref-item-separator @@ -2128,7 +2128,7 @@ Virtual method to be implemented by the user. Returns the tooltip text for the p |void| **_gui_input**\ (\ event\: :ref:`InputEvent`\ ) |virtual| :ref:`πŸ”—` -Virtual method to be implemented by the user. Override this method to handle and accept inputs on UI elements. See also :ref:`accept_event`. +Virtual method to be implemented by the user. Override this method to handle and accept inputs on UI elements. See also :ref:`accept_event()`. \ **Example:** Click on the control to print a message: @@ -2167,7 +2167,7 @@ If the ``event`` inherits :ref:`InputEventMouse`, this me - the control's parent has :ref:`clip_contents` enabled and the ``event``'s position is outside the parent's rectangle; -- the ``event``'s position is outside the control (see :ref:`_has_point`). +- the ``event``'s position is outside the control (see :ref:`_has_point()`). \ **Note:** The ``event``'s position is relative to this control's origin. @@ -2197,17 +2197,17 @@ If not overridden, default behavior is checking if the point is within control's :ref:`Object` **_make_custom_tooltip**\ (\ for_text\: :ref:`String`\ ) |virtual| |const| :ref:`πŸ”—` -Virtual method to be implemented by the user. Returns a **Control** node that should be used as a tooltip instead of the default one. ``for_text`` is the return value of :ref:`get_tooltip`. +Virtual method to be implemented by the user. Returns a **Control** node that should be used as a tooltip instead of the default one. ``for_text`` is the return value of :ref:`get_tooltip()`. The returned node must be of type **Control** or Control-derived. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance (if you want to use a pre-existing node from your scene tree, you can duplicate it and pass the duplicated instance). When ``null`` or a non-Control node is returned, the default tooltip will be used instead. -The returned node will be added as child to a :ref:`PopupPanel`, so you should only provide the contents of that panel. That :ref:`PopupPanel` can be themed using :ref:`Theme.set_stylebox` for the type ``"TooltipPanel"`` (see :ref:`tooltip_text` for an example). +The returned node will be added as child to a :ref:`PopupPanel`, so you should only provide the contents of that panel. That :ref:`PopupPanel` can be themed using :ref:`Theme.set_stylebox()` for the type ``"TooltipPanel"`` (see :ref:`tooltip_text` for an example). \ **Note:** The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its :ref:`custom_minimum_size` to some non-zero value. \ **Note:** The node (and any relevant children) should have their :ref:`CanvasItem.visible` set to ``true`` when returned, otherwise, the viewport that instantiates it will not be able to calculate its minimum size reliably. -\ **Note:** If overridden, this method is called even if :ref:`get_tooltip` returns an empty string. When this happens with the default tooltip, it is not displayed. To copy this behavior, return ``null`` in this method when ``for_text`` is empty. +\ **Note:** If overridden, this method is called even if :ref:`get_tooltip()` returns an empty string. When this happens with the default tooltip, it is not displayed. To copy this behavior, return ``null`` in this method when ``for_text`` is empty. \ **Example:** Use a constructed node as a tooltip: @@ -2279,7 +2279,7 @@ Returns an :ref:`Array` of :ref:`Vector3i` text ran |void| **accept_event**\ (\ ) :ref:`πŸ”—` -Marks an input event as handled. Once you accept an input event, it stops propagating, even to nodes listening to :ref:`Node._unhandled_input` or :ref:`Node._unhandled_key_input`. +Marks an input event as handled. Once you accept an input event, it stops propagating, even to nodes listening to :ref:`Node._unhandled_input()` or :ref:`Node._unhandled_key_input()`. \ **Note:** This does not affect the methods in :ref:`Input`, only the way events are propagated. @@ -2293,9 +2293,9 @@ Marks an input event as handled. Once you accept an input event, it stops propag |void| **add_theme_color_override**\ (\ name\: :ref:`StringName`, color\: :ref:`Color`\ ) :ref:`πŸ”—` -Creates a local override for a theme :ref:`Color` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_color_override`. +Creates a local override for a theme :ref:`Color` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_color_override()`. -See also :ref:`get_theme_color`. +See also :ref:`get_theme_color()`. \ **Example:** Override a :ref:`Label`'s color and reset it later: @@ -2332,9 +2332,9 @@ See also :ref:`get_theme_color`. |void| **add_theme_constant_override**\ (\ name\: :ref:`StringName`, constant\: :ref:`int`\ ) :ref:`πŸ”—` -Creates a local override for a theme constant with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_constant_override`. +Creates a local override for a theme constant with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_constant_override()`. -See also :ref:`get_theme_constant`. +See also :ref:`get_theme_constant()`. .. rst-class:: classref-item-separator @@ -2346,9 +2346,9 @@ See also :ref:`get_theme_constant`. |void| **add_theme_font_override**\ (\ name\: :ref:`StringName`, font\: :ref:`Font`\ ) :ref:`πŸ”—` -Creates a local override for a theme :ref:`Font` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_font_override`. +Creates a local override for a theme :ref:`Font` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_font_override()`. -See also :ref:`get_theme_font`. +See also :ref:`get_theme_font()`. .. rst-class:: classref-item-separator @@ -2360,9 +2360,9 @@ See also :ref:`get_theme_font`. |void| **add_theme_font_size_override**\ (\ name\: :ref:`StringName`, font_size\: :ref:`int`\ ) :ref:`πŸ”—` -Creates a local override for a theme font size with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_font_size_override`. +Creates a local override for a theme font size with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_font_size_override()`. -See also :ref:`get_theme_font_size`. +See also :ref:`get_theme_font_size()`. .. rst-class:: classref-item-separator @@ -2374,9 +2374,9 @@ See also :ref:`get_theme_font_size`. |void| **add_theme_icon_override**\ (\ name\: :ref:`StringName`, texture\: :ref:`Texture2D`\ ) :ref:`πŸ”—` -Creates a local override for a theme icon with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_icon_override`. +Creates a local override for a theme icon with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_icon_override()`. -See also :ref:`get_theme_icon`. +See also :ref:`get_theme_icon()`. .. rst-class:: classref-item-separator @@ -2388,9 +2388,9 @@ See also :ref:`get_theme_icon`. |void| **add_theme_stylebox_override**\ (\ name\: :ref:`StringName`, stylebox\: :ref:`StyleBox`\ ) :ref:`πŸ”—` -Creates a local override for a theme :ref:`StyleBox` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_stylebox_override`. +Creates a local override for a theme :ref:`StyleBox` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_stylebox_override()`. -See also :ref:`get_theme_stylebox`. +See also :ref:`get_theme_stylebox()`. \ **Example:** Modify a property in a :ref:`StyleBox` by duplicating it: @@ -2433,7 +2433,7 @@ See also :ref:`get_theme_stylebox`. |void| **begin_bulk_theme_override**\ (\ ) :ref:`πŸ”—` -Prevents ``*_theme_*_override`` methods from emitting :ref:`NOTIFICATION_THEME_CHANGED` until :ref:`end_bulk_theme_override` is called. +Prevents ``*_theme_*_override`` methods from emitting :ref:`NOTIFICATION_THEME_CHANGED` until :ref:`end_bulk_theme_override()` is called. .. rst-class:: classref-item-separator @@ -2445,7 +2445,7 @@ Prevents ``*_theme_*_override`` methods from emitting :ref:`NOTIFICATION_THEME_C |void| **end_bulk_theme_override**\ (\ ) :ref:`πŸ”—` -Ends a bulk theme override update. See :ref:`begin_bulk_theme_override`. +Ends a bulk theme override update. See :ref:`begin_bulk_theme_override()`. .. rst-class:: classref-item-separator @@ -2483,7 +2483,7 @@ Finds the previous (above in the tree) **Control** that can receive the focus. Finds the next **Control** that can receive the focus on the specified :ref:`Side`. -\ **Note:** This is different from :ref:`get_focus_neighbor`, which returns the path of a specified focus neighbor. +\ **Note:** This is different from :ref:`get_focus_neighbor()`, which returns the path of a specified focus neighbor. .. rst-class:: classref-item-separator @@ -2495,9 +2495,9 @@ Finds the next **Control** that can receive the focus on the specified :ref:`Sid |void| **force_drag**\ (\ data\: :ref:`Variant`, preview\: :ref:`Control`\ ) :ref:`πŸ”—` -Forces drag and bypasses :ref:`_get_drag_data` and :ref:`set_drag_preview` by passing ``data`` and ``preview``. Drag will start even if the mouse is neither over nor pressed on this control. +Forces drag and bypasses :ref:`_get_drag_data()` and :ref:`set_drag_preview()` by passing ``data`` and ``preview``. Drag will start even if the mouse is neither over nor pressed on this control. -The methods :ref:`_can_drop_data` and :ref:`_drop_data` must be implemented on controls that want to receive drop data. +The methods :ref:`_can_drop_data()` and :ref:`_drop_data()` must be implemented on controls that want to receive drop data. .. rst-class:: classref-item-separator @@ -2533,7 +2533,7 @@ Returns :ref:`offset_left` and :ref:`offset_ :ref:`Vector2` **get_combined_minimum_size**\ (\ ) |const| :ref:`πŸ”—` -Returns combined minimum size from :ref:`custom_minimum_size` and :ref:`get_minimum_size`. +Returns combined minimum size from :ref:`custom_minimum_size` and :ref:`get_minimum_size()`. .. rst-class:: classref-item-separator @@ -2571,7 +2571,7 @@ Returns :ref:`offset_right` and :ref:`offse Returns the focus neighbor for the specified :ref:`Side`. A getter method for :ref:`focus_neighbor_bottom`, :ref:`focus_neighbor_left`, :ref:`focus_neighbor_right` and :ref:`focus_neighbor_top`. -\ **Note:** To find the next **Control** on the specific :ref:`Side`, even if a neighbor is not assigned, use :ref:`find_valid_focus_neighbor`. +\ **Note:** To find the next **Control** on the specific :ref:`Side`, even if a neighbor is not assigned, use :ref:`find_valid_focus_neighbor()`. .. rst-class:: classref-item-separator @@ -2687,7 +2687,7 @@ Equals to :ref:`global_position` if the Returns a :ref:`Color` from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a color item with the specified ``name`` and ``theme_type``. If ``theme_type`` is omitted the class name of the current control is used as the type, or :ref:`theme_type_variation` if it is defined. If the type is a class name its parent classes are also checked, in order of inheritance. If the type is a variation its base types are checked, in order of dependency, then the control's class name and its parent classes are checked. -For the current control its local overrides are considered first (see :ref:`add_theme_color_override`), then its assigned :ref:`theme`. After the current control, each parent control and its assigned :ref:`theme` are considered; controls without a :ref:`theme` assigned are skipped. If no matching :ref:`Theme` is found in the tree, the custom project :ref:`Theme` (see :ref:`ProjectSettings.gui/theme/custom`) and the default :ref:`Theme` are used (see :ref:`ThemeDB`). +For the current control its local overrides are considered first (see :ref:`add_theme_color_override()`), then its assigned :ref:`theme`. After the current control, each parent control and its assigned :ref:`theme` are considered; controls without a :ref:`theme` assigned are skipped. If no matching :ref:`Theme` is found in the tree, the custom project :ref:`Theme` (see :ref:`ProjectSettings.gui/theme/custom`) and the default :ref:`Theme` are used (see :ref:`ThemeDB`). .. tabs:: @@ -2724,7 +2724,7 @@ For the current control its local overrides are considered first (see :ref:`add_ Returns a constant from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a constant item with the specified ``name`` and ``theme_type``. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2738,7 +2738,7 @@ See :ref:`get_theme_color` for details. Returns the default base scale value from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a valid :ref:`Theme.default_base_scale` value. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2752,7 +2752,7 @@ See :ref:`get_theme_color` for details. Returns the default font from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a valid :ref:`Theme.default_font` value. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2766,7 +2766,7 @@ See :ref:`get_theme_color` for details. Returns the default font size value from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a valid :ref:`Theme.default_font_size` value. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2780,7 +2780,7 @@ See :ref:`get_theme_color` for details. Returns a :ref:`Font` from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a font item with the specified ``name`` and ``theme_type``. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2794,7 +2794,7 @@ See :ref:`get_theme_color` for details. Returns a font size from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a font size item with the specified ``name`` and ``theme_type``. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2808,7 +2808,7 @@ See :ref:`get_theme_color` for details. Returns an icon from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has an icon item with the specified ``name`` and ``theme_type``. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2822,7 +2822,7 @@ See :ref:`get_theme_color` for details. Returns a :ref:`StyleBox` from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a stylebox item with the specified ``name`` and ``theme_type``. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2836,9 +2836,9 @@ See :ref:`get_theme_color` for details. Returns the tooltip text for the position ``at_position`` in control's local coordinates, which will typically appear when the cursor is resting over this control. By default, it returns :ref:`tooltip_text`. -This method can be overridden to customize its behavior. See :ref:`_get_tooltip`. +This method can be overridden to customize its behavior. See :ref:`_get_tooltip()`. -\ **Note:** If this method returns an empty :ref:`String` and :ref:`_make_custom_tooltip` is not overridden, no tooltip is displayed. +\ **Note:** If this method returns an empty :ref:`String` and :ref:`_make_custom_tooltip()` is not overridden, no tooltip is displayed. .. rst-class:: classref-item-separator @@ -2881,7 +2881,7 @@ Creates an :ref:`InputEventMouseButton` that attemp Steal the focus from another control and become the focused control (see :ref:`focus_mode`). -\ **Note:** Using this method together with :ref:`Callable.call_deferred` makes it more reliable, especially when called inside :ref:`Node._ready`. +\ **Note:** Using this method together with :ref:`Callable.call_deferred()` makes it more reliable, especially when called inside :ref:`Node._ready()`. .. rst-class:: classref-item-separator @@ -2907,7 +2907,7 @@ Returns ``true`` if this is the current focused control. See :ref:`focus_mode` in the tree that has a color item with the specified ``name`` and ``theme_type``. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2921,7 +2921,7 @@ See :ref:`get_theme_color` for details. Returns ``true`` if there is a local override for a theme :ref:`Color` with the specified ``name`` in this **Control** node. -See :ref:`add_theme_color_override`. +See :ref:`add_theme_color_override()`. .. rst-class:: classref-item-separator @@ -2935,7 +2935,7 @@ See :ref:`add_theme_color_override` in the tree that has a constant item with the specified ``name`` and ``theme_type``. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2949,7 +2949,7 @@ See :ref:`get_theme_color` for details. Returns ``true`` if there is a local override for a theme constant with the specified ``name`` in this **Control** node. -See :ref:`add_theme_constant_override`. +See :ref:`add_theme_constant_override()`. .. rst-class:: classref-item-separator @@ -2963,7 +2963,7 @@ See :ref:`add_theme_constant_override` in the tree that has a font item with the specified ``name`` and ``theme_type``. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2977,7 +2977,7 @@ See :ref:`get_theme_color` for details. Returns ``true`` if there is a local override for a theme :ref:`Font` with the specified ``name`` in this **Control** node. -See :ref:`add_theme_font_override`. +See :ref:`add_theme_font_override()`. .. rst-class:: classref-item-separator @@ -2991,7 +2991,7 @@ See :ref:`add_theme_font_override` Returns ``true`` if there is a matching :ref:`Theme` in the tree that has a font size item with the specified ``name`` and ``theme_type``. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -3005,7 +3005,7 @@ See :ref:`get_theme_color` for details. Returns ``true`` if there is a local override for a theme font size with the specified ``name`` in this **Control** node. -See :ref:`add_theme_font_size_override`. +See :ref:`add_theme_font_size_override()`. .. rst-class:: classref-item-separator @@ -3019,7 +3019,7 @@ See :ref:`add_theme_font_size_override` in the tree that has an icon item with the specified ``name`` and ``theme_type``. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -3033,7 +3033,7 @@ See :ref:`get_theme_color` for details. Returns ``true`` if there is a local override for a theme icon with the specified ``name`` in this **Control** node. -See :ref:`add_theme_icon_override`. +See :ref:`add_theme_icon_override()`. .. rst-class:: classref-item-separator @@ -3047,7 +3047,7 @@ See :ref:`add_theme_icon_override` Returns ``true`` if there is a matching :ref:`Theme` in the tree that has a stylebox item with the specified ``name`` and ``theme_type``. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -3061,7 +3061,7 @@ See :ref:`get_theme_color` for details. Returns ``true`` if there is a local override for a theme :ref:`StyleBox` with the specified ``name`` in this **Control** node. -See :ref:`add_theme_stylebox_override`. +See :ref:`add_theme_stylebox_override()`. .. rst-class:: classref-item-separator @@ -3073,7 +3073,7 @@ See :ref:`add_theme_stylebox_override` **is_drag_successful**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if a drag operation is successful. Alternative to :ref:`Viewport.gui_is_drag_successful`. +Returns ``true`` if a drag operation is successful. Alternative to :ref:`Viewport.gui_is_drag_successful()`. Best used with :ref:`Node.NOTIFICATION_DRAG_END`. @@ -3087,7 +3087,7 @@ Best used with :ref:`Node.NOTIFICATION_DRAG_END` **is_layout_rtl**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if layout is right-to-left. +Returns ``true`` if layout is right-to-left. See also :ref:`layout_direction`. .. rst-class:: classref-item-separator @@ -3111,7 +3111,7 @@ Give up the focus. No other control will be able to receive input. |void| **remove_theme_color_override**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Removes a local override for a theme :ref:`Color` with the specified ``name`` previously added by :ref:`add_theme_color_override` or via the Inspector dock. +Removes a local override for a theme :ref:`Color` with the specified ``name`` previously added by :ref:`add_theme_color_override()` or via the Inspector dock. .. rst-class:: classref-item-separator @@ -3123,7 +3123,7 @@ Removes a local override for a theme :ref:`Color` with the specifie |void| **remove_theme_constant_override**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Removes a local override for a theme constant with the specified ``name`` previously added by :ref:`add_theme_constant_override` or via the Inspector dock. +Removes a local override for a theme constant with the specified ``name`` previously added by :ref:`add_theme_constant_override()` or via the Inspector dock. .. rst-class:: classref-item-separator @@ -3135,7 +3135,7 @@ Removes a local override for a theme constant with the specified ``name`` previo |void| **remove_theme_font_override**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Removes a local override for a theme :ref:`Font` with the specified ``name`` previously added by :ref:`add_theme_font_override` or via the Inspector dock. +Removes a local override for a theme :ref:`Font` with the specified ``name`` previously added by :ref:`add_theme_font_override()` or via the Inspector dock. .. rst-class:: classref-item-separator @@ -3147,7 +3147,7 @@ Removes a local override for a theme :ref:`Font` with the specified |void| **remove_theme_font_size_override**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Removes a local override for a theme font size with the specified ``name`` previously added by :ref:`add_theme_font_size_override` or via the Inspector dock. +Removes a local override for a theme font size with the specified ``name`` previously added by :ref:`add_theme_font_size_override()` or via the Inspector dock. .. rst-class:: classref-item-separator @@ -3159,7 +3159,7 @@ Removes a local override for a theme font size with the specified ``name`` previ |void| **remove_theme_icon_override**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Removes a local override for a theme icon with the specified ``name`` previously added by :ref:`add_theme_icon_override` or via the Inspector dock. +Removes a local override for a theme icon with the specified ``name`` previously added by :ref:`add_theme_icon_override()` or via the Inspector dock. .. rst-class:: classref-item-separator @@ -3171,7 +3171,7 @@ Removes a local override for a theme icon with the specified ``name`` previously |void| **remove_theme_stylebox_override**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Removes a local override for a theme :ref:`StyleBox` with the specified ``name`` previously added by :ref:`add_theme_stylebox_override` or via the Inspector dock. +Removes a local override for a theme :ref:`StyleBox` with the specified ``name`` previously added by :ref:`add_theme_stylebox_override()` or via the Inspector dock. .. rst-class:: classref-item-separator @@ -3183,7 +3183,7 @@ Removes a local override for a theme :ref:`StyleBox` with the sp |void| **reset_size**\ (\ ) :ref:`πŸ”—` -Resets the size to :ref:`get_combined_minimum_size`. This is equivalent to calling ``set_size(Vector2())`` (or any size below the minimum). +Resets the size to :ref:`get_combined_minimum_size()`. This is equivalent to calling ``set_size(Vector2())`` (or any size below the minimum). .. rst-class:: classref-item-separator @@ -3211,7 +3211,7 @@ If ``push_opposite_anchor`` is ``true`` and the opposite anchor overlaps this an |void| **set_anchor_and_offset**\ (\ side\: :ref:`Side`, anchor\: :ref:`float`, offset\: :ref:`float`, push_opposite_anchor\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Works the same as :ref:`set_anchor`, but instead of ``keep_offset`` argument and automatic update of offset, it allows to set the offset yourself (see :ref:`set_offset`). +Works the same as :ref:`set_anchor()`, but instead of ``keep_offset`` argument and automatic update of offset, it allows to set the offset yourself (see :ref:`set_offset()`). .. rst-class:: classref-item-separator @@ -3223,7 +3223,7 @@ Works the same as :ref:`set_anchor`, but instea |void| **set_anchors_and_offsets_preset**\ (\ preset\: :ref:`LayoutPreset`, resize_mode\: :ref:`LayoutPresetMode` = 0, margin\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Sets both anchor preset and offset preset. See :ref:`set_anchors_preset` and :ref:`set_offsets_preset`. +Sets both anchor preset and offset preset. See :ref:`set_anchors_preset()` and :ref:`set_offsets_preset()`. .. rst-class:: classref-item-separator @@ -3265,11 +3265,11 @@ Sets the given callables to be used instead of the control's own drag-and-drop v The arguments for each callable should be exactly the same as their respective virtual methods, which would be: -- ``drag_func`` corresponds to :ref:`_get_drag_data` and requires a :ref:`Vector2`; +- ``drag_func`` corresponds to :ref:`_get_drag_data()` and requires a :ref:`Vector2`; -- ``can_drop_func`` corresponds to :ref:`_can_drop_data` and requires both a :ref:`Vector2` and a :ref:`Variant`; +- ``can_drop_func`` corresponds to :ref:`_can_drop_data()` and requires both a :ref:`Vector2` and a :ref:`Variant`; -- ``drop_func`` corresponds to :ref:`_drop_data` and requires both a :ref:`Vector2` and a :ref:`Variant`. +- ``drop_func`` corresponds to :ref:`_drop_data()` and requires both a :ref:`Vector2` and a :ref:`Variant`. .. rst-class:: classref-item-separator @@ -3281,7 +3281,7 @@ The arguments for each callable should be exactly the same as their respective v |void| **set_drag_preview**\ (\ control\: :ref:`Control`\ ) :ref:`πŸ”—` -Shows the given control at the mouse pointer. A good time to call this method is in :ref:`_get_drag_data`. The control must not be in the scene tree. You should not free the control, and you should not keep a reference to the control beyond the duration of the drag. It will be deleted automatically after the drag has ended. +Shows the given control at the mouse pointer. A good time to call this method is in :ref:`_get_drag_data()`. The control must not be in the scene tree. You should not free the control, and you should not keep a reference to the control beyond the duration of the drag. It will be deleted automatically after the drag has ended. .. tabs:: @@ -3419,7 +3419,7 @@ If ``keep_offsets`` is ``true``, control's anchors will be updated instead of of |void| **update_minimum_size**\ (\ ) :ref:`πŸ”—` -Invalidates the size cache in this node and in parent nodes up to top level. Intended to be used with :ref:`get_minimum_size` when the return value is changed. Setting :ref:`custom_minimum_size` directly calls this method automatically. +Invalidates the size cache in this node and in parent nodes up to top level. Intended to be used with :ref:`get_minimum_size()` when the return value is changed. Setting :ref:`custom_minimum_size` directly calls this method automatically. .. rst-class:: classref-item-separator @@ -3433,7 +3433,7 @@ Invalidates the size cache in this node and in parent nodes up to top level. Int Moves the mouse cursor to ``position``, relative to :ref:`position` of this **Control**. -\ **Note:** :ref:`warp_mouse` is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web. +\ **Note:** :ref:`warp_mouse()` is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web. .. |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_convexpolygonshape2d.rst b/classes/class_convexpolygonshape2d.rst index c7cfd07a7..13789a04c 100644 --- a/classes/class_convexpolygonshape2d.rst +++ b/classes/class_convexpolygonshape2d.rst @@ -73,7 +73,7 @@ Property Descriptions The polygon's list of vertices that form a convex hull. Can be in either clockwise or counterclockwise order. -\ **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. +\ **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. @@ -92,7 +92,7 @@ Method Descriptions |void| **set_point_cloud**\ (\ point_cloud\: :ref:`PackedVector2Array`\ ) :ref:`πŸ”—` -Based on the set of points provided, this assigns the :ref:`points` property using the convex hull algorithm, removing all unneeded points. See :ref:`Geometry2D.convex_hull` for details. +Based on the set of points provided, this assigns the :ref:`points` property using the convex hull algorithm, removing all unneeded points. See :ref:`Geometry2D.convex_hull()` for 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_convexpolygonshape3d.rst b/classes/class_convexpolygonshape3d.rst index bf5a6e176..af9dea705 100644 --- a/classes/class_convexpolygonshape3d.rst +++ b/classes/class_convexpolygonshape3d.rst @@ -23,7 +23,7 @@ A 3D convex polyhedron shape, intended for use in physics. Usually used to provi \ **ConvexPolygonShape3D** is *solid*, which means it detects collisions from objects that are fully inside it, unlike :ref:`ConcavePolygonShape3D` which is hollow. This makes it more suitable for both detection and physics. -\ **Convex decomposition:** A concave polyhedron can be split up into several convex polyhedra. This allows dynamic physics bodies to have complex concave collisions (at a performance cost) and can be achieved by using several **ConvexPolygonShape3D** nodes. To generate a convex decomposition from a mesh, select the :ref:`MeshInstance3D` node, go to the **Mesh** menu that appears above the viewport, and choose **Create Multiple Convex Collision Siblings**. Alternatively, :ref:`MeshInstance3D.create_multiple_convex_collisions` can be called in a script to perform this decomposition at run-time. +\ **Convex decomposition:** A concave polyhedron can be split up into several convex polyhedra. This allows dynamic physics bodies to have complex concave collisions (at a performance cost) and can be achieved by using several **ConvexPolygonShape3D** nodes. To generate a convex decomposition from a mesh, select the :ref:`MeshInstance3D` node, go to the **Mesh** menu that appears above the viewport, and choose **Create Multiple Convex Collision Siblings**. Alternatively, :ref:`MeshInstance3D.create_multiple_convex_collisions()` can be called in a script to perform this decomposition at run-time. \ **Performance:** **ConvexPolygonShape3D** is faster to check collisions against compared to :ref:`ConcavePolygonShape3D`, but it is slower than primitive collision shapes such as :ref:`SphereShape3D` and :ref:`BoxShape3D`. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by primitive shapes. diff --git a/classes/class_cpuparticles2d.rst b/classes/class_cpuparticles2d.rst index 35b5e4a18..1c4f90b7d 100644 --- a/classes/class_cpuparticles2d.rst +++ b/classes/class_cpuparticles2d.rst @@ -272,7 +272,7 @@ enum **Parameter**: :ref:`πŸ”—` :ref:`Parameter` **PARAM_INITIAL_LINEAR_VELOCITY** = ``0`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set initial velocity properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set initial velocity properties. .. _class_CPUParticles2D_constant_PARAM_ANGULAR_VELOCITY: @@ -280,7 +280,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_ANGULAR_VELOCITY** = ``1`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set angular velocity properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set angular velocity properties. .. _class_CPUParticles2D_constant_PARAM_ORBIT_VELOCITY: @@ -288,7 +288,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_ORBIT_VELOCITY** = ``2`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set orbital velocity properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set orbital velocity properties. .. _class_CPUParticles2D_constant_PARAM_LINEAR_ACCEL: @@ -296,7 +296,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_LINEAR_ACCEL** = ``3`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set linear acceleration properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set linear acceleration properties. .. _class_CPUParticles2D_constant_PARAM_RADIAL_ACCEL: @@ -304,7 +304,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_RADIAL_ACCEL** = ``4`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set radial acceleration properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set radial acceleration properties. .. _class_CPUParticles2D_constant_PARAM_TANGENTIAL_ACCEL: @@ -312,7 +312,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_TANGENTIAL_ACCEL** = ``5`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set tangential acceleration properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set tangential acceleration properties. .. _class_CPUParticles2D_constant_PARAM_DAMPING: @@ -320,7 +320,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_DAMPING** = ``6`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set damping properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set damping properties. .. _class_CPUParticles2D_constant_PARAM_ANGLE: @@ -328,7 +328,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_ANGLE** = ``7`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set angle properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set angle properties. .. _class_CPUParticles2D_constant_PARAM_SCALE: @@ -336,7 +336,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_SCALE** = ``8`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set scale properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set scale properties. .. _class_CPUParticles2D_constant_PARAM_HUE_VARIATION: @@ -344,7 +344,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_HUE_VARIATION** = ``9`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set hue variation properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set hue variation properties. .. _class_CPUParticles2D_constant_PARAM_ANIM_SPEED: @@ -352,7 +352,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_ANIM_SPEED** = ``10`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set animation speed properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set animation speed properties. .. _class_CPUParticles2D_constant_PARAM_ANIM_OFFSET: @@ -360,7 +360,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_ANIM_OFFSET** = ``11`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set animation offset properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set animation offset properties. .. _class_CPUParticles2D_constant_PARAM_MAX: @@ -386,7 +386,7 @@ enum **ParticleFlags**: :ref:`πŸ”—` :ref:`ParticleFlags` **PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY** = ``0`` -Use with :ref:`set_particle_flag` to set :ref:`particle_flag_align_y`. +Use with :ref:`set_particle_flag()` to set :ref:`particle_flag_align_y`. .. _class_CPUParticles2D_constant_PARTICLE_FLAG_ROTATE_Y: @@ -1711,7 +1711,7 @@ Returns the enabled state of the given particle flag (see :ref:`ParticleFlags` or by calling :ref:`restart` with parameter ``keep_seed`` set to ``true``. +Useful for particle playback, if used in combination with :ref:`use_fixed_seed` or by calling :ref:`restart()` with parameter ``keep_seed`` set to ``true``. .. rst-class:: classref-item-separator diff --git a/classes/class_cpuparticles3d.rst b/classes/class_cpuparticles3d.rst index d3f0b1bd6..6f19a3d19 100644 --- a/classes/class_cpuparticles3d.rst +++ b/classes/class_cpuparticles3d.rst @@ -300,7 +300,7 @@ enum **Parameter**: :ref:`πŸ”—` :ref:`Parameter` **PARAM_INITIAL_LINEAR_VELOCITY** = ``0`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set initial velocity properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set initial velocity properties. .. _class_CPUParticles3D_constant_PARAM_ANGULAR_VELOCITY: @@ -308,7 +308,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_ANGULAR_VELOCITY** = ``1`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set angular velocity properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set angular velocity properties. .. _class_CPUParticles3D_constant_PARAM_ORBIT_VELOCITY: @@ -316,7 +316,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_ORBIT_VELOCITY** = ``2`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set orbital velocity properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set orbital velocity properties. .. _class_CPUParticles3D_constant_PARAM_LINEAR_ACCEL: @@ -324,7 +324,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_LINEAR_ACCEL** = ``3`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set linear acceleration properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set linear acceleration properties. .. _class_CPUParticles3D_constant_PARAM_RADIAL_ACCEL: @@ -332,7 +332,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_RADIAL_ACCEL** = ``4`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set radial acceleration properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set radial acceleration properties. .. _class_CPUParticles3D_constant_PARAM_TANGENTIAL_ACCEL: @@ -340,7 +340,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_TANGENTIAL_ACCEL** = ``5`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set tangential acceleration properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set tangential acceleration properties. .. _class_CPUParticles3D_constant_PARAM_DAMPING: @@ -348,7 +348,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_DAMPING** = ``6`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set damping properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set damping properties. .. _class_CPUParticles3D_constant_PARAM_ANGLE: @@ -356,7 +356,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_ANGLE** = ``7`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set angle properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set angle properties. .. _class_CPUParticles3D_constant_PARAM_SCALE: @@ -364,7 +364,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_SCALE** = ``8`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set scale properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set scale properties. .. _class_CPUParticles3D_constant_PARAM_HUE_VARIATION: @@ -372,7 +372,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_HUE_VARIATION** = ``9`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set hue variation properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set hue variation properties. .. _class_CPUParticles3D_constant_PARAM_ANIM_SPEED: @@ -380,7 +380,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_ANIM_SPEED** = ``10`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set animation speed properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set animation speed properties. .. _class_CPUParticles3D_constant_PARAM_ANIM_OFFSET: @@ -388,7 +388,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_ANIM_OFFSET** = ``11`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set animation offset properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set animation offset properties. .. _class_CPUParticles3D_constant_PARAM_MAX: @@ -414,7 +414,7 @@ enum **ParticleFlags**: :ref:`πŸ”—` :ref:`ParticleFlags` **PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY** = ``0`` -Use with :ref:`set_particle_flag` to set :ref:`particle_flag_align_y`. +Use with :ref:`set_particle_flag()` to set :ref:`particle_flag_align_y`. .. _class_CPUParticles3D_constant_PARTICLE_FLAG_ROTATE_Y: @@ -422,7 +422,7 @@ Use with :ref:`set_particle_flag` :ref:`ParticleFlags` **PARTICLE_FLAG_ROTATE_Y** = ``1`` -Use with :ref:`set_particle_flag` to set :ref:`particle_flag_rotate_y`. +Use with :ref:`set_particle_flag()` to set :ref:`particle_flag_rotate_y`. .. _class_CPUParticles3D_constant_PARTICLE_FLAG_DISABLE_Z: @@ -430,7 +430,7 @@ Use with :ref:`set_particle_flag` :ref:`ParticleFlags` **PARTICLE_FLAG_DISABLE_Z** = ``2`` -Use with :ref:`set_particle_flag` to set :ref:`particle_flag_disable_z`. +Use with :ref:`set_particle_flag()` to set :ref:`particle_flag_disable_z`. .. _class_CPUParticles3D_constant_PARTICLE_FLAG_MAX: @@ -1935,7 +1935,7 @@ Returns the enabled state of the given particle flag (see :ref:`ParticleFlags` or by calling :ref:`restart` with parameter ``keep_seed`` set to ``true``. +Useful for particle playback, if used in combination with :ref:`use_fixed_seed` or by calling :ref:`restart()` with parameter ``keep_seed`` set to ``true``. .. rst-class:: classref-item-separator diff --git a/classes/class_crypto.rst b/classes/class_crypto.rst index 83c6e1f61..d3596a96b 100644 --- a/classes/class_crypto.rst +++ b/classes/class_crypto.rst @@ -190,7 +190,7 @@ Generates a :ref:`PackedByteArray` of cryptographically s :ref:`CryptoKey` **generate_rsa**\ (\ size\: :ref:`int`\ ) :ref:`πŸ”—` -Generates an RSA :ref:`CryptoKey` that can be used for creating self-signed certificates and passed to :ref:`StreamPeerTLS.accept_stream`. +Generates an RSA :ref:`CryptoKey` that can be used for creating self-signed certificates and passed to :ref:`StreamPeerTLS.accept_stream()`. .. rst-class:: classref-item-separator diff --git a/classes/class_cryptokey.rst b/classes/class_cryptokey.rst index f774b0904..8153734aa 100644 --- a/classes/class_cryptokey.rst +++ b/classes/class_cryptokey.rst @@ -21,7 +21,7 @@ Description The CryptoKey class represents a cryptographic key. Keys can be loaded and saved like any other :ref:`Resource`. -They can be used to generate a self-signed :ref:`X509Certificate` via :ref:`Crypto.generate_self_signed_certificate` and as private key in :ref:`StreamPeerTLS.accept_stream` along with the appropriate certificate. +They can be used to generate a self-signed :ref:`X509Certificate` via :ref:`Crypto.generate_self_signed_certificate()` and as private key in :ref:`StreamPeerTLS.accept_stream()` along with the appropriate certificate. .. rst-class:: classref-introduction-group diff --git a/classes/class_csgshape3d.rst b/classes/class_csgshape3d.rst index 3ce3d2211..399f7bf00 100644 --- a/classes/class_csgshape3d.rst +++ b/classes/class_csgshape3d.rst @@ -29,7 +29,7 @@ Consider baking final CSG operation results into static geometry that replaces t Individual CSG root node results can be baked to nodes with static resources with the editor menu that appears when a CSG root node is selected. -Individual CSG root nodes can also be baked to static resources with scripts by calling :ref:`bake_static_mesh` for the visual mesh or :ref:`bake_collision_shape` for the physics collision. +Individual CSG root nodes can also be baked to static resources with scripts by calling :ref:`bake_static_mesh()` for the visual mesh or :ref:`bake_collision_shape()` for the physics collision. Entire scenes of CSG nodes can be baked to static geometry and exported with the editor gltf scene exporter. diff --git a/classes/class_curve2d.rst b/classes/class_curve2d.rst index 599fb5a84..18e27bc57 100644 --- a/classes/class_curve2d.rst +++ b/classes/class_curve2d.rst @@ -105,7 +105,7 @@ Property Descriptions - |void| **set_bake_interval**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_bake_interval**\ (\ ) -The distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time the :ref:`get_baked_points` or :ref:`get_baked_length` function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. +The distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time the :ref:`get_baked_points()` or :ref:`get_baked_length()` function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. .. rst-class:: classref-item-separator @@ -189,7 +189,7 @@ Returns the cache of points as a :ref:`PackedVector2Array` **get_closest_offset**\ (\ to_point\: :ref:`Vector2`\ ) |const| :ref:`πŸ”—` -Returns the closest offset to ``to_point``. This offset is meant to be used in :ref:`sample_baked`. +Returns the closest offset to ``to_point``. This offset is meant to be used in :ref:`sample_baked()`. \ ``to_point`` must be in this curve's local space. @@ -295,7 +295,7 @@ Cubic interpolation tends to follow the curves better, but linear is faster (and :ref:`Transform2D` **sample_baked_with_rotation**\ (\ offset\: :ref:`float` = 0.0, cubic\: :ref:`bool` = false\ ) |const| :ref:`πŸ”—` -Similar to :ref:`sample_baked`, but returns :ref:`Transform2D` that includes a rotation along the curve, with :ref:`Transform2D.origin` as the point position and the :ref:`Transform2D.x` vector pointing in the direction of the path at that point. Returns an empty transform if the length of the curve is ``0``. +Similar to :ref:`sample_baked()`, but returns :ref:`Transform2D` that includes a rotation along the curve, with :ref:`Transform2D.origin` as the point position and the :ref:`Transform2D.x` vector pointing in the direction of the path at that point. Returns an empty transform if the length of the curve is ``0``. :: @@ -316,7 +316,7 @@ Similar to :ref:`sample_baked`, but returns : :ref:`Vector2` **samplef**\ (\ fofs\: :ref:`float`\ ) |const| :ref:`πŸ”—` -Returns the position at the vertex ``fofs``. It calls :ref:`sample` using the integer part of ``fofs`` as ``idx``, and its fractional part as ``t``. +Returns the position at the vertex ``fofs``. It calls :ref:`sample()` using the integer part of ``fofs`` as ``idx``, and its fractional part as ``t``. .. rst-class:: classref-item-separator diff --git a/classes/class_curve3d.rst b/classes/class_curve3d.rst index 6727f668f..a5d77ffe4 100644 --- a/classes/class_curve3d.rst +++ b/classes/class_curve3d.rst @@ -119,7 +119,7 @@ Property Descriptions - |void| **set_bake_interval**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_bake_interval**\ (\ ) -The distance in meters between two adjacent cached points. Changing it forces the cache to be recomputed the next time the :ref:`get_baked_points` or :ref:`get_baked_length` function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. +The distance in meters between two adjacent cached points. Changing it forces the cache to be recomputed the next time the :ref:`get_baked_points()` or :ref:`get_baked_length()` function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. .. rst-class:: classref-item-separator @@ -263,7 +263,7 @@ If :ref:`up_vector_enabled` is ``false :ref:`float` **get_closest_offset**\ (\ to_point\: :ref:`Vector3`\ ) |const| :ref:`πŸ”—` -Returns the closest offset to ``to_point``. This offset is meant to be used in :ref:`sample_baked` or :ref:`sample_baked_up_vector`. +Returns the closest offset to ``to_point``. This offset is meant to be used in :ref:`sample_baked()` or :ref:`sample_baked_up_vector()`. \ ``to_point`` must be in this curve's local space. @@ -393,7 +393,7 @@ If the curve has no up vectors, the function sends an error to the console, and :ref:`Transform3D` **sample_baked_with_rotation**\ (\ offset\: :ref:`float` = 0.0, cubic\: :ref:`bool` = false, apply_tilt\: :ref:`bool` = false\ ) |const| :ref:`πŸ”—` -Returns a :ref:`Transform3D` with ``origin`` as point position, ``basis.x`` as sideway vector, ``basis.y`` as up vector, ``basis.z`` as forward vector. When the curve length is 0, there is no reasonable way to calculate the rotation, all vectors aligned with global space axes. See also :ref:`sample_baked`. +Returns a :ref:`Transform3D` with ``origin`` as point position, ``basis.x`` as sideway vector, ``basis.y`` as up vector, ``basis.z`` as forward vector. When the curve length is 0, there is no reasonable way to calculate the rotation, all vectors aligned with global space axes. See also :ref:`sample_baked()`. .. rst-class:: classref-item-separator @@ -405,7 +405,7 @@ Returns a :ref:`Transform3D` with ``origin`` as point positio :ref:`Vector3` **samplef**\ (\ fofs\: :ref:`float`\ ) |const| :ref:`πŸ”—` -Returns the position at the vertex ``fofs``. It calls :ref:`sample` using the integer part of ``fofs`` as ``idx``, and its fractional part as ``t``. +Returns the position at the vertex ``fofs``. It calls :ref:`sample()` using the integer part of ``fofs`` as ``idx``, and its fractional part as ``t``. .. rst-class:: classref-item-separator diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index 8c8df2f4f..cb1f17a6b 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -185,7 +185,7 @@ The keys of a dictionary can be iterated with the ``for`` keyword: -\ **Note:** Dictionaries are always passed by reference. To get a copy of a dictionary which can be modified independently of the original dictionary, use :ref:`duplicate`. +\ **Note:** Dictionaries are always passed by reference. To get a copy of a dictionary which can be modified independently of the original dictionary, use :ref:`duplicate()`. \ **Note:** Erasing elements while iterating over dictionaries is **not** supported and will result in unpredictable behavior. @@ -347,7 +347,7 @@ Creates a typed dictionary from the ``base`` dictionary. A typed dictionary can :ref:`Dictionary` **Dictionary**\ (\ from\: :ref:`Dictionary`\ ) -Returns the same dictionary as ``from``. If you need a copy of the dictionary, use :ref:`duplicate`. +Returns the same dictionary as ``from``. If you need a copy of the dictionary, use :ref:`duplicate()`. .. rst-class:: classref-section-separator @@ -402,7 +402,7 @@ Creates and returns a new copy of the dictionary. If ``deep`` is ``true``, inner Removes the dictionary entry by key, if it exists. Returns ``true`` if the given ``key`` existed in the dictionary, otherwise ``false``. -\ **Note:** Do not erase entries while iterating over the dictionary. You can iterate over the :ref:`keys` array instead. +\ **Note:** Do not erase entries while iterating over the dictionary. You can iterate over the :ref:`keys()` array instead. .. rst-class:: classref-item-separator @@ -416,7 +416,7 @@ Removes the dictionary entry by key, if it exists. Returns ``true`` if the given Finds and returns the first key whose associated value is equal to ``value``, or ``null`` if it is not found. -\ **Note:** ``null`` is also a valid key. If inside the dictionary, :ref:`find_key` may give misleading results. +\ **Note:** ``null`` is also a valid key. If inside the dictionary, :ref:`find_key()` may give misleading results. .. rst-class:: classref-item-separator @@ -440,7 +440,7 @@ Returns the corresponding value for the given ``key`` in the dictionary. If the :ref:`Variant` **get_or_add**\ (\ key\: :ref:`Variant`, default\: :ref:`Variant` = null\ ) :ref:`πŸ”—` -Gets a value and ensures the key is set. If the ``key`` exists in the dictionary, this behaves like :ref:`get`. Otherwise, the ``default`` value is inserted into the dictionary and returned. +Gets a value and ensures the key is set. If the ``key`` exists in the dictionary, this behaves like :ref:`get()`. Otherwise, the ``default`` value is inserted into the dictionary and returned. .. rst-class:: classref-item-separator @@ -452,7 +452,7 @@ Gets a value and ensures the key is set. If the ``key`` exists in the dictionary :ref:`int` **get_typed_key_builtin**\ (\ ) |const| :ref:`πŸ”—` -Returns the built-in :ref:`Variant` type of the typed dictionary's keys as a :ref:`Variant.Type` constant. If the keys are not typed, returns :ref:`@GlobalScope.TYPE_NIL`. See also :ref:`is_typed_key`. +Returns the built-in :ref:`Variant` type of the typed dictionary's keys as a :ref:`Variant.Type` constant. If the keys are not typed, returns :ref:`@GlobalScope.TYPE_NIL`. See also :ref:`is_typed_key()`. .. rst-class:: classref-item-separator @@ -464,7 +464,7 @@ Returns the built-in :ref:`Variant` type of the typed dictionary' :ref:`StringName` **get_typed_key_class_name**\ (\ ) |const| :ref:`πŸ”—` -Returns the **built-in** class name of the typed dictionary's keys, if the built-in :ref:`Variant` type is :ref:`@GlobalScope.TYPE_OBJECT`. Otherwise, returns an empty :ref:`StringName`. See also :ref:`is_typed_key` and :ref:`Object.get_class`. +Returns the **built-in** class name of the typed dictionary's keys, if the built-in :ref:`Variant` type is :ref:`@GlobalScope.TYPE_OBJECT`. Otherwise, returns an empty :ref:`StringName`. See also :ref:`is_typed_key()` and :ref:`Object.get_class()`. .. rst-class:: classref-item-separator @@ -476,7 +476,7 @@ Returns the **built-in** class name of the typed dictionary's keys, if the built :ref:`Variant` **get_typed_key_script**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`Script` instance associated with this typed dictionary's keys, or ``null`` if it does not exist. See also :ref:`is_typed_key`. +Returns the :ref:`Script` instance associated with this typed dictionary's keys, or ``null`` if it does not exist. See also :ref:`is_typed_key()`. .. rst-class:: classref-item-separator @@ -488,7 +488,7 @@ Returns the :ref:`Script` instance associated with this typed dict :ref:`int` **get_typed_value_builtin**\ (\ ) |const| :ref:`πŸ”—` -Returns the built-in :ref:`Variant` type of the typed dictionary's values as a :ref:`Variant.Type` constant. If the values are not typed, returns :ref:`@GlobalScope.TYPE_NIL`. See also :ref:`is_typed_value`. +Returns the built-in :ref:`Variant` type of the typed dictionary's values as a :ref:`Variant.Type` constant. If the values are not typed, returns :ref:`@GlobalScope.TYPE_NIL`. See also :ref:`is_typed_value()`. .. rst-class:: classref-item-separator @@ -500,7 +500,7 @@ Returns the built-in :ref:`Variant` type of the typed dictionary' :ref:`StringName` **get_typed_value_class_name**\ (\ ) |const| :ref:`πŸ”—` -Returns the **built-in** class name of the typed dictionary's values, if the built-in :ref:`Variant` type is :ref:`@GlobalScope.TYPE_OBJECT`. Otherwise, returns an empty :ref:`StringName`. See also :ref:`is_typed_value` and :ref:`Object.get_class`. +Returns the **built-in** class name of the typed dictionary's values, if the built-in :ref:`Variant` type is :ref:`@GlobalScope.TYPE_OBJECT`. Otherwise, returns an empty :ref:`StringName`. See also :ref:`is_typed_value()` and :ref:`Object.get_class()`. .. rst-class:: classref-item-separator @@ -512,7 +512,7 @@ Returns the **built-in** class name of the typed dictionary's values, if the bui :ref:`Variant` **get_typed_value_script**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`Script` instance associated with this typed dictionary's values, or ``null`` if it does not exist. See also :ref:`is_typed_value`. +Returns the :ref:`Script` instance associated with this typed dictionary's values, or ``null`` if it does not exist. See also :ref:`is_typed_value()`. .. rst-class:: classref-item-separator @@ -626,7 +626,7 @@ Returns a hashed 32-bit integer value representing the dictionary contents. :ref:`bool` **is_empty**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the dictionary is empty (its size is ``0``). See also :ref:`size`. +Returns ``true`` if the dictionary is empty (its size is ``0``). See also :ref:`size()`. .. rst-class:: classref-item-separator @@ -638,7 +638,7 @@ Returns ``true`` if the dictionary is empty (its size is ``0``). See also :ref:` :ref:`bool` **is_read_only**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the dictionary is read-only. See :ref:`make_read_only`. Dictionaries are automatically read-only if declared with ``const`` keyword. +Returns ``true`` if the dictionary is read-only. See :ref:`make_read_only()`. Dictionaries are automatically read-only if declared with ``const`` keyword. .. rst-class:: classref-item-separator @@ -788,7 +788,7 @@ Adds entries from ``dictionary`` to this dictionary. By default, duplicate keys -\ **Note:** :ref:`merge` is *not* recursive. Nested dictionaries are considered as keys that can be overwritten or not depending on the value of ``overwrite``, but they will never be merged together. +\ **Note:** :ref:`merge()` is *not* recursive. Nested dictionaries are considered as keys that can be overwritten or not depending on the value of ``overwrite``, but they will never be merged together. .. rst-class:: classref-item-separator @@ -800,7 +800,7 @@ Adds entries from ``dictionary`` to this dictionary. By default, duplicate keys :ref:`Dictionary` **merged**\ (\ dictionary\: :ref:`Dictionary`, overwrite\: :ref:`bool` = false\ ) |const| :ref:`πŸ”—` -Returns a copy of this dictionary merged with the other ``dictionary``. By default, duplicate keys are not copied over, unless ``overwrite`` is ``true``. See also :ref:`merge`. +Returns a copy of this dictionary merged with the other ``dictionary``. By default, duplicate keys are not copied over, unless ``overwrite`` is ``true``. See also :ref:`merge()`. This method is useful for quickly making dictionaries with default values: @@ -847,7 +847,7 @@ Sets the value of the element at the given ``key`` to the given ``value``. This :ref:`int` **size**\ (\ ) |const| :ref:`πŸ”—` -Returns the number of entries in the dictionary. Empty dictionaries (``{ }``) always return ``0``. See also :ref:`is_empty`. +Returns the number of entries in the dictionary. Empty dictionaries (``{ }``) always return ``0``. See also :ref:`is_empty()`. .. rst-class:: classref-item-separator @@ -859,7 +859,7 @@ Returns the number of entries in the dictionary. Empty dictionaries (``{ }``) al |void| **sort**\ (\ ) :ref:`πŸ”—` -Sorts the dictionary in-place by key. This can be used to ensure dictionaries with the same contents produce equivalent results when getting the :ref:`keys`, getting the :ref:`values`, and converting to a string. This is also useful when wanting a JSON representation consistent with what is in memory, and useful for storing on a database that requires dictionaries to be sorted. +Sorts the dictionary in-place by key. This can be used to ensure dictionaries with the same contents produce equivalent results when getting the :ref:`keys()`, getting the :ref:`values()`, and converting to a string. This is also useful when wanting a JSON representation consistent with what is in memory, and useful for storing on a database that requires dictionaries to be sorted. .. rst-class:: classref-item-separator @@ -914,7 +914,7 @@ Returns ``true`` if the two dictionaries contain the same keys and values. The o :ref:`Variant` **operator []**\ (\ key\: :ref:`Variant`\ ) :ref:`πŸ”—` -Returns the corresponding value for the given ``key`` in the dictionary. If the entry does not exist, fails and returns ``null``. For safe access, use :ref:`get` or :ref:`has`. +Returns the corresponding value for the given ``key`` in the dictionary. If the entry does not exist, fails and returns ``null``. For safe access, use :ref:`get()` or :ref:`has()`. .. |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_diraccess.rst b/classes/class_diraccess.rst index 90ac864ec..1a7764015 100644 --- a/classes/class_diraccess.rst +++ b/classes/class_diraccess.rst @@ -89,7 +89,7 @@ Here is an example on how to iterate through the files of a directory: -Keep in mind that file names may change or be remapped after export. If you want to see the actual resource file list as it appears in the editor, use :ref:`ResourceLoader.list_directory` instead. +Keep in mind that file names may change or be remapped after export. If you want to see the actual resource file list as it appears in the editor, use :ref:`ResourceLoader.list_directory()` instead. .. rst-class:: classref-introduction-group @@ -214,7 +214,7 @@ Property Descriptions If ``true``, hidden files are included when navigating the directory. -Affects :ref:`list_dir_begin`, :ref:`get_directories` and :ref:`get_files`. +Affects :ref:`list_dir_begin()`, :ref:`get_directories()` and :ref:`get_files()`. .. rst-class:: classref-item-separator @@ -233,7 +233,7 @@ Affects :ref:`list_dir_begin`, :ref:`get_ If ``true``, ``.`` and ``..`` are included when navigating the directory. -Affects :ref:`list_dir_begin` and :ref:`get_directories`. +Affects :ref:`list_dir_begin()` and :ref:`get_directories()`. .. rst-class:: classref-section-separator @@ -254,7 +254,7 @@ Changes the currently opened directory to the one passed as an argument. The arg Returns one of the :ref:`Error` code constants (:ref:`@GlobalScope.OK` on success). -\ **Note:** The new directory must be within the same scope, e.g. when you had opened a directory inside ``res://``, you can't change it to ``user://`` directory. If you need to open a directory in another access scope, use :ref:`open` to create a new instance instead. +\ **Note:** The new directory must be within the same scope, e.g. when you had opened a directory inside ``res://``, you can't change it to ``user://`` directory. If you need to open a directory in another access scope, use :ref:`open()` to create a new instance instead. .. rst-class:: classref-item-separator @@ -282,7 +282,7 @@ Returns one of the :ref:`Error` code constants (:ref:`@ :ref:`Error` **copy_absolute**\ (\ from\: :ref:`String`, to\: :ref:`String`, chmod_flags\: :ref:`int` = -1\ ) |static| :ref:`πŸ”—` -Static version of :ref:`copy`. Supports only absolute paths. +Static version of :ref:`copy()`. Supports only absolute paths. .. rst-class:: classref-item-separator @@ -316,7 +316,7 @@ If ``prefix`` is not empty, it will be prefixed to the directory name, separated If ``keep`` is ``true``, the directory is not deleted when the returned **DirAccess** is freed. -Returns ``null`` if opening the directory failed. You can use :ref:`get_open_error` to check the error that occurred. +Returns ``null`` if opening the directory failed. You can use :ref:`get_open_error()` to check the error that occurred. .. rst-class:: classref-item-separator @@ -328,7 +328,7 @@ Returns ``null`` if opening the directory failed. You can use :ref:`get_open_err :ref:`bool` **current_is_dir**\ (\ ) |const| :ref:`πŸ”—` -Returns whether the current item processed with the last :ref:`get_next` call is a directory (``.`` and ``..`` are considered directories). +Returns whether the current item processed with the last :ref:`get_next()` call is a directory (``.`` and ``..`` are considered directories). .. rst-class:: classref-item-separator @@ -354,7 +354,7 @@ Returns whether the target directory exists. The argument can be relative to the :ref:`bool` **dir_exists_absolute**\ (\ path\: :ref:`String`\ ) |static| :ref:`πŸ”—` -Static version of :ref:`dir_exists`. Supports only absolute paths. +Static version of :ref:`dir_exists()`. Supports only absolute paths. \ **Note:** The returned :ref:`bool` in the editor and after exporting when used on a path in the ``res://`` directory may be different. Some files are converted to engine-specific formats when exported, potentially changing the directory structure. @@ -370,9 +370,9 @@ Static version of :ref:`dir_exists`. Supports Returns whether the target file exists. The argument can be relative to the current directory, or an absolute path. -For a static equivalent, use :ref:`FileAccess.file_exists`. +For a static equivalent, use :ref:`FileAccess.file_exists()`. -\ **Note:** Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. See :ref:`ResourceLoader.exists` for an alternative approach that takes resource remapping into account. +\ **Note:** Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. See :ref:`ResourceLoader.exists()` for an alternative approach that takes resource remapping into account. .. rst-class:: classref-item-separator @@ -396,7 +396,7 @@ Returns the absolute path to the currently opened directory (e.g. ``res://folder :ref:`int` **get_current_drive**\ (\ ) :ref:`πŸ”—` -Returns the currently opened directory's drive index. See :ref:`get_drive_name` to convert returned index to the name of the drive. +Returns the currently opened directory's drive index. See :ref:`get_drive_name()` to convert returned index to the name of the drive. .. rst-class:: classref-item-separator @@ -426,7 +426,7 @@ Affected by :ref:`include_hidden` and : Returns a :ref:`PackedStringArray` containing filenames of the directory contents, excluding files, at the given ``path``. The array is sorted alphabetically. -Use :ref:`get_directories` if you want more control of what gets included. +Use :ref:`get_directories()` if you want more control of what gets included. \ **Note:** The returned directories in the editor and after exporting in the ``res://`` directory may differ as some files are converted to engine-specific formats when exported. @@ -494,7 +494,7 @@ Affected by :ref:`include_hidden`. Returns a :ref:`PackedStringArray` containing filenames of the directory contents, excluding directories, at the given ``path``. The array is sorted alphabetically. -Use :ref:`get_files` if you want more control of what gets included. +Use :ref:`get_files()` if you want more control of what gets included. \ **Note:** When used on a ``res://`` path in an exported project, only the files included in the PCK at the given folder level are returned. In practice, this means that since imported resources are stored in a top-level ``.godot/`` folder, only paths to ``.gd`` and ``.import`` files are returned (plus a few other files, such as ``project.godot`` or ``project.binary`` and the project icon). In an exported project, the list of returned files will also vary depending on :ref:`ProjectSettings.editor/export/convert_text_resources_to_binary`. @@ -510,7 +510,7 @@ Use :ref:`get_files` if you want more control Returns the next element (file or directory) in the current directory. -The name of the file or directory is returned (and not its full path). Once the stream has been fully processed, the method returns an empty :ref:`String` and closes the stream automatically (i.e. :ref:`list_dir_end` would not be mandatory in such a case). +The name of the file or directory is returned (and not its full path). Once the stream has been fully processed, the method returns an empty :ref:`String` and closes the stream automatically (i.e. :ref:`list_dir_end()` would not be mandatory in such a case). .. rst-class:: classref-item-separator @@ -522,7 +522,7 @@ The name of the file or directory is returned (and not its full path). Once the :ref:`Error` **get_open_error**\ (\ ) |static| :ref:`πŸ”—` -Returns the result of the last :ref:`open` call in the current thread. +Returns the result of the last :ref:`open()` call in the current thread. .. rst-class:: classref-item-separator @@ -588,11 +588,11 @@ Returns ``true`` if the file or directory is a symbolic link, directory junction :ref:`Error` **list_dir_begin**\ (\ ) :ref:`πŸ”—` -Initializes the stream used to list all files and directories using the :ref:`get_next` function, closing the currently opened stream if needed. Once the stream has been processed, it should typically be closed with :ref:`list_dir_end`. +Initializes the stream used to list all files and directories using the :ref:`get_next()` function, closing the currently opened stream if needed. Once the stream has been processed, it should typically be closed with :ref:`list_dir_end()`. Affected by :ref:`include_hidden` and :ref:`include_navigational`. -\ **Note:** The order of files and directories returned by this method is not deterministic, and can vary between operating systems. If you want a list of all files or folders sorted alphabetically, use :ref:`get_files` or :ref:`get_directories`. +\ **Note:** The order of files and directories returned by this method is not deterministic, and can vary between operating systems. If you want a list of all files or folders sorted alphabetically, use :ref:`get_files()` or :ref:`get_directories()`. .. rst-class:: classref-item-separator @@ -604,7 +604,7 @@ Affected by :ref:`include_hidden` and : |void| **list_dir_end**\ (\ ) :ref:`πŸ”—` -Closes the current stream opened with :ref:`list_dir_begin` (whether it has been fully processed with :ref:`get_next` does not matter). +Closes the current stream opened with :ref:`list_dir_begin()` (whether it has been fully processed with :ref:`get_next()` does not matter). .. rst-class:: classref-item-separator @@ -616,7 +616,7 @@ Closes the current stream opened with :ref:`list_dir_begin` **make_dir**\ (\ path\: :ref:`String`\ ) :ref:`πŸ”—` -Creates a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see :ref:`make_dir_recursive`). +Creates a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see :ref:`make_dir_recursive()`). Returns one of the :ref:`Error` code constants (:ref:`@GlobalScope.OK` on success). @@ -630,7 +630,7 @@ Returns one of the :ref:`Error` code constants (:ref:`@ :ref:`Error` **make_dir_absolute**\ (\ path\: :ref:`String`\ ) |static| :ref:`πŸ”—` -Static version of :ref:`make_dir`. Supports only absolute paths. +Static version of :ref:`make_dir()`. Supports only absolute paths. .. rst-class:: classref-item-separator @@ -642,7 +642,7 @@ Static version of :ref:`make_dir`. Supports onl :ref:`Error` **make_dir_recursive**\ (\ path\: :ref:`String`\ ) :ref:`πŸ”—` -Creates a target directory and all necessary intermediate directories in its path, by calling :ref:`make_dir` recursively. The argument can be relative to the current directory, or an absolute path. +Creates a target directory and all necessary intermediate directories in its path, by calling :ref:`make_dir()` recursively. The argument can be relative to the current directory, or an absolute path. Returns one of the :ref:`Error` code constants (:ref:`@GlobalScope.OK` on success). @@ -656,7 +656,7 @@ Returns one of the :ref:`Error` code constants (:ref:`@ :ref:`Error` **make_dir_recursive_absolute**\ (\ path\: :ref:`String`\ ) |static| :ref:`πŸ”—` -Static version of :ref:`make_dir_recursive`. Supports only absolute paths. +Static version of :ref:`make_dir_recursive()`. Supports only absolute paths. .. rst-class:: classref-item-separator @@ -670,7 +670,7 @@ Static version of :ref:`make_dir_recursive` to check the error that occurred. +Returns ``null`` if opening the directory failed. You can use :ref:`get_open_error()` to check the error that occurred. .. rst-class:: classref-item-separator @@ -698,7 +698,7 @@ Returns target of the symbolic link. Permanently deletes the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail. -If you don't want to delete the file/directory permanently, use :ref:`OS.move_to_trash` instead. +If you don't want to delete the file/directory permanently, use :ref:`OS.move_to_trash()` instead. Returns one of the :ref:`Error` code constants (:ref:`@GlobalScope.OK` on success). @@ -712,7 +712,7 @@ Returns one of the :ref:`Error` code constants (:ref:`@ :ref:`Error` **remove_absolute**\ (\ path\: :ref:`String`\ ) |static| :ref:`πŸ”—` -Static version of :ref:`remove`. Supports only absolute paths. +Static version of :ref:`remove()`. Supports only absolute paths. .. rst-class:: classref-item-separator @@ -738,7 +738,7 @@ Returns one of the :ref:`Error` code constants (:ref:`@ :ref:`Error` **rename_absolute**\ (\ from\: :ref:`String`, to\: :ref:`String`\ ) |static| :ref:`πŸ”—` -Static version of :ref:`rename`. Supports only absolute paths. +Static version of :ref:`rename()`. Supports only absolute paths. .. |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_displayserver.rst b/classes/class_displayserver.rst index afa313155..54857261e 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -508,7 +508,7 @@ Display server supports setting the mouse cursor shape to a custom image. **Wind :ref:`Feature` **FEATURE_NATIVE_DIALOG** = ``9`` -Display server supports spawning text dialogs using the operating system's native look-and-feel. See :ref:`dialog_show`. **Windows, macOS** +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: @@ -596,7 +596,7 @@ Display server supports expanding window content to the title. See :ref:`WINDOW_ :ref:`Feature` **FEATURE_SCREEN_CAPTURE** = ``21`` -Display server supports reading screen pixels. See :ref:`screen_get_pixel`. +Display server supports reading screen pixels. See :ref:`screen_get_pixel()`. .. _class_DisplayServer_constant_FEATURE_STATUS_INDICATOR: @@ -612,7 +612,7 @@ Display server supports application status indicators. :ref:`Feature` **FEATURE_NATIVE_HELP** = ``23`` -Display server supports native help system search callbacks. See :ref:`help_set_search_callbacks`. +Display server supports native help system search callbacks. See :ref:`help_set_search_callbacks()`. .. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_INPUT: @@ -620,7 +620,7 @@ Display server supports native help system search callbacks. See :ref:`help_set_ :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** +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: @@ -628,7 +628,7 @@ Display server supports spawning text input dialogs using the operating system's :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`. **Windows, macOS, Linux (X11/Wayland), Android** +Display server supports spawning dialogs for selecting files or directories using the operating system's native look-and-feel. See :ref:`file_dialog_show()`. **Windows, macOS, Linux (X11/Wayland), Android** .. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_FILE_EXTRA: @@ -636,7 +636,7 @@ Display server supports spawning dialogs for selecting files or directories usin :ref:`Feature` **FEATURE_NATIVE_DIALOG_FILE_EXTRA** = ``26`` -The display server supports all features of :ref:`FEATURE_NATIVE_DIALOG_FILE`, with the added functionality of Options and native dialog file access to ``res://`` and ``user://`` paths. See :ref:`file_dialog_show` and :ref:`file_dialog_with_options_show`. **Windows, macOS, Linux (X11/Wayland)** +The display server supports all features of :ref:`FEATURE_NATIVE_DIALOG_FILE`, with the added functionality of Options and native dialog file access to ``res://`` and ``user://`` paths. See :ref:`file_dialog_show()` and :ref:`file_dialog_with_options_show()`. **Windows, macOS, Linux (X11/Wayland)** .. _class_DisplayServer_constant_FEATURE_WINDOW_DRAG: @@ -644,7 +644,7 @@ The display server supports all features of :ref:`FEATURE_NATIVE_DIALOG_FILE` **FEATURE_WINDOW_DRAG** = ``27`` -The display server supports initiating window drag and resize operations on demand. See :ref:`window_start_drag` and :ref:`window_start_resize`. +The display server supports initiating window drag and resize operations on demand. See :ref:`window_start_drag()` and :ref:`window_start_resize()`. .. _class_DisplayServer_constant_FEATURE_SCREEN_EXCLUDE_FROM_CAPTURE: @@ -1174,7 +1174,7 @@ enum **WindowFlags**: :ref:`πŸ”—` :ref:`WindowFlags` **WINDOW_FLAG_RESIZE_DISABLED** = ``0`` -The window can't be resized by dragging its resize grip. It's still possible to resize the window using :ref:`window_set_size`. This flag is ignored for full screen windows. +The window can't be resized by dragging its resize grip. It's still possible to resize the window using :ref:`window_set_size()`. This flag is ignored for full screen windows. .. _class_DisplayServer_constant_WINDOW_FLAG_BORDERLESS: @@ -1200,7 +1200,7 @@ The window is floating on top of all other windows. This flag is ignored for ful The window background can be transparent. -\ **Note:** This flag has no effect if :ref:`is_window_transparency_available` returns ``false``. +\ **Note:** This flag has no effect if :ref:`is_window_transparency_available()` returns ``false``. \ **Note:** Transparency support is implemented on Linux (X11/Wayland), macOS, and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities. @@ -1218,7 +1218,7 @@ The window can't be focused. No-focus window will ignore all input, except mouse :ref:`WindowFlags` **WINDOW_FLAG_POPUP** = ``5`` -Window is part of menu or :ref:`OptionButton` dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have transient parent set (see :ref:`window_set_transient`). +Window is part of menu or :ref:`OptionButton` dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have transient parent set (see :ref:`window_set_transient()`). .. _class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE: @@ -1228,9 +1228,9 @@ Window is part of menu or :ref:`OptionButton` dropdown. This Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons. -Use :ref:`window_set_window_buttons_offset` to adjust minimize/maximize/close buttons offset. +Use :ref:`window_set_window_buttons_offset()` to adjust minimize/maximize/close buttons offset. -Use :ref:`window_get_safe_title_margins` to determine area under the title bar that is not covered by decorations. +Use :ref:`window_get_safe_title_margins()` to determine area under the title bar that is not covered by decorations. \ **Note:** This flag is implemented only on macOS. @@ -1258,7 +1258,7 @@ Window style is overridden, forcing sharp corners. :ref:`WindowFlags` **WINDOW_FLAG_EXCLUDE_FROM_CAPTURE** = ``9`` -Windows is excluded from screenshots taken by :ref:`screen_get_image`, :ref:`screen_get_image_rect`, and :ref:`screen_get_pixel`. +Windows is excluded from screenshots taken by :ref:`screen_get_image()`, :ref:`screen_get_image_rect()`, and :ref:`screen_get_pixel()`. \ **Note:** This flag is implemented on macOS and Windows. @@ -1826,7 +1826,7 @@ Creates a new application status indicator with the specified icon, tooltip, and :ref:`CursorShape` **cursor_get_shape**\ (\ ) |const| :ref:`πŸ”—` -Returns the default mouse cursor shape set by :ref:`cursor_set_shape`. +Returns the default mouse cursor shape set by :ref:`cursor_set_shape()`. .. rst-class:: classref-item-separator @@ -1840,7 +1840,7 @@ Returns the default mouse cursor shape set by :ref:`cursor_set_shape` or an :ref:`Image`, and it should not be larger than 256Γ—256 to display correctly. Optionally, ``hotspot`` can be set to offset the image's position relative to the click point. By default, ``hotspot`` is set to the top-left corner of the image. See also :ref:`cursor_set_shape`. +\ ``cursor`` can be either a :ref:`Texture2D` or an :ref:`Image`, and it should not be larger than 256Γ—256 to display correctly. Optionally, ``hotspot`` can be set to offset the image's position relative to the click point. By default, ``hotspot`` is set to the top-left corner of the image. See also :ref:`cursor_set_shape()`. .. rst-class:: classref-item-separator @@ -1852,7 +1852,7 @@ Sets a custom mouse cursor image for the given ``shape``. This means the user's |void| **cursor_set_shape**\ (\ shape\: :ref:`CursorShape`\ ) :ref:`πŸ”—` -Sets the default mouse cursor shape. The cursor's appearance will vary depending on the user's operating system and mouse cursor theme. See also :ref:`cursor_get_shape` and :ref:`cursor_set_custom_image`. +Sets the default mouse cursor shape. The cursor's appearance will vary depending on the user's operating system and mouse cursor theme. See also :ref:`cursor_get_shape()` and :ref:`cursor_set_custom_image()`. .. rst-class:: classref-item-separator @@ -1934,7 +1934,7 @@ Callbacks have the following arguments: ``status: bool, selected_paths: PackedSt \ **Note:** On Android and macOS, native file dialogs have no title. -\ **Note:** On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use :ref:`OS.get_granted_permissions` to get a list of saved bookmarks. +\ **Note:** On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use :ref:`OS.get_granted_permissions()` to get a list of saved bookmarks. .. rst-class:: classref-item-separator @@ -1970,7 +1970,7 @@ Callbacks have the following arguments: ``status: bool, selected_paths: PackedSt \ **Note:** On macOS, native file dialogs have no title. -\ **Note:** On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use :ref:`OS.get_granted_permissions` to get a list of saved bookmarks. +\ **Note:** On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use :ref:`OS.get_granted_permissions()` to get a list of saved bookmarks. .. rst-class:: classref-item-separator @@ -1982,7 +1982,7 @@ Callbacks have the following arguments: ``status: bool, selected_paths: PackedSt |void| **force_process_and_drop_events**\ (\ ) :ref:`πŸ”—` -Forces window manager processing while ignoring all :ref:`InputEvent`\ s. See also :ref:`process_events`. +Forces window manager processing while ignoring all :ref:`InputEvent`\ s. See also :ref:`process_events()`. \ **Note:** This method is implemented on Windows and macOS. @@ -2024,7 +2024,7 @@ Returns the OS theme base color (default control background). Returns ``Color(0, :ref:`Array`\[:ref:`Rect2`\] **get_display_cutouts**\ (\ ) |const| :ref:`πŸ”—` -Returns an :ref:`Array` of :ref:`Rect2`, each of which is the bounding rectangle for a display cutout or notch. These are non-functional areas on edge-to-edge screens used by cameras and sensors. Returns an empty array if the device does not have cutouts. See also :ref:`get_display_safe_area`. +Returns an :ref:`Array` of :ref:`Rect2`, each of which is the bounding rectangle for a display cutout or notch. These are non-functional areas on edge-to-edge screens used by cameras and sensors. Returns an empty array if the device does not have cutouts. See also :ref:`get_display_safe_area()`. \ **Note:** Currently only implemented on Android. Other platforms will return an empty array even if they do have display cutouts or notches. @@ -2038,9 +2038,9 @@ Returns an :ref:`Array` of :ref:`Rect2`, each of which :ref:`Rect2i` **get_display_safe_area**\ (\ ) |const| :ref:`πŸ”—` -Returns the unobscured area of the display where interactive controls should be rendered. See also :ref:`get_display_cutouts`. +Returns the unobscured area of the display where interactive controls should be rendered. See also :ref:`get_display_cutouts()`. -\ **Note:** Currently only implemented on Android and iOS. On other platforms, ``screen_get_usable_rect(SCREEN_OF_MAIN_WINDOW)`` will be returned as a fallback. See also :ref:`screen_get_usable_rect`. +\ **Note:** Currently only implemented on Android and iOS. On other platforms, ``screen_get_usable_rect(SCREEN_OF_MAIN_WINDOW)`` will be returned as a fallback. See also :ref:`screen_get_usable_rect()`. .. rst-class:: classref-item-separator @@ -2116,7 +2116,7 @@ Returns the index of the screen that overlaps the most with the given rectangle. Returns ``true`` if positions of **OK** and **Cancel** buttons are swapped in dialogs. This is enabled by default on Windows to follow interface conventions, and be toggled by changing :ref:`ProjectSettings.gui/common/swap_cancel_ok`. -\ **Note:** This doesn't affect native dialogs such as the ones spawned by :ref:`dialog_show`. +\ **Note:** This doesn't affect native dialogs such as the ones spawned by :ref:`dialog_show()`. .. rst-class:: classref-item-separator @@ -2267,7 +2267,7 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). -\ **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`global_menu_set_item_checked` for more info on how to control it. +\ **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`global_menu_set_item_checked()` for more info on how to control it. \ **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``. @@ -2369,7 +2369,7 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). -\ **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`global_menu_set_item_checked` for more info on how to control it. +\ **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`global_menu_set_item_checked()` for more info on how to control it. \ **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``. @@ -2607,7 +2607,7 @@ Returns the callback of the item accelerator at index ``idx``. **Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. -Returns number of states of a multistate item. See :ref:`global_menu_add_multistate_item` for details. +Returns number of states of a multistate item. See :ref:`global_menu_add_multistate_item()` for details. \ **Note:** This method is implemented only on macOS. @@ -2623,7 +2623,7 @@ Returns number of states of a multistate item. See :ref:`global_menu_add_multist **Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. -Returns the state of a multistate item. See :ref:`global_menu_add_multistate_item` for details. +Returns the state of a multistate item. See :ref:`global_menu_add_multistate_item()` for details. \ **Note:** This method is implemented only on macOS. @@ -2639,7 +2639,7 @@ Returns the state of a multistate item. See :ref:`global_menu_add_multistate_ite **Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. -Returns the submenu ID of the item at index ``idx``. See :ref:`global_menu_add_submenu_item` for more info on how to add a submenu. +Returns the submenu ID of the item at index ``idx``. See :ref:`global_menu_add_submenu_item()` for more info on how to add a submenu. \ **Note:** This method is implemented only on macOS. @@ -2655,7 +2655,7 @@ Returns the submenu ID of the item at index ``idx``. See :ref:`global_menu_add_s **Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. -Returns the metadata of the specified item, which might be of any type. You can set it with :ref:`global_menu_set_item_tag`, which provides a simple way of assigning context data to items. +Returns the metadata of the specified item, which might be of any type. You can set it with :ref:`global_menu_set_item_tag()`, which provides a simple way of assigning context data to items. \ **Note:** This method is implemented only on macOS. @@ -2753,7 +2753,7 @@ Returns ``true`` if the item at index ``idx`` is checked. Returns ``true`` if the item at index ``idx`` is disabled. When it is disabled it can't be selected, or its action invoked. -See :ref:`global_menu_set_item_disabled` for more info on how to disable an item. +See :ref:`global_menu_set_item_disabled()` for more info on how to disable an item. \ **Note:** This method is implemented only on macOS. @@ -2771,7 +2771,7 @@ See :ref:`global_menu_set_item_disabled` for more info on how to hide an item. +See :ref:`global_menu_set_item_hidden()` for more info on how to hide an item. \ **Note:** This method is implemented only on macOS. @@ -2991,7 +2991,7 @@ Sets the callback of the item at index ``idx``. Callback is emitted when its acc **Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. -Sets number of state of a multistate item. See :ref:`global_menu_add_multistate_item` for details. +Sets number of state of a multistate item. See :ref:`global_menu_add_multistate_item()` for details. \ **Note:** This method is implemented only on macOS. @@ -3025,7 +3025,7 @@ Sets the type of the item at the specified index ``idx`` to radio button. If ``f **Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. -Sets the state of a multistate item. See :ref:`global_menu_add_multistate_item` for details. +Sets the state of a multistate item. See :ref:`global_menu_add_multistate_item()` for details. \ **Note:** This method is implemented only on macOS. @@ -3057,7 +3057,7 @@ Sets the submenu of the item at index ``idx``. The submenu is the ID of a global **Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. -Sets the metadata of an item, which may be of any type. You can later get it with :ref:`global_menu_get_item_tag`, which provides a simple way of assigning context data to items. +Sets the metadata of an item, which may be of any type. You can later get it with :ref:`global_menu_get_item_tag()`, which provides a simple way of assigning context data to items. \ **Note:** This method is implemented only on macOS. @@ -3117,7 +3117,7 @@ Registers callables to emit when the menu is respectively about to show or close :ref:`bool` **has_additional_outputs**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if any additional outputs have been registered via :ref:`register_additional_output`. +Returns ``true`` if any additional outputs have been registered via :ref:`register_additional_output()`. .. rst-class:: classref-item-separator @@ -3351,7 +3351,7 @@ Sets the active keyboard layout. |bitfield|\[:ref:`MouseButtonMask`\] **mouse_get_button_state**\ (\ ) |const| :ref:`πŸ”—` -Returns the current state of mouse buttons (whether each button is pressed) as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to :ref:`Input.get_mouse_button_mask`. +Returns the current state of mouse buttons (whether each button is pressed) as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to :ref:`Input.get_mouse_button_mask()`. .. rst-class:: classref-item-separator @@ -3363,7 +3363,7 @@ Returns the current state of mouse buttons (whether each button is pressed) as a :ref:`MouseMode` **mouse_get_mode**\ (\ ) |const| :ref:`πŸ”—` -Returns the current mouse mode. See also :ref:`mouse_set_mode`. +Returns the current mouse mode. See also :ref:`mouse_set_mode()`. .. rst-class:: classref-item-separator @@ -3387,7 +3387,7 @@ Returns the mouse cursor's current position in screen coordinates. |void| **mouse_set_mode**\ (\ mouse_mode\: :ref:`MouseMode`\ ) :ref:`πŸ”—` -Sets the current mouse mode. See also :ref:`mouse_get_mode`. +Sets the current mouse mode. See also :ref:`mouse_get_mode()`. .. rst-class:: classref-item-separator @@ -3399,7 +3399,7 @@ Sets the current mouse mode. See also :ref:`mouse_get_mode` -Perform window manager processing, including input flushing. See also :ref:`force_process_and_drop_events`, :ref:`Input.flush_buffered_events` and :ref:`Input.use_accumulated_input`. +Perform window manager processing, including input flushing. See also :ref:`force_process_and_drop_events()`, :ref:`Input.flush_buffered_events()` and :ref:`Input.use_accumulated_input`. .. rst-class:: classref-item-separator @@ -3411,7 +3411,7 @@ Perform window manager processing, including input flushing. See also :ref:`forc |void| **register_additional_output**\ (\ object\: :ref:`Object`\ ) :ref:`πŸ”—` -Registers an :ref:`Object` which represents an additional output that will be rendered too, beyond normal windows. The :ref:`Object` is only used as an identifier, which can be later passed to :ref:`unregister_additional_output`. +Registers an :ref:`Object` which represents an additional output that will be rendered too, beyond normal windows. The :ref:`Object` is only used as an identifier, which can be later passed to :ref:`unregister_additional_output()`. This can be used to prevent Godot from skipping rendering when no normal windows are visible. @@ -3500,7 +3500,7 @@ Returns the greatest scale factor of all screens. :ref:`ScreenOrientation` **screen_get_orientation**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`πŸ”—` -Returns the ``screen``'s current orientation. See also :ref:`screen_set_orientation`. +Returns the ``screen``'s current orientation. See also :ref:`screen_set_orientation()`. \ **Note:** This method is implemented on Android and iOS. @@ -3541,7 +3541,7 @@ Returns the screen's top-left corner position in pixels. On multi-monitor setups | | | | +-------------+ +-------+ -See also :ref:`screen_get_size`. +See also :ref:`screen_get_size()`. \ **Note:** On Linux (Wayland) this method always returns ``(0, 0)``. @@ -3557,7 +3557,7 @@ See also :ref:`screen_get_size`. Returns the current refresh rate of the specified screen. If ``screen`` is :ref:`SCREEN_OF_MAIN_WINDOW` (the default value), a screen with the main window will be used. -\ **Note:** Returns ``-1.0`` if the DisplayServer fails to find the refresh rate for the specified screen. On Web, :ref:`screen_get_refresh_rate` will always return ``-1.0`` as there is no way to retrieve the refresh rate on that platform. +\ **Note:** Returns ``-1.0`` if the DisplayServer fails to find the refresh rate for the specified screen. On Web, :ref:`screen_get_refresh_rate()` will always return ``-1.0`` as there is no way to retrieve the refresh rate on that platform. To fallback to a default refresh rate if the method fails, try: @@ -3595,7 +3595,7 @@ Returns the scale factor of the specified screen by index. :ref:`Vector2i` **screen_get_size**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`πŸ”—` -Returns the screen's size in pixels. See also :ref:`screen_get_position` and :ref:`screen_get_usable_rect`. +Returns the screen's size in pixels. See also :ref:`screen_get_position()` and :ref:`screen_get_usable_rect()`. .. rst-class:: classref-item-separator @@ -3607,7 +3607,7 @@ Returns the screen's size in pixels. See also :ref:`screen_get_position` **screen_get_usable_rect**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`πŸ”—` -Returns the portion of the screen that is not obstructed by a status bar in pixels. See also :ref:`screen_get_size`. +Returns the portion of the screen that is not obstructed by a status bar in pixels. See also :ref:`screen_get_size()`. .. rst-class:: classref-item-separator @@ -3619,7 +3619,7 @@ Returns the portion of the screen that is not obstructed by a status bar in pixe :ref:`bool` **screen_is_kept_on**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the screen should never be turned off by the operating system's power-saving measures. See also :ref:`screen_set_keep_on`. +Returns ``true`` if the screen should never be turned off by the operating system's power-saving measures. See also :ref:`screen_set_keep_on()`. .. rst-class:: classref-item-separator @@ -3631,7 +3631,7 @@ Returns ``true`` if the screen should never be turned off by the operating syste |void| **screen_set_keep_on**\ (\ enable\: :ref:`bool`\ ) :ref:`πŸ”—` -Sets whether the screen should never be turned off by the operating system's power-saving measures. See also :ref:`screen_is_kept_on`. +Sets whether the screen should never be turned off by the operating system's power-saving measures. See also :ref:`screen_is_kept_on()`. .. rst-class:: classref-item-separator @@ -3643,7 +3643,7 @@ Sets whether the screen should never be turned off by the operating system's pow |void| **screen_set_orientation**\ (\ orientation\: :ref:`ScreenOrientation`, screen\: :ref:`int` = -1\ ) :ref:`πŸ”—` -Sets the ``screen``'s ``orientation``. See also :ref:`screen_get_orientation`. +Sets the ``screen``'s ``orientation``. See also :ref:`screen_get_orientation()`. \ **Note:** On iOS, this method has no effect if :ref:`ProjectSettings.display/window/handheld/orientation` is not set to :ref:`SCREEN_SENSOR`. @@ -3657,7 +3657,7 @@ Sets the ``screen``'s ``orientation``. See also :ref:`screen_get_orientation`\ ) :ref:`πŸ”—` -Sets the window icon (usually displayed in the top-left corner) with an :ref:`Image`. To use icons in the operating system's native format, use :ref:`set_native_icon` instead. +Sets the window icon (usually displayed in the top-left corner) with an :ref:`Image`. To use icons in the operating system's native format, use :ref:`set_native_icon()` instead. \ **Note:** Requires support for :ref:`FEATURE_ICON`. @@ -3671,7 +3671,7 @@ Sets the window icon (usually displayed in the top-left corner) with an :ref:`Im |void| **set_native_icon**\ (\ filename\: :ref:`String`\ ) :ref:`πŸ”—` -Sets the window icon (usually displayed in the top-left corner) in the operating system's *native* format. The file at ``filename`` must be in ``.ico`` format on Windows or ``.icns`` on macOS. By using specially crafted ``.ico`` or ``.icns`` icons, :ref:`set_native_icon` allows specifying different icons depending on the size the icon is displayed at. This size is determined by the operating system and user preferences (including the display scale factor). To use icons in other formats, use :ref:`set_icon` instead. +Sets the window icon (usually displayed in the top-left corner) in the operating system's *native* format. The file at ``filename`` must be in ``.ico`` format on Windows or ``.icns`` on macOS. By using specially crafted ``.ico`` or ``.icns`` icons, :ref:`set_native_icon()` allows specifying different icons depending on the size the icon is displayed at. This size is determined by the operating system and user preferences (including the display scale factor). To use icons in other formats, use :ref:`set_icon()` instead. \ **Note:** Requires support for :ref:`FEATURE_NATIVE_ICON`. @@ -3981,7 +3981,7 @@ Adds a callback, which is called when the utterance has started, finished, cance Adds an utterance to the queue. If ``interrupt`` is ``true``, the queue is cleared first. -- ``voice`` identifier is one of the ``"id"`` values returned by :ref:`tts_get_voices` or one of the values returned by :ref:`tts_get_voices_for_language`. +- ``voice`` identifier is one of the ``"id"`` values returned by :ref:`tts_get_voices()` or one of the values returned by :ref:`tts_get_voices_for_language()`. - ``volume`` ranges from ``0`` (lowest) to ``100`` (highest). @@ -3991,7 +3991,7 @@ Adds an utterance to the queue. If ``interrupt`` is ``true``, the queue is clear - ``utterance_id`` is passed as a parameter to the callback functions. -\ **Note:** On Windows and Linux (X11/Wayland), utterance ``text`` can use SSML markup. SSML support is engine and voice dependent. If the engine does not support SSML, you should strip out all XML markup before calling :ref:`tts_speak`. +\ **Note:** On Windows and Linux (X11/Wayland), utterance ``text`` can use SSML markup. SSML support is engine and voice dependent. If the engine does not support SSML, you should strip out all XML markup before calling :ref:`tts_speak()`. \ **Note:** The granularity of pitch, rate, and volume is engine and voice dependent. Values may be truncated. @@ -4025,7 +4025,7 @@ Stops synthesis in progress and removes all utterances from the queue. |void| **unregister_additional_output**\ (\ object\: :ref:`Object`\ ) :ref:`πŸ”—` -Unregisters an :ref:`Object` representing an additional output, that was registered via :ref:`register_additional_output`. +Unregisters an :ref:`Object` representing an additional output, that was registered via :ref:`register_additional_output()`. .. rst-class:: classref-item-separator @@ -4089,7 +4089,7 @@ Shows the virtual keyboard if the platform has one. Sets the mouse cursor position to the given ``position`` relative to an origin at the upper left corner of the currently focused game Window Manager window. -\ **Note:** :ref:`warp_mouse` is only supported on Windows, macOS, and Linux (X11/Wayland). It has no effect on Android, iOS, and Web. +\ **Note:** :ref:`warp_mouse()` is only supported on Windows, macOS, and Linux (X11/Wayland). It has no effect on Android, iOS, and Web. .. rst-class:: classref-item-separator @@ -4125,7 +4125,7 @@ Returns ID of the active popup window, or :ref:`INVALID_WINDOW_ID` **window_get_attached_instance_id**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Returns the :ref:`Object.get_instance_id` of the :ref:`Window` the ``window_id`` is attached to. +Returns the :ref:`Object.get_instance_id()` of the :ref:`Window` the ``window_id`` is attached to. .. rst-class:: classref-item-separator @@ -4137,7 +4137,7 @@ Returns the :ref:`Object.get_instance_id` o :ref:`int` **window_get_current_screen**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Returns the screen the window specified by ``window_id`` is currently positioned on. If the screen overlaps multiple displays, the screen where the window's center is located is returned. See also :ref:`window_set_current_screen`. +Returns the screen the window specified by ``window_id`` is currently positioned on. If the screen overlaps multiple displays, the screen where the window's center is located is returned. See also :ref:`window_set_current_screen()`. .. rst-class:: classref-item-separator @@ -4161,7 +4161,7 @@ Returns the current value of the given window's ``flag``. :ref:`Vector2i` **window_get_max_size**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Returns the window's maximum size (in pixels). See also :ref:`window_set_max_size`. +Returns the window's maximum size (in pixels). See also :ref:`window_set_max_size()`. .. rst-class:: classref-item-separator @@ -4173,7 +4173,7 @@ Returns the window's maximum size (in pixels). See also :ref:`window_set_max_siz :ref:`Vector2i` **window_get_min_size**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Returns the window's minimum size (in pixels). See also :ref:`window_set_min_size`. +Returns the window's minimum size (in pixels). See also :ref:`window_set_min_size()`. .. rst-class:: classref-item-separator @@ -4235,7 +4235,7 @@ Returns the position of the client area of the given window on the screen. :ref:`Vector2i` **window_get_position_with_decorations**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Returns the position of the given window on the screen including the borders drawn by the operating system. See also :ref:`window_get_position`. +Returns the position of the given window on the screen including the borders drawn by the operating system. See also :ref:`window_get_position()`. .. rst-class:: classref-item-separator @@ -4259,7 +4259,7 @@ Returns left margins (``x``), right margins (``y``) and height (``z``) of the ti :ref:`Vector2i` **window_get_size**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Returns the size of the window specified by ``window_id`` (in pixels), excluding the borders drawn by the operating system. This is also called the "client area". See also :ref:`window_get_size_with_decorations`, :ref:`window_set_size` and :ref:`window_get_position`. +Returns the size of the window specified by ``window_id`` (in pixels), excluding the borders drawn by the operating system. This is also called the "client area". See also :ref:`window_get_size_with_decorations()`, :ref:`window_set_size()` and :ref:`window_get_position()`. .. rst-class:: classref-item-separator @@ -4271,7 +4271,7 @@ Returns the size of the window specified by ``window_id`` (in pixels), excluding :ref:`Vector2i` **window_get_size_with_decorations**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Returns the size of the window specified by ``window_id`` (in pixels), including the borders drawn by the operating system. See also :ref:`window_get_size`. +Returns the size of the window specified by ``window_id`` (in pixels), including the borders drawn by the operating system. See also :ref:`window_get_size()`. .. rst-class:: classref-item-separator @@ -4385,7 +4385,7 @@ Makes the window specified by ``window_id`` request attention, which is material |void| **window_set_current_screen**\ (\ screen\: :ref:`int`, window_id\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Moves the window specified by ``window_id`` to the specified ``screen``. See also :ref:`window_get_current_screen`. +Moves the window specified by ``window_id`` to the specified ``screen``. See also :ref:`window_get_current_screen()`. .. rst-class:: classref-item-separator @@ -4441,7 +4441,7 @@ Enables or disables the given window's given ``flag``. See :ref:`WindowFlags`, window_id\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Sets whether `Input Method Editor `__ should be enabled for the window specified by ``window_id``. See also :ref:`window_set_ime_position`. +Sets whether `Input Method Editor `__ should be enabled for the window specified by ``window_id``. See also :ref:`window_set_ime_position()`. .. rst-class:: classref-item-separator @@ -4453,7 +4453,7 @@ Sets whether `Input Method Editor `_ |void| **window_set_ime_position**\ (\ position\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Sets the position of the `Input Method Editor `__ popup for the specified ``window_id``. Only effective if :ref:`window_set_ime_active` was set to ``true`` for the specified ``window_id``. +Sets the position of the `Input Method Editor `__ popup for the specified ``window_id``. Only effective if :ref:`window_set_ime_active()` was set to ``true`` for the specified ``window_id``. .. rst-class:: classref-item-separator @@ -4493,7 +4493,7 @@ Sets the ``callback`` that should be called when text is entered using the virtu |void| **window_set_max_size**\ (\ max_size\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Sets the maximum size of the window specified by ``window_id`` in pixels. Normally, the user will not be able to drag the window to make it larger than the specified size. See also :ref:`window_get_max_size`. +Sets the maximum size of the window specified by ``window_id`` in pixels. Normally, the user will not be able to drag the window to make it larger than the specified size. See also :ref:`window_get_max_size()`. \ **Note:** It's recommended to change this value using :ref:`Window.max_size` instead. @@ -4509,7 +4509,7 @@ Sets the maximum size of the window specified by ``window_id`` in pixels. Normal |void| **window_set_min_size**\ (\ min_size\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Sets the minimum size for the given window to ``min_size`` in pixels. Normally, the user will not be able to drag the window to make it smaller than the specified size. See also :ref:`window_get_min_size`. +Sets the minimum size for the given window to ``min_size`` in pixels. Normally, the user will not be able to drag the window to make it smaller than the specified size. See also :ref:`window_get_min_size()`. \ **Note:** It's recommended to change this value using :ref:`Window.min_size` instead. @@ -4611,7 +4611,7 @@ Sets the position of the given window to ``position``. On multi-monitor setups, | | | | +-------------+ +-------+ -See also :ref:`window_get_position` and :ref:`window_set_size`. +See also :ref:`window_get_position()` and :ref:`window_set_size()`. \ **Note:** It's recommended to change this value using :ref:`Window.position` instead. @@ -4641,7 +4641,7 @@ Sets the ``callback`` that will be called when the window specified by ``window_ |void| **window_set_size**\ (\ size\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Sets the size of the given window to ``size`` (in pixels). See also :ref:`window_get_size` and :ref:`window_get_position`. +Sets the size of the given window to ``size`` (in pixels). See also :ref:`window_get_size()` and :ref:`window_get_position()`. \ **Note:** It's recommended to change this value using :ref:`Window.size` instead. diff --git a/classes/class_dtlsserver.rst b/classes/class_dtlsserver.rst index c93162b1b..c5a057718 100644 --- a/classes/class_dtlsserver.rst +++ b/classes/class_dtlsserver.rst @@ -19,7 +19,7 @@ Helper class to implement a DTLS server. Description ----------- -This class is used to store the state of a DTLS server. Upon :ref:`setup` it converts connected :ref:`PacketPeerUDP` to :ref:`PacketPeerDTLS` accepting them via :ref:`take_connection` as DTLS clients. Under the hood, this class is used to store the DTLS state and cookies of the server. The reason of why the state and cookies are needed is outside of the scope of this documentation. +This class is used to store the state of a DTLS server. Upon :ref:`setup()` it converts connected :ref:`PacketPeerUDP` to :ref:`PacketPeerDTLS` accepting them via :ref:`take_connection()` as DTLS clients. Under the hood, this class is used to store the DTLS state and cookies of the server. The reason of why the state and cookies are needed is outside of the scope of this documentation. Below a small example of how to use it: @@ -201,7 +201,7 @@ Method Descriptions :ref:`Error` **setup**\ (\ server_options\: :ref:`TLSOptions`\ ) :ref:`πŸ”—` -Setup the DTLS server to use the given ``server_options``. See :ref:`TLSOptions.server`. +Setup the DTLS server to use the given ``server_options``. See :ref:`TLSOptions.server()`. .. rst-class:: classref-item-separator @@ -213,7 +213,7 @@ Setup the DTLS server to use the given ``server_options``. See :ref:`TLSOptions. :ref:`PacketPeerDTLS` **take_connection**\ (\ udp_peer\: :ref:`PacketPeerUDP`\ ) :ref:`πŸ”—` -Try to initiate the DTLS handshake with the given ``udp_peer`` which must be already connected (see :ref:`PacketPeerUDP.connect_to_host`). +Try to initiate the DTLS handshake with the given ``udp_peer`` which must be already connected (see :ref:`PacketPeerUDP.connect_to_host()`). \ **Note:** You must check that the state of the return PacketPeerUDP is :ref:`PacketPeerDTLS.STATUS_HANDSHAKING`, as it is normal that 50% of the new connections will be invalid due to cookie exchange. diff --git a/classes/class_editorcommandpalette.rst b/classes/class_editorcommandpalette.rst index 51fb64593..31dd64984 100644 --- a/classes/class_editorcommandpalette.rst +++ b/classes/class_editorcommandpalette.rst @@ -42,7 +42,7 @@ Command key names use slash delimiters to distinguish sections, for example: ``" -\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_command_palette`. +\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_command_palette()`. .. rst-class:: classref-reftable-group diff --git a/classes/class_editorcontextmenuplugin.rst b/classes/class_editorcontextmenuplugin.rst index b23cd3938..e34453973 100644 --- a/classes/class_editorcontextmenuplugin.rst +++ b/classes/class_editorcontextmenuplugin.rst @@ -64,7 +64,7 @@ enum **ContextMenuSlot**: :ref:`πŸ”—` **CONTEXT_SLOT_SCENE_TREE** = ``0`` -Context menu of Scene dock. :ref:`_popup_menu` will be called with a list of paths to currently selected nodes, while option callback will receive the list of currently selected nodes. +Context menu of Scene dock. :ref:`_popup_menu()` will be called with a list of paths to currently selected nodes, while option callback will receive the list of currently selected nodes. .. _class_EditorContextMenuPlugin_constant_CONTEXT_SLOT_FILESYSTEM: @@ -72,7 +72,7 @@ Context menu of Scene dock. :ref:`_popup_menu` **CONTEXT_SLOT_FILESYSTEM** = ``1`` -Context menu of FileSystem dock. :ref:`_popup_menu` and option callback will be called with list of paths of the currently selected files. +Context menu of FileSystem dock. :ref:`_popup_menu()` and option callback will be called with list of paths of the currently selected files. .. _class_EditorContextMenuPlugin_constant_CONTEXT_SLOT_SCRIPT_EDITOR: @@ -80,7 +80,7 @@ Context menu of FileSystem dock. :ref:`_popup_menu` **CONTEXT_SLOT_SCRIPT_EDITOR** = ``2`` -Context menu of Script editor's script tabs. :ref:`_popup_menu` will be called with the path to the currently edited script, while option callback will receive reference to that script. +Context menu of Script editor's script tabs. :ref:`_popup_menu()` will be called with the path to the currently edited script, while option callback will receive reference to that script. .. _class_EditorContextMenuPlugin_constant_CONTEXT_SLOT_FILESYSTEM_CREATE: @@ -88,7 +88,7 @@ Context menu of Script editor's script tabs. :ref:`_popup_menu` **CONTEXT_SLOT_FILESYSTEM_CREATE** = ``3`` -The "Create..." submenu of FileSystem dock's context menu. :ref:`_popup_menu` and option callback will be called with list of paths of the currently selected files. +The "Create..." submenu of FileSystem dock's context menu. :ref:`_popup_menu()` and option callback will be called with list of paths of the currently selected files. .. _class_EditorContextMenuPlugin_constant_CONTEXT_SLOT_SCRIPT_EDITOR_CODE: @@ -96,7 +96,7 @@ The "Create..." submenu of FileSystem dock's context menu. :ref:`_popup_menu` **CONTEXT_SLOT_SCRIPT_EDITOR_CODE** = ``4`` -Context menu of Script editor's code editor. :ref:`_popup_menu` will be called with the path to the :ref:`CodeEdit` node. You can fetch it using this code: +Context menu of Script editor's code editor. :ref:`_popup_menu()` will be called with the path to the :ref:`CodeEdit` node. You can fetch it using this code: :: @@ -111,7 +111,7 @@ The option callback will receive reference to that node. You can use :ref:`CodeE :ref:`ContextMenuSlot` **CONTEXT_SLOT_SCENE_TABS** = ``5`` -Context menu of scene tabs. :ref:`_popup_menu` will be called with the path of the clicked scene, or empty :ref:`PackedStringArray` if the menu was opened on empty space. The option callback will receive the path of the clicked scene, or empty :ref:`String` if none was clicked. +Context menu of scene tabs. :ref:`_popup_menu()` will be called with the path of the clicked scene, or empty :ref:`PackedStringArray` if the menu was opened on empty space. The option callback will receive the path of the clicked scene, or empty :ref:`String` if none was clicked. .. _class_EditorContextMenuPlugin_constant_CONTEXT_SLOT_2D_EDITOR: @@ -119,7 +119,7 @@ Context menu of scene tabs. :ref:`_popup_menu` **CONTEXT_SLOT_2D_EDITOR** = ``6`` -Context menu of 2D editor's basic right-click menu. :ref:`_popup_menu` will be called with paths to all :ref:`CanvasItem` nodes under the cursor. You can fetch them using this code: +Context menu of 2D editor's basic right-click menu. :ref:`_popup_menu()` will be called with paths to all :ref:`CanvasItem` nodes under the cursor. You can fetch them using this code: :: @@ -143,7 +143,7 @@ Method Descriptions |void| **_popup_menu**\ (\ paths\: :ref:`PackedStringArray`\ ) |virtual| :ref:`πŸ”—` -Called when creating a context menu, custom options can be added by using the :ref:`add_context_menu_item` or :ref:`add_context_menu_item_from_shortcut` functions. ``paths`` contains currently selected paths (depending on menu), which can be used to conditionally add options. +Called when creating a context menu, custom options can be added by using the :ref:`add_context_menu_item()` or :ref:`add_context_menu_item_from_shortcut()` functions. ``paths`` contains currently selected paths (depending on menu), which can be used to conditionally add options. .. rst-class:: classref-item-separator @@ -162,7 +162,7 @@ Add custom option to the context menu of the plugin's specified slot. When the o func _popup_menu(paths): add_context_menu_item("File Custom options", handle, ICON) -If you want to assign shortcut to the menu item, use :ref:`add_context_menu_item_from_shortcut` instead. +If you want to assign shortcut to the menu item, use :ref:`add_context_menu_item_from_shortcut()` instead. .. rst-class:: classref-item-separator @@ -174,7 +174,7 @@ If you want to assign shortcut to the menu item, use :ref:`add_context_menu_item |void| **add_context_menu_item_from_shortcut**\ (\ name\: :ref:`String`, shortcut\: :ref:`Shortcut`, icon\: :ref:`Texture2D` = null\ ) :ref:`πŸ”—` -Add custom option to the context menu of the plugin's specified slot. The option will have the ``shortcut`` assigned and reuse its callback. The shortcut has to be registered beforehand with :ref:`add_menu_shortcut`. +Add custom option to the context menu of the plugin's specified slot. The option will have the ``shortcut`` assigned and reuse its callback. The shortcut has to be registered beforehand with :ref:`add_menu_shortcut()`. :: @@ -216,7 +216,7 @@ Add a submenu to the context menu of the plugin's specified slot. The submenu is |void| **add_menu_shortcut**\ (\ shortcut\: :ref:`Shortcut`, callback\: :ref:`Callable`\ ) :ref:`πŸ”—` -Registers a shortcut associated with the plugin's context menu. This method should be called once (e.g. in plugin's :ref:`Object._init`). ``callback`` will be called when user presses the specified ``shortcut`` while the menu's context is in effect (e.g. FileSystem dock is focused). Callback should take single :ref:`Array` argument; array contents depend on context menu slot. +Registers a shortcut associated with the plugin's context menu. This method should be called once (e.g. in plugin's :ref:`Object._init()`). ``callback`` will be called when user presses the specified ``shortcut`` while the menu's context is in effect (e.g. FileSystem dock is focused). Callback should take single :ref:`Array` argument; array contents depend on context menu slot. :: diff --git a/classes/class_editordebuggerplugin.rst b/classes/class_editordebuggerplugin.rst index 1f611d20b..5e06056f1 100644 --- a/classes/class_editordebuggerplugin.rst +++ b/classes/class_editordebuggerplugin.rst @@ -21,11 +21,11 @@ Description **EditorDebuggerPlugin** provides functions related to the editor side of the debugger. -To interact with the debugger, an instance of this class must be added to the editor via :ref:`EditorPlugin.add_debugger_plugin`. +To interact with the debugger, an instance of this class must be added to the editor via :ref:`EditorPlugin.add_debugger_plugin()`. -Once added, the :ref:`_setup_session` callback will be called for every :ref:`EditorDebuggerSession` available to the plugin, and when new ones are created (the sessions may be inactive during this stage). +Once added, the :ref:`_setup_session()` callback will be called for every :ref:`EditorDebuggerSession` available to the plugin, and when new ones are created (the sessions may be inactive during this stage). -You can retrieve the available :ref:`EditorDebuggerSession`\ s via :ref:`get_sessions` or get a specific one via :ref:`get_session`. +You can retrieve the available :ref:`EditorDebuggerSession`\ s via :ref:`get_sessions()` or get a specific one via :ref:`get_session()`. .. tabs:: @@ -90,7 +90,7 @@ To connect on the running game side, use the :ref:`EngineDebugger` and similar functions *called in the editor* do not print anything, the Output Log prints only game messages. +\ **Note:** While the game is running, :ref:`@GlobalScope.print()` and similar functions *called in the editor* do not print anything, the Output Log prints only game messages. .. rst-class:: classref-reftable-group @@ -157,7 +157,7 @@ Override this method to be notified when all breakpoints are cleared in the edit :ref:`bool` **_capture**\ (\ message\: :ref:`String`, data\: :ref:`Array`, session_id\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -Override this method to process incoming messages. The ``session_id`` is the ID of the :ref:`EditorDebuggerSession` that received the ``message``. Use :ref:`get_session` to retrieve the session. This method should return ``true`` if the message is recognized. +Override this method to process incoming messages. The ``session_id`` is the ID of the :ref:`EditorDebuggerSession` that received the ``message``. Use :ref:`get_session()` to retrieve the session. This method should return ``true`` if the message is recognized. .. rst-class:: classref-item-separator @@ -181,7 +181,7 @@ Override this method to be notified when a breakpoint line has been clicked in t :ref:`bool` **_has_capture**\ (\ capture\: :ref:`String`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to enable receiving messages from the debugger. If ``capture`` is "my_message" then messages starting with "my_message:" will be passed to the :ref:`_capture` method. +Override this method to enable receiving messages from the debugger. If ``capture`` is "my_message" then messages starting with "my_message:" will be passed to the :ref:`_capture()` method. .. rst-class:: classref-item-separator @@ -219,7 +219,7 @@ Returns the :ref:`EditorDebuggerSession` with the g Returns an array of :ref:`EditorDebuggerSession` currently available to this debugger plugin. -\ **Note:** Sessions in the array may be inactive, check their state via :ref:`EditorDebuggerSession.is_active`. +\ **Note:** Sessions in the array may be inactive, check their state via :ref:`EditorDebuggerSession.is_active()`. .. |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_editordebuggersession.rst b/classes/class_editordebuggersession.rst index a47714ed4..4c1066e22 100644 --- a/classes/class_editordebuggersession.rst +++ b/classes/class_editordebuggersession.rst @@ -21,7 +21,7 @@ Description This class cannot be directly instantiated and must be retrieved via a :ref:`EditorDebuggerPlugin`. -You can add tabs to the session UI via :ref:`add_session_tab`, send messages via :ref:`send_message`, and toggle :ref:`EngineProfiler`\ s via :ref:`toggle_profiler`. +You can add tabs to the session UI via :ref:`add_session_tab()`, send messages via :ref:`send_message()`, and toggle :ref:`EngineProfiler`\ s via :ref:`toggle_profiler()`. .. rst-class:: classref-reftable-group diff --git a/classes/class_editorexportplatform.rst b/classes/class_editorexportplatform.rst index 7d6119af1..6d3cce9ab 100644 --- a/classes/class_editorexportplatform.rst +++ b/classes/class_editorexportplatform.rst @@ -23,7 +23,7 @@ Description Base resource that provides the functionality of exporting a release build of a project to a platform, from the editor. Stores platform-specific metadata such as the name and supported features of the platform, and performs the exporting of projects, PCK files, and ZIP files. Uses an export template for the platform provided at the time of project exporting. -Used in scripting by :ref:`EditorExportPlugin` to configure platform-specific customization of scenes and resources. See :ref:`EditorExportPlugin._begin_customize_scenes` and :ref:`EditorExportPlugin._begin_customize_resources` for more details. +Used in scripting by :ref:`EditorExportPlugin` to configure platform-specific customization of scenes and resources. See :ref:`EditorExportPlugin._begin_customize_scenes()` and :ref:`EditorExportPlugin._begin_customize_resources()` for more details. .. rst-class:: classref-introduction-group @@ -159,7 +159,7 @@ flags **DebugFlags**: :ref:`πŸ”—` :ref:`DebugFlags` **DEBUG_FLAG_DUMB_CLIENT** = ``1`` -Flag is set if remotely debugged project is expected to use remote file system. If set, :ref:`gen_export_flags` will add ``--remove-fs`` and ``--remote-fs-password`` (if password is set in the editor settings) command line arguments to the list. +Flag is set if remotely debugged project is expected to use remote file system. If set, :ref:`gen_export_flags()` will add ``--remove-fs`` and ``--remote-fs-password`` (if password is set in the editor settings) command line arguments to the list. .. _class_EditorExportPlatform_constant_DEBUG_FLAG_REMOTE_DEBUG: @@ -167,7 +167,7 @@ Flag is set if remotely debugged project is expected to use remote file system. :ref:`DebugFlags` **DEBUG_FLAG_REMOTE_DEBUG** = ``2`` -Flag is set if remote debug is enabled. If set, :ref:`gen_export_flags` will add ``--remote-debug`` and ``--breakpoints`` (if breakpoints are selected in the script editor or added by the plugin) command line arguments to the list. +Flag is set if remote debug is enabled. If set, :ref:`gen_export_flags()` will add ``--remote-debug`` and ``--breakpoints`` (if breakpoints are selected in the script editor or added by the plugin) command line arguments to the list. .. _class_EditorExportPlatform_constant_DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST: @@ -175,7 +175,7 @@ Flag is set if remote debug is enabled. If set, :ref:`gen_export_flags` **DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST** = ``4`` -Flag is set if remotely debugged project is running on the localhost. If set, :ref:`gen_export_flags` will use ``localhost`` instead of :ref:`EditorSettings.network/debug/remote_host` as remote debugger host. +Flag is set if remotely debugged project is running on the localhost. If set, :ref:`gen_export_flags()` will use ``localhost`` instead of :ref:`EditorSettings.network/debug/remote_host` as remote debugger host. .. _class_EditorExportPlatform_constant_DEBUG_FLAG_VIEW_COLLISIONS: @@ -183,7 +183,7 @@ Flag is set if remotely debugged project is running on the localhost. If set, :r :ref:`DebugFlags` **DEBUG_FLAG_VIEW_COLLISIONS** = ``8`` -Flag is set if "Visible Collision Shapes" remote debug option is enabled. If set, :ref:`gen_export_flags` will add ``--debug-collisions`` command line arguments to the list. +Flag is set if "Visible Collision Shapes" remote debug option is enabled. If set, :ref:`gen_export_flags()` will add ``--debug-collisions`` command line arguments to the list. .. _class_EditorExportPlatform_constant_DEBUG_FLAG_VIEW_NAVIGATION: @@ -191,7 +191,7 @@ Flag is set if "Visible Collision Shapes" remote debug option is enabled. If set :ref:`DebugFlags` **DEBUG_FLAG_VIEW_NAVIGATION** = ``16`` -Flag is set if Visible Navigation" remote debug option is enabled. If set, :ref:`gen_export_flags` will add ``--debug-navigation`` command line arguments to the list. +Flag is set if Visible Navigation" remote debug option is enabled. If set, :ref:`gen_export_flags()` will add ``--debug-navigation`` command line arguments to the list. .. rst-class:: classref-section-separator diff --git a/classes/class_editorexportplatformandroid.rst b/classes/class_editorexportplatformandroid.rst index c57a4611d..02993a625 100644 --- a/classes/class_editorexportplatformandroid.rst +++ b/classes/class_editorexportplatformandroid.rst @@ -2788,7 +2788,7 @@ Allows an application to write to the user dictionary. :ref:`bool` **screen/immersive_mode** :ref:`πŸ”—` -If ``true``, hides navigation and status bar. See :ref:`DisplayServer.window_set_mode` to toggle it at runtime. +If ``true``, hides navigation and status bar. See :ref:`DisplayServer.window_set_mode()` to toggle it at runtime. .. rst-class:: classref-item-separator diff --git a/classes/class_editorexportplatformextension.rst b/classes/class_editorexportplatformextension.rst index ec5351c5a..5295a9039 100644 --- a/classes/class_editorexportplatformextension.rst +++ b/classes/class_editorexportplatformextension.rst @@ -21,7 +21,7 @@ Description External :ref:`EditorExportPlatform` implementations should inherit from this class. -To use :ref:`EditorExportPlatform`, register it using the :ref:`EditorPlugin.add_export_platform` method first. +To use :ref:`EditorExportPlatform`, register it using the :ref:`EditorPlugin.add_export_platform()` method first. .. rst-class:: classref-reftable-group @@ -118,9 +118,9 @@ Method Descriptions **Optional.**\ -Returns ``true``, if specified ``preset`` is valid and can be exported. Use :ref:`set_config_error` and :ref:`set_config_missing_templates` to set error details. +Returns ``true``, if specified ``preset`` is valid and can be exported. Use :ref:`set_config_error()` and :ref:`set_config_missing_templates()` to set error details. -Usual implementation can call :ref:`_has_valid_export_configuration` and :ref:`_has_valid_project_configuration` to determine if export is possible. +Usual implementation can call :ref:`_has_valid_export_configuration()` and :ref:`_has_valid_project_configuration()` to determine if export is possible. .. rst-class:: classref-item-separator @@ -186,7 +186,7 @@ Creates a full project at ``path`` for the specified ``preset``. This method is called when "Export" button is pressed in the export dialog. -This method implementation can call :ref:`EditorExportPlatform.save_pack` or :ref:`EditorExportPlatform.save_zip` to use default PCK/ZIP export process, or calls :ref:`EditorExportPlatform.export_project_files` and implement custom callback for processing each exported file. +This method implementation can call :ref:`EditorExportPlatform.save_pack()` or :ref:`EditorExportPlatform.save_zip()` to use default PCK/ZIP export process, or calls :ref:`EditorExportPlatform.export_project_files()` and implement custom callback for processing each exported file. .. rst-class:: classref-item-separator @@ -318,11 +318,11 @@ Additionally, the following keys are supported: - ``default_value: Variant``, default value of the property. -- ``update_visibility: bool``, if set to ``true``, :ref:`_get_export_option_visibility` is called for each property when this property is changed. +- ``update_visibility: bool``, if set to ``true``, :ref:`_get_export_option_visibility()` is called for each property when this property is changed. -- ``required: bool``, if set to ``true``, this property warnings are critical, and should be resolved to make export possible. This value is a hint for the :ref:`_has_valid_export_configuration` implementation, and not used by the engine directly. +- ``required: bool``, if set to ``true``, this property warnings are critical, and should be resolved to make export possible. This value is a hint for the :ref:`_has_valid_export_configuration()` implementation, and not used by the engine directly. -See also :ref:`Object._get_property_list`. +See also :ref:`Object._get_property_list()`. .. rst-class:: classref-item-separator @@ -336,7 +336,7 @@ See also :ref:`Object._get_property_list`. +Returns platform logo displayed in the export dialog, logo should be 32x32 adjusted to the current editor scale, see :ref:`EditorInterface.get_editor_scale()`. .. rst-class:: classref-item-separator @@ -364,7 +364,7 @@ Returns export platform name. **Optional.**\ -Returns one-click deploy menu item icon for the specified ``device``, icon should be 16x16 adjusted to the current editor scale, see :ref:`EditorInterface.get_editor_scale`. +Returns one-click deploy menu item icon for the specified ``device``, icon should be 16x16 adjusted to the current editor scale, see :ref:`EditorInterface.get_editor_scale()`. .. rst-class:: classref-item-separator @@ -476,7 +476,7 @@ Returns array of platform specific features for the specified ``preset``. **Optional.**\ -Returns icon of the one-click deploy menu button, icon should be 16x16 adjusted to the current editor scale, see :ref:`EditorInterface.get_editor_scale`. +Returns icon of the one-click deploy menu button, icon should be 16x16 adjusted to the current editor scale, see :ref:`EditorInterface.get_editor_scale()`. .. rst-class:: classref-item-separator @@ -574,7 +574,7 @@ Returns ``true`` if export options list is changed and presets should be updated :ref:`String` **get_config_error**\ (\ ) |const| :ref:`πŸ”—` -Returns current configuration error message text. This method should be called only from the :ref:`_can_export`, :ref:`_has_valid_export_configuration`, or :ref:`_has_valid_project_configuration` implementations. +Returns current configuration error message text. This method should be called only from the :ref:`_can_export()`, :ref:`_has_valid_export_configuration()`, or :ref:`_has_valid_project_configuration()` implementations. .. rst-class:: classref-item-separator @@ -586,7 +586,7 @@ Returns current configuration error message text. This method should be called o :ref:`bool` **get_config_missing_templates**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` is export templates are missing from the current configuration. This method should be called only from the :ref:`_can_export`, :ref:`_has_valid_export_configuration`, or :ref:`_has_valid_project_configuration` implementations. +Returns ``true`` is export templates are missing from the current configuration. This method should be called only from the :ref:`_can_export()`, :ref:`_has_valid_export_configuration()`, or :ref:`_has_valid_project_configuration()` implementations. .. rst-class:: classref-item-separator @@ -598,7 +598,7 @@ Returns ``true`` is export templates are missing from the current configuration. |void| **set_config_error**\ (\ error_text\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Sets current configuration error message text. This method should be called only from the :ref:`_can_export`, :ref:`_has_valid_export_configuration`, or :ref:`_has_valid_project_configuration` implementations. +Sets current configuration error message text. This method should be called only from the :ref:`_can_export()`, :ref:`_has_valid_export_configuration()`, or :ref:`_has_valid_project_configuration()` implementations. .. rst-class:: classref-item-separator @@ -610,7 +610,7 @@ Sets current configuration error message text. This method should be called only |void| **set_config_missing_templates**\ (\ missing_templates\: :ref:`bool`\ ) |const| :ref:`πŸ”—` -Set to ``true`` is export templates are missing from the current configuration. This method should be called only from the :ref:`_can_export`, :ref:`_has_valid_export_configuration`, or :ref:`_has_valid_project_configuration` implementations. +Set to ``true`` is export templates are missing from the current configuration. This method should be called only from the :ref:`_can_export()`, :ref:`_has_valid_export_configuration()`, or :ref:`_has_valid_project_configuration()` implementations. .. |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_editorexportplugin.rst b/classes/class_editorexportplugin.rst index dee4f5c91..e4804ea04 100644 --- a/classes/class_editorexportplugin.rst +++ b/classes/class_editorexportplugin.rst @@ -19,9 +19,9 @@ A script that is executed when exporting the project. Description ----------- -**EditorExportPlugin**\ s are automatically invoked whenever the user exports the project. Their most common use is to determine what files are being included in the exported project. For each plugin, :ref:`_export_begin` is called at the beginning of the export process and then :ref:`_export_file` is called for each exported file. +**EditorExportPlugin**\ s are automatically invoked whenever the user exports the project. Their most common use is to determine what files are being included in the exported project. For each plugin, :ref:`_export_begin()` is called at the beginning of the export process and then :ref:`_export_file()` is called for each exported file. -To use **EditorExportPlugin**, register it using the :ref:`EditorPlugin.add_export_plugin` method first. +To use **EditorExportPlugin**, register it using the :ref:`EditorPlugin.add_export_plugin()` method first. .. rst-class:: classref-introduction-group @@ -133,7 +133,7 @@ Method Descriptions Return ``true`` if this plugin will customize resources based on the platform and features used. -When enabled, :ref:`_get_customization_configuration_hash` and :ref:`_customize_resource` will be called and must be implemented. +When enabled, :ref:`_get_customization_configuration_hash()` and :ref:`_customize_resource()` will be called and must be implemented. .. rst-class:: classref-item-separator @@ -147,9 +147,9 @@ When enabled, :ref:`_get_customization_configuration_hash` and :ref:`_customize_scene` will be called and must be implemented. +When enabled, :ref:`_get_customization_configuration_hash()` and :ref:`_customize_scene()` will be called and must be implemented. -\ **Note:** :ref:`_customize_scene` will only be called for scenes that have been modified since the last export. +\ **Note:** :ref:`_customize_scene()` will only be called for scenes that have been modified since the last export. .. rst-class:: classref-item-separator @@ -165,9 +165,9 @@ Customize a resource. If changes are made to it, return the same or a new resour The ``path`` argument is only used when customizing an actual file, otherwise this means that this resource is part of another one and it will be empty. -Implementing this method is required if :ref:`_begin_customize_resources` returns ``true``. +Implementing this method is required if :ref:`_begin_customize_resources()` returns ``true``. -\ **Note:** When customizing any of the following types and returning another resource, the other resource should not be skipped using :ref:`skip` in :ref:`_export_file`: +\ **Note:** When customizing any of the following types and returning another resource, the other resource should not be skipped using :ref:`skip()` in :ref:`_export_file()`: - :ref:`AtlasTexture`\ @@ -193,7 +193,7 @@ Implementing this method is required if :ref:`_begin_customize_resources` returns ``true``. +Implementing this method is required if :ref:`_begin_customize_scenes()` returns ``true``. .. rst-class:: classref-item-separator @@ -253,9 +253,9 @@ Virtual method to be overridden by the user. Called when the export is finished. |void| **_export_file**\ (\ path\: :ref:`String`, type\: :ref:`String`, features\: :ref:`PackedStringArray`\ ) |virtual| :ref:`πŸ”—` -Virtual method to be overridden by the user. Called for each exported file before :ref:`_customize_resource` and :ref:`_customize_scene`. The arguments can be used to identify the file. ``path`` is the path of the file, ``type`` is the :ref:`Resource` represented by the file (e.g. :ref:`PackedScene`), and ``features`` is the list of features for the export. +Virtual method to be overridden by the user. Called for each exported file before :ref:`_customize_resource()` and :ref:`_customize_scene()`. The arguments can be used to identify the file. ``path`` is the path of the file, ``type`` is the :ref:`Resource` represented by the file (e.g. :ref:`PackedScene`), and ``features`` is the list of features for the export. -Calling :ref:`skip` inside this callback will make the file not included in the export. +Calling :ref:`skip()` inside this callback will make the file not included in the export. .. rst-class:: classref-item-separator @@ -361,7 +361,7 @@ Virtual method to be overridden by the user. This is used at export time to upda Return a hash based on the configuration passed (for both scenes and resources). This helps keep separate caches for separate export configurations. -Implementing this method is required if :ref:`_begin_customize_resources` returns ``true``. +Implementing this method is required if :ref:`_begin_customize_resources()` returns ``true``. .. rst-class:: classref-item-separator @@ -401,7 +401,7 @@ Validates ``option`` and returns the visibility for the specified ``platform``. Check the requirements for the given ``option`` and return a non-empty warning string if they are not met. -\ **Note:** Use :ref:`get_option` to check the value of the export options. +\ **Note:** Use :ref:`get_option()` to check the value of the export options. .. rst-class:: classref-item-separator @@ -417,7 +417,7 @@ Return a list of export options that can be configured for this export plugin. Each element in the return value is a :ref:`Dictionary` with the following keys: -- ``option``: A dictionary with the structure documented by :ref:`Object.get_property_list`, but all keys are optional. +- ``option``: A dictionary with the structure documented by :ref:`Object.get_property_list()`, but all keys are optional. - ``default_value``: The default value for this option. @@ -477,7 +477,7 @@ Implementing this method is required. :ref:`bool` **_should_update_export_options**\ (\ platform\: :ref:`EditorExportPlatform`\ ) |virtual| |const| :ref:`πŸ”—` -Return ``true``, if the result of :ref:`_get_export_options` has changed and the export options of preset corresponding to ``platform`` should be updated. +Return ``true``, if the result of :ref:`_get_export_options()` has changed and the export options of preset corresponding to ``platform`` should be updated. .. rst-class:: classref-item-separator @@ -503,9 +503,9 @@ Return ``true`` if the plugin supports the given ``platform``. Adds a custom file to be exported. ``path`` is the virtual path that can be used to load the file, ``file`` is the binary data of the file. -When called inside :ref:`_export_file` and ``remap`` is ``true``, the current file will not be exported, but instead remapped to this custom file. ``remap`` is ignored when called in other places. +When called inside :ref:`_export_file()` and ``remap`` is ``true``, the current file will not be exported, but instead remapped to this custom file. ``remap`` is ignored when called in other places. -\ ``file`` will not be imported, so consider using :ref:`_customize_resource` to remap imported resources. +\ ``file`` will not be imported, so consider using :ref:`_customize_resource()` to remap imported resources. .. rst-class:: classref-item-separator @@ -543,7 +543,7 @@ Adds a C++ code to the iOS export. The final code is created from the code appen Adds a dynamic library (\*.dylib, \*.framework) to Linking Phase in iOS's Xcode project and embeds it into resulting binary. -\ **Note:** For static libraries (\*.a) works in same way as :ref:`add_ios_framework`. +\ **Note:** For static libraries (\*.a) works in same way as :ref:`add_ios_framework()`. \ **Note:** This method should not be used for System libraries as they are already present on the device. @@ -659,7 +659,7 @@ Returns currently used export preset. :ref:`Variant` **get_option**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`πŸ”—` -Returns the current value of an export option supplied by :ref:`_get_export_options`. +Returns the current value of an export option supplied by :ref:`_get_export_options()`. .. rst-class:: classref-item-separator @@ -671,7 +671,7 @@ Returns the current value of an export option supplied by :ref:`_get_export_opti |void| **skip**\ (\ ) :ref:`πŸ”—` -To be called inside :ref:`_export_file`. Skips the current file, so it's not included in the export. +To be called inside :ref:`_export_file()`. Skips the current file, so it's not included in the export. .. |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_editorexportpreset.rst b/classes/class_editorexportpreset.rst index 9b3882dca..548d74389 100644 --- a/classes/class_editorexportpreset.rst +++ b/classes/class_editorexportpreset.rst @@ -297,7 +297,7 @@ Returns string with a comma separated list of custom features. :ref:`Dictionary` **get_customized_files**\ (\ ) |const| :ref:`πŸ”—` -Returns :ref:`Dictionary` of files selected in the "Resources" tab of the export dialog. Dictionary keys are file names and values are export mode - ``"strip``, ``"keep"``, or ``"remove"``. See also :ref:`get_file_export_mode`. +Returns :ref:`Dictionary` of files selected in the "Resources" tab of the export dialog. Dictionary keys are file names and values are export mode - ``"strip``, ``"keep"``, or ``"remove"``. See also :ref:`get_file_export_mode()`. .. rst-class:: classref-item-separator diff --git a/classes/class_editorfeatureprofile.rst b/classes/class_editorfeatureprofile.rst index 6874c12b7..e22cf0311 100644 --- a/classes/class_editorfeatureprofile.rst +++ b/classes/class_editorfeatureprofile.rst @@ -225,9 +225,9 @@ Returns ``true`` if the ``feature`` is disabled. When a feature is disabled, it :ref:`Error` **load_from_file**\ (\ path\: :ref:`String`\ ) :ref:`πŸ”—` -Loads an editor feature profile from a file. The file must follow the JSON format obtained by using the feature profile manager's **Export** button or the :ref:`save_to_file` method. +Loads an editor feature profile from a file. The file must follow the JSON format obtained by using the feature profile manager's **Export** button or the :ref:`save_to_file()` method. -\ **Note:** Feature profiles created via the user interface are loaded from the ``feature_profiles`` directory, as a file with the ``.profile`` extension. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir`. +\ **Note:** Feature profiles created via the user interface are loaded from the ``feature_profiles`` directory, as a file with the ``.profile`` extension. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir()`. .. rst-class:: classref-item-separator @@ -239,9 +239,9 @@ Loads an editor feature profile from a file. The file must follow the JSON forma :ref:`Error` **save_to_file**\ (\ path\: :ref:`String`\ ) :ref:`πŸ”—` -Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's **Import** button or the :ref:`load_from_file` method. +Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's **Import** button or the :ref:`load_from_file()` method. -\ **Note:** Feature profiles created via the user interface are saved in the ``feature_profiles`` directory, as a file with the ``.profile`` extension. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir`. +\ **Note:** Feature profiles created via the user interface are saved in the ``feature_profiles`` directory, as a file with the ``.profile`` extension. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir()`. .. rst-class:: classref-item-separator diff --git a/classes/class_editorfilesystem.rst b/classes/class_editorfilesystem.rst index 88106cc11..8f9d312ee 100644 --- a/classes/class_editorfilesystem.rst +++ b/classes/class_editorfilesystem.rst @@ -21,7 +21,7 @@ Description This object holds information of all resources in the filesystem, their types, etc. -\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_resource_filesystem`. +\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_resource_filesystem()`. .. rst-class:: classref-reftable-group @@ -205,9 +205,9 @@ Returns ``true`` if the filesystem is being scanned. Reimports a set of files. Call this if these files or their ``.import`` files were directly edited by script or an external program. -If the file type changed or the file was newly created, use :ref:`update_file` or :ref:`scan`. +If the file type changed or the file was newly created, use :ref:`update_file()` or :ref:`scan()`. -\ **Note:** This function blocks until the import is finished. However, the main loop iteration, including timers and :ref:`Node._process`, will occur during the import process due to progress bar updates. Avoid calls to :ref:`reimport_files` or :ref:`scan` while an import is in progress. +\ **Note:** This function blocks until the import is finished. However, the main loop iteration, including timers and :ref:`Node._process()`, will occur during the import process due to progress bar updates. Avoid calls to :ref:`reimport_files()` or :ref:`scan()` while an import is in progress. .. rst-class:: classref-item-separator @@ -245,7 +245,7 @@ Check if the source of any imported resource changed. Add a file in an existing directory, or schedule file information to be updated on editor restart. Can be used to update text files saved by an external program. -This will not import the file. To reimport, call :ref:`reimport_files` or :ref:`scan` methods. +This will not import the file. To reimport, call :ref:`reimport_files()` or :ref:`scan()` methods. .. |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_editorimportplugin.rst b/classes/class_editorimportplugin.rst index 18e3bc4b0..831a80e41 100644 --- a/classes/class_editorimportplugin.rst +++ b/classes/class_editorimportplugin.rst @@ -21,7 +21,7 @@ Description **EditorImportPlugin**\ s provide a way to extend the editor's resource import functionality. Use them to import resources from custom files or to provide alternatives to the editor's existing importers. -EditorImportPlugins work by associating with specific file extensions and a resource type. See :ref:`_get_recognized_extensions` and :ref:`_get_resource_type`. They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the ``.godot/imported`` directory (see :ref:`ProjectSettings.application/config/use_hidden_project_data_directory`). +EditorImportPlugins work by associating with specific file extensions and a resource type. See :ref:`_get_recognized_extensions()` and :ref:`_get_resource_type()`. They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the ``.godot/imported`` directory (see :ref:`ProjectSettings.application/config/use_hidden_project_data_directory`). Below is an example EditorImportPlugin that imports a :ref:`Mesh` from a file with the extension ".special" or ".spec": @@ -137,7 +137,7 @@ Below is an example EditorImportPlugin that imports a :ref:`Mesh` fr -To use **EditorImportPlugin**, register it using the :ref:`EditorPlugin.add_import_plugin` method first. +To use **EditorImportPlugin**, register it using the :ref:`EditorPlugin.add_import_plugin()` method first. .. rst-class:: classref-introduction-group @@ -306,7 +306,7 @@ Returns ``true`` to make all options always visible. :ref:`int` **_get_preset_count**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Gets the number of initial presets defined by the plugin. Use :ref:`_get_import_options` to get the default options for the preset and :ref:`_get_preset_name` to get the name of the preset. +Gets the number of initial presets defined by the plugin. Use :ref:`_get_import_options()` to get the default options for the preset and :ref:`_get_preset_name()` to get the name of the preset. .. rst-class:: classref-item-separator @@ -404,7 +404,7 @@ This method must be overridden to do the actual importing work. See this class' :ref:`Error` **append_import_external_resource**\ (\ path\: :ref:`String`, custom_options\: :ref:`Dictionary` = {}, custom_importer\: :ref:`String` = "", generator_parameters\: :ref:`Variant` = null\ ) :ref:`πŸ”—` -This function can only be called during the :ref:`_import` callback and it allows manually importing resources from it. This is useful when the imported file generates external resources that require importing (as example, images). Custom parameters for the ".import" file can be passed via the ``custom_options``. Additionally, in cases where multiple importers can handle a file, the ``custom_importer`` can be specified to force a specific one. This function performs a resource import and returns immediately with a success or error code. ``generator_parameters`` defines optional extra metadata which will be stored as ``generator_parameters`` in the ``remap`` section of the ``.import`` file, for example to store a md5 hash of the source data. +This function can only be called during the :ref:`_import()` callback and it allows manually importing resources from it. This is useful when the imported file generates external resources that require importing (as example, images). Custom parameters for the ".import" file can be passed via the ``custom_options``. Additionally, in cases where multiple importers can handle a file, the ``custom_importer`` can be specified to force a specific one. This function performs a resource import and returns immediately with a success or error code. ``generator_parameters`` defines optional extra metadata which will be stored as ``generator_parameters`` in the ``remap`` section of the ``.import`` file, for example to store a md5 hash of the source data. .. |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_editorinspector.rst b/classes/class_editorinspector.rst index 3adfee7b2..1f58b3d36 100644 --- a/classes/class_editorinspector.rst +++ b/classes/class_editorinspector.rst @@ -19,9 +19,9 @@ A control used to edit properties of an object. Description ----------- -This is the control that implements property editing in the editor's Settings dialogs, the Inspector dock, etc. To get the **EditorInspector** used in the editor's Inspector dock, use :ref:`EditorInterface.get_inspector`. +This is the control that implements property editing in the editor's Settings dialogs, the Inspector dock, etc. To get the **EditorInspector** used in the editor's Inspector dock, use :ref:`EditorInterface.get_inspector()`. -\ **EditorInspector** will show properties in the same order as the array returned by :ref:`Object.get_property_list`. +\ **EditorInspector** will show properties in the same order as the array returned by :ref:`Object.get_property_list()`. If a property's name is path-like (i.e. if it contains forward slashes), **EditorInspector** will create nested sections for "directories" along the path. For example, if a property is named ``highlighting/gdscript/node_path_color``, it will be shown as "Node Path Color" inside the "GDScript" section nested inside the "Highlighting" section. diff --git a/classes/class_editorinspectorplugin.rst b/classes/class_editorinspectorplugin.rst index 60aac61d8..647a9e34f 100644 --- a/classes/class_editorinspectorplugin.rst +++ b/classes/class_editorinspectorplugin.rst @@ -21,17 +21,17 @@ Description **EditorInspectorPlugin** allows adding custom property editors to :ref:`EditorInspector`. -When an object is edited, the :ref:`_can_handle` function is called and must return ``true`` if the object type is supported. +When an object is edited, the :ref:`_can_handle()` function is called and must return ``true`` if the object type is supported. -If supported, the function :ref:`_parse_begin` will be called, allowing to place custom controls at the beginning of the class. +If supported, the function :ref:`_parse_begin()` will be called, allowing to place custom controls at the beginning of the class. -Subsequently, the :ref:`_parse_category` and :ref:`_parse_property` are called for every category and property. They offer the ability to add custom controls to the inspector too. +Subsequently, the :ref:`_parse_category()` and :ref:`_parse_property()` are called for every category and property. They offer the ability to add custom controls to the inspector too. -Finally, :ref:`_parse_end` will be called. +Finally, :ref:`_parse_end()` will be called. On each of these calls, the "add" functions can be called. -To use **EditorInspectorPlugin**, register it using the :ref:`EditorPlugin.add_inspector_plugin` method first. +To use **EditorInspectorPlugin**, register it using the :ref:`EditorPlugin.add_inspector_plugin()` method first. .. rst-class:: classref-introduction-group diff --git a/classes/class_editorinterface.rst b/classes/class_editorinterface.rst index a07b56e60..1d1ecf41b 100644 --- a/classes/class_editorinterface.rst +++ b/classes/class_editorinterface.rst @@ -239,7 +239,7 @@ Edits the given :ref:`Node`. The node will be also selected if it's |void| **edit_resource**\ (\ resource\: :ref:`Resource`\ ) :ref:`πŸ”—` -Edits the given :ref:`Resource`. If the resource is a :ref:`Script` you can also edit it with :ref:`edit_script` to specify the line and column position. +Edits the given :ref:`Resource`. If the resource is a :ref:`Script` you can also edit it with :ref:`edit_script()` to specify the line and column position. .. rst-class:: classref-item-separator @@ -291,7 +291,7 @@ Returns the editor's :ref:`EditorCommandPalette` ins :ref:`String` **get_current_directory**\ (\ ) |const| :ref:`πŸ”—` -Returns the current directory being viewed in the :ref:`FileSystemDock`. If a file is selected, its base directory will be returned using :ref:`String.get_base_dir` instead. +Returns the current directory being viewed in the :ref:`FileSystemDock`. If a file is selected, its base directory will be returned using :ref:`String.get_base_dir()` instead. .. rst-class:: classref-item-separator @@ -305,9 +305,9 @@ Returns the current directory being viewed in the :ref:`FileSystemDock`, you must load the feature profile using :ref:`EditorFeatureProfile.load_from_file`. +In order to get a reference to the :ref:`EditorFeatureProfile`, you must load the feature profile using :ref:`EditorFeatureProfile.load_from_file()`. -\ **Note:** Feature profiles created via the user interface are loaded from the ``feature_profiles`` directory, as a file with the ``.profile`` extension. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir`. +\ **Note:** Feature profiles created via the user interface are loaded from the ``feature_profiles`` directory, as a file with the ``.profile`` extension. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir()`. .. rst-class:: classref-item-separator @@ -343,7 +343,7 @@ Returns the edited (current) scene's root :ref:`Node`. :ref:`VBoxContainer` **get_editor_main_screen**\ (\ ) |const| :ref:`πŸ”—` -Returns the editor control responsible for main screen plugins and tools. Use it with plugins that implement :ref:`EditorPlugin._has_main_screen`. +Returns the editor control responsible for main screen plugins and tools. Use it with plugins that implement :ref:`EditorPlugin._has_main_screen()`. \ **Note:** This node is a :ref:`VBoxContainer`, which means that if you add a :ref:`Control` child to it, you need to set the child's :ref:`Control.size_flags_vertical` to :ref:`Control.SIZE_EXPAND_FILL` to make it use the full available space. @@ -447,7 +447,7 @@ Returns the 2D editor :ref:`SubViewport`. It does not have a :ref:`SubViewport` **get_editor_viewport_3d**\ (\ idx\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Returns the specified 3D editor :ref:`SubViewport`, from ``0`` to ``3``. The viewport can be used to access the active editor cameras with :ref:`Viewport.get_camera_3d`. +Returns the specified 3D editor :ref:`SubViewport`, from ``0`` to ``3``. The viewport can be used to access the active editor cameras with :ref:`Viewport.get_camera_3d()`. .. rst-class:: classref-item-separator @@ -725,9 +725,9 @@ The ``type_blocklist`` contains a list of type names, and the types in the block |void| **popup_dialog**\ (\ dialog\: :ref:`Window`, rect\: :ref:`Rect2i` = Rect2i(0, 0, 0, 0)\ ) :ref:`πŸ”—` -Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive`. The dialog must have no current parent, otherwise the method fails. +Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive()`. The dialog must have no current parent, otherwise the method fails. -See also :ref:`Window.set_unparent_when_invisible`. +See also :ref:`Window.set_unparent_when_invisible()`. .. rst-class:: classref-item-separator @@ -739,9 +739,9 @@ See also :ref:`Window.set_unparent_when_invisible`, minsize\: :ref:`Vector2i` = Vector2i(0, 0)\ ) :ref:`πŸ”—` -Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive_centered`. The dialog must have no current parent, otherwise the method fails. +Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive_centered()`. The dialog must have no current parent, otherwise the method fails. -See also :ref:`Window.set_unparent_when_invisible`. +See also :ref:`Window.set_unparent_when_invisible()`. .. rst-class:: classref-item-separator @@ -753,9 +753,9 @@ See also :ref:`Window.set_unparent_when_invisible`, minsize\: :ref:`Vector2i` = Vector2i(0, 0), fallback_ratio\: :ref:`float` = 0.75\ ) :ref:`πŸ”—` -Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive_centered_clamped`. The dialog must have no current parent, otherwise the method fails. +Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive_centered_clamped()`. The dialog must have no current parent, otherwise the method fails. -See also :ref:`Window.set_unparent_when_invisible`. +See also :ref:`Window.set_unparent_when_invisible()`. .. rst-class:: classref-item-separator @@ -767,9 +767,9 @@ See also :ref:`Window.set_unparent_when_invisible`, ratio\: :ref:`float` = 0.8\ ) :ref:`πŸ”—` -Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive_centered_ratio`. The dialog must have no current parent, otherwise the method fails. +Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive_centered_ratio()`. The dialog must have no current parent, otherwise the method fails. -See also :ref:`Window.set_unparent_when_invisible`. +See also :ref:`Window.set_unparent_when_invisible()`. .. rst-class:: classref-item-separator @@ -819,7 +819,7 @@ Pops up an editor dialog for selecting a :ref:`Node` from the edited |void| **popup_property_selector**\ (\ object\: :ref:`Object`, callback\: :ref:`Callable`, type_filter\: :ref:`PackedInt32Array` = PackedInt32Array(), current_value\: :ref:`String` = ""\ ) :ref:`πŸ”—` -Pops up an editor dialog for selecting properties from ``object``. The ``callback`` must take a single argument of type :ref:`NodePath`. It is called on the selected property path (see :ref:`NodePath.get_as_property_path`) or the empty path ``^""`` if the dialog is canceled. If ``type_filter`` is provided, the dialog will only show properties that match one of the listed :ref:`Variant.Type` values. If ``current_value`` is provided, the property will be selected automatically in the property list, if it exists. +Pops up an editor dialog for selecting properties from ``object``. The ``callback`` must take a single argument of type :ref:`NodePath`. It is called on the selected property path (see :ref:`NodePath.get_as_property_path()`) or the empty path ``^""`` if the dialog is canceled. If ``type_filter`` is provided, the dialog will only show properties that match one of the listed :ref:`Variant.Type` values. If ``current_value`` is provided, the property will be selected automatically in the property list, if it exists. :: @@ -931,7 +931,7 @@ Selects and activates the specified feature profile with the given ``profile_nam A feature profile can be created programmatically using the :ref:`EditorFeatureProfile` class. -\ **Note:** The feature profile that gets activated must be located in the ``feature_profiles`` directory, as a file with the ``.profile`` extension. If a profile could not be found, an error occurs. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir`. +\ **Note:** The feature profile that gets activated must be located in the ``feature_profiles`` directory, as a file with the ``.profile`` extension. If a profile could not be found, an error occurs. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir()`. .. rst-class:: classref-item-separator diff --git a/classes/class_editornode3dgizmo.rst b/classes/class_editornode3dgizmo.rst index ef8a09dc4..2397547c4 100644 --- a/classes/class_editornode3dgizmo.rst +++ b/classes/class_editornode3dgizmo.rst @@ -110,11 +110,11 @@ Method Descriptions |void| **_commit_handle**\ (\ id\: :ref:`int`, secondary\: :ref:`bool`, restore\: :ref:`Variant`, cancel\: :ref:`bool`\ ) |virtual| :ref:`πŸ”—` -Override this method to commit a handle being edited (handles must have been previously added by :ref:`add_handles`). This usually means creating an :ref:`UndoRedo` action for the change, using the current handle value as "do" and the ``restore`` argument as "undo". +Override this method to commit a handle being edited (handles must have been previously added by :ref:`add_handles()`). This usually means creating an :ref:`UndoRedo` action for the change, using the current handle value as "do" and the ``restore`` argument as "undo". If the ``cancel`` argument is ``true``, the ``restore`` value should be directly set, without any :ref:`UndoRedo` action. -The ``secondary`` argument is ``true`` when the committed handle is secondary (see :ref:`add_handles` for more information). +The ``secondary`` argument is ``true`` when the committed handle is secondary (see :ref:`add_handles()` for more information). .. rst-class:: classref-item-separator @@ -126,7 +126,7 @@ The ``secondary`` argument is ``true`` when the committed handle is secondary (s |void| **_commit_subgizmos**\ (\ ids\: :ref:`PackedInt32Array`, restores\: :ref:`Array`\[:ref:`Transform3D`\], cancel\: :ref:`bool`\ ) |virtual| :ref:`πŸ”—` -Override this method to commit a group of subgizmos being edited (see :ref:`_subgizmos_intersect_ray` and :ref:`_subgizmos_intersect_frustum`). This usually means creating an :ref:`UndoRedo` action for the change, using the current transforms as "do" and the ``restores`` transforms as "undo". +Override this method to commit a group of subgizmos being edited (see :ref:`_subgizmos_intersect_ray()` and :ref:`_subgizmos_intersect_frustum()`). This usually means creating an :ref:`UndoRedo` action for the change, using the current transforms as "do" and the ``restores`` transforms as "undo". If the ``cancel`` argument is ``true``, the ``restores`` transforms should be directly set, without any :ref:`UndoRedo` action. @@ -140,9 +140,9 @@ If the ``cancel`` argument is ``true``, the ``restores`` transforms should be di :ref:`String` **_get_handle_name**\ (\ id\: :ref:`int`, secondary\: :ref:`bool`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to return the name of an edited handle (handles must have been previously added by :ref:`add_handles`). Handles can be named for reference to the user when editing. +Override this method to return the name of an edited handle (handles must have been previously added by :ref:`add_handles()`). Handles can be named for reference to the user when editing. -The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`add_handles` for more information). +The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`add_handles()` for more information). .. rst-class:: classref-item-separator @@ -154,9 +154,9 @@ The ``secondary`` argument is ``true`` when the requested handle is secondary (s :ref:`Variant` **_get_handle_value**\ (\ id\: :ref:`int`, secondary\: :ref:`bool`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the ``restore`` argument in :ref:`_commit_handle`. +Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the ``restore`` argument in :ref:`_commit_handle()`. -The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`add_handles` for more information). +The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`add_handles()` for more information). .. rst-class:: classref-item-separator @@ -168,7 +168,7 @@ The ``secondary`` argument is ``true`` when the requested handle is secondary (s :ref:`Transform3D` **_get_subgizmo_transform**\ (\ id\: :ref:`int`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to return the current transform of a subgizmo. This transform will be requested at the start of an edit and used as the ``restore`` argument in :ref:`_commit_subgizmos`. +Override this method to return the current transform of a subgizmo. This transform will be requested at the start of an edit and used as the ``restore`` argument in :ref:`_commit_subgizmos()`. .. rst-class:: classref-item-separator @@ -182,7 +182,7 @@ Override this method to return the current transform of a subgizmo. This transfo Override this method to return ``true`` whenever the given handle should be highlighted in the editor. -The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`add_handles` for more information). +The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`add_handles()` for more information). .. rst-class:: classref-item-separator @@ -194,7 +194,7 @@ The ``secondary`` argument is ``true`` when the requested handle is secondary (s |void| **_redraw**\ (\ ) |virtual| :ref:`πŸ”—` -Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call :ref:`clear` at the beginning of this method and then add visual elements depending on the node's properties. +Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call :ref:`clear()` at the beginning of this method and then add visual elements depending on the node's properties. .. rst-class:: classref-item-separator @@ -206,9 +206,9 @@ Override this method to add all the gizmo elements whenever a gizmo update is re |void| **_set_handle**\ (\ id\: :ref:`int`, secondary\: :ref:`bool`, camera\: :ref:`Camera3D`, point\: :ref:`Vector2`\ ) |virtual| :ref:`πŸ”—` -Override this method to update the node properties when the user drags a gizmo handle (previously added with :ref:`add_handles`). The provided ``point`` is the mouse position in screen coordinates and the ``camera`` can be used to convert it to raycasts. +Override this method to update the node properties when the user drags a gizmo handle (previously added with :ref:`add_handles()`). The provided ``point`` is the mouse position in screen coordinates and the ``camera`` can be used to convert it to raycasts. -The ``secondary`` argument is ``true`` when the edited handle is secondary (see :ref:`add_handles` for more information). +The ``secondary`` argument is ``true`` when the edited handle is secondary (see :ref:`add_handles()` for more information). .. rst-class:: classref-item-separator @@ -220,7 +220,7 @@ The ``secondary`` argument is ``true`` when the edited handle is secondary (see |void| **_set_subgizmo_transform**\ (\ id\: :ref:`int`, transform\: :ref:`Transform3D`\ ) |virtual| :ref:`πŸ”—` -Override this method to update the node properties during subgizmo editing (see :ref:`_subgizmos_intersect_ray` and :ref:`_subgizmos_intersect_frustum`). The ``transform`` is given in the :ref:`Node3D`'s local coordinate system. +Override this method to update the node properties during subgizmo editing (see :ref:`_subgizmos_intersect_ray()` and :ref:`_subgizmos_intersect_frustum()`). The ``transform`` is given in the :ref:`Node3D`'s local coordinate system. .. rst-class:: classref-item-separator @@ -232,7 +232,7 @@ Override this method to update the node properties during subgizmo editing (see :ref:`PackedInt32Array` **_subgizmos_intersect_frustum**\ (\ camera\: :ref:`Camera3D`, frustum\: :ref:`Array`\[:ref:`Plane`\]\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to allow selecting subgizmos using mouse drag box selection. Given a ``camera`` and a ``frustum``, this method should return which subgizmos are contained within the frustum. The ``frustum`` argument consists of an array with all the :ref:`Plane`\ s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, which can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform` or :ref:`_commit_subgizmos`. +Override this method to allow selecting subgizmos using mouse drag box selection. Given a ``camera`` and a ``frustum``, this method should return which subgizmos are contained within the frustum. The ``frustum`` argument consists of an array with all the :ref:`Plane`\ s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, which can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform()` or :ref:`_commit_subgizmos()`. .. rst-class:: classref-item-separator @@ -244,7 +244,7 @@ Override this method to allow selecting subgizmos using mouse drag box selection :ref:`int` **_subgizmos_intersect_ray**\ (\ camera\: :ref:`Camera3D`, point\: :ref:`Vector2`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to allow selecting subgizmos using mouse clicks. Given a ``camera`` and a ``point`` in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform` or :ref:`_commit_subgizmos`. +Override this method to allow selecting subgizmos using mouse clicks. Given a ``camera`` and a ``point`` in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform()` or :ref:`_commit_subgizmos()`. .. rst-class:: classref-item-separator @@ -256,7 +256,7 @@ Override this method to allow selecting subgizmos using mouse clicks. Given a `` |void| **add_collision_segments**\ (\ segments\: :ref:`PackedVector3Array`\ ) :ref:`πŸ”—` -Adds the specified ``segments`` to the gizmo's collision shape for picking. Call this method during :ref:`_redraw`. +Adds the specified ``segments`` to the gizmo's collision shape for picking. Call this method during :ref:`_redraw()`. .. rst-class:: classref-item-separator @@ -268,7 +268,7 @@ Adds the specified ``segments`` to the gizmo's collision shape for picking. Call |void| **add_collision_triangles**\ (\ triangles\: :ref:`TriangleMesh`\ ) :ref:`πŸ”—` -Adds collision triangles to the gizmo for picking. A :ref:`TriangleMesh` can be generated from a regular :ref:`Mesh` too. Call this method during :ref:`_redraw`. +Adds collision triangles to the gizmo for picking. A :ref:`TriangleMesh` can be generated from a regular :ref:`Mesh` too. Call this method during :ref:`_redraw()`. .. rst-class:: classref-item-separator @@ -284,7 +284,7 @@ Adds a list of handles (points) which can be used to edit the properties of the The ``secondary`` argument marks the added handles as secondary, meaning they will normally have lower selection priority than regular handles. When the user is holding the shift key secondary handles will switch to have higher priority than regular handles. This change in priority can be used to place multiple handles at the same point while still giving the user control on their selection. -There are virtual methods which will be called upon editing of these handles. Call this method during :ref:`_redraw`. +There are virtual methods which will be called upon editing of these handles. Call this method during :ref:`_redraw()`. .. rst-class:: classref-item-separator @@ -296,7 +296,7 @@ There are virtual methods which will be called upon editing of these handles. Ca |void| **add_lines**\ (\ lines\: :ref:`PackedVector3Array`, material\: :ref:`Material`, billboard\: :ref:`bool` = false, modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) :ref:`πŸ”—` -Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this method during :ref:`_redraw`. +Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this method during :ref:`_redraw()`. .. rst-class:: classref-item-separator @@ -308,7 +308,7 @@ Adds lines to the gizmo (as sets of 2 points), with a given material. The lines |void| **add_mesh**\ (\ mesh\: :ref:`Mesh`, material\: :ref:`Material` = null, transform\: :ref:`Transform3D` = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), skeleton\: :ref:`SkinReference` = null\ ) :ref:`πŸ”—` -Adds a mesh to the gizmo with the specified ``material``, local ``transform`` and ``skeleton``. Call this method during :ref:`_redraw`. +Adds a mesh to the gizmo with the specified ``material``, local ``transform`` and ``skeleton``. Call this method during :ref:`_redraw()`. .. rst-class:: classref-item-separator @@ -320,7 +320,7 @@ Adds a mesh to the gizmo with the specified ``material``, local ``transform`` an |void| **add_unscaled_billboard**\ (\ material\: :ref:`Material`, default_scale\: :ref:`float` = 1, modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) :ref:`πŸ”—` -Adds an unscaled billboard for visualization and selection. Call this method during :ref:`_redraw`. +Adds an unscaled billboard for visualization and selection. Call this method during :ref:`_redraw()`. .. rst-class:: classref-item-separator @@ -356,7 +356,7 @@ Returns the :ref:`Node3D` node associated with this gizmo. :ref:`EditorNode3DGizmoPlugin` **get_plugin**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`EditorNode3DGizmoPlugin` that owns this gizmo. It's useful to retrieve materials using :ref:`EditorNode3DGizmoPlugin.get_material`. +Returns the :ref:`EditorNode3DGizmoPlugin` that owns this gizmo. It's useful to retrieve materials using :ref:`EditorNode3DGizmoPlugin.get_material()`. .. rst-class:: classref-item-separator @@ -368,7 +368,7 @@ Returns the :ref:`EditorNode3DGizmoPlugin` that o :ref:`PackedInt32Array` **get_subgizmo_selection**\ (\ ) |const| :ref:`πŸ”—` -Returns a list of the currently selected subgizmos. Can be used to highlight selected elements during :ref:`_redraw`. +Returns a list of the currently selected subgizmos. Can be used to highlight selected elements during :ref:`_redraw()`. .. rst-class:: classref-item-separator @@ -380,7 +380,7 @@ Returns a list of the currently selected subgizmos. Can be used to highlight sel :ref:`bool` **is_subgizmo_selected**\ (\ id\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the given subgizmo is currently selected. Can be used to highlight selected elements during :ref:`_redraw`. +Returns ``true`` if the given subgizmo is currently selected. Can be used to highlight selected elements during :ref:`_redraw()`. .. rst-class:: classref-item-separator diff --git a/classes/class_editornode3dgizmoplugin.rst b/classes/class_editornode3dgizmoplugin.rst index f7df58f60..94e37b964 100644 --- a/classes/class_editornode3dgizmoplugin.rst +++ b/classes/class_editornode3dgizmoplugin.rst @@ -21,7 +21,7 @@ Description **EditorNode3DGizmoPlugin** allows you to define a new type of Gizmo. There are two main ways to do so: extending **EditorNode3DGizmoPlugin** for the simpler gizmos, or creating a new :ref:`EditorNode3DGizmo` type. See the tutorial in the documentation for more info. -To use **EditorNode3DGizmoPlugin**, register it using the :ref:`EditorPlugin.add_node_3d_gizmo_plugin` method first. +To use **EditorNode3DGizmoPlugin**, register it using the :ref:`EditorPlugin.add_node_3d_gizmo_plugin()` method first. .. rst-class:: classref-introduction-group @@ -127,11 +127,11 @@ Override this method to define whether the gizmos handled by this plugin can be |void| **_commit_handle**\ (\ gizmo\: :ref:`EditorNode3DGizmo`, handle_id\: :ref:`int`, secondary\: :ref:`bool`, restore\: :ref:`Variant`, cancel\: :ref:`bool`\ ) |virtual| :ref:`πŸ”—` -Override this method to commit a handle being edited (handles must have been previously added by :ref:`EditorNode3DGizmo.add_handles` during :ref:`_redraw`). This usually means creating an :ref:`UndoRedo` action for the change, using the current handle value as "do" and the ``restore`` argument as "undo". +Override this method to commit a handle being edited (handles must have been previously added by :ref:`EditorNode3DGizmo.add_handles()` during :ref:`_redraw()`). This usually means creating an :ref:`UndoRedo` action for the change, using the current handle value as "do" and the ``restore`` argument as "undo". If the ``cancel`` argument is ``true``, the ``restore`` value should be directly set, without any :ref:`UndoRedo` action. -The ``secondary`` argument is ``true`` when the committed handle is secondary (see :ref:`EditorNode3DGizmo.add_handles` for more information). +The ``secondary`` argument is ``true`` when the committed handle is secondary (see :ref:`EditorNode3DGizmo.add_handles()` for more information). Called for this plugin's active gizmos. @@ -145,7 +145,7 @@ Called for this plugin's active gizmos. |void| **_commit_subgizmos**\ (\ gizmo\: :ref:`EditorNode3DGizmo`, ids\: :ref:`PackedInt32Array`, restores\: :ref:`Array`\[:ref:`Transform3D`\], cancel\: :ref:`bool`\ ) |virtual| :ref:`πŸ”—` -Override this method to commit a group of subgizmos being edited (see :ref:`_subgizmos_intersect_ray` and :ref:`_subgizmos_intersect_frustum`). This usually means creating an :ref:`UndoRedo` action for the change, using the current transforms as "do" and the ``restores`` transforms as "undo". +Override this method to commit a group of subgizmos being edited (see :ref:`_subgizmos_intersect_ray()` and :ref:`_subgizmos_intersect_frustum()`). This usually means creating an :ref:`UndoRedo` action for the change, using the current transforms as "do" and the ``restores`` transforms as "undo". If the ``cancel`` argument is ``true``, the ``restores`` transforms should be directly set, without any :ref:`UndoRedo` action. As with all subgizmo methods, transforms are given in local space respect to the gizmo's Node3D. Called for this plugin's active gizmos. @@ -159,7 +159,7 @@ If the ``cancel`` argument is ``true``, the ``restores`` transforms should be di :ref:`EditorNode3DGizmo` **_create_gizmo**\ (\ for_node_3d\: :ref:`Node3D`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to return a custom :ref:`EditorNode3DGizmo` for the 3D nodes of your choice, return ``null`` for the rest of nodes. See also :ref:`_has_gizmo`. +Override this method to return a custom :ref:`EditorNode3DGizmo` for the 3D nodes of your choice, return ``null`` for the rest of nodes. See also :ref:`_has_gizmo()`. .. rst-class:: classref-item-separator @@ -183,7 +183,7 @@ Override this method to provide the name that will appear in the gizmo visibilit :ref:`String` **_get_handle_name**\ (\ gizmo\: :ref:`EditorNode3DGizmo`, handle_id\: :ref:`int`, secondary\: :ref:`bool`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to provide gizmo's handle names. The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`EditorNode3DGizmo.add_handles` for more information). Called for this plugin's active gizmos. +Override this method to provide gizmo's handle names. The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`EditorNode3DGizmo.add_handles()` for more information). Called for this plugin's active gizmos. .. rst-class:: classref-item-separator @@ -195,9 +195,9 @@ Override this method to provide gizmo's handle names. The ``secondary`` argument :ref:`Variant` **_get_handle_value**\ (\ gizmo\: :ref:`EditorNode3DGizmo`, handle_id\: :ref:`int`, secondary\: :ref:`bool`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the ``restore`` argument in :ref:`_commit_handle`. +Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the ``restore`` argument in :ref:`_commit_handle()`. -The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`EditorNode3DGizmo.add_handles` for more information). +The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`EditorNode3DGizmo.add_handles()` for more information). Called for this plugin's active gizmos. @@ -225,7 +225,7 @@ All built-in editor gizmos return a priority of ``-1``. If not overridden, this :ref:`Transform3D` **_get_subgizmo_transform**\ (\ gizmo\: :ref:`EditorNode3DGizmo`, subgizmo_id\: :ref:`int`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to return the current transform of a subgizmo. As with all subgizmo methods, the transform should be in local space respect to the gizmo's Node3D. This transform will be requested at the start of an edit and used in the ``restore`` argument in :ref:`_commit_subgizmos`. Called for this plugin's active gizmos. +Override this method to return the current transform of a subgizmo. As with all subgizmo methods, the transform should be in local space respect to the gizmo's Node3D. This transform will be requested at the start of an edit and used in the ``restore`` argument in :ref:`_commit_subgizmos()`. Called for this plugin's active gizmos. .. rst-class:: classref-item-separator @@ -249,7 +249,7 @@ Override this method to define which Node3D nodes have a gizmo from this plugin. :ref:`bool` **_is_handle_highlighted**\ (\ gizmo\: :ref:`EditorNode3DGizmo`, handle_id\: :ref:`int`, secondary\: :ref:`bool`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to return ``true`` whenever to given handle should be highlighted in the editor. The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`EditorNode3DGizmo.add_handles` for more information). Called for this plugin's active gizmos. +Override this method to return ``true`` whenever to given handle should be highlighted in the editor. The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`EditorNode3DGizmo.add_handles()` for more information). Called for this plugin's active gizmos. .. rst-class:: classref-item-separator @@ -273,7 +273,7 @@ Override this method to define whether Node3D with this gizmo should be selectab |void| **_redraw**\ (\ gizmo\: :ref:`EditorNode3DGizmo`\ ) |virtual| :ref:`πŸ”—` -Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call :ref:`EditorNode3DGizmo.clear` at the beginning of this method and then add visual elements depending on the node's properties. +Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call :ref:`EditorNode3DGizmo.clear()` at the beginning of this method and then add visual elements depending on the node's properties. .. rst-class:: classref-item-separator @@ -285,9 +285,9 @@ Override this method to add all the gizmo elements whenever a gizmo update is re |void| **_set_handle**\ (\ gizmo\: :ref:`EditorNode3DGizmo`, handle_id\: :ref:`int`, secondary\: :ref:`bool`, camera\: :ref:`Camera3D`, screen_pos\: :ref:`Vector2`\ ) |virtual| :ref:`πŸ”—` -Override this method to update the node's properties when the user drags a gizmo handle (previously added with :ref:`EditorNode3DGizmo.add_handles`). The provided ``screen_pos`` is the mouse position in screen coordinates and the ``camera`` can be used to convert it to raycasts. +Override this method to update the node's properties when the user drags a gizmo handle (previously added with :ref:`EditorNode3DGizmo.add_handles()`). The provided ``screen_pos`` is the mouse position in screen coordinates and the ``camera`` can be used to convert it to raycasts. -The ``secondary`` argument is ``true`` when the edited handle is secondary (see :ref:`EditorNode3DGizmo.add_handles` for more information). +The ``secondary`` argument is ``true`` when the edited handle is secondary (see :ref:`EditorNode3DGizmo.add_handles()` for more information). Called for this plugin's active gizmos. @@ -301,7 +301,7 @@ Called for this plugin's active gizmos. |void| **_set_subgizmo_transform**\ (\ gizmo\: :ref:`EditorNode3DGizmo`, subgizmo_id\: :ref:`int`, transform\: :ref:`Transform3D`\ ) |virtual| :ref:`πŸ”—` -Override this method to update the node properties during subgizmo editing (see :ref:`_subgizmos_intersect_ray` and :ref:`_subgizmos_intersect_frustum`). The ``transform`` is given in the Node3D's local coordinate system. Called for this plugin's active gizmos. +Override this method to update the node properties during subgizmo editing (see :ref:`_subgizmos_intersect_ray()` and :ref:`_subgizmos_intersect_frustum()`). The ``transform`` is given in the Node3D's local coordinate system. Called for this plugin's active gizmos. .. rst-class:: classref-item-separator @@ -313,7 +313,7 @@ Override this method to update the node properties during subgizmo editing (see :ref:`PackedInt32Array` **_subgizmos_intersect_frustum**\ (\ gizmo\: :ref:`EditorNode3DGizmo`, camera\: :ref:`Camera3D`, frustum_planes\: :ref:`Array`\[:ref:`Plane`\]\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to allow selecting subgizmos using mouse drag box selection. Given a ``camera`` and ``frustum_planes``, this method should return which subgizmos are contained within the frustums. The ``frustum_planes`` argument consists of an array with all the :ref:`Plane`\ s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, these identifiers can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform` or :ref:`_commit_subgizmos`. Called for this plugin's active gizmos. +Override this method to allow selecting subgizmos using mouse drag box selection. Given a ``camera`` and ``frustum_planes``, this method should return which subgizmos are contained within the frustums. The ``frustum_planes`` argument consists of an array with all the :ref:`Plane`\ s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, these identifiers can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform()` or :ref:`_commit_subgizmos()`. Called for this plugin's active gizmos. .. rst-class:: classref-item-separator @@ -325,7 +325,7 @@ Override this method to allow selecting subgizmos using mouse drag box selection :ref:`int` **_subgizmos_intersect_ray**\ (\ gizmo\: :ref:`EditorNode3DGizmo`, camera\: :ref:`Camera3D`, screen_pos\: :ref:`Vector2`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to allow selecting subgizmos using mouse clicks. Given a ``camera`` and a ``screen_pos`` in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform` or :ref:`_commit_subgizmos`. Called for this plugin's active gizmos. +Override this method to allow selecting subgizmos using mouse clicks. Given a ``camera`` and a ``screen_pos`` in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform()` or :ref:`_commit_subgizmos()`. Called for this plugin's active gizmos. .. rst-class:: classref-item-separator @@ -337,7 +337,7 @@ Override this method to allow selecting subgizmos using mouse clicks. Given a `` |void| **add_material**\ (\ name\: :ref:`String`, material\: :ref:`StandardMaterial3D`\ ) :ref:`πŸ”—` -Adds a new material to the internal material list for the plugin. It can then be accessed with :ref:`get_material`. Should not be overridden. +Adds a new material to the internal material list for the plugin. It can then be accessed with :ref:`get_material()`. Should not be overridden. .. rst-class:: classref-item-separator @@ -349,7 +349,7 @@ Adds a new material to the internal material list for the plugin. It can then be |void| **create_handle_material**\ (\ name\: :ref:`String`, billboard\: :ref:`bool` = false, texture\: :ref:`Texture2D` = null\ ) :ref:`πŸ”—` -Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with :ref:`get_material` and used in :ref:`EditorNode3DGizmo.add_handles`. Should not be overridden. +Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with :ref:`get_material()` and used in :ref:`EditorNode3DGizmo.add_handles()`. Should not be overridden. You can optionally provide a texture to use instead of the default icon. @@ -363,7 +363,7 @@ You can optionally provide a texture to use instead of the default icon. |void| **create_icon_material**\ (\ name\: :ref:`String`, texture\: :ref:`Texture2D`, on_top\: :ref:`bool` = false, color\: :ref:`Color` = Color(1, 1, 1, 1)\ ) :ref:`πŸ”—` -Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with :ref:`get_material` and used in :ref:`EditorNode3DGizmo.add_unscaled_billboard`. Should not be overridden. +Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with :ref:`get_material()` and used in :ref:`EditorNode3DGizmo.add_unscaled_billboard()`. Should not be overridden. .. rst-class:: classref-item-separator @@ -375,7 +375,7 @@ Creates an icon material with its variants (selected and/or editable) and adds t |void| **create_material**\ (\ name\: :ref:`String`, color\: :ref:`Color`, billboard\: :ref:`bool` = false, on_top\: :ref:`bool` = false, use_vertex_color\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with :ref:`get_material` and used in :ref:`EditorNode3DGizmo.add_mesh` and :ref:`EditorNode3DGizmo.add_lines`. Should not be overridden. +Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with :ref:`get_material()` and used in :ref:`EditorNode3DGizmo.add_mesh()` and :ref:`EditorNode3DGizmo.add_lines()`. Should not be overridden. .. rst-class:: classref-item-separator diff --git a/classes/class_editorpaths.rst b/classes/class_editorpaths.rst index 571d9a16a..c97b03dab 100644 --- a/classes/class_editorpaths.rst +++ b/classes/class_editorpaths.rst @@ -21,7 +21,7 @@ Description This editor-only singleton returns OS-specific paths to various data folders and files. It can be used in editor plugins to ensure files are saved in the correct location on each operating system. -\ **Note:** This singleton is not accessible in exported projects. Attempting to access it in an exported project will result in a script error as the singleton won't be declared. To prevent script errors in exported projects, use :ref:`Engine.has_singleton` to check whether the singleton is available before using it. +\ **Note:** This singleton is not accessible in exported projects. Attempting to access it in an exported project will result in a script error as the singleton won't be declared. To prevent script errors in exported projects, use :ref:`Engine.has_singleton()` to check whether the singleton is available before using it. \ **Note:** On the Linux/BSD platform, Godot complies with the `XDG Base Directory Specification `__. You can override environment variables following the specification to change the editor and project data paths. @@ -141,7 +141,7 @@ Returns the project-specific editor settings path. Projects all have a unique su :ref:`String` **get_self_contained_file**\ (\ ) |const| :ref:`πŸ”—` -Returns the absolute path to the self-contained file that makes the current Godot editor instance be considered as self-contained. Returns an empty string if the current Godot editor instance isn't self-contained. See also :ref:`is_self_contained`. +Returns the absolute path to the self-contained file that makes the current Godot editor instance be considered as self-contained. Returns an empty string if the current Godot editor instance isn't self-contained. See also :ref:`is_self_contained()`. .. rst-class:: classref-item-separator @@ -155,7 +155,7 @@ Returns the absolute path to the self-contained file that makes the current Godo Returns ``true`` if the editor is marked as self-contained, ``false`` otherwise. When self-contained mode is enabled, user configuration, data and cache files are saved in an ``editor_data/`` folder next to the editor binary. This makes portable usage easier and ensures the Godot editor minimizes file writes outside its own folder. Self-contained mode is not available for exported projects. -Self-contained mode can be enabled by creating a file named ``._sc_`` or ``_sc_`` in the same folder as the editor binary or macOS .app bundle while the editor is not running. See also :ref:`get_self_contained_file`. +Self-contained mode can be enabled by creating a file named ``._sc_`` or ``_sc_`` in the same folder as the editor binary or macOS .app bundle while the editor is not running. See also :ref:`get_self_contained_file()`. \ **Note:** On macOS, quarantine flag should be manually removed before using self-contained mode, see `Running on macOS `__. diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index 19adb55f0..a8b84f379 100644 --- a/classes/class_editorplugin.rst +++ b/classes/class_editorplugin.rst @@ -525,7 +525,7 @@ This is used, for example, in shader editors to let the plugin know that it must This method is called when the editor is about to run the project. The plugin can then perform required operations before the project runs. -This method must return a boolean. If this method returns ``false``, the project will not run. The run is aborted immediately, so this also prevents all other plugins' :ref:`_build` methods from running. +This method must return a boolean. If this method returns ``false``, the project will not run. The run is aborted immediately, so this also prevents all other plugins' :ref:`_build()` methods from running. .. rst-class:: classref-item-separator @@ -587,7 +587,7 @@ Called by the engine when the user enables the **EditorPlugin** in the Plugin ta |void| **_forward_3d_draw_over_viewport**\ (\ viewport_control\: :ref:`Control`\ ) |virtual| :ref:`πŸ”—` -Called by the engine when the 3D editor's viewport is updated. Use the ``overlay`` :ref:`Control` for drawing. You can update the viewport manually by calling :ref:`update_overlays`. +Called by the engine when the 3D editor's viewport is updated. Use the ``overlay`` :ref:`Control` for drawing. You can update the viewport manually by calling :ref:`update_overlays()`. .. tabs:: @@ -636,9 +636,9 @@ Called by the engine when the 3D editor's viewport is updated. Use the ``overlay |void| **_forward_3d_force_draw_over_viewport**\ (\ viewport_control\: :ref:`Control`\ ) |virtual| :ref:`πŸ”—` -This method is the same as :ref:`_forward_3d_draw_over_viewport`, except it draws on top of everything. Useful when you need an extra layer that shows over anything else. +This method is the same as :ref:`_forward_3d_draw_over_viewport()`, except it draws on top of everything. Useful when you need an extra layer that shows over anything else. -You need to enable calling of this method by using :ref:`set_force_draw_over_forwarding_enabled`. +You need to enable calling of this method by using :ref:`set_force_draw_over_forwarding_enabled()`. .. rst-class:: classref-item-separator @@ -650,7 +650,7 @@ You need to enable calling of this method by using :ref:`set_force_draw_over_for :ref:`int` **_forward_3d_gui_input**\ (\ viewport_camera\: :ref:`Camera3D`, event\: :ref:`InputEvent`\ ) |virtual| :ref:`πŸ”—` -Called when there is a root node in the current edited scene, :ref:`_handles` is implemented, and an :ref:`InputEvent` happens in the 3D viewport. The return value decides whether the :ref:`InputEvent` is consumed or forwarded to other **EditorPlugin**\ s. See :ref:`AfterGUIInput` for options. +Called when there is a root node in the current edited scene, :ref:`_handles()` is implemented, and an :ref:`InputEvent` happens in the 3D viewport. The return value decides whether the :ref:`InputEvent` is consumed or forwarded to other **EditorPlugin**\ s. See :ref:`AfterGUIInput` for options. .. tabs:: @@ -702,7 +702,7 @@ This method must return :ref:`AFTER_GUI_INPUT_PASS`\ ) |virtual| :ref:`πŸ”—` -Called by the engine when the 2D editor's viewport is updated. Use the ``overlay`` :ref:`Control` for drawing. You can update the viewport manually by calling :ref:`update_overlays`. +Called by the engine when the 2D editor's viewport is updated. Use the ``overlay`` :ref:`Control` for drawing. You can update the viewport manually by calling :ref:`update_overlays()`. .. tabs:: @@ -751,9 +751,9 @@ Called by the engine when the 2D editor's viewport is updated. Use the ``overlay |void| **_forward_canvas_force_draw_over_viewport**\ (\ viewport_control\: :ref:`Control`\ ) |virtual| :ref:`πŸ”—` -This method is the same as :ref:`_forward_canvas_draw_over_viewport`, except it draws on top of everything. Useful when you need an extra layer that shows over anything else. +This method is the same as :ref:`_forward_canvas_draw_over_viewport()`, except it draws on top of everything. Useful when you need an extra layer that shows over anything else. -You need to enable calling of this method by using :ref:`set_force_draw_over_forwarding_enabled`. +You need to enable calling of this method by using :ref:`set_force_draw_over_forwarding_enabled()`. .. rst-class:: classref-item-separator @@ -765,7 +765,7 @@ You need to enable calling of this method by using :ref:`set_force_draw_over_for :ref:`bool` **_forward_canvas_gui_input**\ (\ event\: :ref:`InputEvent`\ ) |virtual| :ref:`πŸ”—` -Called when there is a root node in the current edited scene, :ref:`_handles` is implemented, and an :ref:`InputEvent` happens in the 2D viewport. If this method returns ``true``, ``event`` is intercepted by this **EditorPlugin**, otherwise ``event`` is forwarded to other Editor classes. +Called when there is a root node in the current edited scene, :ref:`_handles()` is implemented, and an :ref:`InputEvent` happens in the 2D viewport. If this method returns ``true``, ``event`` is intercepted by this **EditorPlugin**, otherwise ``event`` is forwarded to other Editor classes. .. tabs:: @@ -888,13 +888,13 @@ For main screen plugins, this appears at the top of the screen, to the right of :ref:`Dictionary` **_get_state**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to provide a state data you want to be saved, like view position, grid settings, folding, etc. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). This data is automatically saved for each scene in an ``editstate`` file in the editor metadata folder. If you want to store global (scene-independent) editor data for your plugin, you can use :ref:`_get_window_layout` instead. +Override this method to provide a state data you want to be saved, like view position, grid settings, folding, etc. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). This data is automatically saved for each scene in an ``editstate`` file in the editor metadata folder. If you want to store global (scene-independent) editor data for your plugin, you can use :ref:`_get_window_layout()` instead. -Use :ref:`_set_state` to restore your saved state. +Use :ref:`_set_state()` to restore your saved state. \ **Note:** This method should not be used to save important settings that should persist with the project. -\ **Note:** You must implement :ref:`_get_plugin_name` for the state to be stored and restored correctly. +\ **Note:** You must implement :ref:`_get_plugin_name()` for the state to be stored and restored correctly. :: @@ -916,7 +916,7 @@ Override this method to provide a custom message that lists unsaved changes. The When closing a scene, ``for_scene`` is the path to the scene being closed. You can use it to handle built-in resources in that scene. -If the user confirms saving, :ref:`_save_external_data` will be called, before closing the editor. +If the user confirms saving, :ref:`_save_external_data()` will be called, before closing the editor. :: @@ -950,9 +950,9 @@ If the plugin has no scene-specific changes, you can ignore the calls when closi |void| **_get_window_layout**\ (\ configuration\: :ref:`ConfigFile`\ ) |virtual| :ref:`πŸ”—` -Override this method to provide the GUI layout of the plugin or any other data you want to be stored. This is used to save the project's editor layout when :ref:`queue_save_layout` is called or the editor layout was changed (for example changing the position of a dock). The data is stored in the ``editor_layout.cfg`` file in the editor metadata directory. +Override this method to provide the GUI layout of the plugin or any other data you want to be stored. This is used to save the project's editor layout when :ref:`queue_save_layout()` is called or the editor layout was changed (for example changing the position of a dock). The data is stored in the ``editor_layout.cfg`` file in the editor metadata directory. -Use :ref:`_set_window_layout` to restore your saved layout. +Use :ref:`_set_window_layout()` to restore your saved layout. :: @@ -970,7 +970,7 @@ Use :ref:`_set_window_layout` **_handles**\ (\ object\: :ref:`Object`\ ) |virtual| |const| :ref:`πŸ”—` -Implement this function if your plugin edits a specific type of object (Resource or Node). If you return ``true``, then you will get the functions :ref:`_edit` and :ref:`_make_visible` called when the editor requests them. If you have declared the methods :ref:`_forward_canvas_gui_input` and :ref:`_forward_3d_gui_input` these will be called too. +Implement this function if your plugin edits a specific type of object (Resource or Node). If you return ``true``, then you will get the functions :ref:`_edit()` and :ref:`_make_visible()` called when the editor requests them. If you have declared the methods :ref:`_forward_canvas_gui_input()` and :ref:`_forward_3d_gui_input()` these will be called too. \ **Note:** Each plugin should handle only one type of objects at a time. If a plugin handles more types of objects and they are edited at the same time, it will result in errors. @@ -986,9 +986,9 @@ Implement this function if your plugin edits a specific type of object (Resource Returns ``true`` if this is a main screen editor plugin (it goes in the workspace selector together with **2D**, **3D**, **Script** and **AssetLib**). -When the plugin's workspace is selected, other main screen plugins will be hidden, but your plugin will not appear automatically. It needs to be added as a child of :ref:`EditorInterface.get_editor_main_screen` and made visible inside :ref:`_make_visible`. +When the plugin's workspace is selected, other main screen plugins will be hidden, but your plugin will not appear automatically. It needs to be added as a child of :ref:`EditorInterface.get_editor_main_screen()` and made visible inside :ref:`_make_visible()`. -Use :ref:`_get_plugin_name` and :ref:`_get_plugin_icon` to customize the plugin button's appearance. +Use :ref:`_get_plugin_name()` and :ref:`_get_plugin_icon()` to customize the plugin button's appearance. :: @@ -1047,9 +1047,9 @@ This method is called after the editor saves the project or when it's closed. It |void| **_set_state**\ (\ state\: :ref:`Dictionary`\ ) |virtual| :ref:`πŸ”—` -Restore the state saved by :ref:`_get_state`. This method is called when the current scene tab is changed in the editor. +Restore the state saved by :ref:`_get_state()`. This method is called when the current scene tab is changed in the editor. -\ **Note:** Your plugin must implement :ref:`_get_plugin_name`, otherwise it will not be recognized and this method will not be called. +\ **Note:** Your plugin must implement :ref:`_get_plugin_name()`, otherwise it will not be recognized and this method will not be called. :: @@ -1067,7 +1067,7 @@ Restore the state saved by :ref:`_get_state`\ ) |virtual| :ref:`πŸ”—` -Restore the plugin GUI layout and data saved by :ref:`_get_window_layout`. This method is called for every plugin on editor startup. Use the provided ``configuration`` file to read your saved data. +Restore the plugin GUI layout and data saved by :ref:`_get_window_layout()`. This method is called for every plugin on editor startup. Use the provided ``configuration`` file to read your saved data. :: @@ -1111,7 +1111,7 @@ See :ref:`ContextMenuSlot` for ava :ref:`Button` **add_control_to_bottom_panel**\ (\ control\: :ref:`Control`, title\: :ref:`String`, shortcut\: :ref:`Shortcut` = null\ ) :ref:`πŸ”—` -Adds a control to the bottom panel (together with Output, Debug, Animation, etc.). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_bottom_panel` and free it with :ref:`Node.queue_free`. +Adds a control to the bottom panel (together with Output, Debug, Animation, etc.). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_bottom_panel()` and free it with :ref:`Node.queue_free()`. Optionally, you can specify a shortcut parameter. When pressed, this shortcut will toggle the bottom panel's visibility. See the default editor bottom panel shortcuts in the Editor Settings for inspiration. Per convention, they all use :kbd:`Alt` modifier. @@ -1129,7 +1129,7 @@ Adds a custom control to a container (see :ref:`CustomControlContainer` and free it with :ref:`Node.queue_free`. +When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_container()` and free it with :ref:`Node.queue_free()`. .. rst-class:: classref-item-separator @@ -1145,7 +1145,7 @@ Adds the control to a specific dock slot (see :ref:`DockSlot` and free it with :ref:`Node.queue_free`. +When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_docks()` and free it with :ref:`Node.queue_free()`. Optionally, you can specify a shortcut parameter. When pressed, this shortcut will toggle the dock's visibility once it's moved to the bottom panel (this shortcut does not affect the dock otherwise). See the default editor bottom panel shortcuts in the Editor Settings for inspiration. Per convention, they all use :kbd:`Alt` modifier. @@ -1165,7 +1165,7 @@ When a given node or resource is selected, the base type will be instantiated (e \ **Note:** The base type is the base engine class which this type's class hierarchy inherits, not any custom type parent classes. -You can use the virtual method :ref:`_handles` to check if your custom object is being edited by checking the script or using the ``is`` keyword. +You can use the virtual method :ref:`_handles()` to check if your custom object is being edited by checking the script or using the ``is`` keyword. During run-time, this will be a simple object with a script so this function does not need to be called then. @@ -1207,7 +1207,7 @@ Registers a new :ref:`EditorExportPlatform`. Export Registers a new :ref:`EditorExportPlugin`. Export plugins are used to perform tasks when the project is being exported. -See :ref:`add_inspector_plugin` for an example of how to register a plugin. +See :ref:`add_inspector_plugin()` for an example of how to register a plugin. .. rst-class:: classref-item-separator @@ -1223,9 +1223,9 @@ Registers a new :ref:`EditorImportPlugin`. Import plug If ``first_priority`` is ``true``, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins. -\ **Note:** If you want to import custom 3D asset formats use :ref:`add_scene_format_importer_plugin` instead. +\ **Note:** If you want to import custom 3D asset formats use :ref:`add_scene_format_importer_plugin()` instead. -See :ref:`add_inspector_plugin` for an example of how to register a plugin. +See :ref:`add_inspector_plugin()` for an example of how to register a plugin. .. rst-class:: classref-item-separator @@ -1239,7 +1239,7 @@ See :ref:`add_inspector_plugin` Registers a new :ref:`EditorInspectorPlugin`. Inspector plugins are used to extend :ref:`EditorInspector` and provide custom configuration tools for your object's properties. -\ **Note:** Always use :ref:`remove_inspector_plugin` to remove the registered :ref:`EditorInspectorPlugin` when your **EditorPlugin** is disabled to prevent leaks and an unexpected behavior. +\ **Note:** Always use :ref:`remove_inspector_plugin()` to remove the registered :ref:`EditorInspectorPlugin` when your **EditorPlugin** is disabled to prevent leaks and an unexpected behavior. .. tabs:: @@ -1269,7 +1269,7 @@ Registers a new :ref:`EditorInspectorPlugin`. Inspe Registers a new :ref:`EditorNode3DGizmoPlugin`. Gizmo plugins are used to add custom gizmos to the 3D preview viewport for a :ref:`Node3D`. -See :ref:`add_inspector_plugin` for an example of how to register a plugin. +See :ref:`add_inspector_plugin()` for an example of how to register a plugin. .. rst-class:: classref-item-separator @@ -1335,7 +1335,7 @@ Adds a custom menu item to **Project > Tools** named ``name``. When clicked, the |void| **add_tool_submenu_item**\ (\ name\: :ref:`String`, submenu\: :ref:`PopupMenu`\ ) :ref:`πŸ”—` -Adds a custom :ref:`PopupMenu` submenu under **Project > Tools >** ``name``. Use :ref:`remove_tool_menu_item` on plugin clean up to remove the menu. +Adds a custom :ref:`PopupMenu` submenu under **Project > Tools >** ``name``. Use :ref:`remove_tool_menu_item()` on plugin clean up to remove the menu. .. rst-class:: classref-item-separator @@ -1499,7 +1499,7 @@ Removes the specified context menu plugin. |void| **remove_control_from_bottom_panel**\ (\ control\: :ref:`Control`\ ) :ref:`πŸ”—` -Removes the control from the bottom panel. You have to manually :ref:`Node.queue_free` the control. +Removes the control from the bottom panel. You have to manually :ref:`Node.queue_free()` the control. .. rst-class:: classref-item-separator @@ -1511,7 +1511,7 @@ Removes the control from the bottom panel. You have to manually :ref:`Node.queue |void| **remove_control_from_container**\ (\ container\: :ref:`CustomControlContainer`, control\: :ref:`Control`\ ) :ref:`πŸ”—` -Removes the control from the specified container. You have to manually :ref:`Node.queue_free` the control. +Removes the control from the specified container. You have to manually :ref:`Node.queue_free()` the control. .. rst-class:: classref-item-separator @@ -1523,7 +1523,7 @@ Removes the control from the specified container. You have to manually :ref:`Nod |void| **remove_control_from_docks**\ (\ control\: :ref:`Control`\ ) :ref:`πŸ”—` -Removes the control from the dock. You have to manually :ref:`Node.queue_free` the control. +Removes the control from the dock. You have to manually :ref:`Node.queue_free()` the control. .. rst-class:: classref-item-separator @@ -1535,7 +1535,7 @@ Removes the control from the dock. You have to manually :ref:`Node.queue_free`\ ) :ref:`πŸ”—` -Removes a custom type added by :ref:`add_custom_type`. +Removes a custom type added by :ref:`add_custom_type()`. .. rst-class:: classref-item-separator @@ -1559,7 +1559,7 @@ Removes the debugger plugin with given script from the Debugger. |void| **remove_export_platform**\ (\ platform\: :ref:`EditorExportPlatform`\ ) :ref:`πŸ”—` -Removes an export platform registered by :ref:`add_export_platform`. +Removes an export platform registered by :ref:`add_export_platform()`. .. rst-class:: classref-item-separator @@ -1571,7 +1571,7 @@ Removes an export platform registered by :ref:`add_export_platform`\ ) :ref:`πŸ”—` -Removes an export plugin registered by :ref:`add_export_plugin`. +Removes an export plugin registered by :ref:`add_export_plugin()`. .. rst-class:: classref-item-separator @@ -1583,7 +1583,7 @@ Removes an export plugin registered by :ref:`add_export_plugin`\ ) :ref:`πŸ”—` -Removes an import plugin registered by :ref:`add_import_plugin`. +Removes an import plugin registered by :ref:`add_import_plugin()`. .. rst-class:: classref-item-separator @@ -1595,7 +1595,7 @@ Removes an import plugin registered by :ref:`add_import_plugin`\ ) :ref:`πŸ”—` -Removes an inspector plugin registered by :ref:`add_inspector_plugin`. +Removes an inspector plugin registered by :ref:`add_inspector_plugin()`. .. rst-class:: classref-item-separator @@ -1607,7 +1607,7 @@ Removes an inspector plugin registered by :ref:`add_inspector_plugin`\ ) :ref:`πŸ”—` -Removes a gizmo plugin registered by :ref:`add_node_3d_gizmo_plugin`. +Removes a gizmo plugin registered by :ref:`add_node_3d_gizmo_plugin()`. .. rst-class:: classref-item-separator @@ -1619,7 +1619,7 @@ Removes a gizmo plugin registered by :ref:`add_node_3d_gizmo_plugin`\ ) :ref:`πŸ”—` -Removes a resource conversion plugin registered by :ref:`add_resource_conversion_plugin`. +Removes a resource conversion plugin registered by :ref:`add_resource_conversion_plugin()`. .. rst-class:: classref-item-separator @@ -1631,7 +1631,7 @@ Removes a resource conversion plugin registered by :ref:`add_resource_conversion |void| **remove_scene_format_importer_plugin**\ (\ scene_format_importer\: :ref:`EditorSceneFormatImporter`\ ) :ref:`πŸ”—` -Removes a scene format importer registered by :ref:`add_scene_format_importer_plugin`. +Removes a scene format importer registered by :ref:`add_scene_format_importer_plugin()`. .. rst-class:: classref-item-separator @@ -1643,7 +1643,7 @@ Removes a scene format importer registered by :ref:`add_scene_format_importer_pl |void| **remove_scene_post_import_plugin**\ (\ scene_import_plugin\: :ref:`EditorScenePostImportPlugin`\ ) :ref:`πŸ”—` -Remove the :ref:`EditorScenePostImportPlugin`, added with :ref:`add_scene_post_import_plugin`. +Remove the :ref:`EditorScenePostImportPlugin`, added with :ref:`add_scene_post_import_plugin()`. .. rst-class:: classref-item-separator @@ -1667,7 +1667,7 @@ Removes a menu ``name`` from **Project > Tools**. |void| **remove_translation_parser_plugin**\ (\ parser\: :ref:`EditorTranslationParserPlugin`\ ) :ref:`πŸ”—` -Removes a custom translation parser plugin registered by :ref:`add_translation_parser_plugin`. +Removes a custom translation parser plugin registered by :ref:`add_translation_parser_plugin()`. .. rst-class:: classref-item-separator @@ -1679,7 +1679,7 @@ Removes a custom translation parser plugin registered by :ref:`add_translation_p |void| **remove_undo_redo_inspector_hook_callback**\ (\ callable\: :ref:`Callable`\ ) :ref:`πŸ”—` -Removes a callback previously added by :ref:`add_undo_redo_inspector_hook_callback`. +Removes a callback previously added by :ref:`add_undo_redo_inspector_hook_callback()`. .. rst-class:: classref-item-separator @@ -1703,7 +1703,7 @@ Sets the tab icon for the given control in a dock slot. Setting to ``null`` remo |void| **set_force_draw_over_forwarding_enabled**\ (\ ) :ref:`πŸ”—` -Enables calling of :ref:`_forward_canvas_force_draw_over_viewport` for the 2D editor and :ref:`_forward_3d_force_draw_over_viewport` for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin. +Enables calling of :ref:`_forward_canvas_force_draw_over_viewport()` for the 2D editor and :ref:`_forward_3d_force_draw_over_viewport()` for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin. .. rst-class:: classref-item-separator @@ -1715,7 +1715,7 @@ Enables calling of :ref:`_forward_canvas_force_draw_over_viewport` -Use this method if you always want to receive inputs from 3D view screen inside :ref:`_forward_3d_gui_input`. It might be especially usable if your plugin will want to use raycast in the scene. +Use this method if you always want to receive inputs from 3D view screen inside :ref:`_forward_3d_gui_input()`. It might be especially usable if your plugin will want to use raycast in the scene. .. rst-class:: classref-item-separator @@ -1727,7 +1727,7 @@ Use this method if you always want to receive inputs from 3D view screen inside :ref:`int` **update_overlays**\ (\ ) |const| :ref:`πŸ”—` -Updates the overlays of the 2D and 3D editor viewport. Causes methods :ref:`_forward_canvas_draw_over_viewport`, :ref:`_forward_canvas_force_draw_over_viewport`, :ref:`_forward_3d_draw_over_viewport` and :ref:`_forward_3d_force_draw_over_viewport` to be called. +Updates the overlays of the 2D and 3D editor viewport. Causes methods :ref:`_forward_canvas_draw_over_viewport()`, :ref:`_forward_canvas_force_draw_over_viewport()`, :ref:`_forward_3d_draw_over_viewport()` and :ref:`_forward_3d_force_draw_over_viewport()` to be called. .. |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_editorproperty.rst b/classes/class_editorproperty.rst index 9c7eb2ee9..6b2d7f1a0 100644 --- a/classes/class_editorproperty.rst +++ b/classes/class_editorproperty.rst @@ -106,7 +106,7 @@ Signals **multiple_properties_changed**\ (\ properties\: :ref:`PackedStringArray`, value\: :ref:`Array`\ ) :ref:`πŸ”—` -Emit it if you want multiple properties modified at the same time. Do not use if added via :ref:`EditorInspectorPlugin._parse_property`. +Emit it if you want multiple properties modified at the same time. Do not use if added via :ref:`EditorInspectorPlugin._parse_property()`. .. rst-class:: classref-item-separator @@ -142,7 +142,7 @@ Emitted when the revertability (i.e., whether it has a non-default value and thu **property_changed**\ (\ property\: :ref:`StringName`, value\: :ref:`Variant`, field\: :ref:`StringName`, changing\: :ref:`bool`\ ) :ref:`πŸ”—` -Do not emit this manually, use the :ref:`emit_changed` method instead. +Do not emit this manually, use the :ref:`emit_changed()` method instead. .. rst-class:: classref-item-separator @@ -538,7 +538,7 @@ Gets the edited object. :ref:`StringName` **get_edited_property**\ (\ ) |const| :ref:`πŸ”—` -Gets the edited property. If your editor is for a single property (added via :ref:`EditorInspectorPlugin._parse_property`), then this will return the property. +Gets the edited property. If your editor is for a single property (added via :ref:`EditorInspectorPlugin._parse_property()`), then this will return the property. .. rst-class:: classref-item-separator @@ -574,7 +574,7 @@ Draw property as selected. Used by the inspector. |void| **set_bottom_editor**\ (\ editor\: :ref:`Control`\ ) :ref:`πŸ”—` -Puts the ``editor`` control below the property label. The control must be previously added using :ref:`Node.add_child`. +Puts the ``editor`` control below the property label. The control must be previously added using :ref:`Node.add_child()`. .. rst-class:: classref-item-separator diff --git a/classes/class_editorresourceconversionplugin.rst b/classes/class_editorresourceconversionplugin.rst index eb8c0d43c..9c773e475 100644 --- a/classes/class_editorresourceconversionplugin.rst +++ b/classes/class_editorresourceconversionplugin.rst @@ -43,7 +43,7 @@ Below shows an example of a basic plugin that will convert an :ref:`ImageTexture -To use an **EditorResourceConversionPlugin**, register it using the :ref:`EditorPlugin.add_resource_conversion_plugin` method first. +To use an **EditorResourceConversionPlugin**, register it using the :ref:`EditorPlugin.add_resource_conversion_plugin()` method first. .. rst-class:: classref-reftable-group @@ -76,7 +76,7 @@ Method Descriptions :ref:`Resource` **_convert**\ (\ resource\: :ref:`Resource`\ ) |virtual| |const| :ref:`πŸ”—` -Takes an input :ref:`Resource` and converts it to the type given in :ref:`_converts_to`. The returned :ref:`Resource` is the result of the conversion, and the input :ref:`Resource` remains unchanged. +Takes an input :ref:`Resource` and converts it to the type given in :ref:`_converts_to()`. The returned :ref:`Resource` is the result of the conversion, and the input :ref:`Resource` remains unchanged. .. rst-class:: classref-item-separator diff --git a/classes/class_editorresourcepicker.rst b/classes/class_editorresourcepicker.rst index 01e8ff525..8508d7baf 100644 --- a/classes/class_editorresourcepicker.rst +++ b/classes/class_editorresourcepicker.rst @@ -161,7 +161,7 @@ The edited resource value. - |void| **set_toggle_mode**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_toggle_mode**\ (\ ) -If ``true``, the main button with the resource preview works in the toggle mode. Use :ref:`set_toggle_pressed` to manually set the state. +If ``true``, the main button with the resource preview works in the toggle mode. Use :ref:`set_toggle_pressed()` to manually set the state. .. rst-class:: classref-section-separator @@ -178,7 +178,7 @@ Method Descriptions :ref:`bool` **_handle_menu_selected**\ (\ id\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -This virtual method can be implemented to handle context menu items not handled by default. See :ref:`_set_create_options`. +This virtual method can be implemented to handle context menu items not handled by default. See :ref:`_set_create_options()`. .. rst-class:: classref-item-separator @@ -192,7 +192,7 @@ This virtual method can be implemented to handle context menu items not handled This virtual method is called when updating the context menu of **EditorResourcePicker**. Implement this method to override the "New ..." items with your own options. ``menu_node`` is a reference to the :ref:`PopupMenu` node. -\ **Note:** Implement :ref:`_handle_menu_selected` to handle these custom items. +\ **Note:** Implement :ref:`_handle_menu_selected()` to handle these custom items. .. rst-class:: classref-item-separator diff --git a/classes/class_editorresourcepreview.rst b/classes/class_editorresourcepreview.rst index 77bb96d33..4be34b02e 100644 --- a/classes/class_editorresourcepreview.rst +++ b/classes/class_editorresourcepreview.rst @@ -21,7 +21,7 @@ Description This node is used to generate previews for resources or files. -\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_resource_previewer`. +\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_resource_previewer()`. .. rst-class:: classref-reftable-group diff --git a/classes/class_editorresourcepreviewgenerator.rst b/classes/class_editorresourcepreviewgenerator.rst index dd2aed146..caf1ed890 100644 --- a/classes/class_editorresourcepreviewgenerator.rst +++ b/classes/class_editorresourcepreviewgenerator.rst @@ -56,7 +56,7 @@ Method Descriptions :ref:`bool` **_can_generate_small_preview**\ (\ ) |virtual| |const| :ref:`πŸ”—` -If this function returns ``true``, the generator will call :ref:`_generate` or :ref:`_generate_from_path` for small previews as well. +If this function returns ``true``, the generator will call :ref:`_generate()` or :ref:`_generate_from_path()` for small previews as well. By default, it returns ``false``. @@ -76,7 +76,7 @@ Returning ``null`` is an OK way to fail and let another generator take care. Care must be taken because this function is always called from a thread (not the main thread). -\ ``metadata`` dictionary can be modified to store file-specific metadata that can be used in :ref:`EditorResourceTooltipPlugin._make_tooltip_for_path` (like image size, sample length etc.). +\ ``metadata`` dictionary can be modified to store file-specific metadata that can be used in :ref:`EditorResourceTooltipPlugin._make_tooltip_for_path()` (like image size, sample length etc.). .. rst-class:: classref-item-separator @@ -88,13 +88,13 @@ Care must be taken because this function is always called from a thread (not the :ref:`Texture2D` **_generate_from_path**\ (\ path\: :ref:`String`, size\: :ref:`Vector2i`, metadata\: :ref:`Dictionary`\ ) |virtual| |const| :ref:`πŸ”—` -Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call :ref:`_generate`. +Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call :ref:`_generate()`. Returning ``null`` is an OK way to fail and let another generator take care. Care must be taken because this function is always called from a thread (not the main thread). -\ ``metadata`` dictionary can be modified to store file-specific metadata that can be used in :ref:`EditorResourceTooltipPlugin._make_tooltip_for_path` (like image size, sample length etc.). +\ ``metadata`` dictionary can be modified to store file-specific metadata that can be used in :ref:`EditorResourceTooltipPlugin._make_tooltip_for_path()` (like image size, sample length etc.). .. rst-class:: classref-item-separator @@ -106,7 +106,7 @@ Care must be taken because this function is always called from a thread (not the :ref:`bool` **_generate_small_preview_automatically**\ (\ ) |virtual| |const| :ref:`πŸ”—` -If this function returns ``true``, the generator will automatically generate the small previews from the normal preview texture generated by the methods :ref:`_generate` or :ref:`_generate_from_path`. +If this function returns ``true``, the generator will automatically generate the small previews from the normal preview texture generated by the methods :ref:`_generate()` or :ref:`_generate_from_path()`. By default, it returns ``false``. diff --git a/classes/class_editorresourcetooltipplugin.rst b/classes/class_editorresourcetooltipplugin.rst index 47bf83013..b0c9b46c5 100644 --- a/classes/class_editorresourcetooltipplugin.rst +++ b/classes/class_editorresourcetooltipplugin.rst @@ -21,7 +21,7 @@ Description Resource tooltip plugins are used by :ref:`FileSystemDock` to generate customized tooltips for specific resources. E.g. tooltip for a :ref:`Texture2D` displays a bigger preview and the texture's dimensions. -A plugin must be first registered with :ref:`FileSystemDock.add_resource_tooltip_plugin`. When the user hovers a resource in filesystem dock which is handled by the plugin, :ref:`_make_tooltip_for_path` is called to create the tooltip. It works similarly to :ref:`Control._make_custom_tooltip`. +A plugin must be first registered with :ref:`FileSystemDock.add_resource_tooltip_plugin()`. When the user hovers a resource in filesystem dock which is handled by the plugin, :ref:`_make_tooltip_for_path()` is called to create the tooltip. It works similarly to :ref:`Control._make_custom_tooltip()`. .. rst-class:: classref-reftable-group @@ -68,13 +68,13 @@ Return ``true`` if the plugin is going to handle the given :ref:`Resource`). +The ``metadata`` dictionary is provided by preview generator (see :ref:`EditorResourcePreviewGenerator._generate()`). \ ``base`` is the base default tooltip, which is a :ref:`VBoxContainer` with a file name, type and size labels. If another plugin handled the same file type, ``base`` will be output from the previous plugin. For best result, make sure the base tooltip is part of the returned :ref:`Control`. -\ **Note:** It's unadvised to use :ref:`ResourceLoader.load`, especially with heavy resources like models or textures, because it will make the editor unresponsive when creating the tooltip. You can use :ref:`request_thumbnail` if you want to display a preview in your tooltip. +\ **Note:** It's unadvised to use :ref:`ResourceLoader.load()`, especially with heavy resources like models or textures, because it will make the editor unresponsive when creating the tooltip. You can use :ref:`request_thumbnail()` if you want to display a preview in your tooltip. -\ **Note:** If you decide to discard the ``base``, make sure to call :ref:`Node.queue_free`, because it's not freed automatically. +\ **Note:** If you decide to discard the ``base``, make sure to call :ref:`Node.queue_free()`, because it's not freed automatically. :: diff --git a/classes/class_editorsceneformatimporter.rst b/classes/class_editorsceneformatimporter.rst index 286da8639..89eca697e 100644 --- a/classes/class_editorsceneformatimporter.rst +++ b/classes/class_editorsceneformatimporter.rst @@ -23,7 +23,7 @@ Description **EditorSceneFormatImporter** allows to define an importer script for a third-party 3D format. -To use **EditorSceneFormatImporter**, register it using the :ref:`EditorPlugin.add_scene_format_importer_plugin` method first. +To use **EditorSceneFormatImporter**, register it using the :ref:`EditorPlugin.add_scene_format_importer_plugin()` method first. .. rst-class:: classref-reftable-group @@ -167,7 +167,7 @@ Return supported file extensions for this scene importer. |void| **_get_import_options**\ (\ path\: :ref:`String`\ ) |virtual| :ref:`πŸ”—` -Override to add general import options. These will appear in the main import dock on the editor. Add options via :ref:`add_import_option` and :ref:`add_import_option_advanced`. +Override to add general import options. These will appear in the main import dock on the editor. Add options via :ref:`add_import_option()` and :ref:`add_import_option_advanced()`. \ **Note:** All **EditorSceneFormatImporter** and :ref:`EditorScenePostImportPlugin` instances will add options for all files. It is good practice to check the file extension when ``path`` is non-empty. @@ -207,7 +207,7 @@ Perform the bulk of the scene import logic here, for example using :ref:`GLTFDoc |void| **add_import_option**\ (\ name\: :ref:`String`, value\: :ref:`Variant`\ ) :ref:`πŸ”—` -Add a specific import option (name and default value only). This function can only be called from :ref:`_get_import_options`. +Add a specific import option (name and default value only). This function can only be called from :ref:`_get_import_options()`. .. rst-class:: classref-item-separator @@ -219,7 +219,7 @@ Add a specific import option (name and default value only). This function can on |void| **add_import_option_advanced**\ (\ type\: :ref:`Variant.Type`, name\: :ref:`String`, default_value\: :ref:`Variant`, hint\: :ref:`PropertyHint` = 0, hint_string\: :ref:`String` = "", usage_flags\: :ref:`int` = 6\ ) :ref:`πŸ”—` -Add a specific import option. This function can only be called from :ref:`_get_import_options`. +Add a specific import option. This function can only be called from :ref:`_get_import_options()`. .. |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_editorscenepostimport.rst b/classes/class_editorscenepostimport.rst index e0ebfae90..194c584c5 100644 --- a/classes/class_editorscenepostimport.rst +++ b/classes/class_editorscenepostimport.rst @@ -21,7 +21,7 @@ Description Imported scenes can be automatically modified right after import by setting their **Custom Script** Import property to a ``tool`` script that inherits from this class. -The :ref:`_post_import` callback receives the imported scene's root node and returns the modified version of the scene: +The :ref:`_post_import()` callback receives the imported scene's root node and returns the modified version of the scene: .. tabs:: diff --git a/classes/class_editorscenepostimportplugin.rst b/classes/class_editorscenepostimportplugin.rst index 44b2e6f57..7ebe47b70 100644 --- a/classes/class_editorscenepostimportplugin.rst +++ b/classes/class_editorscenepostimportplugin.rst @@ -179,7 +179,7 @@ Method Descriptions |void| **_get_import_options**\ (\ path\: :ref:`String`\ ) |virtual| :ref:`πŸ”—` -Override to add general import options. These will appear in the main import dock on the editor. Add options via :ref:`add_import_option` and :ref:`add_import_option_advanced`. +Override to add general import options. These will appear in the main import dock on the editor. Add options via :ref:`add_import_option()` and :ref:`add_import_option_advanced()`. .. rst-class:: classref-item-separator @@ -191,7 +191,7 @@ Override to add general import options. These will appear in the main import doc |void| **_get_internal_import_options**\ (\ category\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -Override to add internal import options. These will appear in the 3D scene import dialog. Add options via :ref:`add_import_option` and :ref:`add_import_option_advanced`. +Override to add internal import options. These will appear in the 3D scene import dialog. Add options via :ref:`add_import_option()` and :ref:`add_import_option_advanced()`. .. rst-class:: classref-item-separator @@ -277,7 +277,7 @@ Pre process may be used to adjust internal import options in the ``"nodes"``, `` |void| **add_import_option**\ (\ name\: :ref:`String`, value\: :ref:`Variant`\ ) :ref:`πŸ”—` -Add a specific import option (name and default value only). This function can only be called from :ref:`_get_import_options` and :ref:`_get_internal_import_options`. +Add a specific import option (name and default value only). This function can only be called from :ref:`_get_import_options()` and :ref:`_get_internal_import_options()`. .. rst-class:: classref-item-separator @@ -289,7 +289,7 @@ Add a specific import option (name and default value only). This function can on |void| **add_import_option_advanced**\ (\ type\: :ref:`Variant.Type`, name\: :ref:`String`, default_value\: :ref:`Variant`, hint\: :ref:`PropertyHint` = 0, hint_string\: :ref:`String` = "", usage_flags\: :ref:`int` = 6\ ) :ref:`πŸ”—` -Add a specific import option. This function can only be called from :ref:`_get_import_options` and :ref:`_get_internal_import_options`. +Add a specific import option. This function can only be called from :ref:`_get_import_options()` and :ref:`_get_internal_import_options()`. .. rst-class:: classref-item-separator diff --git a/classes/class_editorscript.rst b/classes/class_editorscript.rst index 2a6303fd2..6bac381c6 100644 --- a/classes/class_editorscript.rst +++ b/classes/class_editorscript.rst @@ -19,7 +19,7 @@ Base script that can be used to add extension functions to the editor. Description ----------- -Scripts extending this class and implementing its :ref:`_run` method can be executed from the Script Editor's **File > Run** menu option (or by pressing :kbd:`Ctrl + Shift + X`) while the editor is running. This is useful for adding custom in-editor functionality to Godot. For more complex additions, consider using :ref:`EditorPlugin`\ s instead. +Scripts extending this class and implementing its :ref:`_run()` method can be executed from the Script Editor's **File > Run** menu option (or by pressing :kbd:`Ctrl + Shift + X`) while the editor is running. This is useful for adding custom in-editor functionality to Godot. For more complex additions, consider using :ref:`EditorPlugin`\ s instead. \ **Note:** Extending scripts need to have ``tool`` mode enabled. @@ -126,7 +126,7 @@ Returns the :ref:`EditorInterface` singleton instance. :ref:`Node` **get_scene**\ (\ ) |const| :ref:`πŸ”—` -Returns the edited (current) scene's root :ref:`Node`. Equivalent of :ref:`EditorInterface.get_edited_scene_root`. +Returns the edited (current) scene's root :ref:`Node`. Equivalent of :ref:`EditorInterface.get_edited_scene_root()`. .. |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_editorselection.rst b/classes/class_editorselection.rst index 2eb349ba8..c4d9581ea 100644 --- a/classes/class_editorselection.rst +++ b/classes/class_editorselection.rst @@ -21,7 +21,7 @@ Description This object manages the SceneTree selection in the editor. -\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_selection`. +\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_selection()`. .. rst-class:: classref-reftable-group @@ -77,7 +77,7 @@ Method Descriptions Adds a node to the selection. -\ **Note:** The newly selected node will not be automatically edited in the inspector. If you want to edit a node, use :ref:`EditorInterface.edit_node`. +\ **Note:** The newly selected node will not be automatically edited in the inspector. If you want to edit a node, use :ref:`EditorInterface.edit_node()`. .. rst-class:: classref-item-separator diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index 256b4ab5a..a733b71d3 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -48,7 +48,7 @@ Accessing the settings can be done using the following methods, such as: -\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_editor_settings`. +\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_editor_settings()`. .. rst-class:: classref-reftable-group @@ -627,8 +627,6 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`run/window_placement/game_embed_mode` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`run/window_placement/play_window_pip_mode` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`run/window_placement/rect` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`run/window_placement/rect_custom_position` | @@ -675,6 +673,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`text_editor/appearance/whitespace/line_spacing` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/documentation/enable_tooltips` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/behavior/files/auto_reload_and_parse_scripts_on_save` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/behavior/files/auto_reload_scripts_on_external_change` | @@ -3686,7 +3686,7 @@ If ``true``, embed modal windows such as docks inside the main editor window. Wh This is equivalent to :ref:`ProjectSettings.display/window/subwindows/embed_subwindows` in the running project, except the setting's value is inverted. -\ **Note:** To query whether the editor can use multiple windows in an editor plugin, use :ref:`EditorInterface.is_multi_window_enabled` instead of querying the value of this editor setting. +\ **Note:** To query whether the editor can use multiple windows in an editor plugin, use :ref:`EditorInterface.is_multi_window_enabled()` instead of querying the value of this editor setting. \ **Note:** If ``true``, game embedding is disabled. @@ -4008,7 +4008,7 @@ If ``true``, multiple window support in editor is enabled. The following panels \ **Note:** When :ref:`interface/editor/single_window_mode` is ``true``, the multi window support is always disabled. -\ **Note:** To query whether the editor can use multiple windows in an editor plugin, use :ref:`EditorInterface.is_multi_window_enabled` instead of querying the value of this editor setting. +\ **Note:** To query whether the editor can use multiple windows in an editor plugin, use :ref:`EditorInterface.is_multi_window_enabled()` instead of querying the value of this editor setting. .. rst-class:: classref-item-separator @@ -4598,8 +4598,6 @@ Specifies how the Play window is launched relative to the Android editor. - **Side-by-side with Editor** will launch the Play window side-by-side with the Editor window. -- **Launch in PiP mode** will launch the Play window directly in picture-in-picture (PiP) mode if PiP mode is supported and enabled. When maximized, the Play window will occupy the same window as the Editor. - \ **Note:** Only available in the Android editor. .. rst-class:: classref-item-separator @@ -4618,26 +4616,6 @@ Overrides game embedding setting for all newly opened projects. If enabled, game ---- -.. _class_EditorSettings_property_run/window_placement/play_window_pip_mode: - -.. rst-class:: classref-property - -:ref:`int` **run/window_placement/play_window_pip_mode** :ref:`πŸ”—` - -Specifies the picture-in-picture (PiP) mode for the Play window. - -- **Disabled:** PiP is disabled for the Play window. - -- **Enabled:** If the device supports it, PiP is always enabled for the Play window. The Play window will contain a button to enter PiP mode. - -- **Enabled when Play window is same as Editor** (default for Android editor): If the device supports it, PiP is enabled when the Play window is the same as the Editor. The Play window will contain a button to enter PiP mode. - -\ **Note:** Only available in the Android editor. - -.. rst-class:: classref-item-separator - ----- - .. _class_EditorSettings_property_run/window_placement/rect: .. rst-class:: classref-property @@ -4916,6 +4894,18 @@ The space to add between lines (in pixels). Greater line spacing can help improv ---- +.. _class_EditorSettings_property_text_editor/behavior/documentation/enable_tooltips: + +.. rst-class:: classref-property + +:ref:`bool` **text_editor/behavior/documentation/enable_tooltips** :ref:`πŸ”—` + +If ``true``, documentation tooltips will appear when hovering over a symbol. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/behavior/files/auto_reload_and_parse_scripts_on_save: .. rst-class:: classref-property @@ -6141,7 +6131,7 @@ Adds a custom property info to a property. The dictionary must contain: :ref:`bool` **check_changed_settings_in_group**\ (\ setting_prefix\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Checks if any settings with the prefix ``setting_prefix`` exist in the set of changed settings. See also :ref:`get_changed_settings`. +Checks if any settings with the prefix ``setting_prefix`` exist in the set of changed settings. See also :ref:`get_changed_settings()`. .. rst-class:: classref-item-separator @@ -6189,7 +6179,7 @@ Returns the list of favorite files and directories for this project. :ref:`Variant` **get_project_metadata**\ (\ section\: :ref:`String`, key\: :ref:`String`, default\: :ref:`Variant` = null\ ) |const| :ref:`πŸ”—` -Returns project-specific metadata for the ``section`` and ``key`` specified. If the metadata doesn't exist, ``default`` will be returned instead. See also :ref:`set_project_metadata`. +Returns project-specific metadata for the ``section`` and ``key`` specified. If the metadata doesn't exist, ``default`` will be returned instead. See also :ref:`set_project_metadata()`. .. rst-class:: classref-item-separator @@ -6213,7 +6203,7 @@ Returns the list of recently visited folders in the file dialog for this project :ref:`Variant` **get_setting**\ (\ name\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Returns the value of the setting specified by ``name``. This is equivalent to using :ref:`Object.get` on the EditorSettings instance. +Returns the value of the setting specified by ``name``. This is equivalent to using :ref:`Object.get()` on the EditorSettings instance. .. rst-class:: classref-item-separator @@ -6237,7 +6227,7 @@ Returns ``true`` if the setting specified by ``name`` exists, ``false`` otherwis |void| **mark_setting_changed**\ (\ setting\: :ref:`String`\ ) :ref:`πŸ”—` -Marks the passed editor setting as being changed, see :ref:`get_changed_settings`. Only settings which exist (see :ref:`has_setting`) will be accepted. +Marks the passed editor setting as being changed, see :ref:`get_changed_settings()`. Only settings which exist (see :ref:`has_setting()`) will be accepted. .. rst-class:: classref-item-separator @@ -6285,7 +6275,7 @@ Sets the initial value of the setting specified by ``name`` to ``value``. This i |void| **set_project_metadata**\ (\ section\: :ref:`String`, key\: :ref:`String`, data\: :ref:`Variant`\ ) :ref:`πŸ”—` -Sets project-specific metadata with the ``section``, ``key`` and ``data`` specified. This metadata is stored outside the project folder and therefore won't be checked into version control. See also :ref:`get_project_metadata`. +Sets project-specific metadata with the ``section``, ``key`` and ``data`` specified. This metadata is stored outside the project folder and therefore won't be checked into version control. See also :ref:`get_project_metadata()`. .. rst-class:: classref-item-separator @@ -6309,7 +6299,7 @@ Sets the list of recently visited folders in the file dialog for this project. |void| **set_setting**\ (\ name\: :ref:`String`, value\: :ref:`Variant`\ ) :ref:`πŸ”—` -Sets the ``value`` of the setting specified by ``name``. This is equivalent to using :ref:`Object.set` on the EditorSettings instance. +Sets the ``value`` of the setting specified by ``name``. This is equivalent to using :ref:`Object.set()` on the EditorSettings instance. .. |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_editorsyntaxhighlighter.rst b/classes/class_editorsyntaxhighlighter.rst index 0fc9fb804..da9bc085f 100644 --- a/classes/class_editorsyntaxhighlighter.rst +++ b/classes/class_editorsyntaxhighlighter.rst @@ -23,7 +23,7 @@ Description Base class that all :ref:`SyntaxHighlighter`\ s used by the :ref:`ScriptEditor` extend from. -Add a syntax highlighter to an individual script by calling :ref:`ScriptEditorBase.add_syntax_highlighter`. To apply to all scripts on open, call :ref:`ScriptEditor.register_syntax_highlighter`. +Add a syntax highlighter to an individual script by calling :ref:`ScriptEditorBase.add_syntax_highlighter()`. To apply to all scripts on open, call :ref:`ScriptEditor.register_syntax_highlighter()`. .. rst-class:: classref-reftable-group diff --git a/classes/class_editortoaster.rst b/classes/class_editortoaster.rst index 68916ac0c..c24224681 100644 --- a/classes/class_editortoaster.rst +++ b/classes/class_editortoaster.rst @@ -21,7 +21,7 @@ Description This object manages the functionality and display of toast notifications within the editor, ensuring timely and informative alerts are presented to users. -\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_editor_toaster`. +\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_editor_toaster()`. .. rst-class:: classref-reftable-group diff --git a/classes/class_editortranslationparserplugin.rst b/classes/class_editortranslationparserplugin.rst index 84ba7f078..1e82d5288 100644 --- a/classes/class_editortranslationparserplugin.rst +++ b/classes/class_editortranslationparserplugin.rst @@ -19,7 +19,7 @@ Plugin for adding custom parsers to extract strings that are to be translated fr Description ----------- -**EditorTranslationParserPlugin** is invoked when a file is being parsed to extract strings that require translation. To define the parsing and string extraction logic, override the :ref:`_parse_file` method in script. +**EditorTranslationParserPlugin** is invoked when a file is being parsed to extract strings that require translation. To define the parsing and string extraction logic, override the :ref:`_parse_file()` method in script. Add the extracted strings to argument ``msgids`` or ``msgids_context_plural`` if context or plural is used. @@ -100,7 +100,7 @@ To add a translatable string associated with context or plural, add it to ``msgi -\ **Note:** If you override parsing logic for standard script types (GDScript, C#, etc.), it would be better to load the ``path`` argument using :ref:`ResourceLoader.load`. This is because built-in scripts are loaded as :ref:`Resource` type, not :ref:`FileAccess` type. For example: +\ **Note:** If you override parsing logic for standard script types (GDScript, C#, etc.), it would be better to load the ``path`` argument using :ref:`ResourceLoader.load()`. This is because built-in scripts are loaded as :ref:`Resource` type, not :ref:`FileAccess` type. For example: .. tabs:: @@ -131,7 +131,7 @@ To add a translatable string associated with context or plural, add it to ``msgi -To use **EditorTranslationParserPlugin**, register it using the :ref:`EditorPlugin.add_translation_parser_plugin` method first. +To use **EditorTranslationParserPlugin**, register it using the :ref:`EditorPlugin.add_translation_parser_plugin()` method first. .. rst-class:: classref-reftable-group @@ -164,7 +164,7 @@ Method Descriptions |void| **_get_comments**\ (\ msgids_comment\: :ref:`Array`\[:ref:`String`\], msgids_context_plural_comment\: :ref:`Array`\[:ref:`String`\]\ ) |virtual| :ref:`πŸ”—` -If overridden, called after :ref:`_parse_file` to get comments for the parsed entries. This method should fill the arrays with the same number of elements and in the same order as :ref:`_parse_file`. +If overridden, called after :ref:`_parse_file()` to get comments for the parsed entries. This method should fill the arrays with the same number of elements and in the same order as :ref:`_parse_file()`. .. rst-class:: classref-item-separator diff --git a/classes/class_editorundoredomanager.rst b/classes/class_editorundoredomanager.rst index cbad140ef..5878b55ce 100644 --- a/classes/class_editorundoredomanager.rst +++ b/classes/class_editorundoredomanager.rst @@ -31,7 +31,7 @@ The usage is mostly the same as :ref:`UndoRedo`. You create and This guessing can sometimes yield false results, so you can provide a custom context object when creating an action. -\ **EditorUndoRedoManager** is intended to be used by Godot editor plugins. You can obtain it using :ref:`EditorPlugin.get_undo_redo`. For non-editor uses or plugins that don't need to integrate with the editor's undo history, use :ref:`UndoRedo` instead. +\ **EditorUndoRedoManager** is intended to be used by Godot editor plugins. You can obtain it using :ref:`EditorPlugin.get_undo_redo()`. For non-editor uses or plugins that don't need to integrate with the editor's undo history, use :ref:`UndoRedo` instead. The manager's API is mostly the same as in :ref:`UndoRedo`, so you can refer to its documentation for more examples. The main difference is that **EditorUndoRedoManager** uses object + method name for actions, instead of :ref:`Callable`. @@ -244,7 +244,7 @@ If ``increase_version`` is ``true``, the undo history version will be increased, var undo_redo = EditorInterface.get_editor_undo_redo() undo_redo.clear_history(undo_redo.get_object_history_id(scene_root)) -\ **Note:** If you want to mark an edited scene as unsaved without clearing its history, use :ref:`EditorInterface.mark_scene_as_unsaved` instead. +\ **Note:** If you want to mark an edited scene as unsaved without clearing its history, use :ref:`EditorInterface.mark_scene_as_unsaved()` instead. .. rst-class:: classref-item-separator @@ -268,7 +268,7 @@ Commits the action. If ``execute`` is ``true`` (default), all "do" methods/prope |void| **create_action**\ (\ name\: :ref:`String`, merge_mode\: :ref:`MergeMode` = 0, custom_context\: :ref:`Object` = null, backward_undo_ops\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Create a new action. After this is called, do all your calls to :ref:`add_do_method`, :ref:`add_undo_method`, :ref:`add_do_property`, and :ref:`add_undo_property`, then commit the action with :ref:`commit_action`. +Create a new action. After this is called, do all your calls to :ref:`add_do_method()`, :ref:`add_undo_method()`, :ref:`add_do_property()`, and :ref:`add_undo_property()`, then commit the action with :ref:`commit_action()`. The way actions are merged is dictated by the ``merge_mode`` argument. See :ref:`MergeMode` for details. @@ -286,9 +286,9 @@ The way undo operation are ordered in actions is dictated by ``backward_undo_ops |void| **force_fixed_history**\ (\ ) :ref:`πŸ”—` -Forces the next operation (e.g. :ref:`add_do_method`) to use the action's history rather than guessing it from the object. This is sometimes needed when a history can't be correctly determined, like for a nested resource that doesn't have a path yet. +Forces the next operation (e.g. :ref:`add_do_method()`) to use the action's history rather than guessing it from the object. This is sometimes needed when a history can't be correctly determined, like for a nested resource that doesn't have a path yet. -This method should only be used when absolutely necessary, otherwise it might cause invalid history state. For most of complex cases, the ``custom_context`` parameter of :ref:`create_action` is sufficient. +This method should only be used when absolutely necessary, otherwise it might cause invalid history state. For most of complex cases, the ``custom_context`` parameter of :ref:`create_action()` is sufficient. .. rst-class:: classref-item-separator @@ -304,7 +304,7 @@ Returns the :ref:`UndoRedo` object associated with the given his \ ``id`` above ``0`` are mapped to the opened scene tabs (but it doesn't match their order). ``id`` of ``0`` or lower have special meaning (see :ref:`SpecialHistory`). -Best used with :ref:`get_object_history_id`. This method is only provided in case you need some more advanced methods of :ref:`UndoRedo` (but keep in mind that directly operating on the :ref:`UndoRedo` object might affect editor's stability). +Best used with :ref:`get_object_history_id()`. This method is only provided in case you need some more advanced methods of :ref:`UndoRedo` (but keep in mind that directly operating on the :ref:`UndoRedo` object might affect editor's stability). .. rst-class:: classref-item-separator @@ -316,7 +316,7 @@ Best used with :ref:`get_object_history_id` **get_object_history_id**\ (\ object\: :ref:`Object`\ ) |const| :ref:`πŸ”—` -Returns the history ID deduced from the given ``object``. It can be used with :ref:`get_history_undo_redo`. +Returns the history ID deduced from the given ``object``. It can be used with :ref:`get_history_undo_redo()`. .. rst-class:: classref-item-separator @@ -328,7 +328,7 @@ Returns the history ID deduced from the given ``object``. It can be used with :r :ref:`bool` **is_committing_action**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the **EditorUndoRedoManager** is currently committing the action, i.e. running its "do" method or property change (see :ref:`commit_action`). +Returns ``true`` if the **EditorUndoRedoManager** is currently committing the action, i.e. running its "do" method or property change (see :ref:`commit_action()`). .. |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_editorvcsinterface.rst b/classes/class_editorvcsinterface.rst index d8899886f..75e18eeb1 100644 --- a/classes/class_editorvcsinterface.rst +++ b/classes/class_editorvcsinterface.rst @@ -308,7 +308,7 @@ Gets the current branch name defined in the VCS. :ref:`Array`\[:ref:`Dictionary`\] **_get_diff**\ (\ identifier\: :ref:`String`, area\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -Returns an array of :ref:`Dictionary` items (see :ref:`create_diff_file`, :ref:`create_diff_hunk`, :ref:`create_diff_line`, :ref:`add_line_diffs_into_diff_hunk` and :ref:`add_diff_hunks_into_diff_file`), each containing information about a diff. If ``identifier`` is a file path, returns a file diff, and if it is a commit identifier, then returns a commit diff. +Returns an array of :ref:`Dictionary` items (see :ref:`create_diff_file()`, :ref:`create_diff_hunk()`, :ref:`create_diff_line()`, :ref:`add_line_diffs_into_diff_hunk()` and :ref:`add_diff_hunks_into_diff_file()`), each containing information about a diff. If ``identifier`` is a file path, returns a file diff, and if it is a commit identifier, then returns a commit diff. .. rst-class:: classref-item-separator @@ -320,7 +320,7 @@ Returns an array of :ref:`Dictionary` items (see :ref:`create_ :ref:`Array`\[:ref:`Dictionary`\] **_get_line_diff**\ (\ file_path\: :ref:`String`, text\: :ref:`String`\ ) |virtual| :ref:`πŸ”—` -Returns an :ref:`Array` of :ref:`Dictionary` items (see :ref:`create_diff_hunk`), each containing a line diff between a file at ``file_path`` and the ``text`` which is passed in. +Returns an :ref:`Array` of :ref:`Dictionary` items (see :ref:`create_diff_hunk()`), each containing a line diff between a file at ``file_path`` and the ``text`` which is passed in. .. rst-class:: classref-item-separator @@ -332,7 +332,7 @@ Returns an :ref:`Array` of :ref:`Dictionary` item :ref:`Array`\[:ref:`Dictionary`\] **_get_modified_files_data**\ (\ ) |virtual| :ref:`πŸ”—` -Returns an :ref:`Array` of :ref:`Dictionary` items (see :ref:`create_status_file`), each containing the status data of every modified file in the project folder. +Returns an :ref:`Array` of :ref:`Dictionary` items (see :ref:`create_status_file()`), each containing the status data of every modified file in the project folder. .. rst-class:: classref-item-separator @@ -344,7 +344,7 @@ Returns an :ref:`Array` of :ref:`Dictionary` item :ref:`Array`\[:ref:`Dictionary`\] **_get_previous_commits**\ (\ max_commits\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -Returns an :ref:`Array` of :ref:`Dictionary` items (see :ref:`create_commit`), each containing the data for a past commit. +Returns an :ref:`Array` of :ref:`Dictionary` items (see :ref:`create_commit()`), each containing the data for a past commit. .. rst-class:: classref-item-separator diff --git a/classes/class_encodedobjectasid.rst b/classes/class_encodedobjectasid.rst index 86656540e..600f77725 100644 --- a/classes/class_encodedobjectasid.rst +++ b/classes/class_encodedobjectasid.rst @@ -19,7 +19,7 @@ Holds a reference to an :ref:`Object`'s instance ID. Description ----------- -Utility class which holds a reference to the internal identifier of an :ref:`Object` instance, as given by :ref:`Object.get_instance_id`. This ID can then be used to retrieve the object instance with :ref:`@GlobalScope.instance_from_id`. +Utility class which holds a reference to the internal identifier of an :ref:`Object` instance, as given by :ref:`Object.get_instance_id()`. This ID can then be used to retrieve the object instance with :ref:`@GlobalScope.instance_from_id()`. This class is used internally by the editor inspector and script debugger, but can also be used in plugins to pass and display objects as their IDs. @@ -55,7 +55,7 @@ Property Descriptions - |void| **set_object_id**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_object_id**\ (\ ) -The :ref:`Object` identifier stored in this **EncodedObjectAsID** instance. The object instance can be retrieved with :ref:`@GlobalScope.instance_from_id`. +The :ref:`Object` identifier stored in this **EncodedObjectAsID** instance. The object instance can be retrieved with :ref:`@GlobalScope.instance_from_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_enetconnection.rst b/classes/class_enetconnection.rst index 17c90a4f9..d9beb1f99 100644 --- a/classes/class_enetconnection.rst +++ b/classes/class_enetconnection.rst @@ -145,7 +145,7 @@ enum **EventType**: :ref:`πŸ”—` :ref:`EventType` **EVENT_ERROR** = ``-1`` -An error occurred during :ref:`service`. You will likely need to :ref:`destroy` the host and recreate it. +An error occurred during :ref:`service()`. You will likely need to :ref:`destroy()` the host and recreate it. .. _class_ENetConnection_constant_EVENT_NONE: @@ -169,7 +169,7 @@ A connection request initiated by enet_host_connect has completed. The array wil :ref:`EventType` **EVENT_DISCONNECT** = ``2`` -A peer has disconnected. This event is generated on a successful completion of a disconnect initiated by :ref:`ENetPacketPeer.peer_disconnect`, if a peer has timed out, or if a connection request initialized by :ref:`connect_to_host` has timed out. The array will contain the peer which disconnected. The data field contains user supplied data describing the disconnection, or 0, if none is available. +A peer has disconnected. This event is generated on a successful completion of a disconnect initiated by :ref:`ENetPacketPeer.peer_disconnect()`, if a peer has timed out, or if a connection request initialized by :ref:`connect_to_host()` has timed out. The array will contain the peer which disconnected. The data field contains user supplied data describing the disconnection, or 0, if none is available. .. _class_ENetConnection_constant_EVENT_RECEIVE: @@ -290,7 +290,7 @@ Sets the compression method used for network packets. These have different trade Initiates a connection to a foreign ``address`` using the specified ``port`` and allocating the requested ``channels``. Optional ``data`` can be passed during connection in the form of a 32 bit integer. -\ **Note:** You must call either :ref:`create_host` or :ref:`create_host_bound` on both ends before calling this method. +\ **Note:** You must call either :ref:`create_host()` or :ref:`create_host_bound()` on both ends before calling this method. .. rst-class:: classref-item-separator @@ -304,7 +304,7 @@ Initiates a connection to a foreign ``address`` using the specified ``port`` and Creates an ENetHost that allows up to ``max_peers`` connected peers, each allocating up to ``max_channels`` channels, optionally limiting bandwidth to ``in_bandwidth`` and ``out_bandwidth`` (if greater than zero). -This method binds a random available dynamic UDP port on the host machine at the *unspecified* address. Use :ref:`create_host_bound` to specify the address and port. +This method binds a random available dynamic UDP port on the host machine at the *unspecified* address. Use :ref:`create_host_bound()` to specify the address and port. \ **Note:** It is necessary to create a host in both client and server in order to establish a connection. @@ -344,7 +344,7 @@ Destroys the host and all resources associated with it. :ref:`Error` **dtls_client_setup**\ (\ hostname\: :ref:`String`, client_options\: :ref:`TLSOptions` = null\ ) :ref:`πŸ”—` -Configure this ENetHost to use the custom Godot extension allowing DTLS encryption for ENet clients. Call this before :ref:`connect_to_host` to have ENet connect using DTLS validating the server certificate against ``hostname``. You can pass the optional ``client_options`` parameter to customize the trusted certification authorities, or disable the common name verification. See :ref:`TLSOptions.client` and :ref:`TLSOptions.client_unsafe`. +Configure this ENetHost to use the custom Godot extension allowing DTLS encryption for ENet clients. Call this before :ref:`connect_to_host()` to have ENet connect using DTLS validating the server certificate against ``hostname``. You can pass the optional ``client_options`` parameter to customize the trusted certification authorities, or disable the common name verification. See :ref:`TLSOptions.client()` and :ref:`TLSOptions.client_unsafe()`. .. rst-class:: classref-item-separator @@ -356,7 +356,7 @@ Configure this ENetHost to use the custom Godot extension allowing DTLS encrypti :ref:`Error` **dtls_server_setup**\ (\ server_options\: :ref:`TLSOptions`\ ) :ref:`πŸ”—` -Configure this ENetHost to use the custom Godot extension allowing DTLS encryption for ENet servers. Call this right after :ref:`create_host_bound` to have ENet expect peers to connect using DTLS. See :ref:`TLSOptions.server`. +Configure this ENetHost to use the custom Godot extension allowing DTLS encryption for ENet servers. Call this right after :ref:`create_host_bound()` to have ENet expect peers to connect using DTLS. See :ref:`TLSOptions.server()`. .. rst-class:: classref-item-separator @@ -432,7 +432,7 @@ Returns and resets host statistics. See :ref:`HostStatistic`. +\ **Note:** This method is only relevant after calling :ref:`dtls_server_setup()`. .. rst-class:: classref-item-separator diff --git a/classes/class_enetmultiplayerpeer.rst b/classes/class_enetmultiplayerpeer.rst index 7123249a6..1cd6dce3a 100644 --- a/classes/class_enetmultiplayerpeer.rst +++ b/classes/class_enetmultiplayerpeer.rst @@ -85,7 +85,7 @@ Property Descriptions - :ref:`ENetConnection` **get_host**\ (\ ) -The underlying :ref:`ENetConnection` created after :ref:`create_client` and :ref:`create_server`. +The underlying :ref:`ENetConnection` created after :ref:`create_client()` and :ref:`create_server()`. .. rst-class:: classref-section-separator @@ -116,7 +116,7 @@ Add a new remote peer with the given ``peer_id`` connected to the given ``host`` :ref:`Error` **create_client**\ (\ address\: :ref:`String`, port\: :ref:`int`, channel_count\: :ref:`int` = 0, in_bandwidth\: :ref:`int` = 0, out_bandwidth\: :ref:`int` = 0, local_port\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Create client that connects to a server at ``address`` using specified ``port``. The given address needs to be either a fully qualified domain name (e.g. ``"www.example.com"``) or an IP address in IPv4 or IPv6 format (e.g. ``"192.168.1.1"``). The ``port`` is the port the server is listening on. The ``channel_count`` parameter can be used to specify the number of ENet channels allocated for the connection. The ``in_bandwidth`` and ``out_bandwidth`` parameters can be used to limit the incoming and outgoing bandwidth to the given number of bytes per second. The default of 0 means unlimited bandwidth. Note that ENet will strategically drop packets on specific sides of a connection between peers to ensure the peer's bandwidth is not overwhelmed. The bandwidth parameters also determine the window size of a connection which limits the amount of reliable packets that may be in transit at any given time. Returns :ref:`@GlobalScope.OK` if a client was created, :ref:`@GlobalScope.ERR_ALREADY_IN_USE` if this ENetMultiplayerPeer instance already has an open connection (in which case you need to call :ref:`MultiplayerPeer.close` first) or :ref:`@GlobalScope.ERR_CANT_CREATE` if the client could not be created. If ``local_port`` is specified, the client will also listen to the given port; this is useful for some NAT traversal techniques. +Create client that connects to a server at ``address`` using specified ``port``. The given address needs to be either a fully qualified domain name (e.g. ``"www.example.com"``) or an IP address in IPv4 or IPv6 format (e.g. ``"192.168.1.1"``). The ``port`` is the port the server is listening on. The ``channel_count`` parameter can be used to specify the number of ENet channels allocated for the connection. The ``in_bandwidth`` and ``out_bandwidth`` parameters can be used to limit the incoming and outgoing bandwidth to the given number of bytes per second. The default of 0 means unlimited bandwidth. Note that ENet will strategically drop packets on specific sides of a connection between peers to ensure the peer's bandwidth is not overwhelmed. The bandwidth parameters also determine the window size of a connection which limits the amount of reliable packets that may be in transit at any given time. Returns :ref:`@GlobalScope.OK` if a client was created, :ref:`@GlobalScope.ERR_ALREADY_IN_USE` if this ENetMultiplayerPeer instance already has an open connection (in which case you need to call :ref:`MultiplayerPeer.close()` first) or :ref:`@GlobalScope.ERR_CANT_CREATE` if the client could not be created. If ``local_port`` is specified, the client will also listen to the given port; this is useful for some NAT traversal techniques. .. rst-class:: classref-item-separator @@ -128,7 +128,7 @@ Create client that connects to a server at ``address`` using specified ``port``. :ref:`Error` **create_mesh**\ (\ unique_id\: :ref:`int`\ ) :ref:`πŸ”—` -Initialize this :ref:`MultiplayerPeer` in mesh mode. The provided ``unique_id`` will be used as the local peer network unique ID once assigned as the :ref:`MultiplayerAPI.multiplayer_peer`. In the mesh configuration you will need to set up each new peer manually using :ref:`ENetConnection` before calling :ref:`add_mesh_peer`. While this technique is more advanced, it allows for better control over the connection process (e.g. when dealing with NAT punch-through) and for better distribution of the network load (which would otherwise be more taxing on the server). +Initialize this :ref:`MultiplayerPeer` in mesh mode. The provided ``unique_id`` will be used as the local peer network unique ID once assigned as the :ref:`MultiplayerAPI.multiplayer_peer`. In the mesh configuration you will need to set up each new peer manually using :ref:`ENetConnection` before calling :ref:`add_mesh_peer()`. While this technique is more advanced, it allows for better control over the connection process (e.g. when dealing with NAT punch-through) and for better distribution of the network load (which would otherwise be more taxing on the server). .. rst-class:: classref-item-separator @@ -140,7 +140,7 @@ Initialize this :ref:`MultiplayerPeer` in mesh mode. The :ref:`Error` **create_server**\ (\ port\: :ref:`int`, max_clients\: :ref:`int` = 32, max_channels\: :ref:`int` = 0, in_bandwidth\: :ref:`int` = 0, out_bandwidth\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Create server that listens to connections via ``port``. The port needs to be an available, unused port between 0 and 65535. Note that ports below 1024 are privileged and may require elevated permissions depending on the platform. To change the interface the server listens on, use :ref:`set_bind_ip`. The default IP is the wildcard ``"*"``, which listens on all available interfaces. ``max_clients`` is the maximum number of clients that are allowed at once, any number up to 4095 may be used, although the achievable number of simultaneous clients may be far lower and depends on the application. For additional details on the bandwidth parameters, see :ref:`create_client`. Returns :ref:`@GlobalScope.OK` if a server was created, :ref:`@GlobalScope.ERR_ALREADY_IN_USE` if this ENetMultiplayerPeer instance already has an open connection (in which case you need to call :ref:`MultiplayerPeer.close` first) or :ref:`@GlobalScope.ERR_CANT_CREATE` if the server could not be created. +Create server that listens to connections via ``port``. The port needs to be an available, unused port between 0 and 65535. Note that ports below 1024 are privileged and may require elevated permissions depending on the platform. To change the interface the server listens on, use :ref:`set_bind_ip()`. The default IP is the wildcard ``"*"``, which listens on all available interfaces. ``max_clients`` is the maximum number of clients that are allowed at once, any number up to 4095 may be used, although the achievable number of simultaneous clients may be far lower and depends on the application. For additional details on the bandwidth parameters, see :ref:`create_client()`. Returns :ref:`@GlobalScope.OK` if a server was created, :ref:`@GlobalScope.ERR_ALREADY_IN_USE` if this ENetMultiplayerPeer instance already has an open connection (in which case you need to call :ref:`MultiplayerPeer.close()` first) or :ref:`@GlobalScope.ERR_CANT_CREATE` if the server could not be created. .. rst-class:: classref-item-separator diff --git a/classes/class_enetpacketpeer.rst b/classes/class_enetpacketpeer.rst index 1392cb7b3..d5b444ad6 100644 --- a/classes/class_enetpacketpeer.rst +++ b/classes/class_enetpacketpeer.rst @@ -21,7 +21,7 @@ Description A PacketPeer implementation representing a peer of an :ref:`ENetConnection`. -This class cannot be instantiated directly but can be retrieved during :ref:`ENetConnection.service` or via :ref:`ENetConnection.get_peers`. +This class cannot be instantiated directly but can be retrieved during :ref:`ENetConnection.service()` or via :ref:`ENetConnection.get_peers()`. \ **Note:** When exporting to Android, make sure to enable the ``INTERNET`` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. @@ -306,7 +306,7 @@ Constants **PACKET_LOSS_SCALE** = ``65536`` :ref:`πŸ”—` -The reference scale for packet loss. See :ref:`get_statistic` and :ref:`PEER_PACKET_LOSS`. +The reference scale for packet loss. See :ref:`get_statistic()` and :ref:`PEER_PACKET_LOSS`. .. _class_ENetPacketPeer_constant_PACKET_THROTTLE_SCALE: @@ -314,7 +314,7 @@ The reference scale for packet loss. See :ref:`get_statistic` -The reference value for throttle configuration. The default value is ``32``. See :ref:`throttle_configure`. +The reference value for throttle configuration. The default value is ``32``. See :ref:`throttle_configure()`. .. _class_ENetPacketPeer_constant_FLAG_RELIABLE: @@ -439,7 +439,7 @@ Returns ``true`` if the peer is currently active (i.e. the associated :ref:`ENet |void| **peer_disconnect**\ (\ data\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Request a disconnection from a peer. An :ref:`ENetConnection.EVENT_DISCONNECT` will be generated during :ref:`ENetConnection.service` once the disconnection is complete. +Request a disconnection from a peer. An :ref:`ENetConnection.EVENT_DISCONNECT` will be generated during :ref:`ENetConnection.service()` once the disconnection is complete. .. rst-class:: classref-item-separator @@ -451,7 +451,7 @@ Request a disconnection from a peer. An :ref:`ENetConnection.EVENT_DISCONNECT` = 0\ ) :ref:`πŸ”—` -Request a disconnection from a peer, but only after all queued outgoing packets are sent. An :ref:`ENetConnection.EVENT_DISCONNECT` will be generated during :ref:`ENetConnection.service` once the disconnection is complete. +Request a disconnection from a peer, but only after all queued outgoing packets are sent. An :ref:`ENetConnection.EVENT_DISCONNECT` will be generated during :ref:`ENetConnection.service()` once the disconnection is complete. .. rst-class:: classref-item-separator diff --git a/classes/class_engine.rst b/classes/class_engine.rst index 38abb8fae..6c83a23ca 100644 --- a/classes/class_engine.rst +++ b/classes/class_engine.rst @@ -196,7 +196,7 @@ How much physics ticks are synchronized with real time. If ``0`` or less, the ti - |void| **set_physics_ticks_per_second**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_physics_ticks_per_second**\ (\ ) -The number of fixed iterations per second. This controls how often physics simulation and :ref:`Node._physics_process` methods are run. This value should generally always be set to ``60`` or above, as Godot doesn't interpolate the physics step. As a result, values lower than ``60`` will look stuttery. This value can be increased to make input more reactive or work around collision tunneling issues, but keep in mind doing so will increase CPU usage. See also :ref:`max_fps` and :ref:`ProjectSettings.physics/common/physics_ticks_per_second`. +The number of fixed iterations per second. This controls how often physics simulation and :ref:`Node._physics_process()` methods are run. This value should generally always be set to ``60`` or above, as Godot doesn't interpolate the physics step. As a result, values lower than ``60`` will look stuttery. This value can be increased to make input more reactive or work around collision tunneling issues, but keep in mind doing so will increase CPU usage. See also :ref:`max_fps` and :ref:`ProjectSettings.physics/common/physics_ticks_per_second`. \ **Note:** Only :ref:`max_physics_steps_per_frame` physics ticks may be simulated per rendered frame at most. If more physics ticks have to be simulated per rendered frame to keep up with rendering, the project will appear to slow down (even if ``delta`` is used consistently in physics calculations). Therefore, it is recommended to also increase :ref:`max_physics_steps_per_frame` if increasing :ref:`physics_ticks_per_second` significantly above its default value. @@ -236,7 +236,7 @@ If ``false``, stops printing error and warning messages to the console and edito - |void| **set_print_to_stdout**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_printing_to_stdout**\ (\ ) -If ``false``, stops printing messages (for example using :ref:`@GlobalScope.print`) to the console, log files, and editor Output log. This property is equivalent to the :ref:`ProjectSettings.application/run/disable_stdout` project setting. +If ``false``, stops printing messages (for example using :ref:`@GlobalScope.print()`) to the console, log files, and editor Output log. This property is equivalent to the :ref:`ProjectSettings.application/run/disable_stdout` project setting. \ **Note:** This does not stop printing errors or warnings produced by scripts to the console or log files, for more details see :ref:`print_error_messages`. @@ -257,7 +257,7 @@ If ``false``, stops printing messages (for example using :ref:`@GlobalScope.prin The speed multiplier at which the in-game clock updates, compared to real time. For example, if set to ``2.0`` the game runs twice as fast, and if set to ``0.5`` the game runs half as fast. -This value affects :ref:`Timer`, :ref:`SceneTreeTimer`, and all other simulations that make use of ``delta`` time (such as :ref:`Node._process` and :ref:`Node._physics_process`). +This value affects :ref:`Timer`, :ref:`SceneTreeTimer`, and all other simulations that make use of ``delta`` time (such as :ref:`Node._process()` and :ref:`Node._physics_process()`). \ **Note:** It's recommended to keep this property above ``0.0``, as the game may behave unexpectedly otherwise. @@ -282,9 +282,9 @@ Method Descriptions Returns the name of the CPU architecture the Godot binary was built for. Possible return values include ``"x86_64"``, ``"x86_32"``, ``"arm64"``, ``"arm32"``, ``"rv64"``, ``"riscv"``, ``"ppc64"``, ``"ppc"``, ``"wasm64"``, and ``"wasm32"``. -To detect whether the current build is 64-bit, or the type of architecture, don't use the architecture name. Instead, use :ref:`OS.has_feature` to check for the ``"64"`` feature tag, or tags such as ``"x86"`` or ``"arm"``. See the :doc:`Feature Tags <../tutorials/export/feature_tags>` documentation for more details. +To detect whether the current build is 64-bit, or the type of architecture, don't use the architecture name. Instead, use :ref:`OS.has_feature()` to check for the ``"64"`` feature tag, or tags such as ``"x86"`` or ``"arm"``. See the :doc:`Feature Tags <../tutorials/export/feature_tags>` documentation for more details. -\ **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"``. +\ **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 @@ -344,7 +344,7 @@ Returns a :ref:`Dictionary` of categorized donor names. Each e Returns the total number of frames drawn since the engine started. -\ **Note:** On headless platforms, or if rendering is disabled with ``--disable-render-loop`` via command line, this method always returns ``0``. See also :ref:`get_process_frames`. +\ **Note:** On headless platforms, or if rendering is disabled with ``--disable-render-loop`` via command line, this method always returns ``0``. See also :ref:`get_process_frames()`. .. rst-class:: classref-item-separator @@ -392,7 +392,7 @@ Returns the full Godot license text. :ref:`MainLoop` **get_main_loop**\ (\ ) |const| :ref:`πŸ”—` -Returns the instance of the :ref:`MainLoop`. This is usually the main :ref:`SceneTree` and is the same as :ref:`Node.get_tree`. +Returns the instance of the :ref:`MainLoop`. This is usually the main :ref:`SceneTree` and is the same as :ref:`Node.get_tree()`. \ **Note:** The type instantiated as the main loop can changed with :ref:`ProjectSettings.application/run/main_loop_type`. @@ -406,7 +406,7 @@ Returns the instance of the :ref:`MainLoop`. This is usually the :ref:`int` **get_physics_frames**\ (\ ) |const| :ref:`πŸ”—` -Returns the total number of frames passed since the engine started. This number is increased every **physics frame**. See also :ref:`get_process_frames`. +Returns the total number of frames passed since the engine started. This number is increased every **physics frame**. See also :ref:`get_process_frames()`. This method can be used to run expensive logic less often without relying on a :ref:`Timer`: @@ -455,7 +455,7 @@ Returns the fraction through the current physics tick we are at the time of rend :ref:`int` **get_process_frames**\ (\ ) |const| :ref:`πŸ”—` -Returns the total number of frames passed since the engine started. This number is increased every **process frame**, regardless of whether the render loop is enabled. See also :ref:`get_frames_drawn` and :ref:`get_physics_frames`. +Returns the total number of frames passed since the engine started. This number is increased every **process frame**, regardless of whether the render loop is enabled. See also :ref:`get_frames_drawn()` and :ref:`get_physics_frames()`. This method can be used to run expensive logic less often without relying on a :ref:`Timer`: @@ -504,7 +504,7 @@ Returns an instance of a :ref:`ScriptLanguage` with the gi :ref:`int` **get_script_language_count**\ (\ ) :ref:`πŸ”—` -Returns the number of available script languages. Use with :ref:`get_script_language`. +Returns the number of available script languages. Use with :ref:`get_script_language()`. .. rst-class:: classref-item-separator @@ -516,7 +516,7 @@ Returns the number of available script languages. Use with :ref:`get_script_lang :ref:`Object` **get_singleton**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`πŸ”—` -Returns the global singleton with the given ``name``, or ``null`` if it does not exist. Often used for plugins. See also :ref:`has_singleton` and :ref:`get_singleton_list`. +Returns the global singleton with the given ``name``, or ``null`` if it does not exist. Often used for plugins. See also :ref:`has_singleton()` and :ref:`get_singleton_list()`. \ **Note:** Global singletons are not the same as autoloaded nodes, which are configurable in the project settings. @@ -530,7 +530,7 @@ Returns the global singleton with the given ``name``, or ``null`` if it does not :ref:`PackedStringArray` **get_singleton_list**\ (\ ) |const| :ref:`πŸ”—` -Returns a list of names of all available global singletons. See also :ref:`get_singleton`. +Returns a list of names of all available global singletons. See also :ref:`get_singleton()`. .. rst-class:: classref-item-separator @@ -611,7 +611,7 @@ Returns the path to the :ref:`MovieWriter`'s output file, or :ref:`bool` **has_singleton**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if a singleton with the given ``name`` exists in the global scope. See also :ref:`get_singleton`. +Returns ``true`` if a singleton with the given ``name`` exists in the global scope. See also :ref:`get_singleton()`. .. tabs:: @@ -667,7 +667,7 @@ Returns ``true`` if the script is currently running inside the editor, otherwise See :doc:`Running code in the editor <../tutorials/plugins/running_code_in_the_editor>` in the documentation for more information. -\ **Note:** To detect whether the script is running on an editor *build* (such as when pressing :kbd:`F5`), use :ref:`OS.has_feature` with the ``"editor"`` argument instead. ``OS.has_feature("editor")`` evaluate to ``true`` both when the script is running in the editor and when running the project from the editor, but returns ``false`` when run from an exported project. +\ **Note:** To detect whether the script is running on an editor *build* (such as when pressing :kbd:`F5`), use :ref:`OS.has_feature()` with the ``"editor"`` argument instead. ``OS.has_feature("editor")`` evaluate to ``true`` both when the script is running in the editor and when running the project from the editor, but returns ``false`` when run from an exported project. .. rst-class:: classref-item-separator @@ -766,7 +766,7 @@ Returns: |void| **unregister_singleton**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Removes the singleton registered under ``name``. The singleton object is *not* freed. Only works with user-defined singletons registered with :ref:`register_singleton`. +Removes the singleton registered under ``name``. The singleton object is *not* freed. Only works with user-defined singletons registered with :ref:`register_singleton()`. .. |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_enginedebugger.rst b/classes/class_enginedebugger.rst index 18fc947df..7b63046a0 100644 --- a/classes/class_enginedebugger.rst +++ b/classes/class_enginedebugger.rst @@ -268,7 +268,7 @@ Registers a message capture with given ``name``. If ``name`` is "my_message" the The callable must accept a message string and a data array as argument. The callable should return ``true`` if the message is recognized. -\ **Note:** The callable will receive the message with the prefix stripped, unlike :ref:`EditorDebuggerPlugin._capture`. See the :ref:`EditorDebuggerPlugin` description for an example. +\ **Note:** The callable will receive the message with the prefix stripped, unlike :ref:`EditorDebuggerPlugin._capture()`. See the :ref:`EditorDebuggerPlugin` description for an example. .. rst-class:: classref-item-separator diff --git a/classes/class_engineprofiler.rst b/classes/class_engineprofiler.rst index faab1d5fd..8c5743818 100644 --- a/classes/class_engineprofiler.rst +++ b/classes/class_engineprofiler.rst @@ -54,7 +54,7 @@ Method Descriptions |void| **_add_frame**\ (\ data\: :ref:`Array`\ ) |virtual| :ref:`πŸ”—` -Called when data is added to profiler using :ref:`EngineDebugger.profiler_add_frame_data`. +Called when data is added to profiler using :ref:`EngineDebugger.profiler_add_frame_data()`. .. rst-class:: classref-item-separator diff --git a/classes/class_environment.rst b/classes/class_environment.rst index 15809ae4a..1c0bb82e8 100644 --- a/classes/class_environment.rst +++ b/classes/class_environment.rst @@ -425,7 +425,7 @@ enum **ToneMapper**: :ref:`πŸ”—` :ref:`ToneMapper` **TONE_MAPPER_LINEAR** = ``0`` -Linear tonemapper operator. Reads the linear data and passes it on unmodified. This can cause bright lighting to look blown out, with noticeable clipping in the output colors. +Does not modify color data, resulting in a linear tonemapping curve which unnaturally clips bright values, causing bright lighting to look blown out. The simplest and fastest tonemapper. .. _class_Environment_constant_TONE_MAPPER_REINHARDT: @@ -433,7 +433,9 @@ Linear tonemapper operator. Reads the linear data and passes it on unmodified. T :ref:`ToneMapper` **TONE_MAPPER_REINHARDT** = ``1`` -Reinhard tonemapper operator. Performs a variation on rendered pixels' colors by this formula: ``color = color * (1 + color / (white * white)) / (1 + color)``. This avoids clipping bright highlights, but the resulting image can look a bit dull. When :ref:`tonemap_white` is left at the default value of ``1.0`` this is identical to :ref:`TONE_MAPPER_LINEAR` while also being slightly less performant. +A simple tonemapping curve that rolls off bright values to prevent clipping. This results in an image that can appear dull and low contrast. Slower than :ref:`TONE_MAPPER_LINEAR`. + +\ **Note:** When :ref:`tonemap_white` is left at the default value of ``1.0``, :ref:`TONE_MAPPER_REINHARDT` produces an identical image to :ref:`TONE_MAPPER_LINEAR`. .. _class_Environment_constant_TONE_MAPPER_FILMIC: @@ -441,7 +443,7 @@ Reinhard tonemapper operator. Performs a variation on rendered pixels' colors by :ref:`ToneMapper` **TONE_MAPPER_FILMIC** = ``2`` -Filmic tonemapper operator. This avoids clipping bright highlights, with a resulting image that usually looks more vivid than :ref:`TONE_MAPPER_REINHARDT`. +Uses a film-like tonemapping curve to prevent clipping of bright values and provide better contrast than :ref:`TONE_MAPPER_REINHARDT`. Slightly slower than :ref:`TONE_MAPPER_REINHARDT`. .. _class_Environment_constant_TONE_MAPPER_ACES: @@ -449,7 +451,7 @@ Filmic tonemapper operator. This avoids clipping bright highlights, with a resul :ref:`ToneMapper` **TONE_MAPPER_ACES** = ``3`` -Use the Academy Color Encoding System tonemapper. ACES is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. ACES typically has a more contrasted output compared to :ref:`TONE_MAPPER_REINHARDT` and :ref:`TONE_MAPPER_FILMIC`. +Uses a high-contrast film-like tonemapping curve and desaturates bright values for a more realistic appearance. Slightly slower than :ref:`TONE_MAPPER_FILMIC`. \ **Note:** This tonemapping operator is called "ACES Fitted" in Godot 3.x. @@ -459,7 +461,9 @@ Use the Academy Color Encoding System tonemapper. ACES is slightly more expensiv :ref:`ToneMapper` **TONE_MAPPER_AGX** = ``4`` -Use the AgX tonemapper. AgX is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. AgX is less likely to darken parts of the scene compared to :ref:`TONE_MAPPER_ACES` and can match the overall scene brightness of :ref:`TONE_MAPPER_FILMIC` more closely. +Uses a film-like tonemapping curve and desaturates bright values for a more realistic appearance. Better than other tonemappers at maintaining the hue of colors as they become brighter. The slowest tonemapping option. + +\ **Note:** :ref:`tonemap_white` is fixed at a value of ``16.29``, which makes :ref:`TONE_MAPPER_AGX` unsuitable for use with the Mobile rendering method. .. rst-class:: classref-item-separator @@ -2051,7 +2055,9 @@ The maximum number of steps for screen-space reflections. Higher values are slow - |void| **set_tonemap_exposure**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_tonemap_exposure**\ (\ ) -The default exposure used for tonemapping. Higher values result in a brighter image. See also :ref:`tonemap_white`. +Adjusts the brightness of values before they are provided to the tonemapper. Higher :ref:`tonemap_exposure` values result in a brighter image. See also :ref:`tonemap_white`. + +\ **Note:** Values provided to the tonemapper will also be multiplied by ``2.0`` and ``1.8`` for :ref:`TONE_MAPPER_FILMIC` and :ref:`TONE_MAPPER_ACES` respectively to produce a similar apparent brightness as :ref:`TONE_MAPPER_LINEAR`. .. rst-class:: classref-item-separator @@ -2085,7 +2091,7 @@ The tonemapping mode to use. Tonemapping is the process that "converts" HDR valu - |void| **set_tonemap_white**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_tonemap_white**\ (\ ) -The white reference value for tonemapping (also called "whitepoint"). Higher values can make highlights look less blown out, and will also slightly darken the whole scene as a result. See also :ref:`tonemap_exposure`. +The white reference value for tonemapping, which indicates where bright white is located in the scale of values provided to the tonemapper. For photorealistic lighting, recommended values are between ``6.0`` and ``8.0``. Higher values result in less blown out highlights, but may make the scene appear lower contrast. See also :ref:`tonemap_exposure`. \ **Note:** :ref:`tonemap_white` is ignored when using :ref:`TONE_MAPPER_LINEAR` or :ref:`TONE_MAPPER_AGX`. diff --git a/classes/class_expression.rst b/classes/class_expression.rst index 09f408cd5..c9023eab8 100644 --- a/classes/class_expression.rst +++ b/classes/class_expression.rst @@ -110,9 +110,9 @@ Method Descriptions :ref:`Variant` **execute**\ (\ inputs\: :ref:`Array` = [], base_instance\: :ref:`Object` = null, show_error\: :ref:`bool` = true, const_calls_only\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Executes the expression that was previously parsed by :ref:`parse` and returns the result. Before you use the returned object, you should check if the method failed by calling :ref:`has_execute_failed`. +Executes the expression that was previously parsed by :ref:`parse()` and returns the result. Before you use the returned object, you should check if the method failed by calling :ref:`has_execute_failed()`. -If you defined input variables in :ref:`parse`, you can specify their values in the inputs array, in the same order. +If you defined input variables in :ref:`parse()`, you can specify their values in the inputs array, in the same order. .. rst-class:: classref-item-separator @@ -124,7 +124,7 @@ If you defined input variables in :ref:`parse`, y :ref:`String` **get_error_text**\ (\ ) |const| :ref:`πŸ”—` -Returns the error text if :ref:`parse` or :ref:`execute` has failed. +Returns the error text if :ref:`parse()` or :ref:`execute()` has failed. .. rst-class:: classref-item-separator @@ -136,7 +136,7 @@ Returns the error text if :ref:`parse` or :ref:`e :ref:`bool` **has_execute_failed**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if :ref:`execute` has failed. +Returns ``true`` if :ref:`execute()` has failed. .. rst-class:: classref-item-separator diff --git a/classes/class_fileaccess.rst b/classes/class_fileaccess.rst index a246c1181..b5e79a152 100644 --- a/classes/class_fileaccess.rst +++ b/classes/class_fileaccess.rst @@ -56,11 +56,11 @@ Here's a sample on how to write and read from a file: In the example above, the file will be saved in the user data folder as specified in the :doc:`Data paths <../tutorials/io/data_paths>` documentation. -\ **FileAccess** will close when it's freed, which happens when it goes out of scope or when it gets assigned with ``null``. :ref:`close` can be used to close it before then explicitly. In C# the reference must be disposed manually, which can be done with the ``using`` statement or by calling the ``Dispose`` method directly. +\ **FileAccess** will close when it's freed, which happens when it goes out of scope or when it gets assigned with ``null``. :ref:`close()` can be used to close it before then explicitly. In C# the reference must be disposed manually, which can be done with the ``using`` statement or by calling the ``Dispose`` method directly. \ **Note:** To access project resources once exported, it is recommended to use :ref:`ResourceLoader` instead of **FileAccess**, as some files are converted to engine-specific formats and their original source files might not be present in the exported PCK package. If using **FileAccess**, make sure the file is included in the export by changing its import mode to **Keep File (exported as is)** in the Import dock, or, for files where this option is not available, change the non-resource export filter in the Export dialog to include the file's extension (e.g. ``*.txt``). -\ **Note:** Files are automatically closed only if the process exits "normally" (such as by clicking the window manager's close button or pressing **Alt + F4**). If you stop the project execution by pressing **F8** while the project is running, the file won't be closed as the game process will be killed. You can work around this by calling :ref:`flush` at regular intervals. +\ **Note:** Files are automatically closed only if the process exits "normally" (such as by clicking the window manager's close button or pressing **Alt + F4**). If you stop the project execution by pressing **F8** while the project is running, the file won't be closed as the game process will be killed. You can work around this by calling :ref:`flush()` at regular intervals. .. rst-class:: classref-introduction-group @@ -242,7 +242,7 @@ Opens the file for read operations. The cursor is positioned at the beginning of Opens the file for write operations. The file is created if it does not exist, and truncated if it does. -\ **Note:** When creating a file it must be in an already existing directory. To recursively create directories for a file path, see :ref:`DirAccess.make_dir_recursive`. +\ **Note:** When creating a file it must be in an already existing directory. To recursively create directories for a file path, see :ref:`DirAccess.make_dir_recursive()`. .. _class_FileAccess_constant_READ_WRITE: @@ -260,7 +260,7 @@ Opens the file for read and write operations. Does not truncate the file. The cu Opens the file for read and write operations. The file is created if it does not exist, and truncated if it does. The cursor is positioned at the beginning of the file. -\ **Note:** When creating a file it must be in an already existing directory. To recursively create directories for a file path, see :ref:`DirAccess.make_dir_recursive`. +\ **Note:** When creating a file it must be in an already existing directory. To recursively create directories for a file path, see :ref:`DirAccess.make_dir_recursive()`. .. rst-class:: classref-item-separator @@ -459,7 +459,7 @@ Method Descriptions |void| **close**\ (\ ) :ref:`πŸ”—` -Closes the currently opened file and prevents subsequent read/write operations. Use :ref:`flush` to persist the data to disk without closing the file. +Closes the currently opened file and prevents subsequent read/write operations. Use :ref:`flush()` to persist the data to disk without closing the file. \ **Note:** **FileAccess** will automatically close when it's freed, which happens when it goes out of scope or when it gets assigned with ``null``. In C# the reference must be disposed after we are done using it, this can be done with the ``using`` statement or calling the ``Dispose`` method directly. @@ -481,7 +481,7 @@ If ``extension`` is not empty, it will be appended to the temporary file name. If ``keep`` is ``true``, the file is not deleted when the returned **FileAccess** is freed. -Returns ``null`` if opening the file failed. You can use :ref:`get_open_error` to check the error that occurred. +Returns ``null`` if opening the file failed. You can use :ref:`get_open_error()` to check the error that occurred. .. rst-class:: classref-item-separator @@ -526,9 +526,9 @@ Returns ``true`` if the file cursor has already read past the end of the file. Returns ``true`` if the file exists in the given path. -\ **Note:** Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. See :ref:`ResourceLoader.exists` for an alternative approach that takes resource remapping into account. +\ **Note:** Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. See :ref:`ResourceLoader.exists()` for an alternative approach that takes resource remapping into account. -For a non-static, relative equivalent, use :ref:`DirAccess.file_exists`. +For a non-static, relative equivalent, use :ref:`DirAccess.file_exists()`. .. rst-class:: classref-item-separator @@ -540,9 +540,9 @@ For a non-static, relative equivalent, use :ref:`DirAccess.file_exists` -Writes the file's buffer to disk. Flushing is automatically performed when the file is closed. This means you don't need to call :ref:`flush` manually before closing a file. Still, calling :ref:`flush` can be used to ensure the data is safe even if the project crashes instead of being closed gracefully. +Writes the file's buffer to disk. Flushing is automatically performed when the file is closed. This means you don't need to call :ref:`flush()` manually before closing a file. Still, calling :ref:`flush()` can be used to ensure the data is safe even if the project crashes instead of being closed gracefully. -\ **Note:** Only call :ref:`flush` when you actually need it. Otherwise, it will decrease performance due to constant disk writes. +\ **Note:** Only call :ref:`flush()` when you actually need it. Otherwise, it will decrease performance due to constant disk writes. .. rst-class:: classref-item-separator @@ -554,7 +554,7 @@ Writes the file's buffer to disk. Flushing is automatically performed when the f :ref:`int` **get_8**\ (\ ) |const| :ref:`πŸ”—` -Returns the next 8 bits from the file as an integer. See :ref:`store_8` for details on what values can be stored and retrieved this way. +Returns the next 8 bits from the file as an integer. See :ref:`store_8()` for details on what values can be stored and retrieved this way. .. rst-class:: classref-item-separator @@ -566,7 +566,7 @@ Returns the next 8 bits from the file as an integer. See :ref:`store_8` **get_16**\ (\ ) |const| :ref:`πŸ”—` -Returns the next 16 bits from the file as an integer. See :ref:`store_16` for details on what values can be stored and retrieved this way. +Returns the next 16 bits from the file as an integer. See :ref:`store_16()` for details on what values can be stored and retrieved this way. .. rst-class:: classref-item-separator @@ -578,7 +578,7 @@ Returns the next 16 bits from the file as an integer. See :ref:`store_16` **get_32**\ (\ ) |const| :ref:`πŸ”—` -Returns the next 32 bits from the file as an integer. See :ref:`store_32` for details on what values can be stored and retrieved this way. +Returns the next 32 bits from the file as an integer. See :ref:`store_32()` for details on what values can be stored and retrieved this way. .. rst-class:: classref-item-separator @@ -590,7 +590,7 @@ Returns the next 32 bits from the file as an integer. See :ref:`store_32` **get_64**\ (\ ) |const| :ref:`πŸ”—` -Returns the next 64 bits from the file as an integer. See :ref:`store_64` for details on what values can be stored and retrieved this way. +Returns the next 64 bits from the file as an integer. See :ref:`store_64()` for details on what values can be stored and retrieved this way. .. rst-class:: classref-item-separator @@ -678,7 +678,7 @@ Returns the last error that happened when trying to perform operations. Compare Returns the whole ``path`` file contents as a :ref:`PackedByteArray` without any decoding. -Returns an empty :ref:`PackedByteArray` if an error occurred while opening the file. You can use :ref:`get_open_error` to check the error that occurred. +Returns an empty :ref:`PackedByteArray` if an error occurred while opening the file. You can use :ref:`get_open_error()` to check the error that occurred. .. rst-class:: classref-item-separator @@ -692,7 +692,7 @@ Returns an empty :ref:`PackedByteArray` if an error occur Returns the whole ``path`` file contents as a :ref:`String`. Text is interpreted as being UTF-8 encoded. -Returns an empty :ref:`String` if an error occurred while opening the file. You can use :ref:`get_open_error` to check the error that occurred. +Returns an empty :ref:`String` if an error occurred while opening the file. You can use :ref:`get_open_error()` to check the error that occurred. .. rst-class:: classref-item-separator @@ -792,7 +792,7 @@ Returns the last time the ``file`` was modified in Unix timestamp format, or ``0 :ref:`Error` **get_open_error**\ (\ ) |static| :ref:`πŸ”—` -Returns the result of the last :ref:`open` call in the current thread. +Returns the result of the last :ref:`open()` call in the current thread. .. rst-class:: classref-item-separator @@ -908,7 +908,7 @@ Returns file UNIX permissions. Returns the next :ref:`Variant` value from the file. If ``allow_objects`` is ``true``, decoding objects is allowed. -Internally, this uses the same decoding mechanism as the :ref:`@GlobalScope.bytes_to_var` method. +Internally, this uses the same decoding mechanism as the :ref:`@GlobalScope.bytes_to_var()` method. \ **Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. @@ -936,7 +936,7 @@ Returns ``true`` if the file is currently opened. Creates a new **FileAccess** object and opens the file for writing or reading, depending on the flags. -Returns ``null`` if opening the file failed. You can use :ref:`get_open_error` to check the error that occurred. +Returns ``null`` if opening the file failed. You can use :ref:`get_open_error()` to check the error that occurred. .. rst-class:: classref-item-separator @@ -950,9 +950,9 @@ Returns ``null`` if opening the file failed. You can use :ref:`get_open_error` can only read files that were saved by Godot, not third-party compression formats. See `GitHub issue #28999 `__ for a workaround. +\ **Note:** :ref:`open_compressed()` can only read files that were saved by Godot, not third-party compression formats. See `GitHub issue #28999 `__ for a workaround. -Returns ``null`` if opening the file failed. You can use :ref:`get_open_error` to check the error that occurred. +Returns ``null`` if opening the file failed. You can use :ref:`get_open_error()` to check the error that occurred. .. rst-class:: classref-item-separator @@ -968,7 +968,7 @@ Creates a new **FileAccess** object and opens an encrypted file in write or read \ **Note:** The provided key must be 32 bytes long. -Returns ``null`` if opening the file failed. You can use :ref:`get_open_error` to check the error that occurred. +Returns ``null`` if opening the file failed. You can use :ref:`get_open_error()` to check the error that occurred. .. rst-class:: classref-item-separator @@ -982,7 +982,7 @@ Returns ``null`` if opening the file failed. You can use :ref:`get_open_error` to check the error that occurred. +Returns ``null`` if opening the file failed. You can use :ref:`get_open_error()` to check the error that occurred. .. rst-class:: classref-item-separator @@ -1080,7 +1080,7 @@ Stores an integer as 8 bits in the file. \ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate. -To store a signed integer, use :ref:`store_64`, or convert it manually (see :ref:`store_16` for an example). +To store a signed integer, use :ref:`store_64()`, or convert it manually (see :ref:`store_16()` for an example). .. rst-class:: classref-item-separator @@ -1098,7 +1098,7 @@ Stores an integer as 16 bits in the file. \ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate. -To store a signed integer, use :ref:`store_64` or store a signed integer from the interval ``[-2^15, 2^15 - 1]`` (i.e. keeping one bit for the signedness) and compute its sign manually when reading. For example: +To store a signed integer, use :ref:`store_64()` or store a signed integer from the interval ``[-2^15, 2^15 - 1]`` (i.e. keeping one bit for the signedness) and compute its sign manually when reading. For example: .. tabs:: @@ -1153,7 +1153,7 @@ Stores an integer as 32 bits in the file. \ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate. -To store a signed integer, use :ref:`store_64`, or convert it manually (see :ref:`store_16` for an example). +To store a signed integer, use :ref:`store_64()`, or convert it manually (see :ref:`store_16()` for an example). .. rst-class:: classref-item-separator @@ -1297,7 +1297,7 @@ Stores a floating-point number in the file. Stores ``string`` in the file without a newline character (``\n``), encoding the text as UTF-8. -\ **Note:** This method is intended to be used to write text files. The string is stored as a UTF-8 encoded buffer without string length or terminating zero, which means that it can't be loaded back easily. If you want to store a retrievable string in a binary file, consider using :ref:`store_pascal_string` instead. For retrieving strings from a text file, you can use ``get_buffer(length).get_string_from_utf8()`` (if you know the length) or :ref:`get_as_text`. +\ **Note:** This method is intended to be used to write text files. The string is stored as a UTF-8 encoded buffer without string length or terminating zero, which means that it can't be loaded back easily. If you want to store a retrievable string in a binary file, consider using :ref:`store_pascal_string()` instead. For retrieving strings from a text file, you can use ``get_buffer(length).get_string_from_utf8()`` (if you know the length) or :ref:`get_as_text()`. \ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate. @@ -1313,9 +1313,9 @@ Stores ``string`` in the file without a newline character (``\n``), encoding the Stores any Variant value in the file. If ``full_objects`` is ``true``, encoding objects is allowed (and can potentially include code). -Internally, this uses the same encoding mechanism as the :ref:`@GlobalScope.var_to_bytes` method. +Internally, this uses the same encoding mechanism as the :ref:`@GlobalScope.var_to_bytes()` method. -\ **Note:** Not all properties are included. Only properties that are configured with the :ref:`@GlobalScope.PROPERTY_USAGE_STORAGE` flag set will be serialized. You can add a new usage flag to a property by overriding the :ref:`Object._get_property_list` method in your class. You can also check how property usage is configured by calling :ref:`Object._get_property_list`. See :ref:`PropertyUsageFlags` for the possible usage flags. +\ **Note:** Not all properties are included. Only properties that are configured with the :ref:`@GlobalScope.PROPERTY_USAGE_STORAGE` flag set will be serialized. You can add a new usage flag to a property by overriding the :ref:`Object._get_property_list()` method in your class. You can also check how property usage is configured by calling :ref:`Object._get_property_list()`. See :ref:`PropertyUsageFlags` for the possible usage flags. \ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate. diff --git a/classes/class_filedialog.rst b/classes/class_filedialog.rst index 30094e829..14ee10481 100644 --- a/classes/class_filedialog.rst +++ b/classes/class_filedialog.rst @@ -506,7 +506,7 @@ If ``true``, and if supported by the current :ref:`DisplayServer` to get a list of saved bookmarks. +\ **Note:** On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use :ref:`OS.get_granted_permissions()` to get a list of saved bookmarks. \ **Note:** Native dialogs are isolated from the base process, file dialog properties can't be modified once the dialog is shown. @@ -657,7 +657,7 @@ Returns the vertical box container of the dialog, custom controls can be added t \ **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their :ref:`CanvasItem.visible` property. -\ **Note:** Changes to this node are ignored by native file dialogs, use :ref:`add_option` to add custom elements to the dialog instead. +\ **Note:** Changes to this node are ignored by native file dialogs, use :ref:`add_option()` to add custom elements to the dialog instead. .. rst-class:: classref-item-separator diff --git a/classes/class_filesystemdock.rst b/classes/class_filesystemdock.rst index 7b5d6eb8f..51812c937 100644 --- a/classes/class_filesystemdock.rst +++ b/classes/class_filesystemdock.rst @@ -19,7 +19,7 @@ Godot editor's dock for managing files in the project. Description ----------- -This class is available only in :ref:`EditorPlugin`\ s and can't be instantiated. You can access it using :ref:`EditorInterface.get_file_system_dock`. +This class is available only in :ref:`EditorPlugin`\ s and can't be instantiated. You can access it using :ref:`EditorInterface.get_file_system_dock()`. While **FileSystemDock** doesn't expose any methods for file manipulation, it can listen for various file-related signals. diff --git a/classes/class_float.rst b/classes/class_float.rst index 7b1cc3276..54477d0aa 100644 --- a/classes/class_float.rst +++ b/classes/class_float.rst @@ -21,7 +21,7 @@ The **float** built-in type is a 64-bit double-precision floating-point number, Many methods and properties in the engine use 32-bit single-precision floating-point numbers instead, equivalent to ``float`` in C++, which have 6 reliable decimal digits of precision. For data structures such as :ref:`Vector2` and :ref:`Vector3`, Godot uses 32-bit floating-point numbers by default, but it can be changed to use 64-bit doubles if Godot is compiled with the ``precision=double`` option. -Math done using the **float** type is not guaranteed to be exact and will often result in small errors. You should usually use the :ref:`@GlobalScope.is_equal_approx` and :ref:`@GlobalScope.is_zero_approx` methods instead of ``==`` to compare **float** values for equality. +Math done using the **float** type is not guaranteed to be exact and will often result in small errors. You should usually use the :ref:`@GlobalScope.is_equal_approx()` and :ref:`@GlobalScope.is_zero_approx()` methods instead of ``==`` to compare **float** values for equality. .. rst-class:: classref-introduction-group @@ -161,7 +161,7 @@ Constructs a **float** as a copy of the given **float**. :ref:`float` **float**\ (\ from\: :ref:`String`\ ) -Converts a :ref:`String` to a **float**, following the same rules as :ref:`String.to_float`. +Converts a :ref:`String` to a **float**, following the same rules as :ref:`String.to_float()`. .. rst-class:: classref-item-separator @@ -522,7 +522,7 @@ Returns ``true`` if this **float** is less than or equal to the given :ref:`int< Returns ``true`` if both floats are exactly equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`@GlobalScope.is_equal_approx` or :ref:`@GlobalScope.is_zero_approx` instead, which are more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`@GlobalScope.is_equal_approx()` or :ref:`@GlobalScope.is_zero_approx()` instead, which are more reliable. \ **Note:** :ref:`@GDScript.NAN` doesn't behave the same as other numbers. Therefore, the results from this operator may not be accurate if NaNs are included. diff --git a/classes/class_font.rst b/classes/class_font.rst index 0db4a8e1f..204d3a67a 100644 --- a/classes/class_font.rst +++ b/classes/class_font.rst @@ -150,7 +150,7 @@ Method Descriptions Draw a single Unicode character ``char`` into a canvas item using the font, at a given position, with ``modulate`` color. ``pos`` specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. -\ **Note:** Do not use this function to draw strings character by character, use :ref:`draw_string` or :ref:`TextLine` instead. +\ **Note:** Do not use this function to draw strings character by character, use :ref:`draw_string()` or :ref:`TextLine` instead. .. rst-class:: classref-item-separator @@ -164,7 +164,7 @@ Draw a single Unicode character ``char`` into a canvas item using the font, at a Draw a single Unicode character ``char`` outline into a canvas item using the font, at a given position, with ``modulate`` color and ``size`` outline size. ``pos`` specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. -\ **Note:** Do not use this function to draw strings character by character, use :ref:`draw_string` or :ref:`TextLine` instead. +\ **Note:** Do not use this function to draw strings character by character, use :ref:`draw_string()` or :ref:`TextLine` instead. .. rst-class:: classref-item-separator @@ -178,7 +178,7 @@ Draw a single Unicode character ``char`` outline into a canvas item using the fo Breaks ``text`` into lines using rules specified by ``brk_flags`` and draws it into a canvas item using the font, at a given position, with ``modulate`` color, optionally clipping the width and aligning horizontally. ``pos`` specifies the baseline of the first line, not the top. To draw from the top, *ascent* must be added to the Y axis. -See also :ref:`CanvasItem.draw_multiline_string`. +See also :ref:`CanvasItem.draw_multiline_string()`. .. rst-class:: classref-item-separator @@ -192,7 +192,7 @@ See also :ref:`CanvasItem.draw_multiline_string`. +See also :ref:`CanvasItem.draw_multiline_string_outline()`. .. rst-class:: classref-item-separator @@ -206,7 +206,7 @@ See also :ref:`CanvasItem.draw_multiline_string_outline`. +See also :ref:`CanvasItem.draw_string()`. .. rst-class:: classref-item-separator @@ -220,7 +220,7 @@ See also :ref:`CanvasItem.draw_string`. Draw ``text`` outline into a canvas item using the font, at a given position, with ``modulate`` color and ``size`` outline size, optionally clipping the width and aligning horizontally. ``pos`` specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. -See also :ref:`CanvasItem.draw_string_outline`. +See also :ref:`CanvasItem.draw_string_outline()`. .. rst-class:: classref-item-separator @@ -260,7 +260,7 @@ Returns the average font ascent (number of pixels above the baseline). Returns the size of a character. Does not take kerning into account. -\ **Note:** Do not use this function to calculate width of the string character by character, use :ref:`get_string_size` or :ref:`TextLine` instead. The height returned is the font height (see also :ref:`get_height`) and has no relation to the glyph height. +\ **Note:** Do not use this function to calculate width of the string character by character, use :ref:`get_string_size()` or :ref:`TextLine` instead. The height returned is the font height (see also :ref:`get_height()`) and has no relation to the glyph height. .. rst-class:: classref-item-separator @@ -374,7 +374,7 @@ Returns the total average font height (ascent plus descent) in pixels. Returns the size of a bounding box of a string broken into the lines, taking kerning and advance into account. -See also :ref:`draw_multiline_string`. +See also :ref:`draw_multiline_string()`. .. rst-class:: classref-item-separator @@ -434,7 +434,7 @@ Returns the spacing for the given ``type`` (see :ref:`SpacingType` **get_string_size**\ (\ text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0\ ) |const| :ref:`πŸ”—` -Returns the size of a bounding box of a single-line string, taking kerning, advance and subpixel positioning into account. See also :ref:`get_multiline_string_size` and :ref:`draw_string`. +Returns the size of a bounding box of a single-line string, taking kerning, advance and subpixel positioning into account. See also :ref:`get_multiline_string_size()` and :ref:`draw_string()`. For example, to get the string size as displayed by a single-line Label, use: @@ -452,9 +452,9 @@ For example, to get the string size as displayed by a single-line Label, use: -\ **Note:** Since kerning, advance and subpixel positioning are taken into account by :ref:`get_string_size`, using separate :ref:`get_string_size` calls on substrings of a string then adding the results together will return a different result compared to using a single :ref:`get_string_size` call on the full string. +\ **Note:** Since kerning, advance and subpixel positioning are taken into account by :ref:`get_string_size()`, using separate :ref:`get_string_size()` calls on substrings of a string then adding the results together will return a different result compared to using a single :ref:`get_string_size()` call on the full string. -\ **Note:** Real height of the string is context-dependent and can be significantly different from the value returned by :ref:`get_height`. +\ **Note:** Real height of the string is context-dependent and can be significantly different from the value returned by :ref:`get_height()`. .. rst-class:: classref-item-separator diff --git a/classes/class_fontfile.rst b/classes/class_fontfile.rst index bdb045354..e6e0082cb 100644 --- a/classes/class_fontfile.rst +++ b/classes/class_fontfile.rst @@ -656,7 +656,7 @@ Removes all font cache entries. 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. +\ **Note:** This function will not remove textures associated with the glyphs, use :ref:`remove_texture()` to remove them manually. .. rst-class:: classref-item-separator @@ -694,7 +694,7 @@ Removes all font sizes from the cache entry. Removes all textures from font cache entry. -\ **Note:** This function will not remove glyphs associated with the texture, use :ref:`remove_glyph` to remove them manually. +\ **Note:** This function will not remove glyphs associated with the texture, use :ref:`remove_glyph()` to remove them manually. .. rst-class:: classref-item-separator @@ -778,7 +778,7 @@ Returns thickness of the underline in pixels. :ref:`int` **get_char_from_glyph_index**\ (\ size\: :ref:`int`, glyph_index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns character code associated with ``glyph_index``, or ``0`` if ``glyph_index`` is invalid. See :ref:`get_glyph_index`. +Returns character code associated with ``glyph_index``, or ``0`` if ``glyph_index`` is invalid. See :ref:`get_glyph_index()`. .. rst-class:: classref-item-separator @@ -1056,7 +1056,7 @@ Returns 2D transform, applied to the font outlines, can be used for slanting, fl :ref:`Dictionary` **get_variation_coordinates**\ (\ cache_index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns variation coordinates for the specified font cache entry. See :ref:`Font.get_supported_variation_list` for more info. +Returns variation coordinates for the specified font cache entry. See :ref:`Font.get_supported_variation_list()` for more info. .. rst-class:: classref-item-separator @@ -1110,7 +1110,7 @@ Removes specified font cache entry. Removes specified 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. +\ **Note:** This function will not remove textures associated with the glyphs, use :ref:`remove_texture()` to remove them manually. .. rst-class:: classref-item-separator @@ -1172,7 +1172,7 @@ Removes specified font size from the cache entry. Removes specified texture from the cache entry. -\ **Note:** This function will not remove glyphs associated with the texture. Remove them manually using :ref:`remove_glyph`. +\ **Note:** This function will not remove glyphs associated with the texture. Remove them manually using :ref:`remove_glyph()`. .. rst-class:: classref-item-separator @@ -1390,7 +1390,7 @@ Sets kerning for the pair of glyphs. |void| **set_language_support_override**\ (\ language\: :ref:`String`, supported\: :ref:`bool`\ ) :ref:`πŸ”—` -Adds override for :ref:`Font.is_language_supported`. +Adds override for :ref:`Font.is_language_supported()`. .. rst-class:: classref-item-separator @@ -1402,7 +1402,7 @@ Adds override for :ref:`Font.is_language_supported`, supported\: :ref:`bool`\ ) :ref:`πŸ”—` -Adds override for :ref:`Font.is_script_supported`. +Adds override for :ref:`Font.is_script_supported()`. .. rst-class:: classref-item-separator @@ -1450,7 +1450,7 @@ Sets 2D transform, applied to the font outlines, can be used for slanting, flipp |void| **set_variation_coordinates**\ (\ cache_index\: :ref:`int`, variation_coordinates\: :ref:`Dictionary`\ ) :ref:`πŸ”—` -Sets variation coordinates for the specified font cache entry. See :ref:`Font.get_supported_variation_list` for more info. +Sets variation coordinates for the specified font cache entry. See :ref:`Font.get_supported_variation_list()` for more info. .. |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_fontvariation.rst b/classes/class_fontvariation.rst index bedd70043..ab1f7bc49 100644 --- a/classes/class_fontvariation.rst +++ b/classes/class_fontvariation.rst @@ -274,9 +274,9 @@ Active face index in the TrueType / OpenType collection file. Font OpenType variation coordinates. More info: `OpenType variation tags `__. -\ **Note:** This :ref:`Dictionary` uses OpenType tags as keys. Variation axes can be identified both by tags (:ref:`int`, e.g. ``0x77678674``) and names (:ref:`String`, e.g. ``wght``). Some axes might be accessible by multiple names. For example, ``wght`` refers to the same axis as ``weight``. Tags on the other hand are unique. To convert between names and tags, use :ref:`TextServer.name_to_tag` and :ref:`TextServer.tag_to_name`. +\ **Note:** This :ref:`Dictionary` uses OpenType tags as keys. Variation axes can be identified both by tags (:ref:`int`, e.g. ``0x77678674``) and names (:ref:`String`, e.g. ``wght``). Some axes might be accessible by multiple names. For example, ``wght`` refers to the same axis as ``weight``. Tags on the other hand are unique. To convert between names and tags, use :ref:`TextServer.name_to_tag()` and :ref:`TextServer.tag_to_name()`. -\ **Note:** To get available variation axes of a font, use :ref:`Font.get_supported_variation_list`. +\ **Note:** To get available variation axes of a font, use :ref:`Font.get_supported_variation_list()`. .. rst-class:: classref-item-separator diff --git a/classes/class_gdextensionmanager.rst b/classes/class_gdextensionmanager.rst index 9352a8876..f8413266f 100644 --- a/classes/class_gdextensionmanager.rst +++ b/classes/class_gdextensionmanager.rst @@ -193,7 +193,7 @@ Returns the file paths of all currently loaded extensions. :ref:`bool` **is_extension_loaded**\ (\ path\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the extension at the given file ``path`` has already been loaded successfully. See also :ref:`get_loaded_extensions`. +Returns ``true`` if the extension at the given file ``path`` has already been loaded successfully. See also :ref:`get_loaded_extensions()`. .. rst-class:: classref-item-separator diff --git a/classes/class_gdscript.rst b/classes/class_gdscript.rst index 5fbb431c2..35a9838b9 100644 --- a/classes/class_gdscript.rst +++ b/classes/class_gdscript.rst @@ -21,7 +21,7 @@ Description A script implemented in the GDScript programming language, saved with the ``.gd`` extension. The script extends the functionality of all objects that instantiate it. -Calling :ref:`new` creates a new instance of the script. :ref:`Object.set_script` extends an existing object, if that object's class matches one of the script's base classes. +Calling :ref:`new()` creates a new instance of the script. :ref:`Object.set_script()` extends an existing object, if that object's class matches one of the script's base classes. If you are looking for GDScript's built-in functions, see :ref:`@GDScript` instead. diff --git a/classes/class_geometry2d.rst b/classes/class_geometry2d.rst index 4bffcb0be..59cae1a33 100644 --- a/classes/class_geometry2d.rst +++ b/classes/class_geometry2d.rst @@ -227,7 +227,7 @@ Method Descriptions Returns the `Bresenham line `__ between the ``from`` and ``to`` points. A Bresenham line is a series of pixels that draws a line and is always 1-pixel thick on every row and column of the drawing (never more, never less). -Example code to draw a line between two :ref:`Marker2D` nodes using a series of :ref:`CanvasItem.draw_rect` calls: +Example code to draw a line between two :ref:`Marker2D` nodes using a series of :ref:`CanvasItem.draw_rect()` calls: :: @@ -247,7 +247,7 @@ Example code to draw a line between two :ref:`Marker2D` nodes us Clips ``polygon_a`` against ``polygon_b`` and returns an array of clipped polygons. This performs :ref:`OPERATION_DIFFERENCE` between polygons. Returns an empty array if ``polygon_b`` completely overlaps ``polygon_a``. -If ``polygon_b`` is enclosed by ``polygon_a``, returns an outer polygon (boundary) and inner polygon (hole) which could be distinguished by calling :ref:`is_polygon_clockwise`. +If ``polygon_b`` is enclosed by ``polygon_a``, returns an outer polygon (boundary) and inner polygon (hole) which could be distinguished by calling :ref:`is_polygon_clockwise()`. .. rst-class:: classref-item-separator @@ -295,9 +295,9 @@ Decomposes the ``polygon`` into multiple convex hulls and returns an array of :r :ref:`Array`\[:ref:`PackedVector2Array`\] **exclude_polygons**\ (\ polygon_a\: :ref:`PackedVector2Array`, polygon_b\: :ref:`PackedVector2Array`\ ) :ref:`πŸ”—` -Mutually excludes common area defined by intersection of ``polygon_a`` and ``polygon_b`` (see :ref:`intersect_polygons`) and returns an array of excluded polygons. This performs :ref:`OPERATION_XOR` between polygons. In other words, returns all but common area between polygons. +Mutually excludes common area defined by intersection of ``polygon_a`` and ``polygon_b`` (see :ref:`intersect_polygons()`) and returns an array of excluded polygons. This performs :ref:`OPERATION_XOR` between polygons. In other words, returns all but common area between polygons. -The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling :ref:`is_polygon_clockwise`. +The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling :ref:`is_polygon_clockwise()`. .. rst-class:: classref-item-separator @@ -347,7 +347,7 @@ Given the two 2D segments (``p1``, ``q1``) and (``p2``, ``q2``), finds those two Intersects ``polygon_a`` with ``polygon_b`` and returns an array of intersected polygons. This performs :ref:`OPERATION_INTERSECTION` between polygons. In other words, returns common area shared by polygons. Returns an empty array if no intersection occurs. -The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling :ref:`is_polygon_clockwise`. +The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling :ref:`is_polygon_clockwise()`. .. rst-class:: classref-item-separator @@ -468,7 +468,7 @@ Given an array of :ref:`Vector2`\ s representing tiles, builds an Merges (combines) ``polygon_a`` and ``polygon_b`` and returns an array of merged polygons. This performs :ref:`OPERATION_UNION` between polygons. -The operation may result in an outer polygon (boundary) and multiple inner polygons (holes) produced which could be distinguished by calling :ref:`is_polygon_clockwise`. +The operation may result in an outer polygon (boundary) and multiple inner polygons (holes) produced which could be distinguished by calling :ref:`is_polygon_clockwise()`. .. rst-class:: classref-item-separator @@ -484,7 +484,7 @@ Inflates or deflates ``polygon`` by ``delta`` units (pixels). If ``delta`` is po Each polygon's vertices will be rounded as determined by ``join_type``, see :ref:`PolyJoinType`. -The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling :ref:`is_polygon_clockwise`. +The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling :ref:`is_polygon_clockwise()`. \ **Note:** To translate the polygon's vertices specifically, multiply them to a :ref:`Transform2D`: @@ -523,7 +523,7 @@ Each polygon's vertices will be rounded as determined by ``join_type``, see :ref Each polygon's endpoints will be rounded as determined by ``end_type``, see :ref:`PolyEndType`. -The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling :ref:`is_polygon_clockwise`. +The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling :ref:`is_polygon_clockwise()`. .. rst-class:: classref-item-separator diff --git a/classes/class_geometryinstance3d.rst b/classes/class_geometryinstance3d.rst index 7eb7084b3..5916dcf1b 100644 --- a/classes/class_geometryinstance3d.rst +++ b/classes/class_geometryinstance3d.rst @@ -308,7 +308,7 @@ The selected shadow casting flag. See :ref:`ShadowCastingSetting`\ ) - :ref:`AABB` **get_custom_aabb**\ (\ ) -Overrides the bounding box of this node with a custom one. This can be used to avoid the expensive :ref:`AABB` recalculation that happens when a skeleton is used with a :ref:`MeshInstance3D` or to have precise control over the :ref:`MeshInstance3D`'s bounding box. To use the default AABB, set value to an :ref:`AABB` with all fields set to ``0.0``. To avoid frustum culling, set :ref:`custom_aabb` to a very large AABB that covers your entire game world such as ``AABB(-10000, -10000, -10000, 20000, 20000, 20000)``. To disable all forms of culling (including occlusion culling), call :ref:`RenderingServer.instance_set_ignore_culling` on the **GeometryInstance3D**'s :ref:`RID`. +Overrides the bounding box of this node with a custom one. This can be used to avoid the expensive :ref:`AABB` recalculation that happens when a skeleton is used with a :ref:`MeshInstance3D` or to have precise control over the :ref:`MeshInstance3D`'s bounding box. To use the default AABB, set value to an :ref:`AABB` with all fields set to ``0.0``. To avoid frustum culling, set :ref:`custom_aabb` to a very large AABB that covers your entire game world such as ``AABB(-10000, -10000, -10000, 20000, 20000, 20000)``. To disable all forms of culling (including occlusion culling), call :ref:`RenderingServer.instance_set_ignore_culling()` on the **GeometryInstance3D**'s :ref:`RID`. .. rst-class:: classref-item-separator @@ -599,7 +599,7 @@ Get the value of a shader parameter as set on this instance. |void| **set_instance_shader_parameter**\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) :ref:`πŸ”—` -Set the value of a shader uniform for this instance only (`per-instance uniform <../tutorials/shaders/shader_reference/shading_language.html#per-instance-uniforms>`__). See also :ref:`ShaderMaterial.set_shader_parameter` to assign a uniform on all instances using the same :ref:`ShaderMaterial`. +Set the value of a shader uniform for this instance only (`per-instance uniform <../tutorials/shaders/shader_reference/shading_language.html#per-instance-uniforms>`__). See also :ref:`ShaderMaterial.set_shader_parameter()` to assign a uniform on all instances using the same :ref:`ShaderMaterial`. \ **Note:** For a shader uniform to be assignable on a per-instance basis, it *must* be defined with ``instance uniform ...`` rather than ``uniform ...`` in the shader code. diff --git a/classes/class_gltfdocument.rst b/classes/class_gltfdocument.rst index 2348f72ad..c548222d5 100644 --- a/classes/class_gltfdocument.rst +++ b/classes/class_gltfdocument.rst @@ -25,7 +25,7 @@ GLTFDocument supports reading data from a glTF file, buffer, or Godot scene. Thi All of the data in a glTF scene is stored in the :ref:`GLTFState` class. GLTFDocument processes state objects, but does not contain any scene data itself. GLTFDocument has member variables to store export configuration settings such as the image format, but is otherwise stateless. Multiple scenes can be processed with the same settings using the same GLTFDocument object and different :ref:`GLTFState` objects. -GLTFDocument can be extended with arbitrary functionality by extending the :ref:`GLTFDocumentExtension` class and registering it with GLTFDocument via :ref:`register_gltf_document_extension`. This allows for custom data to be imported and exported. +GLTFDocument can be extended with arbitrary functionality by extending the :ref:`GLTFDocumentExtension` class and registering it with GLTFDocument via :ref:`register_gltf_document_extension()`. This allows for custom data to be imported and exported. .. rst-class:: classref-introduction-group @@ -202,7 +202,7 @@ Method Descriptions Takes a :ref:`PackedByteArray` defining a glTF and imports the data to the given :ref:`GLTFState` object through the ``state`` parameter. -\ **Note:** The ``base_path`` tells :ref:`append_from_buffer` where to find dependencies and can be empty. +\ **Note:** The ``base_path`` tells :ref:`append_from_buffer()` where to find dependencies and can be empty. .. rst-class:: classref-item-separator @@ -216,7 +216,7 @@ Takes a :ref:`PackedByteArray` defining a glTF and import Takes a path to a glTF file and imports the data at that file path to the given :ref:`GLTFState` object through the ``state`` parameter. -\ **Note:** The ``base_path`` tells :ref:`append_from_file` where to find dependencies and can be empty. +\ **Note:** The ``base_path`` tells :ref:`append_from_file()` where to find dependencies and can be empty. .. rst-class:: classref-item-separator @@ -240,7 +240,7 @@ Takes a Godot Engine scene node and exports it and its descendants to the given :ref:`GLTFObjectModelProperty` **export_object_model_property**\ (\ state\: :ref:`GLTFState`, node_path\: :ref:`NodePath`, godot_node\: :ref:`Node`, gltf_node_index\: :ref:`int`\ ) |static| :ref:`πŸ”—` -Determines a mapping between the given Godot ``node_path`` and the corresponding glTF Object Model JSON pointer(s) in the generated glTF file. The details of this mapping are returned in a :ref:`GLTFObjectModelProperty` object. Additional mappings can be supplied via the :ref:`GLTFDocumentExtension._import_object_model_property` callback method. +Determines a mapping between the given Godot ``node_path`` and the corresponding glTF Object Model JSON pointer(s) in the generated glTF file. The details of this mapping are returned in a :ref:`GLTFObjectModelProperty` object. Additional mappings can be supplied via the :ref:`GLTFDocumentExtension._import_object_model_property()` callback method. .. rst-class:: classref-item-separator @@ -292,7 +292,7 @@ Returns a list of all support glTF extensions, including extensions supported di :ref:`GLTFObjectModelProperty` **import_object_model_property**\ (\ state\: :ref:`GLTFState`, json_pointer\: :ref:`String`\ ) |static| :ref:`πŸ”—` -Determines a mapping between the given glTF Object Model ``json_pointer`` and the corresponding Godot node path(s) in the generated Godot scene. The details of this mapping are returned in a :ref:`GLTFObjectModelProperty` object. Additional mappings can be supplied via the :ref:`GLTFDocumentExtension._export_object_model_property` callback method. +Determines a mapping between the given glTF Object Model ``json_pointer`` and the corresponding Godot node path(s) in the generated Godot scene. The details of this mapping are returned in a :ref:`GLTFObjectModelProperty` object. Additional mappings can be supplied via the :ref:`GLTFDocumentExtension._export_object_model_property()` callback method. .. rst-class:: classref-item-separator diff --git a/classes/class_gltfdocumentextension.rst b/classes/class_gltfdocumentextension.rst index 62d5a2cff..1d83aea90 100644 --- a/classes/class_gltfdocumentextension.rst +++ b/classes/class_gltfdocumentextension.rst @@ -23,7 +23,7 @@ Description Extends the functionality of the :ref:`GLTFDocument` class by allowing you to run arbitrary code at various stages of glTF import or export. -To use, make a new class extending GLTFDocumentExtension, override any methods you need, make an instance of your class, and register it using :ref:`GLTFDocument.register_gltf_document_extension`. +To use, make a new class extending GLTFDocumentExtension, override any methods you need, make an instance of your class, and register it using :ref:`GLTFDocument.register_gltf_document_extension()`. \ **Note:** Like GLTFDocument itself, all GLTFDocumentExtension classes must be stateless in order to function properly. If you need to store data, use the ``set_additional_data`` and ``get_additional_data`` methods in :ref:`GLTFState` or :ref:`GLTFNode`. @@ -105,9 +105,9 @@ Method Descriptions |void| **_convert_scene_node**\ (\ state\: :ref:`GLTFState`, gltf_node\: :ref:`GLTFNode`, scene_node\: :ref:`Node`\ ) |virtual| :ref:`πŸ”—` -Part of the export process. This method is run after :ref:`_export_preflight` and before :ref:`_export_post_convert`. +Part of the export process. This method is run after :ref:`_export_preflight()` and before :ref:`_export_post_convert()`. -Runs when converting the data from a Godot scene node. This method can be used to process the Godot scene node data into a format that can be used by :ref:`_export_node`. +Runs when converting the data from a Godot scene node. This method can be used to process the Godot scene node data into a format that can be used by :ref:`_export_node()`. .. rst-class:: classref-item-separator @@ -119,7 +119,7 @@ Runs when converting the data from a Godot scene node. This method can be used t :ref:`Error` **_export_node**\ (\ state\: :ref:`GLTFState`, gltf_node\: :ref:`GLTFNode`, json\: :ref:`Dictionary`, node\: :ref:`Node`\ ) |virtual| :ref:`πŸ”—` -Part of the export process. This method is run after :ref:`_get_saveable_image_formats` and before :ref:`_export_post`. If this **GLTFDocumentExtension** is used for exporting images, this runs after :ref:`_serialize_texture_json`. +Part of the export process. This method is run after :ref:`_get_saveable_image_formats()` and before :ref:`_export_post()`. If this **GLTFDocumentExtension** is used for exporting images, this runs after :ref:`_serialize_texture_json()`. This method can be used to modify the final JSON of each node. Data should be primarily stored in ``gltf_node`` prior to serializing the JSON, but the original Godot :ref:`Node` is also provided if available. ``node`` may be ``null`` if not available, such as when exporting glTF data not generated from a Godot scene. @@ -135,7 +135,7 @@ This method can be used to modify the final JSON of each node. Data should be pr Part of the export process. Allows GLTFDocumentExtension classes to provide mappings for properties of nodes in the Godot scene tree, to JSON pointers to glTF properties, as defined by the glTF object model. -Returns a :ref:`GLTFObjectModelProperty` instance that defines how the property should be mapped. If your extension can't handle the property, return ``null`` or an instance without any JSON pointers (see :ref:`GLTFObjectModelProperty.has_json_pointers`). You should use :ref:`GLTFObjectModelProperty.set_types` to set the types, and set the JSON pointer(s) using the :ref:`GLTFObjectModelProperty.json_pointers` property. +Returns a :ref:`GLTFObjectModelProperty` instance that defines how the property should be mapped. If your extension can't handle the property, return ``null`` or an instance without any JSON pointers (see :ref:`GLTFObjectModelProperty.has_json_pointers()`). You should use :ref:`GLTFObjectModelProperty.set_types()` to set the types, and set the JSON pointer(s) using the :ref:`GLTFObjectModelProperty.json_pointers` property. The parameters provide context for the property, including the NodePath, the Godot node, the GLTF node index, and the target object. The ``target_object`` will be equal to ``godot_node`` if no sub-object can be found, otherwise it will point to a sub-object. For example, if the path is ``^"A/B/C/MeshInstance3D:mesh:surface_0/material:emission_intensity"``, it will get the node, then the mesh, and then the material, so ``target_object`` will be the :ref:`Material` resource, and ``target_depth`` will be 2 because 2 levels were traversed to get to the target. @@ -163,7 +163,7 @@ This method can be used to modify the final JSON of the generated glTF file. :ref:`Error` **_export_post_convert**\ (\ state\: :ref:`GLTFState`, root\: :ref:`Node`\ ) |virtual| :ref:`πŸ”—` -Part of the export process. This method is run after :ref:`_convert_scene_node` and before :ref:`_export_preserialize`. +Part of the export process. This method is run after :ref:`_convert_scene_node()` and before :ref:`_export_preserialize()`. This method can be used to modify the converted node data structures before serialization with any additional data from the scene tree. @@ -191,9 +191,9 @@ The return value is used to determine if this **GLTFDocumentExtension** instance :ref:`Error` **_export_preserialize**\ (\ state\: :ref:`GLTFState`\ ) |virtual| :ref:`πŸ”—` -Part of the export process. This method is run after :ref:`_export_post_convert` and before :ref:`_get_saveable_image_formats`. +Part of the export process. This method is run after :ref:`_export_post_convert()` and before :ref:`_get_saveable_image_formats()`. -This method can be used to alter the state before performing serialization. It runs every time when generating a buffer with :ref:`GLTFDocument.generate_buffer` or writing to the file system with :ref:`GLTFDocument.write_to_filesystem`. +This method can be used to alter the state before performing serialization. It runs every time when generating a buffer with :ref:`GLTFDocument.generate_buffer()` or writing to the file system with :ref:`GLTFDocument.write_to_filesystem()`. .. rst-class:: classref-item-separator @@ -205,7 +205,7 @@ This method can be used to alter the state before performing serialization. It r :ref:`Node3D` **_generate_scene_node**\ (\ state\: :ref:`GLTFState`, gltf_node\: :ref:`GLTFNode`, scene_parent\: :ref:`Node`\ ) |virtual| :ref:`πŸ”—` -Part of the import process. This method is run after :ref:`_import_pre_generate` and before :ref:`_import_node`. +Part of the import process. This method is run after :ref:`_import_pre_generate()` and before :ref:`_import_node()`. Runs when generating a Godot scene node from a GLTFNode. The returned node will be added to the scene tree. Multiple nodes can be generated in this step if they are added as a child of the returned node. @@ -233,9 +233,9 @@ Returns the file extension to use for saving image data into, for example, ``".p :ref:`PackedStringArray` **_get_saveable_image_formats**\ (\ ) |virtual| :ref:`πŸ”—` -Part of the export process. This method is run after :ref:`_convert_scene_node` and before :ref:`_export_node`. +Part of the export process. This method is run after :ref:`_convert_scene_node()` and before :ref:`_export_node()`. -Returns an array of the image formats that can be saved/exported by this extension. This extension will only be selected as the image exporter if the :ref:`GLTFDocument`'s :ref:`GLTFDocument.image_format` is in this array. If this **GLTFDocumentExtension** is selected as the image exporter, one of the :ref:`_save_image_at_path` or :ref:`_serialize_image_to_bytes` methods will run next, otherwise :ref:`_export_node` will run next. If the format name contains ``"Lossy"``, the lossy quality slider will be displayed. +Returns an array of the image formats that can be saved/exported by this extension. This extension will only be selected as the image exporter if the :ref:`GLTFDocument`'s :ref:`GLTFDocument.image_format` is in this array. If this **GLTFDocumentExtension** is selected as the image exporter, one of the :ref:`_save_image_at_path()` or :ref:`_serialize_image_to_bytes()` methods will run next, otherwise :ref:`_export_node()` will run next. If the format name contains ``"Lossy"``, the lossy quality slider will be displayed. .. rst-class:: classref-item-separator @@ -247,7 +247,7 @@ Returns an array of the image formats that can be saved/exported by this extensi :ref:`PackedStringArray` **_get_supported_extensions**\ (\ ) |virtual| :ref:`πŸ”—` -Part of the import process. This method is run after :ref:`_import_preflight` and before :ref:`_parse_node_extensions`. +Part of the import process. This method is run after :ref:`_import_preflight()` and before :ref:`_parse_node_extensions()`. Returns an array of the glTF extensions supported by this GLTFDocumentExtension class. This is used to validate if a glTF file with required extensions can be loaded. @@ -261,7 +261,7 @@ Returns an array of the glTF extensions supported by this GLTFDocumentExtension :ref:`Error` **_import_node**\ (\ state\: :ref:`GLTFState`, gltf_node\: :ref:`GLTFNode`, json\: :ref:`Dictionary`, node\: :ref:`Node`\ ) |virtual| :ref:`πŸ”—` -Part of the import process. This method is run after :ref:`_generate_scene_node` and before :ref:`_import_post`. +Part of the import process. This method is run after :ref:`_generate_scene_node()` and before :ref:`_import_post()`. This method can be used to make modifications to each of the generated Godot scene nodes. @@ -277,7 +277,7 @@ This method can be used to make modifications to each of the generated Godot sce Part of the import process. Allows GLTFDocumentExtension classes to provide mappings for JSON pointers to glTF properties, as defined by the glTF object model, to properties of nodes in the Godot scene tree. -Returns a :ref:`GLTFObjectModelProperty` instance that defines how the property should be mapped. If your extension can't handle the property, return ``null`` or an instance without any NodePaths (see :ref:`GLTFObjectModelProperty.has_node_paths`). You should use :ref:`GLTFObjectModelProperty.set_types` to set the types, and :ref:`GLTFObjectModelProperty.append_path_to_property` function is useful for most simple cases. +Returns a :ref:`GLTFObjectModelProperty` instance that defines how the property should be mapped. If your extension can't handle the property, return ``null`` or an instance without any NodePaths (see :ref:`GLTFObjectModelProperty.has_node_paths()`). You should use :ref:`GLTFObjectModelProperty.set_types()` to set the types, and :ref:`GLTFObjectModelProperty.append_path_to_property()` function is useful for most simple cases. In many cases, ``partial_paths`` will contain the start of a path, allowing the extension to complete the path. For example, for ``/nodes/3/extensions/MY_ext/prop``, Godot will pass you a NodePath that leads to node 3, so the GLTFDocumentExtension class only needs to resolve the last ``MY_ext/prop`` part of the path. In this example, the extension should check ``split.size() > 4 and split[0] == "nodes" and split[2] == "extensions" and split[3] == "MY_ext"`` at the start of the function to check if this JSON pointer applies to it, then it can use ``partial_paths`` and handle ``split[4]``. @@ -305,7 +305,7 @@ This method can be used to modify the final Godot scene generated by the import :ref:`Error` **_import_post_parse**\ (\ state\: :ref:`GLTFState`\ ) |virtual| :ref:`πŸ”—` -Part of the import process. This method is run after :ref:`_parse_node_extensions` and before :ref:`_import_pre_generate`. +Part of the import process. This method is run after :ref:`_parse_node_extensions()` and before :ref:`_import_pre_generate()`. This method can be used to modify any of the data imported so far after parsing each node, but before generating the scene or any of its nodes. @@ -319,7 +319,7 @@ This method can be used to modify any of the data imported so far after parsing :ref:`Error` **_import_pre_generate**\ (\ state\: :ref:`GLTFState`\ ) |virtual| :ref:`πŸ”—` -Part of the import process. This method is run after :ref:`_import_post_parse` and before :ref:`_generate_scene_node`. +Part of the import process. This method is run after :ref:`_import_post_parse()` and before :ref:`_generate_scene_node()`. This method can be used to modify or read from any of the processed data structures, before generating the nodes and then running the final per-node import step. @@ -347,7 +347,7 @@ The return value is used to determine if this **GLTFDocumentExtension** instance :ref:`Error` **_parse_image_data**\ (\ state\: :ref:`GLTFState`, image_data\: :ref:`PackedByteArray`, mime_type\: :ref:`String`, ret_image\: :ref:`Image`\ ) |virtual| :ref:`πŸ”—` -Part of the import process. This method is run after :ref:`_parse_node_extensions` and before :ref:`_parse_texture_json`. +Part of the import process. This method is run after :ref:`_parse_node_extensions()` and before :ref:`_parse_texture_json()`. Runs when parsing image data from a glTF file. The data could be sourced from a separate file, a URI, or a buffer, and then is passed as a byte array. @@ -361,9 +361,9 @@ Runs when parsing image data from a glTF file. The data could be sourced from a :ref:`Error` **_parse_node_extensions**\ (\ state\: :ref:`GLTFState`, gltf_node\: :ref:`GLTFNode`, extensions\: :ref:`Dictionary`\ ) |virtual| :ref:`πŸ”—` -Part of the import process. This method is run after :ref:`_get_supported_extensions` and before :ref:`_import_post_parse`. +Part of the import process. This method is run after :ref:`_get_supported_extensions()` and before :ref:`_import_post_parse()`. -Runs when parsing the node extensions of a GLTFNode. This method can be used to process the extension JSON data into a format that can be used by :ref:`_generate_scene_node`. The return value should be a member of the :ref:`Error` enum. +Runs when parsing the node extensions of a GLTFNode. This method can be used to process the extension JSON data into a format that can be used by :ref:`_generate_scene_node()`. The return value should be a member of the :ref:`Error` enum. .. rst-class:: classref-item-separator @@ -375,7 +375,7 @@ Runs when parsing the node extensions of a GLTFNode. This method can be used to :ref:`Error` **_parse_texture_json**\ (\ state\: :ref:`GLTFState`, texture_json\: :ref:`Dictionary`, ret_gltf_texture\: :ref:`GLTFTexture`\ ) |virtual| :ref:`πŸ”—` -Part of the import process. This method is run after :ref:`_parse_image_data` and before :ref:`_generate_scene_node`. +Part of the import process. This method is run after :ref:`_parse_image_data()` and before :ref:`_generate_scene_node()`. Runs when parsing the texture JSON from the glTF textures array. This can be used to set the source image index to use as the texture. @@ -389,9 +389,9 @@ Runs when parsing the texture JSON from the glTF textures array. This can be use :ref:`Error` **_save_image_at_path**\ (\ state\: :ref:`GLTFState`, image\: :ref:`Image`, file_path\: :ref:`String`, image_format\: :ref:`String`, lossy_quality\: :ref:`float`\ ) |virtual| :ref:`πŸ”—` -Part of the export process. This method is run after :ref:`_get_saveable_image_formats` and before :ref:`_serialize_texture_json`. +Part of the export process. This method is run after :ref:`_get_saveable_image_formats()` and before :ref:`_serialize_texture_json()`. -This method is run when saving images separately from the glTF file. When images are embedded, :ref:`_serialize_image_to_bytes` runs instead. Note that these methods only run when this **GLTFDocumentExtension** is selected as the image exporter. +This method is run when saving images separately from the glTF file. When images are embedded, :ref:`_serialize_image_to_bytes()` runs instead. Note that these methods only run when this **GLTFDocumentExtension** is selected as the image exporter. .. rst-class:: classref-item-separator @@ -403,9 +403,9 @@ This method is run when saving images separately from the glTF file. When images :ref:`PackedByteArray` **_serialize_image_to_bytes**\ (\ state\: :ref:`GLTFState`, image\: :ref:`Image`, image_dict\: :ref:`Dictionary`, image_format\: :ref:`String`, lossy_quality\: :ref:`float`\ ) |virtual| :ref:`πŸ”—` -Part of the export process. This method is run after :ref:`_get_saveable_image_formats` and before :ref:`_serialize_texture_json`. +Part of the export process. This method is run after :ref:`_get_saveable_image_formats()` and before :ref:`_serialize_texture_json()`. -This method is run when embedding images in the glTF file. When images are saved separately, :ref:`_save_image_at_path` runs instead. Note that these methods only run when this **GLTFDocumentExtension** is selected as the image exporter. +This method is run when embedding images in the glTF file. When images are saved separately, :ref:`_save_image_at_path()` runs instead. Note that these methods only run when this **GLTFDocumentExtension** is selected as the image exporter. This method must set the image MIME type in the ``image_dict`` with the ``"mimeType"`` key. For example, for a PNG image, it would be set to ``"image/png"``. The return value must be a :ref:`PackedByteArray` containing the image data. @@ -419,9 +419,9 @@ This method must set the image MIME type in the ``image_dict`` with the ``"mimeT :ref:`Error` **_serialize_texture_json**\ (\ state\: :ref:`GLTFState`, texture_json\: :ref:`Dictionary`, gltf_texture\: :ref:`GLTFTexture`, image_format\: :ref:`String`\ ) |virtual| :ref:`πŸ”—` -Part of the export process. This method is run after :ref:`_save_image_at_path` or :ref:`_serialize_image_to_bytes`, and before :ref:`_export_node`. Note that this method only runs when this **GLTFDocumentExtension** is selected as the image exporter. +Part of the export process. This method is run after :ref:`_save_image_at_path()` or :ref:`_serialize_image_to_bytes()`, and before :ref:`_export_node()`. Note that this method only runs when this **GLTFDocumentExtension** is selected as the image exporter. -This method can be used to set up the extensions for the texture JSON by editing ``texture_json``. The extension must also be added as used extension with :ref:`GLTFState.add_used_extension`, be sure to set ``required`` to ``true`` if you are not providing a fallback. +This method can be used to set up the extensions for the texture JSON by editing ``texture_json``. The extension must also be added as used extension with :ref:`GLTFState.add_used_extension()`, be sure to set ``required`` to ``true`` if you are not providing a fallback. .. |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_gltfnode.rst b/classes/class_gltfnode.rst index cf87ac834..6cf3687bb 100644 --- a/classes/class_gltfnode.rst +++ b/classes/class_gltfnode.rst @@ -21,7 +21,7 @@ Description Represents a glTF node. glTF nodes may have names, transforms, children (other glTF nodes), and more specialized properties (represented by their own classes). -glTF nodes generally exist inside of :ref:`GLTFState` which represents all data of a glTF file. Most of GLTFNode's properties are indices of other data in the glTF file. You can extend a glTF node with additional properties by using :ref:`get_additional_data` and :ref:`set_additional_data`. +glTF nodes generally exist inside of :ref:`GLTFState` which represents all data of a glTF file. Most of GLTFNode's properties are indices of other data in the glTF file. You can extend a glTF node with additional properties by using :ref:`get_additional_data()` and :ref:`set_additional_data()`. .. rst-class:: classref-introduction-group diff --git a/classes/class_gltfobjectmodelproperty.rst b/classes/class_gltfobjectmodelproperty.rst index 29e0808bc..df372ec31 100644 --- a/classes/class_gltfobjectmodelproperty.rst +++ b/classes/class_gltfobjectmodelproperty.rst @@ -252,7 +252,7 @@ The glTF object model JSON pointers used to identify the property in the glTF ob - |void| **set_node_paths**\ (\ value\: :ref:`Array`\[:ref:`NodePath`\]\ ) - :ref:`Array`\[:ref:`NodePath`\] **get_node_paths**\ (\ ) -An array of :ref:`NodePath`\ s that point to a property, or multiple properties, in the Godot scene tree. On import, this will either be set by :ref:`GLTFDocument`, or by a :ref:`GLTFDocumentExtension` class. For simple cases, use :ref:`append_path_to_property` to add properties to this array. +An array of :ref:`NodePath`\ s that point to a property, or multiple properties, in the Godot scene tree. On import, this will either be set by :ref:`GLTFDocument`, or by a :ref:`GLTFDocumentExtension` class. For simple cases, use :ref:`append_path_to_property()` to add properties to this array. In most cases :ref:`node_paths` will only have one item, but in some cases a single glTF JSON pointer will map to multiple Godot properties. For example, a :ref:`GLTFCamera` or :ref:`GLTFLight` used on multiple glTF nodes will be represented by multiple Godot nodes. @@ -305,7 +305,7 @@ Method Descriptions |void| **append_node_path**\ (\ node_path\: :ref:`NodePath`\ ) :ref:`πŸ”—` -Appends a :ref:`NodePath` to :ref:`node_paths`. This can be used by :ref:`GLTFDocumentExtension` classes to define how a glTF object model property maps to a Godot property, or multiple Godot properties. Prefer using :ref:`append_path_to_property` for simple cases. Be sure to also call :ref:`set_types` once (the order does not matter). +Appends a :ref:`NodePath` to :ref:`node_paths`. This can be used by :ref:`GLTFDocumentExtension` classes to define how a glTF object model property maps to a Godot property, or multiple Godot properties. Prefer using :ref:`append_path_to_property()` for simple cases. Be sure to also call :ref:`set_types()` once (the order does not matter). .. rst-class:: classref-item-separator @@ -317,7 +317,7 @@ Appends a :ref:`NodePath` to :ref:`node_paths`, prop_name\: :ref:`StringName`\ ) :ref:`πŸ”—` -High-level wrapper over :ref:`append_node_path` that handles the most common cases. It constructs a new :ref:`NodePath` using ``node_path`` as a base and appends ``prop_name`` to the subpath. Be sure to also call :ref:`set_types` once (the order does not matter). +High-level wrapper over :ref:`append_node_path()` that handles the most common cases. It constructs a new :ref:`NodePath` using ``node_path`` as a base and appends ``prop_name`` to the subpath. Be sure to also call :ref:`set_types()` once (the order does not matter). .. rst-class:: classref-item-separator diff --git a/classes/class_gltfphysicsshape.rst b/classes/class_gltfphysicsshape.rst index fae4b8bd8..1556aa4f5 100644 --- a/classes/class_gltfphysicsshape.rst +++ b/classes/class_gltfphysicsshape.rst @@ -134,7 +134,7 @@ The :ref:`ImporterMesh` resource of the shape. This is only If ``true``, indicates that this shape is a trigger. For Godot, this means that the shape should be a child of an Area3D node. -This is the only variable not used in the :ref:`to_node` method, it's intended to be used alongside when deciding where to add the generated node as a child. +This is the only variable not used in the :ref:`to_node()` method, it's intended to be used alongside when deciding where to add the generated node as a child. .. rst-class:: classref-item-separator diff --git a/classes/class_gltfstate.rst b/classes/class_gltfstate.rst index f59cc2ab0..b88dba95d 100644 --- a/classes/class_gltfstate.rst +++ b/classes/class_gltfstate.rst @@ -477,7 +477,7 @@ Method Descriptions |void| **add_used_extension**\ (\ extension_name\: :ref:`String`, required\: :ref:`bool`\ ) :ref:`πŸ”—` -Appends an extension to the list of extensions used by this glTF file during serialization. If ``required`` is ``true``, the extension will also be added to the list of required extensions. Do not run this in :ref:`GLTFDocumentExtension._export_post`, as that stage is too late to add extensions. The final list is sorted alphabetically. +Appends an extension to the list of extensions used by this glTF file during serialization. If ``required`` is ``true``, the extension will also be added to the list of required extensions. Do not run this in :ref:`GLTFDocumentExtension._export_post()`, as that stage is too late to add extensions. The final list is sorted alphabetically. .. rst-class:: classref-item-separator @@ -501,7 +501,7 @@ Appends the given byte array data to the buffers and creates a :ref:`GLTFBufferV :ref:`int` **append_gltf_node**\ (\ gltf_node\: :ref:`GLTFNode`, godot_scene_node\: :ref:`Node`, parent_node_index\: :ref:`int`\ ) :ref:`πŸ”—` -Append the given :ref:`GLTFNode` to the state, and return its new index. This can be used to export one Godot node as multiple glTF nodes, or inject new glTF nodes at import time. On import, this must be called before :ref:`GLTFDocumentExtension._generate_scene_node` finishes for the parent node. On export, this must be called before :ref:`GLTFDocumentExtension._export_node` runs for the parent node. +Append the given :ref:`GLTFNode` to the state, and return its new index. This can be used to export one Godot node as multiple glTF nodes, or inject new glTF nodes at import time. On import, this must be called before :ref:`GLTFDocumentExtension._generate_scene_node()` finishes for the parent node. On export, this must be called before :ref:`GLTFDocumentExtension._export_node()` runs for the parent node. The ``godot_scene_node`` parameter is the Godot scene node that corresponds to this glTF node. This is highly recommended to be set to a valid node, but may be ``null`` if there is no corresponding Godot scene node. One Godot scene node may be used for multiple glTF nodes, so if exporting multiple glTF nodes for one Godot scene node, use the same Godot scene node for each. @@ -671,7 +671,7 @@ Returns an array of all :ref:`GLTFMesh`\ es in the glTF file. Th :ref:`int` **get_node_index**\ (\ scene_node\: :ref:`Node`\ ) :ref:`πŸ”—` -Returns the index of the :ref:`GLTFNode` corresponding to this Godot scene node. This is the inverse of :ref:`get_scene_node`. Useful during the export process. +Returns the index of the :ref:`GLTFNode` corresponding to this Godot scene node. This is the inverse of :ref:`get_scene_node()`. Useful during the export process. \ **Note:** Not every Godot scene node will have a corresponding :ref:`GLTFNode`, and not every :ref:`GLTFNode` will have a scene node generated. If there is no :ref:`GLTFNode` index for this scene node, ``-1`` is returned. @@ -697,7 +697,7 @@ Returns an array of all :ref:`GLTFNode`\ s in the glTF file. The :ref:`Node` **get_scene_node**\ (\ idx\: :ref:`int`\ ) :ref:`πŸ”—` -Returns the Godot scene node that corresponds to the same index as the :ref:`GLTFNode` it was generated from. This is the inverse of :ref:`get_node_index`. Useful during the import process. +Returns the Godot scene node that corresponds to the same index as the :ref:`GLTFNode` it was generated from. This is the inverse of :ref:`get_node_index()`. Useful during the import process. \ **Note:** Not every :ref:`GLTFNode` will have a scene node generated, and not every generated scene node will have a corresponding :ref:`GLTFNode`. If there is no scene node for this :ref:`GLTFNode` index, ``null`` is returned. diff --git a/classes/class_gltftexture.rst b/classes/class_gltftexture.rst index 5dff76977..b78175b38 100644 --- a/classes/class_gltftexture.rst +++ b/classes/class_gltftexture.rst @@ -72,7 +72,7 @@ ID of the texture sampler to use when sampling the image. If -1, then the defaul - |void| **set_src_image**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_src_image**\ (\ ) -The index of the image associated with this texture, see :ref:`GLTFState.get_images`. If -1, then this texture does not have an image assigned. +The index of the image associated with this texture, see :ref:`GLTFState.get_images()`. If -1, then this texture does not have an image assigned. .. |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_gpuparticles2d.rst b/classes/class_gpuparticles2d.rst index 309a269a6..68bb8cd8c 100644 --- a/classes/class_gpuparticles2d.rst +++ b/classes/class_gpuparticles2d.rst @@ -133,11 +133,11 @@ Signals **finished**\ (\ ) :ref:`πŸ”—` -Emitted when all active particles have finished processing. To immediately restart the emission cycle, call :ref:`restart`. +Emitted when all active particles have finished processing. To immediately restart the emission cycle, call :ref:`restart()`. This signal is 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`. +\ **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 @@ -326,7 +326,7 @@ If ``true``, particles are being emitted. :ref:`emitting` 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`. +\ **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 @@ -742,7 +742,7 @@ Emits a single particle. Whether ``xform``, ``velocity``, ``color`` and ``custom The default ParticleProcessMaterial will overwrite ``color`` and use the contents of ``custom`` as ``(rotation, age, animation, lifetime)``. -\ **Note:** :ref:`emit_particle` is only supported on the Forward+ and Mobile rendering methods, not Compatibility. +\ **Note:** :ref:`emit_particle()` is only supported on the Forward+ and Mobile rendering methods, not Compatibility. .. rst-class:: classref-item-separator @@ -756,7 +756,7 @@ The default ParticleProcessMaterial will overwrite ``color`` and use the content Requests the particles to process for extra process time during a single frame. -Useful for particle playback, if used in combination with :ref:`use_fixed_seed` or by calling :ref:`restart` with parameter ``keep_seed`` set to ``true``. +Useful for particle playback, if used in combination with :ref:`use_fixed_seed` or by calling :ref:`restart()` with parameter ``keep_seed`` set to ``true``. .. rst-class:: classref-item-separator diff --git a/classes/class_gpuparticles3d.rst b/classes/class_gpuparticles3d.rst index 3432198ac..d7d5e253b 100644 --- a/classes/class_gpuparticles3d.rst +++ b/classes/class_gpuparticles3d.rst @@ -143,11 +143,11 @@ Signals **finished**\ (\ ) :ref:`πŸ”—` -Emitted when all active particles have finished processing. To immediately restart the emission cycle, call :ref:`restart`. +Emitted when all active particles have finished processing. To immediately restart the emission cycle, call :ref:`restart()`. This signal is 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`. +\ **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 @@ -525,7 +525,7 @@ If ``true``, particles are being emitted. :ref:`emitting` 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`. +\ **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 @@ -909,7 +909,7 @@ Emits a single particle. Whether ``xform``, ``velocity``, ``color`` and ``custom The default ParticleProcessMaterial will overwrite ``color`` and use the contents of ``custom`` as ``(rotation, age, animation, lifetime)``. -\ **Note:** :ref:`emit_particle` is only supported on the Forward+ and Mobile rendering methods, not Compatibility. +\ **Note:** :ref:`emit_particle()` is only supported on the Forward+ and Mobile rendering methods, not Compatibility. .. rst-class:: classref-item-separator @@ -935,7 +935,7 @@ Returns the :ref:`Mesh` that is drawn at index ``pass``. Requests the particles to process for extra process time during a single frame. -Useful for particle playback, if used in combination with :ref:`use_fixed_seed` or by calling :ref:`restart` with parameter ``keep_seed`` set to ``true``. +Useful for particle playback, if used in combination with :ref:`use_fixed_seed` or by calling :ref:`restart()` with parameter ``keep_seed`` set to ``true``. .. rst-class:: classref-item-separator diff --git a/classes/class_gpuparticlescollisionheightfield3d.rst b/classes/class_gpuparticlescollisionheightfield3d.rst index d6599d0da..bc087a530 100644 --- a/classes/class_gpuparticlescollisionheightfield3d.rst +++ b/classes/class_gpuparticlescollisionheightfield3d.rst @@ -150,7 +150,7 @@ enum **UpdateMode**: :ref:`πŸ”—` **UPDATE_MODE_WHEN_MOVED** = ``0`` -Only update the heightmap when the **GPUParticlesCollisionHeightField3D** node is moved, or when the camera moves if :ref:`follow_camera_enabled` is ``true``. An update can be forced by slightly moving the **GPUParticlesCollisionHeightField3D** in any direction, or by calling :ref:`RenderingServer.particles_collision_height_field_update`. +Only update the heightmap when the **GPUParticlesCollisionHeightField3D** node is moved, or when the camera moves if :ref:`follow_camera_enabled` is ``true``. An update can be forced by slightly moving the **GPUParticlesCollisionHeightField3D** in any direction, or by calling :ref:`RenderingServer.particles_collision_height_field_update()`. .. _class_GPUParticlesCollisionHeightField3D_constant_UPDATE_MODE_ALWAYS: @@ -203,7 +203,7 @@ The visual layers to account for when updating the heightmap. Only :ref:`MeshIns \ **Note:** Since the :ref:`heightfield_mask` allows for 32 layers to be stored in total, there are an additional 12 layers that are only used internally by the engine and aren't exposed in the editor. Setting :ref:`heightfield_mask` using a script allows you to toggle those reserved layers, which can be useful for editor plugins. -To adjust :ref:`heightfield_mask` more easily using a script, use :ref:`get_heightfield_mask_value` and :ref:`set_heightfield_mask_value`. +To adjust :ref:`heightfield_mask` more easily using a script, use :ref:`get_heightfield_mask_value()` and :ref:`set_heightfield_mask_value()`. .. rst-class:: classref-item-separator diff --git a/classes/class_gradient.rst b/classes/class_gradient.rst index b1e63e6dd..642aab834 100644 --- a/classes/class_gradient.rst +++ b/classes/class_gradient.rst @@ -164,7 +164,7 @@ Property Descriptions Gradient's colors as a :ref:`PackedColorArray`. -\ **Note:** Setting this property updates all colors at once. To update any color individually use :ref:`set_color`. +\ **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. @@ -221,7 +221,7 @@ The algorithm used to interpolate between points of the gradient. See :ref:`Inte 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:** Setting this property updates all offsets at once. To update any offset individually use :ref:`set_offset()`. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedFloat32Array` for more details. diff --git a/classes/class_graphedit.rst b/classes/class_graphedit.rst index 727da1f5d..47c308129 100644 --- a/classes/class_graphedit.rst +++ b/classes/class_graphedit.rst @@ -27,7 +27,7 @@ Description \ **Performance:** It is greatly advised to enable low-processor usage mode (see :ref:`OS.low_processor_usage_mode`) when using GraphEdits. -\ **Note:** Keep in mind that :ref:`Node.get_children` will also return the connection layer node named ``_connection_layer`` due to technical limitations. This behavior may change in future releases. +\ **Note:** Keep in mind that :ref:`Node.get_children()` will also return the connection layer node named ``_connection_layer`` due to technical limitations. This behavior may change in future releases. .. rst-class:: classref-reftable-group @@ -366,7 +366,7 @@ Emitted at the end of a :ref:`GraphElement`'s movement. .. rst-class:: classref-signal -**frame_rect_changed**\ (\ frame\: :ref:`GraphFrame`, new_rect\: :ref:`Vector2`\ ) :ref:`πŸ”—` +**frame_rect_changed**\ (\ frame\: :ref:`GraphFrame`, new_rect\: :ref:`Rect2`\ ) :ref:`πŸ”—` Emitted when the :ref:`GraphFrame` ``frame`` is resized to ``new_rect``. @@ -957,7 +957,7 @@ Virtual method which can be overridden to customize how connections are drawn. Returns whether the ``mouse_position`` is in the input hot zone. -By default, a hot zone is a :ref:`Rect2` positioned such that its center is at ``in_node``.\ :ref:`GraphNode.get_input_port_position`\ (``in_port``) (For output's case, call :ref:`GraphNode.get_output_port_position` instead). The hot zone's width is twice the Theme Property ``port_grab_distance_horizontal``, and its height is twice the ``port_grab_distance_vertical``. +By default, a hot zone is a :ref:`Rect2` positioned such that its center is at ``in_node``.\ :ref:`GraphNode.get_input_port_position()`\ (``in_port``) (For output's case, call :ref:`GraphNode.get_output_port_position()` instead). The hot zone's width is twice the Theme Property ``port_grab_distance_horizontal``, and its height is twice the ``port_grab_distance_vertical``. Below is a sample code to help get started: @@ -980,7 +980,7 @@ Below is a sample code to help get started: :ref:`bool` **_is_in_output_hotzone**\ (\ in_node\: :ref:`Object`, in_port\: :ref:`int`, mouse_position\: :ref:`Vector2`\ ) |virtual| :ref:`πŸ”—` -Returns whether the ``mouse_position`` is in the output hot zone. For more information on hot zones, see :ref:`_is_in_input_hotzone`. +Returns whether the ``mouse_position`` is in the output hot zone. For more information on hot zones, see :ref:`_is_in_input_hotzone()`. Below is a sample code to help get started: @@ -1036,9 +1036,9 @@ In this example a connection to same node is suppressed: |void| **add_valid_connection_type**\ (\ from_type\: :ref:`int`, to_type\: :ref:`int`\ ) :ref:`πŸ”—` -Allows the connection between two different port types. The port type is defined individually for the left and the right port of each slot with the :ref:`GraphNode.set_slot` method. +Allows the connection between two different port types. The port type is defined individually for the left and the right port of each slot with the :ref:`GraphNode.set_slot()` method. -See also :ref:`is_valid_connection_type` and :ref:`remove_valid_connection_type`. +See also :ref:`is_valid_connection_type()` and :ref:`remove_valid_connection_type()`. .. rst-class:: classref-item-separator @@ -1050,7 +1050,7 @@ See also :ref:`is_valid_connection_type`\ ) :ref:`πŸ”—` -Allows to disconnect nodes when dragging from the left port of the :ref:`GraphNode`'s slot if it has the specified type. See also :ref:`remove_valid_left_disconnect_type`. +Allows to disconnect nodes when dragging from the left port of the :ref:`GraphNode`'s slot if it has the specified type. See also :ref:`remove_valid_left_disconnect_type()`. .. rst-class:: classref-item-separator @@ -1062,7 +1062,7 @@ Allows to disconnect nodes when dragging from the left port of the :ref:`GraphNo |void| **add_valid_right_disconnect_type**\ (\ type\: :ref:`int`\ ) :ref:`πŸ”—` -Allows to disconnect nodes when dragging from the right port of the :ref:`GraphNode`'s slot if it has the specified type. See also :ref:`remove_valid_right_disconnect_type`. +Allows to disconnect nodes when dragging from the right port of the :ref:`GraphNode`'s slot if it has the specified type. See also :ref:`remove_valid_right_disconnect_type()`. .. rst-class:: classref-item-separator @@ -1297,9 +1297,9 @@ Returns ``true`` if the ``from_port`` of the ``from_node`` :ref:`GraphNode` **is_valid_connection_type**\ (\ from_type\: :ref:`int`, to_type\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns whether it's possible to make a connection between two different port types. The port type is defined individually for the left and the right port of each slot with the :ref:`GraphNode.set_slot` method. +Returns whether it's possible to make a connection between two different port types. The port type is defined individually for the left and the right port of each slot with the :ref:`GraphNode.set_slot()` method. -See also :ref:`add_valid_connection_type` and :ref:`remove_valid_connection_type`. +See also :ref:`add_valid_connection_type()` and :ref:`remove_valid_connection_type()`. .. rst-class:: classref-item-separator @@ -1311,9 +1311,9 @@ See also :ref:`add_valid_connection_type`, to_type\: :ref:`int`\ ) :ref:`πŸ”—` -Disallows the connection between two different port types previously allowed by :ref:`add_valid_connection_type`. The port type is defined individually for the left and the right port of each slot with the :ref:`GraphNode.set_slot` method. +Disallows the connection between two different port types previously allowed by :ref:`add_valid_connection_type()`. The port type is defined individually for the left and the right port of each slot with the :ref:`GraphNode.set_slot()` method. -See also :ref:`is_valid_connection_type`. +See also :ref:`is_valid_connection_type()`. .. rst-class:: classref-item-separator @@ -1325,7 +1325,7 @@ See also :ref:`is_valid_connection_type`\ ) :ref:`πŸ”—` -Disallows to disconnect nodes when dragging from the left port of the :ref:`GraphNode`'s slot if it has the specified type. Use this to disable disconnection previously allowed with :ref:`add_valid_left_disconnect_type`. +Disallows to disconnect nodes when dragging from the left port of the :ref:`GraphNode`'s slot if it has the specified type. Use this to disable disconnection previously allowed with :ref:`add_valid_left_disconnect_type()`. .. rst-class:: classref-item-separator @@ -1337,7 +1337,7 @@ Disallows to disconnect nodes when dragging from the left port of the :ref:`Grap |void| **remove_valid_right_disconnect_type**\ (\ type\: :ref:`int`\ ) :ref:`πŸ”—` -Disallows to disconnect nodes when dragging from the right port of the :ref:`GraphNode`'s slot if it has the specified type. Use this to disable disconnection previously allowed with :ref:`add_valid_right_disconnect_type`. +Disallows to disconnect nodes when dragging from the right port of the :ref:`GraphNode`'s slot if it has the specified type. Use this to disable disconnection previously allowed with :ref:`add_valid_right_disconnect_type()`. .. rst-class:: classref-item-separator @@ -1378,7 +1378,7 @@ Theme Property Descriptions :ref:`Color` **activity** = ``Color(1, 1, 1, 1)`` :ref:`πŸ”—` -Color the connection line is interpolated to based on the activity value of a connection (see :ref:`set_connection_activity`). +Color the connection line is interpolated to based on the activity value of a connection (see :ref:`set_connection_activity()`). .. rst-class:: classref-item-separator diff --git a/classes/class_graphnode.rst b/classes/class_graphnode.rst index 951292d61..1aaae7773 100644 --- a/classes/class_graphnode.rst +++ b/classes/class_graphnode.rst @@ -27,7 +27,7 @@ Each **GraphNode** slot is defined by its index and can provide the node with up Slots can be configured in the Inspector dock once you add at least one child :ref:`Control`. The properties are grouped by each slot's index in the "Slot" section. -\ **Note:** While GraphNode is set up using slots and slot indices, connections are made between the ports which are enabled. Because of that :ref:`GraphEdit` uses the port's index and not the slot's index. You can use :ref:`get_input_port_slot` and :ref:`get_output_port_slot` to get the slot index from the port index. +\ **Note:** While GraphNode is set up using slots and slot indices, connections are made between the ports which are enabled. Because of that :ref:`GraphEdit` uses the port's index and not the slot's index. You can use :ref:`get_input_port_slot()` and :ref:`get_output_port_slot()` to get the slot index from the port index. .. rst-class:: classref-reftable-group @@ -502,7 +502,7 @@ Sets properties of the slot with the given ``slot_index``. If ``enable_left_port``/``enable_right_port`` is ``true``, a port will appear and the slot will be able to be connected from this side. -With ``type_left``/``type_right`` an arbitrary type can be assigned to each port. Two ports can be connected if they share the same type, or if the connection between their types is allowed in the parent :ref:`GraphEdit` (see :ref:`GraphEdit.add_valid_connection_type`). Keep in mind that the :ref:`GraphEdit` has the final say in accepting the connection. Type compatibility simply allows the :ref:`GraphEdit.connection_request` signal to be emitted. +With ``type_left``/``type_right`` an arbitrary type can be assigned to each port. Two ports can be connected if they share the same type, or if the connection between their types is allowed in the parent :ref:`GraphEdit` (see :ref:`GraphEdit.add_valid_connection_type()`). Keep in mind that the :ref:`GraphEdit` has the final say in accepting the connection. Type compatibility simply allows the :ref:`GraphEdit.connection_request` signal to be emitted. Ports can be further customized using ``color_left``/``color_right`` and ``custom_icon_left``/``custom_icon_right``. The color parameter adds a tint to the icon. The custom icon can be used to override the default port dot. diff --git a/classes/class_gridmap.rst b/classes/class_gridmap.rst index a5da99154..77653e168 100644 --- a/classes/class_gridmap.rst +++ b/classes/class_gridmap.rst @@ -177,7 +177,7 @@ Constants **INVALID_CELL_ITEM** = ``-1`` :ref:`πŸ”—` -Invalid cell item that can be used in :ref:`set_cell_item` to clear cells (or represent an empty cell in :ref:`get_cell_item`). +Invalid cell item that can be used in :ref:`set_cell_item()` to clear cells (or represent an empty cell in :ref:`get_cell_item()`). .. rst-class:: classref-section-separator @@ -421,7 +421,7 @@ Clear all cells. |void| **clear_baked_meshes**\ (\ ) :ref:`πŸ”—` -Clears all baked meshes. See :ref:`make_baked_meshes`. +Clears all baked meshes. See :ref:`make_baked_meshes()`. .. rst-class:: classref-item-separator @@ -591,7 +591,7 @@ Returns an array of all cells with the given item index specified in ``item``. :ref:`Vector3i` **local_to_map**\ (\ local_position\: :ref:`Vector3`\ ) |const| :ref:`πŸ”—` -Returns the map coordinates of the cell containing the given ``local_position``. If ``local_position`` is in global coordinates, consider using :ref:`Node3D.to_local` before passing it to this method. See also :ref:`map_to_local`. +Returns the map coordinates of the cell containing the given ``local_position``. If ``local_position`` is in global coordinates, consider using :ref:`Node3D.to_local()` before passing it to this method. See also :ref:`map_to_local()`. .. rst-class:: classref-item-separator @@ -615,7 +615,7 @@ Bakes lightmap data for all meshes in the assigned :ref:`MeshLibrary` **map_to_local**\ (\ map_position\: :ref:`Vector3i`\ ) |const| :ref:`πŸ”—` -Returns the position of a grid cell in the GridMap's local coordinate space. To convert the returned value into global coordinates, use :ref:`Node3D.to_global`. See also :ref:`local_to_map`. +Returns the position of a grid cell in the GridMap's local coordinate space. To convert the returned value into global coordinates, use :ref:`Node3D.to_global()`. See also :ref:`local_to_map()`. .. rst-class:: classref-item-separator @@ -645,7 +645,7 @@ Sets the mesh index for the cell referenced by its grid coordinates. A negative item index such as :ref:`INVALID_CELL_ITEM` will clear the cell. -Optionally, the item's orientation can be passed. For valid orientation values, see :ref:`get_orthogonal_index_from_basis`. +Optionally, the item's orientation can be passed. For valid orientation values, see :ref:`get_orthogonal_index_from_basis()`. .. rst-class:: classref-item-separator diff --git a/classes/class_gridmapeditorplugin.rst b/classes/class_gridmapeditorplugin.rst index 4e984a1d4..b1f89dbc7 100644 --- a/classes/class_gridmapeditorplugin.rst +++ b/classes/class_gridmapeditorplugin.rst @@ -115,7 +115,7 @@ Returns the index of the selected :ref:`MeshLibrary` item in :ref:`AABB` **get_selection**\ (\ ) |const| :ref:`πŸ”—` -Returns the cell coordinate bounds of the current selection. Use :ref:`has_selection` to check if there is an active selection. +Returns the cell coordinate bounds of the current selection. Use :ref:`has_selection()` to check if there is an active selection. .. rst-class:: classref-item-separator diff --git a/classes/class_hmaccontext.rst b/classes/class_hmaccontext.rst index 310823d56..989c88661 100644 --- a/classes/class_hmaccontext.rst +++ b/classes/class_hmaccontext.rst @@ -113,7 +113,7 @@ Returns the resulting HMAC. If the HMAC failed, an empty :ref:`PackedByteArray` **start**\ (\ hash_type\: :ref:`HashType`, key\: :ref:`PackedByteArray`\ ) :ref:`πŸ”—` -Initializes the HMACContext. This method cannot be called again on the same HMACContext until :ref:`finish` has been called. +Initializes the HMACContext. This method cannot be called again on the same HMACContext until :ref:`finish()` has been called. .. rst-class:: classref-item-separator @@ -125,7 +125,7 @@ Initializes the HMACContext. This method cannot be called again on the same HMAC :ref:`Error` **update**\ (\ data\: :ref:`PackedByteArray`\ ) :ref:`πŸ”—` -Updates the message to be HMACed. This can be called multiple times before :ref:`finish` is called to append ``data`` to the message, but cannot be called until :ref:`start` has been called. +Updates the message to be HMACed. This can be called multiple times before :ref:`finish()` is called to append ``data`` to the message, but cannot be called until :ref:`start()` has been called. .. |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_httpclient.rst b/classes/class_httpclient.rst index c8a1255c7..86ab15402 100644 --- a/classes/class_httpclient.rst +++ b/classes/class_httpclient.rst @@ -23,7 +23,7 @@ Hyper-text transfer protocol client (sometimes called "User Agent"). Used to mak See the :ref:`HTTPRequest` node for a higher-level alternative. -\ **Note:** This client only needs to connect to a host once (see :ref:`connect_to_host`) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See :ref:`request` for a full example and to get started. +\ **Note:** This client only needs to connect to a host once (see :ref:`connect_to_host()`) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See :ref:`request()` for a full example and to get started. A **HTTPClient** should be reused between multiple requests or to connect to different hosts instead of creating one client per request. Supports Transport Layer Security (TLS), including server certificate verification. HTTP status codes in the 2xx range indicate success, 3xx redirection (i.e. "try again, but over here"), 4xx something was wrong with the request, and 5xx something went wrong on the server's side. @@ -855,7 +855,7 @@ The connection to use for this client. - |void| **set_read_chunk_size**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_read_chunk_size**\ (\ ) -The size of the buffer used and maximum bytes to read per iteration. See :ref:`read_response_body_chunk`. +The size of the buffer used and maximum bytes to read per iteration. See :ref:`read_response_body_chunk()`. .. rst-class:: classref-section-separator @@ -886,7 +886,7 @@ Closes the current connection, allowing reuse of this **HTTPClient**. Connects to a host. This needs to be done before any requests are sent. -If no ``port`` is specified (or ``-1`` is used), it is automatically set to 80 for HTTP and 443 for HTTPS. You can pass the optional ``tls_options`` parameter to customize the trusted certification authorities, or the common name verification when using HTTPS. See :ref:`TLSOptions.client` and :ref:`TLSOptions.client_unsafe`. +If no ``port`` is specified (or ``-1`` is used), it is automatically set to 80 for HTTP and 443 for HTTPS. You can pass the optional ``tls_options`` parameter to customize the trusted certification authorities, or the common name verification when using HTTPS. See :ref:`TLSOptions.client()` and :ref:`TLSOptions.client_unsafe()`. .. rst-class:: classref-item-separator @@ -957,7 +957,7 @@ Returns all response headers as a :ref:`Dictionary`. Each entr :ref:`Status` **get_status**\ (\ ) |const| :ref:`πŸ”—` -Returns a :ref:`Status` constant. Need to call :ref:`poll` in order to get status updates. +Returns a :ref:`Status` constant. Need to call :ref:`poll()` in order to get status updates. .. rst-class:: classref-item-separator @@ -993,7 +993,7 @@ If ``true``, this **HTTPClient** has a response that is chunked. :ref:`Error` **poll**\ (\ ) :ref:`πŸ”—` -This needs to be called in order to have any request processed. Check results with :ref:`get_status`. +This needs to be called in order to have any request processed. Check results with :ref:`get_status()`. .. rst-class:: classref-item-separator @@ -1072,7 +1072,7 @@ Reads one chunk from the response. Sends a request to the connected host. -The URL parameter is usually just the part after the host, so for ``https://somehost.com/index.php``, it is ``/index.php``. When sending requests to an HTTP proxy server, it should be an absolute URL. For :ref:`METHOD_OPTIONS` requests, ``*`` is also allowed. For :ref:`METHOD_CONNECT` requests, it should be the authority component (``host:port``). +The URL parameter is usually just the part after the host, so for ``https://example.com/index.php``, it is ``/index.php``. When sending requests to an HTTP proxy server, it should be an absolute URL. For :ref:`METHOD_OPTIONS` requests, ``*`` is also allowed. For :ref:`METHOD_CONNECT` requests, it should be the authority component (``host:port``). Headers are HTTP request headers. For available HTTP methods, see :ref:`Method`. @@ -1097,7 +1097,7 @@ To create a POST request with query strings to push to the server, do: -\ **Note:** The ``body`` parameter is ignored if ``method`` is :ref:`METHOD_GET`. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See :ref:`String.uri_encode` for an example. +\ **Note:** The ``body`` parameter is ignored if ``method`` is :ref:`METHOD_GET`. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See :ref:`String.uri_encode()` for an example. .. rst-class:: classref-item-separator @@ -1111,7 +1111,7 @@ To create a POST request with query strings to push to the server, do: Sends a raw request to the connected host. -The URL parameter is usually just the part after the host, so for ``https://somehost.com/index.php``, it is ``/index.php``. When sending requests to an HTTP proxy server, it should be an absolute URL. For :ref:`METHOD_OPTIONS` requests, ``*`` is also allowed. For :ref:`METHOD_CONNECT` requests, it should be the authority component (``host:port``). +The URL parameter is usually just the part after the host, so for ``https://example.com/index.php``, it is ``/index.php``. When sending requests to an HTTP proxy server, it should be an absolute URL. For :ref:`METHOD_OPTIONS` requests, ``*`` is also allowed. For :ref:`METHOD_CONNECT` requests, it should be the authority component (``host:port``). Headers are HTTP request headers. For available HTTP methods, see :ref:`Method`. diff --git a/classes/class_httprequest.rst b/classes/class_httprequest.rst index eebd6d483..c4a62aaaa 100644 --- a/classes/class_httprequest.rst +++ b/classes/class_httprequest.rst @@ -119,7 +119,7 @@ Can be used to make HTTP requests, i.e. download or upload files or web content http_request.request_completed.connect(self._http_request_completed) # Perform the HTTP request. The URL below returns a PNG image as of writing. - var error = http_request.request("https://via.placeholder.com/512") + var error = http_request.request("https://placehold.co/512") if error != OK: push_error("An error occurred in the HTTP request.") @@ -150,7 +150,7 @@ Can be used to make HTTP requests, i.e. download or upload files or web content httpRequest.RequestCompleted += HttpRequestCompleted; // Perform the HTTP request. The URL below returns a PNG image as of writing. - Error error = httpRequest.Request("https://via.placeholder.com/512"); + Error error = httpRequest.Request("https://placehold.co/512"); if (error != Error.Ok) { GD.PushError("An error occurred in the HTTP request."); @@ -585,11 +585,11 @@ Returns the current status of the underlying :ref:`HTTPClient` :ref:`Error` **request**\ (\ url\: :ref:`String`, custom_headers\: :ref:`PackedStringArray` = PackedStringArray(), method\: :ref:`Method` = 0, request_data\: :ref:`String` = ""\ ) :ref:`πŸ”—` -Creates request on the underlying :ref:`HTTPClient`. If there is no configuration errors, it tries to connect using :ref:`HTTPClient.connect_to_host` and passes parameters onto :ref:`HTTPClient.request`. +Creates request on the underlying :ref:`HTTPClient`. If there is no configuration errors, it tries to connect using :ref:`HTTPClient.connect_to_host()` and passes parameters onto :ref:`HTTPClient.request()`. Returns :ref:`@GlobalScope.OK` if request is successfully created. (Does not imply that the server has responded), :ref:`@GlobalScope.ERR_UNCONFIGURED` if not in the tree, :ref:`@GlobalScope.ERR_BUSY` if still processing previous request, :ref:`@GlobalScope.ERR_INVALID_PARAMETER` if given string is not a valid URL format, or :ref:`@GlobalScope.ERR_CANT_CONNECT` if not using thread and the :ref:`HTTPClient` cannot connect to host. -\ **Note:** When ``method`` is :ref:`HTTPClient.METHOD_GET`, the payload sent via ``request_data`` might be ignored by the server or even cause the server to reject the request (check `RFC 7231 section 4.3.1 `__ for more details). As a workaround, you can send data as a query string in the URL (see :ref:`String.uri_encode` for an example). +\ **Note:** When ``method`` is :ref:`HTTPClient.METHOD_GET`, the payload sent via ``request_data`` might be ignored by the server or even cause the server to reject the request (check `RFC 7231 section 4.3.1 `__ for more details). As a workaround, you can send data as a query string in the URL (see :ref:`String.uri_encode()` for an example). \ **Note:** It's recommended to use transport encryption (TLS) and to avoid sending sensitive information (such as login credentials) in HTTP GET URL parameters. Consider using HTTP POST requests or HTTP headers for such information instead. @@ -603,7 +603,7 @@ Returns :ref:`@GlobalScope.OK` if request is suc :ref:`Error` **request_raw**\ (\ url\: :ref:`String`, custom_headers\: :ref:`PackedStringArray` = PackedStringArray(), method\: :ref:`Method` = 0, request_data_raw\: :ref:`PackedByteArray` = PackedByteArray()\ ) :ref:`πŸ”—` -Creates request on the underlying :ref:`HTTPClient` using a raw array of bytes for the request body. If there is no configuration errors, it tries to connect using :ref:`HTTPClient.connect_to_host` and passes parameters onto :ref:`HTTPClient.request`. +Creates request on the underlying :ref:`HTTPClient` using a raw array of bytes for the request body. If there is no configuration errors, it tries to connect using :ref:`HTTPClient.connect_to_host()` and passes parameters onto :ref:`HTTPClient.request()`. Returns :ref:`@GlobalScope.OK` if request is successfully created. (Does not imply that the server has responded), :ref:`@GlobalScope.ERR_UNCONFIGURED` if not in the tree, :ref:`@GlobalScope.ERR_BUSY` if still processing previous request, :ref:`@GlobalScope.ERR_INVALID_PARAMETER` if given string is not a valid URL format, or :ref:`@GlobalScope.ERR_CANT_CONNECT` if not using thread and the :ref:`HTTPClient` cannot connect to host. @@ -645,7 +645,7 @@ The proxy server is unset if ``host`` is empty or ``port`` is -1. |void| **set_tls_options**\ (\ client_options\: :ref:`TLSOptions`\ ) :ref:`πŸ”—` -Sets the :ref:`TLSOptions` to be used when connecting to an HTTPS server. See :ref:`TLSOptions.client`. +Sets the :ref:`TLSOptions` to be used when connecting to an HTTPS server. See :ref:`TLSOptions.client()`. .. |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_image.rst b/classes/class_image.rst index 4a0379bb2..6f449887f 100644 --- a/classes/class_image.rst +++ b/classes/class_image.rst @@ -599,7 +599,7 @@ It's slower than :ref:`INTERPOLATE_BILINEAR`] on it in advance, to avoid wasting processing power in generating them again and again. +\ **Note:** If you intend to scale multiple copies of the original image, it's better to call :ref:`generate_mipmaps()`] on it in advance, to avoid wasting processing power in generating them again and again. On the other hand, if the image already has mipmaps, they will be used, and a new set will be generated for the resulting image. @@ -878,7 +878,7 @@ Method Descriptions |void| **adjust_bcs**\ (\ brightness\: :ref:`float`, contrast\: :ref:`float`, saturation\: :ref:`float`\ ) :ref:`πŸ”—` -Adjusts this image's ``brightness``, ``contrast``, and ``saturation`` by the given values. Does not work if the image is compressed (see :ref:`is_compressed`). +Adjusts this image's ``brightness``, ``contrast``, and ``saturation`` by the given values. Does not work if the image is compressed (see :ref:`is_compressed()`). .. rst-class:: classref-item-separator @@ -916,7 +916,7 @@ Alpha-blends ``src_rect`` from ``src`` image to this image using ``mask`` image Copies ``src_rect`` from ``src`` image to this image at coordinates ``dst``, clipped accordingly to both image bounds. This image and ``src`` image **must** have the same format. ``src_rect`` with non-positive size is treated as empty. -\ **Note:** The alpha channel data in ``src`` will overwrite the corresponding data in this image at the target position. To blend alpha channels, use :ref:`blend_rect` instead. +\ **Note:** The alpha channel data in ``src`` will overwrite the corresponding data in this image at the target position. To blend alpha channels, use :ref:`blend_rect()` instead. .. rst-class:: classref-item-separator @@ -982,7 +982,7 @@ For ASTC compression, the ``astc_format`` parameter must be supplied. Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. -This is an alternative to :ref:`compress` that lets the user supply the channels used in order for the compressor to pick the best DXT and ETC2 formats. For other formats (non DXT or ETC2), this argument is ignored. +This is an alternative to :ref:`compress()` that lets the user supply the channels used in order for the compressor to pick the best DXT and ETC2 formats. For other formats (non DXT or ETC2), this argument is ignored. For ASTC compression, the ``astc_format`` parameter must be supplied. @@ -1034,9 +1034,9 @@ Copies ``src`` image to this image. :ref:`Image` **create**\ (\ width\: :ref:`int`, height\: :ref:`int`, use_mipmaps\: :ref:`bool`, format\: :ref:`Format`\ ) |static| :ref:`πŸ”—` -**Deprecated:** Use :ref:`create_empty`. +**Deprecated:** Use :ref:`create_empty()`. -Creates an empty image of given size and format. See :ref:`Format` constants. If ``use_mipmaps`` is ``true``, then generate mipmaps for this image. See the :ref:`generate_mipmaps`. +Creates an empty image of given size and format. See :ref:`Format` constants. If ``use_mipmaps`` is ``true``, then generate mipmaps for this image. See the :ref:`generate_mipmaps()`. .. rst-class:: classref-item-separator @@ -1048,7 +1048,7 @@ Creates an empty image of given size and format. See :ref:`Format` **create_empty**\ (\ width\: :ref:`int`, height\: :ref:`int`, use_mipmaps\: :ref:`bool`, format\: :ref:`Format`\ ) |static| :ref:`πŸ”—` -Creates an empty image of given size and format. See :ref:`Format` constants. If ``use_mipmaps`` is ``true``, then generate mipmaps for this image. See the :ref:`generate_mipmaps`. +Creates an empty image of given size and format. See :ref:`Format` constants. If ``use_mipmaps`` is ``true``, then generate mipmaps for this image. See the :ref:`generate_mipmaps()`. .. rst-class:: classref-item-separator @@ -1060,7 +1060,7 @@ Creates an empty image of given size and format. See :ref:`Format` **create_from_data**\ (\ width\: :ref:`int`, height\: :ref:`int`, use_mipmaps\: :ref:`bool`, format\: :ref:`Format`, data\: :ref:`PackedByteArray`\ ) |static| :ref:`πŸ”—` -Creates a new image of given size and format. See :ref:`Format` constants. Fills the image with the given raw data. If ``use_mipmaps`` is ``true`` then loads mipmaps for this image from ``data``. See :ref:`generate_mipmaps`. +Creates a new image of given size and format. See :ref:`Format` constants. Fills the image with the given raw data. If ``use_mipmaps`` is ``true`` then loads mipmaps for this image from ``data``. See :ref:`generate_mipmaps()`. .. rst-class:: classref-item-separator @@ -1184,7 +1184,7 @@ Flips the image vertically. Generates mipmaps for the image. Mipmaps are precalculated lower-resolution copies of the image that are automatically used if the image needs to be scaled down when rendered. They help improve image quality and performance when rendering. This method returns an error if the image is compressed, in a custom format, or if the image's width/height is ``0``. Enabling ``renormalize`` when generating mipmaps for normal map textures will make sure all resulting vector values are normalized. -It is possible to check if the image has mipmaps by calling :ref:`has_mipmaps` or :ref:`get_mipmap_count`. Calling :ref:`generate_mipmaps` on an image that already has mipmaps will replace existing mipmaps in the image. +It is possible to check if the image has mipmaps by calling :ref:`has_mipmaps()` or :ref:`get_mipmap_count()`. Calling :ref:`generate_mipmaps()` on an image that already has mipmaps will replace existing mipmaps in the image. .. rst-class:: classref-item-separator @@ -1270,7 +1270,7 @@ Returns the offset where the image's mipmap with index ``mipmap`` is stored in t Returns the color of the pixel at ``(x, y)``. -This is the same as :ref:`get_pixelv`, but with two integer arguments instead of a :ref:`Vector2i` argument. +This is the same as :ref:`get_pixelv()`, but with two integer arguments instead of a :ref:`Vector2i` argument. .. rst-class:: classref-item-separator @@ -1284,7 +1284,7 @@ This is the same as :ref:`get_pixelv`, but with t Returns the color of the pixel at ``point``. -This is the same as :ref:`get_pixel`, but with a :ref:`Vector2i` argument instead of two integer arguments. +This is the same as :ref:`get_pixel()`, but with a :ref:`Vector2i` argument instead of two integer arguments. .. rst-class:: classref-item-separator @@ -1630,7 +1630,7 @@ Rotates the image by ``180`` degrees. The width and height of the image must be Saves the image as an EXR file to ``path``. If ``grayscale`` is ``true`` and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return :ref:`@GlobalScope.ERR_UNAVAILABLE` if Godot was compiled without the TinyEXR module. -\ **Note:** The TinyEXR module is disabled in non-editor builds, which means :ref:`save_exr` will return :ref:`@GlobalScope.ERR_UNAVAILABLE` when it is called from an exported project. +\ **Note:** The TinyEXR module is disabled in non-editor builds, which means :ref:`save_exr()` will return :ref:`@GlobalScope.ERR_UNAVAILABLE` when it is called from an exported project. .. rst-class:: classref-item-separator @@ -1644,7 +1644,7 @@ Saves the image as an EXR file to ``path``. If ``grayscale`` is ``true`` and the Saves the image as an EXR file to a byte array. If ``grayscale`` is ``true`` and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return an empty byte array if Godot was compiled without the TinyEXR module. -\ **Note:** The TinyEXR module is disabled in non-editor builds, which means :ref:`save_exr` will return an empty byte array when it is called from an exported project. +\ **Note:** The TinyEXR module is disabled in non-editor builds, which means :ref:`save_exr()` will return an empty byte array when it is called from an exported project. .. rst-class:: classref-item-separator @@ -1736,7 +1736,7 @@ Saves the image as a WebP (Web Picture) file to a byte array. By default it will |void| **set_data**\ (\ width\: :ref:`int`, height\: :ref:`int`, use_mipmaps\: :ref:`bool`, format\: :ref:`Format`, data\: :ref:`PackedByteArray`\ ) :ref:`πŸ”—` -Overwrites data of an existing **Image**. Non-static equivalent of :ref:`create_from_data`. +Overwrites data of an existing **Image**. Non-static equivalent of :ref:`create_from_data()`. .. rst-class:: classref-item-separator @@ -1771,7 +1771,7 @@ Sets the :ref:`Color` of the pixel at ``(x, y)`` to ``color``. -This is the same as :ref:`set_pixelv`, but with a two integer arguments instead of a :ref:`Vector2i` argument. +This is the same as :ref:`set_pixelv()`, but with a two integer arguments instead of a :ref:`Vector2i` argument. .. rst-class:: classref-item-separator @@ -1806,7 +1806,7 @@ Sets the :ref:`Color` of the pixel at ``point`` to ``color``. -This is the same as :ref:`set_pixel`, but with a :ref:`Vector2i` argument instead of two integer arguments. +This is the same as :ref:`set_pixel()`, but with a :ref:`Vector2i` argument instead of two integer arguments. .. rst-class:: classref-item-separator diff --git a/classes/class_imageformatloaderextension.rst b/classes/class_imageformatloaderextension.rst index 79e32a34b..cd123b3bf 100644 --- a/classes/class_imageformatloaderextension.rst +++ b/classes/class_imageformatloaderextension.rst @@ -21,7 +21,7 @@ Description The engine supports multiple image formats out of the box (PNG, SVG, JPEG, WebP to name a few), but you can choose to implement support for additional image formats by extending this class. -Be sure to respect the documented return types and values. You should create an instance of it, and call :ref:`add_format_loader` to register that loader during the initialization phase. +Be sure to respect the documented return types and values. You should create an instance of it, and call :ref:`add_format_loader()` to register that loader during the initialization phase. .. rst-class:: classref-reftable-group @@ -80,7 +80,7 @@ Loads the content of ``fileaccess`` into the provided ``image``. |void| **add_format_loader**\ (\ ) :ref:`πŸ”—` -Add this format loader to the engine, allowing it to recognize the file extensions returned by :ref:`_get_recognized_extensions`. +Add this format loader to the engine, allowing it to recognize the file extensions returned by :ref:`_get_recognized_extensions()`. .. rst-class:: classref-item-separator diff --git a/classes/class_imagetexture.rst b/classes/class_imagetexture.rst index 7a1cdeae8..ee8eb5bc7 100644 --- a/classes/class_imagetexture.rst +++ b/classes/class_imagetexture.rst @@ -19,7 +19,7 @@ A :ref:`Texture2D` based on an :ref:`Image`. Description ----------- -A :ref:`Texture2D` based on an :ref:`Image`. For an image to be displayed, an **ImageTexture** has to be created from it using the :ref:`create_from_image` method: +A :ref:`Texture2D` based on an :ref:`Image`. For an image to be displayed, an **ImageTexture** has to be created from it using the :ref:`create_from_image()` method: :: @@ -29,16 +29,16 @@ A :ref:`Texture2D` based on an :ref:`Image`. For a This way, textures can be created at run-time by loading images both from within the editor and externally. -\ **Warning:** Prefer to load imported textures with :ref:`@GDScript.load` over loading them from within the filesystem dynamically with :ref:`Image.load`, as it may not work in exported projects: +\ **Warning:** Prefer to load imported textures with :ref:`@GDScript.load()` over loading them from within the filesystem dynamically with :ref:`Image.load()`, as it may not work in exported projects: :: var texture = load("res://icon.svg") $Sprite2D.texture = texture -This is because images have to be imported as a :ref:`CompressedTexture2D` first to be loaded with :ref:`@GDScript.load`. If you'd still like to load an image file just like any other :ref:`Resource`, import it as an :ref:`Image` resource instead, and then load it normally using the :ref:`@GDScript.load` method. +This is because images have to be imported as a :ref:`CompressedTexture2D` first to be loaded with :ref:`@GDScript.load()`. If you'd still like to load an image file just like any other :ref:`Resource`, import it as an :ref:`Image` resource instead, and then load it normally using the :ref:`@GDScript.load()` method. -\ **Note:** The image can be retrieved from an imported texture using the :ref:`Texture2D.get_image` method, which returns a copy of the image: +\ **Note:** The image can be retrieved from an imported texture using the :ref:`Texture2D.get_image()` method, which returns a copy of the image: :: @@ -129,7 +129,7 @@ Returns the format of the texture, one of :ref:`Format`. Replaces the texture's data with a new :ref:`Image`. This will re-allocate new memory for the texture. -If you want to update the image, but don't need to change its parameters (format, size), use :ref:`update` instead for better performance. +If you want to update the image, but don't need to change its parameters (format, size), use :ref:`update()` instead for better performance. .. rst-class:: classref-item-separator @@ -155,9 +155,9 @@ Resizes the texture to the specified dimensions. Replaces the texture's data with a new :ref:`Image`. -\ **Note:** The texture has to be created using :ref:`create_from_image` or initialized first with the :ref:`set_image` method before it can be updated. The new image dimensions, format, and mipmaps configuration should match the existing texture's image configuration. +\ **Note:** The texture has to be created using :ref:`create_from_image()` or initialized first with the :ref:`set_image()` method before it can be updated. The new image dimensions, format, and mipmaps configuration should match the existing texture's image configuration. -Use this method over :ref:`set_image` if you need to update the texture frequently, which is faster than allocating additional memory for a new texture each time. +Use this method over :ref:`set_image()` if you need to update the texture frequently, which is faster than allocating additional memory for a new texture each 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.)` diff --git a/classes/class_imagetexture3d.rst b/classes/class_imagetexture3d.rst index 8079cb052..99a5c54af 100644 --- a/classes/class_imagetexture3d.rst +++ b/classes/class_imagetexture3d.rst @@ -64,7 +64,7 @@ Creates the **ImageTexture3D** with specified ``width``, ``height``, and ``depth |void| **update**\ (\ data\: :ref:`Array`\[:ref:`Image`\]\ ) :ref:`πŸ”—` -Replaces the texture's existing data with the layers specified in ``data``. The size of ``data`` must match the parameters that were used for :ref:`create`. In other words, the texture cannot be resized or have its format changed by calling :ref:`update`. +Replaces the texture's existing data with the layers specified in ``data``. The size of ``data`` must match the parameters that were used for :ref:`create()`. In other words, the texture cannot be resized or have its format changed by calling :ref:`update()`. .. |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_imagetexturelayered.rst b/classes/class_imagetexturelayered.rst index 18674b2b1..53906c622 100644 --- a/classes/class_imagetexturelayered.rst +++ b/classes/class_imagetexturelayered.rst @@ -52,7 +52,7 @@ Method Descriptions :ref:`Error` **create_from_images**\ (\ images\: :ref:`Array`\[:ref:`Image`\]\ ) :ref:`πŸ”—` -Creates an **ImageTextureLayered** from an array of :ref:`Image`\ s. See :ref:`Image.create` for the expected data format. The first image decides the width, height, image format and mipmapping setting. The other images *must* have the same width, height, image format and mipmapping setting. +Creates an **ImageTextureLayered** from an array of :ref:`Image`\ s. See :ref:`Image.create()` for the expected data format. The first image decides the width, height, image format and mipmapping setting. The other images *must* have the same width, height, image format and mipmapping setting. Each :ref:`Image` represents one ``layer``. diff --git a/classes/class_importermesh.rst b/classes/class_importermesh.rst index d5465a6c7..459eadb59 100644 --- a/classes/class_importermesh.rst +++ b/classes/class_importermesh.rst @@ -21,7 +21,7 @@ Description ImporterMesh is a type of :ref:`Resource` analogous to :ref:`ArrayMesh`. It contains vertex array-based geometry, divided in *surfaces*. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials. -Unlike its runtime counterpart, **ImporterMesh** contains mesh data before various import steps, such as lod and shadow mesh generation, have taken place. Modify surface data by calling :ref:`clear`, followed by :ref:`add_surface` for each surface. +Unlike its runtime counterpart, **ImporterMesh** contains mesh data before various import steps, such as lod and shadow mesh generation, have taken place. Modify surface data by calling :ref:`clear()`, followed by :ref:`add_surface()` for each surface. .. rst-class:: classref-reftable-group @@ -94,7 +94,7 @@ Method Descriptions |void| **add_blend_shape**\ (\ name\: :ref:`String`\ ) :ref:`πŸ”—` -Adds name for a blend shape that will be added with :ref:`add_surface`. Must be called before surface is added. +Adds name for a blend shape that will be added with :ref:`add_surface()`. Must be called before surface is added. .. rst-class:: classref-item-separator @@ -106,7 +106,7 @@ Adds name for a blend shape that will be added with :ref:`add_surface`, arrays\: :ref:`Array`, blend_shapes\: :ref:`Array`\[:ref:`Array`\] = [], lods\: :ref:`Dictionary` = {}, material\: :ref:`Material` = null, name\: :ref:`String` = "", flags\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Creates a new surface. :ref:`Mesh.get_surface_count` will become the ``surf_idx`` for this new surface. +Creates a new surface. :ref:`Mesh.get_surface_count()` will become the ``surf_idx`` for this new surface. Surfaces are created to be rendered using a ``primitive``, which may be any of the values defined in :ref:`PrimitiveType`. @@ -148,7 +148,7 @@ Generates all lods for this ImporterMesh. \ ``normal_split_angle`` is not used and only remains for compatibility with older versions of the API. -The number of generated lods can be accessed using :ref:`get_surface_lod_count`, and each LOD is available in :ref:`get_surface_lod_size` and :ref:`get_surface_lod_indices`. +The number of generated lods can be accessed using :ref:`get_surface_lod_count()`, and each LOD is available in :ref:`get_surface_lod_size()` and :ref:`get_surface_lod_indices()`. \ ``bone_transform_array`` is an :ref:`Array` which can be either empty or contain :ref:`Transform3D`\ s which, for each of the mesh's bone IDs, will apply mesh skinning when generating the LOD mesh variations. This is usually used to account for discrepancies in scale between the mesh itself and its skinning data. @@ -212,7 +212,7 @@ Returns the size hint of this mesh for lightmap-unwrapping in UV-space. Returns the mesh data represented by this **ImporterMesh** as a usable :ref:`ArrayMesh`. -This method caches the returned mesh, and subsequent calls will return the cached data until :ref:`clear` is called. +This method caches the returned mesh, and subsequent calls will return the cached data until :ref:`clear()` is called. If not yet cached and ``base_mesh`` is provided, ``base_mesh`` will be used and mutated. @@ -226,7 +226,7 @@ If not yet cached and ``base_mesh`` is provided, ``base_mesh`` will be used and :ref:`Array` **get_surface_arrays**\ (\ surface_idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the arrays for the vertices, normals, UVs, etc. that make up the requested surface. See :ref:`add_surface`. +Returns the arrays for the vertices, normals, UVs, etc. that make up the requested surface. See :ref:`add_surface()`. .. rst-class:: classref-item-separator @@ -334,7 +334,7 @@ Gets the name assigned to this surface. :ref:`PrimitiveType` **get_surface_primitive_type**\ (\ surface_idx\: :ref:`int`\ ) :ref:`πŸ”—` -Returns the primitive type of the requested surface (see :ref:`add_surface`). +Returns the primitive type of the requested surface (see :ref:`add_surface()`). .. rst-class:: classref-item-separator diff --git a/classes/class_input.rst b/classes/class_input.rst index a49efe239..0f38a86c7 100644 --- a/classes/class_input.rst +++ b/classes/class_input.rst @@ -21,7 +21,7 @@ Description The **Input** singleton handles key presses, mouse buttons and movement, gamepads, and input actions. Actions and their events can be set in the **Input Map** tab in **Project > Project Settings**, or with the :ref:`InputMap` class. -\ **Note:** **Input**'s methods reflect the global input state and are not affected by :ref:`Control.accept_event` or :ref:`Viewport.set_input_as_handled`, as those methods only deal with the way input is propagated in the :ref:`SceneTree`. +\ **Note:** **Input**'s methods reflect the global input state and are not affected by :ref:`Control.accept_event()` or :ref:`Viewport.set_input_as_handled()`, as those methods only deal with the way input is propagated in the :ref:`SceneTree`. .. rst-class:: classref-introduction-group @@ -480,7 +480,7 @@ This will simulate pressing the specified action. The strength can be used for non-boolean actions, it's ranged between 0 and 1 representing the intensity of the given action. -\ **Note:** This method will not cause any :ref:`Node._input` calls. It is intended to be used with :ref:`is_action_pressed` and :ref:`is_action_just_pressed`. If you want to simulate ``_input``, use :ref:`parse_input_event` instead. +\ **Note:** This method will not cause any :ref:`Node._input()` calls. It is intended to be used with :ref:`is_action_pressed()` and :ref:`is_action_just_pressed()`. If you want to simulate ``_input``, use :ref:`parse_input_event()` instead. .. rst-class:: classref-item-separator @@ -546,7 +546,7 @@ Note this method returns an empty :ref:`Vector3` when running fro :ref:`float` **get_action_raw_strength**\ (\ action\: :ref:`StringName`, exact_match\: :ref:`bool` = false\ ) |const| :ref:`πŸ”—` -Returns a value between 0 and 1 representing the raw intensity of the given action, ignoring the action's deadzone. In most cases, you should use :ref:`get_action_strength` instead. +Returns a value between 0 and 1 representing the raw intensity of the given action, ignoring the action's deadzone. In most cases, you should use :ref:`get_action_strength()` instead. If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. @@ -772,7 +772,7 @@ Returns the magnetic field strength in micro-Tesla for all axes of the device's |bitfield|\[:ref:`MouseButtonMask`\] **get_mouse_button_mask**\ (\ ) |const| :ref:`πŸ”—` -Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to :ref:`DisplayServer.mouse_get_button_state`. +Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to :ref:`DisplayServer.mouse_get_button_state()`. .. rst-class:: classref-item-separator @@ -808,9 +808,9 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref: \ **Note:** Returning ``true`` does not imply that the action is *still* pressed. An action can be pressed and released again rapidly, and ``true`` will still be returned so as not to miss input. -\ **Note:** Due to keyboard ghosting, :ref:`is_action_just_pressed` may return ``false`` even if one of the action's keys is pressed. See `Input examples <../tutorials/inputs/input_examples.html#keyboard-events>`__ in the documentation for more information. +\ **Note:** Due to keyboard ghosting, :ref:`is_action_just_pressed()` may return ``false`` even if one of the action's keys is pressed. See `Input examples <../tutorials/inputs/input_examples.html#keyboard-events>`__ in the documentation for more information. -\ **Note:** During input handling (e.g. :ref:`Node._input`), use :ref:`InputEvent.is_action_pressed` instead to query the action state of the current event. +\ **Note:** During input handling (e.g. :ref:`Node._input()`), use :ref:`InputEvent.is_action_pressed()` instead to query the action state of the current event. .. rst-class:: classref-item-separator @@ -828,7 +828,7 @@ Returns ``true`` when the user *stops* pressing the action event in the current If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. -\ **Note:** During input handling (e.g. :ref:`Node._input`), use :ref:`InputEvent.is_action_released` instead to query the action state of the current event. +\ **Note:** During input handling (e.g. :ref:`Node._input()`), use :ref:`InputEvent.is_action_released()` instead to query the action state of the current event. .. rst-class:: classref-item-separator @@ -844,7 +844,7 @@ Returns ``true`` if you are pressing the action event. If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. -\ **Note:** Due to keyboard ghosting, :ref:`is_action_pressed` may return ``false`` even if one of the action's keys is pressed. See `Input examples <../tutorials/inputs/input_examples.html#keyboard-events>`__ in the documentation for more information. +\ **Note:** Due to keyboard ghosting, :ref:`is_action_pressed()` may return ``false`` even if one of the action's keys is pressed. See `Input examples <../tutorials/inputs/input_examples.html#keyboard-events>`__ in the documentation for more information. .. rst-class:: classref-item-separator @@ -856,7 +856,7 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref: :ref:`bool` **is_anything_pressed**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if any action, key, joypad button, or mouse button is being pressed. This will also return ``true`` if any action is simulated via code by calling :ref:`action_press`. +Returns ``true`` if any action, key, joypad button, or mouse button is being pressed. This will also return ``true`` if any action is simulated via code by calling :ref:`action_press()`. .. rst-class:: classref-item-separator @@ -906,9 +906,9 @@ Returns ``true`` if you are pressing the key with the ``keycode`` printed on it. Returns ``true`` if you are pressing the Latin key in the current keyboard layout. You can pass a :ref:`Key` constant. -\ :ref:`is_key_pressed` is only recommended over :ref:`is_physical_key_pressed` in non-game applications. This ensures that shortcut keys behave as expected depending on the user's keyboard layout, as keyboard shortcuts are generally dependent on the keyboard layout in non-game applications. If in doubt, use :ref:`is_physical_key_pressed`. +\ :ref:`is_key_pressed()` is only recommended over :ref:`is_physical_key_pressed()` in non-game applications. This ensures that shortcut keys behave as expected depending on the user's keyboard layout, as keyboard shortcuts are generally dependent on the keyboard layout in non-game applications. If in doubt, use :ref:`is_physical_key_pressed()`. -\ **Note:** Due to keyboard ghosting, :ref:`is_key_pressed` may return ``false`` even if one of the action's keys is pressed. See `Input examples <../tutorials/inputs/input_examples.html#keyboard-events>`__ in the documentation for more information. +\ **Note:** Due to keyboard ghosting, :ref:`is_key_pressed()` may return ``false`` even if one of the action's keys is pressed. See `Input examples <../tutorials/inputs/input_examples.html#keyboard-events>`__ in the documentation for more information. .. rst-class:: classref-item-separator @@ -934,9 +934,9 @@ Returns ``true`` if you are pressing the mouse button specified with :ref:`Mouse Returns ``true`` if you are pressing the key in the physical location on the 101/102-key US QWERTY keyboard. You can pass a :ref:`Key` constant. -\ :ref:`is_physical_key_pressed` is recommended over :ref:`is_key_pressed` for in-game actions, as it will make :kbd:`W`/:kbd:`A`/:kbd:`S`/:kbd:`D` layouts work regardless of the user's keyboard layout. :ref:`is_physical_key_pressed` will also ensure that the top row number keys work on any keyboard layout. If in doubt, use :ref:`is_physical_key_pressed`. +\ :ref:`is_physical_key_pressed()` is recommended over :ref:`is_key_pressed()` for in-game actions, as it will make :kbd:`W`/:kbd:`A`/:kbd:`S`/:kbd:`D` layouts work regardless of the user's keyboard layout. :ref:`is_physical_key_pressed()` will also ensure that the top row number keys work on any keyboard layout. If in doubt, use :ref:`is_physical_key_pressed()`. -\ **Note:** Due to keyboard ghosting, :ref:`is_physical_key_pressed` may return ``false`` even if one of the action's keys is pressed. See `Input examples <../tutorials/inputs/input_examples.html#keyboard-events>`__ in the documentation for more information. +\ **Note:** Due to keyboard ghosting, :ref:`is_physical_key_pressed()` may return ``false`` even if one of the action's keys is pressed. See `Input examples <../tutorials/inputs/input_examples.html#keyboard-events>`__ in the documentation for more information. .. rst-class:: classref-item-separator @@ -948,7 +948,7 @@ Returns ``true`` if you are pressing the key in the physical location on the 101 |void| **parse_input_event**\ (\ event\: :ref:`InputEvent`\ ) :ref:`πŸ”—` -Feeds an :ref:`InputEvent` to the game. Can be used to artificially trigger input events from code. Also generates :ref:`Node._input` calls. +Feeds an :ref:`InputEvent` to the game. Can be used to artificially trigger input events from code. Also generates :ref:`Node._input()` calls. .. tabs:: @@ -969,7 +969,7 @@ Feeds an :ref:`InputEvent` to the game. Can be used to artific -\ **Note:** Calling this function has no influence on the operating system. So for example sending an :ref:`InputEventMouseMotion` will not move the OS mouse cursor to the specified position (use :ref:`warp_mouse` instead) and sending :kbd:`Alt/Cmd + Tab` as :ref:`InputEventKey` won't toggle between active windows. +\ **Note:** Calling this function has no influence on the operating system. So for example sending an :ref:`InputEventMouseMotion` will not move the OS mouse cursor to the specified position (use :ref:`warp_mouse()` instead) and sending :kbd:`Alt/Cmd + Tab` as :ref:`InputEventKey` won't toggle between active windows. .. rst-class:: classref-item-separator @@ -1103,7 +1103,7 @@ Queries whether an input device should be ignored or not. Devices can be ignored |void| **start_joy_vibration**\ (\ device\: :ref:`int`, weak_magnitude\: :ref:`float`, strong_magnitude\: :ref:`float`, duration\: :ref:`float` = 0\ ) :ref:`πŸ”—` -Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. ``weak_magnitude`` is the strength of the weak motor (between 0 and 1) and ``strong_magnitude`` is the strength of the strong motor (between 0 and 1). ``duration`` is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely). The vibration can be stopped early by calling :ref:`stop_joy_vibration`. +Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. ``weak_magnitude`` is the strength of the weak motor (between 0 and 1) and ``strong_magnitude`` is the strength of the strong motor (between 0 and 1). ``duration`` is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely). The vibration can be stopped early by calling :ref:`stop_joy_vibration()`. \ **Note:** Not every hardware is compatible with long effect durations; it is recommended to restart an effect if it has to be played for more than a few seconds. @@ -1119,7 +1119,7 @@ Starts to vibrate the joypad. Joypads usually come with two rumble motors, a str |void| **stop_joy_vibration**\ (\ device\: :ref:`int`\ ) :ref:`πŸ”—` -Stops the vibration of the joypad started with :ref:`start_joy_vibration`. +Stops the vibration of the joypad started with :ref:`start_joy_vibration()`. .. rst-class:: classref-item-separator @@ -1137,13 +1137,13 @@ Vibrate the handheld device for the specified duration in milliseconds. \ **Note:** This method is implemented on Android, iOS, and Web. It has no effect on other platforms. -\ **Note:** For Android, :ref:`vibrate_handheld` requires enabling the ``VIBRATE`` permission in the export preset. Otherwise, :ref:`vibrate_handheld` will have no effect. +\ **Note:** For Android, :ref:`vibrate_handheld()` requires enabling the ``VIBRATE`` permission in the export preset. Otherwise, :ref:`vibrate_handheld()` will have no effect. \ **Note:** For iOS, specifying the duration is only supported in iOS 13 and later. \ **Note:** For Web, the amplitude cannot be changed. -\ **Note:** Some web browsers such as Safari and Firefox for Android do not support :ref:`vibrate_handheld`. +\ **Note:** Some web browsers such as Safari and Firefox for Android do not support :ref:`vibrate_handheld()`. .. rst-class:: classref-item-separator @@ -1159,7 +1159,7 @@ Sets the mouse position to the specified vector, provided in pixels and relative Mouse position is clipped to the limits of the screen resolution, or to the limits of the game window if :ref:`MouseMode` is set to :ref:`MOUSE_MODE_CONFINED` or :ref:`MOUSE_MODE_CONFINED_HIDDEN`. -\ **Note:** :ref:`warp_mouse` is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web. +\ **Note:** :ref:`warp_mouse()` is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web. .. |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_inputevent.rst b/classes/class_inputevent.rst index 2cbe23ba7..6363cef9b 100644 --- a/classes/class_inputevent.rst +++ b/classes/class_inputevent.rst @@ -21,7 +21,7 @@ Abstract base class for input events. Description ----------- -Abstract base class of all types of input events. See :ref:`Node._input`. +Abstract base class of all types of input events. See :ref:`Node._input()`. .. rst-class:: classref-introduction-group @@ -198,7 +198,7 @@ Returns ``true`` if the given action is being pressed (and is not an echo event If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. -\ **Note:** Due to keyboard ghosting, :ref:`is_action_pressed` may return ``false`` even if one of the action's keys is pressed. See `Input examples <../tutorials/inputs/input_examples.html#keyboard-events>`__ in the documentation for more information. +\ **Note:** Due to keyboard ghosting, :ref:`is_action_pressed()` may return ``false`` even if one of the action's keys is pressed. See `Input examples <../tutorials/inputs/input_examples.html#keyboard-events>`__ in the documentation for more information. .. rst-class:: classref-item-separator @@ -266,7 +266,7 @@ Returns ``true`` if the specified ``event`` matches this event. Only valid for a If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. -\ **Note:** Only considers the event configuration (such as the keyboard key or joypad axis), not state information like :ref:`is_pressed`, :ref:`is_released`, :ref:`is_echo`, or :ref:`is_canceled`. +\ **Note:** Only considers the event configuration (such as the keyboard key or joypad axis), not state information like :ref:`is_pressed()`, :ref:`is_released()`, :ref:`is_echo()`, or :ref:`is_canceled()`. .. rst-class:: classref-item-separator @@ -280,7 +280,7 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref: Returns ``true`` if this input event is pressed. Not relevant for events of type :ref:`InputEventMouseMotion` or :ref:`InputEventScreenDrag`. -\ **Note:** Due to keyboard ghosting, :ref:`is_pressed` may return ``false`` even if one of the action's keys is pressed. See `Input examples <../tutorials/inputs/input_examples.html#keyboard-events>`__ in the documentation for more information. +\ **Note:** Due to keyboard ghosting, :ref:`is_pressed()` may return ``false`` even if one of the action's keys is pressed. See `Input examples <../tutorials/inputs/input_examples.html#keyboard-events>`__ in the documentation for more information. .. rst-class:: classref-item-separator diff --git a/classes/class_inputeventaction.rst b/classes/class_inputeventaction.rst index 670b5fe0a..add657a09 100644 --- a/classes/class_inputeventaction.rst +++ b/classes/class_inputeventaction.rst @@ -21,7 +21,7 @@ Description Contains a generic action which can be targeted from several types of inputs. Actions and their events can be set in the **Input Map** tab in **Project > Project Settings**, or with the :ref:`InputMap` class. -\ **Note:** Unlike the other :ref:`InputEvent` subclasses which map to unique physical events, this virtual one is not emitted by the engine. This class is useful to emit actions manually with :ref:`Input.parse_input_event`, which are then received in :ref:`Node._input`. To check if a physical event matches an action from the Input Map, use :ref:`InputEvent.is_action` and :ref:`InputEvent.is_action_pressed`. +\ **Note:** Unlike the other :ref:`InputEvent` subclasses which map to unique physical events, this virtual one is not emitted by the engine. This class is useful to emit actions manually with :ref:`Input.parse_input_event()`, which are then received in :ref:`Node._input()`. To check if a physical event matches an action from the Input Map, use :ref:`InputEvent.is_action()` and :ref:`InputEvent.is_action_pressed()`. .. rst-class:: classref-introduction-group diff --git a/classes/class_inputeventgesture.rst b/classes/class_inputeventgesture.rst index c283f82aa..0f39d84f6 100644 --- a/classes/class_inputeventgesture.rst +++ b/classes/class_inputeventgesture.rst @@ -62,7 +62,7 @@ Property Descriptions - |void| **set_position**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_position**\ (\ ) -The local gesture position relative to the :ref:`Viewport`. If used in :ref:`Control._gui_input`, the position is relative to the current :ref:`Control` that received this gesture. +The local gesture position relative to the :ref:`Viewport`. If used in :ref:`Control._gui_input()`, the position is relative to the current :ref:`Control` that received this gesture. .. |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_inputeventkey.rst b/classes/class_inputeventkey.rst index 78f83f59b..6aa45193b 100644 --- a/classes/class_inputeventkey.rst +++ b/classes/class_inputeventkey.rst @@ -19,7 +19,7 @@ Represents a key on a keyboard being pressed or released. Description ----------- -An input event for keys on a keyboard. Supports key presses, key releases and :ref:`echo` events. It can also be received in :ref:`Node._unhandled_key_input`. +An input event for keys on a keyboard. Supports key presses, key releases and :ref:`echo` events. It can also be received in :ref:`Node._unhandled_key_input()`. \ **Note:** Events received from the keyboard usually have all properties set. Event mappings should have only one of the :ref:`keycode`, :ref:`physical_keycode` or :ref:`unicode` set. @@ -192,7 +192,7 @@ Represents the location of a key which has both left and right versions, such as Represents the physical location of a key on the 101/102-key US QWERTY keyboard, which corresponds to one of the :ref:`Key` constants. -To get a human-readable representation of the **InputEventKey**, use :ref:`OS.get_keycode_string` in combination with :ref:`DisplayServer.keyboard_get_keycode_from_physical`: +To get a human-readable representation of the **InputEventKey**, use :ref:`OS.get_keycode_string()` in combination with :ref:`DisplayServer.keyboard_get_keycode_from_physical()`: .. tabs:: @@ -249,7 +249,7 @@ If ``true``, the key's state is pressed. If ``false``, the key's state is releas - |void| **set_unicode**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_unicode**\ (\ ) -The key Unicode character code (when relevant), shifted by modifier keys. Unicode character codes for composite characters and complex scripts may not be available unless IME input mode is active. See :ref:`Window.set_ime_active` for more information. +The key Unicode character code (when relevant), shifted by modifier keys. Unicode character codes for composite characters and complex scripts may not be available unless IME input mode is active. See :ref:`Window.set_ime_active()` for more information. .. rst-class:: classref-section-separator diff --git a/classes/class_inputeventmidi.rst b/classes/class_inputeventmidi.rst index 8ed329395..cc2477d0c 100644 --- a/classes/class_inputeventmidi.rst +++ b/classes/class_inputeventmidi.rst @@ -23,7 +23,7 @@ InputEventMIDI stores information about messages from `MIDI `, first. You can check which devices are detected with :ref:`OS.get_connected_midi_inputs`, and close the connection with :ref:`OS.close_midi_inputs`. +By default, Godot does not detect MIDI devices. You need to call :ref:`OS.open_midi_inputs()`, first. You can check which devices are detected with :ref:`OS.get_connected_midi_inputs()`, and close the connection with :ref:`OS.close_midi_inputs()`. .. tabs:: @@ -82,7 +82,7 @@ By default, Godot does not detect MIDI devices. You need to call :ref:`OS.open_m \ **Note:** Godot does not support MIDI output, so there is no way to emit MIDI messages from Godot. Only MIDI input is supported. -\ **Note:** On the Web platform, using MIDI input requires a browser permission to be granted first. This permission request is performed when calling :ref:`OS.open_midi_inputs`. MIDI input will not work until the user accepts the permission request. +\ **Note:** On the Web platform, using MIDI input requires a browser permission to be granted first. This permission request is performed when calling :ref:`OS.open_midi_inputs()`. MIDI input will not work until the user accepts the permission request. .. rst-class:: classref-introduction-group diff --git a/classes/class_inputeventmouse.rst b/classes/class_inputeventmouse.rst index 2f821ea74..9ca5285c2 100644 --- a/classes/class_inputeventmouse.rst +++ b/classes/class_inputeventmouse.rst @@ -83,9 +83,9 @@ The mouse button mask identifier, one of or a bitwise combination of the :ref:`M - |void| **set_global_position**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_global_position**\ (\ ) -When received in :ref:`Node._input` or :ref:`Node._unhandled_input`, returns the mouse's position in the root :ref:`Viewport` using the coordinate system of the root :ref:`Viewport`. +When received in :ref:`Node._input()` or :ref:`Node._unhandled_input()`, returns the mouse's position in the root :ref:`Viewport` using the coordinate system of the root :ref:`Viewport`. -When received in :ref:`Control._gui_input`, returns the mouse's position in the :ref:`CanvasLayer` that the :ref:`Control` is in using the coordinate system of the :ref:`CanvasLayer`. +When received in :ref:`Control._gui_input()`, returns the mouse's position in the :ref:`CanvasLayer` that the :ref:`Control` is in using the coordinate system of the :ref:`CanvasLayer`. .. rst-class:: classref-item-separator @@ -102,9 +102,9 @@ When received in :ref:`Control._gui_input`\ ) - :ref:`Vector2` **get_position**\ (\ ) -When received in :ref:`Node._input` or :ref:`Node._unhandled_input`, returns the mouse's position in the :ref:`Viewport` this :ref:`Node` is in using the coordinate system of this :ref:`Viewport`. +When received in :ref:`Node._input()` or :ref:`Node._unhandled_input()`, returns the mouse's position in the :ref:`Viewport` this :ref:`Node` is in using the coordinate system of this :ref:`Viewport`. -When received in :ref:`Control._gui_input`, returns the mouse's position in the :ref:`Control` using the local coordinate system of the :ref:`Control`. +When received in :ref:`Control._gui_input()`, returns the mouse's position in the :ref:`Control` using the local coordinate system of the :ref:`Control`. .. |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_inputeventmousebutton.rst b/classes/class_inputeventmousebutton.rst index 10ab96347..0f6222121 100644 --- a/classes/class_inputeventmousebutton.rst +++ b/classes/class_inputeventmousebutton.rst @@ -22,7 +22,7 @@ Represents a mouse button being pressed or released. Description ----------- -Stores information about mouse click events. See :ref:`Node._input`. +Stores information about mouse click events. See :ref:`Node._input()`. \ **Note:** On Wear OS devices, rotary input is mapped to :ref:`@GlobalScope.MOUSE_BUTTON_WHEEL_UP` and :ref:`@GlobalScope.MOUSE_BUTTON_WHEEL_DOWN`. This can be changed to :ref:`@GlobalScope.MOUSE_BUTTON_WHEEL_LEFT` and :ref:`@GlobalScope.MOUSE_BUTTON_WHEEL_RIGHT` with the :ref:`ProjectSettings.input_devices/pointing/android/rotary_input_scroll_axis` setting. diff --git a/classes/class_inputeventmousemotion.rst b/classes/class_inputeventmousemotion.rst index 28b5c5aae..8151b07a2 100644 --- a/classes/class_inputeventmousemotion.rst +++ b/classes/class_inputeventmousemotion.rst @@ -19,9 +19,9 @@ Represents a mouse or a pen movement. Description ----------- -Stores information about a mouse or a pen motion. This includes relative position, absolute position, and velocity. See :ref:`Node._input`. +Stores information about a mouse or a pen motion. This includes relative position, absolute position, and velocity. See :ref:`Node._input()`. -\ **Note:** By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, set :ref:`Input.use_accumulated_input` to ``false`` to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider using :ref:`Geometry2D.bresenham_line` as well to avoid visible gaps in lines if the user is moving the mouse quickly. +\ **Note:** By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, set :ref:`Input.use_accumulated_input` to ``false`` to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider using :ref:`Geometry2D.bresenham_line()` as well to avoid visible gaps in lines if the user is moving the mouse quickly. \ **Note:** This event may be emitted even when the mouse hasn't moved, either by the operating system or by Godot itself. If you really need to know if the mouse has moved (e.g. to suppress displaying a tooltip), you should check that ``relative.is_zero_approx()`` is ``false``. @@ -141,7 +141,7 @@ The unscaled mouse position relative to the previous position in the coordinate \ **Note:** Since **InputEventMouseMotion** may only be emitted when the mouse moves, it is not possible to reliably detect when the mouse has stopped moving by checking this property. A separate, short timer may be necessary. -\ **Note:** This coordinate is *not* scaled according to the content scale factor or calls to :ref:`InputEvent.xformed_by`. This should be preferred over :ref:`relative` for mouse aiming when using the :ref:`Input.MOUSE_MODE_CAPTURED` mouse mode, regardless of the project's stretch mode. +\ **Note:** This coordinate is *not* scaled according to the content scale factor or calls to :ref:`InputEvent.xformed_by()`. This should be preferred over :ref:`relative` for mouse aiming when using the :ref:`Input.MOUSE_MODE_CAPTURED` mouse mode, regardless of the project's stretch mode. .. rst-class:: classref-item-separator @@ -158,7 +158,7 @@ The unscaled mouse position relative to the previous position in the coordinate - |void| **set_screen_velocity**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_screen_velocity**\ (\ ) -The unscaled mouse velocity in pixels per second in screen coordinates. This velocity is *not* scaled according to the content scale factor or calls to :ref:`InputEvent.xformed_by`. This should be preferred over :ref:`velocity` for mouse aiming when using the :ref:`Input.MOUSE_MODE_CAPTURED` mouse mode, regardless of the project's stretch mode. +The unscaled mouse velocity in pixels per second in screen coordinates. This velocity is *not* scaled according to the content scale factor or calls to :ref:`InputEvent.xformed_by()`. This should be preferred over :ref:`velocity` for mouse aiming when using the :ref:`Input.MOUSE_MODE_CAPTURED` mouse mode, regardless of the project's stretch mode. .. rst-class:: classref-item-separator diff --git a/classes/class_inputeventscreendrag.rst b/classes/class_inputeventscreendrag.rst index 8f73f9c2b..e092a1bb6 100644 --- a/classes/class_inputeventscreendrag.rst +++ b/classes/class_inputeventscreendrag.rst @@ -19,7 +19,7 @@ Represents a screen drag event. Description ----------- -Stores information about screen drag events. See :ref:`Node._input`. +Stores information about screen drag events. See :ref:`Node._input()`. .. rst-class:: classref-introduction-group @@ -163,7 +163,7 @@ The drag position relative to the previous position (position at the last frame) - |void| **set_screen_relative**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_screen_relative**\ (\ ) -The unscaled drag position relative to the previous position in screen coordinates (position at the last frame). This position is *not* scaled according to the content scale factor or calls to :ref:`InputEvent.xformed_by`. This should be preferred over :ref:`relative` for touch aiming regardless of the project's stretch mode. +The unscaled drag position relative to the previous position in screen coordinates (position at the last frame). This position is *not* scaled according to the content scale factor or calls to :ref:`InputEvent.xformed_by()`. This should be preferred over :ref:`relative` for touch aiming regardless of the project's stretch mode. .. rst-class:: classref-item-separator @@ -180,7 +180,7 @@ The unscaled drag position relative to the previous position in screen coordinat - |void| **set_screen_velocity**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_screen_velocity**\ (\ ) -The unscaled drag velocity in pixels per second in screen coordinates. This velocity is *not* scaled according to the content scale factor or calls to :ref:`InputEvent.xformed_by`. This should be preferred over :ref:`velocity` for touch aiming regardless of the project's stretch mode. +The unscaled drag velocity in pixels per second in screen coordinates. This velocity is *not* scaled according to the content scale factor or calls to :ref:`InputEvent.xformed_by()`. This should be preferred over :ref:`velocity` for touch aiming regardless of the project's stretch mode. .. rst-class:: classref-item-separator diff --git a/classes/class_inputeventshortcut.rst b/classes/class_inputeventshortcut.rst index bdebcaf97..93fc0fb12 100644 --- a/classes/class_inputeventshortcut.rst +++ b/classes/class_inputeventshortcut.rst @@ -19,7 +19,7 @@ Represents a triggered keyboard :ref:`Shortcut`. Description ----------- -InputEventShortcut is a special event that can be received in :ref:`Node._input`, :ref:`Node._shortcut_input`, and :ref:`Node._unhandled_input`. It is typically sent by the editor's Command Palette to trigger actions, but can also be sent manually using :ref:`Viewport.push_input`. +InputEventShortcut is a special event that can be received in :ref:`Node._input()`, :ref:`Node._shortcut_input()`, and :ref:`Node._unhandled_input()`. It is typically sent by the editor's Command Palette to trigger actions, but can also be sent manually using :ref:`Viewport.push_input()`. .. rst-class:: classref-reftable-group @@ -53,7 +53,7 @@ Property Descriptions - |void| **set_shortcut**\ (\ value\: :ref:`Shortcut`\ ) - :ref:`Shortcut` **get_shortcut**\ (\ ) -The :ref:`Shortcut` represented by this event. Its :ref:`Shortcut.matches_event` method will always return ``true`` for this event. +The :ref:`Shortcut` represented by this event. Its :ref:`Shortcut.matches_event()` method will always return ``true`` for this event. .. |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_inputeventwithmodifiers.rst b/classes/class_inputeventwithmodifiers.rst index b62f29e7e..51809dbb2 100644 --- a/classes/class_inputeventwithmodifiers.rst +++ b/classes/class_inputeventwithmodifiers.rst @@ -21,7 +21,7 @@ Abstract base class for input events affected by modifier keys like :kbd:`Shift` Description ----------- -Stores information about mouse, keyboard, and touch gesture input events. This includes information about which modifier keys are pressed, such as :kbd:`Shift` or :kbd:`Alt`. See :ref:`Node._input`. +Stores information about mouse, keyboard, and touch gesture input events. This includes information about which modifier keys are pressed, such as :kbd:`Shift` or :kbd:`Alt`. See :ref:`Node._input()`. \ **Note:** Modifier keys are considered modifiers only when used in combination with another key. As a result, their corresponding member variables, such as :ref:`ctrl_pressed`, will return ``false`` if the key is pressed on its own. diff --git a/classes/class_inputmap.rst b/classes/class_inputmap.rst index 406fc0014..88b1b7e27 100644 --- a/classes/class_inputmap.rst +++ b/classes/class_inputmap.rst @@ -19,7 +19,7 @@ A singleton that manages all :ref:`InputEventAction`\ s. Description ----------- -Manages all :ref:`InputEventAction` which can be created/modified from the project settings menu **Project > Project Settings > Input Map** or in code with :ref:`add_action` and :ref:`action_add_event`. See :ref:`Node._input`. +Manages all :ref:`InputEventAction` which can be created/modified from the project settings menu **Project > Project Settings > Input Map** or in code with :ref:`add_action()` and :ref:`action_add_event()`. See :ref:`Node._input()`. .. rst-class:: classref-introduction-group @@ -167,7 +167,7 @@ Sets a deadzone value for the action. Adds an empty action to the **InputMap** with a configurable ``deadzone``. -An :ref:`InputEvent` can then be added to this action with :ref:`action_add_event`. +An :ref:`InputEvent` can then be added to this action with :ref:`action_add_event()`. .. rst-class:: classref-item-separator @@ -191,7 +191,7 @@ Removes an action from the **InputMap**. :ref:`bool` **event_is_action**\ (\ event\: :ref:`InputEvent`, action\: :ref:`StringName`, exact_match\: :ref:`bool` = false\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the given event is part of an existing action. This method ignores keyboard modifiers if the given :ref:`InputEvent` is not pressed (for proper release detection). See :ref:`action_has_event` if you don't want this behavior. +Returns ``true`` if the given event is part of an existing action. This method ignores keyboard modifiers if the given :ref:`InputEvent` is not pressed (for proper release detection). See :ref:`action_has_event()` if you don't want this behavior. If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. diff --git a/classes/class_instanceplaceholder.rst b/classes/class_instanceplaceholder.rst index ae0381674..91916e97c 100644 --- a/classes/class_instanceplaceholder.rst +++ b/classes/class_instanceplaceholder.rst @@ -19,7 +19,7 @@ Placeholder for the root :ref:`Node` of a :ref:`PackedScene`. This is useful to avoid loading large scenes all at once by loading parts of it selectively. +Turning on the option **Load As Placeholder** for an instantiated scene in the editor causes it to be replaced by an **InstancePlaceholder** when running the game, this will not replace the node in the editor. This makes it possible to delay actually loading the scene until calling :ref:`create_instance()`. This is useful to avoid loading large scenes all at once by loading parts of it selectively. The **InstancePlaceholder** does not have a transform. This causes any child nodes to be positioned relatively to the :ref:`Viewport` from point (0,0), rather than their parent as displayed in the editor. Replacing the placeholder with a scene with a transform will transform children relatively to their parent again. @@ -56,7 +56,7 @@ Method Descriptions Call this method to actually load in the node. The created node will be placed as a sibling *above* the **InstancePlaceholder** in the scene tree. The :ref:`Node`'s reference is also returned for convenience. -\ **Note:** :ref:`create_instance` is not thread-safe. Use :ref:`Object.call_deferred` if calling from a thread. +\ **Note:** :ref:`create_instance()` is not thread-safe. Use :ref:`Object.call_deferred()` if calling from a thread. .. rst-class:: classref-item-separator @@ -68,7 +68,7 @@ Call this method to actually load in the node. The created node will be placed a :ref:`String` **get_instance_path**\ (\ ) |const| :ref:`πŸ”—` -Gets the path to the :ref:`PackedScene` resource file that is loaded by default when calling :ref:`create_instance`. Not thread-safe. Use :ref:`Object.call_deferred` if calling from a thread. +Gets the path to the :ref:`PackedScene` resource file that is loaded by default when calling :ref:`create_instance()`. Not thread-safe. Use :ref:`Object.call_deferred()` if calling from a thread. .. rst-class:: classref-item-separator @@ -80,7 +80,7 @@ Gets the path to the :ref:`PackedScene` resource file that is :ref:`Dictionary` **get_stored_values**\ (\ with_order\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Returns the list of properties that will be applied to the node when :ref:`create_instance` is called. +Returns the list of properties that will be applied to the node when :ref:`create_instance()` is called. If ``with_order`` is ``true``, a key named ``.order`` (note the leading period) is added to the dictionary. This ``.order`` key is an :ref:`Array` of :ref:`String` property names specifying the order in which properties will be applied (with index 0 being the first). diff --git a/classes/class_int.rst b/classes/class_int.rst index 0a32c039f..ba11cdb6a 100644 --- a/classes/class_int.rst +++ b/classes/class_int.rst @@ -211,7 +211,7 @@ Constructs an **int** as a copy of the given **int**. :ref:`int` **int**\ (\ from\: :ref:`String`\ ) -Constructs a new **int** from a :ref:`String`, following the same rules as :ref:`String.to_int`. +Constructs a new **int** from a :ref:`String`, following the same rules as :ref:`String.to_int()`. .. rst-class:: classref-item-separator @@ -272,7 +272,7 @@ Returns ``true`` if the **int**\ s are not equal. :ref:`int` **operator %**\ (\ right\: :ref:`int`\ ) :ref:`πŸ”—` -Returns the remainder after dividing two **int**\ s. Uses truncated division, which returns a negative number if the dividend is negative. If this is not desired, consider using :ref:`@GlobalScope.posmod`. +Returns the remainder after dividing two **int**\ s. Uses truncated division, which returns a negative number if the dividend is negative. If this is not desired, consider using :ref:`@GlobalScope.posmod()`. :: diff --git a/classes/class_intervaltweener.rst b/classes/class_intervaltweener.rst index db35d863b..150f4e022 100644 --- a/classes/class_intervaltweener.rst +++ b/classes/class_intervaltweener.rst @@ -19,9 +19,9 @@ Creates an idle interval in a :ref:`Tween` animation. Description ----------- -**IntervalTweener** is used to make delays in a tweening sequence. See :ref:`Tween.tween_interval` for more usage information. +**IntervalTweener** is used to make delays in a tweening sequence. See :ref:`Tween.tween_interval()` for more usage information. -\ **Note:** :ref:`Tween.tween_interval` is the only correct way to create **IntervalTweener**. Any **IntervalTweener** created manually will not function correctly. +\ **Note:** :ref:`Tween.tween_interval()` is the only correct way to create **IntervalTweener**. Any **IntervalTweener** created manually will not function correctly. .. |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_ip.rst b/classes/class_ip.rst index fec8e4057..52c7c24a1 100644 --- a/classes/class_ip.rst +++ b/classes/class_ip.rst @@ -242,7 +242,7 @@ Each adapter is a dictionary of the form: :ref:`String` **get_resolve_item_address**\ (\ id\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns a queued hostname's IP address, given its queue ``id``. Returns an empty string on error or if resolution hasn't happened yet (see :ref:`get_resolve_item_status`). +Returns a queued hostname's IP address, given its queue ``id``. Returns an empty string on error or if resolution hasn't happened yet (see :ref:`get_resolve_item_status()`). .. rst-class:: classref-item-separator @@ -254,7 +254,7 @@ Returns a queued hostname's IP address, given its queue ``id``. Returns an empty :ref:`Array` **get_resolve_item_addresses**\ (\ id\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns resolved addresses, or an empty array if an error happened or resolution didn't happen yet (see :ref:`get_resolve_item_status`). +Returns resolved addresses, or an empty array if an error happened or resolution didn't happen yet (see :ref:`get_resolve_item_status()`). .. rst-class:: classref-item-separator diff --git a/classes/class_javaclass.rst b/classes/class_javaclass.rst index 5ca861d1a..1d202d101 100644 --- a/classes/class_javaclass.rst +++ b/classes/class_javaclass.rst @@ -19,7 +19,7 @@ Represents a class from the Java Native Interface. Description ----------- -Represents a class from the Java Native Interface. It is returned from :ref:`JavaClassWrapper.wrap`. +Represents a class from the Java Native Interface. It is returned from :ref:`JavaClassWrapper.wrap()`. \ **Note:** This class only works on Android. On any other platform, this class does nothing. @@ -68,7 +68,7 @@ Returns the Java class name. :ref:`Array`\[:ref:`Dictionary`\] **get_java_method_list**\ (\ ) |const| :ref:`πŸ”—` -Returns the object's Java methods and their signatures as an :ref:`Array` of dictionaries, in the same format as :ref:`Object.get_method_list`. +Returns the object's Java methods and their signatures as an :ref:`Array` of dictionaries, in the same format as :ref:`Object.get_method_list()`. .. rst-class:: classref-item-separator diff --git a/classes/class_javaclasswrapper.rst b/classes/class_javaclasswrapper.rst index dd228632d..edca66d16 100644 --- a/classes/class_javaclasswrapper.rst +++ b/classes/class_javaclasswrapper.rst @@ -33,6 +33,8 @@ The JavaClassWrapper singleton provides a way for the Godot application to send print(datetime.format(formatter)) +\ **Warning:** When calling Java methods, be sure to check :ref:`get_exception()` to check if the method threw an exception. + .. rst-class:: classref-reftable-group Methods @@ -41,9 +43,11 @@ Methods .. table:: :widths: auto - +-----------------------------------+-------------------------------------------------------------------------------------------+ - | :ref:`JavaClass` | :ref:`wrap`\ (\ name\: :ref:`String`\ ) | - +-----------------------------------+-------------------------------------------------------------------------------------------+ + +-------------------------------------+-------------------------------------------------------------------------------------------+ + | :ref:`JavaObject` | :ref:`get_exception`\ (\ ) | + +-------------------------------------+-------------------------------------------------------------------------------------------+ + | :ref:`JavaClass` | :ref:`wrap`\ (\ name\: :ref:`String`\ ) | + +-------------------------------------+-------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -54,6 +58,20 @@ Methods Method Descriptions ------------------- +.. _class_JavaClassWrapper_method_get_exception: + +.. rst-class:: classref-method + +:ref:`JavaObject` **get_exception**\ (\ ) :ref:`πŸ”—` + +Returns the Java exception from the last call into a Java class. If there was no exception, it will return ``null``. + +\ **Note:** This method only works on Android. On every other platform, this method will always return ``null``. + +.. rst-class:: classref-item-separator + +---- + .. _class_JavaClassWrapper_method_wrap: .. rst-class:: classref-method diff --git a/classes/class_javascriptbridge.rst b/classes/class_javascriptbridge.rst index 5a0daf415..56394323a 100644 --- a/classes/class_javascriptbridge.rst +++ b/classes/class_javascriptbridge.rst @@ -75,7 +75,7 @@ Signals **pwa_update_available**\ (\ ) :ref:`πŸ”—` -Emitted when an update for this progressive web app has been detected but is waiting to be activated because a previous version is active. See :ref:`pwa_update` to force the update to take place immediately. +Emitted when an update for this progressive web app has been detected but is waiting to be activated because a previous version is active. See :ref:`pwa_update()` to force the update to take place immediately. .. rst-class:: classref-section-separator @@ -122,7 +122,7 @@ Prompts the user to download a file containing the specified ``buffer``. The fil \ **Note:** The browser may override the `MIME type `__ provided based on the file ``name``'s extension. -\ **Note:** Browsers might block the download if :ref:`download_buffer` is not being called from a user interaction (e.g. button click). +\ **Note:** Browsers might block the download if :ref:`download_buffer()` is not being called from a user interaction (e.g. button click). \ **Note:** Browsers might ask the user for permission or block the download if multiple download requests are made in a quick succession. @@ -188,7 +188,7 @@ Returns ``true`` if the given ``javascript_object`` is of type `[code]ArrayBuffe :ref:`PackedByteArray` **js_buffer_to_packed_byte_array**\ (\ javascript_buffer\: :ref:`JavaScriptObject`\ ) :ref:`πŸ”—` -Returns a copy of ``javascript_buffer``'s contents as a :ref:`PackedByteArray`. See also :ref:`is_js_buffer`. +Returns a copy of ``javascript_buffer``'s contents as a :ref:`PackedByteArray`. See also :ref:`is_js_buffer()`. .. rst-class:: classref-item-separator @@ -218,7 +218,7 @@ Performs the live update of the progressive web app. Forcing the new version to \ **Note:** Your application will be **reloaded in all browser tabs**. -\ **Note:** Only relevant when exported as a Progressive Web App and :ref:`pwa_needs_update` returns ``true``. +\ **Note:** Only relevant when exported as a Progressive Web App and :ref:`pwa_needs_update()` returns ``true``. .. |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_javascriptobject.rst b/classes/class_javascriptobject.rst index 44f4d870c..d4c337fbf 100644 --- a/classes/class_javascriptobject.rst +++ b/classes/class_javascriptobject.rst @@ -19,7 +19,7 @@ A wrapper class for web native JavaScript objects. Description ----------- -JavaScriptObject is used to interact with JavaScript objects retrieved or created via :ref:`JavaScriptBridge.get_interface`, :ref:`JavaScriptBridge.create_object`, or :ref:`JavaScriptBridge.create_callback`. +JavaScriptObject is used to interact with JavaScript objects retrieved or created via :ref:`JavaScriptBridge.get_interface()`, :ref:`JavaScriptBridge.create_object()`, or :ref:`JavaScriptBridge.create_callback()`. :: diff --git a/classes/class_json.rst b/classes/class_json.rst index 208c62be5..bb9b3a57f 100644 --- a/classes/class_json.rst +++ b/classes/class_json.rst @@ -21,9 +21,9 @@ Description The **JSON** class enables all data types to be converted to and from a JSON string. This is useful for serializing data, e.g. to save to a file or send over the network. -\ :ref:`stringify` is used to convert any data type into a JSON string. +\ :ref:`stringify()` is used to convert any data type into a JSON string. -\ :ref:`parse` is used to convert any existing JSON data into a :ref:`Variant` that can be used within Godot. If successfully parsed, use :ref:`data` to retrieve the :ref:`Variant`, and use :ref:`@GlobalScope.typeof` to check if the Variant's type is what you expect. JSON Objects are converted into a :ref:`Dictionary`, but JSON data can be used to store :ref:`Array`\ s, numbers, :ref:`String`\ s and even just a boolean. +\ :ref:`parse()` is used to convert any existing JSON data into a :ref:`Variant` that can be used within Godot. If successfully parsed, use :ref:`data` to retrieve the :ref:`Variant`, and use :ref:`@GlobalScope.typeof()` to check if the Variant's type is what you expect. JSON Objects are converted into a :ref:`Dictionary`, but JSON data can be used to store :ref:`Array`\ s, numbers, :ref:`String`\ s and even just a boolean. :: @@ -43,7 +43,7 @@ The **JSON** class enables all data types to be converted to and from a JSON str else: print("JSON Parse Error: ", json.get_error_message(), " in ", json_string, " at line ", json.get_error_line()) -Alternatively, you can parse strings using the static :ref:`parse_string` method, but it doesn't handle errors. +Alternatively, you can parse strings using the static :ref:`parse_string()` method, but it doesn't handle errors. :: @@ -55,7 +55,7 @@ Alternatively, you can parse strings using the static :ref:`parse_string` which is generally more lax than the JSON specification. +- Numbers are parsed using :ref:`String.to_float()` which is generally more lax than the JSON specification. - Certain errors, such as invalid Unicode sequences, do not cause a parser error. Instead, the string is cleaned up and an error is logged to the console. @@ -155,7 +155,7 @@ You can convert a native value to a JSON string like this: :ref:`int` **get_error_line**\ (\ ) |const| :ref:`πŸ”—` -Returns ``0`` if the last call to :ref:`parse` was successful, or the line number where the parse failed. +Returns ``0`` if the last call to :ref:`parse()` was successful, or the line number where the parse failed. .. rst-class:: classref-item-separator @@ -167,7 +167,7 @@ Returns ``0`` if the last call to :ref:`parse` was succ :ref:`String` **get_error_message**\ (\ ) |const| :ref:`πŸ”—` -Returns an empty string if the last call to :ref:`parse` was successful, or the error message if it failed. +Returns an empty string if the last call to :ref:`parse()` was successful, or the error message if it failed. .. rst-class:: classref-item-separator @@ -179,7 +179,7 @@ Returns an empty string if the last call to :ref:`parse :ref:`String` **get_parsed_text**\ (\ ) |const| :ref:`πŸ”—` -Return the text parsed by :ref:`parse` (requires passing ``keep_text`` to :ref:`parse`). +Return the text parsed by :ref:`parse()` (requires passing ``keep_text`` to :ref:`parse()`). .. rst-class:: classref-item-separator @@ -193,11 +193,11 @@ Return the text parsed by :ref:`parse` (requires passin Attempts to parse the ``json_text`` provided. -Returns an :ref:`Error`. If the parse was successful, it returns :ref:`@GlobalScope.OK` and the result can be retrieved using :ref:`data`. If unsuccessful, use :ref:`get_error_line` and :ref:`get_error_message` to identify the source of the failure. +Returns an :ref:`Error`. If the parse was successful, it returns :ref:`@GlobalScope.OK` and the result can be retrieved using :ref:`data`. If unsuccessful, use :ref:`get_error_line()` and :ref:`get_error_message()` to identify the source of the failure. -Non-static variant of :ref:`parse_string`, if you want custom error handling. +Non-static variant of :ref:`parse_string()`, if you want custom error handling. -The optional ``keep_text`` argument instructs the parser to keep a copy of the original text. This text can be obtained later by using the :ref:`get_parsed_text` function and is used when saving the resource (instead of generating new text from :ref:`data`). +The optional ``keep_text`` argument instructs the parser to keep a copy of the original text. This text can be obtained later by using the :ref:`get_parsed_text()` function and is used when saving the resource (instead of generating new text from :ref:`data`). .. rst-class:: classref-item-separator @@ -278,7 +278,7 @@ The ``indent`` parameter controls if and how something is indented; its contents :ref:`Variant` **to_native**\ (\ json\: :ref:`Variant`, allow_objects\: :ref:`bool` = false\ ) |static| :ref:`πŸ”—` -Converts a JSON-compliant value that was created with :ref:`from_native` back to native engine types. +Converts a JSON-compliant value that was created with :ref:`from_native()` back to native engine types. By default, objects are ignored for security reasons, unless ``allow_objects`` is ``true``. diff --git a/classes/class_jsonrpc.rst b/classes/class_jsonrpc.rst index 00523578a..15dabe115 100644 --- a/classes/class_jsonrpc.rst +++ b/classes/class_jsonrpc.rst @@ -66,7 +66,7 @@ enum **ErrorCode**: :ref:`πŸ”—` :ref:`ErrorCode` **PARSE_ERROR** = ``-32700`` -The request could not be parsed as it was not valid by JSON standard (:ref:`JSON.parse` failed). +The request could not be parsed as it was not valid by JSON standard (:ref:`JSON.parse()` failed). .. _class_JSONRPC_constant_INVALID_REQUEST: @@ -185,7 +185,7 @@ Creates a response which indicates a previous reply has failed in some way. Given a Dictionary which takes the form of a JSON-RPC request: unpack the request and run it. Methods are resolved by looking at the field called "method" and looking for an equivalently named function in the JSONRPC object. If one is found that method is called. -To add new supported methods extend the JSONRPC class and call :ref:`process_action` on your subclass. +To add new supported methods extend the JSONRPC class and call :ref:`process_action()` on your subclass. \ ``action``: The action to be run, as a Dictionary in the form of a JSON-RPC request or notification. diff --git a/classes/class_kinematiccollision2d.rst b/classes/class_kinematiccollision2d.rst index 4964234c5..a06307078 100644 --- a/classes/class_kinematiccollision2d.rst +++ b/classes/class_kinematiccollision2d.rst @@ -19,7 +19,7 @@ Holds collision data from the movement of a :ref:`PhysicsBody2D`, usually from :ref:`PhysicsBody2D.move_and_collide`. When a :ref:`PhysicsBody2D` is moved, it stops if it detects a collision with another body. If a collision is detected, a **KinematicCollision2D** object is returned. +Holds collision data from the movement of a :ref:`PhysicsBody2D`, usually from :ref:`PhysicsBody2D.move_and_collide()`. When a :ref:`PhysicsBody2D` is moved, it stops if it detects a collision with another body. If a collision is detected, a **KinematicCollision2D** object is returned. The collision data includes the colliding object, the remaining motion, and the collision position. This data can be used to determine a custom response to the collision. @@ -98,7 +98,7 @@ Returns the colliding body's attached :ref:`Object`. :ref:`int` **get_collider_id**\ (\ ) |const| :ref:`πŸ”—` -Returns the unique instance ID of the colliding body's attached :ref:`Object`. See :ref:`Object.get_instance_id`. +Returns the unique instance ID of the colliding body's attached :ref:`Object`. See :ref:`Object.get_instance_id()`. .. rst-class:: classref-item-separator diff --git a/classes/class_kinematiccollision3d.rst b/classes/class_kinematiccollision3d.rst index 167bb1af9..a2380aabe 100644 --- a/classes/class_kinematiccollision3d.rst +++ b/classes/class_kinematiccollision3d.rst @@ -19,7 +19,7 @@ Holds collision data from the movement of a :ref:`PhysicsBody3D`, usually from :ref:`PhysicsBody3D.move_and_collide`. When a :ref:`PhysicsBody3D` is moved, it stops if it detects a collision with another body. If a collision is detected, a **KinematicCollision3D** object is returned. +Holds collision data from the movement of a :ref:`PhysicsBody3D`, usually from :ref:`PhysicsBody3D.move_and_collide()`. When a :ref:`PhysicsBody3D` is moved, it stops if it detects a collision with another body. If a collision is detected, a **KinematicCollision3D** object is returned. The collision data includes the colliding object, the remaining motion, and the collision position. This data can be used to determine a custom response to the collision. @@ -100,7 +100,7 @@ Returns the colliding body's attached :ref:`Object` given a collis :ref:`int` **get_collider_id**\ (\ collision_index\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Returns the unique instance ID of the colliding body's attached :ref:`Object` given a collision index (the deepest collision by default). See :ref:`Object.get_instance_id`. +Returns the unique instance ID of the colliding body's attached :ref:`Object` given a collision index (the deepest collision by default). See :ref:`Object.get_instance_id()`. .. rst-class:: classref-item-separator diff --git a/classes/class_label.rst b/classes/class_label.rst index 563896fd6..400efb550 100644 --- a/classes/class_label.rst +++ b/classes/class_label.rst @@ -505,7 +505,7 @@ Sets the clipping behavior when :ref:`visible_characters`\ ) - :ref:`float` **get_visible_ratio**\ (\ ) -The fraction of characters to display, relative to the total number of characters (see :ref:`get_total_character_count`). If set to ``1.0``, all characters are displayed. If set to ``0.5``, only half of the characters will be displayed. This can be useful when animating the text appearing in a dialog box. +The fraction of characters to display, relative to the total number of characters (see :ref:`get_total_character_count()`). If set to ``1.0``, all characters are displayed. If set to ``0.5``, only half of the characters will be displayed. This can be useful when animating the text appearing in a dialog box. \ **Note:** Setting this property updates :ref:`visible_characters` accordingly. diff --git a/classes/class_line2d.rst b/classes/class_line2d.rst index 809575a49..ff51c8bb6 100644 --- a/classes/class_line2d.rst +++ b/classes/class_line2d.rst @@ -469,7 +469,7 @@ Method Descriptions Adds a point with the specified ``position`` relative to the polyline's own position. If no ``index`` is provided, the new point will be added to the end of the points array. -If ``index`` is given, the new point is inserted before the existing point identified by index ``index``. The indices of the points after the new point get increased by 1. The provided ``index`` must not exceed the number of existing points in the polyline. See :ref:`get_point_count`. +If ``index`` is given, the new point is inserted before the existing point identified by index ``index``. The indices of the points after the new point get increased by 1. The provided ``index`` must not exceed the number of existing points in the polyline. See :ref:`get_point_count()`. .. rst-class:: classref-item-separator diff --git a/classes/class_lineedit.rst b/classes/class_lineedit.rst index 08933f39a..e6f33e8aa 100644 --- a/classes/class_lineedit.rst +++ b/classes/class_lineedit.rst @@ -30,11 +30,11 @@ Description - To exit edit mode, press ``ui_text_submit`` or ``ui_cancel`` (by default :kbd:`Escape`) actions. -- Check :ref:`edit`, :ref:`unedit`, :ref:`is_editing`, and :ref:`editing_toggled` for more information. +- Check :ref:`edit()`, :ref:`unedit()`, :ref:`is_editing()`, and :ref:`editing_toggled` for more information. \ **Important:**\ -- Focusing the **LineEdit** with ``ui_focus_next`` (by default :kbd:`Tab`) or ``ui_focus_prev`` (by default :kbd:`Shift + Tab`) or :ref:`Control.grab_focus` still enters edit mode (for compatibility). +- Focusing the **LineEdit** with ``ui_focus_next`` (by default :kbd:`Tab`) or ``ui_focus_prev`` (by default :kbd:`Shift + Tab`) or :ref:`Control.grab_focus()` still enters edit mode (for compatibility). \ **LineEdit** features many built-in shortcuts that are always available (:kbd:`Ctrl` here maps to :kbd:`Cmd` on macOS): @@ -354,7 +354,7 @@ Copies the selected text. Pastes the clipboard text over the selected text (or at the caret's position). -Non-printable escape characters are automatically stripped from the OS clipboard via :ref:`String.strip_escapes`. +Non-printable escape characters are automatically stripped from the OS clipboard via :ref:`String.strip_escapes()`. .. _class_LineEdit_constant_MENU_CLEAR: diff --git a/classes/class_linkbutton.rst b/classes/class_linkbutton.rst index 6fd24d30a..59dfb1e39 100644 --- a/classes/class_linkbutton.rst +++ b/classes/class_linkbutton.rst @@ -246,7 +246,7 @@ The underline mode to use for the text. See :ref:`UnderlineMode`\ ) - :ref:`String` **get_uri**\ (\ ) -The `URI `__ for this **LinkButton**. If set to a valid URI, pressing the button opens the URI using the operating system's default program for the protocol (via :ref:`OS.shell_open`). HTTP and HTTPS URLs open the default web browser. +The `URI `__ for this **LinkButton**. If set to a valid URI, pressing the button opens the URI using the operating system's default program for the protocol (via :ref:`OS.shell_open()`). HTTP and HTTPS URLs open the default web browser. .. tabs:: diff --git a/classes/class_lookatmodifier3d.rst b/classes/class_lookatmodifier3d.rst index 0cb0e5530..a810d677e 100644 --- a/classes/class_lookatmodifier3d.rst +++ b/classes/class_lookatmodifier3d.rst @@ -643,7 +643,7 @@ The transition type of the time-based interpolation. See also :ref:`TransitionTy If ``true``, limits the degree of rotation. This helps prevent the character's neck from rotating 360 degrees. -\ **Note:** As with :ref:`AnimationTree` blending, interpolation is provided that favors :ref:`Skeleton3D.get_bone_rest`. This means that interpolation does not select the shortest path in some cases. +\ **Note:** As with :ref:`AnimationTree` blending, interpolation is provided that favors :ref:`Skeleton3D.get_bone_rest()`. This means that interpolation does not select the shortest path in some cases. \ **Note:** Some :ref:`transition_type` may exceed the limitations (e.g. `Back`, `Elastic`, and `Spring`). If interpolation occurs while overshooting the limitations, the result might possibly not respect the bone rest. @@ -691,7 +691,7 @@ Returns the remaining seconds of the time-based interpolation. :ref:`bool` **is_interpolating**\ (\ ) |const| :ref:`πŸ”—` -Returns whether the time-based interpolation is running or not. If ``true``, it is equivalent to :ref:`get_interpolation_remaining` being ``0``. +Returns whether the time-based interpolation is running or not. If ``true``, it is equivalent to :ref:`get_interpolation_remaining()` being ``0``. This is useful to determine whether a **LookAtModifier3D** can be removed safely. @@ -707,7 +707,7 @@ This is useful to determine whether a **LookAtModifier3D** can be removed safely Returns whether the target is within the angle limitations. It is useful for unsetting the :ref:`target_node` when the target is outside of the angle limitations. -\ **Note:** The value is updated after :ref:`SkeletonModifier3D._process_modification`. To retrieve this value correctly, we recommend using the signal :ref:`SkeletonModifier3D.modification_processed`. +\ **Note:** The value is updated after :ref:`SkeletonModifier3D._process_modification()`. To retrieve this value correctly, we recommend using the signal :ref:`SkeletonModifier3D.modification_processed`. .. |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_mainloop.rst b/classes/class_mainloop.rst index 3de21f15d..216d39823 100644 --- a/classes/class_mainloop.rst +++ b/classes/class_mainloop.rst @@ -141,7 +141,7 @@ Specific to the iOS platform. **NOTIFICATION_TRANSLATION_CHANGED** = ``2010`` :ref:`πŸ”—` -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. 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()`. .. _class_MainLoop_constant_NOTIFICATION_WM_ABOUT: @@ -262,11 +262,11 @@ Called once during initialization. :ref:`bool` **_physics_process**\ (\ delta\: :ref:`float`\ ) |virtual| :ref:`πŸ”—` -Called each physics frame with the time since the last physics frame as argument (``delta``, in seconds). Equivalent to :ref:`Node._physics_process`. +Called each physics frame with the time since the last physics frame as argument (``delta``, in seconds). Equivalent to :ref:`Node._physics_process()`. If implemented, the method must return a boolean value. ``true`` ends the main loop, while ``false`` lets it proceed to the next frame. -\ **Note:** ``delta`` will be larger than expected if running at a framerate lower than :ref:`Engine.physics_ticks_per_second` / :ref:`Engine.max_physics_steps_per_frame` FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both :ref:`_process` and :ref:`_physics_process`. As a result, avoid using ``delta`` for time measurements in real-world seconds. Use the :ref:`Time` singleton's methods for this purpose instead, such as :ref:`Time.get_ticks_usec`. +\ **Note:** ``delta`` will be larger than expected if running at a framerate lower than :ref:`Engine.physics_ticks_per_second` / :ref:`Engine.max_physics_steps_per_frame` FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both :ref:`_process()` and :ref:`_physics_process()`. As a result, avoid using ``delta`` for time measurements in real-world seconds. Use the :ref:`Time` singleton's methods for this purpose instead, such as :ref:`Time.get_ticks_usec()`. .. rst-class:: classref-item-separator @@ -278,11 +278,11 @@ If implemented, the method must return a boolean value. ``true`` ends the main l :ref:`bool` **_process**\ (\ delta\: :ref:`float`\ ) |virtual| :ref:`πŸ”—` -Called each process (idle) frame with the time since the last process frame as argument (in seconds). Equivalent to :ref:`Node._process`. +Called each process (idle) frame with the time since the last process frame as argument (in seconds). Equivalent to :ref:`Node._process()`. If implemented, the method must return a boolean value. ``true`` ends the main loop, while ``false`` lets it proceed to the next frame. -\ **Note:** ``delta`` will be larger than expected if running at a framerate lower than :ref:`Engine.physics_ticks_per_second` / :ref:`Engine.max_physics_steps_per_frame` FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both :ref:`_process` and :ref:`_physics_process`. As a result, avoid using ``delta`` for time measurements in real-world seconds. Use the :ref:`Time` singleton's methods for this purpose instead, such as :ref:`Time.get_ticks_usec`. +\ **Note:** ``delta`` will be larger than expected if running at a framerate lower than :ref:`Engine.physics_ticks_per_second` / :ref:`Engine.max_physics_steps_per_frame` FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both :ref:`_process()` and :ref:`_physics_process()`. As a result, avoid using ``delta`` for time measurements in real-world seconds. Use the :ref:`Time` singleton's methods for this purpose instead, such as :ref:`Time.get_ticks_usec()`. .. |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_marshalls.rst b/classes/class_marshalls.rst index 98d1a81a7..c8834d50c 100644 --- a/classes/class_marshalls.rst +++ b/classes/class_marshalls.rst @@ -84,7 +84,7 @@ Returns a decoded string corresponding to the Base64-encoded string ``base64_str Returns a decoded :ref:`Variant` corresponding to the Base64-encoded string ``base64_str``. If ``allow_objects`` is ``true``, decoding objects is allowed. -Internally, this uses the same decoding mechanism as the :ref:`@GlobalScope.bytes_to_var` method. +Internally, this uses the same decoding mechanism as the :ref:`@GlobalScope.bytes_to_var()` method. \ **Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. @@ -124,7 +124,7 @@ Returns a Base64-encoded string of the UTF-8 string ``utf8_str``. Returns a Base64-encoded string of the :ref:`Variant` ``variant``. If ``full_objects`` is ``true``, encoding objects is allowed (and can potentially include code). -Internally, this uses the same encoding mechanism as the :ref:`@GlobalScope.var_to_bytes` method. +Internally, this uses the same encoding mechanism as the :ref:`@GlobalScope.var_to_bytes()` method. .. |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_material.rst b/classes/class_material.rst index ec4bec7ce..ce05d1ad9 100644 --- a/classes/class_material.rst +++ b/classes/class_material.rst @@ -217,7 +217,7 @@ Creates a placeholder version of this resource (:ref:`PlaceholderMaterial` -Only available when running in the editor. Opens a popup that visualizes the generated shader code, including all variants and internal shader code. See also :ref:`Shader.inspect_native_shader_code`. +Only available when running in the editor. Opens a popup that visualizes the generated shader code, including all variants and internal shader code. See also :ref:`Shader.inspect_native_shader_code()`. .. |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_menubar.rst b/classes/class_menubar.rst index 1356e157b..3d8a70850 100644 --- a/classes/class_menubar.rst +++ b/classes/class_menubar.rst @@ -19,7 +19,7 @@ A horizontal menu bar that creates a menu for each :ref:`PopupMenu` child. New items are created by adding :ref:`PopupMenu`\ s to this node. Item title is determined by :ref:`Window.title`, or node name if :ref:`Window.title` is empty. Item title can be overridden using :ref:`set_menu_title`. +A horizontal menu bar that creates a menu for each :ref:`PopupMenu` child. New items are created by adding :ref:`PopupMenu`\ s to this node. Item title is determined by :ref:`Window.title`, or node name if :ref:`Window.title` is empty. Item title can be overridden using :ref:`set_menu_title()`. .. rst-class:: classref-reftable-group diff --git a/classes/class_mesh.rst b/classes/class_mesh.rst index c75c8c8ab..bfe43ae2a 100644 --- a/classes/class_mesh.rst +++ b/classes/class_mesh.rst @@ -557,7 +557,7 @@ Mask of custom format bits per custom channel. Must be shifted by one of the SHI :ref:`ArrayFormat` **ARRAY_COMPRESS_FLAGS_BASE** = ``25`` -Shift of first compress flag. Compress flags should be passed to :ref:`ArrayMesh.add_surface_from_arrays` and :ref:`SurfaceTool.commit`. +Shift of first compress flag. Compress flags should be passed to :ref:`ArrayMesh.add_surface_from_arrays()` and :ref:`SurfaceTool.commit()`. .. _class_Mesh_constant_ARRAY_FLAG_USE_2D_VERTICES: @@ -922,7 +922,7 @@ Returns all the vertices that make up the faces of the mesh. Each three vertices :ref:`int` **get_surface_count**\ (\ ) |const| :ref:`πŸ”—` -Returns the number of surfaces that the **Mesh** holds. This is equivalent to :ref:`MeshInstance3D.get_surface_override_material_count`. +Returns the number of surfaces that the **Mesh** holds. This is equivalent to :ref:`MeshInstance3D.get_surface_override_material_count()`. .. rst-class:: classref-item-separator @@ -934,7 +934,7 @@ Returns the number of surfaces that the **Mesh** holds. This is equivalent to :r :ref:`Array` **surface_get_arrays**\ (\ surf_idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the arrays for the vertices, normals, UVs, etc. that make up the requested surface (see :ref:`ArrayMesh.add_surface_from_arrays`). +Returns the arrays for the vertices, normals, UVs, etc. that make up the requested surface (see :ref:`ArrayMesh.add_surface_from_arrays()`). .. rst-class:: classref-item-separator @@ -960,7 +960,7 @@ Returns the blend shape arrays for the requested surface. Returns a :ref:`Material` in a given surface. Surface is rendered using this material. -\ **Note:** This returns the material within the **Mesh** resource, not the :ref:`Material` associated to the :ref:`MeshInstance3D`'s Surface Material Override properties. To get the :ref:`Material` associated to the :ref:`MeshInstance3D`'s Surface Material Override properties, use :ref:`MeshInstance3D.get_surface_override_material` instead. +\ **Note:** This returns the material within the **Mesh** resource, not the :ref:`Material` associated to the :ref:`MeshInstance3D`'s Surface Material Override properties. To get the :ref:`Material` associated to the :ref:`MeshInstance3D`'s Surface Material Override properties, use :ref:`MeshInstance3D.get_surface_override_material()` instead. .. rst-class:: classref-item-separator @@ -974,7 +974,7 @@ Returns a :ref:`Material` in a given surface. Surface is rendere Sets a :ref:`Material` for a given surface. Surface will be rendered using this material. -\ **Note:** This assigns the material within the **Mesh** resource, not the :ref:`Material` associated to the :ref:`MeshInstance3D`'s Surface Material Override properties. To set the :ref:`Material` associated to the :ref:`MeshInstance3D`'s Surface Material Override properties, use :ref:`MeshInstance3D.set_surface_override_material` instead. +\ **Note:** This assigns the material within the **Mesh** resource, not the :ref:`Material` associated to the :ref:`MeshInstance3D`'s Surface Material Override properties. To set the :ref:`Material` associated to the :ref:`MeshInstance3D`'s Surface Material Override properties, use :ref:`MeshInstance3D.set_surface_override_material()` 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.)` diff --git a/classes/class_meshdatatool.rst b/classes/class_meshdatatool.rst index 40f22a67c..5662676d2 100644 --- a/classes/class_meshdatatool.rst +++ b/classes/class_meshdatatool.rst @@ -21,7 +21,7 @@ Description MeshDataTool provides access to individual vertices in a :ref:`Mesh`. It allows users to read and edit vertex data of meshes. It also creates an array of faces and edges. -To use MeshDataTool, load a mesh with :ref:`create_from_surface`. When you are finished editing the data commit the data to a mesh with :ref:`commit_to_surface`. +To use MeshDataTool, load a mesh with :ref:`create_from_surface()`. When you are finished editing the data commit the data to a mesh with :ref:`commit_to_surface()`. Below is an example of how MeshDataTool may be used. diff --git a/classes/class_meshinstance3d.rst b/classes/class_meshinstance3d.rst index 76594c4af..c0058626e 100644 --- a/classes/class_meshinstance3d.rst +++ b/classes/class_meshinstance3d.rst @@ -293,7 +293,7 @@ Returns the value of the blend shape at the given ``blend_shape_idx``. Returns ` :ref:`SkinReference` **get_skin_reference**\ (\ ) |const| :ref:`πŸ”—` -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`. +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 @@ -305,9 +305,9 @@ Returns the internal :ref:`SkinReference` containing the sk :ref:`Material` **get_surface_override_material**\ (\ surface\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the override :ref:`Material` for the specified ``surface`` of the :ref:`Mesh` resource. See also :ref:`get_surface_override_material_count`. +Returns the override :ref:`Material` for the specified ``surface`` of the :ref:`Mesh` resource. See also :ref:`get_surface_override_material_count()`. -\ **Note:** This returns the :ref:`Material` associated to the **MeshInstance3D**'s Surface Material Override properties, not the material within the :ref:`Mesh` resource. To get the material within the :ref:`Mesh` resource, use :ref:`Mesh.surface_get_material` instead. +\ **Note:** This returns the :ref:`Material` associated to the **MeshInstance3D**'s Surface Material Override properties, not the material within the :ref:`Mesh` resource. To get the material within the :ref:`Mesh` resource, use :ref:`Mesh.surface_get_material()` instead. .. rst-class:: classref-item-separator @@ -319,7 +319,7 @@ Returns the override :ref:`Material` for the specified ``surface :ref:`int` **get_surface_override_material_count**\ (\ ) |const| :ref:`πŸ”—` -Returns the number of surface override materials. This is equivalent to :ref:`Mesh.get_surface_count`. See also :ref:`get_surface_override_material`. +Returns the number of surface override materials. This is equivalent to :ref:`Mesh.get_surface_count()`. See also :ref:`get_surface_override_material()`. .. rst-class:: classref-item-separator @@ -345,7 +345,7 @@ Sets the value of the blend shape at ``blend_shape_idx`` to ``value``. Produces Sets the override ``material`` for the specified ``surface`` of the :ref:`Mesh` resource. This material is associated with this **MeshInstance3D** rather than with :ref:`mesh`. -\ **Note:** This assigns the :ref:`Material` associated to the **MeshInstance3D**'s Surface Material Override properties, not the material within the :ref:`Mesh` resource. To set the material within the :ref:`Mesh` resource, use :ref:`Mesh.surface_set_material` instead. +\ **Note:** This assigns the :ref:`Material` associated to the **MeshInstance3D**'s Surface Material Override properties, not the material within the :ref:`Mesh` resource. To set the material within the :ref:`Mesh` resource, use :ref:`Mesh.surface_set_material()` 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.)` diff --git a/classes/class_meshlibrary.rst b/classes/class_meshlibrary.rst index b59ed7658..b4b27b69f 100644 --- a/classes/class_meshlibrary.rst +++ b/classes/class_meshlibrary.rst @@ -117,7 +117,7 @@ Clears the library. Creates a new item in the library with the given ID. -You can get an unused ID from :ref:`get_last_unused_item_id`. +You can get an unused ID from :ref:`get_last_unused_item_id()`. .. rst-class:: classref-item-separator @@ -237,7 +237,7 @@ Returns the transform applied to the item's navigation mesh. :ref:`Texture2D` **get_item_preview**\ (\ id\: :ref:`int`\ ) |const| :ref:`πŸ”—` -When running in the editor, returns a generated item preview (a 3D rendering in isometric perspective). When used in a running project, returns the manually-defined item preview which can be set using :ref:`set_item_preview`. Returns an empty :ref:`Texture2D` if no preview was manually set in a running project. +When running in the editor, returns a generated item preview (a 3D rendering in isometric perspective). When used in a running project, returns the manually-defined item preview which can be set using :ref:`set_item_preview()`. Returns an empty :ref:`Texture2D` if no preview was manually set in a running project. .. rst-class:: classref-item-separator @@ -325,7 +325,7 @@ Sets the transform to apply to the item's mesh. Sets the item's name. -This name is shown in the editor. It can also be used to look up the item later using :ref:`find_item_by_name`. +This name is shown in the editor. It can also be used to look up the item later using :ref:`find_item_by_name()`. .. rst-class:: classref-item-separator diff --git a/classes/class_methodtweener.rst b/classes/class_methodtweener.rst index 3e421a24b..c989041ab 100644 --- a/classes/class_methodtweener.rst +++ b/classes/class_methodtweener.rst @@ -19,11 +19,11 @@ Interpolates an abstract value and supplies it to a method called over time. Description ----------- -**MethodTweener** is similar to a combination of :ref:`CallbackTweener` and :ref:`PropertyTweener`. It calls a method providing an interpolated value as a parameter. See :ref:`Tween.tween_method` for more usage information. +**MethodTweener** is similar to a combination of :ref:`CallbackTweener` and :ref:`PropertyTweener`. It calls a method providing an interpolated value as a parameter. See :ref:`Tween.tween_method()` for more usage information. The tweener will finish automatically if the callback's target object is freed. -\ **Note:** :ref:`Tween.tween_method` is the only correct way to create **MethodTweener**. Any **MethodTweener** created manually will not function correctly. +\ **Note:** :ref:`Tween.tween_method()` is the only correct way to create **MethodTweener**. Any **MethodTweener** created manually will not function correctly. .. rst-class:: classref-reftable-group diff --git a/classes/class_missingnode.rst b/classes/class_missingnode.rst index a56c2edbc..e8994206a 100644 --- a/classes/class_missingnode.rst +++ b/classes/class_missingnode.rst @@ -59,7 +59,7 @@ Property Descriptions - |void| **set_original_class**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_original_class**\ (\ ) -The name of the class this node was supposed to be (see :ref:`Object.get_class`). +The name of the class this node was supposed to be (see :ref:`Object.get_class()`). .. rst-class:: classref-item-separator diff --git a/classes/class_missingresource.rst b/classes/class_missingresource.rst index 6037d4103..ee4a81be7 100644 --- a/classes/class_missingresource.rst +++ b/classes/class_missingresource.rst @@ -57,7 +57,7 @@ Property Descriptions - |void| **set_original_class**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_original_class**\ (\ ) -The name of the class this resource was supposed to be (see :ref:`Object.get_class`). +The name of the class this resource was supposed to be (see :ref:`Object.get_class()`). .. rst-class:: classref-item-separator @@ -74,7 +74,7 @@ The name of the class this resource was supposed to be (see :ref:`Object.get_cla - |void| **set_recording_properties**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_recording_properties**\ (\ ) -If set to ``true``, allows new properties to be added on top of the existing ones with :ref:`Object.set`. +If set to ``true``, allows new properties to be added on top of the existing ones with :ref:`Object.set()`. .. |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_moviewriter.rst b/classes/class_moviewriter.rst index 62b318c73..9bab0f83a 100644 --- a/classes/class_moviewriter.rst +++ b/classes/class_moviewriter.rst @@ -19,7 +19,7 @@ Abstract class for non-real-time video recording encoders. Description ----------- -Godot can record videos with non-real-time simulation. Like the ``--fixed-fps`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`, this forces the reported ``delta`` in :ref:`Node._process` functions to be identical across frames, regardless of how long it actually took to render the frame. This can be used to record high-quality videos with perfect frame pacing regardless of your hardware's capabilities. +Godot can record videos with non-real-time simulation. Like the ``--fixed-fps`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`, this forces the reported ``delta`` in :ref:`Node._process()` functions to be identical across frames, regardless of how long it actually took to render the frame. This can be used to record high-quality videos with perfect frame pacing regardless of your hardware's capabilities. Godot has 2 built-in **MovieWriter**\ s: @@ -72,7 +72,7 @@ Method Descriptions :ref:`int` **_get_audio_mix_rate**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Called when the audio sample rate used for recording the audio is requested by the engine. The value returned must be specified in Hz. Defaults to 48000 Hz if :ref:`_get_audio_mix_rate` is not overridden. +Called when the audio sample rate used for recording the audio is requested by the engine. The value returned must be specified in Hz. Defaults to 48000 Hz if :ref:`_get_audio_mix_rate()` is not overridden. .. rst-class:: classref-item-separator @@ -84,7 +84,7 @@ Called when the audio sample rate used for recording the audio is requested by t :ref:`SpeakerMode` **_get_audio_speaker_mode**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Called when the audio speaker mode used for recording the audio is requested by the engine. This can affect the number of output channels in the resulting audio file/stream. Defaults to :ref:`AudioServer.SPEAKER_MODE_STEREO` if :ref:`_get_audio_speaker_mode` is not overridden. +Called when the audio speaker mode used for recording the audio is requested by the engine. This can affect the number of output channels in the resulting audio file/stream. Defaults to :ref:`AudioServer.SPEAKER_MODE_STEREO` if :ref:`_get_audio_speaker_mode()` is not overridden. .. rst-class:: classref-item-separator @@ -96,7 +96,7 @@ Called when the audio speaker mode used for recording the audio is requested by :ref:`bool` **_handles_file**\ (\ path\: :ref:`String`\ ) |virtual| |const| :ref:`πŸ”—` -Called when the engine determines whether this **MovieWriter** is able to handle the file at ``path``. Must return ``true`` if this **MovieWriter** is able to handle the given file path, ``false`` otherwise. Typically, :ref:`_handles_file` is overridden as follows to allow the user to record a file at any path with a given file extension: +Called when the engine determines whether this **MovieWriter** is able to handle the file at ``path``. Must return ``true`` if this **MovieWriter** is able to handle the given file path, ``false`` otherwise. Typically, :ref:`_handles_file()` is overridden as follows to allow the user to record a file at any path with a given file extension: :: @@ -127,9 +127,9 @@ Called once before the engine starts writing video and audio data. ``movie_size` |void| **_write_end**\ (\ ) |virtual| :ref:`πŸ”—` -Called when the engine finishes writing. This occurs when the engine quits by pressing the window manager's close button, or when :ref:`SceneTree.quit` is called. +Called when the engine finishes writing. This occurs when the engine quits by pressing the window manager's close button, or when :ref:`SceneTree.quit()` is called. -\ **Note:** Pressing :kbd:`Ctrl + C` on the terminal running the editor/project does *not* result in :ref:`_write_end` being called. +\ **Note:** Pressing :kbd:`Ctrl + C` on the terminal running the editor/project does *not* result in :ref:`_write_end()` being called. .. rst-class:: classref-item-separator @@ -153,9 +153,9 @@ Called at the end of every rendered frame. The ``frame_image`` and ``audio_frame |void| **add_writer**\ (\ writer\: :ref:`MovieWriter`\ ) |static| :ref:`πŸ”—` -Adds a writer to be usable by the engine. The supported file extensions can be set by overriding :ref:`_handles_file`. +Adds a writer to be usable by the engine. The supported file extensions can be set by overriding :ref:`_handles_file()`. -\ **Note:** :ref:`add_writer` must be called early enough in the engine initialization to work, as movie writing is designed to start at the same time as the rest of the engine. +\ **Note:** :ref:`add_writer()` must be called early enough in the engine initialization to work, as movie writing is designed to start at the same time as the rest of the engine. .. |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_multimesh.rst b/classes/class_multimesh.rst index 8cdee6bb9..72b639896 100644 --- a/classes/class_multimesh.rst +++ b/classes/class_multimesh.rst @@ -206,7 +206,7 @@ Property Descriptions :ref:`PackedColorArray` **color_array** :ref:`πŸ”—` -**Deprecated:** Accessing this property is very slow. Use :ref:`set_instance_color` and :ref:`get_instance_color` instead. +**Deprecated:** Accessing this property is very slow. Use :ref:`set_instance_color()` and :ref:`get_instance_color()` instead. Array containing each :ref:`Color` used by all instances of this mesh. @@ -239,7 +239,7 @@ Custom AABB for this MultiMesh resource. Setting this manually prevents costly r :ref:`PackedColorArray` **custom_data_array** :ref:`πŸ”—` -**Deprecated:** Accessing this property is very slow. Use :ref:`set_instance_custom_data` and :ref:`get_instance_custom_data` instead. +**Deprecated:** Accessing this property is very slow. Use :ref:`set_instance_custom_data()` and :ref:`get_instance_custom_data()` instead. Array containing each custom data value used by all instances of this mesh, as a :ref:`PackedColorArray`. @@ -281,7 +281,7 @@ By default, all instances are drawn but you can limit this with :ref:`visible_in :ref:`Mesh` resource to be instanced. -The looks of the individual instances can be modified using :ref:`set_instance_color` and :ref:`set_instance_custom_data`. +The looks of the individual instances can be modified using :ref:`set_instance_color()` and :ref:`set_instance_custom_data()`. .. rst-class:: classref-item-separator @@ -314,7 +314,7 @@ When using low physics tick rates (typically below 20) or high rates of object r :ref:`PackedVector2Array` **transform_2d_array** :ref:`πŸ”—` -**Deprecated:** Accessing this property is very slow. Use :ref:`set_instance_transform_2d` and :ref:`get_instance_transform_2d` instead. +**Deprecated:** Accessing this property is very slow. Use :ref:`set_instance_transform_2d()` and :ref:`get_instance_transform_2d()` instead. 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``. @@ -330,7 +330,7 @@ Array containing each :ref:`Transform2D` value used by all in :ref:`PackedVector3Array` **transform_array** :ref:`πŸ”—` -**Deprecated:** Accessing this property is very slow. Use :ref:`set_instance_transform` and :ref:`get_instance_transform` instead. +**Deprecated:** Accessing this property is very slow. Use :ref:`set_instance_transform()` and :ref:`get_instance_transform()` instead. 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``. @@ -368,7 +368,7 @@ Format of transform used to transform mesh, either 2D or 3D. - |void| **set_use_colors**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_using_colors**\ (\ ) -If ``true``, the **MultiMesh** will use color data (see :ref:`set_instance_color`). Can only be set when :ref:`instance_count` is ``0`` or less. This means that you need to call this method before setting the instance count, or temporarily reset it to ``0``. +If ``true``, the **MultiMesh** will use color data (see :ref:`set_instance_color()`). Can only be set when :ref:`instance_count` is ``0`` or less. This means that you need to call this method before setting the instance count, or temporarily reset it to ``0``. .. rst-class:: classref-item-separator @@ -385,7 +385,7 @@ If ``true``, the **MultiMesh** will use color data (see :ref:`set_instance_color - |void| **set_use_custom_data**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_using_custom_data**\ (\ ) -If ``true``, the **MultiMesh** will use custom data (see :ref:`set_instance_custom_data`). Can only be set when :ref:`instance_count` is ``0`` or less. This means that you need to call this method before setting the instance count, or temporarily reset it to ``0``. +If ``true``, the **MultiMesh** will use custom data (see :ref:`set_instance_custom_data()`). Can only be set when :ref:`instance_count` is ``0`` or less. This means that you need to call this method before setting the instance count, or temporarily reset it to ``0``. .. rst-class:: classref-item-separator diff --git a/classes/class_multiplayerapi.rst b/classes/class_multiplayerapi.rst index da52a13ea..4c0d4cc75 100644 --- a/classes/class_multiplayerapi.rst +++ b/classes/class_multiplayerapi.rst @@ -28,7 +28,7 @@ Base class for high-level multiplayer API implementations. See also :ref:`Multip By default, :ref:`SceneTree` has a reference to an implementation of this class and uses it to provide multiplayer capabilities (i.e. RPCs) across the whole scene. -It is possible to override the MultiplayerAPI instance used by specific tree branches by calling the :ref:`SceneTree.set_multiplayer` method, effectively allowing to run both client and server in the same scene. +It is possible to override the MultiplayerAPI instance used by specific tree branches by calling the :ref:`SceneTree.set_multiplayer()` method, effectively allowing to run both client and server in the same scene. It is also possible to extend or replace the default implementation via scripting or native extensions. See :ref:`MultiplayerAPIExtension` for details about extensions, :ref:`SceneMultiplayer` for the details about the default implementation. @@ -164,7 +164,7 @@ enum **RPCMode**: :ref:`πŸ”—` :ref:`RPCMode` **RPC_MODE_DISABLED** = ``0`` -Used with :ref:`Node.rpc_config` to disable a method or property for all RPC calls, making it unavailable. Default for all methods. +Used with :ref:`Node.rpc_config()` to disable a method or property for all RPC calls, making it unavailable. Default for all methods. .. _class_MultiplayerAPI_constant_RPC_MODE_ANY_PEER: @@ -172,7 +172,7 @@ Used with :ref:`Node.rpc_config` to disable a meth :ref:`RPCMode` **RPC_MODE_ANY_PEER** = ``1`` -Used with :ref:`Node.rpc_config` to set a method to be callable remotely by any peer. Analogous to the ``@rpc("any_peer")`` annotation. Calls are accepted from all remote peers, no matter if they are node's authority or not. +Used with :ref:`Node.rpc_config()` to set a method to be callable remotely by any peer. Analogous to the ``@rpc("any_peer")`` annotation. Calls are accepted from all remote peers, no matter if they are node's authority or not. .. _class_MultiplayerAPI_constant_RPC_MODE_AUTHORITY: @@ -180,7 +180,7 @@ Used with :ref:`Node.rpc_config` to set a method t :ref:`RPCMode` **RPC_MODE_AUTHORITY** = ``2`` -Used with :ref:`Node.rpc_config` to set a method to be callable remotely only by the current multiplayer authority (which is the server by default). Analogous to the ``@rpc("authority")`` annotation. See :ref:`Node.set_multiplayer_authority`. +Used with :ref:`Node.rpc_config()` to set a method to be callable remotely only by the current multiplayer authority (which is the server by default). Analogous to the ``@rpc("authority")`` annotation. See :ref:`Node.set_multiplayer_authority()`. .. rst-class:: classref-section-separator @@ -202,7 +202,7 @@ Property Descriptions - |void| **set_multiplayer_peer**\ (\ value\: :ref:`MultiplayerPeer`\ ) - :ref:`MultiplayerPeer` **get_multiplayer_peer**\ (\ ) -The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with :ref:`is_server`) and will set root node's network mode to authority, or it will become a regular client peer. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals. +The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with :ref:`is_server()`) and will set root node's network mode to authority, or it will become a regular client peer. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals. .. rst-class:: classref-section-separator @@ -231,7 +231,7 @@ Returns a new instance of the default MultiplayerAPI. :ref:`StringName` **get_default_interface**\ (\ ) |static| :ref:`πŸ”—` -Returns the default MultiplayerAPI implementation class name. This is usually ``"SceneMultiplayer"`` when :ref:`SceneMultiplayer` is available. See :ref:`set_default_interface`. +Returns the default MultiplayerAPI implementation class name. This is usually ``"SceneMultiplayer"`` when :ref:`SceneMultiplayer` is available. See :ref:`set_default_interface()`. .. rst-class:: classref-item-separator @@ -347,9 +347,9 @@ Method used for polling the MultiplayerAPI. You only need to worry about this if :ref:`Error` **rpc**\ (\ peer\: :ref:`int`, object\: :ref:`Object`, method\: :ref:`StringName`, arguments\: :ref:`Array` = []\ ) :ref:`πŸ”—` -Sends an RPC to the target ``peer``. The given ``method`` will be called on the remote ``object`` with the provided ``arguments``. The RPC may also be called locally depending on the implementation and RPC configuration. See :ref:`Node.rpc` and :ref:`Node.rpc_config`. +Sends an RPC to the target ``peer``. The given ``method`` will be called on the remote ``object`` with the provided ``arguments``. The RPC may also be called locally depending on the implementation and RPC configuration. See :ref:`Node.rpc()` and :ref:`Node.rpc_config()`. -\ **Note:** Prefer using :ref:`Node.rpc`, :ref:`Node.rpc_id`, or ``my_method.rpc(peer, arg1, arg2, ...)`` (in GDScript), since they are faster. This method is mostly useful in conjunction with :ref:`MultiplayerAPIExtension` when extending or replacing the multiplayer capabilities. +\ **Note:** Prefer using :ref:`Node.rpc()`, :ref:`Node.rpc_id()`, or ``my_method.rpc(peer, arg1, arg2, ...)`` (in GDScript), since they are faster. This method is mostly useful in conjunction with :ref:`MultiplayerAPIExtension` when extending or replacing the multiplayer capabilities. .. rst-class:: classref-item-separator diff --git a/classes/class_multiplayerapiextension.rst b/classes/class_multiplayerapiextension.rst index 35f1815b7..77258ffc6 100644 --- a/classes/class_multiplayerapiextension.rst +++ b/classes/class_multiplayerapiextension.rst @@ -87,7 +87,7 @@ The following example extend the default implementation (:ref:`SceneMultiplayer< -Then in your main scene or in an autoload call :ref:`SceneTree.set_multiplayer` to start using your custom :ref:`MultiplayerAPI`: +Then in your main scene or in an autoload call :ref:`SceneTree.set_multiplayer()` to start using your custom :ref:`MultiplayerAPI`: .. tabs:: @@ -101,7 +101,7 @@ Then in your main scene or in an autoload call :ref:`SceneTree.set_multiplayer` method during initialization to configure themselves as the default implementation. +Native extensions can alternatively use the :ref:`MultiplayerAPI.set_default_interface()` method during initialization to configure themselves as the default implementation. .. rst-class:: classref-reftable-group @@ -158,7 +158,7 @@ Called when the :ref:`MultiplayerAPI.multiplayer_peer` **_get_peer_ids**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Callback for :ref:`MultiplayerAPI.get_peers`. +Callback for :ref:`MultiplayerAPI.get_peers()`. .. rst-class:: classref-item-separator @@ -170,7 +170,7 @@ Callback for :ref:`MultiplayerAPI.get_peers` **_get_remote_sender_id**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Callback for :ref:`MultiplayerAPI.get_remote_sender_id`. +Callback for :ref:`MultiplayerAPI.get_remote_sender_id()`. .. rst-class:: classref-item-separator @@ -182,7 +182,7 @@ Callback for :ref:`MultiplayerAPI.get_remote_sender_id` **_get_unique_id**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Callback for :ref:`MultiplayerAPI.get_unique_id`. +Callback for :ref:`MultiplayerAPI.get_unique_id()`. .. rst-class:: classref-item-separator @@ -194,7 +194,7 @@ Callback for :ref:`MultiplayerAPI.get_unique_id` **_object_configuration_add**\ (\ object\: :ref:`Object`, configuration\: :ref:`Variant`\ ) |virtual| :ref:`πŸ”—` -Callback for :ref:`MultiplayerAPI.object_configuration_add`. +Callback for :ref:`MultiplayerAPI.object_configuration_add()`. .. rst-class:: classref-item-separator @@ -206,7 +206,7 @@ Callback for :ref:`MultiplayerAPI.object_configuration_add` **_object_configuration_remove**\ (\ object\: :ref:`Object`, configuration\: :ref:`Variant`\ ) |virtual| :ref:`πŸ”—` -Callback for :ref:`MultiplayerAPI.object_configuration_remove`. +Callback for :ref:`MultiplayerAPI.object_configuration_remove()`. .. rst-class:: classref-item-separator @@ -218,7 +218,7 @@ Callback for :ref:`MultiplayerAPI.object_configuration_remove` **_poll**\ (\ ) |virtual| :ref:`πŸ”—` -Callback for :ref:`MultiplayerAPI.poll`. +Callback for :ref:`MultiplayerAPI.poll()`. .. rst-class:: classref-item-separator @@ -230,7 +230,7 @@ Callback for :ref:`MultiplayerAPI.poll`. :ref:`Error` **_rpc**\ (\ peer\: :ref:`int`, object\: :ref:`Object`, method\: :ref:`StringName`, args\: :ref:`Array`\ ) |virtual| :ref:`πŸ”—` -Callback for :ref:`MultiplayerAPI.rpc`. +Callback for :ref:`MultiplayerAPI.rpc()`. .. rst-class:: classref-item-separator diff --git a/classes/class_multiplayerpeer.rst b/classes/class_multiplayerpeer.rst index e7cedd15d..0f89e4367 100644 --- a/classes/class_multiplayerpeer.rst +++ b/classes/class_multiplayerpeer.rst @@ -268,7 +268,7 @@ The channel to use to send packets. Many network APIs such as ENet and WebRTC al - |void| **set_transfer_mode**\ (\ value\: :ref:`TransferMode`\ ) - :ref:`TransferMode` **get_transfer_mode**\ (\ ) -The manner in which to send packets to the target peer. See :ref:`TransferMode`, and the :ref:`set_target_peer` method. +The manner in which to send packets to the target peer. See :ref:`TransferMode`, and the :ref:`set_target_peer()` method. .. rst-class:: classref-section-separator @@ -333,7 +333,7 @@ Returns the current state of the connection. See :ref:`ConnectionStatus` **get_packet_channel**\ (\ ) |const| :ref:`πŸ”—` -Returns the channel over which the next available packet was received. See :ref:`PacketPeer.get_available_packet_count`. +Returns the channel over which the next available packet was received. See :ref:`PacketPeer.get_available_packet_count()`. .. rst-class:: classref-item-separator @@ -345,7 +345,7 @@ Returns the channel over which the next available packet was received. See :ref: :ref:`TransferMode` **get_packet_mode**\ (\ ) |const| :ref:`πŸ”—` -Returns the transfer mode the remote peer used to send the next available packet. See :ref:`PacketPeer.get_available_packet_count`. +Returns the transfer mode the remote peer used to send the next available packet. See :ref:`PacketPeer.get_available_packet_count()`. .. rst-class:: classref-item-separator @@ -357,7 +357,7 @@ Returns the transfer mode the remote peer used to send the next available packet :ref:`int` **get_packet_peer**\ (\ ) |const| :ref:`πŸ”—` -Returns the ID of the **MultiplayerPeer** who sent the next available packet. See :ref:`PacketPeer.get_available_packet_count`. +Returns the ID of the **MultiplayerPeer** who sent the next available packet. See :ref:`PacketPeer.get_available_packet_count()`. .. rst-class:: classref-item-separator diff --git a/classes/class_multiplayerpeerextension.rst b/classes/class_multiplayerpeerextension.rst index 3f6b528a1..4e7f93b30 100644 --- a/classes/class_multiplayerpeerextension.rst +++ b/classes/class_multiplayerpeerextension.rst @@ -95,7 +95,7 @@ Method Descriptions |void| **_close**\ (\ ) |virtual| :ref:`πŸ”—` -Called when the multiplayer peer should be immediately closed (see :ref:`MultiplayerPeer.close`). +Called when the multiplayer peer should be immediately closed (see :ref:`MultiplayerPeer.close()`). .. rst-class:: classref-item-separator @@ -107,7 +107,7 @@ Called when the multiplayer peer should be immediately closed (see :ref:`Multipl |void| **_disconnect_peer**\ (\ p_peer\: :ref:`int`, p_force\: :ref:`bool`\ ) |virtual| :ref:`πŸ”—` -Called when the connected ``p_peer`` should be forcibly disconnected (see :ref:`MultiplayerPeer.disconnect_peer`). +Called when the connected ``p_peer`` should be forcibly disconnected (see :ref:`MultiplayerPeer.disconnect_peer()`). .. rst-class:: classref-item-separator @@ -131,7 +131,7 @@ Called when the available packet count is internally requested by the :ref:`Mult :ref:`ConnectionStatus` **_get_connection_status**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Called when the connection status is requested on the :ref:`MultiplayerPeer` (see :ref:`MultiplayerPeer.get_connection_status`). +Called when the connection status is requested on the :ref:`MultiplayerPeer` (see :ref:`MultiplayerPeer.get_connection_status()`). .. rst-class:: classref-item-separator @@ -167,7 +167,7 @@ Called when a packet needs to be received by the :ref:`MultiplayerAPI` **_get_packet_channel**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Called to get the channel over which the next available packet was received. See :ref:`MultiplayerPeer.get_packet_channel`. +Called to get the channel over which the next available packet was received. See :ref:`MultiplayerPeer.get_packet_channel()`. .. rst-class:: classref-item-separator @@ -179,7 +179,7 @@ Called to get the channel over which the next available packet was received. See :ref:`TransferMode` **_get_packet_mode**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Called to get the transfer mode the remote peer used to send the next available packet. See :ref:`MultiplayerPeer.get_packet_mode`. +Called to get the transfer mode the remote peer used to send the next available packet. See :ref:`MultiplayerPeer.get_packet_mode()`. .. rst-class:: classref-item-separator @@ -191,7 +191,7 @@ Called to get the transfer mode the remote peer used to send the next available :ref:`int` **_get_packet_peer**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Called when the ID of the :ref:`MultiplayerPeer` who sent the most recent packet is requested (see :ref:`MultiplayerPeer.get_packet_peer`). +Called when the ID of the :ref:`MultiplayerPeer` who sent the most recent packet is requested (see :ref:`MultiplayerPeer.get_packet_peer()`). .. rst-class:: classref-item-separator @@ -203,7 +203,7 @@ Called when the ID of the :ref:`MultiplayerPeer` who sent :ref:`PackedByteArray` **_get_packet_script**\ (\ ) |virtual| :ref:`πŸ”—` -Called when a packet needs to be received by the :ref:`MultiplayerAPI`, if :ref:`_get_packet` isn't implemented. Use this when extending this class via GDScript. +Called when a packet needs to be received by the :ref:`MultiplayerAPI`, if :ref:`_get_packet()` isn't implemented. Use this when extending this class via GDScript. .. rst-class:: classref-item-separator @@ -239,7 +239,7 @@ Called when the transfer mode to use is read on this :ref:`MultiplayerPeer` **_get_unique_id**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Called when the unique ID of this :ref:`MultiplayerPeer` is requested (see :ref:`MultiplayerPeer.get_unique_id`). The value must be between ``1`` and ``2147483647``. +Called when the unique ID of this :ref:`MultiplayerPeer` is requested (see :ref:`MultiplayerPeer.get_unique_id()`). The value must be between ``1`` and ``2147483647``. .. rst-class:: classref-item-separator @@ -263,7 +263,7 @@ Called when the "refuse new connections" status is requested on this :ref:`Multi :ref:`bool` **_is_server**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Called when the "is server" status is requested on the :ref:`MultiplayerAPI`. See :ref:`MultiplayerAPI.is_server`. +Called when the "is server" status is requested on the :ref:`MultiplayerAPI`. See :ref:`MultiplayerAPI.is_server()`. .. rst-class:: classref-item-separator @@ -275,7 +275,7 @@ Called when the "is server" status is requested on the :ref:`MultiplayerAPI` **_is_server_relay_supported**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Called to check if the server can act as a relay in the current configuration. See :ref:`MultiplayerPeer.is_server_relay_supported`. +Called to check if the server can act as a relay in the current configuration. See :ref:`MultiplayerPeer.is_server_relay_supported()`. .. rst-class:: classref-item-separator @@ -287,7 +287,7 @@ Called to check if the server can act as a relay in the current configuration. S |void| **_poll**\ (\ ) |virtual| :ref:`πŸ”—` -Called when the :ref:`MultiplayerAPI` is polled. See :ref:`MultiplayerAPI.poll`. +Called when the :ref:`MultiplayerAPI` is polled. See :ref:`MultiplayerAPI.poll()`. .. rst-class:: classref-item-separator @@ -311,7 +311,7 @@ Called when a packet needs to be sent by the :ref:`MultiplayerAPI` **_put_packet_script**\ (\ p_buffer\: :ref:`PackedByteArray`\ ) |virtual| :ref:`πŸ”—` -Called when a packet needs to be sent by the :ref:`MultiplayerAPI`, if :ref:`_put_packet` isn't implemented. Use this when extending this class via GDScript. +Called when a packet needs to be sent by the :ref:`MultiplayerAPI`, if :ref:`_put_packet()` isn't implemented. Use this when extending this class via GDScript. .. rst-class:: classref-item-separator @@ -335,7 +335,7 @@ Called when the "refuse new connections" status is set on this :ref:`Multiplayer |void| **_set_target_peer**\ (\ p_peer\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -Called when the target peer to use is set for this :ref:`MultiplayerPeer` (see :ref:`MultiplayerPeer.set_target_peer`). +Called when the target peer to use is set for this :ref:`MultiplayerPeer` (see :ref:`MultiplayerPeer.set_target_peer()`). .. rst-class:: classref-item-separator diff --git a/classes/class_multiplayerspawner.rst b/classes/class_multiplayerspawner.rst index ff3de51dd..a8540ac7a 100644 --- a/classes/class_multiplayerspawner.rst +++ b/classes/class_multiplayerspawner.rst @@ -22,11 +22,11 @@ Automatically replicates spawnable nodes from the authority to other multiplayer Description ----------- -Spawnable scenes can be configured in the editor or through code (see :ref:`add_spawnable_scene`). +Spawnable scenes can be configured in the editor or through code (see :ref:`add_spawnable_scene()`). -Also supports custom node spawns through :ref:`spawn`, calling :ref:`spawn_function` on all peers. +Also supports custom node spawns through :ref:`spawn()`, calling :ref:`spawn_function` on all peers. -Internally, **MultiplayerSpawner** uses :ref:`MultiplayerAPI.object_configuration_add` to notify spawns passing the spawned node as the ``object`` and itself as the ``configuration``, and :ref:`MultiplayerAPI.object_configuration_remove` to notify despawns in a similar way. +Internally, **MultiplayerSpawner** uses :ref:`MultiplayerAPI.object_configuration_add()` to notify spawns passing the spawned node as the ``object`` and itself as the ``configuration``, and :ref:`MultiplayerAPI.object_configuration_remove()` to notify despawns in a similar way. .. rst-class:: classref-reftable-group @@ -113,9 +113,9 @@ Property Descriptions - |void| **set_spawn_function**\ (\ value\: :ref:`Callable`\ ) - :ref:`Callable` **get_spawn_function**\ (\ ) -Method called on all peers when a custom :ref:`spawn` is requested by the authority. Will receive the ``data`` parameter, and should return a :ref:`Node` that is not in the scene tree. +Method called on all peers when a custom :ref:`spawn()` is requested by the authority. Will receive the ``data`` parameter, and should return a :ref:`Node` that is not in the scene tree. -\ **Note:** The returned node should **not** be added to the scene with :ref:`Node.add_child`. This is done automatically. +\ **Note:** The returned node should **not** be added to the scene with :ref:`Node.add_child()`. This is done automatically. .. rst-class:: classref-item-separator @@ -218,7 +218,7 @@ Returns the count of spawnable scene paths. Requests a custom spawn, with ``data`` passed to :ref:`spawn_function` on all peers. Returns the locally spawned node instance already inside the scene tree, and added as a child of the node pointed by :ref:`spawn_path`. -\ **Note:** Spawnable scenes are spawned automatically. :ref:`spawn` is only needed for custom spawns. +\ **Note:** Spawnable scenes are spawned automatically. :ref:`spawn()` is only needed for custom spawns. .. |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_multiplayersynchronizer.rst b/classes/class_multiplayersynchronizer.rst index 93e4096fb..56b3f4bde 100644 --- a/classes/class_multiplayersynchronizer.rst +++ b/classes/class_multiplayersynchronizer.rst @@ -24,13 +24,13 @@ Description By default, **MultiplayerSynchronizer** synchronizes configured properties to all peers. -Visibility can be handled directly with :ref:`set_visibility_for` or as-needed with :ref:`add_visibility_filter` and :ref:`update_visibility`. +Visibility can be handled directly with :ref:`set_visibility_for()` or as-needed with :ref:`add_visibility_filter()` and :ref:`update_visibility()`. \ :ref:`MultiplayerSpawner`\ s will handle nodes according to visibility of synchronizers as long as the node at :ref:`root_path` was spawned by one. -Internally, **MultiplayerSynchronizer** uses :ref:`MultiplayerAPI.object_configuration_add` to notify synchronization start passing the :ref:`Node` at :ref:`root_path` as the ``object`` and itself as the ``configuration``, and uses :ref:`MultiplayerAPI.object_configuration_remove` to notify synchronization end in a similar way. +Internally, **MultiplayerSynchronizer** uses :ref:`MultiplayerAPI.object_configuration_add()` to notify synchronization start passing the :ref:`Node` at :ref:`root_path` as the ``object`` and itself as the ``configuration``, and uses :ref:`MultiplayerAPI.object_configuration_remove()` to notify synchronization end in a similar way. -\ **Note:** Synchronization is not supported for :ref:`Object` type properties, like :ref:`Resource`. Properties that are unique to each peer, like the instance IDs of :ref:`Object`\ s (see :ref:`Object.get_instance_id`) or :ref:`RID`\ s, will also not work in synchronization. +\ **Note:** Synchronization is not supported for :ref:`Object` type properties, like :ref:`Resource`. Properties that are unique to each peer, like the instance IDs of :ref:`Object`\ s (see :ref:`Object.get_instance_id()`) or :ref:`RID`\ s, will also not work in synchronization. .. rst-class:: classref-reftable-group @@ -113,7 +113,7 @@ Emitted when a new synchronization state is received by this synchronizer after **visibility_changed**\ (\ for_peer\: :ref:`int`\ ) :ref:`πŸ”—` -Emitted when visibility of ``for_peer`` is updated. See :ref:`update_visibility`. +Emitted when visibility of ``for_peer`` is updated. See :ref:`update_visibility()`. .. rst-class:: classref-section-separator @@ -152,7 +152,7 @@ Visibility filters are updated during physics frames (see :ref:`Node.NOTIFICATIO :ref:`VisibilityUpdateMode` **VISIBILITY_PROCESS_NONE** = ``2`` -Visibility filters are not updated automatically, and must be updated manually by calling :ref:`update_visibility`. +Visibility filters are not updated automatically, and must be updated manually by calling :ref:`update_visibility()`. .. rst-class:: classref-section-separator @@ -191,7 +191,7 @@ Time interval between delta synchronizations. Used when the replication is set t - |void| **set_visibility_public**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_visibility_public**\ (\ ) -Whether synchronization should be visible to all peers by default. See :ref:`set_visibility_for` and :ref:`add_visibility_filter` for ways of configuring fine-grained visibility options. +Whether synchronization should be visible to all peers by default. See :ref:`set_visibility_for()` and :ref:`add_visibility_filter()` for ways of configuring fine-grained visibility options. .. rst-class:: classref-item-separator diff --git a/classes/class_mutex.rst b/classes/class_mutex.rst index aacea2cc3..63c52380d 100644 --- a/classes/class_mutex.rst +++ b/classes/class_mutex.rst @@ -101,9 +101,9 @@ Tries locking this **Mutex**, but does not block. Returns ``true`` on success, ` Unlocks this **Mutex**, leaving it to other threads. -\ **Note:** If a thread called :ref:`lock` or :ref:`try_lock` multiple times while already having ownership of the mutex, it must also call :ref:`unlock` the same number of times in order to unlock it correctly. +\ **Note:** If a thread called :ref:`lock()` or :ref:`try_lock()` multiple times while already having ownership of the mutex, it must also call :ref:`unlock()` the same number of times in order to unlock it correctly. -\ **Warning:** Calling :ref:`unlock` more times that :ref:`lock` on a given thread, thus ending up trying to unlock a non-locked mutex, is wrong and may causes crashes or deadlocks. +\ **Warning:** Calling :ref:`unlock()` more times that :ref:`lock()` on a given thread, thus ending up trying to unlock a non-locked mutex, is wrong and may causes crashes or deadlocks. .. |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_nativemenu.rst b/classes/class_nativemenu.rst index df68922ee..cbb4153b5 100644 --- a/classes/class_nativemenu.rst +++ b/classes/class_nativemenu.rst @@ -23,7 +23,7 @@ Description \ **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`. +To create a menu, use :ref:`create_menu()`, add menu items using ``add_*_item`` methods. To remove a menu, use :ref:`free_menu()`. :: @@ -395,7 +395,7 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). -\ **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`set_item_checked` for more info on how to control it. +\ **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`set_item_checked()` for more info on how to control it. \ **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``. @@ -467,7 +467,7 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). -\ **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`set_item_checked` for more info on how to control it. +\ **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`set_item_checked()` for more info on how to control it. \ **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``. @@ -685,7 +685,7 @@ Returns the callback of the item accelerator at index ``idx``. :ref:`int` **get_item_max_states**\ (\ rid\: :ref:`RID`, idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns number of states of a multistate item. See :ref:`add_multistate_item` for details. +Returns number of states of a multistate item. See :ref:`add_multistate_item()` for details. \ **Note:** This method is implemented on macOS and Windows. @@ -699,7 +699,7 @@ Returns number of states of a multistate item. See :ref:`add_multistate_item` **get_item_state**\ (\ rid\: :ref:`RID`, idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the state of a multistate item. See :ref:`add_multistate_item` for details. +Returns the state of a multistate item. See :ref:`add_multistate_item()` for details. \ **Note:** This method is implemented on macOS and Windows. @@ -713,7 +713,7 @@ Returns the state of a multistate item. See :ref:`add_multistate_item` **get_item_submenu**\ (\ rid\: :ref:`RID`, idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the submenu ID of the item at index ``idx``. See :ref:`add_submenu_item` for more info on how to add a submenu. +Returns the submenu ID of the item at index ``idx``. See :ref:`add_submenu_item()` for more info on how to add a submenu. \ **Note:** This method is implemented on macOS and Windows. @@ -727,7 +727,7 @@ Returns the submenu ID of the item at index ``idx``. See :ref:`add_submenu_item< :ref:`Variant` **get_item_tag**\ (\ rid\: :ref:`RID`, idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -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. +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 on macOS and Windows. @@ -925,7 +925,7 @@ Returns ``true`` if the item at index ``idx`` is checked. Returns ``true`` if the item at index ``idx`` is disabled. When it is disabled it can't be selected, or its action invoked. -See :ref:`set_item_disabled` for more info on how to disable an item. +See :ref:`set_item_disabled()` for more info on how to disable an item. \ **Note:** This method is implemented on macOS and Windows. @@ -941,7 +941,7 @@ See :ref:`set_item_disabled` for more Returns ``true`` if the item at index ``idx`` is hidden. -See :ref:`set_item_hidden` for more info on how to hide an item. +See :ref:`set_item_hidden()` for more info on how to hide an item. \ **Note:** This method is implemented only on macOS. @@ -1191,7 +1191,7 @@ Sets the callback of the item at index ``idx``. Callback is emitted when its acc |void| **set_item_max_states**\ (\ rid\: :ref:`RID`, idx\: :ref:`int`, max_states\: :ref:`int`\ ) :ref:`πŸ”—` -Sets number of state of a multistate item. See :ref:`add_multistate_item` for details. +Sets number of state of a multistate item. See :ref:`add_multistate_item()` for details. \ **Note:** This method is implemented on macOS and Windows. @@ -1221,7 +1221,7 @@ Sets the type of the item at the specified index ``idx`` to radio button. If ``f |void| **set_item_state**\ (\ rid\: :ref:`RID`, idx\: :ref:`int`, state\: :ref:`int`\ ) :ref:`πŸ”—` -Sets the state of a multistate item. See :ref:`add_multistate_item` for details. +Sets the state of a multistate item. See :ref:`add_multistate_item()` for details. \ **Note:** This method is implemented on macOS and Windows. @@ -1249,7 +1249,7 @@ Sets the submenu RID of the item at index ``idx``. The submenu is a global menu |void| **set_item_tag**\ (\ rid\: :ref:`RID`, idx\: :ref:`int`, tag\: :ref:`Variant`\ ) :ref:`πŸ”—` -Sets the metadata of an item, which may be of any type. You can later get it with :ref:`get_item_tag`, which provides a simple way of assigning context data to items. +Sets the metadata of an item, which may be of any type. You can later get it with :ref:`get_item_tag()`, which provides a simple way of assigning context data to items. \ **Note:** This method is implemented on macOS and Windows. @@ -1307,7 +1307,7 @@ Sets the minimum width of the global menu. Registers callable to emit when the menu is about to show. -\ **Note:** The OS can simulate menu opening to track menu item changes and global shortcuts, in which case the corresponding close callback is not triggered. Use :ref:`is_opened` to check if the menu is currently opened. +\ **Note:** The OS can simulate menu opening to track menu item changes and global shortcuts, in which case the corresponding close callback is not triggered. Use :ref:`is_opened()` to check if the menu is currently opened. \ **Note:** This method is implemented on macOS and Windows. diff --git a/classes/class_navigationagent2d.rst b/classes/class_navigationagent2d.rst index c478eef2f..658b4d439 100644 --- a/classes/class_navigationagent2d.rst +++ b/classes/class_navigationagent2d.rst @@ -25,7 +25,7 @@ A 2D agent used to pathfind to a position while avoiding static and dynamic obst Dynamic obstacles are avoided using RVO collision avoidance. Avoidance is computed before physics, so the pathfinding information can be used safely in the physics step. -\ **Note:** After setting the :ref:`target_position` property, the :ref:`get_next_path_position` method must be used once every physics frame to update the internal path logic of the navigation agent. The vector position it returns should be used as the next movement position for the agent's parent node. +\ **Note:** After setting the :ref:`target_position` property, the :ref:`get_next_path_position()` method must be used once every physics frame to update the internal path logic of the navigation agent. The vector position it returns should be used as the next movement position for the agent's parent node. .. rst-class:: classref-introduction-group @@ -221,7 +221,7 @@ Signals that the agent reached the target, i.e. the agent moved within :ref:`tar This signal will be emitted just before :ref:`navigation_finished` when the target is reachable. -It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position`. +It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position()`. .. rst-class:: classref-item-separator @@ -638,7 +638,7 @@ Path simplification can be helpful to mitigate various path following issues tha - |void| **set_target_desired_distance**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_target_desired_distance**\ (\ ) -The distance threshold before the target is considered to be reached. On reaching the target, :ref:`target_reached` is emitted and navigation ends (see :ref:`is_navigation_finished` and :ref:`navigation_finished`). +The distance threshold before the target is considered to be reached. On reaching the target, :ref:`target_reached` is emitted and navigation ends (see :ref:`is_navigation_finished()` and :ref:`navigation_finished`). You can make navigation end early by setting this property to a value greater than :ref:`path_desired_distance` (navigation will end before reaching the last waypoint). @@ -710,7 +710,7 @@ The minimal amount of time for which this agent's velocities, that are computed - |void| **set_velocity**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_velocity**\ (\ ) -Sets the new wanted velocity for the agent. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agents and obstacles. When an agent is teleported to a new position, use :ref:`set_velocity_forced` as well to reset the internal simulation velocity. +Sets the new wanted velocity for the agent. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agents and obstacles. When an agent is teleported to a new position, use :ref:`set_velocity_forced()` as well to reset the internal simulation velocity. .. rst-class:: classref-section-separator @@ -763,7 +763,7 @@ Returns whether or not the specified mask of the :ref:`avoidance_mask` **get_current_navigation_path**\ (\ ) |const| :ref:`πŸ”—` -Returns this agent's current path from start to finish in global coordinates. The path only updates when the target position is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended :ref:`get_next_path_position` once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic. +Returns this agent's current path from start to finish in global coordinates. The path only updates when the target position is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended :ref:`get_next_path_position()` once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic. .. rst-class:: classref-item-separator @@ -823,7 +823,7 @@ Returns whether or not the specified layer of the :ref:`navigation_layers` **get_navigation_map**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`RID` of the navigation map for this NavigationAgent node. This function returns always the map set on the NavigationAgent node and not the map of the abstract agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationAgent node will not be aware of the map change. Use :ref:`set_navigation_map` to change the navigation map for the NavigationAgent and also update the agent on the NavigationServer. +Returns the :ref:`RID` of the navigation map for this NavigationAgent node. This function returns always the map set on the NavigationAgent node and not the map of the abstract agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationAgent node will not be aware of the map change. Use :ref:`set_navigation_map()` to change the navigation map for the NavigationAgent and also update the agent on the NavigationServer. .. rst-class:: classref-item-separator @@ -861,7 +861,7 @@ Returns the :ref:`RID` of this agent on the :ref:`NavigationServer2D< Returns ``true`` if the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. -\ **Note:** While ``true`` prefer to stop calling update functions like :ref:`get_next_path_position`. This avoids jittering the standing agent due to calling repeated path updates. +\ **Note:** While ``true`` prefer to stop calling update functions like :ref:`get_next_path_position()`. This avoids jittering the standing agent due to calling repeated path updates. .. rst-class:: classref-item-separator @@ -873,7 +873,7 @@ Returns ``true`` if the agent's navigation has finished. If the target is reacha :ref:`bool` **is_target_reachable**\ (\ ) :ref:`πŸ”—` -Returns ``true`` if :ref:`get_final_position` is within :ref:`target_desired_distance` of the :ref:`target_position`. +Returns ``true`` if :ref:`get_final_position()` is within :ref:`target_desired_distance` of the :ref:`target_position`. .. rst-class:: classref-item-separator @@ -885,7 +885,7 @@ Returns ``true`` if :ref:`get_final_position` **is_target_reached**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the agent reached the target, i.e. the agent moved within :ref:`target_desired_distance` of the :ref:`target_position`. It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position`. +Returns ``true`` if the agent reached the target, i.e. the agent moved within :ref:`target_desired_distance` of the :ref:`target_position`. It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position()`. .. rst-class:: classref-item-separator diff --git a/classes/class_navigationagent3d.rst b/classes/class_navigationagent3d.rst index 2d7ab5878..949cdd364 100644 --- a/classes/class_navigationagent3d.rst +++ b/classes/class_navigationagent3d.rst @@ -25,7 +25,7 @@ A 3D agent used to pathfind to a position while avoiding static and dynamic obst Dynamic obstacles are avoided using RVO collision avoidance. Avoidance is computed before physics, so the pathfinding information can be used safely in the physics step. -\ **Note:** After setting the :ref:`target_position` property, the :ref:`get_next_path_position` method must be used once every physics frame to update the internal path logic of the navigation agent. The vector position it returns should be used as the next movement position for the agent's parent node. +\ **Note:** After setting the :ref:`target_position` property, the :ref:`get_next_path_position()` method must be used once every physics frame to update the internal path logic of the navigation agent. The vector position it returns should be used as the next movement position for the agent's parent node. .. rst-class:: classref-introduction-group @@ -227,7 +227,7 @@ Signals that the agent reached the target, i.e. the agent moved within :ref:`tar This signal will be emitted just before :ref:`navigation_finished` when the target is reachable. -It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position`. +It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position()`. .. rst-class:: classref-item-separator @@ -678,7 +678,7 @@ Path simplification can be helpful to mitigate various path following issues tha - |void| **set_target_desired_distance**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_target_desired_distance**\ (\ ) -The distance threshold before the target is considered to be reached. On reaching the target, :ref:`target_reached` is emitted and navigation ends (see :ref:`is_navigation_finished` and :ref:`navigation_finished`). +The distance threshold before the target is considered to be reached. On reaching the target, :ref:`target_reached` is emitted and navigation ends (see :ref:`is_navigation_finished()` and :ref:`navigation_finished`). You can make navigation end early by setting this property to a value greater than :ref:`path_desired_distance` (navigation will end before reaching the last waypoint). @@ -769,7 +769,7 @@ If ``false``, the agent calculates avoidance velocities in 2D along the x and z- - |void| **set_velocity**\ (\ value\: :ref:`Vector3`\ ) - :ref:`Vector3` **get_velocity**\ (\ ) -Sets the new wanted velocity for the agent. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agents and obstacles. When an agent is teleported to a new position, use :ref:`set_velocity_forced` as well to reset the internal simulation velocity. +Sets the new wanted velocity for the agent. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agents and obstacles. When an agent is teleported to a new position, use :ref:`set_velocity_forced()` as well to reset the internal simulation velocity. .. rst-class:: classref-section-separator @@ -822,7 +822,7 @@ Returns whether or not the specified mask of the :ref:`avoidance_mask` **get_current_navigation_path**\ (\ ) |const| :ref:`πŸ”—` -Returns this agent's current path from start to finish in global coordinates. The path only updates when the target position is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended :ref:`get_next_path_position` once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic. +Returns this agent's current path from start to finish in global coordinates. The path only updates when the target position is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended :ref:`get_next_path_position()` once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic. .. rst-class:: classref-item-separator @@ -882,7 +882,7 @@ Returns whether or not the specified layer of the :ref:`navigation_layers` **get_navigation_map**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`RID` of the navigation map for this NavigationAgent node. This function returns always the map set on the NavigationAgent node and not the map of the abstract agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationAgent node will not be aware of the map change. Use :ref:`set_navigation_map` to change the navigation map for the NavigationAgent and also update the agent on the NavigationServer. +Returns the :ref:`RID` of the navigation map for this NavigationAgent node. This function returns always the map set on the NavigationAgent node and not the map of the abstract agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationAgent node will not be aware of the map change. Use :ref:`set_navigation_map()` to change the navigation map for the NavigationAgent and also update the agent on the NavigationServer. .. rst-class:: classref-item-separator @@ -920,7 +920,7 @@ Returns the :ref:`RID` of this agent on the :ref:`NavigationServer3D< Returns ``true`` if the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. -\ **Note:** While ``true`` prefer to stop calling update functions like :ref:`get_next_path_position`. This avoids jittering the standing agent due to calling repeated path updates. +\ **Note:** While ``true`` prefer to stop calling update functions like :ref:`get_next_path_position()`. This avoids jittering the standing agent due to calling repeated path updates. .. rst-class:: classref-item-separator @@ -932,7 +932,7 @@ Returns ``true`` if the agent's navigation has finished. If the target is reacha :ref:`bool` **is_target_reachable**\ (\ ) :ref:`πŸ”—` -Returns ``true`` if :ref:`get_final_position` is within :ref:`target_desired_distance` of the :ref:`target_position`. +Returns ``true`` if :ref:`get_final_position()` is within :ref:`target_desired_distance` of the :ref:`target_position`. .. rst-class:: classref-item-separator @@ -944,7 +944,7 @@ Returns ``true`` if :ref:`get_final_position` **is_target_reached**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the agent reached the target, i.e. the agent moved within :ref:`target_desired_distance` of the :ref:`target_position`. It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position`. +Returns ``true`` if the agent reached the target, i.e. the agent moved within :ref:`target_desired_distance` of the :ref:`target_position`. It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position()`. .. rst-class:: classref-item-separator diff --git a/classes/class_navigationlink2d.rst b/classes/class_navigationlink2d.rst index ee45e15a1..d9a924464 100644 --- a/classes/class_navigationlink2d.rst +++ b/classes/class_navigationlink2d.rst @@ -119,7 +119,7 @@ Whether this link can be traveled in both directions or only from :ref:`start_po - |void| **set_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_enabled**\ (\ ) -Whether this link is currently active. If ``false``, :ref:`NavigationServer2D.map_get_path` will ignore this link. +Whether this link is currently active. If ``false``, :ref:`NavigationServer2D.map_get_path()` will ignore this link. .. rst-class:: classref-item-separator @@ -140,7 +140,7 @@ Ending position of the link. This position will search out the nearest polygon in the navigation mesh to attach to. -The distance the link will search is controlled by :ref:`NavigationServer2D.map_set_link_connection_radius`. +The distance the link will search is controlled by :ref:`NavigationServer2D.map_set_link_connection_radius()`. .. rst-class:: classref-item-separator @@ -174,7 +174,7 @@ When pathfinding enters this link from another regions navigation mesh the :ref: - |void| **set_navigation_layers**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_navigation_layers**\ (\ ) -A bitfield determining all navigation layers the link belongs to. These navigation layers will be checked when requesting a path with :ref:`NavigationServer2D.map_get_path`. +A bitfield determining all navigation layers the link belongs to. These navigation layers will be checked when requesting a path with :ref:`NavigationServer2D.map_get_path()`. .. rst-class:: classref-item-separator @@ -195,7 +195,7 @@ Starting position of the link. This position will search out the nearest polygon in the navigation mesh to attach to. -The distance the link will search is controlled by :ref:`NavigationServer2D.map_set_link_connection_radius`. +The distance the link will search is controlled by :ref:`NavigationServer2D.map_set_link_connection_radius()`. .. rst-class:: classref-item-separator diff --git a/classes/class_navigationlink3d.rst b/classes/class_navigationlink3d.rst index 698f0dff3..cc3a1ab7d 100644 --- a/classes/class_navigationlink3d.rst +++ b/classes/class_navigationlink3d.rst @@ -119,7 +119,7 @@ Whether this link can be traveled in both directions or only from :ref:`start_po - |void| **set_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_enabled**\ (\ ) -Whether this link is currently active. If ``false``, :ref:`NavigationServer3D.map_get_path` will ignore this link. +Whether this link is currently active. If ``false``, :ref:`NavigationServer3D.map_get_path()` will ignore this link. .. rst-class:: classref-item-separator @@ -140,7 +140,7 @@ Ending position of the link. This position will search out the nearest polygon in the navigation mesh to attach to. -The distance the link will search is controlled by :ref:`NavigationServer3D.map_set_link_connection_radius`. +The distance the link will search is controlled by :ref:`NavigationServer3D.map_set_link_connection_radius()`. .. rst-class:: classref-item-separator @@ -174,7 +174,7 @@ When pathfinding enters this link from another regions navigation mesh the :ref: - |void| **set_navigation_layers**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_navigation_layers**\ (\ ) -A bitfield determining all navigation layers the link belongs to. These navigation layers will be checked when requesting a path with :ref:`NavigationServer3D.map_get_path`. +A bitfield determining all navigation layers the link belongs to. These navigation layers will be checked when requesting a path with :ref:`NavigationServer3D.map_get_path()`. .. rst-class:: classref-item-separator @@ -195,7 +195,7 @@ Starting position of the link. This position will search out the nearest polygon in the navigation mesh to attach to. -The distance the link will search is controlled by :ref:`NavigationServer3D.map_set_link_connection_radius`. +The distance the link will search is controlled by :ref:`NavigationServer3D.map_set_link_connection_radius()`. .. rst-class:: classref-item-separator diff --git a/classes/class_navigationmesh.rst b/classes/class_navigationmesh.rst index 7e37ec9c7..765663e5c 100644 --- a/classes/class_navigationmesh.rst +++ b/classes/class_navigationmesh.rst @@ -699,7 +699,7 @@ Method Descriptions |void| **add_polygon**\ (\ polygon\: :ref:`PackedInt32Array`\ ) :ref:`πŸ”—` -Adds a polygon using the indices of the vertices you get when calling :ref:`get_vertices`. +Adds a polygon using the indices of the vertices you get when calling :ref:`get_vertices()`. .. rst-class:: classref-item-separator @@ -809,7 +809,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`geometr |void| **set_vertices**\ (\ vertices\: :ref:`PackedVector3Array`\ ) :ref:`πŸ”—` -Sets the vertices that can be then indexed to create polygons with the :ref:`add_polygon` method. +Sets the vertices that can be then indexed to create polygons with the :ref:`add_polygon()` method. .. |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_navigationmeshgenerator.rst b/classes/class_navigationmeshgenerator.rst index 69f5e44a2..a4f8843a8 100644 --- a/classes/class_navigationmeshgenerator.rst +++ b/classes/class_navigationmeshgenerator.rst @@ -71,7 +71,7 @@ Method Descriptions |void| **bake**\ (\ navigation_mesh\: :ref:`NavigationMesh`, root_node\: :ref:`Node`\ ) :ref:`πŸ”—` -**Deprecated:** This method is deprecated due to core threading changes. To upgrade existing code, first create a :ref:`NavigationMeshSourceGeometryData3D` resource. Use this resource with :ref:`parse_source_geometry_data` to parse the :ref:`SceneTree` for nodes that should contribute to the navigation mesh baking. The :ref:`SceneTree` parsing needs to happen on the main thread. After the parsing is finished use the resource with :ref:`bake_from_source_geometry_data` to bake a navigation mesh. +**Deprecated:** This method is deprecated due to core threading changes. To upgrade existing code, first create a :ref:`NavigationMeshSourceGeometryData3D` resource. Use this resource with :ref:`parse_source_geometry_data()` to parse the :ref:`SceneTree` for nodes that should contribute to the navigation mesh baking. The :ref:`SceneTree` parsing needs to happen on the main thread. After the parsing is finished use the resource with :ref:`bake_from_source_geometry_data()` to bake a navigation mesh. Bakes the ``navigation_mesh`` with source geometry collected starting from the ``root_node``. @@ -109,7 +109,7 @@ Removes all polygons and vertices from the provided ``navigation_mesh`` resource |void| **parse_source_geometry_data**\ (\ navigation_mesh\: :ref:`NavigationMesh`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData3D`, root_node\: :ref:`Node`, callback\: :ref:`Callable` = Callable()\ ) :ref:`πŸ”—` -Parses the :ref:`SceneTree` for source geometry according to the properties of ``navigation_mesh``. Updates the provided ``source_geometry_data`` resource with the resulting data. The resource can then be used to bake a navigation mesh with :ref:`bake_from_source_geometry_data`. After the process is finished the optional ``callback`` will be called. +Parses the :ref:`SceneTree` for source geometry according to the properties of ``navigation_mesh``. Updates the provided ``source_geometry_data`` resource with the resulting data. The resource can then be used to bake a navigation mesh with :ref:`bake_from_source_geometry_data()`. After the process is finished the optional ``callback`` will be called. \ **Note:** This function needs to run on the main thread or with a deferred call as the SceneTree is not thread-safe. diff --git a/classes/class_navigationobstacle2d.rst b/classes/class_navigationobstacle2d.rst index 5ae629c56..be09dee70 100644 --- a/classes/class_navigationobstacle2d.rst +++ b/classes/class_navigationobstacle2d.rst @@ -235,7 +235,7 @@ Returns whether or not the specified layer of the :ref:`avoidance_layers` **get_navigation_map**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`RID` of the navigation map for this NavigationObstacle node. This function returns always the map set on the NavigationObstacle node and not the map of the abstract obstacle on the NavigationServer. If the obstacle map is changed directly with the NavigationServer API the NavigationObstacle node will not be aware of the map change. Use :ref:`set_navigation_map` to change the navigation map for the NavigationObstacle and also update the obstacle on the NavigationServer. +Returns the :ref:`RID` of the navigation map for this NavigationObstacle node. This function returns always the map set on the NavigationObstacle node and not the map of the abstract obstacle on the NavigationServer. If the obstacle map is changed directly with the NavigationServer API the NavigationObstacle node will not be aware of the map change. Use :ref:`set_navigation_map()` to change the navigation map for the NavigationObstacle and also update the obstacle on the NavigationServer. .. rst-class:: classref-item-separator diff --git a/classes/class_navigationobstacle3d.rst b/classes/class_navigationobstacle3d.rst index 4389920c2..117ba1787 100644 --- a/classes/class_navigationobstacle3d.rst +++ b/classes/class_navigationobstacle3d.rst @@ -275,7 +275,7 @@ Returns whether or not the specified layer of the :ref:`avoidance_layers` **get_navigation_map**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`RID` of the navigation map for this NavigationObstacle node. This function returns always the map set on the NavigationObstacle node and not the map of the abstract obstacle on the NavigationServer. If the obstacle map is changed directly with the NavigationServer API the NavigationObstacle node will not be aware of the map change. Use :ref:`set_navigation_map` to change the navigation map for the NavigationObstacle and also update the obstacle on the NavigationServer. +Returns the :ref:`RID` of the navigation map for this NavigationObstacle node. This function returns always the map set on the NavigationObstacle node and not the map of the abstract obstacle on the NavigationServer. If the obstacle map is changed directly with the NavigationServer API the NavigationObstacle node will not be aware of the map change. Use :ref:`set_navigation_map()` to change the navigation map for the NavigationObstacle and also update the obstacle on the NavigationServer. .. rst-class:: classref-item-separator diff --git a/classes/class_navigationpathqueryresult2d.rst b/classes/class_navigationpathqueryresult2d.rst index 3ffb40505..172115787 100644 --- a/classes/class_navigationpathqueryresult2d.rst +++ b/classes/class_navigationpathqueryresult2d.rst @@ -111,7 +111,7 @@ Property Descriptions - |void| **set_path**\ (\ value\: :ref:`PackedVector2Array`\ ) - :ref:`PackedVector2Array` **get_path**\ (\ ) -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`. +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. diff --git a/classes/class_navigationpathqueryresult3d.rst b/classes/class_navigationpathqueryresult3d.rst index 430593c65..9860757ef 100644 --- a/classes/class_navigationpathqueryresult3d.rst +++ b/classes/class_navigationpathqueryresult3d.rst @@ -111,7 +111,7 @@ Property Descriptions - |void| **set_path**\ (\ value\: :ref:`PackedVector3Array`\ ) - :ref:`PackedVector3Array` **get_path**\ (\ ) -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`. +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. diff --git a/classes/class_navigationpolygon.rst b/classes/class_navigationpolygon.rst index 75ad745a7..e349874ea 100644 --- a/classes/class_navigationpolygon.rst +++ b/classes/class_navigationpolygon.rst @@ -501,7 +501,7 @@ Adds a :ref:`PackedVector2Array` that contains the ver |void| **add_polygon**\ (\ polygon\: :ref:`PackedInt32Array`\ ) :ref:`πŸ”—` -Adds a polygon using the indices of the vertices you get when calling :ref:`get_vertices`. +Adds a polygon using the indices of the vertices you get when calling :ref:`get_vertices()`. .. rst-class:: classref-item-separator @@ -549,7 +549,7 @@ Clears the array of polygons, but it doesn't clear the array of outlines and ver :ref:`NavigationMesh` **get_navigation_mesh**\ (\ ) :ref:`πŸ”—` -Returns the :ref:`NavigationMesh` resulting from this navigation polygon. This navigation mesh can be used to update the navigation mesh of a region with the :ref:`NavigationServer3D.region_set_navigation_mesh` API directly (as 2D uses the 3D server behind the scene). +Returns the :ref:`NavigationMesh` resulting from this navigation polygon. This navigation mesh can be used to update the navigation mesh of a region with the :ref:`NavigationServer3D.region_set_navigation_mesh()` API directly (as 2D uses the 3D server behind the scene). .. rst-class:: classref-item-separator @@ -633,7 +633,7 @@ Returns a :ref:`PackedVector2Array` containing all the |void| **make_polygons_from_outlines**\ (\ ) :ref:`πŸ”—` -**Deprecated:** Use :ref:`NavigationServer2D.parse_source_geometry_data` and :ref:`NavigationServer2D.bake_from_source_geometry_data` instead. +**Deprecated:** Use :ref:`NavigationServer2D.parse_source_geometry_data()` and :ref:`NavigationServer2D.bake_from_source_geometry_data()` instead. Creates polygons from the outlines added in the editor or by script. @@ -647,7 +647,7 @@ Creates polygons from the outlines added in the editor or by script. |void| **remove_outline**\ (\ idx\: :ref:`int`\ ) :ref:`πŸ”—` -Removes an outline created in the editor or by script. You have to call :ref:`make_polygons_from_outlines` for the polygons to update. +Removes an outline created in the editor or by script. You have to call :ref:`make_polygons_from_outlines()` for the polygons to update. .. rst-class:: classref-item-separator @@ -659,7 +659,7 @@ Removes an outline created in the editor or by script. You have to call :ref:`ma |void| **set_outline**\ (\ idx\: :ref:`int`, outline\: :ref:`PackedVector2Array`\ ) :ref:`πŸ”—` -Changes an outline created in the editor or by script. You have to call :ref:`make_polygons_from_outlines` for the polygons to update. +Changes an outline created in the editor or by script. You have to call :ref:`make_polygons_from_outlines()` for the polygons to update. .. rst-class:: classref-item-separator @@ -683,7 +683,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`parsed_ |void| **set_vertices**\ (\ vertices\: :ref:`PackedVector2Array`\ ) :ref:`πŸ”—` -Sets the vertices that can be then indexed to create polygons with the :ref:`add_polygon` method. +Sets the vertices that can be then indexed to create polygons with the :ref:`add_polygon()` method. .. |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_navigationregion2d.rst b/classes/class_navigationregion2d.rst index 69dc6a206..5284319e0 100644 --- a/classes/class_navigationregion2d.rst +++ b/classes/class_navigationregion2d.rst @@ -23,7 +23,7 @@ Description A traversable 2D region based on a :ref:`NavigationPolygon` that :ref:`NavigationAgent2D`\ s can use for pathfinding. -Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using :ref:`NavigationServer2D.map_set_edge_connection_margin`. +Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using :ref:`NavigationServer2D.map_set_edge_connection_margin()`. \ **Note:** Overlapping two regions' navigation polygons is not enough for connecting two regions. They must share a similar edge. @@ -175,7 +175,7 @@ When pathfinding enters this region's navigation mesh from another regions navig - |void| **set_navigation_layers**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_navigation_layers**\ (\ ) -A bitfield determining all navigation layers the region belongs to. These navigation layers can be checked upon when requesting a path with :ref:`NavigationServer2D.map_get_path`. +A bitfield determining all navigation layers the region belongs to. These navigation layers can be checked upon when requesting a path with :ref:`NavigationServer2D.map_get_path()`. .. rst-class:: classref-item-separator @@ -291,7 +291,7 @@ Returns the current navigation map :ref:`RID` used by this region. :ref:`RID` **get_region_rid**\ (\ ) |const| :ref:`πŸ”—` -**Deprecated:** Use :ref:`get_rid` instead. +**Deprecated:** Use :ref:`get_rid()` instead. Returns the :ref:`RID` of this region on the :ref:`NavigationServer2D`. @@ -305,7 +305,7 @@ Returns the :ref:`RID` of this region on the :ref:`NavigationServer2D :ref:`RID` **get_rid**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`RID` of this region on the :ref:`NavigationServer2D`. Combined with :ref:`NavigationServer2D.map_get_closest_point_owner` can be used to identify the **NavigationRegion2D** closest to a point on the merged navigation map. +Returns the :ref:`RID` of this region on the :ref:`NavigationServer2D`. Combined with :ref:`NavigationServer2D.map_get_closest_point_owner()` can be used to identify the **NavigationRegion2D** closest to a point on the merged navigation map. .. rst-class:: classref-item-separator diff --git a/classes/class_navigationregion3d.rst b/classes/class_navigationregion3d.rst index 970f1452f..c926d3271 100644 --- a/classes/class_navigationregion3d.rst +++ b/classes/class_navigationregion3d.rst @@ -23,7 +23,7 @@ Description A traversable 3D region based on a :ref:`NavigationMesh` that :ref:`NavigationAgent3D`\ s can use for pathfinding. -Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using :ref:`NavigationServer3D.map_set_edge_connection_margin`. +Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using :ref:`NavigationServer3D.map_set_edge_connection_margin()`. \ **Note:** Overlapping two regions' navigation meshes is not enough for connecting two regions. They must share a similar edge. @@ -175,7 +175,7 @@ When pathfinding enters this region's navigation mesh from another regions navig - |void| **set_navigation_layers**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_navigation_layers**\ (\ ) -A bitfield determining all navigation layers the region belongs to. These navigation layers can be checked upon when requesting a path with :ref:`NavigationServer3D.map_get_path`. +A bitfield determining all navigation layers the region belongs to. These navigation layers can be checked upon when requesting a path with :ref:`NavigationServer3D.map_get_path()`. .. rst-class:: classref-item-separator @@ -291,7 +291,7 @@ Returns the current navigation map :ref:`RID` used by this region. :ref:`RID` **get_region_rid**\ (\ ) |const| :ref:`πŸ”—` -**Deprecated:** Use :ref:`get_rid` instead. +**Deprecated:** Use :ref:`get_rid()` instead. Returns the :ref:`RID` of this region on the :ref:`NavigationServer3D`. @@ -305,7 +305,7 @@ Returns the :ref:`RID` of this region on the :ref:`NavigationServer3D :ref:`RID` **get_rid**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`RID` of this region on the :ref:`NavigationServer3D`. Combined with :ref:`NavigationServer3D.map_get_closest_point_owner` can be used to identify the **NavigationRegion3D** closest to a point on the merged navigation map. +Returns the :ref:`RID` of this region on the :ref:`NavigationServer3D`. Combined with :ref:`NavigationServer3D.map_get_closest_point_owner()` can be used to identify the **NavigationRegion3D** closest to a point on the merged navigation map. .. rst-class:: classref-item-separator diff --git a/classes/class_navigationserver2d.rst b/classes/class_navigationserver2d.rst index 9a3df4aa2..ce8ce19f6 100644 --- a/classes/class_navigationserver2d.rst +++ b/classes/class_navigationserver2d.rst @@ -29,7 +29,7 @@ Maps are divided into regions, which are composed of navigation polygons. Togeth For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than ``edge_connection_margin`` to the respective other edge's vertex. -You may assign navigation layers to regions with :ref:`region_set_navigation_layers`, which then can be checked upon when requesting a path with :ref:`map_get_path`. This can be used to allow or deny certain areas for some objects. +You may assign navigation layers to regions with :ref:`region_set_navigation_layers()`, which then can be checked upon when requesting a path with :ref:`map_get_path()`. This can be used to allow or deny certain areas for some objects. To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity. @@ -564,7 +564,7 @@ Returns ``true`` if the map got changed the previous frame. Sets the callback :ref:`Callable` that gets called after each avoidance processing step for the ``agent``. The calculated ``safe_velocity`` will be dispatched with a signal to the object just before the physics calculations. -\ **Note:** Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use :ref:`agent_set_avoidance_callback` again with an empty :ref:`Callable`. +\ **Note:** Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use :ref:`agent_set_avoidance_callback()` again with an empty :ref:`Callable`. .. rst-class:: classref-item-separator @@ -734,7 +734,7 @@ The minimal amount of time for which the agent's velocities that are computed by |void| **agent_set_velocity**\ (\ agent\: :ref:`RID`, velocity\: :ref:`Vector2`\ ) :ref:`πŸ”—` -Sets ``velocity`` as the new wanted velocity for the specified ``agent``. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agent's and obstacles. When an agent is teleported to a new position far away use :ref:`agent_set_velocity_forced` instead to reset the internal velocity state. +Sets ``velocity`` as the new wanted velocity for the specified ``agent``. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agent's and obstacles. When an agent is teleported to a new position far away use :ref:`agent_set_velocity_forced()` instead to reset the internal velocity state. .. rst-class:: classref-item-separator @@ -1010,7 +1010,7 @@ Sets the navigation map :ref:`RID` for the link. |void| **link_set_navigation_layers**\ (\ link\: :ref:`RID`, navigation_layers\: :ref:`int`\ ) :ref:`πŸ”—` -Set the links's navigation layers. This allows selecting links from a path request (when using :ref:`map_get_path`). +Set the links's navigation layers. This allows selecting links from a path request (when using :ref:`map_get_path()`). .. rst-class:: classref-item-separator @@ -1550,7 +1550,7 @@ Sets the outline vertices for the obstacle. If the vertices are winded in clockw |void| **parse_source_geometry_data**\ (\ navigation_polygon\: :ref:`NavigationPolygon`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData2D`, root_node\: :ref:`Node`, callback\: :ref:`Callable` = Callable()\ ) :ref:`πŸ”—` -Parses the :ref:`SceneTree` for source geometry according to the properties of ``navigation_polygon``. Updates the provided ``source_geometry_data`` resource with the resulting data. The resource can then be used to bake a navigation mesh with :ref:`bake_from_source_geometry_data`. After the process is finished the optional ``callback`` will be called. +Parses the :ref:`SceneTree` for source geometry according to the properties of ``navigation_polygon``. Updates the provided ``source_geometry_data`` resource with the resulting data. The resource can then be used to bake a navigation mesh with :ref:`bake_from_source_geometry_data()`. After the process is finished the optional ``callback`` will be called. \ **Note:** This function needs to run on the main thread or with a deferred call as the SceneTree is not thread-safe. @@ -1614,7 +1614,7 @@ Returns the navigation mesh surface point closest to the provided ``to_point`` o :ref:`Vector2` **region_get_connection_pathway_end**\ (\ region\: :ref:`RID`, connection\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the ending point of a connection door. ``connection`` is an index between 0 and the return value of :ref:`region_get_connections_count`. +Returns the ending point of a connection door. ``connection`` is an index between 0 and the return value of :ref:`region_get_connections_count()`. .. rst-class:: classref-item-separator @@ -1626,7 +1626,7 @@ Returns the ending point of a connection door. ``connection`` is an index betwee :ref:`Vector2` **region_get_connection_pathway_start**\ (\ region\: :ref:`RID`, connection\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the starting point of a connection door. ``connection`` is an index between 0 and the return value of :ref:`region_get_connections_count`. +Returns the starting point of a connection door. ``connection`` is an index between 0 and the return value of :ref:`region_get_connections_count()`. .. rst-class:: classref-item-separator @@ -1814,7 +1814,7 @@ Sets the map for the region. |void| **region_set_navigation_layers**\ (\ region\: :ref:`RID`, navigation_layers\: :ref:`int`\ ) :ref:`πŸ”—` -Set the region's navigation layers. This allows selecting regions from a path request (when using :ref:`map_get_path`). +Set the region's navigation layers. This allows selecting regions from a path request (when using :ref:`map_get_path()`). .. rst-class:: classref-item-separator @@ -1912,7 +1912,7 @@ Path simplification can be helpful to mitigate various path following issues tha :ref:`RID` **source_geometry_parser_create**\ (\ ) :ref:`πŸ”—` -Creates a new source geometry parser. If a :ref:`Callable` is set for the parser with :ref:`source_geometry_parser_set_callback` the callback will be called for every single node that gets parsed whenever :ref:`parse_source_geometry_data` is used. +Creates a new source geometry parser. If a :ref:`Callable` is set for the parser with :ref:`source_geometry_parser_set_callback()` the callback will be called for every single node that gets parsed whenever :ref:`parse_source_geometry_data()` is used. .. rst-class:: classref-item-separator diff --git a/classes/class_navigationserver3d.rst b/classes/class_navigationserver3d.rst index 283aae15b..5b4231125 100644 --- a/classes/class_navigationserver3d.rst +++ b/classes/class_navigationserver3d.rst @@ -29,7 +29,7 @@ Maps are divided into regions, which are composed of navigation meshes. Together For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than ``edge_connection_margin`` to the respective other edge's vertex. -You may assign navigation layers to regions with :ref:`region_set_navigation_layers`, which then can be checked upon when requesting a path with :ref:`map_get_path`. This can be used to allow or deny certain areas for some objects. +You may assign navigation layers to regions with :ref:`region_set_navigation_layers()`, which then can be checked upon when requesting a path with :ref:`map_get_path()`. This can be used to allow or deny certain areas for some objects. To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity. @@ -737,7 +737,7 @@ Returns ``true`` if the map got changed the previous frame. Sets the callback :ref:`Callable` that gets called after each avoidance processing step for the ``agent``. The calculated ``safe_velocity`` will be dispatched with a signal to the object just before the physics calculations. -\ **Note:** Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use :ref:`agent_set_avoidance_callback` again with an empty :ref:`Callable`. +\ **Note:** Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use :ref:`agent_set_avoidance_callback()` again with an empty :ref:`Callable`. .. rst-class:: classref-item-separator @@ -935,7 +935,7 @@ If ``false`` the agent calculates avoidance velocities in 2D along the xz-axis i |void| **agent_set_velocity**\ (\ agent\: :ref:`RID`, velocity\: :ref:`Vector3`\ ) :ref:`πŸ”—` -Sets ``velocity`` as the new wanted velocity for the specified ``agent``. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agent's and obstacles. When an agent is teleported to a new position use :ref:`agent_set_velocity_forced` as well to reset the internal simulation velocity. +Sets ``velocity`` as the new wanted velocity for the specified ``agent``. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agent's and obstacles. When an agent is teleported to a new position use :ref:`agent_set_velocity_forced()` as well to reset the internal simulation velocity. .. rst-class:: classref-item-separator @@ -1223,7 +1223,7 @@ Sets the navigation map :ref:`RID` for the link. |void| **link_set_navigation_layers**\ (\ link\: :ref:`RID`, navigation_layers\: :ref:`int`\ ) :ref:`πŸ”—` -Set the links's navigation layers. This allows selecting links from a path request (when using :ref:`map_get_path`). +Set the links's navigation layers. This allows selecting links from a path request (when using :ref:`map_get_path()`). .. rst-class:: classref-item-separator @@ -1909,7 +1909,7 @@ Sets the outline vertices for the obstacle. If the vertices are winded in clockw |void| **parse_source_geometry_data**\ (\ navigation_mesh\: :ref:`NavigationMesh`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData3D`, root_node\: :ref:`Node`, callback\: :ref:`Callable` = Callable()\ ) :ref:`πŸ”—` -Parses the :ref:`SceneTree` for source geometry according to the properties of ``navigation_mesh``. Updates the provided ``source_geometry_data`` resource with the resulting data. The resource can then be used to bake a navigation mesh with :ref:`bake_from_source_geometry_data`. After the process is finished the optional ``callback`` will be called. +Parses the :ref:`SceneTree` for source geometry according to the properties of ``navigation_mesh``. Updates the provided ``source_geometry_data`` resource with the resulting data. The resource can then be used to bake a navigation mesh with :ref:`bake_from_source_geometry_data()`. After the process is finished the optional ``callback`` will be called. \ **Note:** This function needs to run on the main thread or with a deferred call as the SceneTree is not thread-safe. @@ -1937,7 +1937,7 @@ Queries a path in a given navigation map. Start and target position and other pa |void| **region_bake_navigation_mesh**\ (\ navigation_mesh\: :ref:`NavigationMesh`, root_node\: :ref:`Node`\ ) :ref:`πŸ”—` -**Deprecated:** This method is deprecated due to core threading changes. To upgrade existing code, first create a :ref:`NavigationMeshSourceGeometryData3D` resource. Use this resource with :ref:`parse_source_geometry_data` to parse the :ref:`SceneTree` for nodes that should contribute to the navigation mesh baking. The :ref:`SceneTree` parsing needs to happen on the main thread. After the parsing is finished use the resource with :ref:`bake_from_source_geometry_data` to bake a navigation mesh. +**Deprecated:** This method is deprecated due to core threading changes. To upgrade existing code, first create a :ref:`NavigationMeshSourceGeometryData3D` resource. Use this resource with :ref:`parse_source_geometry_data()` to parse the :ref:`SceneTree` for nodes that should contribute to the navigation mesh baking. The :ref:`SceneTree` parsing needs to happen on the main thread. After the parsing is finished use the resource with :ref:`bake_from_source_geometry_data()` to bake a navigation mesh. Bakes the ``navigation_mesh`` with bake source geometry collected starting from the ``root_node``. @@ -2013,7 +2013,7 @@ If ``use_collision`` is ``true``, a closest point test is only done when the seg :ref:`Vector3` **region_get_connection_pathway_end**\ (\ region\: :ref:`RID`, connection\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the ending point of a connection door. ``connection`` is an index between 0 and the return value of :ref:`region_get_connections_count`. +Returns the ending point of a connection door. ``connection`` is an index between 0 and the return value of :ref:`region_get_connections_count()`. .. rst-class:: classref-item-separator @@ -2025,7 +2025,7 @@ Returns the ending point of a connection door. ``connection`` is an index betwee :ref:`Vector3` **region_get_connection_pathway_start**\ (\ region\: :ref:`RID`, connection\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the starting point of a connection door. ``connection`` is an index between 0 and the return value of :ref:`region_get_connections_count`. +Returns the starting point of a connection door. ``connection`` is an index between 0 and the return value of :ref:`region_get_connections_count()`. .. rst-class:: classref-item-separator @@ -2213,7 +2213,7 @@ Sets the map for the region. |void| **region_set_navigation_layers**\ (\ region\: :ref:`RID`, navigation_layers\: :ref:`int`\ ) :ref:`πŸ”—` -Set the region's navigation layers. This allows selecting regions from a path request (when using :ref:`map_get_path`). +Set the region's navigation layers. This allows selecting regions from a path request (when using :ref:`map_get_path()`). .. rst-class:: classref-item-separator @@ -2323,7 +2323,7 @@ Path simplification can be helpful to mitigate various path following issues tha :ref:`RID` **source_geometry_parser_create**\ (\ ) :ref:`πŸ”—` -Creates a new source geometry parser. If a :ref:`Callable` is set for the parser with :ref:`source_geometry_parser_set_callback` the callback will be called for every single node that gets parsed whenever :ref:`parse_source_geometry_data` is used. +Creates a new source geometry parser. If a :ref:`Callable` is set for the parser with :ref:`source_geometry_parser_set_callback()` the callback will be called for every single node that gets parsed whenever :ref:`parse_source_geometry_data()` is used. .. rst-class:: classref-item-separator diff --git a/classes/class_node.rst b/classes/class_node.rst index 79247da5b..9c045ec43 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -25,25 +25,25 @@ Nodes are Godot's building blocks. They can be assigned as the child of another A tree of nodes is called a *scene*. Scenes can be saved to the disk and then instantiated into other scenes. This allows for very high flexibility in the architecture and data model of Godot projects. -\ **Scene tree:** The :ref:`SceneTree` contains the active tree of nodes. When a node is added to the scene tree, it receives the :ref:`NOTIFICATION_ENTER_TREE` notification and its :ref:`_enter_tree` callback is triggered. Child nodes are always added *after* their parent node, i.e. the :ref:`_enter_tree` callback of a parent node will be triggered before its child's. +\ **Scene tree:** The :ref:`SceneTree` contains the active tree of nodes. When a node is added to the scene tree, it receives the :ref:`NOTIFICATION_ENTER_TREE` notification and its :ref:`_enter_tree()` callback is triggered. Child nodes are always added *after* their parent node, i.e. the :ref:`_enter_tree()` callback of a parent node will be triggered before its child's. -Once all nodes have been added in the scene tree, they receive the :ref:`NOTIFICATION_READY` notification and their respective :ref:`_ready` callbacks are triggered. For groups of nodes, the :ref:`_ready` callback is called in reverse order, starting with the children and moving up to the parent nodes. +Once all nodes have been added in the scene tree, they receive the :ref:`NOTIFICATION_READY` notification and their respective :ref:`_ready()` callbacks are triggered. For groups of nodes, the :ref:`_ready()` callback is called in reverse order, starting with the children and moving up to the parent nodes. -This means that when adding a node to the scene tree, the following order will be used for the callbacks: :ref:`_enter_tree` of the parent, :ref:`_enter_tree` of the children, :ref:`_ready` of the children and finally :ref:`_ready` of the parent (recursively for the entire scene tree). +This means that when adding a node to the scene tree, the following order will be used for the callbacks: :ref:`_enter_tree()` of the parent, :ref:`_enter_tree()` of the children, :ref:`_ready()` of the children and finally :ref:`_ready()` of the parent (recursively for the entire scene tree). -\ **Processing:** Nodes can override the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback :ref:`_process`, toggled with :ref:`set_process`) happens as fast as possible and is dependent on the frame rate, so the processing time *delta* (in seconds) is passed as an argument. Physics processing (callback :ref:`_physics_process`, toggled with :ref:`set_physics_process`) happens a fixed number of times per second (60 by default) and is useful for code related to the physics engine. +\ **Processing:** Nodes can override the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback :ref:`_process()`, toggled with :ref:`set_process()`) happens as fast as possible and is dependent on the frame rate, so the processing time *delta* (in seconds) is passed as an argument. Physics processing (callback :ref:`_physics_process()`, toggled with :ref:`set_physics_process()`) happens a fixed number of times per second (60 by default) and is useful for code related to the physics engine. -Nodes can also process input events. When present, the :ref:`_input` function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the :ref:`_unhandled_input` function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI :ref:`Control` nodes), ensuring that the node only receives the events that were meant for it. +Nodes can also process input events. When present, the :ref:`_input()` function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the :ref:`_unhandled_input()` function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI :ref:`Control` nodes), ensuring that the node only receives the events that were meant for it. To keep track of the scene hierarchy (especially when instantiating scenes into other scenes), an "owner" can be set for the node with the :ref:`owner` property. This keeps track of who instantiated what. This is mostly useful when writing editors and tools, though. -Finally, when a node is freed with :ref:`Object.free` or :ref:`queue_free`, it will also free all its children. +Finally, when a node is freed with :ref:`Object.free()` or :ref:`queue_free()`, it will also free all its children. -\ **Groups:** Nodes can be added to as many groups as you want to be easy to manage, you could create groups like "enemies" or "collectables" for example, depending on your game. See :ref:`add_to_group`, :ref:`is_in_group` and :ref:`remove_from_group`. You can then retrieve all nodes in these groups, iterate them and even call methods on groups via the methods on :ref:`SceneTree`. +\ **Groups:** Nodes can be added to as many groups as you want to be easy to manage, you could create groups like "enemies" or "collectables" for example, depending on your game. See :ref:`add_to_group()`, :ref:`is_in_group()` and :ref:`remove_from_group()`. You can then retrieve all nodes in these groups, iterate them and even call methods on groups via the methods on :ref:`SceneTree`. -\ **Networking with nodes:** After connecting to a server (or making one, see :ref:`ENetMultiplayerPeer`), it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling :ref:`rpc` with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections). To identify which node receives the RPC call, Godot will use its :ref:`NodePath` (make sure node names are the same on all peers). Also, take a look at the high-level networking tutorial and corresponding demos. +\ **Networking with nodes:** After connecting to a server (or making one, see :ref:`ENetMultiplayerPeer`), it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling :ref:`rpc()` with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections). To identify which node receives the RPC call, Godot will use its :ref:`NodePath` (make sure node names are the same on all peers). Also, take a look at the high-level networking tutorial and corresponding demos. -\ **Note:** The ``script`` property is part of the :ref:`Object` class, not **Node**. It isn't exposed like most properties but does have a setter and getter (see :ref:`Object.set_script` and :ref:`Object.get_script`). +\ **Note:** The ``script`` property is part of the :ref:`Object` class, not **Node**. It isn't exposed like most properties but does have a setter and getter (see :ref:`Object.set_script()` and :ref:`Object.get_script()`). .. rst-class:: classref-introduction-group @@ -317,7 +317,7 @@ Signals **child_entered_tree**\ (\ node\: :ref:`Node`\ ) :ref:`πŸ”—` -Emitted when the child ``node`` enters the :ref:`SceneTree`, usually because this node entered the tree (see :ref:`tree_entered`), or :ref:`add_child` has been called. +Emitted when the child ``node`` enters the :ref:`SceneTree`, usually because this node entered the tree (see :ref:`tree_entered`), or :ref:`add_child()` has been called. This signal is emitted *after* the child node's own :ref:`NOTIFICATION_ENTER_TREE` and :ref:`tree_entered`. @@ -381,7 +381,7 @@ Emitted when an attribute of the node that is relevant to the editor is changed. **ready**\ (\ ) :ref:`πŸ”—` -Emitted when the node is considered ready, after :ref:`_ready` is called. +Emitted when the node is considered ready, after :ref:`_ready()` is called. .. rst-class:: classref-item-separator @@ -405,7 +405,7 @@ Emitted when the node's :ref:`name` is changed, if the **replacing_by**\ (\ node\: :ref:`Node`\ ) :ref:`πŸ”—` -Emitted when this node is being replaced by the ``node``, see :ref:`replace_by`. +Emitted when this node is being replaced by the ``node``, see :ref:`replace_by()`. This signal is emitted *after* ``node`` has been added as a child of the original parent node, but *before* all original child nodes have been reparented to ``node``. @@ -449,7 +449,7 @@ This signal is emitted *after* the related :ref:`NOTIFICATION_EXIT_TREE`, and *before* the related :ref:`NOTIFICATION_EXIT_TREE`. +This signal is emitted *after* the node's :ref:`_exit_tree()`, and *before* the related :ref:`NOTIFICATION_EXIT_TREE`. .. rst-class:: classref-section-separator @@ -556,7 +556,7 @@ flags **ProcessThreadMessages**: :ref:`πŸ”—` :ref:`ProcessThreadMessages` **FLAG_PROCESS_THREAD_MESSAGES** = ``1`` -Allows this node to process threaded messages created with :ref:`call_deferred_thread_group` right before :ref:`_process` is called. +Allows this node to process threaded messages created with :ref:`call_deferred_thread_group()` right before :ref:`_process()` is called. .. _class_Node_constant_FLAG_PROCESS_THREAD_MESSAGES_PHYSICS: @@ -564,7 +564,7 @@ Allows this node to process threaded messages created with :ref:`call_deferred_t :ref:`ProcessThreadMessages` **FLAG_PROCESS_THREAD_MESSAGES_PHYSICS** = ``2`` -Allows this node to process threaded messages created with :ref:`call_deferred_thread_group` right before :ref:`_physics_process` is called. +Allows this node to process threaded messages created with :ref:`call_deferred_thread_group()` right before :ref:`_physics_process()` is called. .. _class_Node_constant_FLAG_PROCESS_THREAD_MESSAGES_ALL: @@ -572,7 +572,7 @@ Allows this node to process threaded messages created with :ref:`call_deferred_t :ref:`ProcessThreadMessages` **FLAG_PROCESS_THREAD_MESSAGES_ALL** = ``3`` -Allows this node to process threaded messages created with :ref:`call_deferred_thread_group` right before either :ref:`_process` or :ref:`_physics_process` are called. +Allows this node to process threaded messages created with :ref:`call_deferred_thread_group()` right before either :ref:`_process()` or :ref:`_physics_process()` are called. .. rst-class:: classref-item-separator @@ -648,7 +648,7 @@ Duplicate the node's script (also overriding the duplicated children's scripts, :ref:`DuplicateFlags` **DUPLICATE_USE_INSTANTIATION** = ``8`` -Duplicate using :ref:`PackedScene.instantiate`. If the node comes from a scene saved on disk, reuses :ref:`PackedScene.instantiate` as the base for the duplicated node and its children. +Duplicate using :ref:`PackedScene.instantiate()`. If the node comes from a scene saved on disk, reuses :ref:`PackedScene.instantiate()` as the base for the duplicated node and its children. .. rst-class:: classref-item-separator @@ -735,7 +735,7 @@ Constants **NOTIFICATION_ENTER_TREE** = ``10`` :ref:`πŸ”—` -Notification received when the node enters a :ref:`SceneTree`. See :ref:`_enter_tree`. +Notification received when the node enters a :ref:`SceneTree`. See :ref:`_enter_tree()`. This notification is received *before* the related :ref:`tree_entered` signal. @@ -745,7 +745,7 @@ This notification is received *before* the related :ref:`tree_entered` -Notification received when the node is about to exit a :ref:`SceneTree`. See :ref:`_exit_tree`. +Notification received when the node is about to exit a :ref:`SceneTree`. See :ref:`_exit_tree()`. This notification is received *after* the related :ref:`tree_exiting` signal. @@ -765,7 +765,7 @@ This notification is received *after* the related :ref:`tree_exiting` -Notification received when the node is ready. See :ref:`_ready`. +Notification received when the node is ready. See :ref:`_ready()`. .. _class_Node_constant_NOTIFICATION_PAUSED: @@ -789,7 +789,7 @@ Notification received when the node is unpaused. See :ref:`process_mode` -Notification received from the tree every physics frame when :ref:`is_physics_processing` returns ``true``. See :ref:`_physics_process`. +Notification received from the tree every physics frame when :ref:`is_physics_processing()` returns ``true``. See :ref:`_physics_process()`. .. _class_Node_constant_NOTIFICATION_PROCESS: @@ -797,7 +797,7 @@ Notification received from the tree every physics frame when :ref:`is_physics_pr **NOTIFICATION_PROCESS** = ``17`` :ref:`πŸ”—` -Notification received from the tree every rendered frame when :ref:`is_processing` returns ``true``. See :ref:`_process`. +Notification received from the tree every rendered frame when :ref:`is_processing()` returns ``true``. See :ref:`_process()`. .. _class_Node_constant_NOTIFICATION_PARENTED: @@ -805,7 +805,7 @@ Notification received from the tree every rendered frame when :ref:`is_processin **NOTIFICATION_PARENTED** = ``18`` :ref:`πŸ”—` -Notification received when the node is set as a child of another node (see :ref:`add_child` and :ref:`add_sibling`). +Notification received when the node is set as a child of another node (see :ref:`add_child()` and :ref:`add_sibling()`). \ **Note:** This does *not* mean that the node entered the :ref:`SceneTree`. @@ -815,7 +815,7 @@ Notification received when the node is set as a child of another node (see :ref: **NOTIFICATION_UNPARENTED** = ``19`` :ref:`πŸ”—` -Notification received when the parent node calls :ref:`remove_child` on this node. +Notification received when the parent node calls :ref:`remove_child()` on this node. \ **Note:** This does *not* mean that the node exited the :ref:`SceneTree`. @@ -825,7 +825,7 @@ Notification received when the parent node calls :ref:`remove_child` -Notification received *only* by the newly instantiated scene root node, when :ref:`PackedScene.instantiate` is completed. +Notification received *only* by the newly instantiated scene root node, when :ref:`PackedScene.instantiate()` is completed. .. _class_Node_constant_NOTIFICATION_DRAG_BEGIN: @@ -835,9 +835,9 @@ Notification received *only* by the newly instantiated scene root node, when :re Notification received when a drag operation begins. All nodes receive this notification, not only the dragged one. -Can be triggered either by dragging a :ref:`Control` that provides drag data (see :ref:`Control._get_drag_data`) or using :ref:`Control.force_drag`. +Can be triggered either by dragging a :ref:`Control` that provides drag data (see :ref:`Control._get_drag_data()`) or using :ref:`Control.force_drag()`. -Use :ref:`Viewport.gui_get_drag_data` to get the dragged data. +Use :ref:`Viewport.gui_get_drag_data()` to get the dragged data. .. _class_Node_constant_NOTIFICATION_DRAG_END: @@ -847,7 +847,7 @@ Use :ref:`Viewport.gui_get_drag_data` t Notification received when a drag operation ends. -Use :ref:`Viewport.gui_is_drag_successful` to check if the drag succeeded. +Use :ref:`Viewport.gui_is_drag_successful()` to check if the drag succeeded. .. _class_Node_constant_NOTIFICATION_PATH_RENAMED: @@ -871,7 +871,7 @@ Notification received when the list of children is changed. This happens when ch **NOTIFICATION_INTERNAL_PROCESS** = ``25`` :ref:`πŸ”—` -Notification received from the tree every rendered frame when :ref:`is_processing_internal` returns ``true``. +Notification received from the tree every rendered frame when :ref:`is_processing_internal()` returns ``true``. .. _class_Node_constant_NOTIFICATION_INTERNAL_PHYSICS_PROCESS: @@ -879,7 +879,7 @@ Notification received from the tree every rendered frame when :ref:`is_processin **NOTIFICATION_INTERNAL_PHYSICS_PROCESS** = ``26`` :ref:`πŸ”—` -Notification received from the tree every physics frame when :ref:`is_physics_processing_internal` returns ``true``. +Notification received from the tree every physics frame when :ref:`is_physics_processing_internal()` returns ``true``. .. _class_Node_constant_NOTIFICATION_POST_ENTER_TREE: @@ -911,7 +911,7 @@ Notification received when the node is enabled again after being disabled. See : **NOTIFICATION_RESET_PHYSICS_INTERPOLATION** = ``2001`` :ref:`πŸ”—` -Notification received when :ref:`reset_physics_interpolation` is called on the node or its ancestors. +Notification received when :ref:`reset_physics_interpolation()` is called on the node or its ancestors. .. _class_Node_constant_NOTIFICATION_EDITOR_PRE_SAVE: @@ -1039,9 +1039,9 @@ Implemented only on iOS. **NOTIFICATION_TRANSLATION_CHANGED** = ``2010`` :ref:`πŸ”—` -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`. +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`. +\ **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()`. :: @@ -1186,7 +1186,7 @@ An optional description to the node. It will be displayed as a tooltip when hove - :ref:`MultiplayerAPI` **get_multiplayer**\ (\ ) -The :ref:`MultiplayerAPI` instance associated with this node. See :ref:`SceneTree.get_multiplayer`. +The :ref:`MultiplayerAPI` instance associated with this node. See :ref:`SceneTree.get_multiplayer()`. \ **Note:** Renaming the node, or moving it in the tree, will not move the :ref:`MultiplayerAPI` to the new path, you will have to update this manually. @@ -1207,7 +1207,7 @@ The :ref:`MultiplayerAPI` instance associated with this no The name of the node. This name must be unique among the siblings (other child nodes from the same parent). When set to an existing sibling's name, the node is automatically renamed. -\ **Note:** When changing the name, the following characters will be replaced with an underscore: (``.`` ``:`` ``@`` ``/`` ``"`` ``%``). In particular, the ``@`` character is reserved for auto-generated names. See also :ref:`String.validate_node_name`. +\ **Note:** When changing the name, the following characters will be replaced with an underscore: (``.`` ``:`` ``@`` ``/`` ``"`` ``%``). In particular, the ``@`` character is reserved for auto-generated names. See also :ref:`String.validate_node_name()`. .. rst-class:: classref-item-separator @@ -1226,7 +1226,7 @@ The name of the node. This name must be unique among the siblings (other child n The owner of this node. The owner must be an ancestor of this node. When packing the owner node in a :ref:`PackedScene`, all the nodes it owns are also saved with it. See also :ref:`unique_name_in_owner`. -\ **Note:** In the editor, nodes not owned by the scene root are usually not displayed in the Scene dock, and will **not** be saved. To prevent this, remember to set the owner after calling :ref:`add_child`. +\ **Note:** In the editor, nodes not owned by the scene root are usually not displayed in the Scene dock, and will **not** be saved. To prevent this, remember to set the owner after calling :ref:`add_child()`. .. rst-class:: classref-item-separator @@ -1245,7 +1245,7 @@ The owner of this node. The owner must be an ancestor of this node. When packing 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`. +\ **Note:** When teleporting a node to a distant position you should temporarily disable interpolation with :ref:`reset_physics_interpolation()`. .. rst-class:: classref-item-separator @@ -1262,7 +1262,7 @@ Allows enabling or disabling physics interpolation per node, offering a finer gr - |void| **set_process_mode**\ (\ value\: :ref:`ProcessMode`\ ) - :ref:`ProcessMode` **get_process_mode**\ (\ ) -The node's processing behavior (see :ref:`ProcessMode`). To check if the node can process in its current mode, use :ref:`can_process`. +The node's processing behavior (see :ref:`ProcessMode`). To check if the node can process in its current mode, use :ref:`can_process()`. .. rst-class:: classref-item-separator @@ -1279,7 +1279,7 @@ The node's processing behavior (see :ref:`ProcessMode`). - |void| **set_physics_process_priority**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_physics_process_priority**\ (\ ) -Similar to :ref:`process_priority` but for :ref:`NOTIFICATION_PHYSICS_PROCESS`, :ref:`_physics_process`, or :ref:`NOTIFICATION_INTERNAL_PHYSICS_PROCESS`. +Similar to :ref:`process_priority` but for :ref:`NOTIFICATION_PHYSICS_PROCESS`, :ref:`_physics_process()`, or :ref:`NOTIFICATION_INTERNAL_PHYSICS_PROCESS`. .. rst-class:: classref-item-separator @@ -1296,7 +1296,7 @@ Similar to :ref:`process_priority` but for - |void| **set_process_priority**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_process_priority**\ (\ ) -The node's execution order of the process callbacks (:ref:`_process`, :ref:`NOTIFICATION_PROCESS`, and :ref:`NOTIFICATION_INTERNAL_PROCESS`). Nodes whose priority value is *lower* call their process callbacks first, regardless of tree order. +The node's execution order of the process callbacks (:ref:`_process()`, :ref:`NOTIFICATION_PROCESS`, and :ref:`NOTIFICATION_INTERNAL_PROCESS`). Nodes whose priority value is *lower* call their process callbacks first, regardless of tree order. .. rst-class:: classref-item-separator @@ -1313,11 +1313,11 @@ The node's execution order of the process callbacks (:ref:`_process`\ ) - :ref:`ProcessThreadGroup` **get_process_thread_group**\ (\ ) -Set the process thread group for this node (basically, whether it receives :ref:`NOTIFICATION_PROCESS`, :ref:`NOTIFICATION_PHYSICS_PROCESS`, :ref:`_process` or :ref:`_physics_process` (and the internal versions) on the main thread or in a sub-thread. +Set the process thread group for this node (basically, whether it receives :ref:`NOTIFICATION_PROCESS`, :ref:`NOTIFICATION_PHYSICS_PROCESS`, :ref:`_process()` or :ref:`_physics_process()` (and the internal versions) on the main thread or in a sub-thread. By default, the thread group is :ref:`PROCESS_THREAD_GROUP_INHERIT`, which means that this node belongs to the same thread group as the parent node. The thread groups means that nodes in a specific thread group will process together, separate to other thread groups (depending on :ref:`process_thread_group_order`). If the value is set is :ref:`PROCESS_THREAD_GROUP_SUB_THREAD`, this thread group will occur on a sub thread (not the main thread), otherwise if set to :ref:`PROCESS_THREAD_GROUP_MAIN_THREAD` it will process on the main thread. If there is not a parent or grandparent node set to something other than inherit, the node will belong to the *default thread group*. This default group will process on the main thread and its group order is 0. -During processing in a sub-thread, accessing most functions in nodes outside the thread group is forbidden (and it will result in an error in debug mode). Use :ref:`Object.call_deferred`, :ref:`call_thread_safe`, :ref:`call_deferred_thread_group` and the likes in order to communicate from the thread groups to the main thread (or to other thread groups). +During processing in a sub-thread, accessing most functions in nodes outside the thread group is forbidden (and it will result in an error in debug mode). Use :ref:`Object.call_deferred()`, :ref:`call_thread_safe()`, :ref:`call_deferred_thread_group()` and the likes in order to communicate from the thread groups to the main thread (or to other thread groups). To better understand process thread groups, the idea is that any node set to any other value than :ref:`PROCESS_THREAD_GROUP_INHERIT` will include any child (and grandchild) nodes set to inherit into its process thread group. This means that the processing of all the nodes in the group will happen together, at the same time as the node including them. @@ -1353,7 +1353,7 @@ Change the process thread group order. Groups with a lesser order will process b - |void| **set_process_thread_messages**\ (\ value\: |bitfield|\[:ref:`ProcessThreadMessages`\]\ ) - |bitfield|\[:ref:`ProcessThreadMessages`\] **get_process_thread_messages**\ (\ ) -Set whether the current thread group will process messages (calls to :ref:`call_deferred_thread_group` on threads), and whether it wants to receive them during regular process or physics process callbacks. +Set whether the current thread group will process messages (calls to :ref:`call_deferred_thread_group()` on threads), and whether it wants to receive them during regular process or physics process callbacks. .. rst-class:: classref-item-separator @@ -1387,7 +1387,7 @@ The original scene's file path, if the node has been instantiated from a :ref:`P - |void| **set_unique_name_in_owner**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_unique_name_in_owner**\ (\ ) -If ``true``, the node can be accessed from any node sharing the same :ref:`owner` or from the :ref:`owner` itself, with special ``%Name`` syntax in :ref:`get_node`. +If ``true``, the node can be accessed from any node sharing the same :ref:`owner` or from the :ref:`owner` itself, with special ``%Name`` syntax in :ref:`get_node()`. \ **Note:** If another node with the same :ref:`owner` shares the same :ref:`name` as this node, the other node will no longer be accessible as unique. @@ -1406,9 +1406,9 @@ Method Descriptions |void| **_enter_tree**\ (\ ) |virtual| :ref:`πŸ”—` -Called when the node enters the :ref:`SceneTree` (e.g. upon instantiating, scene changing, or after calling :ref:`add_child` in a script). If the node has children, its :ref:`_enter_tree` callback will be called first, and then that of the children. +Called when the node enters the :ref:`SceneTree` (e.g. upon instantiating, scene changing, or after calling :ref:`add_child()` in a script). If the node has children, its :ref:`_enter_tree()` callback will be called first, and then that of the children. -Corresponds to the :ref:`NOTIFICATION_ENTER_TREE` notification in :ref:`Object._notification`. +Corresponds to the :ref:`NOTIFICATION_ENTER_TREE` notification in :ref:`Object._notification()`. .. rst-class:: classref-item-separator @@ -1420,9 +1420,9 @@ Corresponds to the :ref:`NOTIFICATION_ENTER_TREE` -Called when the node is about to leave the :ref:`SceneTree` (e.g. upon freeing, scene changing, or after calling :ref:`remove_child` in a script). If the node has children, its :ref:`_exit_tree` callback will be called last, after all its children have left the tree. +Called when the node is about to leave the :ref:`SceneTree` (e.g. upon freeing, scene changing, or after calling :ref:`remove_child()` in a script). If the node has children, its :ref:`_exit_tree()` callback will be called last, after all its children have left the tree. -Corresponds to the :ref:`NOTIFICATION_EXIT_TREE` notification in :ref:`Object._notification` and signal :ref:`tree_exiting`. To get notified when the node has already left the active tree, connect to the :ref:`tree_exited`. +Corresponds to the :ref:`NOTIFICATION_EXIT_TREE` notification in :ref:`Object._notification()` and signal :ref:`tree_exiting`. To get notified when the node has already left the active tree, connect to the :ref:`tree_exited`. .. rst-class:: classref-item-separator @@ -1438,7 +1438,7 @@ The elements in the array returned from this method are displayed as warnings in Returning an empty array produces no warnings. -Call :ref:`update_configuration_warnings` when the warnings need to be updated for this node. +Call :ref:`update_configuration_warnings()` when the warnings need to be updated for this node. :: @@ -1465,11 +1465,11 @@ Call :ref:`update_configuration_warnings`. +It is only called if input processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process_input()`. -To consume the input event and stop it propagating further to other nodes, :ref:`Viewport.set_input_as_handled` can be called. +To consume the input event and stop it propagating further to other nodes, :ref:`Viewport.set_input_as_handled()` can be called. -For gameplay input, :ref:`_unhandled_input` and :ref:`_unhandled_key_input` are usually a better fit as they allow the GUI to intercept the events first. +For gameplay input, :ref:`_unhandled_input()` and :ref:`_unhandled_key_input()` are usually a better fit as they allow the GUI to intercept the events first. \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). @@ -1485,15 +1485,15 @@ For gameplay input, :ref:`_unhandled_input`. +It is only called if physics processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_physics_process()`. Processing happens in order of :ref:`process_physics_priority`, lower priority values are called first. Nodes with the same priority are processed in tree order, or top to bottom as seen in the editor (also known as pre-order traversal). -Corresponds to the :ref:`NOTIFICATION_PHYSICS_PROCESS` notification in :ref:`Object._notification`. +Corresponds to the :ref:`NOTIFICATION_PHYSICS_PROCESS` notification in :ref:`Object._notification()`. \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). -\ **Note:** ``delta`` will be larger than expected if running at a framerate lower than :ref:`Engine.physics_ticks_per_second` / :ref:`Engine.max_physics_steps_per_frame` FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both :ref:`_process` and :ref:`_physics_process`. As a result, avoid using ``delta`` for time measurements in real-world seconds. Use the :ref:`Time` singleton's methods for this purpose instead, such as :ref:`Time.get_ticks_usec`. +\ **Note:** ``delta`` will be larger than expected if running at a framerate lower than :ref:`Engine.physics_ticks_per_second` / :ref:`Engine.max_physics_steps_per_frame` FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both :ref:`_process()` and :ref:`_physics_process()`. As a result, avoid using ``delta`` for time measurements in real-world seconds. Use the :ref:`Time` singleton's methods for this purpose instead, such as :ref:`Time.get_ticks_usec()`. .. rst-class:: classref-item-separator @@ -1507,15 +1507,15 @@ Corresponds to the :ref:`NOTIFICATION_PHYSICS_PROCESS`. +It is only called if processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process()`. Processing happens in order of :ref:`process_priority`, lower priority values are called first. Nodes with the same priority are processed in tree order, or top to bottom as seen in the editor (also known as pre-order traversal). -Corresponds to the :ref:`NOTIFICATION_PROCESS` notification in :ref:`Object._notification`. +Corresponds to the :ref:`NOTIFICATION_PROCESS` notification in :ref:`Object._notification()`. \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). -\ **Note:** ``delta`` will be larger than expected if running at a framerate lower than :ref:`Engine.physics_ticks_per_second` / :ref:`Engine.max_physics_steps_per_frame` FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both :ref:`_process` and :ref:`_physics_process`. As a result, avoid using ``delta`` for time measurements in real-world seconds. Use the :ref:`Time` singleton's methods for this purpose instead, such as :ref:`Time.get_ticks_usec`. +\ **Note:** ``delta`` will be larger than expected if running at a framerate lower than :ref:`Engine.physics_ticks_per_second` / :ref:`Engine.max_physics_steps_per_frame` FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both :ref:`_process()` and :ref:`_physics_process()`. As a result, avoid using ``delta`` for time measurements in real-world seconds. Use the :ref:`Time` singleton's methods for this purpose instead, such as :ref:`Time.get_ticks_usec()`. .. rst-class:: classref-item-separator @@ -1527,13 +1527,13 @@ Corresponds to the :ref:`NOTIFICATION_PROCESS` -Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their :ref:`_ready` callbacks get triggered first, and the parent node will receive the ready notification afterwards. +Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their :ref:`_ready()` callbacks get triggered first, and the parent node will receive the ready notification afterwards. -Corresponds to the :ref:`NOTIFICATION_READY` notification in :ref:`Object._notification`. See also the ``@onready`` annotation for variables. +Corresponds to the :ref:`NOTIFICATION_READY` notification in :ref:`Object._notification()`. See also the ``@onready`` annotation for variables. -Usually used for initialization. For even earlier initialization, :ref:`Object._init` may be used. See also :ref:`_enter_tree`. +Usually used for initialization. For even earlier initialization, :ref:`Object._init()` may be used. See also :ref:`_enter_tree()`. -\ **Note:** This method may be called only once for each node. After removing a node from the scene tree and adding it again, :ref:`_ready` will **not** be called a second time. This can be bypassed by requesting another call with :ref:`request_ready`, which may be called anywhere before adding the node again. +\ **Note:** This method may be called only once for each node. After removing a node from the scene tree and adding it again, :ref:`_ready()` will **not** be called a second time. This can be bypassed by requesting another call with :ref:`request_ready()`, which may be called anywhere before adding the node again. .. rst-class:: classref-item-separator @@ -1545,13 +1545,13 @@ Usually used for initialization. For even earlier initialization, :ref:`Object._ |void| **_shortcut_input**\ (\ event\: :ref:`InputEvent`\ ) |virtual| :ref:`πŸ”—` -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. +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`. +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()`. -To consume the input event and stop it propagating further to other nodes, :ref:`Viewport.set_input_as_handled` can be called. +To consume the input event and stop it propagating further to other nodes, :ref:`Viewport.set_input_as_handled()` can be called. -This method can be used to handle shortcuts. For generic GUI events, use :ref:`_input` instead. Gameplay events should usually be handled with either :ref:`_unhandled_input` or :ref:`_unhandled_key_input`. +This method can be used to handle shortcuts. For generic GUI events, use :ref:`_input()` instead. Gameplay events should usually be handled with either :ref:`_unhandled_input()` or :ref:`_unhandled_key_input()`. \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not orphan). @@ -1565,13 +1565,13 @@ This method can be used to handle shortcuts. For generic GUI events, use :ref:`_ |void| **_unhandled_input**\ (\ event\: :ref:`InputEvent`\ ) |virtual| :ref:`πŸ”—` -Called when an :ref:`InputEvent` hasn't been consumed by :ref:`_input` or any GUI :ref:`Control` item. It is called after :ref:`_shortcut_input` and after :ref:`_unhandled_key_input`. The input event propagates up through the node tree until a node consumes it. +Called when an :ref:`InputEvent` hasn't been consumed by :ref:`_input()` or any GUI :ref:`Control` item. It is called after :ref:`_shortcut_input()` and after :ref:`_unhandled_key_input()`. The input event propagates up through the node tree until a node consumes it. -It is only called if unhandled input processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process_unhandled_input`. +It is only called if unhandled input processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process_unhandled_input()`. -To consume the input event and stop it propagating further to other nodes, :ref:`Viewport.set_input_as_handled` can be called. +To consume the input event and stop it propagating further to other nodes, :ref:`Viewport.set_input_as_handled()` can be called. -For gameplay input, this method is usually a better fit than :ref:`_input`, as GUI events need a higher priority. For keyboard shortcuts, consider using :ref:`_shortcut_input` instead, as it is called before this method. Finally, to handle keyboard events, consider using :ref:`_unhandled_key_input` for performance reasons. +For gameplay input, this method is usually a better fit than :ref:`_input()`, as GUI events need a higher priority. For keyboard shortcuts, consider using :ref:`_shortcut_input()` instead, as it is called before this method. Finally, to handle keyboard events, consider using :ref:`_unhandled_key_input()` for performance reasons. \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). @@ -1585,15 +1585,15 @@ For gameplay input, this method is usually a better fit than :ref:`_input`\ ) |virtual| :ref:`πŸ”—` -Called when an :ref:`InputEventKey` hasn't been consumed by :ref:`_input` or any GUI :ref:`Control` item. It is called after :ref:`_shortcut_input` but before :ref:`_unhandled_input`. The input event propagates up through the node tree until a node consumes it. +Called when an :ref:`InputEventKey` hasn't been consumed by :ref:`_input()` or any GUI :ref:`Control` item. It is called after :ref:`_shortcut_input()` but before :ref:`_unhandled_input()`. The input event propagates up through the node tree until a node consumes it. -It is only called if unhandled key input processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process_unhandled_key_input`. +It is only called if unhandled key input processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process_unhandled_key_input()`. -To consume the input event and stop it propagating further to other nodes, :ref:`Viewport.set_input_as_handled` can be called. +To consume the input event and stop it propagating further to other nodes, :ref:`Viewport.set_input_as_handled()` can be called. This method can be used to handle Unicode character input with :kbd:`Alt`, :kbd:`Alt + Ctrl`, and :kbd:`Alt + Shift` modifiers, after shortcuts were handled. -For gameplay input, this and :ref:`_unhandled_input` are usually a better fit than :ref:`_input`, as GUI events should be handled first. This method also performs better than :ref:`_unhandled_input`, since unrelated events such as :ref:`InputEventMouseMotion` are automatically filtered. For shortcuts, consider using :ref:`_shortcut_input` instead. +For gameplay input, this and :ref:`_unhandled_input()` are usually a better fit than :ref:`_input()`, as GUI events should be handled first. This method also performs better than :ref:`_unhandled_input()`, since unrelated events such as :ref:`InputEventMouseMotion` are automatically filtered. For shortcuts, consider using :ref:`_shortcut_input()` instead. \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). @@ -1611,9 +1611,9 @@ Adds a child ``node``. Nodes can have any number of children, but every child mu If ``force_readable_name`` is ``true``, improves the readability of the added ``node``. If not named, the ``node`` is renamed to its type, and if it shares :ref:`name` with a sibling, a number is suffixed more appropriately. This operation is very slow. As such, it is recommended leaving this to ``false``, which assigns a dummy name featuring ``@`` in both situations. -If ``internal`` is different than :ref:`INTERNAL_MODE_DISABLED`, the child will be added as internal node. These nodes are ignored by methods like :ref:`get_children`, unless their parameter ``include_internal`` is ``true``. The intended usage is to hide the internal nodes from the user, so the user won't accidentally delete or modify them. Used by some GUI nodes, e.g. :ref:`ColorPicker`. See :ref:`InternalMode` for available modes. +If ``internal`` is different than :ref:`INTERNAL_MODE_DISABLED`, the child will be added as internal node. These nodes are ignored by methods like :ref:`get_children()`, unless their parameter ``include_internal`` is ``true``. The intended usage is to hide the internal nodes from the user, so the user won't accidentally delete or modify them. Used by some GUI nodes, e.g. :ref:`ColorPicker`. See :ref:`InternalMode` for available modes. -\ **Note:** If ``node`` already has a parent, this method will fail. Use :ref:`remove_child` first to remove ``node`` from its current parent. For example: +\ **Note:** If ``node`` already has a parent, this method will fail. Use :ref:`remove_child()` first to remove ``node`` from its current parent. For example: .. tabs:: @@ -1636,9 +1636,9 @@ If ``internal`` is different than :ref:`INTERNAL_MODE_DISABLED` instead of this method. +If you need the child node to be added below a specific node in the list of children, use :ref:`add_sibling()` instead of this method. -\ **Note:** If you want a child to be persisted to a :ref:`PackedScene`, you must set :ref:`owner` in addition to calling :ref:`add_child`. This is typically relevant for :doc:`tool scripts <../tutorials/plugins/running_code_in_the_editor>` and :doc:`editor plugins <../tutorials/plugins/editor/index>`. If :ref:`add_child` is called without setting :ref:`owner`, the newly added **Node** will not be visible in the scene tree, though it will be visible in the 2D/3D view. +\ **Note:** If you want a child to be persisted to a :ref:`PackedScene`, you must set :ref:`owner` in addition to calling :ref:`add_child()`. This is typically relevant for :doc:`tool scripts <../tutorials/plugins/running_code_in_the_editor>` and :doc:`editor plugins <../tutorials/plugins/editor/index>`. If :ref:`add_child()` is called without setting :ref:`owner`, the newly added **Node** will not be visible in the scene tree, though it will be visible in the 2D/3D view. .. rst-class:: classref-item-separator @@ -1654,9 +1654,9 @@ Adds a ``sibling`` node to this node's parent, and moves the added sibling right If ``force_readable_name`` is ``true``, improves the readability of the added ``sibling``. If not named, the ``sibling`` is renamed to its type, and if it shares :ref:`name` with a sibling, a number is suffixed more appropriately. This operation is very slow. As such, it is recommended leaving this to ``false``, which assigns a dummy name featuring ``@`` in both situations. -Use :ref:`add_child` instead of this method if you don't need the child node to be added below a specific node in the list of children. +Use :ref:`add_child()` instead of this method if you don't need the child node to be added below a specific node in the list of children. -\ **Note:** If this node is internal, the added sibling will be internal too (see :ref:`add_child`'s ``internal`` parameter). +\ **Note:** If this node is internal, the added sibling will be internal too (see :ref:`add_child()`'s ``internal`` parameter). .. rst-class:: classref-item-separator @@ -1674,7 +1674,7 @@ If ``persistent`` is ``true``, the group will be stored when saved inside a :ref \ **Note:** To improve performance, the order of group names is *not* guaranteed and may vary between project runs. Therefore, do not rely on the group order. -\ **Note:** :ref:`SceneTree`'s group methods will *not* work on this node if not inside the tree (see :ref:`is_inside_tree`). +\ **Note:** :ref:`SceneTree`'s group methods will *not* work on this node if not inside the tree (see :ref:`is_inside_tree()`). .. rst-class:: classref-item-separator @@ -1688,9 +1688,9 @@ If ``persistent`` is ``true``, the group will be stored when saved inside a :ref 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. +This method works the same as :ref:`Object.tr()`, with the addition of respecting the :ref:`auto_translate_mode` state. -If :ref:`Object.can_translate_messages` is ``false``, or no translation is available, this method returns the ``message`` without changes. See :ref:`Object.set_message_translation`. +If :ref:`Object.can_translate_messages()` is ``false``, or no translation is available, this method returns the ``message`` without changes. See :ref:`Object.set_message_translation()`. For detailed examples, see :doc:`Internationalizing games <../tutorials/i18n/internationalizing_games>`. @@ -1706,15 +1706,15 @@ For detailed examples, see :doc:`Internationalizing games <../tutorials/i18n/int Translates a ``message`` or ``plural_message``, using the translation catalogs configured in the Project Settings. Further ``context`` can be specified to help with the translation. -This method works the same as :ref:`Object.tr_n`, with the addition of respecting the :ref:`auto_translate_mode` state. +This method works the same as :ref:`Object.tr_n()`, with the addition of respecting the :ref:`auto_translate_mode` state. -If :ref:`Object.can_translate_messages` is ``false``, or no translation is available, this method returns ``message`` or ``plural_message``, without changes. See :ref:`Object.set_message_translation`. +If :ref:`Object.can_translate_messages()` is ``false``, or no translation is available, this method returns ``message`` or ``plural_message``, without changes. See :ref:`Object.set_message_translation()`. The ``n`` is the number, or amount, of the message's subject. It is used by the translation system to fetch the correct plural form for the current language. For detailed examples, see :doc:`Localization using gettext <../tutorials/i18n/localization_using_gettext>`. -\ **Note:** Negative and :ref:`float` numbers may not properly apply to some countable subjects. It's recommended to handle these cases with :ref:`atr`. +\ **Note:** Negative and :ref:`float` numbers may not properly apply to some countable subjects. It's recommended to handle these cases with :ref:`atr()`. .. rst-class:: classref-item-separator @@ -1726,7 +1726,7 @@ For detailed examples, see :doc:`Localization using gettext <../tutorials/i18n/l :ref:`Variant` **call_deferred_thread_group**\ (\ method\: :ref:`StringName`, ...\ ) |vararg| :ref:`πŸ”—` -This function is similar to :ref:`Object.call_deferred` except that the call will take place when the node thread group is processed. If the node thread group processes in sub-threads, then the call will be done on that thread, right before :ref:`NOTIFICATION_PROCESS` or :ref:`NOTIFICATION_PHYSICS_PROCESS`, the :ref:`_process` or :ref:`_physics_process` or their internal versions are called. +This function is similar to :ref:`Object.call_deferred()` except that the call will take place when the node thread group is processed. If the node thread group processes in sub-threads, then the call will be done on that thread, right before :ref:`NOTIFICATION_PROCESS` or :ref:`NOTIFICATION_PHYSICS_PROCESS`, the :ref:`_process()` or :ref:`_physics_process()` or their internal versions are called. .. rst-class:: classref-item-separator @@ -1750,7 +1750,7 @@ This function ensures that the calling of this function will succeed, no matter :ref:`bool` **can_process**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the node can receive processing notifications and input callbacks (:ref:`NOTIFICATION_PROCESS`, :ref:`_input`, etc.) from the :ref:`SceneTree` and :ref:`Viewport`. The returned value depends on :ref:`process_mode`: +Returns ``true`` if the node can receive processing notifications and input callbacks (:ref:`NOTIFICATION_PROCESS`, :ref:`_input()`, etc.) from the :ref:`SceneTree` and :ref:`Viewport`. The returned value depends on :ref:`process_mode`: - If set to :ref:`PROCESS_MODE_PAUSABLE`, returns ``true`` when the game is processing, i.e. :ref:`SceneTree.paused` is ``false``; @@ -1791,7 +1791,7 @@ This is the equivalent of doing: -The Tween will start automatically on the next process frame or physics frame (depending on :ref:`TweenProcessMode`). See :ref:`Tween.bind_node` for more info on Tweens bound to nodes. +The Tween will start automatically on the next process frame or physics frame (depending on :ref:`TweenProcessMode`). See :ref:`Tween.bind_node()` for more info on Tweens bound to nodes. \ **Note:** The method can still be used when the node is not inside :ref:`SceneTree`. It can fail in an unlikely case of using a custom :ref:`MainLoop`. @@ -1807,7 +1807,7 @@ The Tween will start automatically on the next process frame or physics frame (d Duplicates the node, returning a new node with all of its properties, signals, groups, and children copied from the original. The behavior can be tweaked through the ``flags`` (see :ref:`DuplicateFlags`). -\ **Note:** For nodes with a :ref:`Script` attached, if :ref:`Object._init` has been defined with required parameters, the duplicated node will not have a :ref:`Script`. +\ **Note:** For nodes with a :ref:`Script` attached, if :ref:`Object._init()` has been defined with required parameters, the duplicated node will not have a :ref:`Script`. .. rst-class:: classref-item-separator @@ -1819,15 +1819,15 @@ Duplicates the node, returning a new node with all of its properties, signals, g :ref:`Node` **find_child**\ (\ pattern\: :ref:`String`, recursive\: :ref:`bool` = true, owned\: :ref:`bool` = true\ ) |const| :ref:`πŸ”—` -Finds the first descendant of this node whose :ref:`name` matches ``pattern``, returning ``null`` if no match is found. The matching is done against node names, *not* their paths, through :ref:`String.match`. As such, it is case-sensitive, ``"*"`` matches zero or more characters, and ``"?"`` matches any single character. +Finds the first descendant of this node whose :ref:`name` matches ``pattern``, returning ``null`` if no match is found. The matching is done against node names, *not* their paths, through :ref:`String.match()`. As such, it is case-sensitive, ``"*"`` matches zero or more characters, and ``"?"`` matches any single character. -If ``recursive`` is ``false``, only this node's direct children are checked. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. Internal children are also included in the search (see ``internal`` parameter in :ref:`add_child`). +If ``recursive`` is ``false``, only this node's direct children are checked. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. Internal children are also included in the search (see ``internal`` parameter in :ref:`add_child()`). If ``owned`` is ``true``, only descendants with a valid :ref:`owner` node are checked. -\ **Note:** This method can be very slow. Consider storing a reference to the found node in a variable. Alternatively, use :ref:`get_node` with unique names (see :ref:`unique_name_in_owner`). +\ **Note:** This method can be very slow. Consider storing a reference to the found node in a variable. Alternatively, use :ref:`get_node()` with unique names (see :ref:`unique_name_in_owner`). -\ **Note:** To find all descendant nodes matching a pattern or a class type, see :ref:`find_children`. +\ **Note:** To find all descendant nodes matching a pattern or a class type, see :ref:`find_children()`. .. rst-class:: classref-item-separator @@ -1839,17 +1839,17 @@ If ``owned`` is ``true``, only descendants with a valid :ref:`owner`\[:ref:`Node`\] **find_children**\ (\ pattern\: :ref:`String`, type\: :ref:`String` = "", recursive\: :ref:`bool` = true, owned\: :ref:`bool` = true\ ) |const| :ref:`πŸ”—` -Finds all descendants of this node whose names match ``pattern``, returning an empty :ref:`Array` if no match is found. The matching is done against node names, *not* their paths, through :ref:`String.match`. As such, it is case-sensitive, ``"*"`` matches zero or more characters, and ``"?"`` matches any single character. +Finds all descendants of this node whose names match ``pattern``, returning an empty :ref:`Array` if no match is found. The matching is done against node names, *not* their paths, through :ref:`String.match()`. As such, it is case-sensitive, ``"*"`` matches zero or more characters, and ``"?"`` matches any single character. -If ``type`` is not empty, only ancestors inheriting from ``type`` are included (see :ref:`Object.is_class`). +If ``type`` is not empty, only ancestors inheriting from ``type`` are included (see :ref:`Object.is_class()`). -If ``recursive`` is ``false``, only this node's direct children are checked. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. Internal children are also included in the search (see ``internal`` parameter in :ref:`add_child`). +If ``recursive`` is ``false``, only this node's direct children are checked. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. Internal children are also included in the search (see ``internal`` parameter in :ref:`add_child()`). If ``owned`` is ``true``, only descendants with a valid :ref:`owner` node are checked. \ **Note:** This method can be very slow. Consider storing references to the found nodes in a variable. -\ **Note:** To find a single descendant node matching a pattern, see :ref:`find_child`. +\ **Note:** To find a single descendant node matching a pattern, see :ref:`find_child()`. .. rst-class:: classref-item-separator @@ -1861,9 +1861,9 @@ If ``owned`` is ``true``, only descendants with a valid :ref:`owner` **find_parent**\ (\ pattern\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Finds the first ancestor of this node whose :ref:`name` matches ``pattern``, returning ``null`` if no match is found. The matching is done through :ref:`String.match`. As such, it is case-sensitive, ``"*"`` matches zero or more characters, and ``"?"`` matches any single character. See also :ref:`find_child` and :ref:`find_children`. +Finds the first ancestor of this node whose :ref:`name` matches ``pattern``, returning ``null`` if no match is found. The matching is done through :ref:`String.match()`. As such, it is case-sensitive, ``"*"`` matches zero or more characters, and ``"?"`` matches any single character. See also :ref:`find_child()` and :ref:`find_children()`. -\ **Note:** As this method walks upwards in the scene tree, it can be slow in large, deeply nested nodes. Consider storing a reference to the found node in a variable. Alternatively, use :ref:`get_node` with unique names (see :ref:`unique_name_in_owner`). +\ **Note:** As this method walks upwards in the scene tree, it can be slow in large, deeply nested nodes. Consider storing a reference to the found node in a variable. Alternatively, use :ref:`get_node()` with unique names (see :ref:`unique_name_in_owner`). .. rst-class:: classref-item-separator @@ -1875,9 +1875,9 @@ Finds the first ancestor of this node whose :ref:`name :ref:`Node` **get_child**\ (\ idx\: :ref:`int`, include_internal\: :ref:`bool` = false\ ) |const| :ref:`πŸ”—` -Fetches a child node by its index. Each child node has an index relative its siblings (see :ref:`get_index`). The first child is at index 0. Negative values can also be used to start from the end of the list. This method can be used in combination with :ref:`get_child_count` to iterate over this node's children. If no child exists at the given index, this method returns ``null`` and an error is generated. +Fetches a child node by its index. Each child node has an index relative its siblings (see :ref:`get_index()`). The first child is at index 0. Negative values can also be used to start from the end of the list. This method can be used in combination with :ref:`get_child_count()` to iterate over this node's children. If no child exists at the given index, this method returns ``null`` and an error is generated. -If ``include_internal`` is ``false``, internal children are ignored (see :ref:`add_child`'s ``internal`` parameter). +If ``include_internal`` is ``false``, internal children are ignored (see :ref:`add_child()`'s ``internal`` parameter). :: @@ -1889,7 +1889,7 @@ If ``include_internal`` is ``false``, internal children are ignored (see :ref:`a var b = get_child(2).name # b is "Last" var c = get_child(-1).name # c is "Last" -\ **Note:** To fetch a node by :ref:`NodePath`, use :ref:`get_node`. +\ **Note:** To fetch a node by :ref:`NodePath`, use :ref:`get_node()`. .. rst-class:: classref-item-separator @@ -1903,7 +1903,7 @@ If ``include_internal`` is ``false``, internal children are ignored (see :ref:`a Returns the number of children of this node. -If ``include_internal`` is ``false``, internal children are not counted (see :ref:`add_child`'s ``internal`` parameter). +If ``include_internal`` is ``false``, internal children are not counted (see :ref:`add_child()`'s ``internal`` parameter). .. rst-class:: classref-item-separator @@ -1917,7 +1917,7 @@ If ``include_internal`` is ``false``, internal children are not counted (see :re Returns all children of this node inside an :ref:`Array`. -If ``include_internal`` is ``false``, excludes internal children from the returned array (see :ref:`add_child`'s ``internal`` parameter). +If ``include_internal`` is ``false``, excludes internal children from the returned array (see :ref:`add_child()`'s ``internal`` parameter). .. rst-class:: classref-item-separator @@ -1968,9 +1968,9 @@ Returns an :ref:`Array` of group names that the node has been added :ref:`int` **get_index**\ (\ include_internal\: :ref:`bool` = false\ ) |const| :ref:`πŸ”—` -Returns this node's order among its siblings. The first node's index is ``0``. See also :ref:`get_child`. +Returns this node's order among its siblings. The first node's index is ``0``. See also :ref:`get_child()`. -If ``include_internal`` is ``false``, returns the index ignoring internal children. The first, non-internal child will have an index of ``0`` (see :ref:`add_child`'s ``internal`` parameter). +If ``include_internal`` is ``false``, returns the index ignoring internal children. The first, non-internal child will have an index of ``0`` (see :ref:`add_child()`'s ``internal`` parameter). .. rst-class:: classref-item-separator @@ -1994,7 +1994,7 @@ Returns the :ref:`Window` that contains this node, or the last exc :ref:`int` **get_multiplayer_authority**\ (\ ) |const| :ref:`πŸ”—` -Returns the peer ID of the multiplayer authority for this node. See :ref:`set_multiplayer_authority`. +Returns the peer ID of the multiplayer authority for this node. See :ref:`set_multiplayer_authority()`. .. rst-class:: classref-item-separator @@ -2008,7 +2008,7 @@ Returns the peer ID of the multiplayer authority for this node. See :ref:`set_mu Fetches a node. The :ref:`NodePath` can either be a relative path (from this node), or an absolute path (from the :ref:`SceneTree.root`) to a node. If ``path`` does not point to a valid node, generates an error and returns ``null``. Attempts to access methods on the return value will result in an *"Attempt to call on a null instance."* error. -\ **Note:** Fetching by absolute path only works when the node is inside the scene tree (see :ref:`is_inside_tree`). +\ **Note:** Fetching by absolute path only works when the node is inside the scene tree (see :ref:`is_inside_tree()`). \ **Example:** Assume this method is called from the Character node, inside the following tree: @@ -2062,7 +2062,7 @@ Fetches a node and its most nested resource as specified by the :ref:`NodePath`, or ``null`` if not found; -- Element ``2`` is the remaining :ref:`NodePath`, referring to an existing, non-:ref:`Resource` property (see :ref:`Object.get_indexed`). +- Element ``2`` is the remaining :ref:`NodePath`, referring to an existing, non-:ref:`Resource` property (see :ref:`Object.get_indexed()`). \ **Example:** Assume that the child's :ref:`Sprite2D.texture` has been assigned a :ref:`AtlasTexture`: @@ -2115,7 +2115,7 @@ Fetches a node and its most nested resource as specified by the :ref:`NodePath` **get_node_or_null**\ (\ path\: :ref:`NodePath`\ ) |const| :ref:`πŸ”—` -Fetches a node by :ref:`NodePath`. Similar to :ref:`get_node`, but does not generate an error if ``path`` does not point to a valid node. +Fetches a node by :ref:`NodePath`. Similar to :ref:`get_node()`, but does not generate an error if ``path`` does not point to a valid node. .. rst-class:: classref-item-separator @@ -2167,9 +2167,9 @@ If ``use_unique_path`` is ``true``, returns the shortest path accounting for thi :ref:`float` **get_physics_process_delta_time**\ (\ ) |const| :ref:`πŸ”—` -Returns the time elapsed (in seconds) since the last physics callback. This value is identical to :ref:`_physics_process`'s ``delta`` parameter, and is often consistent at run-time, unless :ref:`Engine.physics_ticks_per_second` is changed. See also :ref:`NOTIFICATION_PHYSICS_PROCESS`. +Returns the time elapsed (in seconds) since the last physics callback. This value is identical to :ref:`_physics_process()`'s ``delta`` parameter, and is often consistent at run-time, unless :ref:`Engine.physics_ticks_per_second` is changed. See also :ref:`NOTIFICATION_PHYSICS_PROCESS`. -\ **Note:** The returned value will be larger than expected if running at a framerate lower than :ref:`Engine.physics_ticks_per_second` / :ref:`Engine.max_physics_steps_per_frame` FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both :ref:`_process` and :ref:`_physics_process`. As a result, avoid using ``delta`` for time measurements in real-world seconds. Use the :ref:`Time` singleton's methods for this purpose instead, such as :ref:`Time.get_ticks_usec`. +\ **Note:** The returned value will be larger than expected if running at a framerate lower than :ref:`Engine.physics_ticks_per_second` / :ref:`Engine.max_physics_steps_per_frame` FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both :ref:`_process()` and :ref:`_physics_process()`. As a result, avoid using ``delta`` for time measurements in real-world seconds. Use the :ref:`Time` singleton's methods for this purpose instead, such as :ref:`Time.get_ticks_usec()`. .. rst-class:: classref-item-separator @@ -2181,9 +2181,9 @@ Returns the time elapsed (in seconds) since the last physics callback. This valu :ref:`float` **get_process_delta_time**\ (\ ) |const| :ref:`πŸ”—` -Returns the time elapsed (in seconds) since the last process callback. This value is identical to :ref:`_process`'s ``delta`` parameter, and may vary from frame to frame. See also :ref:`NOTIFICATION_PROCESS`. +Returns the time elapsed (in seconds) since the last process callback. This value is identical to :ref:`_process()`'s ``delta`` parameter, and may vary from frame to frame. See also :ref:`NOTIFICATION_PROCESS`. -\ **Note:** The returned value will be larger than expected if running at a framerate lower than :ref:`Engine.physics_ticks_per_second` / :ref:`Engine.max_physics_steps_per_frame` FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both :ref:`_process` and :ref:`_physics_process`. As a result, avoid using ``delta`` for time measurements in real-world seconds. Use the :ref:`Time` singleton's methods for this purpose instead, such as :ref:`Time.get_ticks_usec`. +\ **Note:** The returned value will be larger than expected if running at a framerate lower than :ref:`Engine.physics_ticks_per_second` / :ref:`Engine.max_physics_steps_per_frame` FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both :ref:`_process()` and :ref:`_physics_process()`. As a result, avoid using ``delta`` for time measurements in real-world seconds. Use the :ref:`Time` singleton's methods for this purpose instead, such as :ref:`Time.get_ticks_usec()`. .. rst-class:: classref-item-separator @@ -2195,7 +2195,7 @@ Returns the time elapsed (in seconds) since the last process callback. This valu :ref:`Variant` **get_rpc_config**\ (\ ) |const| :ref:`πŸ”—` -Returns a :ref:`Dictionary` mapping method names to their RPC configuration defined for this node using :ref:`rpc_config`. +Returns a :ref:`Dictionary` mapping method names to their RPC configuration defined for this node using :ref:`rpc_config()`. .. rst-class:: classref-item-separator @@ -2207,7 +2207,7 @@ Returns a :ref:`Dictionary` mapping method names to their RPC :ref:`bool` **get_scene_instance_load_placeholder**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this node is an instance load placeholder. See :ref:`InstancePlaceholder` and :ref:`set_scene_instance_load_placeholder`. +Returns ``true`` if this node is an instance load placeholder. See :ref:`InstancePlaceholder` and :ref:`set_scene_instance_load_placeholder()`. .. rst-class:: classref-item-separator @@ -2219,7 +2219,7 @@ Returns ``true`` if this node is an instance load placeholder. See :ref:`Instanc :ref:`SceneTree` **get_tree**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`SceneTree` that contains this node. If this node is not inside the tree, generates an error and returns ``null``. See also :ref:`is_inside_tree`. +Returns the :ref:`SceneTree` that contains this node. If this node is not inside the tree, generates an error and returns ``null``. See also :ref:`is_inside_tree()`. .. rst-class:: classref-item-separator @@ -2231,7 +2231,7 @@ Returns the :ref:`SceneTree` that contains this node. If this n :ref:`String` **get_tree_string**\ (\ ) :ref:`πŸ”—` -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. +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. May print, for example: @@ -2254,7 +2254,7 @@ May print, for example: :ref:`String` **get_tree_string_pretty**\ (\ ) :ref:`πŸ”—` -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. +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. May print, for example: @@ -2301,7 +2301,7 @@ Returns the :ref:`Window` that contains this node. If the node is :ref:`bool` **has_node**\ (\ path\: :ref:`NodePath`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the ``path`` points to a valid node. See also :ref:`get_node`. +Returns ``true`` if the ``path`` points to a valid node. See also :ref:`get_node()`. .. rst-class:: classref-item-separator @@ -2313,7 +2313,7 @@ Returns ``true`` if the ``path`` points to a valid node. See also :ref:`get_node :ref:`bool` **has_node_and_resource**\ (\ path\: :ref:`NodePath`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if ``path`` points to a valid node and its subnames point to a valid :ref:`Resource`, e.g. ``Area2D/CollisionShape2D:shape``. Properties that are not :ref:`Resource` types (such as nodes or other :ref:`Variant` types) are not considered. See also :ref:`get_node_and_resource`. +Returns ``true`` if ``path`` points to a valid node and its subnames point to a valid :ref:`Resource`, e.g. ``Area2D/CollisionShape2D:shape``. Properties that are not :ref:`Resource` types (such as nodes or other :ref:`Variant` types) are not considered. See also :ref:`get_node_and_resource()`. .. rst-class:: classref-item-separator @@ -2337,7 +2337,7 @@ Returns ``true`` if the given ``node`` is a direct or indirect child of this nod :ref:`bool` **is_displayed_folded**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the node is folded (collapsed) in the Scene dock. This method is intended to be used in editor plugins and tools. See also :ref:`set_display_folded`. +Returns ``true`` if the node is folded (collapsed) in the Scene dock. This method is intended to be used in editor plugins and tools. See also :ref:`set_display_folded()`. .. rst-class:: classref-item-separator @@ -2349,7 +2349,7 @@ Returns ``true`` if the node is folded (collapsed) in the Scene dock. This metho :ref:`bool` **is_editable_instance**\ (\ node\: :ref:`Node`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if ``node`` has editable children enabled relative to this node. This method is intended to be used in editor plugins and tools. See also :ref:`set_editable_instance`. +Returns ``true`` if ``node`` has editable children enabled relative to this node. This method is intended to be used in editor plugins and tools. See also :ref:`set_editable_instance()`. .. rst-class:: classref-item-separator @@ -2373,7 +2373,7 @@ Returns ``true`` if the given ``node`` occurs later in the scene hierarchy than :ref:`bool` **is_in_group**\ (\ group\: :ref:`StringName`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this node has been added to the given ``group``. See :ref:`add_to_group` and :ref:`remove_from_group`. See also notes in the description, and the :ref:`SceneTree`'s group methods. +Returns ``true`` if this node has been added to the given ``group``. See :ref:`add_to_group()` and :ref:`remove_from_group()`. See also notes in the description, and the :ref:`SceneTree`'s group methods. .. rst-class:: classref-item-separator @@ -2385,7 +2385,7 @@ Returns ``true`` if this node has been added to the given ``group``. See :ref:`a :ref:`bool` **is_inside_tree**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this node is currently inside a :ref:`SceneTree`. See also :ref:`get_tree`. +Returns ``true`` if this node is currently inside a :ref:`SceneTree`. See also :ref:`get_tree()`. .. rst-class:: classref-item-separator @@ -2411,7 +2411,7 @@ Returns ``true`` if the local system is the multiplayer authority of this node. Returns ``true`` if the node is ready, i.e. it's inside scene tree and all its children are initialized. -\ :ref:`request_ready` resets it back to ``false``. +\ :ref:`request_ready()` resets it back to ``false``. .. rst-class:: classref-item-separator @@ -2437,7 +2437,7 @@ Returns ``true`` if the node is part of the scene currently opened in the editor 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`. +\ **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 @@ -2451,7 +2451,7 @@ Returns ``true`` if physics interpolation is enabled for this node (see :ref:`ph 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. +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`. @@ -2465,7 +2465,7 @@ See :ref:`SceneTree.physics_interpolation` **is_physics_processing**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if physics processing is enabled (see :ref:`set_physics_process`). +Returns ``true`` if physics processing is enabled (see :ref:`set_physics_process()`). .. rst-class:: classref-item-separator @@ -2477,7 +2477,7 @@ Returns ``true`` if physics processing is enabled (see :ref:`set_physics_process :ref:`bool` **is_physics_processing_internal**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if internal physics processing is enabled (see :ref:`set_physics_process_internal`). +Returns ``true`` if internal physics processing is enabled (see :ref:`set_physics_process_internal()`). .. rst-class:: classref-item-separator @@ -2489,7 +2489,7 @@ Returns ``true`` if internal physics processing is enabled (see :ref:`set_physic :ref:`bool` **is_processing**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if processing is enabled (see :ref:`set_process`). +Returns ``true`` if processing is enabled (see :ref:`set_process()`). .. rst-class:: classref-item-separator @@ -2501,7 +2501,7 @@ Returns ``true`` if processing is enabled (see :ref:`set_process` **is_processing_input**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the node is processing input (see :ref:`set_process_input`). +Returns ``true`` if the node is processing input (see :ref:`set_process_input()`). .. rst-class:: classref-item-separator @@ -2513,7 +2513,7 @@ Returns ``true`` if the node is processing input (see :ref:`set_process_input` **is_processing_internal**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if internal processing is enabled (see :ref:`set_process_internal`). +Returns ``true`` if internal processing is enabled (see :ref:`set_process_internal()`). .. rst-class:: classref-item-separator @@ -2525,7 +2525,7 @@ Returns ``true`` if internal processing is enabled (see :ref:`set_process_intern :ref:`bool` **is_processing_shortcut_input**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the node is processing shortcuts (see :ref:`set_process_shortcut_input`). +Returns ``true`` if the node is processing shortcuts (see :ref:`set_process_shortcut_input()`). .. rst-class:: classref-item-separator @@ -2537,7 +2537,7 @@ Returns ``true`` if the node is processing shortcuts (see :ref:`set_process_shor :ref:`bool` **is_processing_unhandled_input**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the node is processing unhandled input (see :ref:`set_process_unhandled_input`). +Returns ``true`` if the node is processing unhandled input (see :ref:`set_process_unhandled_input()`). .. rst-class:: classref-item-separator @@ -2549,7 +2549,7 @@ Returns ``true`` if the node is processing unhandled input (see :ref:`set_proces :ref:`bool` **is_processing_unhandled_key_input**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the node is processing unhandled key input (see :ref:`set_process_unhandled_key_input`). +Returns ``true`` if the node is processing unhandled key input (see :ref:`set_process_unhandled_key_input()`). .. rst-class:: classref-item-separator @@ -2561,9 +2561,9 @@ Returns ``true`` if the node is processing unhandled key input (see :ref:`set_pr |void| **move_child**\ (\ child_node\: :ref:`Node`, to_index\: :ref:`int`\ ) :ref:`πŸ”—` -Moves ``child_node`` to the given index. A node's index is the order among its siblings. If ``to_index`` is negative, the index is counted from the end of the list. See also :ref:`get_child` and :ref:`get_index`. +Moves ``child_node`` to the given index. A node's index is the order among its siblings. If ``to_index`` is negative, the index is counted from the end of the list. See also :ref:`get_child()` and :ref:`get_index()`. -\ **Note:** The processing order of several engine callbacks (:ref:`_ready`, :ref:`_process`, etc.) and notifications sent through :ref:`propagate_notification` is affected by tree order. :ref:`CanvasItem` nodes are also rendered in tree order. See also :ref:`process_priority`. +\ **Note:** The processing order of several engine callbacks (:ref:`_ready()`, :ref:`_process()`, etc.) and notifications sent through :ref:`propagate_notification()` is affected by tree order. :ref:`CanvasItem` nodes are also rendered in tree order. See also :ref:`process_priority`. .. rst-class:: classref-item-separator @@ -2575,7 +2575,7 @@ Moves ``child_node`` to the given index. A node's index is the order among its s |void| **notify_deferred_thread_group**\ (\ what\: :ref:`int`\ ) :ref:`πŸ”—` -Similar to :ref:`call_deferred_thread_group`, but for notifications. +Similar to :ref:`call_deferred_thread_group()`, but for notifications. .. rst-class:: classref-item-separator @@ -2587,7 +2587,7 @@ Similar to :ref:`call_deferred_thread_group`\ ) :ref:`πŸ”—` -Similar to :ref:`call_thread_safe`, but for notifications. +Similar to :ref:`call_thread_safe()`, but for notifications. .. rst-class:: classref-item-separator @@ -2613,7 +2613,7 @@ Prints all orphan nodes (nodes outside the :ref:`SceneTree`). U |void| **print_tree**\ (\ ) :ref:`πŸ”—` -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`. +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()`. May print, for example: @@ -2636,7 +2636,7 @@ May print, for example: |void| **print_tree_pretty**\ (\ ) :ref:`πŸ”—` -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. +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. May print, for example: @@ -2673,7 +2673,7 @@ If ``parent_first`` is ``true``, the method is called on this node first, then o |void| **propagate_notification**\ (\ what\: :ref:`int`\ ) :ref:`πŸ”—` -Calls :ref:`Object.notification` with ``what`` on this node and all of its children, recursively. +Calls :ref:`Object.notification()` with ``what`` on this node and all of its children, recursively. .. rst-class:: classref-item-separator @@ -2687,9 +2687,9 @@ Calls :ref:`Object.notification` with ``what`` Queues this node to be deleted at the end of the current frame. When deleted, all of its children are deleted as well, and all references to the node and its children become invalid. -Unlike with :ref:`Object.free`, the node is not deleted instantly, and it can still be accessed before deletion. It is also safe to call :ref:`queue_free` multiple times. Use :ref:`Object.is_queued_for_deletion` to check if the node will be deleted at the end of the frame. +Unlike with :ref:`Object.free()`, the node is not deleted instantly, and it can still be accessed before deletion. It is also safe to call :ref:`queue_free()` multiple times. Use :ref:`Object.is_queued_for_deletion()` to check if the node will be deleted at the end of the frame. -\ **Note:** The node will only be freed after all other deferred calls are finished. Using this method is not always the same as calling :ref:`Object.free` through :ref:`Object.call_deferred`. +\ **Note:** The node will only be freed after all other deferred calls are finished. Using this method is not always the same as calling :ref:`Object.free()` through :ref:`Object.call_deferred()`. .. rst-class:: classref-item-separator @@ -2701,9 +2701,9 @@ Unlike with :ref:`Object.free`, the node is not delete |void| **remove_child**\ (\ node\: :ref:`Node`\ ) :ref:`πŸ”—` -Removes a child ``node``. The ``node``, along with its children, are **not** deleted. To delete a node, see :ref:`queue_free`. +Removes a child ``node``. The ``node``, along with its children, are **not** deleted. To delete a node, see :ref:`queue_free()`. -\ **Note:** When this node is inside the tree, this method sets the :ref:`owner` of the removed ``node`` (or its descendants) to ``null``, if their :ref:`owner` is no longer an ancestor (see :ref:`is_ancestor_of`). +\ **Note:** When this node is inside the tree, this method sets the :ref:`owner` of the removed ``node`` (or its descendants) to ``null``, if their :ref:`owner` is no longer an ancestor (see :ref:`is_ancestor_of()`). .. rst-class:: classref-item-separator @@ -2743,9 +2743,9 @@ If ``keep_global_transform`` is ``true``, the node's global transform will be pr Replaces this node by the given ``node``. All children of this node are moved to ``node``. -If ``keep_groups`` is ``true``, the ``node`` is added to the same groups that the replaced node is in (see :ref:`add_to_group`). +If ``keep_groups`` is ``true``, the ``node`` is added to the same groups that the replaced node is in (see :ref:`add_to_group()`). -\ **Warning:** The replaced node is removed from the tree, but it is **not** deleted. To prevent memory leaks, store a reference to the node in a variable, or use :ref:`Object.free`. +\ **Warning:** The replaced node is removed from the tree, but it is **not** deleted. To prevent memory leaks, store a reference to the node in a variable, or use :ref:`Object.free()`. .. rst-class:: classref-item-separator @@ -2757,9 +2757,9 @@ If ``keep_groups`` is ``true``, the ``node`` is added to the same groups that th |void| **request_ready**\ (\ ) :ref:`πŸ”—` -Requests :ref:`_ready` to be called again the next time the node enters the tree. Does **not** immediately call :ref:`_ready`. +Requests :ref:`_ready()` to be called again the next time the node enters the tree. Does **not** immediately call :ref:`_ready()`. -\ **Note:** This method only affects the current node. If the node's children also need to request ready, this method needs to be called for each one of them. When the node and its children enter the tree again, the order of :ref:`_ready` callbacks will be the same as normal. +\ **Note:** This method only affects the current node. If the node's children also need to request ready, this method needs to be called for each one of them. When the node and its children enter the tree again, the order of :ref:`_ready()` callbacks will be the same as normal. .. rst-class:: classref-item-separator @@ -2789,7 +2789,7 @@ The notification :ref:`NOTIFICATION_RESET_PHYSICS_INTERPOLATION` **rpc**\ (\ method\: :ref:`StringName`, ...\ ) |vararg| :ref:`πŸ”—` -Sends a remote procedure call request for the given ``method`` to peers on the network (and locally), sending additional arguments to the method called by the RPC. The call request will only be received by nodes with the same :ref:`NodePath`, including the exact same :ref:`name`. Behavior depends on the RPC configuration for the given ``method`` (see :ref:`rpc_config` and :ref:`@GDScript.@rpc`). By default, methods are not exposed to RPCs. +Sends a remote procedure call request for the given ``method`` to peers on the network (and locally), sending additional arguments to the method called by the RPC. The call request will only be received by nodes with the same :ref:`NodePath`, including the exact same :ref:`name`. Behavior depends on the RPC configuration for the given ``method`` (see :ref:`rpc_config()` and :ref:`@GDScript.@rpc`). By default, methods are not exposed to RPCs. May return :ref:`@GlobalScope.OK` if the call is successful, :ref:`@GlobalScope.ERR_INVALID_PARAMETER` if the arguments passed in the ``method`` do not match, :ref:`@GlobalScope.ERR_UNCONFIGURED` if the node's :ref:`multiplayer` cannot be fetched (such as when the node is not inside the tree), :ref:`@GlobalScope.ERR_CONNECTION_ERROR` if :ref:`multiplayer`'s connection is not available. @@ -2827,7 +2827,7 @@ Changes the RPC configuration for the given ``method``. ``config`` should either :ref:`Error` **rpc_id**\ (\ peer_id\: :ref:`int`, method\: :ref:`StringName`, ...\ ) |vararg| :ref:`πŸ”—` -Sends a :ref:`rpc` to a specific peer identified by ``peer_id`` (see :ref:`MultiplayerPeer.set_target_peer`). +Sends a :ref:`rpc()` to a specific peer identified by ``peer_id`` (see :ref:`MultiplayerPeer.set_target_peer()`). May return :ref:`@GlobalScope.OK` if the call is successful, :ref:`@GlobalScope.ERR_INVALID_PARAMETER` if the arguments passed in the ``method`` do not match, :ref:`@GlobalScope.ERR_UNCONFIGURED` if the node's :ref:`multiplayer` cannot be fetched (such as when the node is not inside the tree), :ref:`@GlobalScope.ERR_CONNECTION_ERROR` if :ref:`multiplayer`'s connection is not available. @@ -2841,7 +2841,7 @@ May return :ref:`@GlobalScope.OK` if the call is |void| **set_deferred_thread_group**\ (\ property\: :ref:`StringName`, value\: :ref:`Variant`\ ) :ref:`πŸ”—` -Similar to :ref:`call_deferred_thread_group`, but for setting properties. +Similar to :ref:`call_deferred_thread_group()`, but for setting properties. .. rst-class:: classref-item-separator @@ -2853,7 +2853,7 @@ Similar to :ref:`call_deferred_thread_group`\ ) :ref:`πŸ”—` -If set to ``true``, the node appears folded in the Scene dock. As a result, all of its children are hidden. This method is intended to be used in editor plugins and tools, but it also works in release builds. See also :ref:`is_displayed_folded`. +If set to ``true``, the node appears folded in the Scene dock. As a result, all of its children are hidden. This method is intended to be used in editor plugins and tools, but it also works in release builds. See also :ref:`is_displayed_folded()`. .. rst-class:: classref-item-separator @@ -2865,7 +2865,7 @@ If set to ``true``, the node appears folded in the Scene dock. As a result, all |void| **set_editable_instance**\ (\ node\: :ref:`Node`, is_editable\: :ref:`bool`\ ) :ref:`πŸ”—` -Set to ``true`` to allow all nodes owned by ``node`` to be available, and editable, in the Scene dock, even if their :ref:`owner` is not the scene root. This method is intended to be used in editor plugins and tools, but it also works in release builds. See also :ref:`is_editable_instance`. +Set to ``true`` to allow all nodes owned by ``node`` to be available, and editable, in the Scene dock, even if their :ref:`owner` is not the scene root. This method is intended to be used in editor plugins and tools, but it also works in release builds. See also :ref:`is_editable_instance()`. .. rst-class:: classref-item-separator @@ -2877,7 +2877,7 @@ Set to ``true`` to allow all nodes owned by ``node`` to be available, and editab |void| **set_multiplayer_authority**\ (\ id\: :ref:`int`, recursive\: :ref:`bool` = true\ ) :ref:`πŸ”—` -Sets the node's multiplayer authority to the peer with the given peer ``id``. The multiplayer authority is the peer that has authority over the node on the network. Defaults to peer ID 1 (the server). Useful in conjunction with :ref:`rpc_config` and the :ref:`MultiplayerAPI`. +Sets the node's multiplayer authority to the peer with the given peer ``id``. The multiplayer authority is the peer that has authority over the node on the network. Defaults to peer ID 1 (the server). Useful in conjunction with :ref:`rpc_config()` and the :ref:`MultiplayerAPI`. If ``recursive`` is ``true``, the given peer is recursively set as the authority for all children of this node. @@ -2893,9 +2893,9 @@ If ``recursive`` is ``true``, the given peer is recursively set as the authority |void| **set_physics_process**\ (\ enable\: :ref:`bool`\ ) :ref:`πŸ”—` -If set to ``true``, enables physics (fixed framerate) processing. When a node is being processed, it will receive a :ref:`NOTIFICATION_PHYSICS_PROCESS` at a fixed (usually 60 FPS, see :ref:`Engine.physics_ticks_per_second` to change) interval (and the :ref:`_physics_process` callback will be called if it exists). +If set to ``true``, enables physics (fixed framerate) processing. When a node is being processed, it will receive a :ref:`NOTIFICATION_PHYSICS_PROCESS` at a fixed (usually 60 FPS, see :ref:`Engine.physics_ticks_per_second` to change) interval (and the :ref:`_physics_process()` callback will be called if it exists). -\ **Note:** If :ref:`_physics_process` is overridden, this will be automatically enabled before :ref:`_ready` is called. +\ **Note:** If :ref:`_physics_process()` is overridden, this will be automatically enabled before :ref:`_ready()` is called. .. rst-class:: classref-item-separator @@ -2907,7 +2907,7 @@ If set to ``true``, enables physics (fixed framerate) processing. When a node is |void| **set_physics_process_internal**\ (\ enable\: :ref:`bool`\ ) :ref:`πŸ”—` -If set to ``true``, enables internal physics for this node. Internal physics processing happens in isolation from the normal :ref:`_physics_process` calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or physics processing is disabled for scripting (:ref:`set_physics_process`). +If set to ``true``, enables internal physics for this node. Internal physics processing happens in isolation from the normal :ref:`_physics_process()` calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or physics processing is disabled for scripting (:ref:`set_physics_process()`). \ **Warning:** Built-in nodes rely on internal processing for their internal logic. Disabling it is unsafe and may lead to unexpected behavior. Use this method if you know what you are doing. @@ -2921,11 +2921,11 @@ If set to ``true``, enables internal physics for this node. Internal physics pro |void| **set_process**\ (\ enable\: :ref:`bool`\ ) :ref:`πŸ”—` -If set to ``true``, enables processing. When a node is being processed, it will receive a :ref:`NOTIFICATION_PROCESS` on every drawn frame (and the :ref:`_process` callback will be called if it exists). +If set to ``true``, enables processing. When a node is being processed, it will receive a :ref:`NOTIFICATION_PROCESS` on every drawn frame (and the :ref:`_process()` callback will be called if it exists). -\ **Note:** If :ref:`_process` is overridden, this will be automatically enabled before :ref:`_ready` is called. +\ **Note:** If :ref:`_process()` is overridden, this will be automatically enabled before :ref:`_ready()` is called. -\ **Note:** This method only affects the :ref:`_process` callback, i.e. it has no effect on other callbacks like :ref:`_physics_process`. If you want to disable all processing for the node, set :ref:`process_mode` to :ref:`PROCESS_MODE_DISABLED`. +\ **Note:** This method only affects the :ref:`_process()` callback, i.e. it has no effect on other callbacks like :ref:`_physics_process()`. If you want to disable all processing for the node, set :ref:`process_mode` to :ref:`PROCESS_MODE_DISABLED`. .. rst-class:: classref-item-separator @@ -2939,7 +2939,7 @@ If set to ``true``, enables processing. When a node is being processed, it will If set to ``true``, enables input processing. -\ **Note:** If :ref:`_input` is overridden, this will be automatically enabled before :ref:`_ready` is called. Input processing is also already enabled for GUI controls, such as :ref:`Button` and :ref:`TextEdit`. +\ **Note:** If :ref:`_input()` is overridden, this will be automatically enabled before :ref:`_ready()` is called. Input processing is also already enabled for GUI controls, such as :ref:`Button` and :ref:`TextEdit`. .. rst-class:: classref-item-separator @@ -2951,7 +2951,7 @@ If set to ``true``, enables input processing. |void| **set_process_internal**\ (\ enable\: :ref:`bool`\ ) :ref:`πŸ”—` -If set to ``true``, enables internal processing for this node. Internal processing happens in isolation from the normal :ref:`_process` calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or processing is disabled for scripting (:ref:`set_process`). +If set to ``true``, enables internal processing for this node. Internal processing happens in isolation from the normal :ref:`_process()` calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or processing is disabled for scripting (:ref:`set_process()`). \ **Warning:** Built-in nodes rely on internal processing for their internal logic. Disabling it is unsafe and may lead to unexpected behavior. Use this method if you know what you are doing. @@ -2967,7 +2967,7 @@ If set to ``true``, enables internal processing for this node. Internal processi If set to ``true``, enables shortcut processing for this node. -\ **Note:** If :ref:`_shortcut_input` is overridden, this will be automatically enabled before :ref:`_ready` is called. +\ **Note:** If :ref:`_shortcut_input()` is overridden, this will be automatically enabled before :ref:`_ready()` is called. .. rst-class:: classref-item-separator @@ -2981,7 +2981,7 @@ If set to ``true``, enables shortcut processing for this node. If set to ``true``, enables unhandled input processing. It enables the node to receive all input that was not previously handled (usually by a :ref:`Control`). -\ **Note:** If :ref:`_unhandled_input` is overridden, this will be automatically enabled before :ref:`_ready` is called. Unhandled input processing is also already enabled for GUI controls, such as :ref:`Button` and :ref:`TextEdit`. +\ **Note:** If :ref:`_unhandled_input()` is overridden, this will be automatically enabled before :ref:`_ready()` is called. Unhandled input processing is also already enabled for GUI controls, such as :ref:`Button` and :ref:`TextEdit`. .. rst-class:: classref-item-separator @@ -2995,7 +2995,7 @@ If set to ``true``, enables unhandled input processing. It enables the node to r If set to ``true``, enables unhandled key input processing. -\ **Note:** If :ref:`_unhandled_key_input` is overridden, this will be automatically enabled before :ref:`_ready` is called. +\ **Note:** If :ref:`_unhandled_key_input()` is overridden, this will be automatically enabled before :ref:`_ready()` is called. .. rst-class:: classref-item-separator @@ -3007,7 +3007,7 @@ If set to ``true``, enables unhandled key input processing. |void| **set_scene_instance_load_placeholder**\ (\ load_placeholder\: :ref:`bool`\ ) :ref:`πŸ”—` -If set to ``true``, the node becomes a :ref:`InstancePlaceholder` when packed and instantiated from a :ref:`PackedScene`. See also :ref:`get_scene_instance_load_placeholder`. +If set to ``true``, the node becomes a :ref:`InstancePlaceholder` when packed and instantiated from a :ref:`PackedScene`. See also :ref:`get_scene_instance_load_placeholder()`. .. rst-class:: classref-item-separator @@ -3019,7 +3019,7 @@ If set to ``true``, the node becomes a :ref:`InstancePlaceholder`, value\: :ref:`Variant`\ ) :ref:`πŸ”—` -Similar to :ref:`call_thread_safe`, but for setting properties. +Similar to :ref:`call_thread_safe()`, but for setting properties. .. rst-class:: classref-item-separator @@ -3033,7 +3033,7 @@ Similar to :ref:`call_thread_safe`, but for Makes this node inherit the translation domain from its parent node. If this node has no parent, the main translation domain will be used. -This is the default behavior for all nodes. Calling :ref:`Object.set_translation_domain` disables this behavior. +This is the default behavior for all nodes. Calling :ref:`Object.set_translation_domain()` disables this behavior. .. rst-class:: classref-item-separator @@ -3045,7 +3045,7 @@ This is the default behavior for all nodes. Calling :ref:`Object.set_translation |void| **update_configuration_warnings**\ (\ ) :ref:`πŸ”—` -Refreshes the warnings displayed for this node in the Scene dock. Use :ref:`_get_configuration_warnings` to customize the warning messages to display. +Refreshes the warnings displayed for this node in the Scene dock. Use :ref:`_get_configuration_warnings()` to customize the warning messages to display. .. |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_node2d.rst b/classes/class_node2d.rst index c34bfa571..8f7eed119 100644 --- a/classes/class_node2d.rst +++ b/classes/class_node2d.rst @@ -396,7 +396,7 @@ Rotates the node so that its local +X axis points towards the ``point``, which i |void| **move_local_x**\ (\ delta\: :ref:`float`, scaled\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Applies a local translation on the node's X axis based on the :ref:`Node._process`'s ``delta``. If ``scaled`` is ``false``, normalizes the movement. +Applies a local translation on the node's X axis based on the :ref:`Node._process()`'s ``delta``. If ``scaled`` is ``false``, normalizes the movement. .. rst-class:: classref-item-separator @@ -408,7 +408,7 @@ Applies a local translation on the node's X axis based on the :ref:`Node._proces |void| **move_local_y**\ (\ delta\: :ref:`float`, scaled\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Applies a local translation on the node's Y axis based on the :ref:`Node._process`'s ``delta``. If ``scaled`` is ``false``, normalizes the movement. +Applies a local translation on the node's Y axis based on the :ref:`Node._process()`'s ``delta``. If ``scaled`` is ``false``, normalizes the movement. .. rst-class:: classref-item-separator diff --git a/classes/class_node3d.rst b/classes/class_node3d.rst index b849e02a0..8ba021f5f 100644 --- a/classes/class_node3d.rst +++ b/classes/class_node3d.rst @@ -25,7 +25,7 @@ Most basic 3D game object, with a :ref:`Transform3D` and visi Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the **Node3D** object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the **Node3D**'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the **Node3D** object itself is referred to as object-local coordinate system. -\ **Note:** Unless otherwise specified, all methods that have angle parameters must have angles specified as *radians*. To convert degrees to radians, use :ref:`@GlobalScope.deg_to_rad`. +\ **Note:** Unless otherwise specified, all methods that have angle parameters must have angles specified as *radians*. To convert degrees to radians, use :ref:`@GlobalScope.deg_to_rad()`. \ **Note:** Be aware that "Spatial" nodes are now called "Node3D" starting with Godot 4. Any Godot 3.x references to "Spatial" nodes refer to "Node3D" in Godot 4. @@ -239,7 +239,7 @@ Constants **Node3D** nodes receive this notification when their global transform changes. This means that either the current or a parent node changed its transform. -In order for :ref:`NOTIFICATION_TRANSFORM_CHANGED` to work, users first need to ask for it, with :ref:`set_notify_transform`. The notification is also sent if the node is in the editor context and it has at least one valid gizmo. +In order for :ref:`NOTIFICATION_TRANSFORM_CHANGED` to work, users first need to ask for it, with :ref:`set_notify_transform()`. The notification is also sent if the node is in the editor context and it has at least one valid gizmo. .. _class_Node3D_constant_NOTIFICATION_ENTER_WORLD: @@ -273,7 +273,7 @@ In order for :ref:`NOTIFICATION_TRANSFORM_CHANGED` to work, users first need to ask for it, with :ref:`set_notify_local_transform`. +In order for :ref:`NOTIFICATION_LOCAL_TRANSFORM_CHANGED` to work, users first need to ask for it, with :ref:`set_notify_local_transform()`. .. rst-class:: classref-section-separator @@ -577,7 +577,7 @@ Defines the visibility range parent for this node and its subtree. The visibilit - |void| **set_visible**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_visible**\ (\ ) -If ``true``, this node is drawn. The node is only visible if all of its ancestors are visible as well (in other words, :ref:`is_visible_in_tree` must return ``true``). +If ``true``, this node is drawn. The node is only visible if all of its ancestors are visible as well (in other words, :ref:`is_visible_in_tree()` must return ``true``). .. rst-class:: classref-section-separator @@ -658,9 +658,9 @@ Returns all the gizmos attached to this **Node3D**. When using physics interpolation, there will be circumstances in which you want to know the interpolated (displayed) transform of a node rather than the standard transform (which may only be accurate to the most recent physics tick). -This is particularly important for frame-based operations that take place in :ref:`Node._process`, rather than :ref:`Node._physics_process`. Examples include :ref:`Camera3D`\ s focusing on a node, or finding where to fire lasers from on a frame rather than physics tick. +This is particularly important for frame-based operations that take place in :ref:`Node._process()`, rather than :ref:`Node._physics_process()`. Examples include :ref:`Camera3D`\ s focusing on a node, or finding where to fire lasers from on a frame rather than physics tick. -\ **Note:** This function creates an interpolation pump on the **Node3D** the first time it is called, which can respond to physics interpolation resets. If you get problems with "streaking" when initially following a **Node3D**, be sure to call :ref:`get_global_transform_interpolated` at least once *before* resetting the **Node3D** physics interpolation. +\ **Note:** This function creates an interpolation pump on the **Node3D** the first time it is called, which can respond to physics interpolation resets. If you get problems with "streaking" when initially following a **Node3D**, be sure to call :ref:`get_global_transform_interpolated()` at least once *before* resetting the **Node3D** physics interpolation. .. rst-class:: classref-item-separator @@ -820,7 +820,7 @@ If ``use_model_front`` is ``true``, the +Z axis (asset front) is treated as forw |void| **look_at_from_position**\ (\ position\: :ref:`Vector3`, target\: :ref:`Vector3`, up\: :ref:`Vector3` = Vector3(0, 1, 0), use_model_front\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Moves the node to the specified ``position``, and then rotates the node to point toward the ``target`` as per :ref:`look_at`. Operations take place in global space. +Moves the node to the specified ``position``, and then rotates the node to point toward the ``target`` as per :ref:`look_at()`. Operations take place in global space. .. rst-class:: classref-item-separator diff --git a/classes/class_node3dgizmo.rst b/classes/class_node3dgizmo.rst index 439f4bad1..fbbf5c0b4 100644 --- a/classes/class_node3dgizmo.rst +++ b/classes/class_node3dgizmo.rst @@ -23,7 +23,7 @@ Description This abstract class helps connect the :ref:`Node3D` scene with the editor-specific :ref:`EditorNode3DGizmo` class. -\ **Node3DGizmo** by itself has no exposed API, refer to :ref:`Node3D.add_gizmo` and pass it an :ref:`EditorNode3DGizmo` instance. +\ **Node3DGizmo** by itself has no exposed API, refer to :ref:`Node3D.add_gizmo()` and pass it an :ref:`EditorNode3DGizmo` instance. .. |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_nodepath.rst b/classes/class_nodepath.rst index ad6ff3df5..67e436196 100644 --- a/classes/class_nodepath.rst +++ b/classes/class_nodepath.rst @@ -17,7 +17,7 @@ A pre-parsed scene tree path. Description ----------- -The **NodePath** built-in :ref:`Variant` type represents a path to a node or property in a hierarchy of nodes. It is designed to be efficiently passed into many built-in methods (such as :ref:`Node.get_node`, :ref:`Object.set_indexed`, :ref:`Tween.tween_property`, etc.) without a hard dependence on the node or property they point to. +The **NodePath** built-in :ref:`Variant` type represents a path to a node or property in a hierarchy of nodes. It is designed to be efficiently passed into many built-in methods (such as :ref:`Node.get_node()`, :ref:`Object.set_indexed()`, :ref:`Tween.tween_property()`, etc.) without a hard dependence on the node or property they point to. A node path is represented as a :ref:`String` composed of slash-separated (``/``) node names and colon-separated (``:``) property names (also called "subnames"). Similar to a filesystem path, ``".."`` and ``"."`` are special node names. They refer to the parent node and the current node, respectively. @@ -49,7 +49,7 @@ Despite their name, node paths may also point to a property: ^"Camera3D:rotation:y" # Points to the child Camera3D and its y rotation. ^"/root:size:x" # Points to the root Window and its width. -In some situations, it's possible to omit the leading ``:`` when pointing to an object's property. As an example, this is the case with :ref:`Object.set_indexed` and :ref:`Tween.tween_property`, as those methods call :ref:`get_as_property_path` under the hood. However, it's generally recommended to keep the ``:`` prefix. +In some situations, it's possible to omit the leading ``:`` when pointing to an object's property. As an example, this is the case with :ref:`Object.set_indexed()` and :ref:`Tween.tween_property()`, as those methods call :ref:`get_as_property_path()` under the hood. However, it's generally recommended to keep the ``:`` prefix. Node paths cannot check whether they are valid and may point to nodes or properties that do not exist. Their meaning depends entirely on the context in which they're used. @@ -167,7 +167,7 @@ Constructs a **NodePath** as a copy of the given **NodePath**. :ref:`NodePath` **NodePath**\ (\ from\: :ref:`String`\ ) -Constructs a **NodePath** from a :ref:`String`. The created path is absolute if prefixed with a slash (see :ref:`is_absolute`). +Constructs a **NodePath** from a :ref:`String`. The created path is absolute if prefixed with a slash (see :ref:`is_absolute()`). The "subnames" optionally included after the path to the target node can point to properties, and can also be nested. @@ -283,7 +283,7 @@ Returns all property subnames concatenated with a colon character (``:``) as a s :ref:`StringName` **get_name**\ (\ idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the node name indicated by ``idx``, starting from 0. If ``idx`` is out of bounds, an error is generated. See also :ref:`get_subname_count` and :ref:`get_name_count`. +Returns the node name indicated by ``idx``, starting from 0. If ``idx`` is out of bounds, an error is generated. See also :ref:`get_subname_count()` and :ref:`get_name_count()`. .. tabs:: @@ -328,7 +328,7 @@ For example, ``"../RigidBody2D/Sprite2D:texture"`` contains 3 node names. :ref:`StringName` **get_subname**\ (\ idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the property name indicated by ``idx``, starting from 0. If ``idx`` is out of bounds, an error is generated. See also :ref:`get_subname_count`. +Returns the property name indicated by ``idx``, starting from 0. If ``idx`` is out of bounds, an error is generated. See also :ref:`get_subname_count()`. .. tabs:: @@ -411,7 +411,7 @@ Returns ``true`` if the node path has been constructed from an empty :ref:`Strin Returns the slice of the **NodePath**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **NodePath**. -The absolute value of ``begin`` and ``end`` will be clamped to the sum of :ref:`get_name_count` and :ref:`get_subname_count`, so the default value for ``end`` makes it slice to the end of the **NodePath** by default (i.e. ``path.slice(1)`` is a shorthand for ``path.slice(1, path.get_name_count() + path.get_subname_count())``). +The absolute value of ``begin`` and ``end`` will be clamped to the sum of :ref:`get_name_count()` and :ref:`get_subname_count()`, so the default value for ``end`` makes it slice to the end of the **NodePath** by default (i.e. ``path.slice(1)`` is a shorthand for ``path.slice(1, path.get_name_count() + path.get_subname_count())``). If either ``begin`` or ``end`` are negative, they will be relative to the end of the **NodePath** (i.e. ``path.slice(0, -2)`` is a shorthand for ``path.slice(0, path.get_name_count() + path.get_subname_count() - 2)``). diff --git a/classes/class_noise.rst b/classes/class_noise.rst index fad4510dc..b91e4e25e 100644 --- a/classes/class_noise.rst +++ b/classes/class_noise.rst @@ -23,7 +23,7 @@ Description This class defines the interface for noise generation libraries to inherit from. -A default :ref:`get_seamless_image` implementation is provided for libraries that do not provide seamless noise. This function requests a larger image from the :ref:`get_image` method, reverses the quadrants of the image, then uses the strips of extra width to blend over the seams. +A default :ref:`get_seamless_image()` implementation is provided for libraries that do not provide seamless noise. This function requests a larger image from the :ref:`get_image()` method, reverses the quadrants of the image, then uses the strips of extra width to blend over the seams. Inheriting noise classes can optionally override this function to provide a more optimal algorithm. @@ -84,7 +84,7 @@ Returns an :ref:`Image` containing 2D noise values. :ref:`Array`\[:ref:`Image`\] **get_image_3d**\ (\ width\: :ref:`int`, height\: :ref:`int`, depth\: :ref:`int`, invert\: :ref:`bool` = false, normalize\: :ref:`bool` = true\ ) |const| :ref:`πŸ”—` -Returns an :ref:`Array` of :ref:`Image`\ s containing 3D noise values for use with :ref:`ImageTexture3D.create`. +Returns an :ref:`Array` of :ref:`Image`\ s containing 3D noise values for use with :ref:`ImageTexture3D.create()`. \ **Note:** With ``normalize`` set to ``false``, the default implementation expects the noise generator to return values in the range ``-1.0`` to ``1.0``. @@ -172,7 +172,7 @@ Returns an :ref:`Image` containing seamless 2D noise values. :ref:`Array`\[:ref:`Image`\] **get_seamless_image_3d**\ (\ width\: :ref:`int`, height\: :ref:`int`, depth\: :ref:`int`, invert\: :ref:`bool` = false, skirt\: :ref:`float` = 0.1, normalize\: :ref:`bool` = true\ ) |const| :ref:`πŸ”—` -Returns an :ref:`Array` of :ref:`Image`\ s containing seamless 3D noise values for use with :ref:`ImageTexture3D.create`. +Returns an :ref:`Array` of :ref:`Image`\ s containing seamless 3D noise values for use with :ref:`ImageTexture3D.create()`. \ **Note:** With ``normalize`` set to ``false``, the default implementation expects the noise generator to return values in the range ``-1.0`` to ``1.0``. diff --git a/classes/class_noisetexture2d.rst b/classes/class_noisetexture2d.rst index 874397233..dee13cea2 100644 --- a/classes/class_noisetexture2d.rst +++ b/classes/class_noisetexture2d.rst @@ -21,7 +21,7 @@ Description Uses the :ref:`FastNoiseLite` library or other noise generators to fill the texture data of your desired size. **NoiseTexture2D** can also generate normal map textures. -The class uses :ref:`Thread`\ s to generate the texture data internally, so :ref:`Texture2D.get_image` may return ``null`` if the generation process has not completed yet. In that case, you need to wait for the texture to be generated before accessing the image and the generated byte data: +The class uses :ref:`Thread`\ s to generate the texture data internally, so :ref:`Texture2D.get_image()` may return ``null`` if the generation process has not completed yet. In that case, you need to wait for the texture to be generated before accessing the image and the generated byte data: :: diff --git a/classes/class_noisetexture3d.rst b/classes/class_noisetexture3d.rst index 29d82b62d..9679dcbe0 100644 --- a/classes/class_noisetexture3d.rst +++ b/classes/class_noisetexture3d.rst @@ -21,7 +21,7 @@ Description Uses the :ref:`FastNoiseLite` library or other noise generators to fill the texture data of your desired size. -The class uses :ref:`Thread`\ s to generate the texture data internally, so :ref:`Texture3D.get_data` may return ``null`` if the generation process has not completed yet. In that case, you need to wait for the texture to be generated before accessing the image: +The class uses :ref:`Thread`\ s to generate the texture data internally, so :ref:`Texture3D.get_data()` may return ``null`` if the generation process has not completed yet. In that case, you need to wait for the texture to be generated before accessing the image: :: diff --git a/classes/class_object.rst b/classes/class_object.rst index f28d3a87f..3e5daeab0 100644 --- a/classes/class_object.rst +++ b/classes/class_object.rst @@ -19,17 +19,17 @@ Base class for all other classes in the engine. Description ----------- -An advanced :ref:`Variant` type. All classes in the engine inherit from Object. Each class may define new properties, methods or signals, which are available to all inheriting classes. For example, a :ref:`Sprite2D` instance is able to call :ref:`Node.add_child` because it inherits from :ref:`Node`. +An advanced :ref:`Variant` type. All classes in the engine inherit from Object. Each class may define new properties, methods or signals, which are available to all inheriting classes. For example, a :ref:`Sprite2D` instance is able to call :ref:`Node.add_child()` because it inherits from :ref:`Node`. You can create new instances, using ``Object.new()`` in GDScript, or ``new GodotObject`` in C#. -To delete an Object instance, call :ref:`free`. This is necessary for most classes inheriting Object, because they do not manage memory on their own, and will otherwise cause memory leaks when no longer in use. There are a few classes that perform memory management. For example, :ref:`RefCounted` (and by extension :ref:`Resource`) deletes itself when no longer referenced, and :ref:`Node` deletes its children when freed. +To delete an Object instance, call :ref:`free()`. This is necessary for most classes inheriting Object, because they do not manage memory on their own, and will otherwise cause memory leaks when no longer in use. There are a few classes that perform memory management. For example, :ref:`RefCounted` (and by extension :ref:`Resource`) deletes itself when no longer referenced, and :ref:`Node` deletes its children when freed. Objects can have a :ref:`Script` attached to them. Once the :ref:`Script` is instantiated, it effectively acts as an extension to the base class, allowing it to define and inherit new properties, methods and signals. -Inside a :ref:`Script`, :ref:`_get_property_list` may be overridden to customize properties in several ways. This allows them to be available to the editor, display as lists of options, sub-divide into groups, save on disk, etc. Scripting languages offer easier ways to customize properties, such as with the :ref:`@GDScript.@export` annotation. +Inside a :ref:`Script`, :ref:`_get_property_list()` may be overridden to customize properties in several ways. This allows them to be available to the editor, display as lists of options, sub-divide into groups, save on disk, etc. Scripting languages offer easier ways to customize properties, such as with the :ref:`@GDScript.@export` annotation. -Godot is very dynamic. An object's script, and therefore its properties, methods and signals, can be changed at run-time. Because of this, there can be occasions where, for example, a property required by a method may not exist. To prevent run-time errors, see methods such as :ref:`set`, :ref:`get`, :ref:`call`, :ref:`has_method`, :ref:`has_signal`, etc. Note that these methods are **much** slower than direct references. +Godot is very dynamic. An object's script, and therefore its properties, methods and signals, can be changed at run-time. Because of this, there can be occasions where, for example, a property required by a method may not exist. To prevent run-time errors, see methods such as :ref:`set()`, :ref:`get()`, :ref:`call()`, :ref:`has_method()`, :ref:`has_signal()`, etc. Note that these methods are **much** slower than direct references. In GDScript, you can also check if a given property, method, or signal name exists in an object with the ``in`` operator: @@ -41,15 +41,15 @@ In GDScript, you can also check if a given property, method, or signal name exis print("tree_entered" in node) # Prints true print("unknown" in node) # Prints false -Notifications are :ref:`int` constants commonly sent and received by objects. For example, on every rendered frame, the :ref:`SceneTree` notifies nodes inside the tree with a :ref:`Node.NOTIFICATION_PROCESS`. The nodes receive it and may call :ref:`Node._process` to update. To make use of notifications, see :ref:`notification` and :ref:`_notification`. +Notifications are :ref:`int` constants commonly sent and received by objects. For example, on every rendered frame, the :ref:`SceneTree` notifies nodes inside the tree with a :ref:`Node.NOTIFICATION_PROCESS`. The nodes receive it and may call :ref:`Node._process()` to update. To make use of notifications, see :ref:`notification()` and :ref:`_notification()`. -Lastly, every object can also contain metadata (data about data). :ref:`set_meta` can be useful to store information that the object itself does not depend on. To keep your code clean, making excessive use of metadata is discouraged. +Lastly, every object can also contain metadata (data about data). :ref:`set_meta()` can be useful to store information that the object itself does not depend on. To keep your code clean, making excessive use of metadata is discouraged. -\ **Note:** Unlike references to a :ref:`RefCounted`, references to an object stored in a variable can become invalid without being set to ``null``. To check if an object has been deleted, do *not* compare it against ``null``. Instead, use :ref:`@GlobalScope.is_instance_valid`. It's also recommended to inherit from :ref:`RefCounted` for classes storing data instead of **Object**. +\ **Note:** Unlike references to a :ref:`RefCounted`, references to an object stored in a variable can become invalid without being set to ``null``. To check if an object has been deleted, do *not* compare it against ``null``. Instead, use :ref:`@GlobalScope.is_instance_valid()`. It's also recommended to inherit from :ref:`RefCounted` for classes storing data instead of **Object**. -\ **Note:** The ``script`` is not exposed like most properties. To set or get an object's :ref:`Script` in code, use :ref:`set_script` and :ref:`get_script`, respectively. +\ **Note:** The ``script`` is not exposed like most properties. To set or get an object's :ref:`Script` in code, use :ref:`set_script()` and :ref:`get_script()`, respectively. -\ **Note:** In a boolean context, an **Object** will evaluate to ``false`` if it is equal to ``null`` or it has been freed. Otherwise, an **Object** will always evaluate to ``true``. See also :ref:`@GlobalScope.is_instance_valid`. +\ **Note:** In a boolean context, an **Object** will evaluate to ``false`` if it is equal to ``null`` or it has been freed. Otherwise, an **Object** will always evaluate to ``true``. See also :ref:`@GlobalScope.is_instance_valid()`. .. rst-class:: classref-introduction-group @@ -211,7 +211,7 @@ Signals **property_list_changed**\ (\ ) :ref:`πŸ”—` -Emitted when :ref:`notify_property_list_changed` is called. +Emitted when :ref:`notify_property_list_changed()` is called. .. rst-class:: classref-item-separator @@ -256,7 +256,7 @@ Deferred connections trigger their :ref:`Callable`\ s on idle ti :ref:`ConnectFlags` **CONNECT_PERSIST** = ``2`` -Persisting connections are stored when the object is serialized (such as when using :ref:`PackedScene.pack`). In the editor, connections created through the Node dock are always persisting. +Persisting connections are stored when the object is serialized (such as when using :ref:`PackedScene.pack()`). In the editor, connections created through the Node dock are always persisting. .. _class_Object_constant_CONNECT_ONE_SHOT: @@ -322,9 +322,9 @@ Method Descriptions :ref:`Variant` **_get**\ (\ property\: :ref:`StringName`\ ) |virtual| :ref:`πŸ”—` -Override this method to customize the behavior of :ref:`get`. Should return the given ``property``'s value, or ``null`` if the ``property`` should be handled normally. +Override this method to customize the behavior of :ref:`get()`. Should return the given ``property``'s value, or ``null`` if the ``property`` should be handled normally. -Combined with :ref:`_set` and :ref:`_get_property_list`, this method allows defining custom properties, which is particularly useful for editor plugins. Note that a property must be present in :ref:`get_property_list`, otherwise this method will not be called. +Combined with :ref:`_set()` and :ref:`_get_property_list()`, this method allows defining custom properties, which is particularly useful for editor plugins. Note that a property must be present in :ref:`get_property_list()`, otherwise this method will not be called. .. tabs:: @@ -379,9 +379,9 @@ Combined with :ref:`_set` and :ref:`_get_prope Override this method to provide a custom list of additional properties to handle by the engine. -Should return a property list, as an :ref:`Array` of dictionaries. The result is added to the array of :ref:`get_property_list`, and should be formatted in the same way. Each :ref:`Dictionary` must at least contain the ``name`` and ``type`` entries. +Should return a property list, as an :ref:`Array` of dictionaries. The result is added to the array of :ref:`get_property_list()`, and should be formatted in the same way. Each :ref:`Dictionary` must at least contain the ``name`` and ``type`` entries. -You can use :ref:`_property_can_revert` and :ref:`_property_get_revert` to customize the default values of the properties added by this method. +You can use :ref:`_property_can_revert()` and :ref:`_property_get_revert()` to customize the default values of the properties added by this method. The example below displays a list of numbers shown as words going from ``ZERO`` to ``FIVE``, with ``number_count`` controlling the size of the list: @@ -491,7 +491,7 @@ The example below displays a list of numbers shown as words going from ``ZERO`` -\ **Note:** This method is intended for advanced purposes. For most common use cases, the scripting languages offer easier ways to handle properties. See :ref:`@GDScript.@export`, :ref:`@GDScript.@export_enum`, :ref:`@GDScript.@export_group`, etc. If you want to customize exported properties, use :ref:`_validate_property`. +\ **Note:** This method is intended for advanced purposes. For most common use cases, the scripting languages offer easier ways to handle properties. See :ref:`@GDScript.@export`, :ref:`@GDScript.@export_enum`, :ref:`@GDScript.@export_group`, etc. If you want to customize exported properties, use :ref:`_validate_property()`. \ **Note:** If the object's script is not :ref:`@GDScript.@tool`, this method will not be called in the editor. @@ -507,7 +507,7 @@ The example below displays a list of numbers shown as words going from ``ZERO`` Called when the object's script is instantiated, oftentimes after the object is initialized in memory (through ``Object.new()`` in GDScript, or ``new GodotObject`` in C#). It can be also defined to take in parameters. This method is similar to a constructor in most programming languages. -\ **Note:** If :ref:`_init` is defined with *required* parameters, the Object with script may only be created directly. If any other means (such as :ref:`PackedScene.instantiate` or :ref:`Node.duplicate`) are used, the script's initialization will fail. +\ **Note:** If :ref:`_init()` is defined with *required* parameters, the Object with script may only be created directly. If any other means (such as :ref:`PackedScene.instantiate()` or :ref:`Node.duplicate()`) are used, the script's initialization will fail. .. rst-class:: classref-item-separator @@ -519,7 +519,7 @@ Called when the object's script is instantiated, oftentimes after the object is :ref:`Variant` **_iter_get**\ (\ iter\: :ref:`Variant`\ ) |virtual| :ref:`πŸ”—` -Returns the current iterable value. ``iter`` stores the iteration state, but unlike :ref:`_iter_init` and :ref:`_iter_next` the state is supposed to be read-only, so there is no :ref:`Array` wrapper. +Returns the current iterable value. ``iter`` stores the iteration state, but unlike :ref:`_iter_init()` and :ref:`_iter_next()` the state is supposed to be read-only, so there is no :ref:`Array` wrapper. .. rst-class:: classref-item-separator @@ -586,7 +586,7 @@ Moves the iterator to the next iteration. ``iter`` stores the iteration state. S |void| **_notification**\ (\ what\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -Called when the object receives a notification, which can be identified in ``what`` by comparing it with a constant. See also :ref:`notification`. +Called when the object receives a notification, which can be identified in ``what`` by comparing it with a constant. See also :ref:`notification()`. .. tabs:: @@ -621,7 +621,7 @@ Called when the object receives a notification, which can be identified in ``wha :ref:`bool` **_property_can_revert**\ (\ property\: :ref:`StringName`\ ) |virtual| :ref:`πŸ”—` -Override this method to customize the given ``property``'s revert behavior. Should return ``true`` if the ``property`` has a custom default value and is revertible in the Inspector dock. Use :ref:`_property_get_revert` to specify the ``property``'s default value. +Override this method to customize the given ``property``'s revert behavior. Should return ``true`` if the ``property`` has a custom default value and is revertible in the Inspector dock. Use :ref:`_property_get_revert()` to specify the ``property``'s default value. \ **Note:** This method must return consistently, regardless of the current value of the ``property``. @@ -637,7 +637,7 @@ Override this method to customize the given ``property``'s revert behavior. Shou Override this method to customize the given ``property``'s revert behavior. Should return the default value for the ``property``. If the default value differs from the ``property``'s current value, a revert icon is displayed in the Inspector dock. -\ **Note:** :ref:`_property_can_revert` must also be overridden for this method to be called. +\ **Note:** :ref:`_property_can_revert()` must also be overridden for this method to be called. .. rst-class:: classref-item-separator @@ -649,9 +649,9 @@ Override this method to customize the given ``property``'s revert behavior. Shou :ref:`bool` **_set**\ (\ property\: :ref:`StringName`, value\: :ref:`Variant`\ ) |virtual| :ref:`πŸ”—` -Override this method to customize the behavior of :ref:`set`. Should set the ``property`` to ``value`` and return ``true``, or ``false`` if the ``property`` should be handled normally. The *exact* way to set the ``property`` is up to this method's implementation. +Override this method to customize the behavior of :ref:`set()`. Should set the ``property`` to ``value`` and return ``true``, or ``false`` if the ``property`` should be handled normally. The *exact* way to set the ``property`` is up to this method's implementation. -Combined with :ref:`_get` and :ref:`_get_property_list`, this method allows defining custom properties, which is particularly useful for editor plugins. Note that a property *must* be present in :ref:`get_property_list`, otherwise this method will not be called. +Combined with :ref:`_get()` and :ref:`_get_property_list()`, this method allows defining custom properties, which is particularly useful for editor plugins. Note that a property *must* be present in :ref:`get_property_list()`, otherwise this method will not be called. .. tabs:: @@ -712,7 +712,7 @@ Combined with :ref:`_get` and :ref:`_get_prope :ref:`String` **_to_string**\ (\ ) |virtual| :ref:`πŸ”—` -Override this method to customize the return value of :ref:`to_string`, and therefore the object's representation as a :ref:`String`. +Override this method to customize the return value of :ref:`to_string()`, and therefore the object's representation as a :ref:`String`. :: @@ -733,7 +733,7 @@ Override this method to customize the return value of :ref:`to_string`\ ) |virtual| :ref:`πŸ”—` -Override this method to customize existing properties. Every property info goes through this method, except properties added with :ref:`_get_property_list`. The dictionary contents is the same as in :ref:`_get_property_list`. +Override this method to customize existing properties. Every property info goes through this method, except properties added with :ref:`_get_property_list()`. The dictionary contents is the same as in :ref:`_get_property_list()`. .. tabs:: @@ -796,7 +796,7 @@ Override this method to customize existing properties. Every property info goes |void| **add_user_signal**\ (\ signal\: :ref:`String`, arguments\: :ref:`Array` = []\ ) :ref:`πŸ”—` -Adds a user-defined signal named ``signal``. Optional arguments for the signal can be added as an :ref:`Array` of dictionaries, each defining a ``name`` :ref:`String` and a ``type`` :ref:`int` (see :ref:`Variant.Type`). See also :ref:`has_user_signal` and :ref:`remove_user_signal`. +Adds a user-defined signal named ``signal``. Optional arguments for the signal can be added as an :ref:`Array` of dictionaries, each defining a ``name`` :ref:`String` and a ``type`` :ref:`int` (see :ref:`Variant.Type`). See also :ref:`has_user_signal()` and :ref:`remove_user_signal()`. .. tabs:: @@ -886,7 +886,7 @@ This method supports a variable number of arguments, so parameters can be passed -See also :ref:`Callable.call_deferred`. +See also :ref:`Callable.call_deferred()`. \ **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. @@ -911,7 +911,7 @@ See also :ref:`Callable.call_deferred`. :ref:`Variant` **callv**\ (\ method\: :ref:`StringName`, arg_array\: :ref:`Array`\ ) :ref:`πŸ”—` -Calls the ``method`` on the object and returns the result. Unlike :ref:`call`, this method expects all parameters to be contained inside ``arg_array``. +Calls the ``method`` on the object and returns the result. Unlike :ref:`call()`, this method expects all parameters to be contained inside ``arg_array``. .. tabs:: @@ -940,7 +940,7 @@ Calls the ``method`` on the object and returns the result. Unlike :ref:`call` **can_translate_messages**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the object is allowed to translate messages with :ref:`tr` and :ref:`tr_n`. See also :ref:`set_message_translation`. +Returns ``true`` if the object is allowed to translate messages with :ref:`tr()` and :ref:`tr_n()`. See also :ref:`set_message_translation()`. .. rst-class:: classref-item-separator @@ -966,7 +966,7 @@ If this method is called during :ref:`NOTIFICATION_PREDELETE` constants). -A signal can only be connected once to the same :ref:`Callable`. If the signal is already connected, this method returns :ref:`@GlobalScope.ERR_INVALID_PARAMETER` and pushes an error message, unless the signal is connected with :ref:`CONNECT_REFERENCE_COUNTED`. To prevent this, use :ref:`is_connected` first to check for existing connections. +A signal can only be connected once to the same :ref:`Callable`. If the signal is already connected, this method returns :ref:`@GlobalScope.ERR_INVALID_PARAMETER` and pushes an error message, unless the signal is connected with :ref:`CONNECT_REFERENCE_COUNTED`. To prevent this, use :ref:`is_connected()` first to check for existing connections. If the ``callable``'s object is freed, the connection will be lost. @@ -1025,7 +1025,7 @@ Connecting signals is one of the most common operations in Godot and the API giv \ **\ ``Object.connect()`` or ``Signal.connect()``?**\ -As seen above, the recommended method to connect signals is not :ref:`connect`. The code block below shows the four options for connecting signals, using either this legacy method or the recommended :ref:`Signal.connect`, and using either an implicit :ref:`Callable` or a manually defined one. +As seen above, the recommended method to connect signals is not :ref:`connect()`. The code block below shows the four options for connecting signals, using either this legacy method or the recommended :ref:`Signal.connect()`, and using either an implicit :ref:`Callable` or a manually defined one. .. tabs:: @@ -1070,9 +1070,9 @@ While all options have the same outcome (``button``'s :ref:`BaseButton.button_do \ **Binding and passing parameters:**\ -The syntax to bind parameters is through :ref:`Callable.bind`, which returns a copy of the :ref:`Callable` with its parameters bound. +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` or :ref:`Signal.emit`, 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:: @@ -1126,7 +1126,7 @@ When calling :ref:`emit_signal` or :ref:`Signal |void| **disconnect**\ (\ signal\: :ref:`StringName`, callable\: :ref:`Callable`\ ) :ref:`πŸ”—` -Disconnects a ``signal`` by name from a given ``callable``. If the connection does not exist, generates an error. Use :ref:`is_connected` to make sure that the connection exists. +Disconnects a ``signal`` by name from a given ``callable``. If the connection does not exist, generates an error. Use :ref:`is_connected()` to make sure that the connection exists. .. rst-class:: classref-item-separator @@ -1138,7 +1138,7 @@ Disconnects a ``signal`` by name from a given ``callable``. If the connection do :ref:`Error` **emit_signal**\ (\ signal\: :ref:`StringName`, ...\ ) |vararg| :ref:`πŸ”—` -Emits the given ``signal`` by name. The signal must exist, so it should be a built-in signal of this class or one of its inherited classes, or a user-defined signal (see :ref:`add_user_signal`). This method supports a variable number of arguments, so parameters can be passed as a comma separated list. +Emits the given ``signal`` by name. The signal must exist, so it should be a built-in signal of this class or one of its inherited classes, or a user-defined signal (see :ref:`add_user_signal()`). This method supports a variable number of arguments, so parameters can be passed as a comma separated list. Returns :ref:`@GlobalScope.ERR_UNAVAILABLE` if ``signal`` does not exist or the parameters are invalid. @@ -1169,7 +1169,7 @@ Returns :ref:`@GlobalScope.ERR_UNAVAILABLE` -Deletes the object from memory. Pre-existing references to the object become invalid, and any attempt to access them will result in a run-time error. Checking the references with :ref:`@GlobalScope.is_instance_valid` will return ``false``. +Deletes the object from memory. Pre-existing references to the object become invalid, and any attempt to access them will result in a run-time error. Checking the references with :ref:`@GlobalScope.is_instance_valid()` will return ``false``. .. rst-class:: classref-item-separator @@ -1212,7 +1212,7 @@ Returns the :ref:`Variant` value of the given ``property``. If th :ref:`String` **get_class**\ (\ ) |const| :ref:`πŸ”—` -Returns the object's built-in class name, as a :ref:`String`. See also :ref:`is_class`. +Returns the object's built-in class name, as a :ref:`String`. See also :ref:`is_class()`. \ **Note:** This method ignores ``class_name`` declarations. If this object's script has defined a ``class_name``, the base, built-in class name is returned instead. @@ -1269,7 +1269,7 @@ Gets the object's property indexed by the given ``property_path``. The path shou \ **Note:** In C#, ``property_path`` must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the ``PropertyName`` class to avoid allocating a new :ref:`StringName` on each call. -\ **Note:** This method does not support actual paths to nodes in the :ref:`SceneTree`, only sub-property paths. In the context of nodes, use :ref:`Node.get_node_and_resource` instead. +\ **Note:** This method does not support actual paths to nodes in the :ref:`SceneTree`, only sub-property paths. In the context of nodes, use :ref:`Node.get_node_and_resource()` instead. .. rst-class:: classref-item-separator @@ -1281,7 +1281,7 @@ Gets the object's property indexed by the given ``property_path``. The path shou :ref:`int` **get_instance_id**\ (\ ) |const| :ref:`πŸ”—` -Returns the object's unique instance ID. This ID can be saved in :ref:`EncodedObjectAsID`, and can be used to retrieve this object instance with :ref:`@GlobalScope.instance_from_id`. +Returns the object's unique instance ID. This ID can be saved in :ref:`EncodedObjectAsID`, and can be used to retrieve this object instance with :ref:`@GlobalScope.instance_from_id()`. \ **Note:** This ID is only useful during the current session. It won't correspond to a similar object if the ID is sent over a network, or loaded from a file at a later time. @@ -1297,7 +1297,7 @@ Returns the object's unique instance ID. This ID can be saved in :ref:`EncodedOb Returns the object's metadata value for the given entry ``name``. If the entry does not exist, returns ``default``. If ``default`` is ``null``, an error is also generated. -\ **Note:** A metadata's name must be a valid identifier as per :ref:`StringName.is_valid_identifier` method. +\ **Note:** A metadata's name must be a valid identifier as per :ref:`StringName.is_valid_identifier()` method. \ **Note:** Metadata that has a name starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. @@ -1351,7 +1351,7 @@ Returns this object's methods and their signatures as an :ref:`Array`; -\ **Note:** The dictionaries of ``args`` and ``return`` are formatted identically to the results of :ref:`get_property_list`, although not all entries are used. +\ **Note:** The dictionaries of ``args`` and ``return`` are formatted identically to the results of :ref:`get_property_list()`, although not all entries are used. .. rst-class:: classref-item-separator @@ -1421,7 +1421,7 @@ Returns an :ref:`Array` of connections for the given ``signal`` nam Returns the list of existing signals as an :ref:`Array` of dictionaries. -\ **Note:** Due of the implementation, each :ref:`Dictionary` is formatted very similarly to the returned values of :ref:`get_method_list`. +\ **Note:** Due of the implementation, each :ref:`Dictionary` is formatted very similarly to the returned values of :ref:`get_method_list()`. .. rst-class:: classref-item-separator @@ -1433,7 +1433,7 @@ Returns the list of existing signals as an :ref:`Array` of dictiona :ref:`StringName` **get_translation_domain**\ (\ ) |const| :ref:`πŸ”—` -Returns the name of the translation domain used by :ref:`tr` and :ref:`tr_n`. See also :ref:`TranslationServer`. +Returns the name of the translation domain used by :ref:`tr()` and :ref:`tr_n()`. See also :ref:`TranslationServer`. .. rst-class:: classref-item-separator @@ -1459,9 +1459,9 @@ Returns ``true`` if any connection exists on the given ``signal`` name. :ref:`bool` **has_meta**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if a metadata entry is found with the given ``name``. See also :ref:`get_meta`, :ref:`set_meta` and :ref:`remove_meta`. +Returns ``true`` if a metadata entry is found with the given ``name``. See also :ref:`get_meta()`, :ref:`set_meta()` and :ref:`remove_meta()`. -\ **Note:** A metadata's name must be a valid identifier as per :ref:`StringName.is_valid_identifier` method. +\ **Note:** A metadata's name must be a valid identifier as per :ref:`StringName.is_valid_identifier()` method. \ **Note:** Metadata that has a name starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. @@ -1503,7 +1503,7 @@ Returns ``true`` if the given ``signal`` name exists in the object. :ref:`bool` **has_user_signal**\ (\ signal\: :ref:`StringName`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the given user-defined ``signal`` name exists. Only signals added with :ref:`add_user_signal` are included. See also :ref:`remove_user_signal`. +Returns ``true`` if the given user-defined ``signal`` name exists. Only signals added with :ref:`add_user_signal()` are included. See also :ref:`remove_user_signal()`. .. rst-class:: classref-item-separator @@ -1515,7 +1515,7 @@ Returns ``true`` if the given user-defined ``signal`` name exists. Only signals :ref:`bool` **is_blocking_signals**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the object is blocking its signals from being emitted. See :ref:`set_block_signals`. +Returns ``true`` if the object is blocking its signals from being emitted. See :ref:`set_block_signals()`. .. rst-class:: classref-item-separator @@ -1527,7 +1527,7 @@ Returns ``true`` if the object is blocking its signals from being emitted. See : :ref:`bool` **is_class**\ (\ class\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the object inherits from the given ``class``. See also :ref:`get_class`. +Returns ``true`` if the object inherits from the given ``class``. See also :ref:`get_class()`. .. tabs:: @@ -1574,7 +1574,7 @@ Returns ``true`` if a connection exists between the given ``signal`` name and `` :ref:`bool` **is_queued_for_deletion**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the :ref:`Node.queue_free` method was called for the object. +Returns ``true`` if the :ref:`Node.queue_free()` method was called for the object. .. rst-class:: classref-item-separator @@ -1586,7 +1586,7 @@ Returns ``true`` if the :ref:`Node.queue_free` met |void| **notification**\ (\ what\: :ref:`int`, reversed\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Sends the given ``what`` notification to all classes inherited by the object, triggering calls to :ref:`_notification`, starting from the highest ancestor (the **Object** class) and going down to the object's script. +Sends the given ``what`` notification to all classes inherited by the object, triggering calls to :ref:`_notification()`, starting from the highest ancestor (the **Object** class) and going down to the object's script. If ``reversed`` is ``true``, the call order is reversed. @@ -1639,9 +1639,9 @@ Emits the :ref:`property_list_changed :ref:`bool` **property_can_revert**\ (\ property\: :ref:`StringName`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the given ``property`` has a custom default value. Use :ref:`property_get_revert` to get the ``property``'s default value. +Returns ``true`` if the given ``property`` has a custom default value. Use :ref:`property_get_revert()` to get the ``property``'s default value. -\ **Note:** This method is used by the Inspector dock to display a revert icon. The object must implement :ref:`_property_can_revert` to customize the default value. If :ref:`_property_can_revert` is not implemented, this method returns ``false``. +\ **Note:** This method is used by the Inspector dock to display a revert icon. The object must implement :ref:`_property_can_revert()` to customize the default value. If :ref:`_property_can_revert()` is not implemented, this method returns ``false``. .. rst-class:: classref-item-separator @@ -1653,9 +1653,9 @@ Returns ``true`` if the given ``property`` has a custom default value. Use :ref: :ref:`Variant` **property_get_revert**\ (\ property\: :ref:`StringName`\ ) |const| :ref:`πŸ”—` -Returns the custom default value of the given ``property``. Use :ref:`property_can_revert` to check if the ``property`` has a custom default value. +Returns the custom default value of the given ``property``. Use :ref:`property_can_revert()` to check if the ``property`` has a custom default value. -\ **Note:** This method is used by the Inspector dock to display a revert icon. The object must implement :ref:`_property_get_revert` to customize the default value. If :ref:`_property_get_revert` is not implemented, this method returns ``null``. +\ **Note:** This method is used by the Inspector dock to display a revert icon. The object must implement :ref:`_property_get_revert()` to customize the default value. If :ref:`_property_get_revert()` is not implemented, this method returns ``null``. .. rst-class:: classref-item-separator @@ -1667,9 +1667,9 @@ Returns the custom default value of the given ``property``. Use :ref:`property_c |void| **remove_meta**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Removes the given entry ``name`` from the object's metadata. See also :ref:`has_meta`, :ref:`get_meta` and :ref:`set_meta`. +Removes the given entry ``name`` from the object's metadata. See also :ref:`has_meta()`, :ref:`get_meta()` and :ref:`set_meta()`. -\ **Note:** A metadata's name must be a valid identifier as per :ref:`StringName.is_valid_identifier` method. +\ **Note:** A metadata's name must be a valid identifier as per :ref:`StringName.is_valid_identifier()` method. \ **Note:** Metadata that has a name starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. @@ -1683,7 +1683,7 @@ Removes the given entry ``name`` from the object's metadata. See also :ref:`has_ |void| **remove_user_signal**\ (\ signal\: :ref:`StringName`\ ) :ref:`πŸ”—` -Removes the given user signal ``signal`` from the object. See also :ref:`add_user_signal` and :ref:`has_user_signal`. +Removes the given user signal ``signal`` from the object. See also :ref:`add_user_signal()` and :ref:`has_user_signal()`. .. rst-class:: classref-item-separator @@ -1726,7 +1726,7 @@ Assigns ``value`` to the given ``property``. If the property does not exist or t |void| **set_block_signals**\ (\ enable\: :ref:`bool`\ ) :ref:`πŸ”—` -If set to ``true``, the object becomes unable to emit signals. As such, :ref:`emit_signal` and signal connections will not work, until it is set to ``false``. +If set to ``true``, the object becomes unable to emit signals. As such, :ref:`emit_signal()` and signal connections will not work, until it is set to ``false``. .. rst-class:: classref-item-separator @@ -1738,7 +1738,7 @@ If set to ``true``, the object becomes unable to emit signals. As such, :ref:`em |void| **set_deferred**\ (\ property\: :ref:`StringName`, value\: :ref:`Variant`\ ) :ref:`πŸ”—` -Assigns ``value`` to the given ``property``, at the end of the current frame. This is equivalent to calling :ref:`set` through :ref:`call_deferred`. +Assigns ``value`` to the given ``property``, at the end of the current frame. This is equivalent to calling :ref:`set()` through :ref:`call_deferred()`. .. tabs:: @@ -1812,7 +1812,7 @@ Assigns a new ``value`` to the property identified by the ``property_path``. The |void| **set_message_translation**\ (\ enable\: :ref:`bool`\ ) :ref:`πŸ”—` -If set to ``true``, allows the object to translate messages with :ref:`tr` and :ref:`tr_n`. Enabled by default. See also :ref:`can_translate_messages`. +If set to ``true``, allows the object to translate messages with :ref:`tr()` and :ref:`tr_n()`. Enabled by default. See also :ref:`can_translate_messages()`. .. rst-class:: classref-item-separator @@ -1826,9 +1826,9 @@ If set to ``true``, allows the object to translate messages with :ref:`tr`, although some types cannot be serialized correctly. -If ``value`` is ``null``, the entry is removed. This is the equivalent of using :ref:`remove_meta`. See also :ref:`has_meta` and :ref:`get_meta`. +If ``value`` is ``null``, the entry is removed. This is the equivalent of using :ref:`remove_meta()`. See also :ref:`has_meta()` and :ref:`get_meta()`. -\ **Note:** A metadata's name must be a valid identifier as per :ref:`StringName.is_valid_identifier` method. +\ **Note:** A metadata's name must be a valid identifier as per :ref:`StringName.is_valid_identifier()` method. \ **Note:** Metadata that has a name starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. @@ -1842,7 +1842,7 @@ If ``value`` is ``null``, the entry is removed. This is the equivalent of using |void| **set_script**\ (\ script\: :ref:`Variant`\ ) :ref:`πŸ”—` -Attaches ``script`` to the object, and instantiates it. As a result, the script's :ref:`_init` is called. A :ref:`Script` is used to extend the object's functionality. +Attaches ``script`` to the object, and instantiates it. As a result, the script's :ref:`_init()` is called. A :ref:`Script` is used to extend the object's functionality. If a script already exists, its instance is detached, and its property values and state are lost. Built-in property values are still kept. @@ -1856,7 +1856,7 @@ If a script already exists, its instance is detached, and its property values an |void| **set_translation_domain**\ (\ domain\: :ref:`StringName`\ ) :ref:`πŸ”—` -Sets the name of the translation domain used by :ref:`tr` and :ref:`tr_n`. See also :ref:`TranslationServer`. +Sets the name of the translation domain used by :ref:`tr()` and :ref:`tr_n()`. See also :ref:`TranslationServer`. .. rst-class:: classref-item-separator @@ -1868,7 +1868,7 @@ Sets the name of the translation domain used by :ref:`tr :ref:`String` **to_string**\ (\ ) :ref:`πŸ”—` -Returns a :ref:`String` representing the object. Defaults to ``""``. Override :ref:`_to_string` to customize the string representation of the object. +Returns a :ref:`String` representing the object. Defaults to ``""``. Override :ref:`_to_string()` to customize the string representation of the object. .. rst-class:: classref-item-separator @@ -1882,11 +1882,11 @@ Returns a :ref:`String` representing the object. Defaults to ``"` 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`. +If :ref:`can_translate_messages()` is ``false``, or no translation is available, this method returns the ``message`` without changes. See :ref:`set_message_translation()`. For detailed examples, see :doc:`Internationalizing games <../tutorials/i18n/internationalizing_games>`. -\ **Note:** This method can't be used without an **Object** instance, as it requires the :ref:`can_translate_messages` method. To translate strings in a static context, use :ref:`TranslationServer.translate`. +\ **Note:** This method can't be used without an **Object** instance, as it requires the :ref:`can_translate_messages()` method. To translate strings in a static context, use :ref:`TranslationServer.translate()`. .. rst-class:: classref-item-separator @@ -1900,15 +1900,15 @@ For detailed examples, see :doc:`Internationalizing games <../tutorials/i18n/int Translates a ``message`` or ``plural_message``, using the translation catalogs configured in the Project Settings. Further ``context`` can be specified to help with the translation. -If :ref:`can_translate_messages` is ``false``, or no translation is available, this method returns ``message`` or ``plural_message``, without changes. See :ref:`set_message_translation`. +If :ref:`can_translate_messages()` is ``false``, or no translation is available, this method returns ``message`` or ``plural_message``, without changes. See :ref:`set_message_translation()`. The ``n`` is the number, or amount, of the message's subject. It is used by the translation system to fetch the correct plural form for the current language. For detailed examples, see :doc:`Localization using gettext <../tutorials/i18n/localization_using_gettext>`. -\ **Note:** Negative and :ref:`float` numbers may not properly apply to some countable subjects. It's recommended to handle these cases with :ref:`tr`. +\ **Note:** Negative and :ref:`float` numbers may not properly apply to some countable subjects. It's recommended to handle these cases with :ref:`tr()`. -\ **Note:** This method can't be used without an **Object** instance, as it requires the :ref:`can_translate_messages` method. To translate strings in a static context, use :ref:`TranslationServer.translate_plural`. +\ **Note:** This method can't be used without an **Object** instance, as it requires the :ref:`can_translate_messages()` method. To translate strings in a static context, use :ref:`TranslationServer.translate_plural()`. .. |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_offlinemultiplayerpeer.rst b/classes/class_offlinemultiplayerpeer.rst index e0ea82d0f..48cc89ee2 100644 --- a/classes/class_offlinemultiplayerpeer.rst +++ b/classes/class_offlinemultiplayerpeer.rst @@ -21,7 +21,7 @@ Description This is the default :ref:`MultiplayerAPI.multiplayer_peer` for the :ref:`Node.multiplayer`. It mimics the behavior of a server with no peers connected. -This means that the :ref:`SceneTree` will act as the multiplayer authority by default. Calls to :ref:`MultiplayerAPI.is_server` will return ``true``, and calls to :ref:`MultiplayerAPI.get_unique_id` will return :ref:`MultiplayerPeer.TARGET_PEER_SERVER`. +This means that the :ref:`SceneTree` will act as the multiplayer authority by default. Calls to :ref:`MultiplayerAPI.is_server()` will return ``true``, and calls to :ref:`MultiplayerAPI.get_unique_id()` will return :ref:`MultiplayerPeer.TARGET_PEER_SERVER`. .. |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_openxrapiextension.rst b/classes/class_openxrapiextension.rst index 1263df7c0..bba2401bd 100644 --- a/classes/class_openxrapiextension.rst +++ b/classes/class_openxrapiextension.rst @@ -19,7 +19,7 @@ Makes the OpenXR API available for GDExtension. Description ----------- -**OpenXRAPIExtension** makes OpenXR available for GDExtension. It provides the OpenXR API to GDExtension through the :ref:`get_instance_proc_addr` method, and the OpenXR instance through :ref:`get_instance`. +**OpenXRAPIExtension** makes OpenXR available for GDExtension. It provides the OpenXR API to GDExtension through the :ref:`get_instance_proc_addr()` method, and the OpenXR instance through :ref:`get_instance()`. It also provides methods for querying the status of OpenXR initialization, and helper methods for ease of use of the API with GDExtension. @@ -202,7 +202,7 @@ Returns the corresponding ``XrAction`` OpenXR handle for the given action RID. |void| **begin_debug_label_region**\ (\ label_name\: :ref:`String`\ ) :ref:`πŸ”—` -Begins a new debug label region, this label will be reported in debug messages for any calls following this until :ref:`end_debug_label_region` is called. Debug labels can be stacked. +Begins a new debug label region, this label will be reported in debug messages for any calls following this until :ref:`end_debug_label_region()` is called. Debug labels can be stacked. .. rst-class:: classref-item-separator @@ -226,7 +226,7 @@ Returns ``true`` if OpenXR is initialized for rendering with an XR viewport. |void| **end_debug_label_region**\ (\ ) :ref:`πŸ”—` -Marks the end of a debug label region. Removes the latest debug label region added by calling :ref:`begin_debug_label_region`. +Marks the end of a debug label region. Removes the latest debug label region added by calling :ref:`begin_debug_label_region()`. .. rst-class:: classref-item-separator @@ -426,7 +426,7 @@ Returns the id of the system, which is a `XrSystemId `\ ) :ref:`πŸ”—` -Inserts a debug label, this label is reported in any debug message resulting from the OpenXR calls that follows, until any of :ref:`begin_debug_label_region`, :ref:`end_debug_label_region`, or :ref:`insert_debug_label` is called. +Inserts a debug label, this label is reported in any debug message resulting from the OpenXR calls that follows, until any of :ref:`begin_debug_label_region()`, :ref:`end_debug_label_region()`, or :ref:`insert_debug_label()` is called. .. rst-class:: classref-item-separator diff --git a/classes/class_openxrcompositionlayer.rst b/classes/class_openxrcompositionlayer.rst index 6ee383c1b..2dc780167 100644 --- a/classes/class_openxrcompositionlayer.rst +++ b/classes/class_openxrcompositionlayer.rst @@ -178,7 +178,7 @@ The sort order for this composition layer. Higher numbers will be shown in front If enabled, an Android surface will be created (with the dimensions from :ref:`android_surface_size`) which will provide the 2D content for the composition layer, rather than using :ref:`layer_viewport`. -See :ref:`get_android_surface` for information about how to get the surface so that your application can draw to it. +See :ref:`get_android_surface()` for information about how to get the surface so that your application can draw to it. \ **Note:** This will only work in Android builds. diff --git a/classes/class_openxrextensionwrapperextension.rst b/classes/class_openxrextensionwrapperextension.rst index a8396827f..626e323ef 100644 --- a/classes/class_openxrextensionwrapperextension.rst +++ b/classes/class_openxrextensionwrapperextension.rst @@ -19,7 +19,7 @@ Allows clients to implement OpenXR extensions with GDExtension. Description ----------- -**OpenXRExtensionWrapperExtension** allows clients to implement OpenXR extensions with GDExtension. The extension should be registered with :ref:`register_extension_wrapper`. +**OpenXRExtensionWrapperExtension** allows clients to implement OpenXR extensions with GDExtension. The extension should be registered with :ref:`register_extension_wrapper()`. .. rst-class:: classref-reftable-group @@ -124,7 +124,7 @@ Method Descriptions 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`. +This will only be called if the extension previously registered itself with :ref:`OpenXRAPIExtension.register_composition_layer_provider()`. .. rst-class:: classref-item-separator @@ -136,9 +136,9 @@ This will only be called if the extension previously registered itself with :ref :ref:`int` **_get_composition_layer_count**\ (\ ) |virtual| :ref:`πŸ”—` -Returns the number of composition layers this extension wrapper provides via :ref:`_get_composition_layer`. +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`. +This will only be called if the extension previously registered itself with :ref:`OpenXRAPIExtension.register_composition_layer_provider()`. .. rst-class:: classref-item-separator @@ -150,9 +150,9 @@ This will only be called if the extension previously registered itself with :ref :ref:`int` **_get_composition_layer_order**\ (\ index\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -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``. +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`. +This will only be called if the extension previously registered itself with :ref:`OpenXRAPIExtension.register_composition_layer_provider()`. .. rst-class:: classref-item-separator @@ -192,7 +192,7 @@ Returns a :ref:`PackedStringArray` of positional tracke :ref:`Array`\[:ref:`Dictionary`\] **_get_viewport_composition_layer_extension_properties**\ (\ ) |virtual| :ref:`πŸ”—` -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. +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 @@ -204,7 +204,7 @@ Gets an array of :ref:`Dictionary`\ s that represent propertie :ref:`Dictionary` **_get_viewport_composition_layer_extension_property_defaults**\ (\ ) |virtual| :ref:`πŸ”—` -Gets a :ref:`Dictionary` containing the default values for the properties returned by :ref:`_get_viewport_composition_layer_extension_properties`. +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 @@ -476,7 +476,7 @@ Called when a composition layer created via :ref:`OpenXRCompositionLayer`. -\ ``property_values`` contains the values of the properties returned by :ref:`_get_viewport_composition_layer_extension_properties`. +\ ``property_values`` contains the values of the properties returned by :ref:`_get_viewport_composition_layer_extension_properties()`. .. rst-class:: classref-item-separator @@ -562,7 +562,7 @@ Adds additional data structures when querying OpenXR system abilities. 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`. +\ ``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. diff --git a/classes/class_openxrinteractionprofilemetadata.rst b/classes/class_openxrinteractionprofilemetadata.rst index 675464241..4cba1cd46 100644 --- a/classes/class_openxrinteractionprofilemetadata.rst +++ b/classes/class_openxrinteractionprofilemetadata.rst @@ -68,7 +68,7 @@ Registers an interaction profile using its OpenXR designation (e.g. ``/interacti |void| **register_io_path**\ (\ interaction_profile\: :ref:`String`, display_name\: :ref:`String`, toplevel_path\: :ref:`String`, openxr_path\: :ref:`String`, openxr_extension_name\: :ref:`String`, action_type\: :ref:`ActionType`\ ) :ref:`πŸ”—` -Registers an input/output path for the given ``interaction_profile``. The profile should previously have been registered using :ref:`register_interaction_profile`. ``display_name`` is the description shown to the user. ``toplevel_path`` specifies the bind path this input/output can be bound to (e.g. ``/user/hand/left`` or ``/user/hand/right``). ``openxr_path`` is the action input/output being registered (e.g. ``/user/hand/left/input/aim/pose``). ``openxr_extension_name`` restricts this input/output to an enabled/available extension, this doesn't need to repeat the extension on the profile but relates to overlapping extension (e.g. ``XR_EXT_palm_pose`` that introduces ``…/input/palm_ext/pose`` input paths). ``action_type`` defines the type of input or output provided by OpenXR. +Registers an input/output path for the given ``interaction_profile``. The profile should previously have been registered using :ref:`register_interaction_profile()`. ``display_name`` is the description shown to the user. ``toplevel_path`` specifies the bind path this input/output can be bound to (e.g. ``/user/hand/left`` or ``/user/hand/right``). ``openxr_path`` is the action input/output being registered (e.g. ``/user/hand/left/input/aim/pose``). ``openxr_extension_name`` restricts this input/output to an enabled/available extension, this doesn't need to repeat the extension on the profile but relates to overlapping extension (e.g. ``XR_EXT_palm_pose`` that introduces ``…/input/palm_ext/pose`` input paths). ``action_type`` defines the type of input or output provided by OpenXR. .. rst-class:: classref-item-separator diff --git a/classes/class_openxrinterface.rst b/classes/class_openxrinterface.rst index 66479ab7a..b20aacaec 100644 --- a/classes/class_openxrinterface.rst +++ b/classes/class_openxrinterface.rst @@ -760,7 +760,7 @@ Returns display refresh rates supported by the current HMD. Only returned if thi :ref:`Vector3` **get_hand_joint_angular_velocity**\ (\ hand\: :ref:`Hand`, joint\: :ref:`HandJoints`\ ) |const| :ref:`πŸ”—` -**Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_angular_velocity` obtained from :ref:`XRServer.get_tracker` instead. +**Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_angular_velocity()` obtained from :ref:`XRServer.get_tracker()` instead. If handtracking is enabled, returns the angular velocity of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is relative to :ref:`XROrigin3D`! @@ -774,7 +774,7 @@ If handtracking is enabled, returns the angular velocity of a joint (``joint``) |bitfield|\[:ref:`HandJointFlags`\] **get_hand_joint_flags**\ (\ hand\: :ref:`Hand`, joint\: :ref:`HandJoints`\ ) |const| :ref:`πŸ”—` -**Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_flags` obtained from :ref:`XRServer.get_tracker` instead. +**Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_flags()` obtained from :ref:`XRServer.get_tracker()` instead. If handtracking is enabled, returns flags that inform us of the validity of the tracking data. @@ -788,7 +788,7 @@ If handtracking is enabled, returns flags that inform us of the validity of the :ref:`Vector3` **get_hand_joint_linear_velocity**\ (\ hand\: :ref:`Hand`, joint\: :ref:`HandJoints`\ ) |const| :ref:`πŸ”—` -**Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_linear_velocity` obtained from :ref:`XRServer.get_tracker` instead. +**Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_linear_velocity()` obtained from :ref:`XRServer.get_tracker()` instead. If handtracking is enabled, returns the linear velocity of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is relative to :ref:`XROrigin3D` without worldscale applied! @@ -802,7 +802,7 @@ If handtracking is enabled, returns the linear velocity of a joint (``joint``) o :ref:`Vector3` **get_hand_joint_position**\ (\ hand\: :ref:`Hand`, joint\: :ref:`HandJoints`\ ) |const| :ref:`πŸ”—` -**Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_transform` obtained from :ref:`XRServer.get_tracker` instead. +**Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_transform()` obtained from :ref:`XRServer.get_tracker()` instead. If handtracking is enabled, returns the position of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is relative to :ref:`XROrigin3D` without worldscale applied! @@ -816,7 +816,7 @@ If handtracking is enabled, returns the position of a joint (``joint``) of a han :ref:`float` **get_hand_joint_radius**\ (\ hand\: :ref:`Hand`, joint\: :ref:`HandJoints`\ ) |const| :ref:`πŸ”—` -**Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_radius` obtained from :ref:`XRServer.get_tracker` instead. +**Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_radius()` obtained from :ref:`XRServer.get_tracker()` instead. If handtracking is enabled, returns the radius of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is without worldscale applied! @@ -830,7 +830,7 @@ If handtracking is enabled, returns the radius of a joint (``joint``) of a hand :ref:`Quaternion` **get_hand_joint_rotation**\ (\ hand\: :ref:`Hand`, joint\: :ref:`HandJoints`\ ) |const| :ref:`πŸ”—` -**Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_transform` obtained from :ref:`XRServer.get_tracker` instead. +**Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_transform()` obtained from :ref:`XRServer.get_tracker()` instead. If handtracking is enabled, returns the rotation of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. @@ -844,7 +844,7 @@ If handtracking is enabled, returns the rotation of a joint (``joint``) of a han :ref:`HandTrackedSource` **get_hand_tracking_source**\ (\ hand\: :ref:`Hand`\ ) |const| :ref:`πŸ”—` -**Deprecated:** Use :ref:`XRHandTracker.hand_tracking_source` obtained from :ref:`XRServer.get_tracker` instead. +**Deprecated:** Use :ref:`XRHandTracker.hand_tracking_source` obtained from :ref:`XRServer.get_tracker()` instead. If handtracking is enabled and hand tracking source is supported, gets the source of the hand tracking data for ``hand``. diff --git a/classes/class_optionbutton.rst b/classes/class_optionbutton.rst index 199d36b5d..fb78fbafe 100644 --- a/classes/class_optionbutton.rst +++ b/classes/class_optionbutton.rst @@ -414,7 +414,7 @@ Returns the ID of the selected item, or ``-1`` if no item is selected. :ref:`Variant` **get_selected_metadata**\ (\ ) |const| :ref:`πŸ”—` -Gets the metadata of the selected item. Metadata for items can be set using :ref:`set_item_metadata`. +Gets the metadata of the selected item. Metadata for items can be set using :ref:`set_item_metadata()`. .. rst-class:: classref-item-separator diff --git a/classes/class_os.rst b/classes/class_os.rst index 2c59dd326..654f21f52 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -464,7 +464,7 @@ Displays a modal dialog box using the host platform's implementation. The engine |void| **close_midi_inputs**\ (\ ) :ref:`πŸ”—` -Shuts down the system MIDI driver. Godot will no longer receive :ref:`InputEventMIDI`. See also :ref:`open_midi_inputs` and :ref:`get_connected_midi_inputs`. +Shuts down the system MIDI driver. Godot will no longer receive :ref:`InputEventMIDI`. See also :ref:`open_midi_inputs()` and :ref:`get_connected_midi_inputs()`. \ **Note:** This method is implemented on Linux, macOS, Windows, and Web. @@ -478,9 +478,9 @@ Shuts down the system MIDI driver. Godot will no longer receive :ref:`InputEvent |void| **crash**\ (\ message\: :ref:`String`\ ) :ref:`πŸ”—` -Crashes the engine (or the editor if called within a ``@tool`` script). See also :ref:`kill`. +Crashes the engine (or the editor if called within a ``@tool`` script). See also :ref:`kill()`. -\ **Note:** This method should *only* be used for testing the system's crash handler, not for any other purpose. For general error reporting, use (in order of preference) :ref:`@GDScript.assert`, :ref:`@GlobalScope.push_error`, or :ref:`alert`. +\ **Note:** This method should *only* be used for testing the system's crash handler, not for any other purpose. For general error reporting, use (in order of preference) :ref:`@GDScript.assert()`, :ref:`@GlobalScope.push_error()`, or :ref:`alert()`. .. rst-class:: classref-item-separator @@ -494,9 +494,9 @@ Crashes the engine (or the editor if called within a ``@tool`` script). See also Creates a new instance of Godot that runs independently. The ``arguments`` are used in the given order and separated by a space. -If the process is successfully created, this method returns the new process' ID, which you can use to monitor the process (and potentially terminate it with :ref:`kill`). If the process cannot be created, this method returns ``-1``. +If the process is successfully created, this method returns the new process' ID, which you can use to monitor the process (and potentially terminate it with :ref:`kill()`). If the process cannot be created, this method returns ``-1``. -See :ref:`create_process` if you wish to run a different process. +See :ref:`create_process()` if you wish to run a different process. \ **Note:** This method is implemented on Android, Linux, macOS and Windows. @@ -514,7 +514,7 @@ Creates a new process that runs independently of Godot. It will not terminate wh 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``. \ **Example:** Run another instance of the project: @@ -531,7 +531,7 @@ If the process is successfully created, this method returns its process ID, whic -See :ref:`execute` if you wish to run an external command and retrieve the results. +See :ref:`execute()` if you wish to run an external command and retrieve the results. \ **Note:** This method is implemented on Android, Linux, macOS, and Windows. @@ -547,11 +547,11 @@ See :ref:`execute` if you wish to run an external comma |void| **delay_msec**\ (\ msec\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Delays execution of the current thread by ``msec`` milliseconds. ``msec`` must be greater than or equal to ``0``. Otherwise, :ref:`delay_msec` does nothing and prints an error message. +Delays execution of the current thread by ``msec`` milliseconds. ``msec`` must be greater than or equal to ``0``. Otherwise, :ref:`delay_msec()` does nothing and prints an error message. -\ **Note:** :ref:`delay_msec` is a *blocking* way to delay code execution. To delay code execution in a non-blocking way, you may use :ref:`SceneTree.create_timer`. Awaiting with :ref:`SceneTreeTimer` delays the execution of code placed below the ``await`` without affecting the rest of the project (or editor, for :ref:`EditorPlugin`\ s and :ref:`EditorScript`\ s). +\ **Note:** :ref:`delay_msec()` is a *blocking* way to delay code execution. To delay code execution in a non-blocking way, you may use :ref:`SceneTree.create_timer()`. Awaiting with :ref:`SceneTreeTimer` delays the execution of code placed below the ``await`` without affecting the rest of the project (or editor, for :ref:`EditorPlugin`\ s and :ref:`EditorScript`\ s). -\ **Note:** When :ref:`delay_msec` is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using :ref:`delay_msec` as part of an :ref:`EditorPlugin` or :ref:`EditorScript`, it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process). +\ **Note:** When :ref:`delay_msec()` is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using :ref:`delay_msec()` as part of an :ref:`EditorPlugin` or :ref:`EditorScript`, it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process). .. rst-class:: classref-item-separator @@ -563,11 +563,11 @@ Delays execution of the current thread by ``msec`` milliseconds. ``msec`` must b |void| **delay_usec**\ (\ usec\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Delays execution of the current thread by ``usec`` microseconds. ``usec`` must be greater than or equal to ``0``. Otherwise, :ref:`delay_usec` does nothing and prints an error message. +Delays execution of the current thread by ``usec`` microseconds. ``usec`` must be greater than or equal to ``0``. Otherwise, :ref:`delay_usec()` does nothing and prints an error message. -\ **Note:** :ref:`delay_usec` is a *blocking* way to delay code execution. To delay code execution in a non-blocking way, you may use :ref:`SceneTree.create_timer`. Awaiting with a :ref:`SceneTreeTimer` delays the execution of code placed below the ``await`` without affecting the rest of the project (or editor, for :ref:`EditorPlugin`\ s and :ref:`EditorScript`\ s). +\ **Note:** :ref:`delay_usec()` is a *blocking* way to delay code execution. To delay code execution in a non-blocking way, you may use :ref:`SceneTree.create_timer()`. Awaiting with a :ref:`SceneTreeTimer` delays the execution of code placed below the ``await`` without affecting the rest of the project (or editor, for :ref:`EditorPlugin`\ s and :ref:`EditorScript`\ s). -\ **Note:** When :ref:`delay_usec` is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using :ref:`delay_usec` as part of an :ref:`EditorPlugin` or :ref:`EditorScript`, it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process). +\ **Note:** When :ref:`delay_usec()` is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using :ref:`delay_usec()` as part of an :ref:`EditorPlugin` or :ref:`EditorScript`, it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process). .. rst-class:: classref-item-separator @@ -587,7 +587,7 @@ On Windows, if ``open_console`` is ``true`` and the process is a console app, a This method returns the exit code of the command, or ``-1`` if the process fails to execute. -\ **Note:** The main thread will be blocked until the executed command terminates. Use :ref:`Thread` to create a separate thread that will not block the main thread, or use :ref:`create_process` to create a completely independent process. +\ **Note:** The main thread will be blocked until the executed command terminates. Use :ref:`Thread` to create a separate thread that will not block the main thread, or use :ref:`create_process()` to create a completely independent process. For example, to retrieve a list of the working directory's contents: @@ -647,7 +647,7 @@ If you wish to access a shell built-in or execute a composite command, a platfor 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 ``blocking`` is ``false``, created pipes work in non-blocking mode, i.e. read and write operations will return immediately. Use :ref:`FileAccess.get_error` to check if the last read/write operation was successful. +If ``blocking`` is ``false``, created pipes work in non-blocking mode, i.e. read and write operations will return immediately. Use :ref:`FileAccess.get_error()` to check if the last read/write operation was successful. If the process cannot be created, this method returns an empty :ref:`Dictionary`. Otherwise, this method returns a :ref:`Dictionary` with the following keys: @@ -655,7 +655,7 @@ If the process cannot be created, this method returns an empty :ref:`Dictionary< - ``"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`). +- ``"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. @@ -698,7 +698,7 @@ Finds the keycode for the given string. The returned values are equivalent to th -See also :ref:`get_keycode_string`. +See also :ref:`get_keycode_string()`. .. rst-class:: classref-item-separator @@ -712,9 +712,9 @@ See also :ref:`get_keycode_string`. Returns the *global* cache data directory according to the operating system's standards. -On the Linux/BSD platform, this path can be overridden by setting the ``XDG_CACHE_HOME`` environment variable before starting the project. See :doc:`File paths in Godot projects <../tutorials/io/data_paths>` in the documentation for more information. See also :ref:`get_config_dir` and :ref:`get_data_dir`. +On the Linux/BSD platform, this path can be overridden by setting the ``XDG_CACHE_HOME`` environment variable before starting the project. See :doc:`File paths in Godot projects <../tutorials/io/data_paths>` in the documentation for more information. See also :ref:`get_config_dir()` and :ref:`get_data_dir()`. -Not to be confused with :ref:`get_user_data_dir`, which returns the *project-specific* user data path. +Not to be confused with :ref:`get_user_data_dir()`, which returns the *project-specific* user data path. .. rst-class:: classref-item-separator @@ -730,7 +730,7 @@ Returns the command-line arguments passed to the engine. Command-line arguments can be written in any form, including both ``--key value`` and ``--key=value`` forms so they can be properly parsed, as long as custom command-line arguments do not conflict with engine arguments. -You can also incorporate environment variables using the :ref:`get_environment` method. +You can also incorporate environment variables using the :ref:`get_environment()` method. You can set :ref:`ProjectSettings.editor/run/main_run_args` to define command-line arguments to be passed by the editor when running the project. @@ -771,7 +771,7 @@ You can set :ref:`ProjectSettings.editor/run/main_run_args`. +\ **Note:** Passing custom user arguments directly is not recommended, as the engine may discard or modify them. Instead, pass the standard UNIX double dash (``--``) and then the custom arguments, which the engine will ignore by design. These can be read via :ref:`get_cmdline_user_args()`. .. rst-class:: classref-item-separator @@ -793,7 +793,7 @@ Returns the command-line user arguments passed to the engine. User arguments are OS.get_cmdline_args() # Returns ["--fullscreen", "--level=2", "--hardcore"] OS.get_cmdline_user_args() # Returns ["--level=2", "--hardcore"] -To get all passed arguments, use :ref:`get_cmdline_args`. +To get all passed arguments, use :ref:`get_cmdline_args()`. .. rst-class:: classref-item-separator @@ -807,9 +807,9 @@ To get all passed arguments, use :ref:`get_cmdline_args` in the documentation for more information. See also :ref:`get_cache_dir` and :ref:`get_data_dir`. +On the Linux/BSD platform, this path can be overridden by setting the ``XDG_CONFIG_HOME`` environment variable before starting the project. See :doc:`File paths in Godot projects <../tutorials/io/data_paths>` in the documentation for more information. See also :ref:`get_cache_dir()` and :ref:`get_data_dir()`. -Not to be confused with :ref:`get_user_data_dir`, which returns the *project-specific* user data path. +Not to be confused with :ref:`get_user_data_dir()`, which returns the *project-specific* user data path. .. rst-class:: classref-item-separator @@ -821,13 +821,13 @@ Not to be confused with :ref:`get_user_data_dir` **get_connected_midi_inputs**\ (\ ) :ref:`πŸ”—` -Returns an array of connected MIDI device names, if they exist. Returns an empty array if the system MIDI driver has not previously been initialized with :ref:`open_midi_inputs`. See also :ref:`close_midi_inputs`. +Returns an array of connected MIDI device names, if they exist. Returns an empty array if the system MIDI driver has not previously been initialized with :ref:`open_midi_inputs()`. See also :ref:`close_midi_inputs()`. \ **Note:** This method is implemented on Linux, macOS, Windows, and Web. \ **Note:** On the Web platform, Web MIDI needs to be supported by the browser. `For the time being `__, it is currently supported by all major browsers, except Safari. -\ **Note:** On the Web platform, using MIDI input requires a browser permission to be granted first. This permission request is performed when calling :ref:`open_midi_inputs`. The browser will refrain from processing MIDI input until the user accepts the permission request. +\ **Note:** On the Web platform, using MIDI input requires a browser permission to be granted first. This permission request is performed when calling :ref:`open_midi_inputs()`. The browser will refrain from processing MIDI input until the user accepts the permission request. .. rst-class:: classref-item-separator @@ -841,9 +841,9 @@ Returns an array of connected MIDI device names, if they exist. Returns an empty Returns the *global* user data directory according to the operating system's standards. -On the Linux/BSD platform, this path can be overridden by setting the ``XDG_DATA_HOME`` environment variable before starting the project. See :doc:`File paths in Godot projects <../tutorials/io/data_paths>` in the documentation for more information. See also :ref:`get_cache_dir` and :ref:`get_config_dir`. +On the Linux/BSD platform, this path can be overridden by setting the ``XDG_DATA_HOME`` environment variable before starting the project. See :doc:`File paths in Godot projects <../tutorials/io/data_paths>` in the documentation for more information. See also :ref:`get_cache_dir()` and :ref:`get_config_dir()`. -Not to be confused with :ref:`get_user_data_dir`, which returns the *project-specific* user data path. +Not to be confused with :ref:`get_user_data_dir()`, which returns the *project-specific* user data path. .. rst-class:: classref-item-separator @@ -857,9 +857,9 @@ Not to be confused with :ref:`get_user_data_dir` for stock Android ROMs, but attempts to return the custom ROM name for popular Android derivatives such as "LineageOS". +Returns the same value as :ref:`get_name()` for stock Android ROMs, but attempts to return the custom ROM name for popular Android derivatives such as "LineageOS". -Returns the same value as :ref:`get_name` for other platforms. +Returns the same value as :ref:`get_name()` for other platforms. \ **Note:** This method is not supported on the Web platform. It returns an empty string. @@ -875,7 +875,7 @@ Returns the same value as :ref:`get_name` for other pl Generates a :ref:`PackedByteArray` of cryptographically secure random bytes with given ``size``. -\ **Note:** Generating large quantities of bytes using this method can result in locking and entropy of lower quality on most platforms. Using :ref:`Crypto.generate_random_bytes` is preferred in most cases. +\ **Note:** Generating large quantities of bytes using this method can result in locking and entropy of lower quality on most platforms. Using :ref:`Crypto.generate_random_bytes()` is preferred in most cases. .. rst-class:: classref-item-separator @@ -905,7 +905,7 @@ Returns the value of the given environment variable, or an empty string if ``var Returns the file path to the current engine executable. -\ **Note:** On macOS, if you want to launch another instance of Godot, always use :ref:`create_instance` instead of relying on the executable path. +\ **Note:** On macOS, if you want to launch another instance of Godot, always use :ref:`create_instance()` instead of relying on the executable path. .. rst-class:: classref-item-separator @@ -950,7 +950,7 @@ Returns the given keycode as a :ref:`String`. -See also :ref:`find_keycode_from_string`, :ref:`InputEventKey.keycode`, and :ref:`InputEventKey.get_keycode_with_modifiers`. +See also :ref:`find_keycode_from_string()`, :ref:`InputEventKey.keycode`, and :ref:`InputEventKey.get_keycode_with_modifiers()`. .. rst-class:: classref-item-separator @@ -974,7 +974,7 @@ Returns the host OS locale as a :ref:`String` of the form ``langua - ``extra`` - semicolon separated list of additional key words. This may include currency, calendar, sort order and numbering system information. -If you want only the language code and not the fully specified locale from the OS, you can use :ref:`get_locale_language`. +If you want only the language code and not the fully specified locale from the OS, you can use :ref:`get_locale_language()`. .. rst-class:: classref-item-separator @@ -986,7 +986,7 @@ If you want only the language code and not the fully specified locale from the O :ref:`String` **get_locale_language**\ (\ ) |const| :ref:`πŸ”—` -Returns the host OS locale's 2 or 3-letter `language code `__ as a string which should be consistent on all platforms. This is equivalent to extracting the ``language`` part of the :ref:`get_locale` string. +Returns the host OS locale's 2 or 3-letter `language code `__ as a string which should be consistent on all platforms. This is equivalent to extracting the ``language`` part of the :ref:`get_locale()` string. This can be used to narrow down fully specified locale strings to only the "common" language code, when you don't need the additional information about country code or variants. For example, for a French Canadian user with ``fr_CA`` locale, this would return ``fr``. @@ -1000,7 +1000,7 @@ This can be used to narrow down fully specified locale strings to only the "comm :ref:`int` **get_main_thread_id**\ (\ ) |const| :ref:`πŸ”—` -Returns the ID of the main thread. See :ref:`get_thread_caller_id`. +Returns the ID of the main thread. See :ref:`get_thread_caller_id()`. \ **Note:** Thread IDs are not deterministic and may be reused across application restarts. @@ -1117,7 +1117,7 @@ Returns the name of the host platform. -\ **Note:** On Web platforms, it is still possible to determine the host platform's OS with feature tags. See :ref:`has_feature`. +\ **Note:** On Web platforms, it is still possible to determine the host platform's OS with feature tags. See :ref:`has_feature()`. .. rst-class:: classref-item-separator @@ -1129,7 +1129,7 @@ Returns the name of the host platform. :ref:`int` **get_process_exit_code**\ (\ pid\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the exit code of a spawned process once it has finished running (see :ref:`is_process_running`). +Returns the exit code of a spawned process once it has finished running (see :ref:`is_process_running()`). Returns ``-1`` if the ``pid`` is not a PID of a spawned child process, the process is still running, or the method is not implemented for the current platform. @@ -1175,7 +1175,7 @@ Returns the number of *logical* CPU cores available on the host machine. On CPUs Returns the full name of the CPU model on the host machine (e.g. ``"Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz"``). -\ **Note:** This method is only implemented on Windows, macOS, Linux and iOS. On Android and Web, :ref:`get_processor_name` returns an empty string. +\ **Note:** This method is only implemented on Windows, macOS, Linux and iOS. On Android and Web, :ref:`get_processor_name()` returns an empty string. .. rst-class:: classref-item-separator @@ -1187,7 +1187,7 @@ Returns the full name of the CPU model on the host machine (e.g. ``"Intel(R) Cor :ref:`PackedStringArray` **get_restart_on_exit_arguments**\ (\ ) |const| :ref:`πŸ”—` -Returns the list of command line arguments that will be used when the project automatically restarts using :ref:`set_restart_on_exit`. See also :ref:`is_restart_on_exit_set`. +Returns the list of command line arguments that will be used when the project automatically restarts using :ref:`set_restart_on_exit()`. See also :ref:`is_restart_on_exit_set()`. .. rst-class:: classref-item-separator @@ -1395,7 +1395,7 @@ Returns the absolute directory path where user data is written (the ``user://`` If the project name is empty, ``[project_name]`` falls back to ``[unnamed project]``. -Not to be confused with :ref:`get_data_dir`, which returns the *global* (non-project-specific) user home directory. +Not to be confused with :ref:`get_data_dir()`, which returns the *global* (non-project-specific) user home directory. .. rst-class:: classref-item-separator @@ -1429,9 +1429,9 @@ Returns the exact production and build version of the operating system. This is :ref:`String` **get_version_alias**\ (\ ) |const| :ref:`πŸ”—` -Returns the branded version used in marketing, followed by the build number (on Windows) or the version number (on macOS). Examples include ``11 (build 22000)`` and ``Sequoia (15.0.0)``. This value can then be appended to :ref:`get_name` to get a full, human-readable operating system name and version combination for the operating system. Windows feature updates such as 24H2 are not contained in the resulting string, but Windows Server is recognized as such (e.g. ``2025 (build 26100)`` for Windows Server 2025). +Returns the branded version used in marketing, followed by the build number (on Windows) or the version number (on macOS). Examples include ``11 (build 22000)`` and ``Sequoia (15.0.0)``. This value can then be appended to :ref:`get_name()` to get a full, human-readable operating system name and version combination for the operating system. Windows feature updates such as 24H2 are not contained in the resulting string, but Windows Server is recognized as such (e.g. ``2025 (build 26100)`` for Windows Server 2025). -\ **Note:** This method is only supported on Windows and macOS. On other operating systems, it returns the same value as :ref:`get_version`. +\ **Note:** This method is only supported on Windows and macOS. On other operating systems, it returns the same value as :ref:`get_version()`. .. rst-class:: classref-item-separator @@ -1443,7 +1443,7 @@ Returns the branded version used in marketing, followed by the build number (on :ref:`PackedStringArray` **get_video_adapter_driver_info**\ (\ ) |const| :ref:`πŸ”—` -Returns the video adapter driver name and version for the user's currently active graphics card, as a :ref:`PackedStringArray`. See also :ref:`RenderingServer.get_video_adapter_api_version`. +Returns the video adapter driver name and version for the user's currently active graphics card, as a :ref:`PackedStringArray`. See also :ref:`RenderingServer.get_video_adapter_api_version()`. The first element holds the driver name, such as ``nvidia``, ``amdgpu``, etc. @@ -1538,7 +1538,7 @@ Returns ``true`` if the input keycode corresponds to a Unicode character. For a :ref:`bool` **is_process_running**\ (\ pid\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the child process ID (``pid``) is still running or ``false`` if it has terminated. ``pid`` must be a valid ID generated from :ref:`create_process`. +Returns ``true`` if the child process ID (``pid``) is still running or ``false`` if it has terminated. ``pid`` must be a valid ID generated from :ref:`create_process()`. \ **Note:** This method is implemented on Android, iOS, Linux, macOS, and Windows. @@ -1552,7 +1552,7 @@ Returns ``true`` if the child process ID (``pid``) is still running or ``false`` :ref:`bool` **is_restart_on_exit_set**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the project will automatically restart when it exits for any reason, ``false`` otherwise. See also :ref:`set_restart_on_exit` and :ref:`get_restart_on_exit_arguments`. +Returns ``true`` if the project will automatically restart when it exits for any reason, ``false`` otherwise. See also :ref:`set_restart_on_exit()` and :ref:`get_restart_on_exit_arguments()`. .. rst-class:: classref-item-separator @@ -1578,7 +1578,7 @@ Returns ``true`` if the application is running in the sandbox. :ref:`bool` **is_stdout_verbose**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the engine was executed with the ``--verbose`` or ``-v`` command line argument, or if :ref:`ProjectSettings.debug/settings/stdout/verbose_stdout` is ``true``. See also :ref:`@GlobalScope.print_verbose`. +Returns ``true`` if the engine was executed with the ``--verbose`` or ``-v`` command line argument, or if :ref:`ProjectSettings.debug/settings/stdout/verbose_stdout` is ``true``. See also :ref:`@GlobalScope.print_verbose()`. .. rst-class:: classref-item-separator @@ -1602,7 +1602,7 @@ Returns ``true`` if the ``user://`` file system is persistent, that is, its stat :ref:`Error` **kill**\ (\ pid\: :ref:`int`\ ) :ref:`πŸ”—` -Kill (terminate) the process identified by the given process ID (``pid``), such as the ID returned by :ref:`execute` in non-blocking mode. See also :ref:`crash`. +Kill (terminate) the process identified by the given process ID (``pid``), such as the ID returned by :ref:`execute()` in non-blocking mode. See also :ref:`crash()`. \ **Note:** This method can also be used to kill processes that were not spawned by the engine. @@ -1618,9 +1618,9 @@ Kill (terminate) the process identified by the given process ID (``pid``), such :ref:`Error` **move_to_trash**\ (\ path\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Moves the file or directory at the given ``path`` to the system's recycle bin. See also :ref:`DirAccess.remove`. +Moves the file or directory at the given ``path`` to the system's recycle bin. See also :ref:`DirAccess.remove()`. -The method takes only global paths, so you may need to use :ref:`ProjectSettings.globalize_path`. Do not use it for files in ``res://`` as it will not work in exported projects. +The method takes only global paths, so you may need to use :ref:`ProjectSettings.globalize_path()`. Do not use it for files in ``res://`` as it will not work in exported projects. Returns :ref:`@GlobalScope.FAILED` if the file or directory cannot be found, or the system does not support this method. @@ -1653,13 +1653,13 @@ Returns :ref:`@GlobalScope.FAILED` if the fi |void| **open_midi_inputs**\ (\ ) :ref:`πŸ”—` -Initializes the singleton for the system MIDI driver, allowing Godot to receive :ref:`InputEventMIDI`. See also :ref:`get_connected_midi_inputs` and :ref:`close_midi_inputs`. +Initializes the singleton for the system MIDI driver, allowing Godot to receive :ref:`InputEventMIDI`. See also :ref:`get_connected_midi_inputs()` and :ref:`close_midi_inputs()`. \ **Note:** This method is implemented on Linux, macOS, Windows, and Web. \ **Note:** On the Web platform, Web MIDI needs to be supported by the browser. `For the time being `__, it is currently supported by all major browsers, except Safari. -\ **Note:** On the Web platform, using MIDI input requires a browser permission to be granted first. This permission request is performed when calling :ref:`open_midi_inputs`. The browser will refrain from processing MIDI input until the user accepts the permission request. +\ **Note:** On the Web platform, using MIDI input requires a browser permission to be granted first. This permission request is performed when calling :ref:`open_midi_inputs()`. The browser will refrain from processing MIDI input until the user accepts the permission request. .. rst-class:: classref-item-separator @@ -1671,7 +1671,7 @@ Initializes the singleton for the system MIDI driver, allowing Godot to receive :ref:`PackedByteArray` **read_buffer_from_stdin**\ (\ buffer_size\: :ref:`int`\ ) :ref:`πŸ”—` -Reads a user input as raw data from the standard input. This operation can be *blocking*, which causes the window to freeze if :ref:`read_string_from_stdin` is called on the main thread. +Reads a user input as raw data from the standard input. This operation can be *blocking*, which causes the window to freeze if :ref:`read_string_from_stdin()` is called on the main thread. - If standard input is console, this method will block until the program receives a line break in standard input (usually by the user pressing :kbd:`Enter`). @@ -1693,7 +1693,7 @@ Reads a user input as raw data from the standard input. This operation can be *b :ref:`String` **read_string_from_stdin**\ (\ buffer_size\: :ref:`int`\ ) :ref:`πŸ”—` -Reads a user input as a UTF-8 encoded string from the standard input. This operation can be *blocking*, which causes the window to freeze if :ref:`read_string_from_stdin` is called on the main thread. +Reads a user input as a UTF-8 encoded string from the standard input. This operation can be *blocking*, which causes the window to freeze if :ref:`read_string_from_stdin()` is called on the main thread. - If standard input is console, this method will block until the program receives a line break in standard input (usually by the user pressing :kbd:`Enter`). @@ -1701,7 +1701,7 @@ Reads a user input as a UTF-8 encoded string from the standard input. This opera - If standard input is a file, this method will read a specific amount of data (or less if end-of-file is reached) and return immediately. -\ **Note:** This method automatically replaces ``\r\n`` line breaks with ``\n`` and removes them from the end of the string. Use :ref:`read_buffer_from_stdin` to read the unprocessed data. +\ **Note:** This method automatically replaces ``\r\n`` line breaks with ``\n`` and removes them from the end of the string. Use :ref:`read_buffer_from_stdin()` to read the unprocessed data. \ **Note:** This method is implemented on Linux, macOS, and Windows. @@ -1767,7 +1767,7 @@ On macOS (sandboxed applications only), this function clears list of user select |void| **set_environment**\ (\ variable\: :ref:`String`, value\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Sets the value of the environment variable ``variable`` to ``value``. The environment variable will be set for the Godot process and any process executed with :ref:`execute` after running :ref:`set_environment`. The environment variable will *not* persist to processes run after the Godot process was terminated. +Sets the value of the environment variable ``variable`` to ``value``. The environment variable will be set for the Godot process and any process executed with :ref:`execute()` after running :ref:`set_environment()`. The environment variable will *not* persist to processes run after the Godot process was terminated. \ **Note:** Environment variable names are case-sensitive on all platforms except Windows. The ``variable`` name cannot be empty or include the ``=`` character. On Windows, there is a 32767 characters limit for the combined length of ``variable``, ``value``, and the ``=`` and null terminator characters that will be registered in the environment block. @@ -1781,9 +1781,9 @@ Sets the value of the environment variable ``variable`` to ``value``. The enviro |void| **set_restart_on_exit**\ (\ restart\: :ref:`bool`, arguments\: :ref:`PackedStringArray` = PackedStringArray()\ ) :ref:`πŸ”—` -If ``restart`` is ``true``, restarts the project automatically when it is exited with :ref:`SceneTree.quit` or :ref:`Node.NOTIFICATION_WM_CLOSE_REQUEST`. Command-line ``arguments`` can be supplied. To restart the project with the same command line arguments as originally used to run the project, pass :ref:`get_cmdline_args` as the value for ``arguments``. +If ``restart`` is ``true``, restarts the project automatically when it is exited with :ref:`SceneTree.quit()` or :ref:`Node.NOTIFICATION_WM_CLOSE_REQUEST`. Command-line ``arguments`` can be supplied. To restart the project with the same command line arguments as originally used to run the project, pass :ref:`get_cmdline_args()` as the value for ``arguments``. -This method can be used to apply setting changes that require a restart. See also :ref:`is_restart_on_exit_set` and :ref:`get_restart_on_exit_arguments`. +This method can be used to apply setting changes that require a restart. See also :ref:`is_restart_on_exit_set()` and :ref:`get_restart_on_exit_arguments()`. \ **Note:** This method is only effective on desktop platforms, and only when the project isn't started from the editor. It will have no effect on mobile and Web platforms, or when the project is started from the editor. @@ -1835,9 +1835,9 @@ Requests the OS to open a resource identified by ``uri`` with the most appropria - ``OS.shell_open("mailto:example@example.com")`` opens the default email client with the "To" field set to ``example@example.com``. See `RFC 2368 - The [code]mailto[/code] URL scheme `__ for a list of fields that can be added. -Use :ref:`ProjectSettings.globalize_path` to convert a ``res://`` or ``user://`` project path into a system path for use with this method. +Use :ref:`ProjectSettings.globalize_path()` to convert a ``res://`` or ``user://`` project path into a system path for use with this method. -\ **Note:** Use :ref:`String.uri_encode` to encode characters within URLs in a URL-safe, portable way. This is especially required for line breaks. Otherwise, :ref:`shell_open` may not work correctly in a project exported to the Web platform. +\ **Note:** Use :ref:`String.uri_encode()` to encode characters within URLs in a URL-safe, portable way. This is especially required for line breaks. Otherwise, :ref:`shell_open()` may not work correctly in a project exported to the Web platform. \ **Note:** This method is implemented on Android, iOS, Web, Linux, macOS and Windows. @@ -1855,9 +1855,9 @@ Requests the OS to open the file manager, navigate to the given ``file_or_dir_pa If ``open_folder`` is ``true`` and ``file_or_dir_path`` is a valid directory path, the OS will open the file manager and navigate to the target folder without selecting anything. -Use :ref:`ProjectSettings.globalize_path` to convert a ``res://`` or ``user://`` project path into a system path to use with this method. +Use :ref:`ProjectSettings.globalize_path()` to convert a ``res://`` or ``user://`` project path into a system path to use with this method. -\ **Note:** This method is currently only implemented on Windows and macOS. On other platforms, it will fallback to :ref:`shell_open` with a directory path of ``file_or_dir_path`` prefixed with ``file://``. +\ **Note:** This method is currently only implemented on Windows and macOS. On other platforms, it will fallback to :ref:`shell_open()` with a directory path of ``file_or_dir_path`` prefixed with ``file://``. .. rst-class:: classref-item-separator @@ -1869,7 +1869,7 @@ Use :ref:`ProjectSettings.globalize_path`\ ) |const| :ref:`πŸ”—` -Removes the given environment variable from the current environment, if it exists. The ``variable`` name cannot be empty or include the ``=`` character. The environment variable will be removed for the Godot process and any process executed with :ref:`execute` after running :ref:`unset_environment`. The removal of the environment variable will *not* persist to processes run after the Godot process was terminated. +Removes the given environment variable from the current environment, if it exists. The ``variable`` name cannot be empty or include the ``=`` character. The environment variable will be removed for the Godot process and any process executed with :ref:`execute()` after running :ref:`unset_environment()`. The removal of the environment variable will *not* persist to processes run after the Godot process was terminated. \ **Note:** Environment variable names are case-sensitive on all platforms except Windows. diff --git a/classes/class_packedbytearray.rst b/classes/class_packedbytearray.rst index ae8d50835..23d859d29 100644 --- a/classes/class_packedbytearray.rst +++ b/classes/class_packedbytearray.rst @@ -21,7 +21,7 @@ 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:** 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:: @@ -243,7 +243,7 @@ Method Descriptions :ref:`bool` **append**\ (\ value\: :ref:`int`\ ) :ref:`πŸ”—` -Appends an element at the end of the array (alias of :ref:`push_back`). +Appends an element at the end of the array (alias of :ref:`push_back()`). .. rst-class:: classref-item-separator @@ -269,7 +269,7 @@ Appends a **PackedByteArray** at the end of this array. 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. -\ **Note:** Calling :ref:`bsearch` on an unsorted array results in unexpected behavior. +\ **Note:** Calling :ref:`bsearch()` on an unsorted array results in unexpected behavior. .. rst-class:: classref-item-separator @@ -281,7 +281,7 @@ Finds the index of an existing value (or the insertion index that maintains sort |void| **clear**\ (\ ) :ref:`πŸ”—` -Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. +Clears the array. This is equivalent to using :ref:`resize()` with a size of ``0``. .. rst-class:: classref-item-separator @@ -489,7 +489,7 @@ Returns a new **PackedByteArray** with the data decompressed. Set ``buffer_size` Returns a new **PackedByteArray** with the data decompressed. Set the compression mode using one of :ref:`CompressionMode`'s constants. **This method only accepts brotli, gzip, and deflate compression modes.**\ -This method is potentially slower than :ref:`decompress`, as it may have to re-allocate its output buffer multiple times while decompressing, whereas :ref:`decompress` knows it's output buffer size from the beginning. +This method is potentially slower than :ref:`decompress()`, as it may have to re-allocate its output buffer multiple times while decompressing, whereas :ref:`decompress()` knows it's output buffer size from the beginning. GZIP has a maximal compression ratio of 1032:1, meaning it's very possible for a small compressed payload to decompress to a potentially very large output. To guard against this, you may provide a maximum size this function is allowed to allocate in bytes via ``max_output_size``. Passing -1 will allow for unbounded output. If any positive value is passed, and the decompression exceeds that amount in bytes, then an error will be returned. @@ -661,7 +661,7 @@ Encodes a :ref:`Variant` at the index of ``byte_offset`` bytes. A |void| **fill**\ (\ value\: :ref:`int`\ ) :ref:`πŸ”—` -Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize` to create an array with a given size and initialized elements. +Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize()` to create an array with a given size and initialized elements. .. rst-class:: classref-item-separator @@ -697,7 +697,7 @@ Returns the byte at the given ``index`` in the array. This is the same as using :ref:`String` **get_string_from_ascii**\ (\ ) |const| :ref:`πŸ”—` -Converts ASCII/Latin-1 encoded array to :ref:`String`. Fast alternative to :ref:`get_string_from_utf8` if the content is ASCII/Latin-1 only. Unlike the UTF-8 function this function maps every byte to a character in the array. Multibyte sequences will not be interpreted correctly. For parsing user input always use :ref:`get_string_from_utf8`. This is the inverse of :ref:`String.to_ascii_buffer`. +Converts ASCII/Latin-1 encoded array to :ref:`String`. Fast alternative to :ref:`get_string_from_utf8()` if the content is ASCII/Latin-1 only. Unlike the UTF-8 function this function maps every byte to a character in the array. Multibyte sequences will not be interpreted correctly. For parsing user input always use :ref:`get_string_from_utf8()`. This is the inverse of :ref:`String.to_ascii_buffer()`. .. rst-class:: classref-item-separator @@ -709,7 +709,7 @@ Converts ASCII/Latin-1 encoded array to :ref:`String`. Fast altern :ref:`String` **get_string_from_utf8**\ (\ ) |const| :ref:`πŸ”—` -Converts UTF-8 encoded array to :ref:`String`. Slower than :ref:`get_string_from_ascii` but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred. Returns empty string if source array is not valid UTF-8 string. This is the inverse of :ref:`String.to_utf8_buffer`. +Converts UTF-8 encoded array to :ref:`String`. Slower than :ref:`get_string_from_ascii()` but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred. Returns empty string if source array is not valid UTF-8 string. This is the inverse of :ref:`String.to_utf8_buffer()`. .. rst-class:: classref-item-separator @@ -721,7 +721,7 @@ Converts UTF-8 encoded array to :ref:`String`. Slower than :ref:`g :ref:`String` **get_string_from_utf16**\ (\ ) |const| :ref:`πŸ”—` -Converts UTF-16 encoded array to :ref:`String`. If the BOM is missing, system endianness is assumed. Returns empty string if source array is not valid UTF-16 string. This is the inverse of :ref:`String.to_utf16_buffer`. +Converts UTF-16 encoded array to :ref:`String`. If the BOM is missing, system endianness is assumed. Returns empty string if source array is not valid UTF-16 string. This is the inverse of :ref:`String.to_utf16_buffer()`. .. rst-class:: classref-item-separator @@ -733,7 +733,7 @@ Converts UTF-16 encoded array to :ref:`String`. If the BOM is miss :ref:`String` **get_string_from_utf32**\ (\ ) |const| :ref:`πŸ”—` -Converts UTF-32 encoded array to :ref:`String`. System endianness is assumed. Returns empty string if source array is not valid UTF-32 string. This is the inverse of :ref:`String.to_utf32_buffer`. +Converts UTF-32 encoded array to :ref:`String`. System endianness is assumed. Returns empty string if source array is not valid UTF-32 string. This is the inverse of :ref:`String.to_utf32_buffer()`. .. rst-class:: classref-item-separator @@ -745,7 +745,7 @@ Converts UTF-32 encoded array to :ref:`String`. System endianness :ref:`String` **get_string_from_wchar**\ (\ ) |const| :ref:`πŸ”—` -Converts wide character (``wchar_t``, UTF-16 on Windows, UTF-32 on other platforms) encoded array to :ref:`String`. Returns empty string if source array is not valid wide string. This is the inverse of :ref:`String.to_wchar_buffer`. +Converts wide character (``wchar_t``, UTF-16 on Windows, UTF-32 on other platforms) encoded array to :ref:`String`. Returns empty string if source array is not valid wide string. This is the inverse of :ref:`String.to_wchar_buffer()`. .. rst-class:: classref-item-separator @@ -856,7 +856,7 @@ Removes an element from the array by index. :ref:`int` **resize**\ (\ new_size\: :ref:`int`\ ) :ref:`πŸ”—` -Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize` once and assigning the new values is faster than adding new elements one by one. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize()` once and assigning the new values is faster than adding new elements one by one. .. rst-class:: classref-item-separator @@ -1025,7 +1025,7 @@ Returns ``true`` if contents of the arrays differ. :ref:`PackedByteArray` **operator +**\ (\ right\: :ref:`PackedByteArray`\ ) :ref:`πŸ”—` -Returns a new **PackedByteArray** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. +Returns a new **PackedByteArray** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array()` instead. .. rst-class:: classref-item-separator diff --git a/classes/class_packedcolorarray.rst b/classes/class_packedcolorarray.rst index f92ee2d44..58b78c991 100644 --- a/classes/class_packedcolorarray.rst +++ b/classes/class_packedcolorarray.rst @@ -19,9 +19,9 @@ 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. +\ **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:** 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:: @@ -173,7 +173,7 @@ Method Descriptions :ref:`bool` **append**\ (\ value\: :ref:`Color`\ ) :ref:`πŸ”—` -Appends an element at the end of the array (alias of :ref:`push_back`). +Appends an element at the end of the array (alias of :ref:`push_back()`). .. rst-class:: classref-item-separator @@ -199,7 +199,7 @@ Appends a **PackedColorArray** at the end of this array. 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. -\ **Note:** Calling :ref:`bsearch` on an unsorted array results in unexpected behavior. +\ **Note:** Calling :ref:`bsearch()` on an unsorted array results in unexpected behavior. .. rst-class:: classref-item-separator @@ -211,7 +211,7 @@ Finds the index of an existing value (or the insertion index that maintains sort |void| **clear**\ (\ ) :ref:`πŸ”—` -Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. +Clears the array. This is equivalent to using :ref:`resize()` with a size of ``0``. .. rst-class:: classref-item-separator @@ -247,7 +247,7 @@ Creates a copy of the array, and returns it. |void| **fill**\ (\ value\: :ref:`Color`\ ) :ref:`πŸ”—` -Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize` to create an array with a given size and initialized elements. +Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize()` to create an array with a given size and initialized elements. .. rst-class:: classref-item-separator @@ -343,7 +343,7 @@ Removes an element from the array by index. :ref:`int` **resize**\ (\ new_size\: :ref:`int`\ ) :ref:`πŸ”—` -Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize` once and assigning the new values is faster than adding new elements one by one. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize()` once and assigning the new values is faster than adding new elements one by one. .. rst-class:: classref-item-separator @@ -460,7 +460,7 @@ Returns ``true`` if contents of the arrays differ. :ref:`PackedColorArray` **operator +**\ (\ right\: :ref:`PackedColorArray`\ ) :ref:`πŸ”—` -Returns a new **PackedColorArray** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. +Returns a new **PackedColorArray** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array()` instead. .. rst-class:: classref-item-separator diff --git a/classes/class_packeddatacontainer.rst b/classes/class_packeddatacontainer.rst index da8c98124..f46edd08f 100644 --- a/classes/class_packeddatacontainer.rst +++ b/classes/class_packeddatacontainer.rst @@ -89,7 +89,7 @@ Packs the given container into a binary representation. The ``value`` must be ei :ref:`int` **size**\ (\ ) |const| :ref:`πŸ”—` -Returns the size of the packed container (see :ref:`Array.size` and :ref:`Dictionary.size`). +Returns the size of the packed container (see :ref:`Array.size()` and :ref:`Dictionary.size()`). .. |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_packeddatacontainerref.rst b/classes/class_packeddatacontainerref.rst index 2820ec236..3a88abae3 100644 --- a/classes/class_packeddatacontainerref.rst +++ b/classes/class_packeddatacontainerref.rst @@ -73,7 +73,7 @@ Method Descriptions :ref:`int` **size**\ (\ ) |const| :ref:`πŸ”—` -Returns the size of the packed container (see :ref:`Array.size` and :ref:`Dictionary.size`). +Returns the size of the packed container (see :ref:`Array.size()` and :ref:`Dictionary.size()`). .. |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_packedfloat32array.rst b/classes/class_packedfloat32array.rst index ce0c2e737..8d107ebb6 100644 --- a/classes/class_packedfloat32array.rst +++ b/classes/class_packedfloat32array.rst @@ -21,7 +21,7 @@ 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:** 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:: @@ -167,7 +167,7 @@ Method Descriptions :ref:`bool` **append**\ (\ value\: :ref:`float`\ ) :ref:`πŸ”—` -Appends an element at the end of the array (alias of :ref:`push_back`). +Appends an element at the end of the array (alias of :ref:`push_back()`). .. rst-class:: classref-item-separator @@ -193,7 +193,7 @@ Appends a **PackedFloat32Array** at the end of this array. 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. -\ **Note:** Calling :ref:`bsearch` on an unsorted array results in unexpected behavior. +\ **Note:** Calling :ref:`bsearch()` on an unsorted array results in unexpected behavior. \ **Note:** :ref:`@GDScript.NAN` doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included. @@ -207,7 +207,7 @@ Finds the index of an existing value (or the insertion index that maintains sort |void| **clear**\ (\ ) :ref:`πŸ”—` -Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. +Clears the array. This is equivalent to using :ref:`resize()` with a size of ``0``. .. rst-class:: classref-item-separator @@ -245,7 +245,7 @@ Creates a copy of the array, and returns it. |void| **fill**\ (\ value\: :ref:`float`\ ) :ref:`πŸ”—` -Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize` to create an array with a given size and initialized elements. +Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize()` to create an array with a given size and initialized elements. .. rst-class:: classref-item-separator @@ -345,7 +345,7 @@ Removes an element from the array by index. :ref:`int` **resize**\ (\ new_size\: :ref:`int`\ ) :ref:`πŸ”—` -Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize` once and assigning the new values is faster than adding new elements one by one. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize()` once and assigning the new values is faster than adding new elements one by one. .. rst-class:: classref-item-separator @@ -468,7 +468,7 @@ Returns ``true`` if contents of the arrays differ. :ref:`PackedFloat32Array` **operator +**\ (\ right\: :ref:`PackedFloat32Array`\ ) :ref:`πŸ”—` -Returns a new **PackedFloat32Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. +Returns a new **PackedFloat32Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array()` instead. .. rst-class:: classref-item-separator diff --git a/classes/class_packedfloat64array.rst b/classes/class_packedfloat64array.rst index d2a94c2f9..749ef0852 100644 --- a/classes/class_packedfloat64array.rst +++ b/classes/class_packedfloat64array.rst @@ -21,9 +21,9 @@ 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. +\ **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:** 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:: @@ -169,7 +169,7 @@ Method Descriptions :ref:`bool` **append**\ (\ value\: :ref:`float`\ ) :ref:`πŸ”—` -Appends an element at the end of the array (alias of :ref:`push_back`). +Appends an element at the end of the array (alias of :ref:`push_back()`). .. rst-class:: classref-item-separator @@ -195,7 +195,7 @@ Appends a **PackedFloat64Array** at the end of this array. 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. -\ **Note:** Calling :ref:`bsearch` on an unsorted array results in unexpected behavior. +\ **Note:** Calling :ref:`bsearch()` on an unsorted array results in unexpected behavior. \ **Note:** :ref:`@GDScript.NAN` doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included. @@ -209,7 +209,7 @@ Finds the index of an existing value (or the insertion index that maintains sort |void| **clear**\ (\ ) :ref:`πŸ”—` -Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. +Clears the array. This is equivalent to using :ref:`resize()` with a size of ``0``. .. rst-class:: classref-item-separator @@ -247,7 +247,7 @@ Creates a copy of the array, and returns it. |void| **fill**\ (\ value\: :ref:`float`\ ) :ref:`πŸ”—` -Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize` to create an array with a given size and initialized elements. +Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize()` to create an array with a given size and initialized elements. .. rst-class:: classref-item-separator @@ -347,7 +347,7 @@ Removes an element from the array by index. :ref:`int` **resize**\ (\ new_size\: :ref:`int`\ ) :ref:`πŸ”—` -Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize` once and assigning the new values is faster than adding new elements one by one. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize()` once and assigning the new values is faster than adding new elements one by one. .. rst-class:: classref-item-separator @@ -470,7 +470,7 @@ Returns ``true`` if contents of the arrays differ. :ref:`PackedFloat64Array` **operator +**\ (\ right\: :ref:`PackedFloat64Array`\ ) :ref:`πŸ”—` -Returns a new **PackedFloat64Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. +Returns a new **PackedFloat64Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array()` instead. .. rst-class:: classref-item-separator diff --git a/classes/class_packedint32array.rst b/classes/class_packedint32array.rst index 216d83a71..d44049d27 100644 --- a/classes/class_packedint32array.rst +++ b/classes/class_packedint32array.rst @@ -21,7 +21,7 @@ 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:** 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:: @@ -167,7 +167,7 @@ Method Descriptions :ref:`bool` **append**\ (\ value\: :ref:`int`\ ) :ref:`πŸ”—` -Appends an element at the end of the array (alias of :ref:`push_back`). +Appends an element at the end of the array (alias of :ref:`push_back()`). .. rst-class:: classref-item-separator @@ -193,7 +193,7 @@ Appends a **PackedInt32Array** at the end of this array. 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. -\ **Note:** Calling :ref:`bsearch` on an unsorted array results in unexpected behavior. +\ **Note:** Calling :ref:`bsearch()` on an unsorted array results in unexpected behavior. .. rst-class:: classref-item-separator @@ -205,7 +205,7 @@ Finds the index of an existing value (or the insertion index that maintains sort |void| **clear**\ (\ ) :ref:`πŸ”—` -Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. +Clears the array. This is equivalent to using :ref:`resize()` with a size of ``0``. .. rst-class:: classref-item-separator @@ -241,7 +241,7 @@ Creates a copy of the array, and returns it. |void| **fill**\ (\ value\: :ref:`int`\ ) :ref:`πŸ”—` -Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize` to create an array with a given size and initialized elements. +Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize()` to create an array with a given size and initialized elements. .. rst-class:: classref-item-separator @@ -337,7 +337,7 @@ Removes an element from the array by index. :ref:`int` **resize**\ (\ new_size\: :ref:`int`\ ) :ref:`πŸ”—` -Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize` once and assigning the new values is faster than adding new elements one by one. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize()` once and assigning the new values is faster than adding new elements one by one. .. rst-class:: classref-item-separator @@ -456,7 +456,7 @@ Returns ``true`` if contents of the arrays differ. :ref:`PackedInt32Array` **operator +**\ (\ right\: :ref:`PackedInt32Array`\ ) :ref:`πŸ”—` -Returns a new **PackedInt32Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. +Returns a new **PackedInt32Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array()` instead. .. rst-class:: classref-item-separator diff --git a/classes/class_packedint64array.rst b/classes/class_packedint64array.rst index 6ac5882d2..e99896080 100644 --- a/classes/class_packedint64array.rst +++ b/classes/class_packedint64array.rst @@ -21,9 +21,9 @@ 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. **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:`Array.map`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. +\ **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. **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:`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:** 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:: @@ -169,7 +169,7 @@ Method Descriptions :ref:`bool` **append**\ (\ value\: :ref:`int`\ ) :ref:`πŸ”—` -Appends an element at the end of the array (alias of :ref:`push_back`). +Appends an element at the end of the array (alias of :ref:`push_back()`). .. rst-class:: classref-item-separator @@ -195,7 +195,7 @@ Appends a **PackedInt64Array** at the end of this array. 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. -\ **Note:** Calling :ref:`bsearch` on an unsorted array results in unexpected behavior. +\ **Note:** Calling :ref:`bsearch()` on an unsorted array results in unexpected behavior. .. rst-class:: classref-item-separator @@ -207,7 +207,7 @@ Finds the index of an existing value (or the insertion index that maintains sort |void| **clear**\ (\ ) :ref:`πŸ”—` -Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. +Clears the array. This is equivalent to using :ref:`resize()` with a size of ``0``. .. rst-class:: classref-item-separator @@ -243,7 +243,7 @@ Creates a copy of the array, and returns it. |void| **fill**\ (\ value\: :ref:`int`\ ) :ref:`πŸ”—` -Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize` to create an array with a given size and initialized elements. +Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize()` to create an array with a given size and initialized elements. .. rst-class:: classref-item-separator @@ -339,7 +339,7 @@ Removes an element from the array by index. :ref:`int` **resize**\ (\ new_size\: :ref:`int`\ ) :ref:`πŸ”—` -Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize` once and assigning the new values is faster than adding new elements one by one. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize()` once and assigning the new values is faster than adding new elements one by one. .. rst-class:: classref-item-separator @@ -458,7 +458,7 @@ Returns ``true`` if contents of the arrays differ. :ref:`PackedInt64Array` **operator +**\ (\ right\: :ref:`PackedInt64Array`\ ) :ref:`πŸ”—` -Returns a new **PackedInt64Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. +Returns a new **PackedInt64Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array()` instead. .. rst-class:: classref-item-separator diff --git a/classes/class_packedscene.rst b/classes/class_packedscene.rst index c0375a0d2..0346718a2 100644 --- a/classes/class_packedscene.rst +++ b/classes/class_packedscene.rst @@ -46,7 +46,7 @@ Can be used to save a node to a file. When saving, the node as well as all the n -\ **Example:** Save a node with different owners. The following example creates 3 objects: :ref:`Node2D` (``node``), :ref:`RigidBody2D` (``body``) and :ref:`CollisionObject2D` (``collision``). ``collision`` is a child of ``body`` which is a child of ``node``. Only ``body`` is owned by ``node`` and :ref:`pack` will therefore only save those two nodes, but not ``collision``. +\ **Example:** Save a node with different owners. The following example creates 3 objects: :ref:`Node2D` (``node``), :ref:`RigidBody2D` (``body``) and :ref:`CollisionObject2D` (``collision``). ``collision`` is a child of ``body`` which is a child of ``node``. Only ``body`` is owned by ``node`` and :ref:`pack()` will therefore only save those two nodes, but not ``collision``. .. tabs:: @@ -147,7 +147,7 @@ enum **GenEditState**: :ref:`πŸ”—` :ref:`GenEditState` **GEN_EDIT_STATE_DISABLED** = ``0`` -If passed to :ref:`instantiate`, blocks edits to the scene state. +If passed to :ref:`instantiate()`, blocks edits to the scene state. .. _class_PackedScene_constant_GEN_EDIT_STATE_INSTANCE: @@ -155,7 +155,7 @@ If passed to :ref:`instantiate`, blocks ed :ref:`GenEditState` **GEN_EDIT_STATE_INSTANCE** = ``1`` -If passed to :ref:`instantiate`, provides local scene resources to the local scene. +If passed to :ref:`instantiate()`, provides local scene resources to the local scene. \ **Note:** Only available in editor builds. @@ -165,7 +165,7 @@ If passed to :ref:`instantiate`, provides :ref:`GenEditState` **GEN_EDIT_STATE_MAIN** = ``2`` -If passed to :ref:`instantiate`, provides local scene resources to the local scene. Only the main scene should receive the main edit state. +If passed to :ref:`instantiate()`, provides local scene resources to the local scene. Only the main scene should receive the main edit state. \ **Note:** Only available in editor builds. diff --git a/classes/class_packedstringarray.rst b/classes/class_packedstringarray.rst index 0be840d7f..8903963da 100644 --- a/classes/class_packedstringarray.rst +++ b/classes/class_packedstringarray.rst @@ -19,7 +19,7 @@ Description An array specifically designed to hold :ref:`String`\ s. Packs data tightly, so it saves memory for large array sizes. -If you want to join the strings in the array, use :ref:`String.join`. +If you want to join the strings in the array, use :ref:`String.join()`. :: @@ -27,9 +27,9 @@ 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. +\ **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. **PackedStringArray** versus ``Array[String]``). 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:** 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:: @@ -182,7 +182,7 @@ Method Descriptions :ref:`bool` **append**\ (\ value\: :ref:`String`\ ) :ref:`πŸ”—` -Appends an element at the end of the array (alias of :ref:`push_back`). +Appends an element at the end of the array (alias of :ref:`push_back()`). .. rst-class:: classref-item-separator @@ -208,7 +208,7 @@ Appends a **PackedStringArray** at the end of this array. 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. -\ **Note:** Calling :ref:`bsearch` on an unsorted array results in unexpected behavior. +\ **Note:** Calling :ref:`bsearch()` on an unsorted array results in unexpected behavior. .. rst-class:: classref-item-separator @@ -220,7 +220,7 @@ Finds the index of an existing value (or the insertion index that maintains sort |void| **clear**\ (\ ) :ref:`πŸ”—` -Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. +Clears the array. This is equivalent to using :ref:`resize()` with a size of ``0``. .. rst-class:: classref-item-separator @@ -256,7 +256,7 @@ Creates a copy of the array, and returns it. |void| **fill**\ (\ value\: :ref:`String`\ ) :ref:`πŸ”—` -Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize` to create an array with a given size and initialized elements. +Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize()` to create an array with a given size and initialized elements. .. rst-class:: classref-item-separator @@ -352,7 +352,7 @@ Removes an element from the array by index. :ref:`int` **resize**\ (\ new_size\: :ref:`int`\ ) :ref:`πŸ”—` -Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize` once and assigning the new values is faster than adding new elements one by one. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize()` once and assigning the new values is faster than adding new elements one by one. .. rst-class:: classref-item-separator @@ -469,7 +469,7 @@ Returns ``true`` if contents of the arrays differ. :ref:`PackedStringArray` **operator +**\ (\ right\: :ref:`PackedStringArray`\ ) :ref:`πŸ”—` -Returns a new **PackedStringArray** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. +Returns a new **PackedStringArray** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array()` instead. .. rst-class:: classref-item-separator diff --git a/classes/class_packedvector2array.rst b/classes/class_packedvector2array.rst index d9c5ea19f..fabd1a9c7 100644 --- a/classes/class_packedvector2array.rst +++ b/classes/class_packedvector2array.rst @@ -19,9 +19,9 @@ 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. **PackedVector2Array** 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. +\ **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. **PackedVector2Array** 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:** 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:: @@ -182,7 +182,7 @@ Method Descriptions :ref:`bool` **append**\ (\ value\: :ref:`Vector2`\ ) :ref:`πŸ”—` -Appends an element at the end of the array (alias of :ref:`push_back`). +Appends an element at the end of the array (alias of :ref:`push_back()`). .. rst-class:: classref-item-separator @@ -208,7 +208,7 @@ Appends a **PackedVector2Array** at the end of this array. 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. -\ **Note:** Calling :ref:`bsearch` on an unsorted array results in unexpected behavior. +\ **Note:** Calling :ref:`bsearch()` on an unsorted array results in unexpected behavior. \ **Note:** Vectors with :ref:`@GDScript.NAN` elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included. @@ -222,7 +222,7 @@ Finds the index of an existing value (or the insertion index that maintains sort |void| **clear**\ (\ ) :ref:`πŸ”—` -Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. +Clears the array. This is equivalent to using :ref:`resize()` with a size of ``0``. .. rst-class:: classref-item-separator @@ -260,7 +260,7 @@ Creates a copy of the array, and returns it. |void| **fill**\ (\ value\: :ref:`Vector2`\ ) :ref:`πŸ”—` -Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize` to create an array with a given size and initialized elements. +Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize()` to create an array with a given size and initialized elements. .. rst-class:: classref-item-separator @@ -360,7 +360,7 @@ Removes an element from the array by index. :ref:`int` **resize**\ (\ new_size\: :ref:`int`\ ) :ref:`πŸ”—` -Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize` once and assigning the new values is faster than adding new elements one by one. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize()` once and assigning the new values is faster than adding new elements one by one. .. rst-class:: classref-item-separator @@ -483,9 +483,9 @@ Returns ``true`` if contents of the arrays differ. Returns a new **PackedVector2Array** with all vectors in this array inversely transformed (multiplied) by the given :ref:`Transform2D` transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). -\ ``array * transform`` is equivalent to ``transform.inverse() * array``. See :ref:`Transform2D.inverse`. +\ ``array * transform`` is equivalent to ``transform.inverse() * array``. See :ref:`Transform2D.inverse()`. -For transforming by inverse of an affine transformation (e.g. with scaling) ``transform.affine_inverse() * array`` can be used instead. See :ref:`Transform2D.affine_inverse`. +For transforming by inverse of an affine transformation (e.g. with scaling) ``transform.affine_inverse() * array`` can be used instead. See :ref:`Transform2D.affine_inverse()`. .. rst-class:: classref-item-separator @@ -497,7 +497,7 @@ For transforming by inverse of an affine transformation (e.g. with scaling) ``tr :ref:`PackedVector2Array` **operator +**\ (\ right\: :ref:`PackedVector2Array`\ ) :ref:`πŸ”—` -Returns a new **PackedVector2Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. +Returns a new **PackedVector2Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array()` instead. .. rst-class:: classref-item-separator diff --git a/classes/class_packedvector3array.rst b/classes/class_packedvector3array.rst index a706938f4..f8cda061e 100644 --- a/classes/class_packedvector3array.rst +++ b/classes/class_packedvector3array.rst @@ -19,9 +19,9 @@ 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. +\ **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:** 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:: @@ -175,7 +175,7 @@ Method Descriptions :ref:`bool` **append**\ (\ value\: :ref:`Vector3`\ ) :ref:`πŸ”—` -Appends an element at the end of the array (alias of :ref:`push_back`). +Appends an element at the end of the array (alias of :ref:`push_back()`). .. rst-class:: classref-item-separator @@ -201,7 +201,7 @@ Appends a **PackedVector3Array** at the end of this array. 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. -\ **Note:** Calling :ref:`bsearch` on an unsorted array results in unexpected behavior. +\ **Note:** Calling :ref:`bsearch()` on an unsorted array results in unexpected behavior. \ **Note:** Vectors with :ref:`@GDScript.NAN` elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included. @@ -215,7 +215,7 @@ Finds the index of an existing value (or the insertion index that maintains sort |void| **clear**\ (\ ) :ref:`πŸ”—` -Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. +Clears the array. This is equivalent to using :ref:`resize()` with a size of ``0``. .. rst-class:: classref-item-separator @@ -253,7 +253,7 @@ Creates a copy of the array, and returns it. |void| **fill**\ (\ value\: :ref:`Vector3`\ ) :ref:`πŸ”—` -Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize` to create an array with a given size and initialized elements. +Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize()` to create an array with a given size and initialized elements. .. rst-class:: classref-item-separator @@ -353,7 +353,7 @@ Removes an element from the array by index. :ref:`int` **resize**\ (\ new_size\: :ref:`int`\ ) :ref:`πŸ”—` -Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize` once and assigning the new values is faster than adding new elements one by one. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize()` once and assigning the new values is faster than adding new elements one by one. .. rst-class:: classref-item-separator @@ -476,9 +476,9 @@ Returns ``true`` if contents of the arrays differ. Returns a new **PackedVector3Array** with all vectors in this array inversely transformed (multiplied) by the given :ref:`Transform3D` transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). -\ ``array * transform`` is equivalent to ``transform.inverse() * array``. See :ref:`Transform3D.inverse`. +\ ``array * transform`` is equivalent to ``transform.inverse() * array``. See :ref:`Transform3D.inverse()`. -For transforming by inverse of an affine transformation (e.g. with scaling) ``transform.affine_inverse() * array`` can be used instead. See :ref:`Transform3D.affine_inverse`. +For transforming by inverse of an affine transformation (e.g. with scaling) ``transform.affine_inverse() * array`` can be used instead. See :ref:`Transform3D.affine_inverse()`. .. rst-class:: classref-item-separator @@ -490,7 +490,7 @@ For transforming by inverse of an affine transformation (e.g. with scaling) ``tr :ref:`PackedVector3Array` **operator +**\ (\ right\: :ref:`PackedVector3Array`\ ) :ref:`πŸ”—` -Returns a new **PackedVector3Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. +Returns a new **PackedVector3Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array()` instead. .. rst-class:: classref-item-separator diff --git a/classes/class_packedvector4array.rst b/classes/class_packedvector4array.rst index 4d9b87f9b..eefec7bba 100644 --- a/classes/class_packedvector4array.rst +++ b/classes/class_packedvector4array.rst @@ -19,9 +19,9 @@ Description An array specifically designed to hold :ref:`Vector4`. 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. **PackedVector4Array** versus ``Array[Vector4]``). 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. +\ **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. **PackedVector4Array** versus ``Array[Vector4]``). 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:** 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:: @@ -173,7 +173,7 @@ Method Descriptions :ref:`bool` **append**\ (\ value\: :ref:`Vector4`\ ) :ref:`πŸ”—` -Appends an element at the end of the array (alias of :ref:`push_back`). +Appends an element at the end of the array (alias of :ref:`push_back()`). .. rst-class:: classref-item-separator @@ -199,7 +199,7 @@ Appends a **PackedVector4Array** at the end of this array. 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. -\ **Note:** Calling :ref:`bsearch` on an unsorted array results in unexpected behavior. +\ **Note:** Calling :ref:`bsearch()` on an unsorted array results in unexpected behavior. \ **Note:** Vectors with :ref:`@GDScript.NAN` elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included. @@ -213,7 +213,7 @@ Finds the index of an existing value (or the insertion index that maintains sort |void| **clear**\ (\ ) :ref:`πŸ”—` -Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. +Clears the array. This is equivalent to using :ref:`resize()` with a size of ``0``. .. rst-class:: classref-item-separator @@ -251,7 +251,7 @@ Creates a copy of the array, and returns it. |void| **fill**\ (\ value\: :ref:`Vector4`\ ) :ref:`πŸ”—` -Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize` to create an array with a given size and initialized elements. +Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize()` to create an array with a given size and initialized elements. .. rst-class:: classref-item-separator @@ -472,7 +472,7 @@ Returns ``true`` if contents of the arrays differ. :ref:`PackedVector4Array` **operator +**\ (\ right\: :ref:`PackedVector4Array`\ ) :ref:`πŸ”—` -Returns a new **PackedVector4Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. +Returns a new **PackedVector4Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array()` instead. .. rst-class:: classref-item-separator diff --git a/classes/class_packetpeer.rst b/classes/class_packetpeer.rst index 88180b22a..3988fe90e 100644 --- a/classes/class_packetpeer.rst +++ b/classes/class_packetpeer.rst @@ -81,7 +81,7 @@ Property Descriptions Maximum buffer size allowed when encoding :ref:`Variant`\ s. Raise this value to support heavier memory allocations. -The :ref:`put_var` method allocates memory on the stack, and the buffer used will grow automatically to the closest power of two to match the size of the :ref:`Variant`. If the :ref:`Variant` is bigger than :ref:`encode_buffer_max_size`, the method will error out with :ref:`@GlobalScope.ERR_OUT_OF_MEMORY`. +The :ref:`put_var()` method allocates memory on the stack, and the buffer used will grow automatically to the closest power of two to match the size of the :ref:`Variant`. If the :ref:`Variant` is bigger than :ref:`encode_buffer_max_size`, the method will error out with :ref:`@GlobalScope.ERR_OUT_OF_MEMORY`. .. rst-class:: classref-section-separator @@ -122,7 +122,7 @@ Gets a raw packet. :ref:`Error` **get_packet_error**\ (\ ) |const| :ref:`πŸ”—` -Returns the error state of the last packet received (via :ref:`get_packet` and :ref:`get_var`). +Returns the error state of the last packet received (via :ref:`get_packet()` and :ref:`get_var()`). .. rst-class:: classref-item-separator @@ -136,7 +136,7 @@ Returns the error state of the last packet received (via :ref:`get_packet` method. +Internally, this uses the same decoding mechanism as the :ref:`@GlobalScope.bytes_to_var()` method. \ **Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. @@ -164,7 +164,7 @@ Sends a raw packet. Sends a :ref:`Variant` as a packet. If ``full_objects`` is ``true``, encoding objects is allowed (and can potentially include code). -Internally, this uses the same encoding mechanism as the :ref:`@GlobalScope.var_to_bytes` method. +Internally, this uses the same encoding mechanism as the :ref:`@GlobalScope.var_to_bytes()` method. .. |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_packetpeerdtls.rst b/classes/class_packetpeerdtls.rst index 8d5775e60..3bf3c8972 100644 --- a/classes/class_packetpeerdtls.rst +++ b/classes/class_packetpeerdtls.rst @@ -19,7 +19,7 @@ DTLS packet peer. Description ----------- -This class represents a DTLS peer connection. It can be used to connect to a DTLS server, and is returned by :ref:`DTLSServer.take_connection`. +This class represents a DTLS peer connection. It can be used to connect to a DTLS server, and is returned by :ref:`DTLSServer.take_connection()`. \ **Note:** When exporting to Android, make sure to enable the ``INTERNET`` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. @@ -113,7 +113,7 @@ Method Descriptions :ref:`Error` **connect_to_peer**\ (\ packet_peer\: :ref:`PacketPeerUDP`, hostname\: :ref:`String`, client_options\: :ref:`TLSOptions` = null\ ) :ref:`πŸ”—` -Connects a ``packet_peer`` beginning the DTLS handshake using the underlying :ref:`PacketPeerUDP` which must be connected (see :ref:`PacketPeerUDP.connect_to_host`). You can optionally specify the ``client_options`` to be used while verifying the TLS connections. See :ref:`TLSOptions.client` and :ref:`TLSOptions.client_unsafe`. +Connects a ``packet_peer`` beginning the DTLS handshake using the underlying :ref:`PacketPeerUDP` which must be connected (see :ref:`PacketPeerUDP.connect_to_host()`). You can optionally specify the ``client_options`` to be used while verifying the TLS connections. See :ref:`TLSOptions.client()` and :ref:`TLSOptions.client_unsafe()`. .. rst-class:: classref-item-separator diff --git a/classes/class_packetpeerudp.rst b/classes/class_packetpeerudp.rst index 30e74edd5..b2bd3f4d5 100644 --- a/classes/class_packetpeerudp.rst +++ b/classes/class_packetpeerudp.rst @@ -133,7 +133,7 @@ Closes the **PacketPeerUDP**'s underlying UDP socket. :ref:`Error` **connect_to_host**\ (\ host\: :ref:`String`, port\: :ref:`int`\ ) :ref:`πŸ”—` -Calling this method connects this UDP peer to the given ``host``/``port`` pair. UDP is in reality connectionless, so this option only means that incoming packets from different addresses are automatically discarded, and that outgoing packets are always sent to the connected address (future calls to :ref:`set_dest_address` are not allowed). This method does not send any data to the remote peer, to do that, use :ref:`PacketPeer.put_var` or :ref:`PacketPeer.put_packet` as usual. See also :ref:`UDPServer`. +Calling this method connects this UDP peer to the given ``host``/``port`` pair. UDP is in reality connectionless, so this option only means that incoming packets from different addresses are automatically discarded, and that outgoing packets are always sent to the connected address (future calls to :ref:`set_dest_address()` are not allowed). This method does not send any data to the remote peer, to do that, use :ref:`PacketPeer.put_var()` or :ref:`PacketPeer.put_packet()` as usual. See also :ref:`UDPServer`. \ **Note:** Connecting to the remote peer does not help to protect from malicious attacks like IP spoofing, etc. Think about using an encryption technique like TLS or DTLS if you feel like your application is transferring sensitive information. @@ -159,7 +159,7 @@ Returns the local port to which this peer is bound. :ref:`String` **get_packet_ip**\ (\ ) |const| :ref:`πŸ”—` -Returns the IP of the remote peer that sent the last packet(that was received with :ref:`PacketPeer.get_packet` or :ref:`PacketPeer.get_var`). +Returns the IP of the remote peer that sent the last packet(that was received with :ref:`PacketPeer.get_packet()` or :ref:`PacketPeer.get_var()`). .. rst-class:: classref-item-separator @@ -171,7 +171,7 @@ Returns the IP of the remote peer that sent the last packet(that was received wi :ref:`int` **get_packet_port**\ (\ ) |const| :ref:`πŸ”—` -Returns the port of the remote peer that sent the last packet(that was received with :ref:`PacketPeer.get_packet` or :ref:`PacketPeer.get_var`). +Returns the port of the remote peer that sent the last packet(that was received with :ref:`PacketPeer.get_packet()` or :ref:`PacketPeer.get_var()`). .. rst-class:: classref-item-separator @@ -195,7 +195,7 @@ Returns whether this **PacketPeerUDP** is bound to an address and can receive pa :ref:`bool` **is_socket_connected**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the UDP socket is open and has been connected to a remote address. See :ref:`connect_to_host`. +Returns ``true`` if the UDP socket is open and has been connected to a remote address. See :ref:`connect_to_host()`. .. rst-class:: classref-item-separator @@ -209,7 +209,7 @@ Returns ``true`` if the UDP socket is open and has been connected to a remote ad Joins the multicast group specified by ``multicast_address`` using the interface identified by ``interface_name``. -You can join the same multicast group with multiple interfaces. Use :ref:`IP.get_local_interfaces` to know which are available. +You can join the same multicast group with multiple interfaces. Use :ref:`IP.get_local_interfaces()` to know which are available. \ **Note:** Some Android devices might require the ``CHANGE_WIFI_MULTICAST_STATE`` permission for multicast to work. @@ -251,7 +251,7 @@ Enable or disable sending of broadcast packets (e.g. ``set_dest_address("255.255 Sets the destination address and port for sending packets and variables. A hostname will be resolved using DNS if needed. -\ **Note:** :ref:`set_broadcast_enabled` must be enabled before sending packets to a broadcast address (e.g. ``255.255.255.255``). +\ **Note:** :ref:`set_broadcast_enabled()` must be enabled before sending packets to a broadcast address (e.g. ``255.255.255.255``). .. rst-class:: classref-item-separator @@ -263,9 +263,9 @@ Sets the destination address and port for sending packets and variables. A hostn :ref:`Error` **wait**\ (\ ) :ref:`πŸ”—` -Waits for a packet to arrive on the bound address. See :ref:`bind`. +Waits for a packet to arrive on the bound address. See :ref:`bind()`. -\ **Note:** :ref:`wait` can't be interrupted once it has been called. This can be worked around by allowing the other party to send a specific "death pill" packet like this: +\ **Note:** :ref:`wait()` can't be interrupted once it has been called. This can be worked around by allowing the other party to send a specific "death pill" packet like this: .. tabs:: diff --git a/classes/class_particleprocessmaterial.rst b/classes/class_particleprocessmaterial.rst index 6cda7a2b5..58c48fdf2 100644 --- a/classes/class_particleprocessmaterial.rst +++ b/classes/class_particleprocessmaterial.rst @@ -293,7 +293,7 @@ enum **Parameter**: :ref:`πŸ”—` :ref:`Parameter` **PARAM_INITIAL_LINEAR_VELOCITY** = ``0`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set initial velocity properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_texture()` to set initial velocity properties. .. _class_ParticleProcessMaterial_constant_PARAM_ANGULAR_VELOCITY: @@ -301,7 +301,7 @@ Use with :ref:`set_param_min :ref:`Parameter` **PARAM_ANGULAR_VELOCITY** = ``1`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set angular velocity properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_texture()` to set angular velocity properties. .. _class_ParticleProcessMaterial_constant_PARAM_ORBIT_VELOCITY: @@ -309,7 +309,7 @@ Use with :ref:`set_param_min :ref:`Parameter` **PARAM_ORBIT_VELOCITY** = ``2`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set orbital velocity properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_texture()` to set orbital velocity properties. .. _class_ParticleProcessMaterial_constant_PARAM_LINEAR_ACCEL: @@ -317,7 +317,7 @@ Use with :ref:`set_param_min :ref:`Parameter` **PARAM_LINEAR_ACCEL** = ``3`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set linear acceleration properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_texture()` to set linear acceleration properties. .. _class_ParticleProcessMaterial_constant_PARAM_RADIAL_ACCEL: @@ -325,7 +325,7 @@ Use with :ref:`set_param_min :ref:`Parameter` **PARAM_RADIAL_ACCEL** = ``4`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set radial acceleration properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_texture()` to set radial acceleration properties. .. _class_ParticleProcessMaterial_constant_PARAM_TANGENTIAL_ACCEL: @@ -333,7 +333,7 @@ Use with :ref:`set_param_min :ref:`Parameter` **PARAM_TANGENTIAL_ACCEL** = ``5`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set tangential acceleration properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_texture()` to set tangential acceleration properties. .. _class_ParticleProcessMaterial_constant_PARAM_DAMPING: @@ -341,7 +341,7 @@ Use with :ref:`set_param_min :ref:`Parameter` **PARAM_DAMPING** = ``6`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set damping properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_texture()` to set damping properties. .. _class_ParticleProcessMaterial_constant_PARAM_ANGLE: @@ -349,7 +349,7 @@ Use with :ref:`set_param_min :ref:`Parameter` **PARAM_ANGLE** = ``7`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set angle properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_texture()` to set angle properties. .. _class_ParticleProcessMaterial_constant_PARAM_SCALE: @@ -357,7 +357,7 @@ Use with :ref:`set_param_min :ref:`Parameter` **PARAM_SCALE** = ``8`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set scale properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_texture()` to set scale properties. .. _class_ParticleProcessMaterial_constant_PARAM_HUE_VARIATION: @@ -365,7 +365,7 @@ Use with :ref:`set_param_min :ref:`Parameter` **PARAM_HUE_VARIATION** = ``9`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set hue variation properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_texture()` to set hue variation properties. .. _class_ParticleProcessMaterial_constant_PARAM_ANIM_SPEED: @@ -373,7 +373,7 @@ Use with :ref:`set_param_min :ref:`Parameter` **PARAM_ANIM_SPEED** = ``10`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set animation speed properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_texture()` to set animation speed properties. .. _class_ParticleProcessMaterial_constant_PARAM_ANIM_OFFSET: @@ -381,7 +381,7 @@ Use with :ref:`set_param_min :ref:`Parameter` **PARAM_ANIM_OFFSET** = ``11`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set animation offset properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_texture()` to set animation offset properties. .. _class_ParticleProcessMaterial_constant_PARAM_RADIAL_VELOCITY: @@ -389,7 +389,7 @@ Use with :ref:`set_param_min :ref:`Parameter` **PARAM_RADIAL_VELOCITY** = ``15`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set radial velocity properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_texture()` to set radial velocity properties. .. _class_ParticleProcessMaterial_constant_PARAM_DIRECTIONAL_VELOCITY: @@ -397,7 +397,7 @@ Use with :ref:`set_param_min :ref:`Parameter` **PARAM_DIRECTIONAL_VELOCITY** = ``16`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set directional velocity properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_texture()` to set directional velocity properties. .. _class_ParticleProcessMaterial_constant_PARAM_SCALE_OVER_VELOCITY: @@ -405,7 +405,7 @@ Use with :ref:`set_param_min :ref:`Parameter` **PARAM_SCALE_OVER_VELOCITY** = ``17`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set scale over velocity properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_texture()` to set scale over velocity properties. .. _class_ParticleProcessMaterial_constant_PARAM_MAX: @@ -421,7 +421,7 @@ Represents the size of the :ref:`Parameter` **PARAM_TURB_VEL_INFLUENCE** = ``13`` -Use with :ref:`set_param_min` and :ref:`set_param_max` to set the turbulence minimum und maximum influence on each particles velocity. +Use with :ref:`set_param_min()` and :ref:`set_param_max()` to set the turbulence minimum und maximum influence on each particles velocity. .. _class_ParticleProcessMaterial_constant_PARAM_TURB_INIT_DISPLACEMENT: @@ -429,7 +429,7 @@ Use with :ref:`set_param_min :ref:`Parameter` **PARAM_TURB_INIT_DISPLACEMENT** = ``14`` -Use with :ref:`set_param_min` and :ref:`set_param_max` to set the turbulence minimum and maximum displacement of the particles spawn position. +Use with :ref:`set_param_min()` and :ref:`set_param_max()` to set the turbulence minimum and maximum displacement of the particles spawn position. .. _class_ParticleProcessMaterial_constant_PARAM_TURB_INFLUENCE_OVER_LIFE: @@ -437,7 +437,7 @@ Use with :ref:`set_param_min :ref:`Parameter` **PARAM_TURB_INFLUENCE_OVER_LIFE** = ``12`` -Use with :ref:`set_param_texture` to set the turbulence influence over the particles life time. +Use with :ref:`set_param_texture()` to set the turbulence influence over the particles life time. .. rst-class:: classref-item-separator @@ -455,7 +455,7 @@ enum **ParticleFlags**: :ref:`πŸ”—` :ref:`ParticleFlags` **PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY** = ``0`` -Use with :ref:`set_particle_flag` to set :ref:`particle_flag_align_y`. +Use with :ref:`set_particle_flag()` to set :ref:`particle_flag_align_y`. .. _class_ParticleProcessMaterial_constant_PARTICLE_FLAG_ROTATE_Y: @@ -463,7 +463,7 @@ Use with :ref:`set_particle_flag` **PARTICLE_FLAG_ROTATE_Y** = ``1`` -Use with :ref:`set_particle_flag` to set :ref:`particle_flag_rotate_y`. +Use with :ref:`set_particle_flag()` to set :ref:`particle_flag_rotate_y`. .. _class_ParticleProcessMaterial_constant_PARTICLE_FLAG_DISABLE_Z: @@ -471,7 +471,7 @@ Use with :ref:`set_particle_flag` **PARTICLE_FLAG_DISABLE_Z** = ``2`` -Use with :ref:`set_particle_flag` to set :ref:`particle_flag_disable_z`. +Use with :ref:`set_particle_flag()` to set :ref:`particle_flag_disable_z`. .. _class_ParticleProcessMaterial_constant_PARTICLE_FLAG_DAMPING_AS_FRICTION: diff --git a/classes/class_pckpacker.rst b/classes/class_pckpacker.rst index 0384c0b62..017a06164 100644 --- a/classes/class_pckpacker.rst +++ b/classes/class_pckpacker.rst @@ -19,7 +19,7 @@ Creates packages that can be loaded into a running project. Description ----------- -The **PCKPacker** is used to create packages that can be loaded into a running project using :ref:`ProjectSettings.load_resource_pack`. +The **PCKPacker** is used to create packages that can be loaded into a running project using :ref:`ProjectSettings.load_resource_pack()`. .. tabs:: @@ -101,7 +101,7 @@ Registers a file removal of the ``target_path`` internal path to the PCK. This i :ref:`Error` **flush**\ (\ verbose\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Writes the files specified using all :ref:`add_file` calls since the last flush. If ``verbose`` is ``true``, a list of files added will be printed to the console for easier debugging. +Writes the files specified using all :ref:`add_file()` calls since the last flush. If ``verbose`` is ``true``, a list of files added will be printed to the console for easier debugging. .. rst-class:: classref-item-separator diff --git a/classes/class_performance.rst b/classes/class_performance.rst index 6bf532036..a321e1987 100644 --- a/classes/class_performance.rst +++ b/classes/class_performance.rst @@ -19,9 +19,9 @@ Exposes performance-related data. Description ----------- -This class provides access to a number of different monitors related to performance, such as memory usage, draw calls, and FPS. These are the same as the values displayed in the **Monitor** tab in the editor's **Debugger** panel. By using the :ref:`get_monitor` method of this class, you can access this data from your code. +This class provides access to a number of different monitors related to performance, such as memory usage, draw calls, and FPS. These are the same as the values displayed in the **Monitor** tab in the editor's **Debugger** panel. By using the :ref:`get_monitor()` method of this class, you can access this data from your code. -You can add custom monitors using the :ref:`add_custom_monitor` method. Custom monitors are available in **Monitor** tab in the editor's **Debugger** panel together with built-in monitors. +You can add custom monitors using the :ref:`add_custom_monitor()` method. Custom monitors are available in **Monitor** tab in the editor's **Debugger** panel together with built-in monitors. \ **Note:** Some of the built-in monitors are only available in debug mode and will always return ``0`` when used in a project exported in release mode. @@ -258,7 +258,7 @@ Number of islands in the 3D physics engine. *Lower is better.* :ref:`Monitor` **AUDIO_OUTPUT_LATENCY** = ``23`` -Output latency of the :ref:`AudioServer`. Equivalent to calling :ref:`AudioServer.get_output_latency`, it is not recommended to call this every frame. +Output latency of the :ref:`AudioServer`. Equivalent to calling :ref:`AudioServer.get_output_latency()`, it is not recommended to call this every frame. .. _class_Performance_constant_NAVIGATION_ACTIVE_MAPS: @@ -471,7 +471,7 @@ Callables are called with arguments supplied in argument array. :ref:`Variant` **get_custom_monitor**\ (\ id\: :ref:`StringName`\ ) :ref:`πŸ”—` -Returns the value of custom monitor with given ``id``. The callable is called to get the value of custom monitor. See also :ref:`has_custom_monitor`. Prints an error if the given ``id`` is absent. +Returns the value of custom monitor with given ``id``. The callable is called to get the value of custom monitor. See also :ref:`has_custom_monitor()`. Prints an error if the given ``id`` is absent. .. rst-class:: classref-item-separator @@ -510,7 +510,7 @@ Returns the value of one of the available built-in monitors. You should provide -See :ref:`get_custom_monitor` to query custom performance monitors' values. +See :ref:`get_custom_monitor()` to query custom performance monitors' values. .. rst-class:: classref-item-separator @@ -522,7 +522,7 @@ See :ref:`get_custom_monitor` to qu :ref:`int` **get_monitor_modification_time**\ (\ ) :ref:`πŸ”—` -Returns the last tick in which custom monitor was added/removed (in microseconds since the engine started). This is set to :ref:`Time.get_ticks_usec` when the monitor is updated. +Returns the last tick in which custom monitor was added/removed (in microseconds since the engine started). This is set to :ref:`Time.get_ticks_usec()` when the monitor is updated. .. rst-class:: classref-item-separator diff --git a/classes/class_physicalbone3d.rst b/classes/class_physicalbone3d.rst index d82473637..85deac471 100644 --- a/classes/class_physicalbone3d.rst +++ b/classes/class_physicalbone3d.rst @@ -24,7 +24,7 @@ Description The **PhysicalBone3D** node is a physics body that can be used to make bones in a :ref:`Skeleton3D` react to physics. -\ **Note:** In order to detect physical bones with raycasts, the :ref:`SkeletonModifier3D.active` property of the parent :ref:`PhysicalBoneSimulator3D` must be ``true`` and the :ref:`Skeleton3D`'s bone must be assigned to **PhysicalBone3D** correctly; it means that :ref:`get_bone_id` should return a valid id (``>= 0``). +\ **Note:** In order to detect physical bones with raycasts, the :ref:`SkeletonModifier3D.active` property of the parent :ref:`PhysicalBoneSimulator3D` must be ``true`` and the :ref:`Skeleton3D`'s bone must be assigned to **PhysicalBone3D** correctly; it means that :ref:`get_bone_id()` should return a valid id (``>= 0``). .. rst-class:: classref-reftable-group @@ -305,9 +305,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``, 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. +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. +Setting this property will call the method :ref:`PhysicsServer3D.body_set_omit_force_integration()` internally. .. rst-class:: classref-item-separator @@ -445,7 +445,7 @@ Defines how :ref:`linear_damp` is app - |void| **set_linear_velocity**\ (\ value\: :ref:`Vector3`\ ) - :ref:`Vector3` **get_linear_velocity**\ (\ ) -The body's linear velocity in units per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces` as your process loop for precise control of the body state. +The body's linear velocity in units per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces()` as your process loop for precise control of the body state. .. rst-class:: classref-item-separator @@ -495,7 +495,7 @@ Applies a directional impulse without affecting rotation. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_integrate_forces" functions otherwise). -This is equivalent to using :ref:`apply_impulse` at the body's center of mass. +This is equivalent to using :ref:`apply_impulse()` at the body's center of mass. .. rst-class:: classref-item-separator diff --git a/classes/class_physicsbody2d.rst b/classes/class_physicsbody2d.rst index b9eaef04a..7c8797e87 100644 --- a/classes/class_physicsbody2d.rst +++ b/classes/class_physicsbody2d.rst @@ -115,7 +115,7 @@ Returns the gravity vector computed from all sources that can affect the body, i :ref:`KinematicCollision2D` **move_and_collide**\ (\ motion\: :ref:`Vector2`, test_only\: :ref:`bool` = false, safe_margin\: :ref:`float` = 0.08, recovery_as_collision\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Moves the body along the vector ``motion``. In order to be frame rate independent in :ref:`Node._physics_process` or :ref:`Node._process`, ``motion`` should be computed using ``delta``. +Moves the body along the vector ``motion``. In order to be frame rate independent in :ref:`Node._physics_process()` or :ref:`Node._process()`, ``motion`` should be computed using ``delta``. Returns a :ref:`KinematicCollision2D`, which contains information about the collision when stopped, or when touching another body along the motion. @@ -147,7 +147,7 @@ Removes a body from the list of bodies that this body can't collide with. :ref:`bool` **test_move**\ (\ from\: :ref:`Transform2D`, motion\: :ref:`Vector2`, collision\: :ref:`KinematicCollision2D` = null, safe_margin\: :ref:`float` = 0.08, recovery_as_collision\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Checks for collisions without moving the body. In order to be frame rate independent in :ref:`Node._physics_process` or :ref:`Node._process`, ``motion`` should be computed using ``delta``. +Checks for collisions without moving the body. In order to be frame rate independent in :ref:`Node._physics_process()` or :ref:`Node._process()`, ``motion`` should be computed using ``delta``. Virtually sets the node's position, scale and rotation to that of the given :ref:`Transform2D`, then tries to move the body along the vector ``motion``. Returns ``true`` if a collision would stop the body from moving along the whole path. diff --git a/classes/class_physicsbody3d.rst b/classes/class_physicsbody3d.rst index ba70d0091..4765e206f 100644 --- a/classes/class_physicsbody3d.rst +++ b/classes/class_physicsbody3d.rst @@ -250,7 +250,7 @@ Returns the gravity vector computed from all sources that can affect the body, i :ref:`KinematicCollision3D` **move_and_collide**\ (\ motion\: :ref:`Vector3`, test_only\: :ref:`bool` = false, safe_margin\: :ref:`float` = 0.001, recovery_as_collision\: :ref:`bool` = false, max_collisions\: :ref:`int` = 1\ ) :ref:`πŸ”—` -Moves the body along the vector ``motion``. In order to be frame rate independent in :ref:`Node._physics_process` or :ref:`Node._process`, ``motion`` should be computed using ``delta``. +Moves the body along the vector ``motion``. In order to be frame rate independent in :ref:`Node._physics_process()` or :ref:`Node._process()`, ``motion`` should be computed using ``delta``. The body will stop if it collides. Returns a :ref:`KinematicCollision3D`, which contains information about the collision when stopped, or when touching another body along the motion. @@ -296,7 +296,7 @@ Locks or unlocks the specified linear or rotational ``axis`` depending on the va :ref:`bool` **test_move**\ (\ from\: :ref:`Transform3D`, motion\: :ref:`Vector3`, collision\: :ref:`KinematicCollision3D` = null, safe_margin\: :ref:`float` = 0.001, recovery_as_collision\: :ref:`bool` = false, max_collisions\: :ref:`int` = 1\ ) :ref:`πŸ”—` -Checks for collisions without moving the body. In order to be frame rate independent in :ref:`Node._physics_process` or :ref:`Node._process`, ``motion`` should be computed using ``delta``. +Checks for collisions without moving the body. In order to be frame rate independent in :ref:`Node._physics_process()` or :ref:`Node._process()`, ``motion`` should be computed using ``delta``. Virtually sets the node's position, scale and rotation to that of the given :ref:`Transform3D`, then tries to move the body along the vector ``motion``. Returns ``true`` if a collision would stop the body from moving along the whole path. diff --git a/classes/class_physicsdirectbodystate2d.rst b/classes/class_physicsdirectbodystate2d.rst index c41b3638a..9d52d96d2 100644 --- a/classes/class_physicsdirectbodystate2d.rst +++ b/classes/class_physicsdirectbodystate2d.rst @@ -21,7 +21,7 @@ Provides direct access to a physics body in the :ref:`PhysicsServer2D`, allowing safe changes to physics properties. This object is passed via the direct state callback of :ref:`RigidBody2D`, and is intended for changing the direct state of that body. See :ref:`RigidBody2D._integrate_forces`. +Provides direct access to a physics body in the :ref:`PhysicsServer2D`, allowing safe changes to physics properties. This object is passed via the direct state callback of :ref:`RigidBody2D`, and is intended for changing the direct state of that body. See :ref:`RigidBody2D._integrate_forces()`. .. rst-class:: classref-introduction-group @@ -350,7 +350,7 @@ Method Descriptions Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with ``constant_force = Vector2(0, 0)``. -This is equivalent to using :ref:`add_constant_force` at the body's center of mass. +This is equivalent to using :ref:`add_constant_force()` at the body's center of mass. .. rst-class:: classref-item-separator @@ -390,7 +390,7 @@ Adds a constant rotational force without affecting position that keeps being app Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. -This is equivalent to using :ref:`apply_force` at the body's center of mass. +This is equivalent to using :ref:`apply_force()` at the body's center of mass. .. rst-class:: classref-item-separator @@ -406,7 +406,7 @@ Applies a directional impulse without affecting rotation. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). -This is equivalent to using :ref:`apply_impulse` at the body's center of mass. +This is equivalent to using :ref:`apply_impulse()` at the body's center of mass. .. rst-class:: classref-item-separator @@ -480,7 +480,7 @@ An impulse is time-independent! Applying an impulse every frame would result in Returns the body's total constant positional forces applied during each physics update. -See :ref:`add_constant_force` and :ref:`add_constant_central_force`. +See :ref:`add_constant_force()` and :ref:`add_constant_central_force()`. .. rst-class:: classref-item-separator @@ -494,7 +494,7 @@ See :ref:`add_constant_force`. +See :ref:`add_constant_torque()`. .. rst-class:: classref-item-separator @@ -690,7 +690,7 @@ Updates the body's linear and angular velocity by applying gravity and damping f Sets the body's total constant positional forces applied during each physics update. -See :ref:`add_constant_force` and :ref:`add_constant_central_force`. +See :ref:`add_constant_force()` and :ref:`add_constant_central_force()`. .. rst-class:: classref-item-separator @@ -704,7 +704,7 @@ See :ref:`add_constant_force`. +See :ref:`add_constant_torque()`. .. |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_physicsdirectbodystate2dextension.rst b/classes/class_physicsdirectbodystate2dextension.rst index 51e5668d1..771b9c0cb 100644 --- a/classes/class_physicsdirectbodystate2dextension.rst +++ b/classes/class_physicsdirectbodystate2dextension.rst @@ -136,7 +136,7 @@ Method Descriptions |void| **_add_constant_central_force**\ (\ force\: :ref:`Vector2`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.add_constant_central_force`. +Overridable version of :ref:`PhysicsDirectBodyState2D.add_constant_central_force()`. .. rst-class:: classref-item-separator @@ -148,7 +148,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.add_constant_central_force |void| **_add_constant_force**\ (\ force\: :ref:`Vector2`, position\: :ref:`Vector2`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.add_constant_force`. +Overridable version of :ref:`PhysicsDirectBodyState2D.add_constant_force()`. .. rst-class:: classref-item-separator @@ -160,7 +160,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.add_constant_force`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.add_constant_torque`. +Overridable version of :ref:`PhysicsDirectBodyState2D.add_constant_torque()`. .. rst-class:: classref-item-separator @@ -172,7 +172,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.add_constant_torque`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.apply_central_force`. +Overridable version of :ref:`PhysicsDirectBodyState2D.apply_central_force()`. .. rst-class:: classref-item-separator @@ -184,7 +184,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.apply_central_force`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.apply_central_impulse`. +Overridable version of :ref:`PhysicsDirectBodyState2D.apply_central_impulse()`. .. rst-class:: classref-item-separator @@ -196,7 +196,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.apply_central_impulse`, position\: :ref:`Vector2`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.apply_force`. +Overridable version of :ref:`PhysicsDirectBodyState2D.apply_force()`. .. rst-class:: classref-item-separator @@ -208,7 +208,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.apply_force`, position\: :ref:`Vector2`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.apply_impulse`. +Overridable version of :ref:`PhysicsDirectBodyState2D.apply_impulse()`. .. rst-class:: classref-item-separator @@ -220,7 +220,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.apply_impulse`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.apply_torque`. +Overridable version of :ref:`PhysicsDirectBodyState2D.apply_torque()`. .. rst-class:: classref-item-separator @@ -232,7 +232,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.apply_torque`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.apply_torque_impulse`. +Overridable version of :ref:`PhysicsDirectBodyState2D.apply_torque_impulse()`. .. rst-class:: classref-item-separator @@ -280,7 +280,7 @@ Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.center_of_m :ref:`Vector2` **_get_constant_force**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.get_constant_force`. +Overridable version of :ref:`PhysicsDirectBodyState2D.get_constant_force()`. .. rst-class:: classref-item-separator @@ -292,7 +292,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.get_constant_force` **_get_constant_torque**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.get_constant_torque`. +Overridable version of :ref:`PhysicsDirectBodyState2D.get_constant_torque()`. .. rst-class:: classref-item-separator @@ -304,7 +304,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.get_constant_torque` **_get_contact_collider**\ (\ contact_idx\: :ref:`int`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider`. +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider()`. .. rst-class:: classref-item-separator @@ -316,7 +316,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider` **_get_contact_collider_id**\ (\ contact_idx\: :ref:`int`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_id`. +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_id()`. .. rst-class:: classref-item-separator @@ -328,7 +328,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_id` **_get_contact_collider_object**\ (\ contact_idx\: :ref:`int`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_object`. +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_object()`. .. rst-class:: classref-item-separator @@ -340,7 +340,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_objec :ref:`Vector2` **_get_contact_collider_position**\ (\ contact_idx\: :ref:`int`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_position`. +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_position()`. .. rst-class:: classref-item-separator @@ -352,7 +352,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_posit :ref:`int` **_get_contact_collider_shape**\ (\ contact_idx\: :ref:`int`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_shape`. +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_shape()`. .. rst-class:: classref-item-separator @@ -364,7 +364,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_shape :ref:`Vector2` **_get_contact_collider_velocity_at_position**\ (\ contact_idx\: :ref:`int`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_velocity_at_position`. +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_velocity_at_position()`. .. rst-class:: classref-item-separator @@ -376,7 +376,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_veloc :ref:`int` **_get_contact_count**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_count`. +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_count()`. .. rst-class:: classref-item-separator @@ -388,7 +388,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_count` **_get_contact_impulse**\ (\ contact_idx\: :ref:`int`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_impulse`. +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_impulse()`. .. rst-class:: classref-item-separator @@ -400,7 +400,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_impulse` **_get_contact_local_normal**\ (\ contact_idx\: :ref:`int`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_normal`. +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_normal()`. .. rst-class:: classref-item-separator @@ -412,7 +412,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_normal` **_get_contact_local_position**\ (\ contact_idx\: :ref:`int`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_position`. +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_position()`. .. rst-class:: classref-item-separator @@ -424,7 +424,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_position :ref:`int` **_get_contact_local_shape**\ (\ contact_idx\: :ref:`int`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_shape`. +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_shape()`. .. rst-class:: classref-item-separator @@ -436,7 +436,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_shape` **_get_contact_local_velocity_at_position**\ (\ contact_idx\: :ref:`int`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_velocity_at_position`. +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_velocity_at_position()`. .. rst-class:: classref-item-separator @@ -484,7 +484,7 @@ Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.linear_velo :ref:`PhysicsDirectSpaceState2D` **_get_space_state**\ (\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.get_space_state`. +Overridable version of :ref:`PhysicsDirectBodyState2D.get_space_state()`. .. rst-class:: classref-item-separator @@ -556,7 +556,7 @@ Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.transform` **_get_velocity_at_local_position**\ (\ local_position\: :ref:`Vector2`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.get_velocity_at_local_position`. +Overridable version of :ref:`PhysicsDirectBodyState2D.get_velocity_at_local_position()`. .. rst-class:: classref-item-separator @@ -568,7 +568,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.get_velocity_at_local_posi |void| **_integrate_forces**\ (\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.integrate_forces`. +Overridable version of :ref:`PhysicsDirectBodyState2D.integrate_forces()`. .. rst-class:: classref-item-separator @@ -604,7 +604,7 @@ Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.angular_vel |void| **_set_constant_force**\ (\ force\: :ref:`Vector2`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.set_constant_force`. +Overridable version of :ref:`PhysicsDirectBodyState2D.set_constant_force()`. .. rst-class:: classref-item-separator @@ -616,7 +616,7 @@ Overridable version of :ref:`PhysicsDirectBodyState2D.set_constant_force`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsDirectBodyState2D.set_constant_torque`. +Overridable version of :ref:`PhysicsDirectBodyState2D.set_constant_torque()`. .. rst-class:: classref-item-separator diff --git a/classes/class_physicsdirectbodystate3d.rst b/classes/class_physicsdirectbodystate3d.rst index 14622b57b..f3c5c75c2 100644 --- a/classes/class_physicsdirectbodystate3d.rst +++ b/classes/class_physicsdirectbodystate3d.rst @@ -21,7 +21,7 @@ Provides direct access to a physics body in the :ref:`PhysicsServer3D`, allowing safe changes to physics properties. This object is passed via the direct state callback of :ref:`RigidBody3D`, and is intended for changing the direct state of that body. See :ref:`RigidBody3D._integrate_forces`. +Provides direct access to a physics body in the :ref:`PhysicsServer3D`, allowing safe changes to physics properties. This object is passed via the direct state callback of :ref:`RigidBody3D`, and is intended for changing the direct state of that body. See :ref:`RigidBody3D._integrate_forces()`. .. rst-class:: classref-introduction-group @@ -388,7 +388,7 @@ Method Descriptions Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with ``constant_force = Vector3(0, 0, 0)``. -This is equivalent to using :ref:`add_constant_force` at the body's center of mass. +This is equivalent to using :ref:`add_constant_force()` at the body's center of mass. .. rst-class:: classref-item-separator @@ -428,7 +428,7 @@ Adds a constant rotational force without affecting position that keeps being app Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. -This is equivalent to using :ref:`apply_force` at the body's center of mass. +This is equivalent to using :ref:`apply_force()` at the body's center of mass. .. rst-class:: classref-item-separator @@ -444,7 +444,7 @@ Applies a directional impulse without affecting rotation. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). -This is equivalent to using :ref:`apply_impulse` at the body's center of mass. +This is equivalent to using :ref:`apply_impulse()` at the body's center of mass. .. rst-class:: classref-item-separator @@ -518,7 +518,7 @@ An impulse is time-independent! Applying an impulse every frame would result in Returns the body's total constant positional forces applied during each physics update. -See :ref:`add_constant_force` and :ref:`add_constant_central_force`. +See :ref:`add_constant_force()` and :ref:`add_constant_central_force()`. .. rst-class:: classref-item-separator @@ -532,7 +532,7 @@ See :ref:`add_constant_force`. +See :ref:`add_constant_torque()`. .. rst-class:: classref-item-separator @@ -728,7 +728,7 @@ Updates the body's linear and angular velocity by applying gravity and damping f Sets the body's total constant positional forces applied during each physics update. -See :ref:`add_constant_force` and :ref:`add_constant_central_force`. +See :ref:`add_constant_force()` and :ref:`add_constant_central_force()`. .. rst-class:: classref-item-separator @@ -742,7 +742,7 @@ See :ref:`add_constant_force`. +See :ref:`add_constant_torque()`. .. |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_physicsdirectspacestate2d.rst b/classes/class_physicsdirectspacestate2d.rst index 45f7cde75..46cbfc96c 100644 --- a/classes/class_physicsdirectspacestate2d.rst +++ b/classes/class_physicsdirectspacestate2d.rst @@ -73,7 +73,7 @@ Checks how far a :ref:`Shape2D` can move without colliding. All t Returns an array with the safe and unsafe proportions (between 0 and 1) of the motion. The safe proportion is the maximum fraction of the motion that can be made without a collision. The unsafe proportion is the minimum fraction of the distance that must be moved for a collision. If no collision is detected a result of ``[1.0, 1.0]`` will be returned. -\ **Note:** Any :ref:`Shape2D`\ s that the shape is already colliding with e.g. inside of, will be ignored. Use :ref:`collide_shape` to determine the :ref:`Shape2D`\ s that the shape is already colliding with. +\ **Note:** Any :ref:`Shape2D`\ s that the shape is already colliding with e.g. inside of, will be ignored. Use :ref:`collide_shape()` to determine the :ref:`Shape2D`\ s that the shape is already colliding with. .. rst-class:: classref-item-separator @@ -85,7 +85,7 @@ Returns an array with the safe and unsafe proportions (between 0 and 1) of the m :ref:`Array`\[:ref:`Vector2`\] **collide_shape**\ (\ parameters\: :ref:`PhysicsShapeQueryParameters2D`, max_results\: :ref:`int` = 32\ ) :ref:`πŸ”—` -Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryParameters2D` object, against the space. The resulting array contains a list of points where the shape intersects another. Like with :ref:`intersect_shape`, the number of returned results can be limited to save processing time. +Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryParameters2D` object, against the space. The resulting array contains a list of points where the shape intersects another. Like with :ref:`intersect_shape()`, the number of returned results can be limited to save processing time. Returned points are a list of pairs of contact points. For each pair the first one is in the shape passed in :ref:`PhysicsShapeQueryParameters2D` object, second one is in the collided shape from the physics space. diff --git a/classes/class_physicsdirectspacestate3d.rst b/classes/class_physicsdirectspacestate3d.rst index 36cbe657f..11d9e5f03 100644 --- a/classes/class_physicsdirectspacestate3d.rst +++ b/classes/class_physicsdirectspacestate3d.rst @@ -73,7 +73,7 @@ Checks how far a :ref:`Shape3D` can move without colliding. All t Returns an array with the safe and unsafe proportions (between 0 and 1) of the motion. The safe proportion is the maximum fraction of the motion that can be made without a collision. The unsafe proportion is the minimum fraction of the distance that must be moved for a collision. If no collision is detected a result of ``[1.0, 1.0]`` will be returned. -\ **Note:** Any :ref:`Shape3D`\ s that the shape is already colliding with e.g. inside of, will be ignored. Use :ref:`collide_shape` to determine the :ref:`Shape3D`\ s that the shape is already colliding with. +\ **Note:** Any :ref:`Shape3D`\ s that the shape is already colliding with e.g. inside of, will be ignored. Use :ref:`collide_shape()` to determine the :ref:`Shape3D`\ s that the shape is already colliding with. .. rst-class:: classref-item-separator @@ -85,7 +85,7 @@ Returns an array with the safe and unsafe proportions (between 0 and 1) of the m :ref:`Array`\[:ref:`Vector3`\] **collide_shape**\ (\ parameters\: :ref:`PhysicsShapeQueryParameters3D`, max_results\: :ref:`int` = 32\ ) :ref:`πŸ”—` -Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryParameters3D` object, against the space. The resulting array contains a list of points where the shape intersects another. Like with :ref:`intersect_shape`, the number of returned results can be limited to save processing time. +Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryParameters3D` object, against the space. The resulting array contains a list of points where the shape intersects another. Like with :ref:`intersect_shape()`, the number of returned results can be limited to save processing time. Returned points are a list of pairs of contact points. For each pair the first one is in the shape passed in :ref:`PhysicsShapeQueryParameters3D` object, second one is in the collided shape from the physics space. diff --git a/classes/class_physicspointqueryparameters2d.rst b/classes/class_physicspointqueryparameters2d.rst index 6544baca2..fe543c388 100644 --- a/classes/class_physicspointqueryparameters2d.rst +++ b/classes/class_physicspointqueryparameters2d.rst @@ -12,14 +12,14 @@ PhysicsPointQueryParameters2D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Provides parameters for :ref:`PhysicsDirectSpaceState2D.intersect_point`. +Provides parameters for :ref:`PhysicsDirectSpaceState2D.intersect_point()`. .. rst-class:: classref-introduction-group Description ----------- -By changing various properties of this object, such as the point position, you can configure the parameters for :ref:`PhysicsDirectSpaceState2D.intersect_point`. +By changing various properties of this object, such as the point position, you can configure the parameters for :ref:`PhysicsDirectSpaceState2D.intersect_point()`. .. rst-class:: classref-reftable-group @@ -63,7 +63,7 @@ Property Descriptions - |void| **set_canvas_instance_id**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_canvas_instance_id**\ (\ ) -If different from ``0``, restricts the query to a specific canvas layer specified by its instance ID. See :ref:`Object.get_instance_id`. +If different from ``0``, restricts the query to a specific canvas layer specified by its instance ID. See :ref:`Object.get_instance_id()`. If ``0``, restricts the query to the Viewport's default canvas layer. @@ -133,7 +133,7 @@ The physics layers the query will detect (as a bitmask). By default, all collisi - |void| **set_exclude**\ (\ value\: :ref:`Array`\[:ref:`RID`\]\ ) - :ref:`Array`\[:ref:`RID`\] **get_exclude**\ (\ ) -The list of object :ref:`RID`\ s that will be excluded from collisions. Use :ref:`CollisionObject2D.get_rid` to get the :ref:`RID` associated with a :ref:`CollisionObject2D`-derived node. +The list of object :ref:`RID`\ s that will be excluded from collisions. Use :ref:`CollisionObject2D.get_rid()` to get the :ref:`RID` associated with a :ref:`CollisionObject2D`-derived node. \ **Note:** The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then assign it to the property again. diff --git a/classes/class_physicspointqueryparameters3d.rst b/classes/class_physicspointqueryparameters3d.rst index 321305afa..a952e8cbc 100644 --- a/classes/class_physicspointqueryparameters3d.rst +++ b/classes/class_physicspointqueryparameters3d.rst @@ -12,14 +12,14 @@ PhysicsPointQueryParameters3D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Provides parameters for :ref:`PhysicsDirectSpaceState3D.intersect_point`. +Provides parameters for :ref:`PhysicsDirectSpaceState3D.intersect_point()`. .. rst-class:: classref-introduction-group Description ----------- -By changing various properties of this object, such as the point position, you can configure the parameters for :ref:`PhysicsDirectSpaceState3D.intersect_point`. +By changing various properties of this object, such as the point position, you can configure the parameters for :ref:`PhysicsDirectSpaceState3D.intersect_point()`. .. rst-class:: classref-reftable-group @@ -112,7 +112,7 @@ The physics layers the query will detect (as a bitmask). By default, all collisi - |void| **set_exclude**\ (\ value\: :ref:`Array`\[:ref:`RID`\]\ ) - :ref:`Array`\[:ref:`RID`\] **get_exclude**\ (\ ) -The list of object :ref:`RID`\ s that will be excluded from collisions. Use :ref:`CollisionObject3D.get_rid` to get the :ref:`RID` associated with a :ref:`CollisionObject3D`-derived node. +The list of object :ref:`RID`\ s that will be excluded from collisions. Use :ref:`CollisionObject3D.get_rid()` to get the :ref:`RID` associated with a :ref:`CollisionObject3D`-derived node. \ **Note:** The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then assign it to the property again. diff --git a/classes/class_physicsrayqueryparameters2d.rst b/classes/class_physicsrayqueryparameters2d.rst index 1a8593ffa..fff791843 100644 --- a/classes/class_physicsrayqueryparameters2d.rst +++ b/classes/class_physicsrayqueryparameters2d.rst @@ -12,14 +12,14 @@ PhysicsRayQueryParameters2D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Provides parameters for :ref:`PhysicsDirectSpaceState2D.intersect_ray`. +Provides parameters for :ref:`PhysicsDirectSpaceState2D.intersect_ray()`. .. rst-class:: classref-introduction-group Description ----------- -By changing various properties of this object, such as the ray position, you can configure the parameters for :ref:`PhysicsDirectSpaceState2D.intersect_ray`. +By changing various properties of this object, such as the ray position, you can configure the parameters for :ref:`PhysicsDirectSpaceState2D.intersect_ray()`. .. rst-class:: classref-reftable-group @@ -128,7 +128,7 @@ The physics layers the query will detect (as a bitmask). By default, all collisi - |void| **set_exclude**\ (\ value\: :ref:`Array`\[:ref:`RID`\]\ ) - :ref:`Array`\[:ref:`RID`\] **get_exclude**\ (\ ) -The list of object :ref:`RID`\ s that will be excluded from collisions. Use :ref:`CollisionObject2D.get_rid` to get the :ref:`RID` associated with a :ref:`CollisionObject2D`-derived node. +The list of object :ref:`RID`\ s that will be excluded from collisions. Use :ref:`CollisionObject2D.get_rid()` to get the :ref:`RID` associated with a :ref:`CollisionObject2D`-derived node. \ **Note:** The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then assign it to the property again. diff --git a/classes/class_physicsrayqueryparameters3d.rst b/classes/class_physicsrayqueryparameters3d.rst index 990417768..b308e652a 100644 --- a/classes/class_physicsrayqueryparameters3d.rst +++ b/classes/class_physicsrayqueryparameters3d.rst @@ -12,14 +12,14 @@ PhysicsRayQueryParameters3D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Provides parameters for :ref:`PhysicsDirectSpaceState3D.intersect_ray`. +Provides parameters for :ref:`PhysicsDirectSpaceState3D.intersect_ray()`. .. rst-class:: classref-introduction-group Description ----------- -By changing various properties of this object, such as the ray position, you can configure the parameters for :ref:`PhysicsDirectSpaceState3D.intersect_ray`. +By changing various properties of this object, such as the ray position, you can configure the parameters for :ref:`PhysicsDirectSpaceState3D.intersect_ray()`. .. rst-class:: classref-reftable-group @@ -130,7 +130,7 @@ The physics layers the query will detect (as a bitmask). By default, all collisi - |void| **set_exclude**\ (\ value\: :ref:`Array`\[:ref:`RID`\]\ ) - :ref:`Array`\[:ref:`RID`\] **get_exclude**\ (\ ) -The list of object :ref:`RID`\ s that will be excluded from collisions. Use :ref:`CollisionObject3D.get_rid` to get the :ref:`RID` associated with a :ref:`CollisionObject3D`-derived node. +The list of object :ref:`RID`\ s that will be excluded from collisions. Use :ref:`CollisionObject3D.get_rid()` to get the :ref:`RID` associated with a :ref:`CollisionObject3D`-derived node. \ **Note:** The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then assign it to the property again. diff --git a/classes/class_physicsserver2d.rst b/classes/class_physicsserver2d.rst index 500395ab2..fb43c02d6 100644 --- a/classes/class_physicsserver2d.rst +++ b/classes/class_physicsserver2d.rst @@ -690,7 +690,7 @@ Constant to set/get a body's inertia. The default value of this parameter is ``0 :ref:`BodyParameter` **BODY_PARAM_CENTER_OF_MASS** = ``4`` -Constant to set/get a body's center of mass position in the body's local coordinate system. The default value of this parameter is ``Vector2(0,0)``. If this parameter is never set explicitly, then it is recalculated based on the body's shapes when setting the parameter :ref:`BODY_PARAM_MASS` or when calling :ref:`body_set_space`. +Constant to set/get a body's center of mass position in the body's local coordinate system. The default value of this parameter is ``Vector2(0,0)``. If this parameter is never set explicitly, then it is recalculated based on the body's shapes when setting the parameter :ref:`BODY_PARAM_MASS` or when calling :ref:`body_set_space()`. .. _class_PhysicsServer2D_constant_BODY_PARAM_GRAVITY_SCALE: @@ -1121,7 +1121,7 @@ Adds a shape to the area, with the given local transform. The shape (together wi |void| **area_attach_canvas_instance_id**\ (\ area\: :ref:`RID`, id\: :ref:`int`\ ) :ref:`πŸ”—` -Attaches the ``ObjectID`` of a canvas to the area. Use :ref:`Object.get_instance_id` to get the ``ObjectID`` of a :ref:`CanvasLayer`. +Attaches the ``ObjectID`` of a canvas to the area. Use :ref:`Object.get_instance_id()` to get the ``ObjectID`` of a :ref:`CanvasLayer`. .. rst-class:: classref-item-separator @@ -1133,7 +1133,7 @@ Attaches the ``ObjectID`` of a canvas to the area. Use :ref:`Object.get_instance |void| **area_attach_object_instance_id**\ (\ area\: :ref:`RID`, id\: :ref:`int`\ ) :ref:`πŸ”—` -Attaches the ``ObjectID`` of an :ref:`Object` to the area. Use :ref:`Object.get_instance_id` to get the ``ObjectID`` of a :ref:`CollisionObject2D`. +Attaches the ``ObjectID`` of an :ref:`Object` to the area. Use :ref:`Object.get_instance_id()` to get the ``ObjectID`` of a :ref:`CollisionObject2D`. .. rst-class:: classref-item-separator @@ -1159,7 +1159,7 @@ Removes all shapes from the area. This does not delete the shapes themselves, so Creates a 2D area object in the physics server, and returns the :ref:`RID` that identifies it. The default settings for the created area include a collision layer and mask set to ``1``, and ``monitorable`` set to ``false``. -Use :ref:`area_add_shape` to add shapes to it, use :ref:`area_set_transform` to set its transform, and use :ref:`area_set_space` to add the area to a space. If you want the area to be detectable use :ref:`area_set_monitorable`. +Use :ref:`area_add_shape()` to add shapes to it, use :ref:`area_set_transform()` to set its transform, and use :ref:`area_set_space()` to add the area to a space. If you want the area to be detectable use :ref:`area_set_monitorable()`. .. rst-class:: classref-item-separator @@ -1171,7 +1171,7 @@ Use :ref:`area_add_shape` to add sh :ref:`int` **area_get_canvas_instance_id**\ (\ area\: :ref:`RID`\ ) |const| :ref:`πŸ”—` -Returns the ``ObjectID`` of the canvas attached to the area. Use :ref:`@GlobalScope.instance_from_id` to retrieve a :ref:`CanvasLayer` from a nonzero ``ObjectID``. +Returns the ``ObjectID`` of the canvas attached to the area. Use :ref:`@GlobalScope.instance_from_id()` to retrieve a :ref:`CanvasLayer` from a nonzero ``ObjectID``. .. rst-class:: classref-item-separator @@ -1207,7 +1207,7 @@ Returns the physics layer or layers the area can contact with, as a bitmask. :ref:`int` **area_get_object_instance_id**\ (\ area\: :ref:`RID`\ ) |const| :ref:`πŸ”—` -Returns the ``ObjectID`` attached to the area. Use :ref:`@GlobalScope.instance_from_id` to retrieve an :ref:`Object` from a nonzero ``ObjectID``. +Returns the ``ObjectID`` attached to the area. Use :ref:`@GlobalScope.instance_from_id()` to retrieve an :ref:`Object` from a nonzero ``ObjectID``. .. rst-class:: classref-item-separator @@ -1475,7 +1475,7 @@ Adds ``excepted_body`` to the body's list of collision exceptions, so that colli Adds a constant directional force to the body. The force does not affect rotation. The force remains applied over time until cleared with ``PhysicsServer2D.body_set_constant_force(body, Vector2(0, 0))``. -This is equivalent to using :ref:`body_add_constant_force` at the body's center of mass. +This is equivalent to using :ref:`body_add_constant_force()` at the body's center of mass. .. rst-class:: classref-item-separator @@ -1527,7 +1527,7 @@ Adds a shape to the area, with the given local transform. The shape (together wi Applies a directional force to the body, at the body's center of mass. The force does not affect rotation. A force is time dependent and meant to be applied every physics update. -This is equivalent to using :ref:`body_apply_force` at the body's center of mass. +This is equivalent to using :ref:`body_apply_force()` at the body's center of mass. .. rst-class:: classref-item-separator @@ -1543,7 +1543,7 @@ Applies a directional impulse to the body, at the body's center of mass. The imp An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). -This is equivalent to using :ref:`body_apply_impulse` at the body's center of mass. +This is equivalent to using :ref:`body_apply_impulse()` at the body's center of mass. .. rst-class:: classref-item-separator @@ -1611,7 +1611,7 @@ An impulse is time-independent! Applying an impulse every frame would result in |void| **body_attach_canvas_instance_id**\ (\ body\: :ref:`RID`, id\: :ref:`int`\ ) :ref:`πŸ”—` -Attaches the ``ObjectID`` of a canvas to the body. Use :ref:`Object.get_instance_id` to get the ``ObjectID`` of a :ref:`CanvasLayer`. +Attaches the ``ObjectID`` of a canvas to the body. Use :ref:`Object.get_instance_id()` to get the ``ObjectID`` of a :ref:`CanvasLayer`. .. rst-class:: classref-item-separator @@ -1623,7 +1623,7 @@ Attaches the ``ObjectID`` of a canvas to the body. Use :ref:`Object.get_instance |void| **body_attach_object_instance_id**\ (\ body\: :ref:`RID`, id\: :ref:`int`\ ) :ref:`πŸ”—` -Attaches the ``ObjectID`` of an :ref:`Object` to the body. Use :ref:`Object.get_instance_id` to get the ``ObjectID`` of a :ref:`CollisionObject2D`. +Attaches the ``ObjectID`` of an :ref:`Object` to the body. Use :ref:`Object.get_instance_id()` to get the ``ObjectID`` of a :ref:`CollisionObject2D`. .. rst-class:: classref-item-separator @@ -1649,7 +1649,7 @@ Removes all shapes from the body. This does not delete the shapes themselves, so Creates a 2D body object in the physics server, and returns the :ref:`RID` that identifies it. The default settings for the created area include a collision layer and mask set to ``1``, and body mode set to :ref:`BODY_MODE_RIGID`. -Use :ref:`body_add_shape` to add shapes to it, use :ref:`body_set_state` to set its transform, and use :ref:`body_set_space` to add the body to a space. +Use :ref:`body_add_shape()` to add shapes to it, use :ref:`body_set_state()` to set its transform, and use :ref:`body_set_space()` to add the body to a space. .. rst-class:: classref-item-separator @@ -1661,7 +1661,7 @@ Use :ref:`body_add_shape` to add sh :ref:`int` **body_get_canvas_instance_id**\ (\ body\: :ref:`RID`\ ) |const| :ref:`πŸ”—` -Returns the ``ObjectID`` of the canvas attached to the body. Use :ref:`@GlobalScope.instance_from_id` to retrieve a :ref:`CanvasLayer` from a nonzero ``ObjectID``. +Returns the ``ObjectID`` of the canvas attached to the body. Use :ref:`@GlobalScope.instance_from_id()` to retrieve a :ref:`CanvasLayer` from a nonzero ``ObjectID``. .. rst-class:: classref-item-separator @@ -1697,7 +1697,7 @@ Returns the physics layer or layers the body can collide with, as a bitmask. :ref:`float` **body_get_collision_priority**\ (\ body\: :ref:`RID`\ ) |const| :ref:`πŸ”—` -Returns the body's collision priority. This is used in the depenetration phase of :ref:`body_test_motion`. The higher the priority is, the lower the penetration into the body will be. +Returns the body's collision priority. This is used in the depenetration phase of :ref:`body_test_motion()`. The higher the priority is, the lower the penetration into the body will be. .. rst-class:: classref-item-separator @@ -1711,7 +1711,7 @@ Returns the body's collision priority. This is used in the depenetration phase o Returns the body's total constant positional force applied during each physics update. -See :ref:`body_add_constant_force` and :ref:`body_add_constant_central_force`. +See :ref:`body_add_constant_force()` and :ref:`body_add_constant_central_force()`. .. rst-class:: classref-item-separator @@ -1725,7 +1725,7 @@ See :ref:`body_add_constant_force`. +See :ref:`body_add_constant_torque()`. .. rst-class:: classref-item-separator @@ -1761,7 +1761,7 @@ Returns the :ref:`PhysicsDirectBodyState2D` of t :ref:`int` **body_get_max_contacts_reported**\ (\ body\: :ref:`RID`\ ) |const| :ref:`πŸ”—` -Returns the maximum number of contacts that the body can report. See :ref:`body_set_max_contacts_reported`. +Returns the maximum number of contacts that the body can report. See :ref:`body_set_max_contacts_reported()`. .. rst-class:: classref-item-separator @@ -1785,7 +1785,7 @@ Returns the body's mode (see :ref:`BodyMode`). :ref:`int` **body_get_object_instance_id**\ (\ body\: :ref:`RID`\ ) |const| :ref:`πŸ”—` -Returns the ``ObjectID`` attached to the body. Use :ref:`@GlobalScope.instance_from_id` to retrieve an :ref:`Object` from a nonzero ``ObjectID``. +Returns the ``ObjectID`` attached to the body. Use :ref:`@GlobalScope.instance_from_id()` to retrieve an :ref:`Object` from a nonzero ``ObjectID``. .. rst-class:: classref-item-separator @@ -1869,7 +1869,7 @@ Returns the value of the given state of the body. See :ref:`BodyState` **body_is_omitting_force_integration**\ (\ body\: :ref:`RID`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body is omitting the standard force integration. See :ref:`body_set_omit_force_integration`. +Returns ``true`` if the body is omitting the standard force integration. See :ref:`body_set_omit_force_integration()`. .. rst-class:: classref-item-separator @@ -1905,7 +1905,7 @@ Removes the shape with the given index from the body's array of shapes. The shap |void| **body_reset_mass_properties**\ (\ body\: :ref:`RID`\ ) :ref:`πŸ”—` -Restores the default inertia and center of mass of the body based on its shapes. This undoes any custom values previously set using :ref:`body_set_param`. +Restores the default inertia and center of mass of the body based on its shapes. This undoes any custom values previously set using :ref:`body_set_param()`. .. rst-class:: classref-item-separator @@ -1953,7 +1953,7 @@ Sets the physics layer or layers the body can collide with, via a bitmask. |void| **body_set_collision_priority**\ (\ body\: :ref:`RID`, priority\: :ref:`float`\ ) :ref:`πŸ”—` -Sets the body's collision priority. This is used in the depenetration phase of :ref:`body_test_motion`. The higher the priority is, the lower the penetration into the body will be. +Sets the body's collision priority. This is used in the depenetration phase of :ref:`body_test_motion()`. The higher the priority is, the lower the penetration into the body will be. .. rst-class:: classref-item-separator @@ -1967,7 +1967,7 @@ Sets the body's collision priority. This is used in the depenetration phase of : Sets the body's total constant positional force applied during each physics update. -See :ref:`body_add_constant_force` and :ref:`body_add_constant_central_force`. +See :ref:`body_add_constant_force()` and :ref:`body_add_constant_central_force()`. .. rst-class:: classref-item-separator @@ -1981,7 +1981,7 @@ See :ref:`body_add_constant_force`. +See :ref:`body_add_constant_torque()`. .. rst-class:: classref-item-separator @@ -2009,7 +2009,7 @@ Continuous collision detection tries to predict where a moving body would collid 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. +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. If ``userdata`` is not ``null``, the function ``callable`` must take the following two parameters: @@ -2053,7 +2053,7 @@ Sets the body's mode. See :ref:`BodyMode` for the |void| **body_set_omit_force_integration**\ (\ body\: :ref:`RID`, enable\: :ref:`bool`\ ) :ref:`πŸ”—` -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. +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. @@ -2189,7 +2189,7 @@ Returns ``true`` if a collision would result from moving the body along a motion :ref:`RID` **capsule_shape_create**\ (\ ) :ref:`πŸ”—` -Creates a 2D capsule shape in the physics server, and returns the :ref:`RID` that identifies it. Use :ref:`shape_set_data` to set the capsule's height and radius. +Creates a 2D capsule shape in the physics server, and returns the :ref:`RID` that identifies it. Use :ref:`shape_set_data()` to set the capsule's height and radius. .. rst-class:: classref-item-separator @@ -2201,7 +2201,7 @@ Creates a 2D capsule shape in the physics server, and returns the :ref:`RID` **circle_shape_create**\ (\ ) :ref:`πŸ”—` -Creates a 2D circle shape in the physics server, and returns the :ref:`RID` that identifies it. Use :ref:`shape_set_data` to set the circle's radius. +Creates a 2D circle shape in the physics server, and returns the :ref:`RID` that identifies it. Use :ref:`shape_set_data()` to set the circle's radius. .. rst-class:: classref-item-separator @@ -2213,7 +2213,7 @@ Creates a 2D circle shape in the physics server, and returns the :ref:`RID` **concave_polygon_shape_create**\ (\ ) :ref:`πŸ”—` -Creates a 2D concave polygon shape in the physics server, and returns the :ref:`RID` that identifies it. Use :ref:`shape_set_data` to set the concave polygon's segments. +Creates a 2D concave polygon shape in the physics server, and returns the :ref:`RID` that identifies it. Use :ref:`shape_set_data()` to set the concave polygon's segments. .. rst-class:: classref-item-separator @@ -2225,7 +2225,7 @@ Creates a 2D concave polygon shape in the physics server, and returns the :ref:` :ref:`RID` **convex_polygon_shape_create**\ (\ ) :ref:`πŸ”—` -Creates a 2D convex polygon shape in the physics server, and returns the :ref:`RID` that identifies it. Use :ref:`shape_set_data` to set the convex polygon's points. +Creates a 2D convex polygon shape in the physics server, and returns the :ref:`RID` that identifies it. Use :ref:`shape_set_data()` to set the convex polygon's points. .. rst-class:: classref-item-separator @@ -2297,7 +2297,7 @@ Destroys the joint with the given :ref:`RID`, creates a new uninitial :ref:`RID` **joint_create**\ (\ ) :ref:`πŸ”—` -Creates a 2D joint in the physics server, and returns the :ref:`RID` that identifies it. To set the joint type, use :ref:`joint_make_damped_spring`, :ref:`joint_make_groove` or :ref:`joint_make_pin`. Use :ref:`joint_set_param` to set generic joint parameters. +Creates a 2D joint in the physics server, and returns the :ref:`RID` that identifies it. To set the joint type, use :ref:`joint_make_damped_spring()`, :ref:`joint_make_groove()` or :ref:`joint_make_pin()`. Use :ref:`joint_set_param()` to set generic joint parameters. .. rst-class:: classref-item-separator @@ -2357,7 +2357,7 @@ Returns whether the bodies attached to the :ref:`Joint2D` will co |void| **joint_make_damped_spring**\ (\ joint\: :ref:`RID`, anchor_a\: :ref:`Vector2`, anchor_b\: :ref:`Vector2`, body_a\: :ref:`RID`, body_b\: :ref:`RID` = RID()\ ) :ref:`πŸ”—` -Makes the joint a damped spring joint, attached at the point ``anchor_a`` (given in global coordinates) on the body ``body_a`` and at the point ``anchor_b`` (given in global coordinates) on the body ``body_b``. To set the parameters which are specific to the damped spring, see :ref:`damped_spring_joint_set_param`. +Makes the joint a damped spring joint, attached at the point ``anchor_a`` (given in global coordinates) on the body ``body_a`` and at the point ``anchor_b`` (given in global coordinates) on the body ``body_b``. To set the parameters which are specific to the damped spring, see :ref:`damped_spring_joint_set_param()`. .. rst-class:: classref-item-separator @@ -2381,7 +2381,7 @@ Makes the joint a groove joint. |void| **joint_make_pin**\ (\ joint\: :ref:`RID`, anchor\: :ref:`Vector2`, body_a\: :ref:`RID`, body_b\: :ref:`RID` = RID()\ ) :ref:`πŸ”—` -Makes the joint a pin joint. If ``body_b`` is an empty :ref:`RID`, then ``body_a`` is pinned to the point ``anchor`` (given in global coordinates); otherwise, ``body_a`` is pinned to ``body_b`` at the point ``anchor`` (given in global coordinates). To set the parameters which are specific to the pin joint, see :ref:`pin_joint_set_param`. +Makes the joint a pin joint. If ``body_b`` is an empty :ref:`RID`, then ``body_a`` is pinned to the point ``anchor`` (given in global coordinates); otherwise, ``body_a`` is pinned to ``body_b`` at the point ``anchor`` (given in global coordinates). To set the parameters which are specific to the pin joint, see :ref:`pin_joint_set_param()`. .. rst-class:: classref-item-separator @@ -2453,7 +2453,7 @@ Sets a pin joint parameter. See :ref:`PinJointParam` **rectangle_shape_create**\ (\ ) :ref:`πŸ”—` -Creates a 2D rectangle shape in the physics server, and returns the :ref:`RID` that identifies it. Use :ref:`shape_set_data` to set the rectangle's half-extents. +Creates a 2D rectangle shape in the physics server, and returns the :ref:`RID` that identifies it. Use :ref:`shape_set_data()` to set the rectangle's half-extents. .. rst-class:: classref-item-separator @@ -2465,7 +2465,7 @@ Creates a 2D rectangle shape in the physics server, and returns the :ref:`RID` **segment_shape_create**\ (\ ) :ref:`πŸ”—` -Creates a 2D segment shape in the physics server, and returns the :ref:`RID` that identifies it. Use :ref:`shape_set_data` to set the segment's start and end points. +Creates a 2D segment shape in the physics server, and returns the :ref:`RID` that identifies it. Use :ref:`shape_set_data()` to set the segment's start and end points. .. rst-class:: classref-item-separator @@ -2477,7 +2477,7 @@ Creates a 2D segment shape in the physics server, and returns the :ref:`RID` **separation_ray_shape_create**\ (\ ) :ref:`πŸ”—` -Creates a 2D separation ray shape in the physics server, and returns the :ref:`RID` that identifies it. Use :ref:`shape_set_data` to set the shape's ``length`` and ``slide_on_slope`` properties. +Creates a 2D separation ray shape in the physics server, and returns the :ref:`RID` that identifies it. Use :ref:`shape_set_data()` to set the shape's ``length`` and ``slide_on_slope`` properties. .. rst-class:: classref-item-separator @@ -2501,7 +2501,7 @@ Activates or deactivates the 2D physics server. If ``active`` is ``false``, then :ref:`Variant` **shape_get_data**\ (\ shape\: :ref:`RID`\ ) |const| :ref:`πŸ”—` -Returns the shape data that defines the configuration of the shape, such as the half-extents of a rectangle or the segments of a concave shape. See :ref:`shape_set_data` for the precise format of this data in each case. +Returns the shape data that defines the configuration of the shape, such as the half-extents of a rectangle or the segments of a concave shape. See :ref:`shape_set_data()` for the precise format of this data in each case. .. rst-class:: classref-item-separator @@ -2525,7 +2525,7 @@ Returns the shape's type (see :ref:`ShapeType`). |void| **shape_set_data**\ (\ shape\: :ref:`RID`, data\: :ref:`Variant`\ ) :ref:`πŸ”—` -Sets the shape data that defines the configuration of the shape. The ``data`` to be passed depends on the shape's type (see :ref:`shape_get_type`): +Sets the shape data that defines the configuration of the shape. The ``data`` to be passed depends on the shape's type (see :ref:`shape_get_type()`): - :ref:`SHAPE_WORLD_BOUNDARY`: an array of length two containing a :ref:`Vector2` ``normal`` direction and a :ref:`float` distance ``d``, @@ -2627,7 +2627,7 @@ Sets the value of the given space parameter. See :ref:`SpaceParameter` **world_boundary_shape_create**\ (\ ) :ref:`πŸ”—` -Creates a 2D world boundary shape in the physics server, and returns the :ref:`RID` that identifies it. Use :ref:`shape_set_data` to set the shape's normal direction and distance properties. +Creates a 2D world boundary shape in the physics server, and returns the :ref:`RID` that identifies it. Use :ref:`shape_set_data()` to set the shape's normal direction and distance properties. .. |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_physicsserver2dextension.rst b/classes/class_physicsserver2dextension.rst index c0bb62666..07fe2fa66 100644 --- a/classes/class_physicsserver2dextension.rst +++ b/classes/class_physicsserver2dextension.rst @@ -328,7 +328,7 @@ Method Descriptions |void| **_area_add_shape**\ (\ area\: :ref:`RID`, shape\: :ref:`RID`, transform\: :ref:`Transform2D`, disabled\: :ref:`bool`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_add_shape`. +Overridable version of :ref:`PhysicsServer2D.area_add_shape()`. .. rst-class:: classref-item-separator @@ -340,7 +340,7 @@ Overridable version of :ref:`PhysicsServer2D.area_add_shape`, id\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_attach_canvas_instance_id`. +Overridable version of :ref:`PhysicsServer2D.area_attach_canvas_instance_id()`. .. rst-class:: classref-item-separator @@ -352,7 +352,7 @@ Overridable version of :ref:`PhysicsServer2D.area_attach_canvas_instance_id`, id\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_attach_object_instance_id`. +Overridable version of :ref:`PhysicsServer2D.area_attach_object_instance_id()`. .. rst-class:: classref-item-separator @@ -364,7 +364,7 @@ Overridable version of :ref:`PhysicsServer2D.area_attach_object_instance_id`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_clear_shapes`. +Overridable version of :ref:`PhysicsServer2D.area_clear_shapes()`. .. rst-class:: classref-item-separator @@ -376,7 +376,7 @@ Overridable version of :ref:`PhysicsServer2D.area_clear_shapes` **_area_create**\ (\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_create`. +Overridable version of :ref:`PhysicsServer2D.area_create()`. .. rst-class:: classref-item-separator @@ -388,7 +388,7 @@ Overridable version of :ref:`PhysicsServer2D.area_create` **_area_get_canvas_instance_id**\ (\ area\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_get_canvas_instance_id`. +Overridable version of :ref:`PhysicsServer2D.area_get_canvas_instance_id()`. .. rst-class:: classref-item-separator @@ -400,7 +400,7 @@ Overridable version of :ref:`PhysicsServer2D.area_get_canvas_instance_id` **_area_get_collision_layer**\ (\ area\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_get_collision_layer`. +Overridable version of :ref:`PhysicsServer2D.area_get_collision_layer()`. .. rst-class:: classref-item-separator @@ -412,7 +412,7 @@ Overridable version of :ref:`PhysicsServer2D.area_get_collision_layer` **_area_get_collision_mask**\ (\ area\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_get_collision_mask`. +Overridable version of :ref:`PhysicsServer2D.area_get_collision_mask()`. .. rst-class:: classref-item-separator @@ -424,7 +424,7 @@ Overridable version of :ref:`PhysicsServer2D.area_get_collision_mask` **_area_get_object_instance_id**\ (\ area\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_get_object_instance_id`. +Overridable version of :ref:`PhysicsServer2D.area_get_object_instance_id()`. .. rst-class:: classref-item-separator @@ -436,7 +436,7 @@ Overridable version of :ref:`PhysicsServer2D.area_get_object_instance_id` **_area_get_param**\ (\ area\: :ref:`RID`, param\: :ref:`AreaParameter`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_get_param`. +Overridable version of :ref:`PhysicsServer2D.area_get_param()`. .. rst-class:: classref-item-separator @@ -448,7 +448,7 @@ Overridable version of :ref:`PhysicsServer2D.area_get_param` **_area_get_shape**\ (\ area\: :ref:`RID`, shape_idx\: :ref:`int`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_get_shape`. +Overridable version of :ref:`PhysicsServer2D.area_get_shape()`. .. rst-class:: classref-item-separator @@ -460,7 +460,7 @@ Overridable version of :ref:`PhysicsServer2D.area_get_shape` **_area_get_shape_count**\ (\ area\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_get_shape_count`. +Overridable version of :ref:`PhysicsServer2D.area_get_shape_count()`. .. rst-class:: classref-item-separator @@ -472,7 +472,7 @@ Overridable version of :ref:`PhysicsServer2D.area_get_shape_count` **_area_get_shape_transform**\ (\ area\: :ref:`RID`, shape_idx\: :ref:`int`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_get_shape_transform`. +Overridable version of :ref:`PhysicsServer2D.area_get_shape_transform()`. .. rst-class:: classref-item-separator @@ -484,7 +484,7 @@ Overridable version of :ref:`PhysicsServer2D.area_get_shape_transform` **_area_get_space**\ (\ area\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_get_space`. +Overridable version of :ref:`PhysicsServer2D.area_get_space()`. .. rst-class:: classref-item-separator @@ -496,7 +496,7 @@ Overridable version of :ref:`PhysicsServer2D.area_get_space` **_area_get_transform**\ (\ area\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_get_transform`. +Overridable version of :ref:`PhysicsServer2D.area_get_transform()`. .. rst-class:: classref-item-separator @@ -508,7 +508,7 @@ Overridable version of :ref:`PhysicsServer2D.area_get_transform`, shape_idx\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_remove_shape`. +Overridable version of :ref:`PhysicsServer2D.area_remove_shape()`. .. rst-class:: classref-item-separator @@ -520,7 +520,7 @@ Overridable version of :ref:`PhysicsServer2D.area_remove_shape`, callback\: :ref:`Callable`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_set_area_monitor_callback`. +Overridable version of :ref:`PhysicsServer2D.area_set_area_monitor_callback()`. .. rst-class:: classref-item-separator @@ -532,7 +532,7 @@ Overridable version of :ref:`PhysicsServer2D.area_set_area_monitor_callback`, layer\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_set_collision_layer`. +Overridable version of :ref:`PhysicsServer2D.area_set_collision_layer()`. .. rst-class:: classref-item-separator @@ -544,7 +544,7 @@ Overridable version of :ref:`PhysicsServer2D.area_set_collision_layer`, mask\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_set_collision_mask`. +Overridable version of :ref:`PhysicsServer2D.area_set_collision_mask()`. .. rst-class:: classref-item-separator @@ -556,7 +556,7 @@ Overridable version of :ref:`PhysicsServer2D.area_set_collision_mask`, callback\: :ref:`Callable`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_set_monitor_callback`. +Overridable version of :ref:`PhysicsServer2D.area_set_monitor_callback()`. .. rst-class:: classref-item-separator @@ -568,7 +568,7 @@ Overridable version of :ref:`PhysicsServer2D.area_set_monitor_callback`, monitorable\: :ref:`bool`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_set_monitorable`. +Overridable version of :ref:`PhysicsServer2D.area_set_monitorable()`. .. rst-class:: classref-item-separator @@ -580,7 +580,7 @@ Overridable version of :ref:`PhysicsServer2D.area_set_monitorable`, param\: :ref:`AreaParameter`, value\: :ref:`Variant`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_set_param`. +Overridable version of :ref:`PhysicsServer2D.area_set_param()`. .. rst-class:: classref-item-separator @@ -606,7 +606,7 @@ Overridable version of :ref:`PhysicsServer2D`'s internal |void| **_area_set_shape**\ (\ area\: :ref:`RID`, shape_idx\: :ref:`int`, shape\: :ref:`RID`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_set_shape`. +Overridable version of :ref:`PhysicsServer2D.area_set_shape()`. .. rst-class:: classref-item-separator @@ -618,7 +618,7 @@ Overridable version of :ref:`PhysicsServer2D.area_set_shape`, shape_idx\: :ref:`int`, disabled\: :ref:`bool`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_set_shape_disabled`. +Overridable version of :ref:`PhysicsServer2D.area_set_shape_disabled()`. .. rst-class:: classref-item-separator @@ -630,7 +630,7 @@ Overridable version of :ref:`PhysicsServer2D.area_set_shape_disabled`, shape_idx\: :ref:`int`, transform\: :ref:`Transform2D`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_set_shape_transform`. +Overridable version of :ref:`PhysicsServer2D.area_set_shape_transform()`. .. rst-class:: classref-item-separator @@ -642,7 +642,7 @@ Overridable version of :ref:`PhysicsServer2D.area_set_shape_transform`, space\: :ref:`RID`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_set_space`. +Overridable version of :ref:`PhysicsServer2D.area_set_space()`. .. rst-class:: classref-item-separator @@ -654,7 +654,7 @@ Overridable version of :ref:`PhysicsServer2D.area_set_space`, transform\: :ref:`Transform2D`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.area_set_transform`. +Overridable version of :ref:`PhysicsServer2D.area_set_transform()`. .. rst-class:: classref-item-separator @@ -666,7 +666,7 @@ Overridable version of :ref:`PhysicsServer2D.area_set_transform`, excepted_body\: :ref:`RID`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_add_collision_exception`. +Overridable version of :ref:`PhysicsServer2D.body_add_collision_exception()`. .. rst-class:: classref-item-separator @@ -678,7 +678,7 @@ Overridable version of :ref:`PhysicsServer2D.body_add_collision_exception`, force\: :ref:`Vector2`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_add_constant_central_force`. +Overridable version of :ref:`PhysicsServer2D.body_add_constant_central_force()`. .. rst-class:: classref-item-separator @@ -690,7 +690,7 @@ Overridable version of :ref:`PhysicsServer2D.body_add_constant_central_force`, force\: :ref:`Vector2`, position\: :ref:`Vector2`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_add_constant_force`. +Overridable version of :ref:`PhysicsServer2D.body_add_constant_force()`. .. rst-class:: classref-item-separator @@ -702,7 +702,7 @@ Overridable version of :ref:`PhysicsServer2D.body_add_constant_force`, torque\: :ref:`float`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_add_constant_torque`. +Overridable version of :ref:`PhysicsServer2D.body_add_constant_torque()`. .. rst-class:: classref-item-separator @@ -714,7 +714,7 @@ Overridable version of :ref:`PhysicsServer2D.body_add_constant_torque`, shape\: :ref:`RID`, transform\: :ref:`Transform2D`, disabled\: :ref:`bool`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_add_shape`. +Overridable version of :ref:`PhysicsServer2D.body_add_shape()`. .. rst-class:: classref-item-separator @@ -726,7 +726,7 @@ Overridable version of :ref:`PhysicsServer2D.body_add_shape`, force\: :ref:`Vector2`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_apply_central_force`. +Overridable version of :ref:`PhysicsServer2D.body_apply_central_force()`. .. rst-class:: classref-item-separator @@ -738,7 +738,7 @@ Overridable version of :ref:`PhysicsServer2D.body_apply_central_force`, impulse\: :ref:`Vector2`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_apply_central_impulse`. +Overridable version of :ref:`PhysicsServer2D.body_apply_central_impulse()`. .. rst-class:: classref-item-separator @@ -750,7 +750,7 @@ Overridable version of :ref:`PhysicsServer2D.body_apply_central_impulse`, force\: :ref:`Vector2`, position\: :ref:`Vector2`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_apply_force`. +Overridable version of :ref:`PhysicsServer2D.body_apply_force()`. .. rst-class:: classref-item-separator @@ -762,7 +762,7 @@ Overridable version of :ref:`PhysicsServer2D.body_apply_force`, impulse\: :ref:`Vector2`, position\: :ref:`Vector2`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_apply_impulse`. +Overridable version of :ref:`PhysicsServer2D.body_apply_impulse()`. .. rst-class:: classref-item-separator @@ -774,7 +774,7 @@ Overridable version of :ref:`PhysicsServer2D.body_apply_impulse`, torque\: :ref:`float`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_apply_torque`. +Overridable version of :ref:`PhysicsServer2D.body_apply_torque()`. .. rst-class:: classref-item-separator @@ -786,7 +786,7 @@ Overridable version of :ref:`PhysicsServer2D.body_apply_torque`, impulse\: :ref:`float`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_apply_torque_impulse`. +Overridable version of :ref:`PhysicsServer2D.body_apply_torque_impulse()`. .. rst-class:: classref-item-separator @@ -798,7 +798,7 @@ Overridable version of :ref:`PhysicsServer2D.body_apply_torque_impulse`, id\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_attach_canvas_instance_id`. +Overridable version of :ref:`PhysicsServer2D.body_attach_canvas_instance_id()`. .. rst-class:: classref-item-separator @@ -810,7 +810,7 @@ Overridable version of :ref:`PhysicsServer2D.body_attach_canvas_instance_id`, id\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_attach_object_instance_id`. +Overridable version of :ref:`PhysicsServer2D.body_attach_object_instance_id()`. .. rst-class:: classref-item-separator @@ -822,7 +822,7 @@ Overridable version of :ref:`PhysicsServer2D.body_attach_object_instance_id`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_clear_shapes`. +Overridable version of :ref:`PhysicsServer2D.body_clear_shapes()`. .. rst-class:: classref-item-separator @@ -836,7 +836,7 @@ Overridable version of :ref:`PhysicsServer2D.body_clear_shapes`'s internal ``shape_collide`` method. Corresponds to :ref:`PhysicsDirectSpaceState2D.collide_shape`. +Overridable version of :ref:`PhysicsServer2D`'s internal ``shape_collide`` method. Corresponds to :ref:`PhysicsDirectSpaceState2D.collide_shape()`. .. rst-class:: classref-item-separator @@ -848,7 +848,7 @@ Overridable version of :ref:`PhysicsServer2D`'s internal :ref:`RID` **_body_create**\ (\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_create`. +Overridable version of :ref:`PhysicsServer2D.body_create()`. .. rst-class:: classref-item-separator @@ -860,7 +860,7 @@ Overridable version of :ref:`PhysicsServer2D.body_create` **_body_get_canvas_instance_id**\ (\ body\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_get_canvas_instance_id`. +Overridable version of :ref:`PhysicsServer2D.body_get_canvas_instance_id()`. .. rst-class:: classref-item-separator @@ -872,9 +872,9 @@ Overridable version of :ref:`PhysicsServer2D.body_get_canvas_instance_id`\[:ref:`RID`\] **_body_get_collision_exceptions**\ (\ body\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -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`. +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()`. -Overridable version of :ref:`PhysicsServer2D`'s internal ``body_get_collision_exceptions`` method. Corresponds to :ref:`PhysicsBody2D.get_collision_exceptions`. +Overridable version of :ref:`PhysicsServer2D`'s internal ``body_get_collision_exceptions`` method. Corresponds to :ref:`PhysicsBody2D.get_collision_exceptions()`. .. rst-class:: classref-item-separator @@ -886,7 +886,7 @@ Overridable version of :ref:`PhysicsServer2D`'s internal :ref:`int` **_body_get_collision_layer**\ (\ body\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_get_collision_layer`. +Overridable version of :ref:`PhysicsServer2D.body_get_collision_layer()`. .. rst-class:: classref-item-separator @@ -898,7 +898,7 @@ Overridable version of :ref:`PhysicsServer2D.body_get_collision_layer` **_body_get_collision_mask**\ (\ body\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_get_collision_mask`. +Overridable version of :ref:`PhysicsServer2D.body_get_collision_mask()`. .. rst-class:: classref-item-separator @@ -910,7 +910,7 @@ Overridable version of :ref:`PhysicsServer2D.body_get_collision_mask` **_body_get_collision_priority**\ (\ body\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_get_collision_priority`. +Overridable version of :ref:`PhysicsServer2D.body_get_collision_priority()`. .. rst-class:: classref-item-separator @@ -922,7 +922,7 @@ Overridable version of :ref:`PhysicsServer2D.body_get_collision_priority` **_body_get_constant_force**\ (\ body\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_get_constant_force`. +Overridable version of :ref:`PhysicsServer2D.body_get_constant_force()`. .. rst-class:: classref-item-separator @@ -934,7 +934,7 @@ Overridable version of :ref:`PhysicsServer2D.body_get_constant_force` **_body_get_constant_torque**\ (\ body\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_get_constant_torque`. +Overridable version of :ref:`PhysicsServer2D.body_get_constant_torque()`. .. rst-class:: classref-item-separator @@ -960,7 +960,7 @@ Overridable version of :ref:`PhysicsServer2D`'s internal :ref:`CCDMode` **_body_get_continuous_collision_detection_mode**\ (\ body\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_get_continuous_collision_detection_mode`. +Overridable version of :ref:`PhysicsServer2D.body_get_continuous_collision_detection_mode()`. .. rst-class:: classref-item-separator @@ -972,7 +972,7 @@ Overridable version of :ref:`PhysicsServer2D.body_get_continuous_collision_detec :ref:`PhysicsDirectBodyState2D` **_body_get_direct_state**\ (\ body\: :ref:`RID`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_get_direct_state`. +Overridable version of :ref:`PhysicsServer2D.body_get_direct_state()`. .. rst-class:: classref-item-separator @@ -984,7 +984,7 @@ Overridable version of :ref:`PhysicsServer2D.body_get_direct_state` **_body_get_max_contacts_reported**\ (\ body\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_get_max_contacts_reported`. +Overridable version of :ref:`PhysicsServer2D.body_get_max_contacts_reported()`. .. rst-class:: classref-item-separator @@ -996,7 +996,7 @@ Overridable version of :ref:`PhysicsServer2D.body_get_max_contacts_reported` **_body_get_mode**\ (\ body\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_get_mode`. +Overridable version of :ref:`PhysicsServer2D.body_get_mode()`. .. rst-class:: classref-item-separator @@ -1008,7 +1008,7 @@ Overridable version of :ref:`PhysicsServer2D.body_get_mode` **_body_get_object_instance_id**\ (\ body\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_get_object_instance_id`. +Overridable version of :ref:`PhysicsServer2D.body_get_object_instance_id()`. .. rst-class:: classref-item-separator @@ -1020,7 +1020,7 @@ Overridable version of :ref:`PhysicsServer2D.body_get_object_instance_id` **_body_get_param**\ (\ body\: :ref:`RID`, param\: :ref:`BodyParameter`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_get_param`. +Overridable version of :ref:`PhysicsServer2D.body_get_param()`. .. rst-class:: classref-item-separator @@ -1032,7 +1032,7 @@ Overridable version of :ref:`PhysicsServer2D.body_get_param` **_body_get_shape**\ (\ body\: :ref:`RID`, shape_idx\: :ref:`int`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_get_shape`. +Overridable version of :ref:`PhysicsServer2D.body_get_shape()`. .. rst-class:: classref-item-separator @@ -1044,7 +1044,7 @@ Overridable version of :ref:`PhysicsServer2D.body_get_shape` **_body_get_shape_count**\ (\ body\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_get_shape_count`. +Overridable version of :ref:`PhysicsServer2D.body_get_shape_count()`. .. rst-class:: classref-item-separator @@ -1056,7 +1056,7 @@ Overridable version of :ref:`PhysicsServer2D.body_get_shape_count` **_body_get_shape_transform**\ (\ body\: :ref:`RID`, shape_idx\: :ref:`int`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_get_shape_transform`. +Overridable version of :ref:`PhysicsServer2D.body_get_shape_transform()`. .. rst-class:: classref-item-separator @@ -1068,7 +1068,7 @@ Overridable version of :ref:`PhysicsServer2D.body_get_shape_transform` **_body_get_space**\ (\ body\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_get_space`. +Overridable version of :ref:`PhysicsServer2D.body_get_space()`. .. rst-class:: classref-item-separator @@ -1080,7 +1080,7 @@ Overridable version of :ref:`PhysicsServer2D.body_get_space` **_body_get_state**\ (\ body\: :ref:`RID`, state\: :ref:`BodyState`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_get_state`. +Overridable version of :ref:`PhysicsServer2D.body_get_state()`. .. rst-class:: classref-item-separator @@ -1092,7 +1092,7 @@ Overridable version of :ref:`PhysicsServer2D.body_get_state` **_body_is_omitting_force_integration**\ (\ body\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_is_omitting_force_integration`. +Overridable version of :ref:`PhysicsServer2D.body_is_omitting_force_integration()`. .. rst-class:: classref-item-separator @@ -1104,7 +1104,7 @@ Overridable version of :ref:`PhysicsServer2D.body_is_omitting_force_integration< |void| **_body_remove_collision_exception**\ (\ body\: :ref:`RID`, excepted_body\: :ref:`RID`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_remove_collision_exception`. +Overridable version of :ref:`PhysicsServer2D.body_remove_collision_exception()`. .. rst-class:: classref-item-separator @@ -1116,7 +1116,7 @@ Overridable version of :ref:`PhysicsServer2D.body_remove_collision_exception`, shape_idx\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_remove_shape`. +Overridable version of :ref:`PhysicsServer2D.body_remove_shape()`. .. rst-class:: classref-item-separator @@ -1128,7 +1128,7 @@ Overridable version of :ref:`PhysicsServer2D.body_remove_shape`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_reset_mass_properties`. +Overridable version of :ref:`PhysicsServer2D.body_reset_mass_properties()`. .. rst-class:: classref-item-separator @@ -1140,7 +1140,7 @@ Overridable version of :ref:`PhysicsServer2D.body_reset_mass_properties`, axis_velocity\: :ref:`Vector2`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_set_axis_velocity`. +Overridable version of :ref:`PhysicsServer2D.body_set_axis_velocity()`. .. rst-class:: classref-item-separator @@ -1152,7 +1152,7 @@ Overridable version of :ref:`PhysicsServer2D.body_set_axis_velocity`, layer\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_set_collision_layer`. +Overridable version of :ref:`PhysicsServer2D.body_set_collision_layer()`. .. rst-class:: classref-item-separator @@ -1164,7 +1164,7 @@ Overridable version of :ref:`PhysicsServer2D.body_set_collision_layer`, mask\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_set_collision_mask`. +Overridable version of :ref:`PhysicsServer2D.body_set_collision_mask()`. .. rst-class:: classref-item-separator @@ -1176,7 +1176,7 @@ Overridable version of :ref:`PhysicsServer2D.body_set_collision_mask`, priority\: :ref:`float`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_set_collision_priority`. +Overridable version of :ref:`PhysicsServer2D.body_set_collision_priority()`. .. rst-class:: classref-item-separator @@ -1188,7 +1188,7 @@ Overridable version of :ref:`PhysicsServer2D.body_set_collision_priority`, force\: :ref:`Vector2`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_set_constant_force`. +Overridable version of :ref:`PhysicsServer2D.body_set_constant_force()`. .. rst-class:: classref-item-separator @@ -1200,7 +1200,7 @@ Overridable version of :ref:`PhysicsServer2D.body_set_constant_force`, torque\: :ref:`float`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_set_constant_torque`. +Overridable version of :ref:`PhysicsServer2D.body_set_constant_torque()`. .. rst-class:: classref-item-separator @@ -1226,7 +1226,7 @@ Overridable version of :ref:`PhysicsServer2D`'s internal |void| **_body_set_continuous_collision_detection_mode**\ (\ body\: :ref:`RID`, mode\: :ref:`CCDMode`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_set_continuous_collision_detection_mode`. +Overridable version of :ref:`PhysicsServer2D.body_set_continuous_collision_detection_mode()`. .. rst-class:: classref-item-separator @@ -1238,7 +1238,7 @@ Overridable version of :ref:`PhysicsServer2D.body_set_continuous_collision_detec |void| **_body_set_force_integration_callback**\ (\ body\: :ref:`RID`, callable\: :ref:`Callable`, userdata\: :ref:`Variant`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_set_force_integration_callback`. +Overridable version of :ref:`PhysicsServer2D.body_set_force_integration_callback()`. .. rst-class:: classref-item-separator @@ -1250,7 +1250,7 @@ Overridable version of :ref:`PhysicsServer2D.body_set_force_integration_callback |void| **_body_set_max_contacts_reported**\ (\ body\: :ref:`RID`, amount\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_set_max_contacts_reported`. +Overridable version of :ref:`PhysicsServer2D.body_set_max_contacts_reported()`. .. rst-class:: classref-item-separator @@ -1262,7 +1262,7 @@ Overridable version of :ref:`PhysicsServer2D.body_set_max_contacts_reported`, mode\: :ref:`BodyMode`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_set_mode`. +Overridable version of :ref:`PhysicsServer2D.body_set_mode()`. .. rst-class:: classref-item-separator @@ -1274,7 +1274,7 @@ Overridable version of :ref:`PhysicsServer2D.body_set_mode`, enable\: :ref:`bool`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_set_omit_force_integration`. +Overridable version of :ref:`PhysicsServer2D.body_set_omit_force_integration()`. .. rst-class:: classref-item-separator @@ -1286,7 +1286,7 @@ Overridable version of :ref:`PhysicsServer2D.body_set_omit_force_integration`, param\: :ref:`BodyParameter`, value\: :ref:`Variant`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_set_param`. +Overridable version of :ref:`PhysicsServer2D.body_set_param()`. .. rst-class:: classref-item-separator @@ -1312,7 +1312,7 @@ Overridable version of :ref:`PhysicsServer2D`'s internal |void| **_body_set_shape**\ (\ body\: :ref:`RID`, shape_idx\: :ref:`int`, shape\: :ref:`RID`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_set_shape`. +Overridable version of :ref:`PhysicsServer2D.body_set_shape()`. .. rst-class:: classref-item-separator @@ -1324,7 +1324,7 @@ Overridable version of :ref:`PhysicsServer2D.body_set_shape`, shape_idx\: :ref:`int`, enable\: :ref:`bool`, margin\: :ref:`float`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_set_shape_as_one_way_collision`. +Overridable version of :ref:`PhysicsServer2D.body_set_shape_as_one_way_collision()`. .. rst-class:: classref-item-separator @@ -1336,7 +1336,7 @@ Overridable version of :ref:`PhysicsServer2D.body_set_shape_as_one_way_collision |void| **_body_set_shape_disabled**\ (\ body\: :ref:`RID`, shape_idx\: :ref:`int`, disabled\: :ref:`bool`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_set_shape_disabled`. +Overridable version of :ref:`PhysicsServer2D.body_set_shape_disabled()`. .. rst-class:: classref-item-separator @@ -1348,7 +1348,7 @@ Overridable version of :ref:`PhysicsServer2D.body_set_shape_disabled`, shape_idx\: :ref:`int`, transform\: :ref:`Transform2D`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_set_shape_transform`. +Overridable version of :ref:`PhysicsServer2D.body_set_shape_transform()`. .. rst-class:: classref-item-separator @@ -1360,7 +1360,7 @@ Overridable version of :ref:`PhysicsServer2D.body_set_shape_transform`, space\: :ref:`RID`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_set_space`. +Overridable version of :ref:`PhysicsServer2D.body_set_space()`. .. rst-class:: classref-item-separator @@ -1372,7 +1372,7 @@ Overridable version of :ref:`PhysicsServer2D.body_set_space`, state\: :ref:`BodyState`, value\: :ref:`Variant`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.body_set_state`. +Overridable version of :ref:`PhysicsServer2D.body_set_state()`. .. rst-class:: classref-item-separator @@ -1384,9 +1384,9 @@ Overridable version of :ref:`PhysicsServer2D.body_set_state`, callable\: :ref:`Callable`\ ) |virtual| :ref:`πŸ”—` -Assigns the ``body`` to call the given ``callable`` during the synchronization phase of the loop, before :ref:`_step` is called. See also :ref:`_sync`. +Assigns the ``body`` to call the given ``callable`` during the synchronization phase of the loop, before :ref:`_step()` is called. See also :ref:`_sync()`. -Overridable version of :ref:`PhysicsServer2D.body_set_state_sync_callback`. +Overridable version of :ref:`PhysicsServer2D.body_set_state_sync_callback()`. .. rst-class:: classref-item-separator @@ -1398,7 +1398,7 @@ Overridable version of :ref:`PhysicsServer2D.body_set_state_sync_callback` **_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| :ref:`πŸ”—` -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`. +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 @@ -1410,7 +1410,7 @@ Overridable version of :ref:`PhysicsServer2D.body_test_motion` **_capsule_shape_create**\ (\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.capsule_shape_create`. +Overridable version of :ref:`PhysicsServer2D.capsule_shape_create()`. .. rst-class:: classref-item-separator @@ -1422,7 +1422,7 @@ Overridable version of :ref:`PhysicsServer2D.capsule_shape_create` **_circle_shape_create**\ (\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.circle_shape_create`. +Overridable version of :ref:`PhysicsServer2D.circle_shape_create()`. .. rst-class:: classref-item-separator @@ -1434,7 +1434,7 @@ Overridable version of :ref:`PhysicsServer2D.circle_shape_create` **_concave_polygon_shape_create**\ (\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.concave_polygon_shape_create`. +Overridable version of :ref:`PhysicsServer2D.concave_polygon_shape_create()`. .. rst-class:: classref-item-separator @@ -1446,7 +1446,7 @@ Overridable version of :ref:`PhysicsServer2D.concave_polygon_shape_create` **_convex_polygon_shape_create**\ (\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.convex_polygon_shape_create`. +Overridable version of :ref:`PhysicsServer2D.convex_polygon_shape_create()`. .. rst-class:: classref-item-separator @@ -1458,7 +1458,7 @@ Overridable version of :ref:`PhysicsServer2D.convex_polygon_shape_create` **_damped_spring_joint_get_param**\ (\ joint\: :ref:`RID`, param\: :ref:`DampedSpringParam`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.damped_spring_joint_get_param`. +Overridable version of :ref:`PhysicsServer2D.damped_spring_joint_get_param()`. .. rst-class:: classref-item-separator @@ -1470,7 +1470,7 @@ Overridable version of :ref:`PhysicsServer2D.damped_spring_joint_get_param`, param\: :ref:`DampedSpringParam`, value\: :ref:`float`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.damped_spring_joint_set_param`. +Overridable version of :ref:`PhysicsServer2D.damped_spring_joint_set_param()`. .. rst-class:: classref-item-separator @@ -1482,7 +1482,7 @@ Overridable version of :ref:`PhysicsServer2D.damped_spring_joint_set_param` -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`. +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()`. Overridable version of :ref:`PhysicsServer2D`'s internal ``end_sync`` method. @@ -1496,7 +1496,7 @@ Overridable version of :ref:`PhysicsServer2D`'s internal |void| **_finish**\ (\ ) |virtual| :ref:`πŸ”—` -Called when the main loop finalizes to shut down the physics server. See also :ref:`MainLoop._finalize` and :ref:`_init`. +Called when the main loop finalizes to shut down the physics server. See also :ref:`MainLoop._finalize()` and :ref:`_init()`. Overridable version of :ref:`PhysicsServer2D`'s internal ``finish`` method. @@ -1510,7 +1510,7 @@ Overridable version of :ref:`PhysicsServer2D`'s internal |void| **_flush_queries**\ (\ ) |virtual| :ref:`πŸ”—` -Called every physics step before :ref:`_step` to process all remaining queries. +Called every physics step before :ref:`_step()` to process all remaining queries. Overridable version of :ref:`PhysicsServer2D`'s internal ``flush_queries`` method. @@ -1524,7 +1524,7 @@ Overridable version of :ref:`PhysicsServer2D`'s internal |void| **_free_rid**\ (\ rid\: :ref:`RID`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.free_rid`. +Overridable version of :ref:`PhysicsServer2D.free_rid()`. .. rst-class:: classref-item-separator @@ -1536,7 +1536,7 @@ Overridable version of :ref:`PhysicsServer2D.free_rid` **_get_process_info**\ (\ process_info\: :ref:`ProcessInfo`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.get_process_info`. +Overridable version of :ref:`PhysicsServer2D.get_process_info()`. .. rst-class:: classref-item-separator @@ -1548,7 +1548,7 @@ Overridable version of :ref:`PhysicsServer2D.get_process_info` -Called when the main loop is initialized and creates a new instance of this physics server. See also :ref:`MainLoop._initialize` and :ref:`_finish`. +Called when the main loop is initialized and creates a new instance of this physics server. See also :ref:`MainLoop._initialize()` and :ref:`_finish()`. Overridable version of :ref:`PhysicsServer2D`'s internal ``init`` method. @@ -1562,7 +1562,7 @@ Overridable version of :ref:`PhysicsServer2D`'s internal :ref:`bool` **_is_flushing_queries**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Overridable method that should return ``true`` when the physics server is processing queries. See also :ref:`_flush_queries`. +Overridable method that should return ``true`` when the physics server is processing queries. See also :ref:`_flush_queries()`. Overridable version of :ref:`PhysicsServer2D`'s internal ``is_flushing_queries`` method. @@ -1576,7 +1576,7 @@ Overridable version of :ref:`PhysicsServer2D`'s internal |void| **_joint_clear**\ (\ joint\: :ref:`RID`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.joint_clear`. +Overridable version of :ref:`PhysicsServer2D.joint_clear()`. .. rst-class:: classref-item-separator @@ -1588,7 +1588,7 @@ Overridable version of :ref:`PhysicsServer2D.joint_clear` **_joint_create**\ (\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.joint_create`. +Overridable version of :ref:`PhysicsServer2D.joint_create()`. .. rst-class:: classref-item-separator @@ -1600,7 +1600,7 @@ Overridable version of :ref:`PhysicsServer2D.joint_create`, disable\: :ref:`bool`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.joint_disable_collisions_between_bodies`. +Overridable version of :ref:`PhysicsServer2D.joint_disable_collisions_between_bodies()`. .. rst-class:: classref-item-separator @@ -1612,7 +1612,7 @@ Overridable version of :ref:`PhysicsServer2D.joint_disable_collisions_between_bo :ref:`float` **_joint_get_param**\ (\ joint\: :ref:`RID`, param\: :ref:`JointParam`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.joint_get_param`. +Overridable version of :ref:`PhysicsServer2D.joint_get_param()`. .. rst-class:: classref-item-separator @@ -1624,7 +1624,7 @@ Overridable version of :ref:`PhysicsServer2D.joint_get_param` **_joint_get_type**\ (\ joint\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.joint_get_type`. +Overridable version of :ref:`PhysicsServer2D.joint_get_type()`. .. rst-class:: classref-item-separator @@ -1636,7 +1636,7 @@ Overridable version of :ref:`PhysicsServer2D.joint_get_type` **_joint_is_disabled_collisions_between_bodies**\ (\ joint\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.joint_is_disabled_collisions_between_bodies`. +Overridable version of :ref:`PhysicsServer2D.joint_is_disabled_collisions_between_bodies()`. .. rst-class:: classref-item-separator @@ -1648,7 +1648,7 @@ Overridable version of :ref:`PhysicsServer2D.joint_is_disabled_collisions_betwee |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| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.joint_make_damped_spring`. +Overridable version of :ref:`PhysicsServer2D.joint_make_damped_spring()`. .. rst-class:: classref-item-separator @@ -1660,7 +1660,7 @@ Overridable version of :ref:`PhysicsServer2D.joint_make_damped_spring`, a_groove1\: :ref:`Vector2`, a_groove2\: :ref:`Vector2`, b_anchor\: :ref:`Vector2`, body_a\: :ref:`RID`, body_b\: :ref:`RID`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.joint_make_groove`. +Overridable version of :ref:`PhysicsServer2D.joint_make_groove()`. .. rst-class:: classref-item-separator @@ -1672,7 +1672,7 @@ Overridable version of :ref:`PhysicsServer2D.joint_make_groove`, anchor\: :ref:`Vector2`, body_a\: :ref:`RID`, body_b\: :ref:`RID`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.joint_make_pin`. +Overridable version of :ref:`PhysicsServer2D.joint_make_pin()`. .. rst-class:: classref-item-separator @@ -1684,7 +1684,7 @@ Overridable version of :ref:`PhysicsServer2D.joint_make_pin`, param\: :ref:`JointParam`, value\: :ref:`float`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.joint_set_param`. +Overridable version of :ref:`PhysicsServer2D.joint_set_param()`. .. rst-class:: classref-item-separator @@ -1696,7 +1696,7 @@ Overridable version of :ref:`PhysicsServer2D.joint_set_param` **_pin_joint_get_flag**\ (\ joint\: :ref:`RID`, flag\: :ref:`PinJointFlag`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.pin_joint_get_flag`. +Overridable version of :ref:`PhysicsServer2D.pin_joint_get_flag()`. .. rst-class:: classref-item-separator @@ -1708,7 +1708,7 @@ Overridable version of :ref:`PhysicsServer2D.pin_joint_get_flag` **_pin_joint_get_param**\ (\ joint\: :ref:`RID`, param\: :ref:`PinJointParam`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.pin_joint_get_param`. +Overridable version of :ref:`PhysicsServer2D.pin_joint_get_param()`. .. rst-class:: classref-item-separator @@ -1720,7 +1720,7 @@ Overridable version of :ref:`PhysicsServer2D.pin_joint_get_param`, flag\: :ref:`PinJointFlag`, enabled\: :ref:`bool`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.pin_joint_set_flag`. +Overridable version of :ref:`PhysicsServer2D.pin_joint_set_flag()`. .. rst-class:: classref-item-separator @@ -1732,7 +1732,7 @@ Overridable version of :ref:`PhysicsServer2D.pin_joint_set_flag`, param\: :ref:`PinJointParam`, value\: :ref:`float`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.pin_joint_set_param`. +Overridable version of :ref:`PhysicsServer2D.pin_joint_set_param()`. .. rst-class:: classref-item-separator @@ -1744,7 +1744,7 @@ Overridable version of :ref:`PhysicsServer2D.pin_joint_set_param` **_rectangle_shape_create**\ (\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.rectangle_shape_create`. +Overridable version of :ref:`PhysicsServer2D.rectangle_shape_create()`. .. rst-class:: classref-item-separator @@ -1756,7 +1756,7 @@ Overridable version of :ref:`PhysicsServer2D.rectangle_shape_create` **_segment_shape_create**\ (\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.segment_shape_create`. +Overridable version of :ref:`PhysicsServer2D.segment_shape_create()`. .. rst-class:: classref-item-separator @@ -1768,7 +1768,7 @@ Overridable version of :ref:`PhysicsServer2D.segment_shape_create` **_separation_ray_shape_create**\ (\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.separation_ray_shape_create`. +Overridable version of :ref:`PhysicsServer2D.separation_ray_shape_create()`. .. rst-class:: classref-item-separator @@ -1780,7 +1780,7 @@ Overridable version of :ref:`PhysicsServer2D.separation_ray_shape_create`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.set_active`. +Overridable version of :ref:`PhysicsServer2D.set_active()`. .. rst-class:: classref-item-separator @@ -1794,7 +1794,7 @@ Overridable version of :ref:`PhysicsServer2D.set_active`'s internal ``shape_collide`` method. Corresponds to :ref:`PhysicsDirectSpaceState2D.collide_shape`. +Overridable version of :ref:`PhysicsServer2D`'s internal ``shape_collide`` method. Corresponds to :ref:`PhysicsDirectSpaceState2D.collide_shape()`. .. rst-class:: classref-item-separator @@ -1820,7 +1820,7 @@ Overridable version of :ref:`PhysicsServer2D`'s internal :ref:`Variant` **_shape_get_data**\ (\ shape\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.shape_get_data`. +Overridable version of :ref:`PhysicsServer2D.shape_get_data()`. .. rst-class:: classref-item-separator @@ -1832,7 +1832,7 @@ Overridable version of :ref:`PhysicsServer2D.shape_get_data` **_shape_get_type**\ (\ shape\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.shape_get_type`. +Overridable version of :ref:`PhysicsServer2D.shape_get_type()`. .. rst-class:: classref-item-separator @@ -1858,7 +1858,7 @@ Overridable version of :ref:`PhysicsServer2D`'s internal |void| **_shape_set_data**\ (\ shape\: :ref:`RID`, data\: :ref:`Variant`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.shape_set_data`. +Overridable version of :ref:`PhysicsServer2D.shape_set_data()`. .. rst-class:: classref-item-separator @@ -1870,7 +1870,7 @@ Overridable version of :ref:`PhysicsServer2D.shape_set_data` **_space_create**\ (\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.space_create`. +Overridable version of :ref:`PhysicsServer2D.space_create()`. .. rst-class:: classref-item-separator @@ -1882,7 +1882,7 @@ Overridable version of :ref:`PhysicsServer2D.space_create` **_space_get_contact_count**\ (\ space\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -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`. +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()`. Overridable version of :ref:`PhysicsServer2D`'s internal ``space_get_contact_count`` method. @@ -1896,7 +1896,7 @@ Overridable version of :ref:`PhysicsServer2D`'s internal :ref:`PackedVector2Array` **_space_get_contacts**\ (\ space\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -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`. +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()`. Overridable version of :ref:`PhysicsServer2D`'s internal ``space_get_contacts`` method. @@ -1910,7 +1910,7 @@ Overridable version of :ref:`PhysicsServer2D`'s internal :ref:`PhysicsDirectSpaceState2D` **_space_get_direct_state**\ (\ space\: :ref:`RID`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.space_get_direct_state`. +Overridable version of :ref:`PhysicsServer2D.space_get_direct_state()`. .. rst-class:: classref-item-separator @@ -1922,7 +1922,7 @@ Overridable version of :ref:`PhysicsServer2D.space_get_direct_state` **_space_get_param**\ (\ space\: :ref:`RID`, param\: :ref:`SpaceParameter`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.space_get_param`. +Overridable version of :ref:`PhysicsServer2D.space_get_param()`. .. rst-class:: classref-item-separator @@ -1934,7 +1934,7 @@ Overridable version of :ref:`PhysicsServer2D.space_get_param` **_space_is_active**\ (\ space\: :ref:`RID`\ ) |virtual| |const| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.space_is_active`. +Overridable version of :ref:`PhysicsServer2D.space_is_active()`. .. rst-class:: classref-item-separator @@ -1946,7 +1946,7 @@ Overridable version of :ref:`PhysicsServer2D.space_is_active`, active\: :ref:`bool`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.space_set_active`. +Overridable version of :ref:`PhysicsServer2D.space_set_active()`. .. rst-class:: classref-item-separator @@ -1972,7 +1972,7 @@ Overridable version of :ref:`PhysicsServer2D`'s internal |void| **_space_set_param**\ (\ space\: :ref:`RID`, param\: :ref:`SpaceParameter`, value\: :ref:`float`\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.space_set_param`. +Overridable version of :ref:`PhysicsServer2D.space_set_param()`. .. rst-class:: classref-item-separator @@ -1984,7 +1984,7 @@ Overridable version of :ref:`PhysicsServer2D.space_set_param`\ ) |virtual| :ref:`πŸ”—` -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`. +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()`. Overridable version of :ref:`PhysicsServer2D`'s internal ``step`` method. @@ -1998,7 +1998,7 @@ Overridable version of :ref:`PhysicsServer2D`'s internal |void| **_sync**\ (\ ) |virtual| :ref:`πŸ”—` -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`. +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()`. Overridable version of :ref:`PhysicsServer2D`'s internal ``sync`` method. @@ -2012,7 +2012,7 @@ Overridable version of :ref:`PhysicsServer2D`'s internal :ref:`RID` **_world_boundary_shape_create**\ (\ ) |virtual| :ref:`πŸ”—` -Overridable version of :ref:`PhysicsServer2D.world_boundary_shape_create`. +Overridable version of :ref:`PhysicsServer2D.world_boundary_shape_create()`. .. rst-class:: classref-item-separator @@ -2024,7 +2024,7 @@ Overridable version of :ref:`PhysicsServer2D.world_boundary_shape_create` **body_test_motion_is_excluding_body**\ (\ body\: :ref:`RID`\ ) |const| :ref:`πŸ”—` -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`. +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 @@ -2036,7 +2036,7 @@ Returns ``true`` if the body with the given :ref:`RID` is being exclu :ref:`bool` **body_test_motion_is_excluding_object**\ (\ object\: :ref:`int`\ ) |const| :ref:`πŸ”—` -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`. +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 c63ca7d0e..6448f31f5 100644 --- a/classes/class_physicsserver3d.rst +++ b/classes/class_physicsserver3d.rst @@ -1893,7 +1893,7 @@ Removes all shapes from an area. It does not delete the shapes, so they can be r Creates a 3D area object in the physics server, and returns the :ref:`RID` that identifies it. The default settings for the created area include a collision layer and mask set to ``1``, and ``monitorable`` set to ``false``. -Use :ref:`area_add_shape` to add shapes to it, use :ref:`area_set_transform` to set its transform, and use :ref:`area_set_space` to add the area to a space. If you want the area to be detectable use :ref:`area_set_monitorable`. +Use :ref:`area_add_shape()` to add shapes to it, use :ref:`area_set_transform()` to set its transform, and use :ref:`area_set_space()` to add the area to a space. If you want the area to be detectable use :ref:`area_set_monitorable()`. .. rst-class:: classref-item-separator @@ -2211,7 +2211,7 @@ Adds a body to the list of bodies exempt from collisions. Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with ``body_set_constant_force(body, Vector3(0, 0, 0))``. -This is equivalent to using :ref:`body_add_constant_force` at the body's center of mass. +This is equivalent to using :ref:`body_add_constant_force()` at the body's center of mass. .. rst-class:: classref-item-separator @@ -2263,7 +2263,7 @@ Adds a shape to the body, along with a transform matrix. Shapes are usually refe Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. -This is equivalent to using :ref:`body_apply_force` at the body's center of mass. +This is equivalent to using :ref:`body_apply_force()` at the body's center of mass. .. rst-class:: classref-item-separator @@ -2279,7 +2279,7 @@ Applies a directional impulse without affecting rotation. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). -This is equivalent to using :ref:`body_apply_impulse` at the body's center of mass. +This is equivalent to using :ref:`body_apply_impulse()` at the body's center of mass. .. rst-class:: classref-item-separator @@ -2373,7 +2373,7 @@ Removes all shapes from a body. Creates a 3D body object in the physics server, and returns the :ref:`RID` that identifies it. The default settings for the created area include a collision layer and mask set to ``1``, and body mode set to :ref:`BODY_MODE_RIGID`. -Use :ref:`body_add_shape` to add shapes to it, use :ref:`body_set_state` to set its transform, and use :ref:`body_set_space` to add the body to a space. +Use :ref:`body_add_shape()` to add shapes to it, use :ref:`body_set_state()` to set its transform, and use :ref:`body_set_space()` to add the body to a space. .. rst-class:: classref-item-separator @@ -2423,7 +2423,7 @@ Returns the body's collision priority. Returns the body's total constant positional forces applied during each physics update. -See :ref:`body_add_constant_force` and :ref:`body_add_constant_central_force`. +See :ref:`body_add_constant_force()` and :ref:`body_add_constant_central_force()`. .. rst-class:: classref-item-separator @@ -2437,7 +2437,7 @@ See :ref:`body_add_constant_force`. +See :ref:`body_add_constant_torque()`. .. rst-class:: classref-item-separator @@ -2461,7 +2461,7 @@ Returns the :ref:`PhysicsDirectBodyState3D` of t :ref:`int` **body_get_max_contacts_reported**\ (\ body\: :ref:`RID`\ ) |const| :ref:`πŸ”—` -Returns the maximum contacts that can be reported. See :ref:`body_set_max_contacts_reported`. +Returns the maximum contacts that can be reported. See :ref:`body_set_max_contacts_reported()`. .. rst-class:: classref-item-separator @@ -2595,7 +2595,7 @@ If ``true``, the continuous collision detection mode is enabled. :ref:`bool` **body_is_omitting_force_integration**\ (\ body\: :ref:`RID`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body is omitting the standard force integration. See :ref:`body_set_omit_force_integration`. +Returns ``true`` if the body is omitting the standard force integration. See :ref:`body_set_omit_force_integration()`. .. rst-class:: classref-item-separator @@ -2633,7 +2633,7 @@ Removes a shape from a body. The shape is not deleted, so it can be reused after |void| **body_reset_mass_properties**\ (\ body\: :ref:`RID`\ ) :ref:`πŸ”—` -Restores the default inertia and center of mass based on shapes to cancel any custom values previously set using :ref:`body_set_param`. +Restores the default inertia and center of mass based on shapes to cancel any custom values previously set using :ref:`body_set_param()`. .. rst-class:: classref-item-separator @@ -2709,7 +2709,7 @@ Sets the body's collision priority. Sets the body's total constant positional forces applied during each physics update. -See :ref:`body_add_constant_force` and :ref:`body_add_constant_central_force`. +See :ref:`body_add_constant_force()` and :ref:`body_add_constant_central_force()`. .. rst-class:: classref-item-separator @@ -2723,7 +2723,7 @@ See :ref:`body_add_constant_force`. +See :ref:`body_add_constant_torque()`. .. rst-class:: classref-item-separator @@ -2751,7 +2751,7 @@ Continuous collision detection tries to predict where a moving body will collide 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. +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. If ``userdata`` is not ``null``, the function ``callable`` must take the following two parameters: @@ -2795,7 +2795,7 @@ Sets the body mode, from one of the :ref:`BodyMode`, enable\: :ref:`bool`\ ) :ref:`πŸ”—` -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. +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. @@ -2871,7 +2871,7 @@ Sets the transform matrix for a body shape. |void| **body_set_space**\ (\ body\: :ref:`RID`, space\: :ref:`RID`\ ) :ref:`πŸ”—` -Assigns a space to the body (see :ref:`space_create`). +Assigns a space to the body (see :ref:`space_create()`). .. rst-class:: classref-item-separator @@ -3257,7 +3257,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`\ ) :ref:`πŸ”—` -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. +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 @@ -3459,7 +3459,7 @@ Returns the type of shape (see :ref:`ShapeType` |void| **shape_set_data**\ (\ shape\: :ref:`RID`, data\: :ref:`Variant`\ ) :ref:`πŸ”—` -Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created :ref:`shape_get_type`. +Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created :ref:`shape_get_type()`. .. rst-class:: classref-item-separator @@ -3705,7 +3705,7 @@ Moves the given soft body point to a position in global coordinates. Pins or unpins the given soft body point based on the value of ``pin``. -\ **Note:** Pinning a point effectively makes it kinematic, preventing it from being affected by forces, but you can still move it using :ref:`soft_body_move_point`. +\ **Note:** Pinning a point effectively makes it kinematic, preventing it from being affected by forces, but you can still move it using :ref:`soft_body_move_point()`. .. rst-class:: classref-item-separator @@ -3851,7 +3851,7 @@ Sets the simulation precision of the given soft body. Increasing this value will |void| **soft_body_set_space**\ (\ body\: :ref:`RID`, space\: :ref:`RID`\ ) :ref:`πŸ”—` -Assigns a space to the given soft body (see :ref:`space_create`). +Assigns a space to the given soft body (see :ref:`space_create()`). .. rst-class:: classref-item-separator @@ -3913,7 +3913,7 @@ Requests that the physics server updates the rendering server with the latest po :ref:`RID` **space_create**\ (\ ) :ref:`πŸ”—` -Creates a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with :ref:`area_set_space`, or to a body with :ref:`body_set_space`. +Creates a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with :ref:`area_set_space()`, or to a body with :ref:`body_set_space()`. .. rst-class:: classref-item-separator diff --git a/classes/class_physicsserver3drenderingserverhandler.rst b/classes/class_physicsserver3drenderingserverhandler.rst index 19046b42b..2e545d201 100644 --- a/classes/class_physicsserver3drenderingserverhandler.rst +++ b/classes/class_physicsserver3drenderingserverhandler.rst @@ -12,7 +12,7 @@ PhysicsServer3DRenderingServerHandler **Inherits:** :ref:`Object` -A class used to provide :ref:`PhysicsServer3DExtension._soft_body_update_rendering_server` with a rendering handler for soft bodies. +A class used to provide :ref:`PhysicsServer3DExtension._soft_body_update_rendering_server()` with a rendering handler for soft bodies. .. rst-class:: classref-reftable-group diff --git a/classes/class_physicsshapequeryparameters2d.rst b/classes/class_physicsshapequeryparameters2d.rst index 793282d97..16d049161 100644 --- a/classes/class_physicsshapequeryparameters2d.rst +++ b/classes/class_physicsshapequeryparameters2d.rst @@ -12,14 +12,14 @@ PhysicsShapeQueryParameters2D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Provides parameters for :ref:`PhysicsDirectSpaceState2D.intersect_shape`. +Provides parameters for :ref:`PhysicsDirectSpaceState2D.intersect_shape()`. .. rst-class:: classref-introduction-group Description ----------- -By changing various properties of this object, such as the shape, you can configure the parameters for :ref:`PhysicsDirectSpaceState2D.intersect_shape`. +By changing various properties of this object, such as the shape, you can configure the parameters for :ref:`PhysicsDirectSpaceState2D.intersect_shape()`. .. rst-class:: classref-reftable-group @@ -120,7 +120,7 @@ The physics layers the query will detect (as a bitmask). By default, all collisi - |void| **set_exclude**\ (\ value\: :ref:`Array`\[:ref:`RID`\]\ ) - :ref:`Array`\[:ref:`RID`\] **get_exclude**\ (\ ) -The list of object :ref:`RID`\ s that will be excluded from collisions. Use :ref:`CollisionObject2D.get_rid` to get the :ref:`RID` associated with a :ref:`CollisionObject2D`-derived node. +The list of object :ref:`RID`\ s that will be excluded from collisions. Use :ref:`CollisionObject2D.get_rid()` to get the :ref:`RID` associated with a :ref:`CollisionObject2D`-derived node. \ **Note:** The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then assign it to the property again. diff --git a/classes/class_physicsshapequeryparameters3d.rst b/classes/class_physicsshapequeryparameters3d.rst index bc2b871df..1396e1626 100644 --- a/classes/class_physicsshapequeryparameters3d.rst +++ b/classes/class_physicsshapequeryparameters3d.rst @@ -12,14 +12,14 @@ PhysicsShapeQueryParameters3D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Provides parameters for :ref:`PhysicsDirectSpaceState3D.intersect_shape`. +Provides parameters for :ref:`PhysicsDirectSpaceState3D.intersect_shape()`. .. rst-class:: classref-introduction-group Description ----------- -By changing various properties of this object, such as the shape, you can configure the parameters for :ref:`PhysicsDirectSpaceState3D.intersect_shape`. +By changing various properties of this object, such as the shape, you can configure the parameters for :ref:`PhysicsDirectSpaceState3D.intersect_shape()`. .. rst-class:: classref-reftable-group @@ -120,7 +120,7 @@ The physics layers the query will detect (as a bitmask). By default, all collisi - |void| **set_exclude**\ (\ value\: :ref:`Array`\[:ref:`RID`\]\ ) - :ref:`Array`\[:ref:`RID`\] **get_exclude**\ (\ ) -The list of object :ref:`RID`\ s that will be excluded from collisions. Use :ref:`CollisionObject3D.get_rid` to get the :ref:`RID` associated with a :ref:`CollisionObject3D`-derived node. +The list of object :ref:`RID`\ s that will be excluded from collisions. Use :ref:`CollisionObject3D.get_rid()` to get the :ref:`RID` associated with a :ref:`CollisionObject3D`-derived node. \ **Note:** The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then assign it to the property again. diff --git a/classes/class_physicstestmotionparameters2d.rst b/classes/class_physicstestmotionparameters2d.rst index 7c57d1d96..a2ef9d11d 100644 --- a/classes/class_physicstestmotionparameters2d.rst +++ b/classes/class_physicstestmotionparameters2d.rst @@ -12,14 +12,14 @@ PhysicsTestMotionParameters2D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Provides parameters for :ref:`PhysicsServer2D.body_test_motion`. +Provides parameters for :ref:`PhysicsServer2D.body_test_motion()`. .. rst-class:: classref-introduction-group Description ----------- -By changing various properties of this object, such as the motion, you can configure the parameters for :ref:`PhysicsServer2D.body_test_motion`. +By changing various properties of this object, such as the motion, you can configure the parameters for :ref:`PhysicsServer2D.body_test_motion()`. .. rst-class:: classref-reftable-group @@ -84,7 +84,7 @@ If set to ``false``, shapes of type :ref:`PhysicsServer2D.SHAPE_SEPARATION_RAY`\[:ref:`RID`\]\ ) - :ref:`Array`\[:ref:`RID`\] **get_exclude_bodies**\ (\ ) -Optional array of body :ref:`RID` to exclude from collision. Use :ref:`CollisionObject2D.get_rid` to get the :ref:`RID` associated with a :ref:`CollisionObject2D`-derived node. +Optional array of body :ref:`RID` to exclude from collision. Use :ref:`CollisionObject2D.get_rid()` to get the :ref:`RID` associated with a :ref:`CollisionObject2D`-derived node. .. rst-class:: classref-item-separator @@ -101,7 +101,7 @@ Optional array of body :ref:`RID` to exclude from collision. Use :ref - |void| **set_exclude_objects**\ (\ value\: :ref:`Array`\[:ref:`int`\]\ ) - :ref:`Array`\[:ref:`int`\] **get_exclude_objects**\ (\ ) -Optional array of object unique instance ID to exclude from collision. See :ref:`Object.get_instance_id`. +Optional array of object unique instance ID to exclude from collision. See :ref:`Object.get_instance_id()`. .. rst-class:: classref-item-separator diff --git a/classes/class_physicstestmotionparameters3d.rst b/classes/class_physicstestmotionparameters3d.rst index e9325fa67..b96ae769c 100644 --- a/classes/class_physicstestmotionparameters3d.rst +++ b/classes/class_physicstestmotionparameters3d.rst @@ -12,14 +12,14 @@ PhysicsTestMotionParameters3D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Provides parameters for :ref:`PhysicsServer3D.body_test_motion`. +Provides parameters for :ref:`PhysicsServer3D.body_test_motion()`. .. rst-class:: classref-introduction-group Description ----------- -By changing various properties of this object, such as the motion, you can configure the parameters for :ref:`PhysicsServer3D.body_test_motion`. +By changing various properties of this object, such as the motion, you can configure the parameters for :ref:`PhysicsServer3D.body_test_motion()`. .. rst-class:: classref-reftable-group @@ -86,7 +86,7 @@ If set to ``false``, shapes of type :ref:`PhysicsServer3D.SHAPE_SEPARATION_RAY`\[:ref:`RID`\]\ ) - :ref:`Array`\[:ref:`RID`\] **get_exclude_bodies**\ (\ ) -Optional array of body :ref:`RID` to exclude from collision. Use :ref:`CollisionObject3D.get_rid` to get the :ref:`RID` associated with a :ref:`CollisionObject3D`-derived node. +Optional array of body :ref:`RID` to exclude from collision. Use :ref:`CollisionObject3D.get_rid()` to get the :ref:`RID` associated with a :ref:`CollisionObject3D`-derived node. .. rst-class:: classref-item-separator @@ -103,7 +103,7 @@ Optional array of body :ref:`RID` to exclude from collision. Use :ref - |void| **set_exclude_objects**\ (\ value\: :ref:`Array`\[:ref:`int`\]\ ) - :ref:`Array`\[:ref:`int`\] **get_exclude_objects**\ (\ ) -Optional array of object unique instance ID to exclude from collision. See :ref:`Object.get_instance_id`. +Optional array of object unique instance ID to exclude from collision. See :ref:`Object.get_instance_id()`. .. rst-class:: classref-item-separator diff --git a/classes/class_physicstestmotionresult2d.rst b/classes/class_physicstestmotionresult2d.rst index 7d1417171..20da6056f 100644 --- a/classes/class_physicstestmotionresult2d.rst +++ b/classes/class_physicstestmotionresult2d.rst @@ -12,14 +12,14 @@ PhysicsTestMotionResult2D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Describes the motion and collision result from :ref:`PhysicsServer2D.body_test_motion`. +Describes the motion and collision result from :ref:`PhysicsServer2D.body_test_motion()`. .. rst-class:: classref-introduction-group Description ----------- -Describes the motion and collision result from :ref:`PhysicsServer2D.body_test_motion`. +Describes the motion and collision result from :ref:`PhysicsServer2D.body_test_motion()`. .. rst-class:: classref-reftable-group @@ -84,7 +84,7 @@ Returns the colliding body's attached :ref:`Object`, if a collisio :ref:`int` **get_collider_id**\ (\ ) |const| :ref:`πŸ”—` -Returns the unique instance ID of the colliding body's attached :ref:`Object`, if a collision occurred. See :ref:`Object.get_instance_id`. +Returns the unique instance ID of the colliding body's attached :ref:`Object`, if a collision occurred. See :ref:`Object.get_instance_id()`. .. rst-class:: classref-item-separator diff --git a/classes/class_physicstestmotionresult3d.rst b/classes/class_physicstestmotionresult3d.rst index 2608eb0ea..f3117d52b 100644 --- a/classes/class_physicstestmotionresult3d.rst +++ b/classes/class_physicstestmotionresult3d.rst @@ -12,14 +12,14 @@ PhysicsTestMotionResult3D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Describes the motion and collision result from :ref:`PhysicsServer3D.body_test_motion`. +Describes the motion and collision result from :ref:`PhysicsServer3D.body_test_motion()`. .. rst-class:: classref-introduction-group Description ----------- -Describes the motion and collision result from :ref:`PhysicsServer3D.body_test_motion`. +Describes the motion and collision result from :ref:`PhysicsServer3D.body_test_motion()`. .. rst-class:: classref-reftable-group @@ -86,7 +86,7 @@ Returns the colliding body's attached :ref:`Object` given a collis :ref:`int` **get_collider_id**\ (\ collision_index\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Returns the unique instance ID of the colliding body's attached :ref:`Object` given a collision index (the deepest collision by default), if a collision occurred. See :ref:`Object.get_instance_id`. +Returns the unique instance ID of the colliding body's attached :ref:`Object` given a collision index (the deepest collision by default), if a collision occurred. See :ref:`Object.get_instance_id()`. .. rst-class:: classref-item-separator diff --git a/classes/class_plane.rst b/classes/class_plane.rst index cd689fd05..dee63ec30 100644 --- a/classes/class_plane.rst +++ b/classes/class_plane.rst @@ -394,7 +394,7 @@ Returns the intersection point of a segment from position ``from`` to position ` :ref:`bool` **is_equal_approx**\ (\ to_plane\: :ref:`Plane`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this plane and ``to_plane`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. +Returns ``true`` if this plane and ``to_plane`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx()` on each component. .. rst-class:: classref-item-separator @@ -406,7 +406,7 @@ Returns ``true`` if this plane and ``to_plane`` are approximately equal, by runn :ref:`bool` **is_finite**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this plane is finite, by calling :ref:`@GlobalScope.is_finite` on each component. +Returns ``true`` if this plane is finite, by calling :ref:`@GlobalScope.is_finite()` on each component. .. rst-class:: classref-item-separator @@ -461,7 +461,7 @@ Operator Descriptions Returns ``true`` if the planes are not equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. rst-class:: classref-item-separator @@ -475,7 +475,7 @@ Returns ``true`` if the planes are not equal. Inversely transforms (multiplies) the **Plane** by the given :ref:`Transform3D` transformation matrix. -\ ``plane * transform`` is equivalent to ``transform.affine_inverse() * plane``. See :ref:`Transform3D.affine_inverse`. +\ ``plane * transform`` is equivalent to ``transform.affine_inverse() * plane``. See :ref:`Transform3D.affine_inverse()`. .. rst-class:: classref-item-separator @@ -489,7 +489,7 @@ Inversely transforms (multiplies) the **Plane** by the given :ref:`Transform3D` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. rst-class:: classref-item-separator diff --git a/classes/class_popupmenu.rst b/classes/class_popupmenu.rst index 4f2e28bc0..1dac31e99 100644 --- a/classes/class_popupmenu.rst +++ b/classes/class_popupmenu.rst @@ -451,7 +451,7 @@ The number of items currently in the list. If ``true``, :ref:`MenuBar` will use native menu when supported. -\ **Note:** If **PopupMenu** is linked to :ref:`StatusIndicator`, :ref:`MenuBar`, or another **PopupMenu** item it can use native menu regardless of this property, use :ref:`is_native_menu` to check it. +\ **Note:** If **PopupMenu** is linked to :ref:`StatusIndicator`, :ref:`MenuBar`, or another **PopupMenu** item it can use native menu regardless of this property, use :ref:`is_native_menu()` to check it. .. rst-class:: classref-item-separator @@ -520,9 +520,9 @@ Returns ``true`` if an item was successfully activated. Adds a new checkable item with text ``label``. -An ``id`` can optionally be provided, as well as an accelerator (``accel``). If no ``id`` is provided, one will be created from the index. If no ``accel`` is provided, then the default value of 0 (corresponding to :ref:`@GlobalScope.KEY_NONE`) will be assigned to the item (which means it won't have any accelerator). See :ref:`get_item_accelerator` for more info on accelerators. +An ``id`` can optionally be provided, as well as an accelerator (``accel``). If no ``id`` is provided, one will be created from the index. If no ``accel`` is provided, then the default value of 0 (corresponding to :ref:`@GlobalScope.KEY_NONE`) will be assigned to the item (which means it won't have any accelerator). See :ref:`get_item_accelerator()` for more info on accelerators. -\ **Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`set_item_checked` for more info on how to control it. +\ **Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`set_item_checked()` for more info on how to control it. .. rst-class:: classref-item-separator @@ -538,7 +538,7 @@ Adds a new checkable item and assigns the specified :ref:`Shortcut` for more info on how to control it. +\ **Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`set_item_checked()` for more info on how to control it. .. rst-class:: classref-item-separator @@ -552,9 +552,9 @@ An ``id`` can optionally be provided. If no ``id`` is provided, one will be crea Adds a new checkable item with text ``label`` and icon ``texture``. -An ``id`` can optionally be provided, as well as an accelerator (``accel``). If no ``id`` is provided, one will be created from the index. If no ``accel`` is provided, then the default value of 0 (corresponding to :ref:`@GlobalScope.KEY_NONE`) will be assigned to the item (which means it won't have any accelerator). See :ref:`get_item_accelerator` for more info on accelerators. +An ``id`` can optionally be provided, as well as an accelerator (``accel``). If no ``id`` is provided, one will be created from the index. If no ``accel`` is provided, then the default value of 0 (corresponding to :ref:`@GlobalScope.KEY_NONE`) will be assigned to the item (which means it won't have any accelerator). See :ref:`get_item_accelerator()` for more info on accelerators. -\ **Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`set_item_checked` for more info on how to control it. +\ **Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`set_item_checked()` for more info on how to control it. .. rst-class:: classref-item-separator @@ -570,7 +570,7 @@ Adds a new checkable item and assigns the specified :ref:`Shortcut` for more info on how to control it. +\ **Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`set_item_checked()` for more info on how to control it. .. rst-class:: classref-item-separator @@ -584,7 +584,7 @@ An ``id`` can optionally be provided. If no ``id`` is provided, one will be crea Adds a new item with text ``label`` and icon ``texture``. -An ``id`` can optionally be provided, as well as an accelerator (``accel``). If no ``id`` is provided, one will be created from the index. If no ``accel`` is provided, then the default value of 0 (corresponding to :ref:`@GlobalScope.KEY_NONE`) will be assigned to the item (which means it won't have any accelerator). See :ref:`get_item_accelerator` for more info on accelerators. +An ``id`` can optionally be provided, as well as an accelerator (``accel``). If no ``id`` is provided, one will be created from the index. If no ``accel`` is provided, then the default value of 0 (corresponding to :ref:`@GlobalScope.KEY_NONE`) will be assigned to the item (which means it won't have any accelerator). See :ref:`get_item_accelerator()` for more info on accelerators. .. rst-class:: classref-item-separator @@ -596,7 +596,7 @@ An ``id`` can optionally be provided, as well as an accelerator (``accel``). If |void| **add_icon_radio_check_item**\ (\ texture\: :ref:`Texture2D`, label\: :ref:`String`, id\: :ref:`int` = -1, accel\: :ref:`Key` = 0\ ) :ref:`πŸ”—` -Same as :ref:`add_icon_check_item`, but uses a radio check button. +Same as :ref:`add_icon_check_item()`, but uses a radio check button. .. rst-class:: classref-item-separator @@ -608,7 +608,7 @@ Same as :ref:`add_icon_check_item`, |void| **add_icon_radio_check_shortcut**\ (\ texture\: :ref:`Texture2D`, shortcut\: :ref:`Shortcut`, id\: :ref:`int` = -1, global\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Same as :ref:`add_icon_check_shortcut`, but uses a radio check button. +Same as :ref:`add_icon_check_shortcut()`, but uses a radio check button. .. rst-class:: classref-item-separator @@ -638,9 +638,9 @@ If ``allow_echo`` is ``true``, the shortcut can be activated with echo events. Adds a new item with text ``label``. -An ``id`` can optionally be provided, as well as an accelerator (``accel``). If no ``id`` is provided, one will be created from the index. If no ``accel`` is provided, then the default value of 0 (corresponding to :ref:`@GlobalScope.KEY_NONE`) will be assigned to the item (which means it won't have any accelerator). See :ref:`get_item_accelerator` for more info on accelerators. +An ``id`` can optionally be provided, as well as an accelerator (``accel``). If no ``id`` is provided, one will be created from the index. If no ``accel`` is provided, then the default value of 0 (corresponding to :ref:`@GlobalScope.KEY_NONE`) will be assigned to the item (which means it won't have any accelerator). See :ref:`get_item_accelerator()` for more info on accelerators. -\ **Note:** The provided ``id`` is used only in :ref:`id_pressed` and :ref:`id_focused` signals. It's not related to the ``index`` arguments in e.g. :ref:`set_item_checked`. +\ **Note:** The provided ``id`` is used only in :ref:`id_pressed` and :ref:`id_focused` signals. It's not related to the ``index`` arguments in e.g. :ref:`set_item_checked()`. .. rst-class:: classref-item-separator @@ -656,7 +656,7 @@ Adds a new multistate item with text ``label``. Contrarily to normal binary items, multistate items can have more than two states, as defined by ``max_states``. The default value is defined by ``default_state``. -An ``id`` can optionally be provided, as well as an accelerator (``accel``). If no ``id`` is provided, one will be created from the index. If no ``accel`` is provided, then the default value of 0 (corresponding to :ref:`@GlobalScope.KEY_NONE`) will be assigned to the item (which means it won't have any accelerator). See :ref:`get_item_accelerator` for more info on accelerators. +An ``id`` can optionally be provided, as well as an accelerator (``accel``). If no ``id`` is provided, one will be created from the index. If no ``accel`` is provided, then the default value of 0 (corresponding to :ref:`@GlobalScope.KEY_NONE`) will be assigned to the item (which means it won't have any accelerator). See :ref:`get_item_accelerator()` for more info on accelerators. :: @@ -674,7 +674,7 @@ An ``id`` can optionally be provided, as well as an accelerator (``accel``). If print("Third state") ) -\ **Note:** Multistate items don't update their state automatically and must be done manually. See :ref:`toggle_item_multistate`, :ref:`set_item_multistate` and :ref:`get_item_multistate` for more info on how to control it. +\ **Note:** Multistate items don't update their state automatically and must be done manually. See :ref:`toggle_item_multistate()`, :ref:`set_item_multistate()` and :ref:`get_item_multistate()` for more info on how to control it. .. rst-class:: classref-item-separator @@ -688,9 +688,9 @@ An ``id`` can optionally be provided, as well as an accelerator (``accel``). If Adds a new radio check button with text ``label``. -An ``id`` can optionally be provided, as well as an accelerator (``accel``). If no ``id`` is provided, one will be created from the index. If no ``accel`` is provided, then the default value of 0 (corresponding to :ref:`@GlobalScope.KEY_NONE`) will be assigned to the item (which means it won't have any accelerator). See :ref:`get_item_accelerator` for more info on accelerators. +An ``id`` can optionally be provided, as well as an accelerator (``accel``). If no ``id`` is provided, one will be created from the index. If no ``accel`` is provided, then the default value of 0 (corresponding to :ref:`@GlobalScope.KEY_NONE`) will be assigned to the item (which means it won't have any accelerator). See :ref:`get_item_accelerator()` for more info on accelerators. -\ **Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`set_item_checked` for more info on how to control it. +\ **Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`set_item_checked()` for more info on how to control it. .. rst-class:: classref-item-separator @@ -706,7 +706,7 @@ Adds a new radio check button and assigns a :ref:`Shortcut` to i An ``id`` can optionally be provided. If no ``id`` is provided, one will be created from the index. -\ **Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`set_item_checked` for more info on how to control it. +\ **Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`set_item_checked()` for more info on how to control it. .. rst-class:: classref-item-separator @@ -748,7 +748,7 @@ If ``allow_echo`` is ``true``, the shortcut can be activated with echo events. |void| **add_submenu_item**\ (\ label\: :ref:`String`, submenu\: :ref:`String`, id\: :ref:`int` = -1\ ) :ref:`πŸ”—` -**Deprecated:** Prefer using :ref:`add_submenu_node_item` instead. +**Deprecated:** Prefer using :ref:`add_submenu_node_item()` instead. Adds an item that will act as a submenu of the parent **PopupMenu** node when clicked. The ``submenu`` argument must be the name of an existing **PopupMenu** that has been added as a child to this node. This submenu will be shown when the item is clicked, hovered for long enough, or activated using the ``ui_select`` or ``ui_right`` input actions. @@ -804,7 +804,7 @@ Returns the index of the currently focused item. Returns ``-1`` if no item is fo :ref:`Key` **get_item_accelerator**\ (\ index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the accelerator of the item at the given ``index``. An accelerator is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The return value is an integer which is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). If no accelerator is defined for the specified ``index``, :ref:`get_item_accelerator` returns ``0`` (corresponding to :ref:`@GlobalScope.KEY_NONE`). +Returns the accelerator of the item at the given ``index``. An accelerator is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The return value is an integer which is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). If no accelerator is defined for the specified ``index``, :ref:`get_item_accelerator()` returns ``0`` (corresponding to :ref:`@GlobalScope.KEY_NONE`). .. rst-class:: classref-item-separator @@ -900,7 +900,7 @@ Returns item's text language code. :ref:`Variant` **get_item_metadata**\ (\ index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the metadata of the specified item, which might be of any type. You can set it with :ref:`set_item_metadata`, which provides a simple way of assigning context data to items. +Returns the metadata of the specified item, which might be of any type. You can set it with :ref:`set_item_metadata()`, which provides a simple way of assigning context data to items. .. rst-class:: classref-item-separator @@ -948,9 +948,9 @@ Returns the :ref:`Shortcut` associated with the item at the give :ref:`String` **get_item_submenu**\ (\ index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -**Deprecated:** Prefer using :ref:`get_item_submenu_node` instead. +**Deprecated:** Prefer using :ref:`get_item_submenu_node()` instead. -Returns the submenu name of the item at the given ``index``. See :ref:`add_submenu_item` for more info on how to add a submenu. +Returns the submenu name of the item at the given ``index``. See :ref:`add_submenu_item()` for more info on how to add a submenu. .. rst-class:: classref-item-separator @@ -962,7 +962,7 @@ Returns the submenu name of the item at the given ``index``. See :ref:`add_subme :ref:`PopupMenu` **get_item_submenu_node**\ (\ index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the submenu of the item at the given ``index``, or ``null`` if no submenu was added. See :ref:`add_submenu_node_item` for more info on how to add a submenu. +Returns the submenu of the item at the given ``index``, or ``null`` if no submenu was added. See :ref:`add_submenu_node_item()` for more info on how to add a submenu. .. rst-class:: classref-item-separator @@ -1038,7 +1038,7 @@ Returns ``true`` if the item at the given ``index`` is checked. Returns ``true`` if the item at the given ``index`` is disabled. When it is disabled it can't be selected, or its action invoked. -See :ref:`set_item_disabled` for more info on how to disable an item. +See :ref:`set_item_disabled()` for more info on how to disable an item. .. rst-class:: classref-item-separator @@ -1064,7 +1064,7 @@ Returns ``true`` if the item at the given ``index`` has radio button-style check :ref:`bool` **is_item_separator**\ (\ index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the item is a separator. If it is, it will be displayed as a line. See :ref:`add_separator` for more info on how to add a separator. +Returns ``true`` if the item is a separator. If it is, it will be displayed as a line. See :ref:`add_separator()` for more info on how to add a separator. .. rst-class:: classref-item-separator @@ -1300,7 +1300,7 @@ Sets language code of item's text used for line-breaking and text shaping algori |void| **set_item_metadata**\ (\ index\: :ref:`int`, metadata\: :ref:`Variant`\ ) :ref:`πŸ”—` -Sets the metadata of an item, which may be of any type. You can later get it with :ref:`get_item_metadata`, which provides a simple way of assigning context data to items. +Sets the metadata of an item, which may be of any type. You can later get it with :ref:`get_item_metadata()`, which provides a simple way of assigning context data to items. .. rst-class:: classref-item-separator @@ -1312,7 +1312,7 @@ Sets the metadata of an item, which may be of any type. You can later get it wit |void| **set_item_multistate**\ (\ index\: :ref:`int`, state\: :ref:`int`\ ) :ref:`πŸ”—` -Sets the state of a multistate item. See :ref:`add_multistate_item` for details. +Sets the state of a multistate item. See :ref:`add_multistate_item()` for details. .. rst-class:: classref-item-separator @@ -1324,7 +1324,7 @@ Sets the state of a multistate item. See :ref:`add_multistate_item`, max_states\: :ref:`int`\ ) :ref:`πŸ”—` -Sets the max states of a multistate item. See :ref:`add_multistate_item` for details. +Sets the max states of a multistate item. See :ref:`add_multistate_item()` for details. .. rst-class:: classref-item-separator @@ -1360,7 +1360,7 @@ Disables the :ref:`Shortcut` of the item at the given ``index``. |void| **set_item_submenu**\ (\ index\: :ref:`int`, submenu\: :ref:`String`\ ) :ref:`πŸ”—` -**Deprecated:** Prefer using :ref:`set_item_submenu_node` instead. +**Deprecated:** Prefer using :ref:`set_item_submenu_node()` instead. Sets the submenu of the item at the given ``index``. The submenu is the name of a child **PopupMenu** node that would be shown when the item is clicked. @@ -1434,7 +1434,7 @@ Toggles the check state of the item at the given ``index``. |void| **toggle_item_multistate**\ (\ index\: :ref:`int`\ ) :ref:`πŸ”—` -Cycle to the next state of a multistate item. See :ref:`add_multistate_item` for details. +Cycle to the next state of a multistate item. See :ref:`add_multistate_item()` for details. .. rst-class:: classref-section-separator @@ -1451,7 +1451,7 @@ Theme Property Descriptions :ref:`Color` **font_accelerator_color** = ``Color(0.7, 0.7, 0.7, 0.8)`` :ref:`πŸ”—` -The text :ref:`Color` used for shortcuts and accelerators that show next to the menu item name when defined. See :ref:`get_item_accelerator` for more info on accelerators. +The text :ref:`Color` used for shortcuts and accelerators that show next to the menu item name when defined. See :ref:`get_item_accelerator()` for more info on accelerators. .. rst-class:: classref-item-separator @@ -1511,7 +1511,7 @@ The tint of text outline of the menu item. :ref:`Color` **font_separator_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`πŸ”—` -:ref:`Color` used for labeled separators' text. See :ref:`add_separator`. +:ref:`Color` used for labeled separators' text. See :ref:`add_separator()`. .. rst-class:: classref-item-separator @@ -1547,7 +1547,7 @@ The horizontal space between the item's elements. :ref:`int` **icon_max_width** = ``0`` :ref:`πŸ”—` -The maximum allowed width of the item's icon. This limit is applied on top of the default size of the icon, but before the value set with :ref:`set_item_icon_max_width`. The height is adjusted according to the icon's ratio. +The maximum allowed width of the item's icon. This limit is applied on top of the default size of the icon, but before the value set with :ref:`set_item_icon_max_width()`. The height is adjusted according to the icon's ratio. .. rst-class:: classref-item-separator @@ -1813,7 +1813,7 @@ Font size of the menu items. :ref:`StyleBox` **labeled_separator_left** :ref:`πŸ”—` -:ref:`StyleBox` for the left side of labeled separator. See :ref:`add_separator`. +:ref:`StyleBox` for the left side of labeled separator. See :ref:`add_separator()`. .. rst-class:: classref-item-separator @@ -1825,7 +1825,7 @@ Font size of the menu items. :ref:`StyleBox` **labeled_separator_right** :ref:`πŸ”—` -:ref:`StyleBox` for the right side of labeled separator. See :ref:`add_separator`. +:ref:`StyleBox` for the right side of labeled separator. See :ref:`add_separator()`. .. rst-class:: classref-item-separator @@ -1849,7 +1849,7 @@ Font size of the menu items. :ref:`StyleBox` **separator** :ref:`πŸ”—` -:ref:`StyleBox` used for the separators. See :ref:`add_separator`. +:ref:`StyleBox` used for the separators. See :ref:`add_separator()`. .. |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_primitivemesh.rst b/classes/class_primitivemesh.rst index 23ac5a0dc..b9eb6ceeb 100644 --- a/classes/class_primitivemesh.rst +++ b/classes/class_primitivemesh.rst @@ -182,7 +182,7 @@ Override this method to customize how this primitive mesh should be generated. S Returns the mesh arrays used to make up the surface of this primitive mesh. -\ **Example:** Pass the result to :ref:`ArrayMesh.add_surface_from_arrays` to create a new surface: +\ **Example:** Pass the result to :ref:`ArrayMesh.add_surface_from_arrays()` to create a new surface: .. tabs:: diff --git a/classes/class_progressbar.rst b/classes/class_progressbar.rst index d0b82a3b0..29ec3ad27 100644 --- a/classes/class_progressbar.rst +++ b/classes/class_progressbar.rst @@ -84,7 +84,7 @@ enum **FillMode**: :ref:`πŸ”—` :ref:`FillMode` **FILL_BEGIN_TO_END** = ``0`` -The progress bar fills from begin to end horizontally, according to the language direction. If :ref:`Control.is_layout_rtl` returns ``false``, it fills from left to right, and if it returns ``true``, it fills from right to left. +The progress bar fills from begin to end horizontally, according to the language direction. If :ref:`Control.is_layout_rtl()` returns ``false``, it fills from left to right, and if it returns ``true``, it fills from right to left. .. _class_ProgressBar_constant_FILL_END_TO_BEGIN: @@ -92,7 +92,7 @@ The progress bar fills from begin to end horizontally, according to the language :ref:`FillMode` **FILL_END_TO_BEGIN** = ``1`` -The progress bar fills from end to begin horizontally, according to the language direction. If :ref:`Control.is_layout_rtl` returns ``false``, it fills from right to left, and if it returns ``true``, it fills from left to right. +The progress bar fills from end to begin horizontally, according to the language direction. If :ref:`Control.is_layout_rtl()` returns ``false``, it fills from right to left, and if it returns ``true``, it fills from left to right. .. _class_ProgressBar_constant_FILL_TOP_TO_BOTTOM: diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index 6f429d104..a6841dedb 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -19,7 +19,7 @@ Stores globally-accessible variables. Description ----------- -Stores variables that can be accessed from everywhere. Use :ref:`get_setting`, :ref:`set_setting` or :ref:`has_setting` to access them. Variables stored in ``project.godot`` are also loaded into **ProjectSettings**, making this object very useful for reading custom game configuration options. +Stores variables that can be accessed from everywhere. Use :ref:`get_setting()`, :ref:`set_setting()` or :ref:`has_setting()` to access them. Variables stored in ``project.godot`` are also loaded into **ProjectSettings**, making this object very useful for reading custom game configuration options. When naming a Project Settings property, use the full path to the setting including the category. For example, ``"application/config/name"`` for the project name. Category and property names can be viewed in the Project Settings dialog. @@ -1229,6 +1229,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`network/tls/certificate_bundle_override` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`network/tls/enable_tls_v1.3` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`physics/2d/default_angular_damp` | ``1.0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`physics/2d/default_gravity` | ``980.0`` | @@ -1944,7 +1946,7 @@ If ``true``, the application automatically accepts quitting requests. :ref:`String` **application/config/custom_user_dir_name** = ``""`` :ref:`πŸ”—` -This user directory is used for storing persistent data (``user://`` filesystem). If a custom directory name is defined, this name will be appended to the system-specific user data directory (same parent folder as the Godot configuration folder documented in :ref:`OS.get_user_data_dir`). +This user directory is used for storing persistent data (``user://`` filesystem). If a custom directory name is defined, this name will be appended to the system-specific user data directory (same parent folder as the Godot configuration folder documented in :ref:`OS.get_user_data_dir()`). The :ref:`application/config/use_custom_user_dir` setting must be enabled for this to take effect. @@ -1984,7 +1986,7 @@ Icon used for the project, set when project loads. Exporters will also use this :ref:`String` **application/config/macos_native_icon** = ``""`` :ref:`πŸ”—` -Icon set in ``.icns`` format used on macOS to set the game's icon. This is done automatically on start by calling :ref:`DisplayServer.set_native_icon`. +Icon set in ``.icns`` format used on macOS to set the game's icon. This is done automatically on start by calling :ref:`DisplayServer.set_native_icon()`. .. rst-class:: classref-item-separator @@ -2092,7 +2094,7 @@ The project's human-readable version identifier. This is used by exporters if th :ref:`String` **application/config/windows_native_icon** = ``""`` :ref:`πŸ”—` -Icon set in ``.ico`` format used on Windows to set the game's icon. This is done automatically on start by calling :ref:`DisplayServer.set_native_icon`. +Icon set in ``.ico`` format used on Windows to set the game's icon. This is done automatically on start by calling :ref:`DisplayServer.set_native_icon()`. .. rst-class:: classref-item-separator @@ -2120,7 +2122,7 @@ It may take several seconds at a stable frame rate before the smoothing is initi :ref:`bool` **application/run/disable_stderr** = ``false`` :ref:`πŸ”—` -If ``true``, disables printing to standard error. If ``true``, this also hides error and warning messages printed by :ref:`@GlobalScope.push_error` and :ref:`@GlobalScope.push_warning`. See also :ref:`application/run/disable_stdout`. +If ``true``, disables printing to standard error. If ``true``, this also hides error and warning messages printed by :ref:`@GlobalScope.push_error()` and :ref:`@GlobalScope.push_warning()`. See also :ref:`application/run/disable_stdout`. Changes to this setting will only be applied upon restarting the application. To control this at runtime, use :ref:`Engine.print_error_messages`. @@ -2336,7 +2338,7 @@ Specifies the audio driver to use. This setting is platform-dependent as each pl The ``Dummy`` audio driver disables all audio playback and recording, which is useful for non-game applications as it reduces CPU usage. It also prevents the engine from appearing as an application playing audio in the OS' audio mixer. -To query the value that is being used at run-time (which may be overridden by command-line arguments or headless mode), use :ref:`AudioServer.get_driver_name`. +To query the value that is being used at run-time (which may be overridden by command-line arguments or headless mode), use :ref:`AudioServer.get_driver_name()`. \ **Note:** The driver in use can be overridden at runtime via the ``--audio-driver`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. @@ -2364,7 +2366,11 @@ If ``true``, microphone input will be allowed. This requires appropriate permiss :ref:`int` **audio/driver/mix_rate** = ``44100`` :ref:`πŸ”—` -The mixing rate used for audio (in Hz). In general, it's better to not touch this and leave it to the host operating system. +Target mixing rate used for audio (in Hz). In general, it's better to not touch this and leave it to the host operating system. + +\ **Note:** On iOS and macOS, mixing rate is determined by audio driver, this value is ignored. + +\ **Note:** Input and output mixing rates might be different. Use :ref:`AudioServer.get_mix_rate()` and :ref:`AudioServer.get_input_mix_rate()` to get actual values. .. rst-class:: classref-item-separator @@ -2390,7 +2396,7 @@ Safer override for :ref:`audio/driver/mix_rate` to determine the actual audio output latency. +Audio output latency may be constrained by the host operating system and audio hardware drivers. If the host can not provide the specified audio output latency then Godot will attempt to use the nearest latency allowed by the host. As such you should always use :ref:`AudioServer.get_output_latency()` to determine the actual audio output latency. Audio output latency can be overridden using the ``--audio-output-latency `` command line argument. @@ -2506,7 +2512,7 @@ Sets the `AVAudioSessionCategory ` **audio/general/text_to_speech** = ``false`` :ref:`πŸ”—` -If ``true``, text-to-speech support is enabled, see :ref:`DisplayServer.tts_get_voices` and :ref:`DisplayServer.tts_speak`. +If ``true``, text-to-speech support is enabled, see :ref:`DisplayServer.tts_get_voices()` and :ref:`DisplayServer.tts_speak()`. \ **Note:** Enabling TTS can cause addition idle CPU usage and interfere with the sleep mode, so consider disabling it if TTS is not used. @@ -2842,7 +2848,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w :ref:`int` **debug/gdscript/warnings/get_node_default_without_onready** = ``2`` :ref:`πŸ”—` -When set to ``warn`` or ``error``, produces a warning or an error respectively when :ref:`Node.get_node` (or the shorthand ``$``) is used as default value of a class variable without the ``@onready`` annotation. +When set to ``warn`` or ``error``, produces a warning or an error respectively when :ref:`Node.get_node()` (or the shorthand ``$``) is used as default value of a class variable without the ``@onready`` annotation. .. rst-class:: classref-item-separator @@ -3330,7 +3336,7 @@ Maximum call stack allowed for debugging GDScript. If ``true``, enables warnings which can help pinpoint where nodes are being incorrectly updated, which will result in incorrect interpolation and visual glitches. -When a node is being interpolated, it is essential that the transform is set during :ref:`Node._physics_process` (during a physics tick) rather than :ref:`Node._process` (during a frame). +When a node is being interpolated, it is essential that the transform is set during :ref:`Node._physics_process()` (during a physics tick) rather than :ref:`Node._process()` (during a frame). .. rst-class:: classref-item-separator @@ -3390,7 +3396,7 @@ Print GPU profile information to standard output every second. This includes how :ref:`bool` **debug/settings/stdout/verbose_stdout** = ``false`` :ref:`πŸ”—` -Print more information to standard output when running. It displays information such as memory leaks, which scenes and resources are being loaded, etc. This can also be enabled using the ``--verbose`` or ``-v`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`, even on an exported project. See also :ref:`OS.is_stdout_verbose` and :ref:`@GlobalScope.print_verbose`. +Print more information to standard output when running. It displays information such as memory leaks, which scenes and resources are being loaded, etc. This can also be enabled using the ``--verbose`` or ``-v`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`, even on an exported project. See also :ref:`OS.is_stdout_verbose()` and :ref:`@GlobalScope.print_verbose()`. .. rst-class:: classref-item-separator @@ -4490,7 +4496,7 @@ V-Sync can be disabled on the command line using the ``--disable-vsync`` :doc:`c \ **Note:** The **Adaptive** and **Mailbox** V-Sync modes are only supported in the Forward+ and Mobile rendering methods, not Compatibility. -\ **Note:** This property is only read when the project starts. To change the V-Sync mode at runtime, call :ref:`DisplayServer.window_set_vsync_mode` instead. +\ **Note:** This property is only read when the project starts. To change the V-Sync mode at runtime, call :ref:`DisplayServer.window_set_vsync_mode()` instead. .. rst-class:: classref-item-separator @@ -4542,7 +4548,7 @@ Changing this value allows setting up a multi-project scenario where there are m If ``true``, text resource (``tres``) and text scene (``tscn``) files are converted to their corresponding binary format on export. This decreases file sizes and speeds up loading slightly. -\ **Note:** Because a resource's file extension may change in an exported project, it is heavily recommended to use :ref:`@GDScript.load` or :ref:`ResourceLoader` instead of :ref:`FileAccess` to load resources dynamically. +\ **Note:** Because a resource's file extension may change in an exported project, it is heavily recommended to use :ref:`@GDScript.load()` or :ref:`ResourceLoader` instead of :ref:`FileAccess` to load resources dynamically. \ **Note:** The project settings file (``project.godot``) will always be converted to binary on export, regardless of this setting. @@ -4928,9 +4934,9 @@ If ``true``, snaps :ref:`Control` node vertices to the nearest pi :ref:`bool` **gui/common/swap_cancel_ok** :ref:`πŸ”—` -If ``true``, swaps **Cancel** and **OK** buttons in dialogs on Windows to follow interface conventions. :ref:`DisplayServer.get_swap_cancel_ok` can be used to query whether buttons are swapped at run-time. +If ``true``, swaps **Cancel** and **OK** buttons in dialogs on Windows to follow interface conventions. :ref:`DisplayServer.get_swap_cancel_ok()` can be used to query whether buttons are swapped at run-time. -\ **Note:** This doesn't affect native dialogs such as the ones spawned by :ref:`DisplayServer.dialog_show`. +\ **Note:** This doesn't affect native dialogs such as the ones spawned by :ref:`DisplayServer.dialog_show()`. .. rst-class:: classref-item-separator @@ -6238,7 +6244,7 @@ Enabling this can greatly improve the responsiveness to input, specially in devi :ref:`bool` **input_devices/compatibility/legacy_just_pressed_behavior** = ``false`` :ref:`πŸ”—` -If ``true``, :ref:`Input.is_action_just_pressed` and :ref:`Input.is_action_just_released` will only return ``true`` if the action is still in the respective state, i.e. an action that is pressed *and* released on the same frame will be missed. +If ``true``, :ref:`Input.is_action_just_pressed()` and :ref:`Input.is_action_just_released()` will only return ``true`` if the action is still in the respective state, i.e. an action that is pressed *and* released on the same frame will be missed. If ``false``, no input will be lost. @@ -6258,6 +6264,8 @@ Specifies the tablet driver to use. If left empty, the default driver will be us \ **Note:** The driver in use can be overridden at runtime via the ``--tablet-driver`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. +\ **Note:** Use :ref:`DisplayServer.tablet_set_current_driver()` to switch tablet driver in runtime. + .. rst-class:: classref-item-separator ---- @@ -6268,7 +6276,15 @@ Specifies the tablet driver to use. If left empty, the default driver will be us :ref:`String` **input_devices/pen_tablet/driver.windows** :ref:`πŸ”—` -Override for :ref:`input_devices/pen_tablet/driver` on Windows. +Override for :ref:`input_devices/pen_tablet/driver` on Windows. Supported values are: + +- ``auto`` (default), uses ``wintab`` if Windows Ink is disabled in the Wacom Tablet Properties or system settings, ``winink`` otherwise. + +- ``winink``, uses Windows native "Windows Ink" driver. + +- ``wintab``, uses Wacom "WinTab" driver. + +- ``dummy``, tablet input is disabled. .. rst-class:: classref-item-separator @@ -6340,7 +6356,7 @@ If ``true``, sends touch input events when clicking or dragging the mouse. :ref:`bool` **input_devices/sensors/enable_accelerometer** = ``false`` :ref:`πŸ”—` -If ``true``, the accelerometer sensor is enabled and :ref:`Input.get_accelerometer` returns valid data. +If ``true``, the accelerometer sensor is enabled and :ref:`Input.get_accelerometer()` returns valid data. .. rst-class:: classref-item-separator @@ -6352,7 +6368,7 @@ If ``true``, the accelerometer sensor is enabled and :ref:`Input.get_acceleromet :ref:`bool` **input_devices/sensors/enable_gravity** = ``false`` :ref:`πŸ”—` -If ``true``, the gravity sensor is enabled and :ref:`Input.get_gravity` returns valid data. +If ``true``, the gravity sensor is enabled and :ref:`Input.get_gravity()` returns valid data. .. rst-class:: classref-item-separator @@ -6364,7 +6380,7 @@ If ``true``, the gravity sensor is enabled and :ref:`Input.get_gravity` **input_devices/sensors/enable_gyroscope** = ``false`` :ref:`πŸ”—` -If ``true``, the gyroscope sensor is enabled and :ref:`Input.get_gyroscope` returns valid data. +If ``true``, the gyroscope sensor is enabled and :ref:`Input.get_gyroscope()` returns valid data. .. rst-class:: classref-item-separator @@ -6376,7 +6392,7 @@ If ``true``, the gyroscope sensor is enabled and :ref:`Input.get_gyroscope` **input_devices/sensors/enable_magnetometer** = ``false`` :ref:`πŸ”—` -If ``true``, the magnetometer sensor is enabled and :ref:`Input.get_magnetometer` returns valid data. +If ``true``, the magnetometer sensor is enabled and :ref:`Input.get_magnetometer()` returns valid data. .. rst-class:: classref-item-separator @@ -6390,6 +6406,8 @@ If ``true``, the magnetometer sensor is enabled and :ref:`Input.get_magnetometer The locale to fall back to if a translation isn't available in a given language. If left empty, ``en`` (English) will be used. +\ **Note:** Not to be confused with :ref:`TextServerFallback`. + .. rst-class:: classref-item-separator ---- @@ -6404,7 +6422,7 @@ If ``true``, text server break iteration rule sets, dictionaries and other optio \ **Note:** "ICU / HarfBuzz / Graphite" text server data includes dictionaries for Burmese, Chinese, Japanese, Khmer, Lao and Thai as well as Unicode Standard Annex #29 and Unicode Standard Annex #14 word and line breaking rules. Data is about 4 MB large. -\ **Note:** "Fallback" text server does not use additional data. +\ **Note:** :ref:`TextServerFallback` does not use additional data. .. rst-class:: classref-item-separator @@ -6416,7 +6434,9 @@ If ``true``, text server break iteration rule sets, dictionaries and other optio :ref:`String` **internationalization/locale/test** = ``""`` :ref:`πŸ”—` -If non-empty, this locale will be used when running the project from the editor. +If non-empty, this locale will be used instead of the automatically detected system locale. + +\ **Note:** This setting also applies to the exported project. To only affect testing within the editor, override this setting with an ``editor`` :doc:`feature tag <../tutorials/export/feature_tags>` for localization testing purposes. .. rst-class:: classref-item-separator @@ -6452,7 +6472,7 @@ The expansion ratio to use during pseudolocalization. A value of ``0.3`` is suff :ref:`bool` **internationalization/pseudolocalization/fake_bidi** = ``false`` :ref:`πŸ”—` -If ``true``, emulate bidirectional (right-to-left) text when pseudolocalization is enabled. This can be used to spot issues with RTL layout and UI mirroring that will crop up if the project is localized to RTL languages such as Arabic or Hebrew. +If ``true``, emulate bidirectional (right-to-left) text when pseudolocalization is enabled. This can be used to spot issues with RTL layout and UI mirroring that will crop up if the project is localized to RTL languages such as Arabic or Hebrew. See also :ref:`internationalization/rendering/force_right_to_left_layout_direction`. .. rst-class:: classref-item-separator @@ -6538,7 +6558,7 @@ If ``true``, enables pseudolocalization for the project. This can be used to spo :ref:`bool` **internationalization/rendering/force_right_to_left_layout_direction** = ``false`` :ref:`πŸ”—` -Force layout direction and text writing direction to RTL for all controls. +Force layout direction and text writing direction to RTL for all controls, even if the current locale is intended to use a left-to-right layout and text writing direction. This should be enabled for testing purposes only. See also :ref:`internationalization/pseudolocalization/fake_bidi`. .. rst-class:: classref-item-separator @@ -6578,7 +6598,7 @@ Root node default layout direction. Specifies the :ref:`TextServer` to use. If left empty, the default will be used. -"ICU / HarfBuzz / Graphite" is the most advanced text driver, supporting right-to-left typesetting and complex scripts (for languages like Arabic, Hebrew, etc.). The "Fallback" text driver does not support right-to-left typesetting and complex scripts. +"ICU / HarfBuzz / Graphite" (:ref:`TextServerAdvanced`) is the most advanced text driver, supporting right-to-left typesetting and complex scripts (for languages like Arabic, Hebrew, etc.). The "Fallback" text driver (:ref:`TextServerFallback`) does not support right-to-left typesetting and complex scripts. \ **Note:** The driver in use can be overridden at runtime via the ``--text-driver`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. @@ -9006,7 +9026,7 @@ Godot uses a message queue to defer some function calls. If you run out of space :ref:`float` **navigation/2d/default_cell_size** = ``1.0`` :ref:`πŸ”—` -Default cell size for 2D navigation maps. See :ref:`NavigationServer2D.map_set_cell_size`. +Default cell size for 2D navigation maps. See :ref:`NavigationServer2D.map_set_cell_size()`. .. rst-class:: classref-item-separator @@ -9018,7 +9038,7 @@ Default cell size for 2D navigation maps. See :ref:`NavigationServer2D.map_set_c :ref:`float` **navigation/2d/default_edge_connection_margin** = ``1.0`` :ref:`πŸ”—` -Default edge connection margin for 2D navigation maps. See :ref:`NavigationServer2D.map_set_edge_connection_margin`. +Default edge connection margin for 2D navigation maps. See :ref:`NavigationServer2D.map_set_edge_connection_margin()`. .. rst-class:: classref-item-separator @@ -9030,7 +9050,7 @@ Default edge connection margin for 2D navigation maps. See :ref:`NavigationServe :ref:`float` **navigation/2d/default_link_connection_radius** = ``4.0`` :ref:`πŸ”—` -Default link connection radius for 2D navigation maps. See :ref:`NavigationServer2D.map_set_link_connection_radius`. +Default link connection radius for 2D navigation maps. See :ref:`NavigationServer2D.map_set_link_connection_radius()`. .. rst-class:: classref-item-separator @@ -9054,7 +9074,7 @@ If enabled 2D navigation regions will use edge connections to connect with other :ref:`float` **navigation/3d/default_cell_height** = ``0.25`` :ref:`πŸ”—` -Default cell height for 3D navigation maps. See :ref:`NavigationServer3D.map_set_cell_height`. +Default cell height for 3D navigation maps. See :ref:`NavigationServer3D.map_set_cell_height()`. .. rst-class:: classref-item-separator @@ -9066,7 +9086,7 @@ Default cell height for 3D navigation maps. See :ref:`NavigationServer3D.map_set :ref:`float` **navigation/3d/default_cell_size** = ``0.25`` :ref:`πŸ”—` -Default cell size for 3D navigation maps. See :ref:`NavigationServer3D.map_set_cell_size`. +Default cell size for 3D navigation maps. See :ref:`NavigationServer3D.map_set_cell_size()`. .. rst-class:: classref-item-separator @@ -9078,7 +9098,7 @@ Default cell size for 3D navigation maps. See :ref:`NavigationServer3D.map_set_c :ref:`float` **navigation/3d/default_edge_connection_margin** = ``0.25`` :ref:`πŸ”—` -Default edge connection margin for 3D navigation maps. See :ref:`NavigationServer3D.map_set_edge_connection_margin`. +Default edge connection margin for 3D navigation maps. See :ref:`NavigationServer3D.map_set_edge_connection_margin()`. .. rst-class:: classref-item-separator @@ -9090,7 +9110,7 @@ Default edge connection margin for 3D navigation maps. See :ref:`NavigationServe :ref:`float` **navigation/3d/default_link_connection_radius** = ``1.0`` :ref:`πŸ”—` -Default link connection radius for 3D navigation maps. See :ref:`NavigationServer3D.map_set_link_connection_radius`. +Default link connection radius for 3D navigation maps. See :ref:`NavigationServer3D.map_set_link_connection_radius()`. .. rst-class:: classref-item-separator @@ -9102,7 +9122,7 @@ Default link connection radius for 3D navigation maps. See :ref:`NavigationServe :ref:`Vector3` **navigation/3d/default_up** = ``Vector3(0, 1, 0)`` :ref:`πŸ”—` -Default up orientation for 3D navigation maps. See :ref:`NavigationServer3D.map_set_up`. +Default up orientation for 3D navigation maps. See :ref:`NavigationServer3D.map_set_up()`. .. rst-class:: classref-item-separator @@ -9114,7 +9134,7 @@ Default up orientation for 3D navigation maps. See :ref:`NavigationServer3D.map_ :ref:`float` **navigation/3d/merge_rasterizer_cell_scale** = ``1.0`` :ref:`πŸ”—` -Default merge rasterizer cell scale for 3D navigation maps. See :ref:`NavigationServer3D.map_set_merge_rasterizer_cell_scale`. +Default merge rasterizer cell scale for 3D navigation maps. See :ref:`NavigationServer3D.map_set_merge_rasterizer_cell_scale()`. .. rst-class:: classref-item-separator @@ -9314,6 +9334,20 @@ If in doubt, leave this setting empty. ---- +.. _class_ProjectSettings_property_network/tls/enable_tls_v1.3: + +.. rst-class:: classref-property + +:ref:`bool` **network/tls/enable_tls_v1.3** = ``false`` :ref:`πŸ”—` + +If ``true``, enable TLSv1.3 negotiation. + +\ **Note:** This is experimental, and may cause connections to fail in some cases (notably, if the remote server uses TLS handshake fragmentation). + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_physics/2d/default_angular_damp: .. rst-class:: classref-property @@ -9684,6 +9718,8 @@ Third-party extensions and modules can add other physics engines to select with If ``true``, the 3D physics server runs on a separate thread, making better use of multi-core CPUs. If ``false``, the 3D physics server runs on the main thread. Running the physics server on a separate thread can increase performance, but restricts API access to only physics process. +\ **Note:** When :ref:`physics/3d/physics_engine` is set to ``Jolt Physics``, enabling this setting will prevent the 3D physics server from being able to provide any context when reporting errors and warnings, and will instead always refer to nodes as ````. + .. rst-class:: classref-item-separator ---- @@ -9818,7 +9854,7 @@ Controls the maximum number of physics steps that can be simulated each rendered :ref:`bool` **physics/common/physics_interpolation** = ``false`` :ref:`πŸ”—` -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`. +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``. @@ -9852,7 +9888,7 @@ Controls how much physics ticks are synchronized with real time. For 0 or less, :ref:`int` **physics/common/physics_ticks_per_second** = ``60`` :ref:`πŸ”—` -The number of fixed iterations per second. This controls how often physics simulation and :ref:`Node._physics_process` methods are run. See also :ref:`application/run/max_fps`. +The number of fixed iterations per second. This controls how often physics simulation and :ref:`Node._physics_process()` methods are run. See also :ref:`application/run/max_fps`. \ **Note:** This property is only read when the project starts. To change the physics FPS at runtime, set :ref:`Engine.physics_ticks_per_second` instead. @@ -10018,7 +10054,7 @@ The size of :ref:`WorldBoundaryShape3D` boundaries, Fraction of the total penetration to depenetrate per iteration during motion queries. -\ **Note:** This affects methods :ref:`CharacterBody3D.move_and_slide`, :ref:`PhysicsBody3D.move_and_collide`, :ref:`PhysicsBody3D.test_move` and :ref:`PhysicsServer3D.body_test_motion`. +\ **Note:** This affects methods :ref:`CharacterBody3D.move_and_slide()`, :ref:`PhysicsBody3D.move_and_collide()`, :ref:`PhysicsBody3D.test_move()` and :ref:`PhysicsServer3D.body_test_motion()`. \ **Note:** This setting will only be read once during the lifetime of the application. @@ -10034,7 +10070,7 @@ Fraction of the total penetration to depenetrate per iteration during motion que The number of iterations to run when depenetrating during motion queries. -\ **Note:** This affects methods :ref:`CharacterBody3D.move_and_slide`, :ref:`PhysicsBody3D.move_and_collide`, :ref:`PhysicsBody3D.test_move` and :ref:`PhysicsServer3D.body_test_motion`. +\ **Note:** This affects methods :ref:`CharacterBody3D.move_and_slide()`, :ref:`PhysicsBody3D.move_and_collide()`, :ref:`PhysicsBody3D.test_move()` and :ref:`PhysicsServer3D.body_test_motion()`. \ **Note:** This setting will only be read once during the lifetime of the application. @@ -10050,7 +10086,7 @@ The number of iterations to run when depenetrating during motion queries. If ``true``, enables Jolt's enhanced internal edge removal during motion queries. This can help alleviate ghost collisions, but only with edges within a single body, meaning edges between separate bodies can still cause ghost collisions. -\ **Note:** This affects methods :ref:`CharacterBody3D.move_and_slide`, :ref:`PhysicsBody3D.move_and_collide`, :ref:`PhysicsBody3D.test_move` and :ref:`PhysicsServer3D.body_test_motion`. +\ **Note:** This affects methods :ref:`CharacterBody3D.move_and_slide()`, :ref:`PhysicsBody3D.move_and_collide()`, :ref:`PhysicsBody3D.test_move()` and :ref:`PhysicsServer3D.body_test_motion()`. \ **Note:** This setting will only be read once during the lifetime of the application. @@ -10064,7 +10100,7 @@ If ``true``, enables Jolt's enhanced internal edge removal during motion queries :ref:`bool` **physics/jolt_physics_3d/queries/enable_ray_cast_face_index** = ``false`` :ref:`πŸ”—` -If ``true``, populates the ``face_index`` field in the results of :ref:`PhysicsDirectSpaceState3D.intersect_ray`, also accessed through :ref:`RayCast3D.get_collision_face_index`. If ``false``, the ``face_index`` field will be left at its default value of ``-1``. +If ``true``, populates the ``face_index`` field in the results of :ref:`PhysicsDirectSpaceState3D.intersect_ray()`, also accessed through :ref:`RayCast3D.get_collision_face_index()`. If ``false``, the ``face_index`` field will be left at its default value of ``-1``. \ **Note:** Enabling this setting will increase Jolt's memory usage for :ref:`ConcavePolygonShape3D` by around 25%. @@ -10082,7 +10118,7 @@ If ``true``, populates the ``face_index`` field in the results of :ref:`PhysicsD If ``true``, enables Jolt's enhanced internal edge removal during shape queries. This can help alleviate ghost collisions when using shape queries for things like character movement, but only with edges within a single body, meaning edges between separate bodies can still cause ghost collisions. -\ **Note:** This affects methods :ref:`PhysicsDirectSpaceState3D.cast_motion`, :ref:`PhysicsDirectSpaceState3D.collide_shape`, :ref:`PhysicsDirectSpaceState3D.get_rest_info` and :ref:`PhysicsDirectSpaceState3D.intersect_shape`. +\ **Note:** This affects methods :ref:`PhysicsDirectSpaceState3D.cast_motion()`, :ref:`PhysicsDirectSpaceState3D.collide_shape()`, :ref:`PhysicsDirectSpaceState3D.get_rest_info()` and :ref:`PhysicsDirectSpaceState3D.intersect_shape()`. \ **Note:** Enabling this setting can cause certain shapes to be culled from the results entirely, but you will get at least one intersection per body. @@ -10360,7 +10396,7 @@ Controls how much of the original viewport size should be covered by the 2D sign The percentage specified is added on each axis and on both sides. For example, with the default setting of 120%, the signed distance field will cover 20% of the viewport's size outside the viewport on each side (top, right, bottom, left). -\ **Note:** This property is only read when the project starts. To change the 2D SDF oversizing percentage at runtime, use :ref:`RenderingServer.viewport_set_sdf_oversize_and_scale` instead. +\ **Note:** This property is only read when the project starts. To change the 2D SDF oversizing percentage at runtime, use :ref:`RenderingServer.viewport_set_sdf_oversize_and_scale()` instead. .. rst-class:: classref-item-separator @@ -10374,7 +10410,7 @@ The percentage specified is added on each axis and on both sides. For example, w 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. The default value (50%) renders at half the resolution of the viewport size on each axis, which means the SDF is generated with 25% of the viewport's pixel count. -\ **Note:** This property is only read when the project starts. To change the 2D SDF resolution scale at runtime, use :ref:`RenderingServer.viewport_set_sdf_oversize_and_scale` instead. +\ **Note:** This property is only read when the project starts. To change the 2D SDF resolution scale at runtime, use :ref:`RenderingServer.viewport_set_sdf_oversize_and_scale()` instead. .. rst-class:: classref-item-separator @@ -10388,7 +10424,7 @@ The resolution scale to use for the 2D signed distance field. Higher values lead The size of the 2D shadow atlas in pixels. Higher values result in more precise :ref:`Light2D` shadows, at the cost of performance and video memory usage. The specified value is rounded up to the nearest power of 2. -\ **Note:** This property is only read when the project starts. To change the 2D shadow atlas size at runtime, use :ref:`RenderingServer.canvas_set_shadow_texture_size` instead. +\ **Note:** This property is only read when the project starts. To change the 2D shadow atlas size at runtime, use :ref:`RenderingServer.canvas_set_shadow_texture_size()` instead. .. rst-class:: classref-item-separator @@ -10402,7 +10438,7 @@ The size of the 2D shadow atlas in pixels. Higher values result in more precise If ``true``, :ref:`CanvasItem` nodes will internally snap to full pixels. Useful for low-resolution pixel art games. Their position can still be sub-pixel, but the decimals will not have effect as the position is rounded. This can lead to a crisper appearance at the cost of less smooth movement, especially when :ref:`Camera2D` smoothing is enabled. -\ **Note:** This property is only read when the project starts. To toggle 2D transform snapping at runtime, use :ref:`RenderingServer.viewport_set_snap_2d_transforms_to_pixel` on the root :ref:`Viewport` instead. +\ **Note:** This property is only read when the project starts. To toggle 2D transform snapping at runtime, use :ref:`RenderingServer.viewport_set_snap_2d_transforms_to_pixel()` on the root :ref:`Viewport` instead. \ **Note:** :ref:`Control` nodes are snapped to the nearest pixel by default. This is controlled by :ref:`gui/common/snap_controls_to_pixels`. @@ -10420,7 +10456,7 @@ If ``true``, :ref:`CanvasItem` nodes will internally snap to f If ``true``, vertices of :ref:`CanvasItem` nodes will snap to full pixels. Useful for low-resolution pixel art games. 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. -\ **Note:** This property is only read when the project starts. To toggle 2D vertex snapping at runtime, use :ref:`RenderingServer.viewport_set_snap_2d_vertices_to_pixel` on the root :ref:`Viewport` instead. +\ **Note:** This property is only read when the project starts. To toggle 2D vertex snapping at runtime, use :ref:`RenderingServer.viewport_set_snap_2d_vertices_to_pixel()` on the root :ref:`Viewport` instead. \ **Note:** :ref:`Control` nodes are snapped to the nearest pixel by default. This is controlled by :ref:`gui/common/snap_controls_to_pixels`. @@ -10440,7 +10476,7 @@ Sets the number of multisample antialiasing (MSAA) samples to use for 2D/Canvas \ **Note:** MSAA is only supported in the Forward+ and Mobile rendering methods, not Compatibility. -\ **Note:** This property is only read when the project starts. To set the number of 2D MSAA samples at runtime, set :ref:`Viewport.msaa_2d` or use :ref:`RenderingServer.viewport_set_msaa_2d`. +\ **Note:** This property is only read when the project starts. To set the number of 2D MSAA samples at runtime, set :ref:`Viewport.msaa_2d` or use :ref:`RenderingServer.viewport_set_msaa_2d()`. .. rst-class:: classref-item-separator @@ -10454,7 +10490,7 @@ Sets the number of multisample antialiasing (MSAA) samples to use for 2D/Canvas Sets the number of multisample antialiasing (MSAA) samples to use for 3D rendering (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware, especially integrated graphics due to their limited memory bandwidth. See also :ref:`rendering/scaling_3d/mode` for supersampling, which provides higher quality but is much more expensive. This has no effect on shader-induced aliasing or texture aliasing. -\ **Note:** This property is only read when the project starts. To set the number of 3D MSAA samples at runtime, set :ref:`Viewport.msaa_3d` or use :ref:`RenderingServer.viewport_set_msaa_3d`. +\ **Note:** This property is only read when the project starts. To set the number of 3D MSAA samples at runtime, set :ref:`Viewport.msaa_3d` or use :ref:`RenderingServer.viewport_set_msaa_3d()`. .. rst-class:: classref-item-separator @@ -10472,7 +10508,7 @@ Another way to combat specular aliasing is to enable :ref:`rendering/anti_aliasi \ **Note:** Screen-space antialiasing is only supported in the Forward+ and Mobile rendering methods, not Compatibility. -\ **Note:** This property is only read when the project starts. To set the screen-space antialiasing mode at runtime, set :ref:`Viewport.screen_space_aa` on the root :ref:`Viewport` instead, or use :ref:`RenderingServer.viewport_set_screen_space_aa`. +\ **Note:** This property is only read when the project starts. To set the screen-space antialiasing mode at runtime, set :ref:`Viewport.screen_space_aa` on the root :ref:`Viewport` instead, or use :ref:`RenderingServer.viewport_set_screen_space_aa()`. .. rst-class:: classref-item-separator @@ -10488,7 +10524,7 @@ If ``true``, uses a fast post-processing filter to make banding significantly le In some cases, debanding may introduce a slightly noticeable dithering pattern. It's recommended to enable debanding only when actually needed since the dithering pattern will make lossless-compressed screenshots larger. -\ **Note:** This property is only read when the project starts. To set debanding at runtime, set :ref:`Viewport.use_debanding` on the root :ref:`Viewport` instead, or use :ref:`RenderingServer.viewport_set_use_debanding`. +\ **Note:** This property is only read when the project starts. To set debanding at runtime, set :ref:`Viewport.use_debanding` on the root :ref:`Viewport` instead, or use :ref:`RenderingServer.viewport_set_use_debanding()`. .. rst-class:: classref-item-separator @@ -10506,7 +10542,7 @@ Enables temporal antialiasing for the default screen :ref:`Viewport` on the root :ref:`Viewport` instead, or use :ref:`RenderingServer.viewport_set_use_taa`. +\ **Note:** This property is only read when the project starts. To set TAA at runtime, set :ref:`Viewport.use_taa` on the root :ref:`Viewport` instead, or use :ref:`RenderingServer.viewport_set_use_taa()`. .. rst-class:: classref-item-separator @@ -10518,7 +10554,7 @@ Enables temporal antialiasing for the default screen :ref:`Viewport` **rendering/anti_aliasing/screen_space_roughness_limiter/amount** = ``0.25`` :ref:`πŸ”—` -**Note:** This property is only read when the project starts. To control the screen-space roughness limiter at runtime, call :ref:`RenderingServer.screen_space_roughness_limiter_set_active` instead. +**Note:** This property is only read when the project starts. To control the screen-space roughness limiter at runtime, call :ref:`RenderingServer.screen_space_roughness_limiter_set_active()` instead. .. rst-class:: classref-item-separator @@ -10534,7 +10570,7 @@ If ``true``, enables a spatial filter to limit roughness in areas with high-freq \ **Note:** The screen-space roughness limiter is only supported in the Forward+ and Mobile rendering methods, not Compatibility. -\ **Note:** This property is only read when the project starts. To control the screen-space roughness limiter at runtime, call :ref:`RenderingServer.screen_space_roughness_limiter_set_active` instead. +\ **Note:** This property is only read when the project starts. To control the screen-space roughness limiter at runtime, call :ref:`RenderingServer.screen_space_roughness_limiter_set_active()` instead. .. rst-class:: classref-item-separator @@ -10546,7 +10582,7 @@ If ``true``, enables a spatial filter to limit roughness in areas with high-freq :ref:`float` **rendering/anti_aliasing/screen_space_roughness_limiter/limit** = ``0.18`` :ref:`πŸ”—` -**Note:** This property is only read when the project starts. To control the screen-space roughness limiter at runtime, call :ref:`RenderingServer.screen_space_roughness_limiter_set_active` instead. +**Note:** This property is only read when the project starts. To control the screen-space roughness limiter at runtime, call :ref:`RenderingServer.screen_space_roughness_limiter_set_active()` instead. .. rst-class:: classref-item-separator @@ -10634,7 +10670,7 @@ The thread model to use for rendering. Rendering on a thread may improve perform :ref:`Color` **rendering/environment/defaults/default_clear_color** = ``Color(0.3, 0.3, 0.3, 1)`` :ref:`πŸ”—` -Default background clear color. Overridable per :ref:`Viewport` using its :ref:`Environment`. See :ref:`Environment.background_mode` and :ref:`Environment.background_color` in particular. To change this default color programmatically, use :ref:`RenderingServer.set_default_clear_color`. +Default background clear color. Overridable per :ref:`Viewport` using its :ref:`Environment`. See :ref:`Environment.background_mode` and :ref:`Environment.background_color` in particular. To change this default color programmatically, use :ref:`RenderingServer.set_default_clear_color()`. .. rst-class:: classref-item-separator @@ -10840,7 +10876,7 @@ Sets the quality of the screen-space indirect lighting effect. Higher values tak Scales the depth over which the subsurface scattering effect is applied. A high value may allow light to scatter into a part of the mesh or another mesh that is close in screen space but far in depth. See also :ref:`rendering/environment/subsurface_scattering/subsurface_scattering_scale`. -\ **Note:** This property is only read when the project starts. To set the subsurface scattering depth scale at runtime, call :ref:`RenderingServer.sub_surface_scattering_set_scale` instead. +\ **Note:** This property is only read when the project starts. To set the subsurface scattering depth scale at runtime, call :ref:`RenderingServer.sub_surface_scattering_set_scale()` instead. .. rst-class:: classref-item-separator @@ -10854,7 +10890,7 @@ Scales the depth over which the subsurface scattering effect is applied. A high Sets the quality of the subsurface scattering effect. Higher values are slower but look nicer. This affects the rendering of materials that have :ref:`BaseMaterial3D.subsurf_scatter_enabled` set to ``true``, along with :ref:`ShaderMaterial`\ s that set ``SSS_STRENGTH``. -\ **Note:** This property is only read when the project starts. To set the subsurface scattering quality at runtime, call :ref:`RenderingServer.sub_surface_scattering_set_quality` instead. +\ **Note:** This property is only read when the project starts. To set the subsurface scattering quality at runtime, call :ref:`RenderingServer.sub_surface_scattering_set_quality()` instead. .. rst-class:: classref-item-separator @@ -10868,7 +10904,7 @@ Sets the quality of the subsurface scattering effect. Higher values are slower b Scales the distance over which samples are taken for subsurface scattering effect. Changing this does not impact performance, but higher values will result in significant artifacts as the samples will become obviously spread out. A lower value results in a smaller spread of scattered light. See also :ref:`rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale`. -\ **Note:** This property is only read when the project starts. To set the subsurface scattering scale at runtime, call :ref:`RenderingServer.sub_surface_scattering_set_scale` instead. +\ **Note:** This property is only read when the project starts. To set the subsurface scattering scale at runtime, call :ref:`RenderingServer.sub_surface_scattering_set_scale()` instead. .. rst-class:: classref-item-separator @@ -11086,7 +11122,7 @@ If ``true``, disables the threaded optimization feature from the NVIDIA drivers, If ``true``, renders :ref:`VoxelGI` and SDFGI (:ref:`Environment.sdfgi_enabled`) buffers at halved resolution (e.g. 960Γ—540 when the viewport size is 1920Γ—1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. :ref:`LightmapGI` rendering is not affected by this setting. -\ **Note:** This property is only read when the project starts. To set half-resolution GI at run-time, call :ref:`RenderingServer.gi_set_use_half_resolution` instead. +\ **Note:** This property is only read when the project starts. To set half-resolution GI at run-time, call :ref:`RenderingServer.gi_set_use_half_resolution()` instead. .. rst-class:: classref-item-separator @@ -11100,7 +11136,7 @@ If ``true``, renders :ref:`VoxelGI` and SDFGI (:ref:`Environment. The number of frames to use for converging signed distance field global illumination. Higher values lead to a less noisy result, at the cost of taking a longer time to fully converge. This means the scene's global illumination will be too dark for a longer period of time, especially when the camera moves fast. The actual convergence speed depends on rendered framerate. For example, with the default setting of 30 frames, rendering at 60 FPS will make SDFGI fully converge after 0.5 seconds. See also :ref:`rendering/global_illumination/sdfgi/frames_to_update_lights` and :ref:`rendering/global_illumination/sdfgi/probe_ray_count`. -\ **Note:** This property is only read when the project starts. To control SDFGI convergence speed at runtime, call :ref:`RenderingServer.environment_set_sdfgi_frames_to_converge` instead. +\ **Note:** This property is only read when the project starts. To control SDFGI convergence speed at runtime, call :ref:`RenderingServer.environment_set_sdfgi_frames_to_converge()` instead. .. rst-class:: classref-item-separator @@ -11116,7 +11152,7 @@ The number of frames over which dynamic lights should be updated in signed dista \ **Note:** This only affects :ref:`Light3D` nodes whose :ref:`Light3D.light_bake_mode` is :ref:`Light3D.BAKE_DYNAMIC` (which is the default). Consider making non-moving lights use the :ref:`Light3D.BAKE_STATIC` bake mode to improve performance. -\ **Note:** This property is only read when the project starts. To control SDFGI light update speed at runtime, call :ref:`RenderingServer.environment_set_sdfgi_frames_to_update_light` instead. +\ **Note:** This property is only read when the project starts. To control SDFGI light update speed at runtime, call :ref:`RenderingServer.environment_set_sdfgi_frames_to_update_light()` instead. .. rst-class:: classref-item-separator @@ -11130,7 +11166,7 @@ The number of frames over which dynamic lights should be updated in signed dista The number of rays to throw per frame when computing signed distance field global illumination. Higher values lead to a less noisy result, at the cost of performance. See also :ref:`rendering/global_illumination/sdfgi/frames_to_converge` and :ref:`rendering/global_illumination/sdfgi/frames_to_update_lights`. -\ **Note:** This property is only read when the project starts. To control SDFGI quality at runtime, call :ref:`RenderingServer.environment_set_sdfgi_ray_count` instead. +\ **Note:** This property is only read when the project starts. To control SDFGI quality at runtime, call :ref:`RenderingServer.environment_set_sdfgi_ray_count()` instead. .. rst-class:: classref-item-separator @@ -11144,7 +11180,7 @@ The number of rays to throw per frame when computing signed distance field globa The VoxelGI quality to use. High quality leads to more precise lighting and better reflections, but is slower to render. This setting does not affect the baked data and doesn't require baking the :ref:`VoxelGI` again to apply. -\ **Note:** This property is only read when the project starts. To control VoxelGI quality at runtime, call :ref:`RenderingServer.voxel_gi_set_quality` instead. +\ **Note:** This property is only read when the project starts. To control VoxelGI quality at runtime, call :ref:`RenderingServer.voxel_gi_set_quality()` instead. .. rst-class:: classref-item-separator @@ -11702,7 +11738,7 @@ The automatic LOD bias to use for meshes rendered within the :ref:`ReflectionPro The `Bounding Volume Hierarchy `__ quality to use when rendering the occlusion culling buffer. Higher values will result in more accurate occlusion culling, at the cost of higher CPU usage. See also :ref:`rendering/occlusion_culling/occlusion_rays_per_thread`. -\ **Note:** This property is only read when the project starts. To adjust the BVH build quality at runtime, use :ref:`RenderingServer.viewport_set_occlusion_culling_build_quality`. +\ **Note:** This property is only read when the project starts. To adjust the BVH build quality at runtime, use :ref:`RenderingServer.viewport_set_occlusion_culling_build_quality()`. .. rst-class:: classref-item-separator @@ -11728,7 +11764,7 @@ If ``true``, the projection used for rendering the occlusion buffer will be jitt The number of occlusion rays traced per CPU thread. Higher values will result in more accurate occlusion culling, at the cost of higher CPU usage. The occlusion culling buffer's pixel count is roughly equal to ``occlusion_rays_per_thread * number_of_logical_cpu_cores``, so it will depend on the system's CPU. Therefore, CPUs with fewer cores will use a lower resolution to attempt keeping performance costs even across devices. See also :ref:`rendering/occlusion_culling/bvh_build_quality`. -\ **Note:** This property is only read when the project starts. To adjust the number of occlusion rays traced per thread at runtime, use :ref:`RenderingServer.viewport_set_occlusion_rays_per_thread`. +\ **Note:** This property is only read when the project starts. To adjust the number of occlusion rays traced per thread at runtime, use :ref:`RenderingServer.viewport_set_occlusion_rays_per_thread()`. .. rst-class:: classref-item-separator @@ -11874,7 +11910,7 @@ Sets the renderer that will be used by the project. Options are: This can be overridden using the ``--rendering-method `` command line argument. -\ **Note:** The actual rendering method may be automatically changed by the engine as a result of a fallback, or a user-specified command line argument. To get the actual rendering method that is used at runtime, use :ref:`RenderingServer.get_current_rendering_method` instead of reading this project setting's value. +\ **Note:** The actual rendering method may be automatically changed by the engine as a result of a fallback, or a user-specified command line argument. To get the actual rendering method that is used at runtime, use :ref:`RenderingServer.get_current_rendering_method()` instead of reading this project setting's value. .. rst-class:: classref-item-separator @@ -11966,7 +12002,7 @@ Depending on the complexity of scenes, this value may be lowered or may need to Sets the driver to be used by the renderer when using a RenderingDevice-based renderer like the Forward+ or Mobile renderers. This property can't be edited directly. Instead, set the driver using the platform-specific overrides. This can be overridden using the ``--rendering-driver `` command line argument. -\ **Note:** The actual rendering driver may be automatically changed by the engine as a result of a fallback, or a user-specified command line argument. To get the actual rendering driver that is used at runtime, use :ref:`RenderingServer.get_current_rendering_driver_name` instead of reading this project setting's value. +\ **Note:** The actual rendering driver may be automatically changed by the engine as a result of a fallback, or a user-specified command line argument. To get the actual rendering driver that is used at runtime, use :ref:`RenderingServer.get_current_rendering_driver_name()` instead of reading this project setting's value. .. rst-class:: classref-item-separator @@ -12066,9 +12102,9 @@ If ``true``, the forward renderer will fall back to OpenGL 3 if Direct3D 12, Met :ref:`bool` **rendering/rendering_device/fallback_to_vulkan** = ``true`` :ref:`πŸ”—` -If ``true``, the forward renderer will fall back to Vulkan if Direct3D 12 is not supported. +If ``true``, the forward renderer will fall back to Vulkan if Direct3D 12 (on Windows) or Metal (on macOS x86_64) are not supported. -\ **Note:** This setting is implemented only on Windows. +\ **Note:** This setting is implemented only on Windows and macOS. .. rst-class:: classref-item-separator @@ -12134,7 +12170,7 @@ The maximum amount of memory allowed to be used by staging buffers. If the amoun :ref:`int` **rendering/rendering_device/staging_buffer/texture_download_region_size_px** = ``64`` :ref:`πŸ”—` -The region size in pixels used to download texture data from the GPU when using methods like :ref:`RenderingDevice.texture_get_data_async`. +The region size in pixels used to download texture data from the GPU when using methods like :ref:`RenderingDevice.texture_get_data_async()`. \ **Note:** This property's upper limit is controlled by :ref:`rendering/rendering_device/staging_buffer/block_size_kb` and whether it's possible to allocate a single block of texture data with this region size in the format that is requested. @@ -12150,7 +12186,7 @@ The region size in pixels used to download texture data from the GPU when using :ref:`int` **rendering/rendering_device/staging_buffer/texture_upload_region_size_px** = ``64`` :ref:`πŸ”—` -The region size in pixels used to upload texture data from the GPU when using methods like :ref:`RenderingDevice.texture_update`. +The region size in pixels used to upload texture data from the GPU when using methods like :ref:`RenderingDevice.texture_update()`. \ **Note:** This property's upper limit is controlled by :ref:`rendering/rendering_device/staging_buffer/block_size_kb` and whether it's possible to allocate a single block of texture data with this region size in the format that is requested. @@ -13045,7 +13081,7 @@ Returns the value of the setting identified by ``name``. If the setting doesn't -\ **Note:** This method doesn't take potential feature overrides into account automatically. Use :ref:`get_setting_with_override` to handle seamlessly. +\ **Note:** This method doesn't take potential feature overrides into account automatically. Use :ref:`get_setting_with_override()` to handle seamlessly. .. rst-class:: classref-item-separator @@ -13057,7 +13093,7 @@ Returns the value of the setting identified by ``name``. If the setting doesn't :ref:`Variant` **get_setting_with_override**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`πŸ”—` -Similar to :ref:`get_setting`, but applies feature tag overrides if any exists and is valid. +Similar to :ref:`get_setting()`, but applies feature tag overrides if any exists and is valid. \ **Example:** If the setting override ``"application/config/name.windows"`` exists, and the following code is executed on a *Windows* operating system, the overridden setting is printed instead: @@ -13084,9 +13120,9 @@ Similar to :ref:`get_setting`, but app :ref:`String` **globalize_path**\ (\ path\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Returns the absolute, native OS path corresponding to the localized ``path`` (starting with ``res://`` or ``user://``). The returned path will vary depending on the operating system and user preferences. See :doc:`File paths in Godot projects <../tutorials/io/data_paths>` to see what those paths convert to. See also :ref:`localize_path`. +Returns the absolute, native OS path corresponding to the localized ``path`` (starting with ``res://`` or ``user://``). The returned path will vary depending on the operating system and user preferences. See :doc:`File paths in Godot projects <../tutorials/io/data_paths>` to see what those paths convert to. See also :ref:`localize_path()`. -\ **Note:** :ref:`globalize_path` with ``res://`` will not work in an exported project. Instead, prepend the executable's base directory to the path when running from an exported project: +\ **Note:** :ref:`globalize_path()` with ``res://`` will not work in an exported project. Instead, prepend the executable's base directory to the path when running from an exported project: :: @@ -13142,7 +13178,7 @@ Loads the contents of the .pck or .zip file specified by ``pack`` into the resou :ref:`String` **localize_path**\ (\ path\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Returns the localized path (starting with ``res://``) corresponding to the absolute, native OS ``path``. See also :ref:`globalize_path`. +Returns the localized path (starting with ``res://``) corresponding to the absolute, native OS ``path``. See also :ref:`globalize_path()`. .. rst-class:: classref-item-separator @@ -13156,7 +13192,7 @@ Returns the localized path (starting with ``res://``) corresponding to the absol Saves the configuration to the ``project.godot`` file. -\ **Note:** This method is intended to be used by editor plugins, as modified **ProjectSettings** can't be loaded back in the running app. If you want to change project settings in exported projects, use :ref:`save_custom` to save ``override.cfg`` file. +\ **Note:** This method is intended to be used by editor plugins, as modified **ProjectSettings** can't be loaded back in the running app. If you want to change project settings in exported projects, use :ref:`save_custom()` to save ``override.cfg`` file. .. rst-class:: classref-item-separator @@ -13230,7 +13266,7 @@ Sets the order of a configuration value (influences when saved to the config fil Sets whether a setting requires restarting the editor to properly take effect. -\ **Note:** This is just a hint to display to the user that the editor must be restarted for changes to take effect. Enabling :ref:`set_restart_if_changed` does *not* delay the setting being set when changed. +\ **Note:** This is just a hint to display to the user that the editor must be restarted for changes to take effect. Enabling :ref:`set_restart_if_changed()` does *not* delay the setting being set when changed. .. rst-class:: classref-item-separator diff --git a/classes/class_propertytweener.rst b/classes/class_propertytweener.rst index 02da05209..e720d6fe3 100644 --- a/classes/class_propertytweener.rst +++ b/classes/class_propertytweener.rst @@ -19,11 +19,11 @@ Interpolates an :ref:`Object`'s property over time. Description ----------- -**PropertyTweener** is used to interpolate a property in an object. See :ref:`Tween.tween_property` for more usage information. +**PropertyTweener** is used to interpolate a property in an object. See :ref:`Tween.tween_property()` for more usage information. The tweener will finish automatically if the target object is freed. -\ **Note:** :ref:`Tween.tween_property` is the only correct way to create **PropertyTweener**. Any **PropertyTweener** created manually will not function correctly. +\ **Note:** :ref:`Tween.tween_property()` is the only correct way to create **PropertyTweener**. Any **PropertyTweener** created manually will not function correctly. .. rst-class:: classref-reftable-group @@ -122,7 +122,7 @@ Sets a custom initial value to the **PropertyTweener**. :ref:`PropertyTweener` **from_current**\ (\ ) :ref:`πŸ”—` -Makes the **PropertyTweener** use the current property value (i.e. at the time of creating this **PropertyTweener**) as a starting point. This is equivalent of using :ref:`from` with the current value. These two calls will do the same: +Makes the **PropertyTweener** use the current property value (i.e. at the time of creating this **PropertyTweener**) as a starting point. This is equivalent of using :ref:`from()` with the current value. These two calls will do the same: .. tabs:: diff --git a/classes/class_quaternion.rst b/classes/class_quaternion.rst index 36537055e..a10209e56 100644 --- a/classes/class_quaternion.rst +++ b/classes/class_quaternion.rst @@ -19,11 +19,11 @@ Description The **Quaternion** built-in :ref:`Variant` type is a 4D data structure that represents rotation in the form of a `Hamilton convention quaternion `__. Compared to the :ref:`Basis` type which can store both rotation and scale, quaternions can *only* store rotation. -A **Quaternion** is composed by 4 floating-point components: :ref:`w`, :ref:`x`, :ref:`y`, and :ref:`z`. These components are very compact in memory, and because of this some operations are more efficient and less likely to cause floating-point errors. Methods such as :ref:`get_angle`, :ref:`get_axis`, and :ref:`slerp` are faster than their :ref:`Basis` counterparts. +A **Quaternion** is composed by 4 floating-point components: :ref:`w`, :ref:`x`, :ref:`y`, and :ref:`z`. These components are very compact in memory, and because of this some operations are more efficient and less likely to cause floating-point errors. Methods such as :ref:`get_angle()`, :ref:`get_axis()`, and :ref:`slerp()` are faster than their :ref:`Basis` counterparts. -For a great introduction to quaternions, see `this video by 3Blue1Brown `__. You do not need to know the math behind quaternions, as Godot provides several helper methods that handle it for you. These include :ref:`slerp` and :ref:`spherical_cubic_interpolate`, as well as the ``*`` operator. +For a great introduction to quaternions, see `this video by 3Blue1Brown `__. You do not need to know the math behind quaternions, as Godot provides several helper methods that handle it for you. These include :ref:`slerp()` and :ref:`spherical_cubic_interpolate()`, as well as the ``*`` operator. -\ **Note:** Quaternions must be normalized before being used for rotation (see :ref:`normalized`). +\ **Note:** Quaternions must be normalized before being used for rotation (see :ref:`normalized()`). \ **Note:** Similarly to :ref:`Vector2` and :ref:`Vector3`, the components of a quaternion use 32-bit precision by default, unlike :ref:`float` which is always 64-bit. If double precision is needed, compile the engine with the option ``precision=double``. @@ -311,7 +311,7 @@ Constructs a **Quaternion** representing rotation around the ``axis`` by the giv Constructs a **Quaternion** from the given rotation :ref:`Basis`. -This constructor is faster than :ref:`Basis.get_rotation_quaternion`, but the given basis must be *orthonormalized* (see :ref:`Basis.orthonormalized`). Otherwise, the constructor fails and returns :ref:`IDENTITY`. +This constructor is faster than :ref:`Basis.get_rotation_quaternion()`, but the given basis must be *orthonormalized* (see :ref:`Basis.orthonormalized()`). Otherwise, the constructor fails and returns :ref:`IDENTITY`. .. rst-class:: classref-item-separator @@ -420,7 +420,7 @@ Returns the rotation axis of the rotation represented by this quaternion. Returns this quaternion's rotation as a :ref:`Vector3` of `Euler angles `__, in radians. -The order of each consecutive rotation can be changed with ``order`` (see :ref:`EulerOrder` constants). By default, the YXZ convention is used (:ref:`@GlobalScope.EULER_ORDER_YXZ`): Z (roll) is calculated first, then X (pitch), and lastly Y (yaw). When using the opposite method :ref:`from_euler`, this order is reversed. +The order of each consecutive rotation can be changed with ``order`` (see :ref:`EulerOrder` constants). By default, the YXZ convention is used (:ref:`@GlobalScope.EULER_ORDER_YXZ`): Z (roll) is calculated first, then X (pitch), and lastly Y (yaw). When using the opposite method :ref:`from_euler()`, this order is reversed. .. rst-class:: classref-item-separator @@ -444,7 +444,7 @@ Returns the inverse version of this quaternion, inverting the sign of every comp :ref:`bool` **is_equal_approx**\ (\ to\: :ref:`Quaternion`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this quaternion and ``to`` are approximately equal, by calling :ref:`@GlobalScope.is_equal_approx` on each component. +Returns ``true`` if this quaternion and ``to`` are approximately equal, by calling :ref:`@GlobalScope.is_equal_approx()` on each component. .. rst-class:: classref-item-separator @@ -456,7 +456,7 @@ Returns ``true`` if this quaternion and ``to`` are approximately equal, by calli :ref:`bool` **is_finite**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this quaternion is finite, by calling :ref:`@GlobalScope.is_finite` on each component. +Returns ``true`` if this quaternion is finite, by calling :ref:`@GlobalScope.is_finite()` on each component. .. rst-class:: classref-item-separator @@ -468,7 +468,7 @@ Returns ``true`` if this quaternion is finite, by calling :ref:`@GlobalScope.is_ :ref:`bool` **is_normalized**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this quaternion is normalized. See also :ref:`normalized`. +Returns ``true`` if this quaternion is normalized. See also :ref:`normalized()`. .. rst-class:: classref-item-separator @@ -494,7 +494,7 @@ Returns this quaternion's length, also called magnitude. Returns this quaternion's length, squared. -\ **Note:** This method is faster than :ref:`length`, so prefer it if you only need to compare quaternion lengths. +\ **Note:** This method is faster than :ref:`length()`, so prefer it if you only need to compare quaternion lengths. .. rst-class:: classref-item-separator @@ -518,7 +518,7 @@ Returns the logarithm of this quaternion. Multiplies this quaternion's rotation :ref:`Quaternion` **normalized**\ (\ ) |const| :ref:`πŸ”—` -Returns a copy of this quaternion, normalized so that its length is ``1.0``. See also :ref:`is_normalized`. +Returns a copy of this quaternion, normalized so that its length is ``1.0``. See also :ref:`is_normalized()`. .. rst-class:: classref-item-separator @@ -542,7 +542,7 @@ Performs a spherical-linear interpolation with the ``to`` quaternion, given a `` :ref:`Quaternion` **slerpni**\ (\ to\: :ref:`Quaternion`, weight\: :ref:`float`\ ) |const| :ref:`πŸ”—` -Performs a spherical-linear interpolation with the ``to`` quaternion, given a ``weight`` and returns the result. Unlike :ref:`slerp`, this method does not check if the rotation path is smaller than 90 degrees. Both this quaternion and ``to`` must be normalized. +Performs a spherical-linear interpolation with the ``to`` quaternion, given a ``weight`` and returns the result. Unlike :ref:`slerp()`, this method does not check if the rotation path is smaller than 90 degrees. Both this quaternion and ``to`` must be normalized. .. rst-class:: classref-item-separator @@ -568,7 +568,7 @@ Performs a spherical cubic interpolation between quaternions ``pre_a``, this vec Performs a spherical cubic interpolation between quaternions ``pre_a``, this vector, ``b``, and ``post_b``, by the given amount ``weight``. -It can perform smoother interpolation than :ref:`spherical_cubic_interpolate` by the time values. +It can perform smoother interpolation than :ref:`spherical_cubic_interpolate()` by the time values. .. rst-class:: classref-section-separator @@ -587,7 +587,7 @@ Operator Descriptions Returns ``true`` if the components of both quaternions are not exactly equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. rst-class:: classref-item-separator @@ -709,7 +709,7 @@ This operation is not meaningful on its own, but it can be used as a part of a l Returns ``true`` if the components of both quaternions are exactly equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. rst-class:: classref-item-separator diff --git a/classes/class_randomnumbergenerator.rst b/classes/class_randomnumbergenerator.rst index 0a8427c58..c3d170009 100644 --- a/classes/class_randomnumbergenerator.rst +++ b/classes/class_randomnumbergenerator.rst @@ -102,7 +102,7 @@ Initializes the random number generator state based on the given seed value. A g \ **Note:** Setting this property produces a side effect of changing the internal :ref:`state`, so make sure to initialize the seed *before* modifying the :ref:`state`: -\ **Note:** The default value of this property is pseudo-random, and changes when calling :ref:`randomize`. The ``0`` value documented here is a placeholder, and not the actual default seed. +\ **Note:** The default value of this property is pseudo-random, and changes when calling :ref:`randomize()`. The ``0`` value documented here is a placeholder, and not the actual default seed. :: @@ -138,7 +138,7 @@ The current state of the random number generator. Save and restore this property \ **Note:** Do not set state to arbitrary values, since the random number generator requires the state to have certain qualities to behave properly. It should only be set to values that came from the state property itself. To initialize the random number generator with arbitrary input, use :ref:`seed` instead. -\ **Note:** The default value of this property is pseudo-random, and changes when calling :ref:`randomize`. The ``0`` value documented here is a placeholder, and not the actual default seed. +\ **Note:** The default value of this property is pseudo-random, and changes when calling :ref:`randomize()`. The ``0`` value documented here is a placeholder, and not the actual default seed. .. rst-class:: classref-section-separator diff --git a/classes/class_range.rst b/classes/class_range.rst index b4adc5903..377dd4f0f 100644 --- a/classes/class_range.rst +++ b/classes/class_range.rst @@ -277,7 +277,7 @@ If greater than 0, :ref:`value` will always be round - |void| **set_value**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_value**\ (\ ) -Range's current value. Changing this property (even via code) will trigger :ref:`value_changed` signal. Use :ref:`set_value_no_signal` if you want to avoid it. +Range's current value. Changing this property (even via code) will trigger :ref:`value_changed` signal. Use :ref:`set_value_no_signal()` if you want to avoid it. .. rst-class:: classref-section-separator diff --git a/classes/class_raycast2d.rst b/classes/class_raycast2d.rst index 6d770a5bf..3f6fc01fd 100644 --- a/classes/class_raycast2d.rst +++ b/classes/class_raycast2d.rst @@ -23,7 +23,7 @@ A raycast represents a ray from its origin to its :ref:`target_position`\ s (:ref:`collide_with_areas`) or :ref:`PhysicsBody2D`\ s (:ref:`collide_with_bodies`), or by configuring physics layers. -\ **RayCast2D** calculates intersection every physics frame, and it holds the result until the next physics frame. For an immediate raycast, or if you want to configure a **RayCast2D** multiple times within the same physics frame, use :ref:`force_raycast_update`. +\ **RayCast2D** calculates intersection every physics frame, and it holds the result until the next physics frame. For an immediate raycast, or if you want to configure a **RayCast2D** multiple times within the same physics frame, use :ref:`force_raycast_update()`. To sweep over a region of 2D space, you can approximate the region with multiple **RayCast2D**\ s or use :ref:`ShapeCast2D`. @@ -285,7 +285,7 @@ Updates the collision information for the ray immediately, without waiting for t :ref:`Object` **get_collider**\ (\ ) |const| :ref:`πŸ”—` -Returns the first object that the ray intersects, or ``null`` if no object is intersecting the ray (i.e. :ref:`is_colliding` returns ``false``). +Returns the first object that the ray intersects, or ``null`` if no object is intersecting the ray (i.e. :ref:`is_colliding()` returns ``false``). .. rst-class:: classref-item-separator @@ -297,7 +297,7 @@ Returns the first object that the ray intersects, or ``null`` if no object is in :ref:`RID` **get_collider_rid**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`RID` of the first object that the ray intersects, or an empty :ref:`RID` if no object is intersecting the ray (i.e. :ref:`is_colliding` returns ``false``). +Returns the :ref:`RID` of the first object that the ray intersects, or an empty :ref:`RID` if no object is intersecting the ray (i.e. :ref:`is_colliding()` returns ``false``). .. rst-class:: classref-item-separator @@ -309,7 +309,7 @@ Returns the :ref:`RID` of the first object that the ray intersects, o :ref:`int` **get_collider_shape**\ (\ ) |const| :ref:`πŸ”—` -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``). +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: @@ -356,7 +356,7 @@ 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. +\ **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 @@ -370,7 +370,7 @@ Returns the normal of the intersecting object's shape at the collision point, or 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:** Check that :ref:`is_colliding` returns ``true`` before calling this method to ensure the returned point is valid and up-to-date. +\ **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 580afc58d..3af4b0f92 100644 --- a/classes/class_raycast3d.rst +++ b/classes/class_raycast3d.rst @@ -23,7 +23,7 @@ A raycast represents a ray from its origin to its :ref:`target_position`\ s (:ref:`collide_with_areas`) or :ref:`PhysicsBody3D`\ s (:ref:`collide_with_bodies`), or by configuring physics layers. -\ **RayCast3D** calculates intersection every physics frame, and it holds the result until the next physics frame. For an immediate raycast, or if you want to configure a **RayCast3D** multiple times within the same physics frame, use :ref:`force_raycast_update`. +\ **RayCast3D** calculates intersection every physics frame, and it holds the result until the next physics frame. For an immediate raycast, or if you want to configure a **RayCast3D** multiple times within the same physics frame, use :ref:`force_raycast_update()`. To sweep over a region of 3D space, you can approximate the region with multiple **RayCast3D**\ s or use :ref:`ShapeCast3D`. @@ -348,7 +348,7 @@ Updates the collision information for the ray immediately, without waiting for t :ref:`Object` **get_collider**\ (\ ) |const| :ref:`πŸ”—` -Returns the first object that the ray intersects, or ``null`` if no object is intersecting the ray (i.e. :ref:`is_colliding` returns ``false``). +Returns the first object that the ray intersects, or ``null`` if no object is intersecting the ray (i.e. :ref:`is_colliding()` returns ``false``). \ **Note:** This object is not guaranteed to be a :ref:`CollisionObject3D`. For example, if the ray intersects a :ref:`CSGShape3D` or a :ref:`GridMap`, the method will return a :ref:`CSGShape3D` or :ref:`GridMap` instance. @@ -362,7 +362,7 @@ Returns the first object that the ray intersects, or ``null`` if no object is in :ref:`RID` **get_collider_rid**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`RID` of the first object that the ray intersects, or an empty :ref:`RID` if no object is intersecting the ray (i.e. :ref:`is_colliding` returns ``false``). +Returns the :ref:`RID` of the first object that the ray intersects, or an empty :ref:`RID` if no object is intersecting the ray (i.e. :ref:`is_colliding()` returns ``false``). .. rst-class:: classref-item-separator @@ -374,7 +374,7 @@ Returns the :ref:`RID` of the first object that the ray intersects, o :ref:`int` **get_collider_shape**\ (\ ) |const| :ref:`πŸ”—` -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``). +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: @@ -433,7 +433,7 @@ 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. +\ **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 @@ -447,7 +447,7 @@ Returns the normal of the intersecting object's shape at the collision point, or 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:** Check that :ref:`is_colliding` returns ``true`` before calling this method to ensure the returned point is valid and up-to-date. +\ **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_rdpipelinecolorblendstate.rst b/classes/class_rdpipelinecolorblendstate.rst index 681b7128d..20e6d96ec 100644 --- a/classes/class_rdpipelinecolorblendstate.rst +++ b/classes/class_rdpipelinecolorblendstate.rst @@ -76,7 +76,7 @@ The attachments that are blended together. - |void| **set_blend_constant**\ (\ value\: :ref:`Color`\ ) - :ref:`Color` **get_blend_constant**\ (\ ) -The constant color to blend with. See also :ref:`RenderingDevice.draw_list_set_blend_constants`. +The constant color to blend with. See also :ref:`RenderingDevice.draw_list_set_blend_constants()`. .. rst-class:: classref-item-separator diff --git a/classes/class_rect2.rst b/classes/class_rect2.rst index ba2d6e7f1..364c6f955 100644 --- a/classes/class_rect2.rst +++ b/classes/class_rect2.rst @@ -17,11 +17,11 @@ A 2D axis-aligned bounding box using floating-point coordinates. Description ----------- -The **Rect2** built-in :ref:`Variant` type represents an axis-aligned rectangle in a 2D space. It is defined by its :ref:`position` and :ref:`size`, which are :ref:`Vector2`. It is frequently used for fast overlap tests (see :ref:`intersects`). Although **Rect2** itself is axis-aligned, it can be combined with :ref:`Transform2D` to represent a rotated or skewed rectangle. +The **Rect2** built-in :ref:`Variant` type represents an axis-aligned rectangle in a 2D space. It is defined by its :ref:`position` and :ref:`size`, which are :ref:`Vector2`. It is frequently used for fast overlap tests (see :ref:`intersects()`). Although **Rect2** itself is axis-aligned, it can be combined with :ref:`Transform2D` to represent a rotated or skewed rectangle. For integer coordinates, use :ref:`Rect2i`. The 3D equivalent to **Rect2** is :ref:`AABB`. -\ **Note:** Negative values for :ref:`size` are not supported. With negative size, most **Rect2** methods do not work correctly. Use :ref:`abs` to get an equivalent **Rect2** with a non-negative size. +\ **Note:** Negative values for :ref:`size` are not supported. With negative size, most **Rect2** methods do not work correctly. Use :ref:`abs()` to get an equivalent **Rect2** with a non-negative size. \ **Note:** In a boolean context, a **Rect2** evaluates to ``false`` if both :ref:`position` and :ref:`size` are zero (equal to :ref:`Vector2.ZERO`). Otherwise, it always evaluates to ``true``. @@ -175,7 +175,7 @@ The origin point. This is usually the top-left corner of the rectangle. The rectangle's width and height, starting from :ref:`position`. Setting this value also affects the :ref:`end` point. -\ **Note:** It's recommended setting the width and height to non-negative values, as most methods in Godot assume that the :ref:`position` is the top-left corner, and the :ref:`end` is the bottom-right corner. To get an equivalent rectangle with non-negative size, use :ref:`abs`. +\ **Note:** It's recommended setting the width and height to non-negative values, as most methods in Godot assume that the :ref:`position` is the top-left corner, and the :ref:`end` is the bottom-right corner. To get an equivalent rectangle with non-negative size, use :ref:`abs()`. .. rst-class:: classref-section-separator @@ -321,7 +321,7 @@ Returns a copy of this rectangle expanded to align the edges with the given ``to :ref:`float` **get_area**\ (\ ) |const| :ref:`πŸ”—` -Returns the rectangle's area. This is equivalent to ``size.x * size.y``. See also :ref:`has_area`. +Returns the rectangle's area. This is equivalent to ``size.x * size.y``. See also :ref:`has_area()`. .. rst-class:: classref-item-separator @@ -357,7 +357,7 @@ Returns the vertex's position of this rect that's the farthest in the given dire :ref:`Rect2` **grow**\ (\ amount\: :ref:`float`\ ) |const| :ref:`πŸ”—` -Returns a copy of this rectangle extended on all sides by the given ``amount``. A negative ``amount`` shrinks the rectangle instead. See also :ref:`grow_individual` and :ref:`grow_side`. +Returns a copy of this rectangle extended on all sides by the given ``amount``. A negative ``amount`` shrinks the rectangle instead. See also :ref:`grow_individual()` and :ref:`grow_side()`. .. tabs:: @@ -384,7 +384,7 @@ Returns a copy of this rectangle extended on all sides by the given ``amount``. :ref:`Rect2` **grow_individual**\ (\ left\: :ref:`float`, top\: :ref:`float`, right\: :ref:`float`, bottom\: :ref:`float`\ ) |const| :ref:`πŸ”—` -Returns a copy of this rectangle with its ``left``, ``top``, ``right``, and ``bottom`` sides extended by the given amounts. Negative values shrink the sides, instead. See also :ref:`grow` and :ref:`grow_side`. +Returns a copy of this rectangle with its ``left``, ``top``, ``right``, and ``bottom`` sides extended by the given amounts. Negative values shrink the sides, instead. See also :ref:`grow()` and :ref:`grow_side()`. .. rst-class:: classref-item-separator @@ -396,7 +396,7 @@ Returns a copy of this rectangle with its ``left``, ``top``, ``right``, and ``bo :ref:`Rect2` **grow_side**\ (\ side\: :ref:`int`, amount\: :ref:`float`\ ) |const| :ref:`πŸ”—` -Returns a copy of this rectangle with its ``side`` extended by the given ``amount`` (see :ref:`Side` constants). A negative ``amount`` shrinks the rectangle, instead. See also :ref:`grow` and :ref:`grow_individual`. +Returns a copy of this rectangle with its ``side`` extended by the given ``amount`` (see :ref:`Side` constants). A negative ``amount`` shrinks the rectangle, instead. See also :ref:`grow()` and :ref:`grow_individual()`. .. rst-class:: classref-item-separator @@ -408,7 +408,7 @@ Returns a copy of this rectangle with its ``side`` extended by the given ``amoun :ref:`bool` **has_area**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this rectangle has positive width and height. See also :ref:`get_area`. +Returns ``true`` if this rectangle has positive width and height. See also :ref:`get_area()`. .. rst-class:: classref-item-separator @@ -422,7 +422,7 @@ Returns ``true`` if this rectangle has positive width and height. See also :ref: Returns ``true`` if the rectangle contains the given ``point``. By convention, points on the right and bottom edges are **not** included. -\ **Note:** This method is not reliable for **Rect2** with a *negative* :ref:`size`. Use :ref:`abs` first to get a valid rectangle. +\ **Note:** This method is not reliable for **Rect2** with a *negative* :ref:`size`. Use :ref:`abs()` first to get a valid rectangle. .. rst-class:: classref-item-separator @@ -455,7 +455,7 @@ Returns the intersection between this rectangle and ``b``. If the rectangles do -\ **Note:** If you only need to know whether two rectangles are overlapping, use :ref:`intersects`, instead. +\ **Note:** If you only need to know whether two rectangles are overlapping, use :ref:`intersects()`, instead. .. rst-class:: classref-item-separator @@ -479,7 +479,7 @@ Returns ``true`` if this rectangle overlaps with the ``b`` rectangle. The edges :ref:`bool` **is_equal_approx**\ (\ rect\: :ref:`Rect2`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this rectangle and ``rect`` are approximately equal, by calling :ref:`Vector2.is_equal_approx` on the :ref:`position` and the :ref:`size`. +Returns ``true`` if this rectangle and ``rect`` are approximately equal, by calling :ref:`Vector2.is_equal_approx()` on the :ref:`position` and the :ref:`size`. .. rst-class:: classref-item-separator @@ -491,7 +491,7 @@ Returns ``true`` if this rectangle and ``rect`` are approximately equal, by call :ref:`bool` **is_finite**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this rectangle's values are finite, by calling :ref:`Vector2.is_finite` on the :ref:`position` and the :ref:`size`. +Returns ``true`` if this rectangle's values are finite, by calling :ref:`Vector2.is_finite()` on the :ref:`position` and the :ref:`size`. .. rst-class:: classref-item-separator @@ -503,7 +503,7 @@ Returns ``true`` if this rectangle's values are finite, by calling :ref:`Vector2 :ref:`Rect2` **merge**\ (\ b\: :ref:`Rect2`\ ) |const| :ref:`πŸ”—` -Returns a **Rect2** that encloses both this rectangle and ``b`` around the edges. See also :ref:`encloses`. +Returns a **Rect2** that encloses both this rectangle and ``b`` around the edges. See also :ref:`encloses()`. .. rst-class:: classref-section-separator @@ -522,7 +522,7 @@ Operator Descriptions Returns ``true`` if the :ref:`position` or :ref:`size` of both rectangles are not equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. rst-class:: classref-item-separator @@ -536,9 +536,9 @@ Returns ``true`` if the :ref:`position` or :ref:` Inversely transforms (multiplies) the **Rect2** by the given :ref:`Transform2D` transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). -\ ``rect * transform`` is equivalent to ``transform.inverse() * rect``. See :ref:`Transform2D.inverse`. +\ ``rect * transform`` is equivalent to ``transform.inverse() * rect``. See :ref:`Transform2D.inverse()`. -For transforming by inverse of an affine transformation (e.g. with scaling) ``transform.affine_inverse() * rect`` can be used instead. See :ref:`Transform2D.affine_inverse`. +For transforming by inverse of an affine transformation (e.g. with scaling) ``transform.affine_inverse() * rect`` can be used instead. See :ref:`Transform2D.affine_inverse()`. .. rst-class:: classref-item-separator @@ -552,7 +552,7 @@ For transforming by inverse of an affine transformation (e.g. with scaling) ``tr Returns ``true`` if both :ref:`position` and :ref:`size` of the rectangles are exactly equal, respectively. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. |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_rect2i.rst b/classes/class_rect2i.rst index 16e8d4656..a2f11b7e6 100644 --- a/classes/class_rect2i.rst +++ b/classes/class_rect2i.rst @@ -17,11 +17,11 @@ A 2D axis-aligned bounding box using integer coordinates. Description ----------- -The **Rect2i** built-in :ref:`Variant` type represents an axis-aligned rectangle in a 2D space, using integer coordinates. It is defined by its :ref:`position` and :ref:`size`, which are :ref:`Vector2i`. Because it does not rotate, it is frequently used for fast overlap tests (see :ref:`intersects`). +The **Rect2i** built-in :ref:`Variant` type represents an axis-aligned rectangle in a 2D space, using integer coordinates. It is defined by its :ref:`position` and :ref:`size`, which are :ref:`Vector2i`. Because it does not rotate, it is frequently used for fast overlap tests (see :ref:`intersects()`). For floating-point coordinates, see :ref:`Rect2`. -\ **Note:** Negative values for :ref:`size` are not supported. With negative size, most **Rect2i** methods do not work correctly. Use :ref:`abs` to get an equivalent **Rect2i** with a non-negative size. +\ **Note:** Negative values for :ref:`size` are not supported. With negative size, most **Rect2i** methods do not work correctly. Use :ref:`abs()` to get an equivalent **Rect2i** with a non-negative size. \ **Note:** In a boolean context, a **Rect2i** evaluates to ``false`` if both :ref:`position` and :ref:`size` are zero (equal to :ref:`Vector2i.ZERO`). Otherwise, it always evaluates to ``true``. @@ -165,7 +165,7 @@ The origin point. This is usually the top-left corner of the rectangle. The rectangle's width and height, starting from :ref:`position`. Setting this value also affects the :ref:`end` point. -\ **Note:** It's recommended setting the width and height to non-negative values, as most methods in Godot assume that the :ref:`position` is the top-left corner, and the :ref:`end` is the bottom-right corner. To get an equivalent rectangle with non-negative size, use :ref:`abs`. +\ **Note:** It's recommended setting the width and height to non-negative values, as most methods in Godot assume that the :ref:`position` is the top-left corner, and the :ref:`end` is the bottom-right corner. To get an equivalent rectangle with non-negative size, use :ref:`abs()`. .. rst-class:: classref-section-separator @@ -311,7 +311,7 @@ Returns a copy of this rectangle expanded to align the edges with the given ``to :ref:`int` **get_area**\ (\ ) |const| :ref:`πŸ”—` -Returns the rectangle's area. This is equivalent to ``size.x * size.y``. See also :ref:`has_area`. +Returns the rectangle's area. This is equivalent to ``size.x * size.y``. See also :ref:`has_area()`. .. rst-class:: classref-item-separator @@ -337,7 +337,7 @@ Returns the center point of the rectangle. This is the same as ``position + (siz :ref:`Rect2i` **grow**\ (\ amount\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns a copy of this rectangle extended on all sides by the given ``amount``. A negative ``amount`` shrinks the rectangle instead. See also :ref:`grow_individual` and :ref:`grow_side`. +Returns a copy of this rectangle extended on all sides by the given ``amount``. A negative ``amount`` shrinks the rectangle instead. See also :ref:`grow_individual()` and :ref:`grow_side()`. .. tabs:: @@ -364,7 +364,7 @@ Returns a copy of this rectangle extended on all sides by the given ``amount``. :ref:`Rect2i` **grow_individual**\ (\ left\: :ref:`int`, top\: :ref:`int`, right\: :ref:`int`, bottom\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns a copy of this rectangle with its ``left``, ``top``, ``right``, and ``bottom`` sides extended by the given amounts. Negative values shrink the sides, instead. See also :ref:`grow` and :ref:`grow_side`. +Returns a copy of this rectangle with its ``left``, ``top``, ``right``, and ``bottom`` sides extended by the given amounts. Negative values shrink the sides, instead. See also :ref:`grow()` and :ref:`grow_side()`. .. rst-class:: classref-item-separator @@ -376,7 +376,7 @@ Returns a copy of this rectangle with its ``left``, ``top``, ``right``, and ``bo :ref:`Rect2i` **grow_side**\ (\ side\: :ref:`int`, amount\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns a copy of this rectangle with its ``side`` extended by the given ``amount`` (see :ref:`Side` constants). A negative ``amount`` shrinks the rectangle, instead. See also :ref:`grow` and :ref:`grow_individual`. +Returns a copy of this rectangle with its ``side`` extended by the given ``amount`` (see :ref:`Side` constants). A negative ``amount`` shrinks the rectangle, instead. See also :ref:`grow()` and :ref:`grow_individual()`. .. rst-class:: classref-item-separator @@ -388,7 +388,7 @@ Returns a copy of this rectangle with its ``side`` extended by the given ``amoun :ref:`bool` **has_area**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this rectangle has positive width and height. See also :ref:`get_area`. +Returns ``true`` if this rectangle has positive width and height. See also :ref:`get_area()`. .. rst-class:: classref-item-separator @@ -402,7 +402,7 @@ Returns ``true`` if this rectangle has positive width and height. See also :ref: Returns ``true`` if the rectangle contains the given ``point``. By convention, points on the right and bottom edges are **not** included. -\ **Note:** This method is not reliable for **Rect2i** with a *negative* :ref:`size`. Use :ref:`abs` first to get a valid rectangle. +\ **Note:** This method is not reliable for **Rect2i** with a *negative* :ref:`size`. Use :ref:`abs()` first to get a valid rectangle. .. rst-class:: classref-item-separator @@ -435,7 +435,7 @@ Returns the intersection between this rectangle and ``b``. If the rectangles do -\ **Note:** If you only need to know whether two rectangles are overlapping, use :ref:`intersects`, instead. +\ **Note:** If you only need to know whether two rectangles are overlapping, use :ref:`intersects()`, instead. .. rst-class:: classref-item-separator @@ -459,7 +459,7 @@ Returns ``true`` if this rectangle overlaps with the ``b`` rectangle. The edges :ref:`Rect2i` **merge**\ (\ b\: :ref:`Rect2i`\ ) |const| :ref:`πŸ”—` -Returns a **Rect2i** that encloses both this rectangle and ``b`` around the edges. See also :ref:`encloses`. +Returns a **Rect2i** that encloses both this rectangle and ``b`` around the edges. See also :ref:`encloses()`. .. rst-class:: classref-section-separator diff --git a/classes/class_refcounted.rst b/classes/class_refcounted.rst index ab4325661..6ed715a9a 100644 --- a/classes/class_refcounted.rst +++ b/classes/class_refcounted.rst @@ -23,9 +23,9 @@ Description Base class for any object that keeps a reference count. :ref:`Resource` and many other helper objects inherit this class. -Unlike other :ref:`Object` types, **RefCounted**\ s keep an internal reference counter so that they are automatically released when no longer in use, and only then. **RefCounted**\ s therefore do not need to be freed manually with :ref:`Object.free`. +Unlike other :ref:`Object` types, **RefCounted**\ s keep an internal reference counter so that they are automatically released when no longer in use, and only then. **RefCounted**\ s therefore do not need to be freed manually with :ref:`Object.free()`. -\ **RefCounted** instances caught in a cyclic reference will **not** be freed automatically. For example, if a node holds a reference to instance ``A``, which directly or indirectly holds a reference back to ``A``, ``A``'s reference count will be 2. Destruction of the node will leave ``A`` dangling with a reference count of 1, and there will be a memory leak. To prevent this, one of the references in the cycle can be made weak with :ref:`@GlobalScope.weakref`. +\ **RefCounted** instances caught in a cyclic reference will **not** be freed automatically. For example, if a node holds a reference to instance ``A``, which directly or indirectly holds a reference back to ``A``, ``A``'s reference count will be 2. Destruction of the node will leave ``A`` dangling with a reference count of 1, and there will be a memory leak. To prevent this, one of the references in the cycle can be made weak with :ref:`@GlobalScope.weakref()`. In the vast majority of use cases, instantiating and using **RefCounted**-derived types is all you need to do. The methods provided in this class are only for advanced users, and can cause issues if misused. diff --git a/classes/class_regex.rst b/classes/class_regex.rst index afe0d3835..167ae2021 100644 --- a/classes/class_regex.rst +++ b/classes/class_regex.rst @@ -21,7 +21,7 @@ Description A regular expression (or regex) is a compact language that can be used to recognize strings that follow a specific pattern, such as URLs, email addresses, complete sentences, etc. For example, a regex of ``ab[0-9]`` would find any string that is ``ab`` followed by any number from ``0`` to ``9``. For a more in-depth look, you can easily find various tutorials and detailed explanations on the Internet. -To begin, the RegEx object needs to be compiled with the search pattern using :ref:`compile` before it can be used. +To begin, the RegEx object needs to be compiled with the search pattern using :ref:`compile()` before it can be used. :: @@ -30,7 +30,7 @@ To begin, the RegEx object needs to be compiled with the search pattern using :r The search pattern must be escaped first for GDScript before it is escaped for the expression. For example, ``compile("\\d+")`` would be read by RegEx as ``\d+``. Similarly, ``compile("\"(?:\\\\.|[^\"])*\"")`` would be read as ``"(?:\\.|[^"])*"``. In GDScript, you can also use raw string literals (r-strings). For example, ``compile(r'"(?:\\.|[^"])*"')`` would be read the same. -Using :ref:`search`, you can find the pattern within the given text. If a pattern is found, :ref:`RegExMatch` is returned and you can retrieve details of the results using methods such as :ref:`RegExMatch.get_string` and :ref:`RegExMatch.get_start`. +Using :ref:`search()`, you can find the pattern within the given text. If a pattern is found, :ref:`RegExMatch` is returned and you can retrieve details of the results using methods such as :ref:`RegExMatch.get_string()` and :ref:`RegExMatch.get_start()`. :: @@ -52,7 +52,7 @@ This version of RegEx also supports named capturing groups, and the names can be if result: print(result.get_string("digit")) # Would print 2f -If you need to process multiple results, :ref:`search_all` generates a list of all non-overlapping results. This can be combined with a ``for`` loop for convenience. +If you need to process multiple results, :ref:`search_all()` generates a list of all non-overlapping results. This can be combined with a ``for`` loop for convenience. :: @@ -144,7 +144,7 @@ Compiles and assign the search pattern to use. Returns :ref:`@GlobalScope.OK` **create_from_string**\ (\ pattern\: :ref:`String`, show_error\: :ref:`bool` = true\ ) |static| :ref:`πŸ”—` -Creates and compiles a new **RegEx** object. See also :ref:`compile`. +Creates and compiles a new **RegEx** object. See also :ref:`compile()`. .. rst-class:: classref-item-separator diff --git a/classes/class_regexmatch.rst b/classes/class_regexmatch.rst index 9237e156b..c67a4fbfa 100644 --- a/classes/class_regexmatch.rst +++ b/classes/class_regexmatch.rst @@ -19,7 +19,7 @@ Contains the results of a :ref:`RegEx` search. Description ----------- -Contains the results of a single :ref:`RegEx` match returned by :ref:`RegEx.search` and :ref:`RegEx.search_all`. It can be used to find the position and range of the match and its capturing groups, and it can extract its substring for you. +Contains the results of a single :ref:`RegEx` match returned by :ref:`RegEx.search()` and :ref:`RegEx.search_all()`. It can be used to find the position and range of the match and its capturing groups, and it can extract its substring for you. .. rst-class:: classref-reftable-group diff --git a/classes/class_remotetransform2d.rst b/classes/class_remotetransform2d.rst index 7ffe32e0a..7a3d0395c 100644 --- a/classes/class_remotetransform2d.rst +++ b/classes/class_remotetransform2d.rst @@ -160,7 +160,7 @@ Method Descriptions |void| **force_update_cache**\ (\ ) :ref:`πŸ”—` -**RemoteTransform2D** caches the remote node. It may not notice if the remote node disappears; :ref:`force_update_cache` forces it to update the cache again. +**RemoteTransform2D** caches the remote node. It may not notice if the remote node disappears; :ref:`force_update_cache()` forces it to update the cache again. .. |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_remotetransform3d.rst b/classes/class_remotetransform3d.rst index 552885263..885cb79d9 100644 --- a/classes/class_remotetransform3d.rst +++ b/classes/class_remotetransform3d.rst @@ -160,7 +160,7 @@ Method Descriptions |void| **force_update_cache**\ (\ ) :ref:`πŸ”—` -**RemoteTransform3D** caches the remote node. It may not notice if the remote node disappears; :ref:`force_update_cache` forces it to update the cache again. +**RemoteTransform3D** caches the remote node. It may not notice if the remote node disappears; :ref:`force_update_cache()` forces it to update the cache again. .. |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_renderingdevice.rst b/classes/class_renderingdevice.rst index d35abcbf6..88e503e14 100644 --- a/classes/class_renderingdevice.rst +++ b/classes/class_renderingdevice.rst @@ -21,9 +21,9 @@ Description **RenderingDevice** is an abstraction for working with modern low-level graphics APIs such as Vulkan. Compared to :ref:`RenderingServer` (which works with Godot's own rendering subsystems), **RenderingDevice** is much lower-level and allows working more directly with the underlying graphics APIs. **RenderingDevice** is used in Godot to provide support for several modern low-level graphics APIs while reducing the amount of code duplication required. **RenderingDevice** can also be used in your own projects to perform things that are not exposed by :ref:`RenderingServer` or high-level nodes, such as using compute shaders. -On startup, Godot creates a global **RenderingDevice** which can be retrieved using :ref:`RenderingServer.get_rendering_device`. This global **RenderingDevice** performs drawing to the screen. +On startup, Godot creates a global **RenderingDevice** which can be retrieved using :ref:`RenderingServer.get_rendering_device()`. This global **RenderingDevice** performs drawing to the screen. -\ **Local RenderingDevices:** Using :ref:`RenderingServer.create_local_rendering_device`, you can create "secondary" rendering devices to perform drawing and GPU compute operations on separate threads. +\ **Local RenderingDevices:** Using :ref:`RenderingServer.create_local_rendering_device()`, you can create "secondary" rendering devices to perform drawing and GPU compute operations on separate threads. \ **Note:** **RenderingDevice** assumes intermediate knowledge of modern graphics APIs such as Vulkan, Direct3D 12, Metal or WebGPU. These graphics APIs are lower-level than OpenGL or Direct3D 11, requiring you to perform what was previously done by the graphics driver itself. If you have difficulty understanding the concepts used in this class, follow the `Vulkan Tutorial `__ or `Vulkan Guide `__. It's recommended to have existing modern OpenGL or Direct3D 11 knowledge before attempting to learn a low-level graphics API. @@ -193,7 +193,7 @@ Methods +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`index_array_create`\ (\ index_buffer\: :ref:`RID`, index_offset\: :ref:`int`, index_count\: :ref:`int`\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`index_buffer_create`\ (\ size_indices\: :ref:`int`, format\: :ref:`IndexBufferFormat`, data\: :ref:`PackedByteArray` = PackedByteArray(), use_restart_indices\: :ref:`bool` = false, enable_device_address\: :ref:`bool` = false\ ) | + | :ref:`RID` | :ref:`index_buffer_create`\ (\ size_indices\: :ref:`int`, format\: :ref:`IndexBufferFormat`, data\: :ref:`PackedByteArray` = PackedByteArray(), use_restart_indices\: :ref:`bool` = false, creation_bits\: |bitfield|\[:ref:`BufferCreationBits`\] = 0\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`limit_get`\ (\ limit\: :ref:`Limit`\ ) |const| | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -225,7 +225,7 @@ Methods +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`shader_get_vertex_input_attribute_mask`\ (\ shader\: :ref:`RID`\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`storage_buffer_create`\ (\ size_bytes\: :ref:`int`, data\: :ref:`PackedByteArray` = PackedByteArray(), usage\: |bitfield|\[:ref:`StorageBufferUsage`\] = 0\ ) | + | :ref:`RID` | :ref:`storage_buffer_create`\ (\ size_bytes\: :ref:`int`, data\: :ref:`PackedByteArray` = PackedByteArray(), usage\: |bitfield|\[:ref:`StorageBufferUsage`\] = 0, creation_bits\: |bitfield|\[:ref:`BufferCreationBits`\] = 0\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`submit`\ (\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -267,7 +267,7 @@ Methods +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`texture_update`\ (\ texture\: :ref:`RID`, layer\: :ref:`int`, data\: :ref:`PackedByteArray`\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`uniform_buffer_create`\ (\ size_bytes\: :ref:`int`, data\: :ref:`PackedByteArray` = PackedByteArray(), enable_device_address\: :ref:`bool` = false\ ) | + | :ref:`RID` | :ref:`uniform_buffer_create`\ (\ size_bytes\: :ref:`int`, data\: :ref:`PackedByteArray` = PackedByteArray(), creation_bits\: |bitfield|\[:ref:`BufferCreationBits`\] = 0\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`uniform_set_create`\ (\ uniforms\: :ref:`Array`\[:ref:`RDUniform`\], shader\: :ref:`RID`, shader_set\: :ref:`int`\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -275,7 +275,7 @@ Methods +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`vertex_array_create`\ (\ vertex_count\: :ref:`int`, vertex_format\: :ref:`int`, src_buffers\: :ref:`Array`\[:ref:`RID`\], offsets\: :ref:`PackedInt64Array` = PackedInt64Array()\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`vertex_buffer_create`\ (\ size_bytes\: :ref:`int`, data\: :ref:`PackedByteArray` = PackedByteArray(), use_as_storage\: :ref:`bool` = false, enable_device_address\: :ref:`bool` = false\ ) | + | :ref:`RID` | :ref:`vertex_buffer_create`\ (\ size_bytes\: :ref:`int`, data\: :ref:`PackedByteArray` = PackedByteArray(), creation_bits\: |bitfield|\[:ref:`BufferCreationBits`\] = 0\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`vertex_format_create`\ (\ vertex_descriptions\: :ref:`Array`\[:ref:`RDVertexAttribute`\]\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -2637,7 +2637,7 @@ Texture can be used as a `storage image ` **TEXTURE_USAGE_CPU_READ_BIT** = ``32`` -Texture can be read back on the CPU using :ref:`texture_get_data` faster than without this bit, since it is always kept in the system memory. +Texture can be read back on the CPU using :ref:`texture_get_data()` faster than without this bit, since it is always kept in the system memory. .. _class_RenderingDevice_constant_TEXTURE_USAGE_CAN_UPDATE_BIT: @@ -2645,7 +2645,7 @@ Texture can be read back on the CPU using :ref:`texture_get_data` **TEXTURE_USAGE_CAN_UPDATE_BIT** = ``64`` -Texture can be updated using :ref:`texture_update`. +Texture can be updated using :ref:`texture_update()`. .. _class_RenderingDevice_constant_TEXTURE_USAGE_CAN_COPY_FROM_BIT: @@ -2653,7 +2653,7 @@ Texture can be updated using :ref:`texture_update` **TEXTURE_USAGE_CAN_COPY_FROM_BIT** = ``128`` -Texture can be a source for :ref:`texture_copy`. +Texture can be a source for :ref:`texture_copy()`. .. _class_RenderingDevice_constant_TEXTURE_USAGE_CAN_COPY_TO_BIT: @@ -2661,7 +2661,7 @@ Texture can be a source for :ref:`texture_copy` **TEXTURE_USAGE_CAN_COPY_TO_BIT** = ``256`` -Texture can be a destination for :ref:`texture_copy`. +Texture can be a destination for :ref:`texture_copy()`. .. _class_RenderingDevice_constant_TEXTURE_USAGE_INPUT_ATTACHMENT_BIT: @@ -3003,13 +3003,44 @@ flags **StorageBufferUsage**: :ref:`πŸ”—` + +.. _class_RenderingDevice_constant_BUFFER_CREATION_DEVICE_ADDRESS_BIT: .. rst-class:: classref-enumeration-constant -:ref:`StorageBufferUsage` **STORAGE_BUFFER_USAGE_DEVICE_ADDRESS** = ``2`` +:ref:`BufferCreationBits` **BUFFER_CREATION_DEVICE_ADDRESS_BIT** = ``1`` -Allows usage of :ref:`buffer_get_device_address` on supported GPUs. +Optionally, set this flag if you wish to use :ref:`buffer_get_device_address()` functionality. You must first check the GPU supports it: + + +.. tabs:: + + .. code-tab:: gdscript + + rd = RenderingServer.get_rendering_device() + + if rd.has_feature(RenderingDevice.SUPPORTS_BUFFER_DEVICE_ADDRESS): + storage_buffer = rd.storage_buffer_create(bytes.size(), bytes, RenderingDevice.STORAGE_BUFFER_USAGE_SHADER_DEVICE_ADDRESS): + storage_buffer_address = rd.buffer_get_device_address(storage_buffer) + + + +.. _class_RenderingDevice_constant_BUFFER_CREATION_AS_STORAGE_BIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BufferCreationBits` **BUFFER_CREATION_AS_STORAGE_BIT** = ``2`` + +Set this flag so that it is created as storage. This is useful if Compute Shaders need access (for reading or writing) to the buffer, e.g. skeletal animations are processed in Compute Shaders which need access to vertex buffers, to be later consumed by vertex shaders as part of the regular rasterization pipeline. .. rst-class:: classref-item-separator @@ -3691,7 +3722,7 @@ Color and alpha blend factor is ``1.0 - destination alpha``. :ref:`BlendFactor` **BLEND_FACTOR_CONSTANT_COLOR** = ``10`` -Color blend factor is ``blend constant color``. Alpha blend factor is ``blend constant alpha`` (see :ref:`draw_list_set_blend_constants`). +Color blend factor is ``blend constant color``. Alpha blend factor is ``blend constant alpha`` (see :ref:`draw_list_set_blend_constants()`). .. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR: @@ -3699,7 +3730,7 @@ Color blend factor is ``blend constant color``. Alpha blend factor is ``blend co :ref:`BlendFactor` **BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR** = ``11`` -Color blend factor is ``1.0 - blend constant color``. Alpha blend factor is ``1.0 - blend constant alpha`` (see :ref:`draw_list_set_blend_constants`). +Color blend factor is ``1.0 - blend constant color``. Alpha blend factor is ``1.0 - blend constant alpha`` (see :ref:`draw_list_set_blend_constants()`). .. _class_RenderingDevice_constant_BLEND_FACTOR_CONSTANT_ALPHA: @@ -3707,7 +3738,7 @@ Color blend factor is ``1.0 - blend constant color``. Alpha blend factor is ``1. :ref:`BlendFactor` **BLEND_FACTOR_CONSTANT_ALPHA** = ``12`` -Color and alpha blend factor is ``blend constant alpha`` (see :ref:`draw_list_set_blend_constants`). +Color and alpha blend factor is ``blend constant alpha`` (see :ref:`draw_list_set_blend_constants()`). .. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA: @@ -3715,7 +3746,7 @@ Color and alpha blend factor is ``blend constant alpha`` (see :ref:`draw_list_se :ref:`BlendFactor` **BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA** = ``13`` -Color and alpha blend factor is ``1.0 - blend constant alpha`` (see :ref:`draw_list_set_blend_constants`). +Color and alpha blend factor is ``1.0 - blend constant alpha`` (see :ref:`draw_list_set_blend_constants()`). .. _class_RenderingDevice_constant_BLEND_FACTOR_SRC_ALPHA_SATURATE: @@ -5059,9 +5090,9 @@ Prints an error if: - the region specified by ``offset`` + ``size_bytes`` exceeds the buffer -- a draw list is currently active (created by :ref:`draw_list_begin`) +- a draw list is currently active (created by :ref:`draw_list_begin()`) -- a compute list is currently active (created by :ref:`compute_list_begin`) +- a compute list is currently active (created by :ref:`compute_list_begin()`) .. rst-class:: classref-item-separator @@ -5079,9 +5110,9 @@ Prints an error if: - ``size`` exceeds the size of either ``src_buffer`` or ``dst_buffer`` at their corresponding offsets -- a draw list is currently active (created by :ref:`draw_list_begin`) +- a draw list is currently active (created by :ref:`draw_list_begin()`) -- a compute list is currently active (created by :ref:`compute_list_begin`) +- a compute list is currently active (created by :ref:`compute_list_begin()`) .. rst-class:: classref-item-separator @@ -5095,7 +5126,7 @@ Prints an error if: Returns a copy of the data of the specified ``buffer``, optionally ``offset_bytes`` and ``size_bytes`` can be set to copy only a portion of the buffer. -\ **Note:** This method will block the GPU from working until the data is retrieved. Refer to :ref:`buffer_get_data_async` for an alternative that returns the data in more performant way. +\ **Note:** This method will block the GPU from working until the data is retrieved. Refer to :ref:`buffer_get_data_async()` for an alternative that returns the data in more performant way. .. rst-class:: classref-item-separator @@ -5107,7 +5138,7 @@ Returns a copy of the data of the specified ``buffer``, optionally ``offset_byte :ref:`Error` **buffer_get_data_async**\ (\ buffer\: :ref:`RID`, callback\: :ref:`Callable`, offset_bytes\: :ref:`int` = 0, size_bytes\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Asynchronous version of :ref:`buffer_get_data`. RenderingDevice will call ``callback`` in a certain amount of frames with the data the buffer had at the time of the request. +Asynchronous version of :ref:`buffer_get_data()`. RenderingDevice will call ``callback`` in a certain amount of frames with the data the buffer had at the time of the request. \ **Note:** At the moment, the delay corresponds to the amount of frames specified by :ref:`ProjectSettings.rendering/rendering_device/vsync/frame_queue_size`. @@ -5134,7 +5165,7 @@ Asynchronous version of :ref:`buffer_get_data` with :ref:`SUPPORTS_BUFFER_DEVICE_ADDRESS` as a parameter. +\ **Note:** You must check that the GPU supports this functionality by calling :ref:`has_feature()` with :ref:`SUPPORTS_BUFFER_DEVICE_ADDRESS` as a parameter. .. rst-class:: classref-item-separator @@ -5152,9 +5183,9 @@ Prints an error if: - the region specified by ``offset`` + ``size_bytes`` exceeds the buffer -- a draw list is currently active (created by :ref:`draw_list_begin`) +- a draw list is currently active (created by :ref:`draw_list_begin()`) -- a compute list is currently active (created by :ref:`compute_list_begin`) +- a compute list is currently active (created by :ref:`compute_list_begin()`) .. rst-class:: classref-item-separator @@ -5166,7 +5197,7 @@ Prints an error if: |void| **capture_timestamp**\ (\ name\: :ref:`String`\ ) :ref:`πŸ”—` -Creates a timestamp marker with the specified ``name``. This is used for performance reporting with the :ref:`get_captured_timestamp_cpu_time`, :ref:`get_captured_timestamp_gpu_time` and :ref:`get_captured_timestamp_name` methods. +Creates a timestamp marker with the specified ``name``. This is used for performance reporting with the :ref:`get_captured_timestamp_cpu_time()`, :ref:`get_captured_timestamp_gpu_time()` and :ref:`get_captured_timestamp_name()` methods. .. rst-class:: classref-item-separator @@ -5192,7 +5223,7 @@ Raises a Vulkan compute barrier in the specified ``compute_list``. Starts a list of compute commands created with the ``compute_*`` methods. The returned value should be passed to other ``compute_list_*`` functions. -Multiple compute lists cannot be created at the same time; you must finish the previous compute list first using :ref:`compute_list_end`. +Multiple compute lists cannot be created at the same time; you must finish the previous compute list first using :ref:`compute_list_end()`. A simple compute operation might look like this (code is not a complete example): @@ -5222,7 +5253,7 @@ A simple compute operation might look like this (code is not a complete example) |void| **compute_list_bind_compute_pipeline**\ (\ compute_list\: :ref:`int`, compute_pipeline\: :ref:`RID`\ ) :ref:`πŸ”—` -Tells the GPU what compute pipeline to use when processing the compute list. If the shader has changed since the last time this function was called, Godot will unbind all descriptor sets and will re-bind them inside :ref:`compute_list_dispatch`. +Tells the GPU what compute pipeline to use when processing the compute list. If the shader has changed since the last time this function was called, Godot will unbind all descriptor sets and will re-bind them inside :ref:`compute_list_dispatch()`. .. rst-class:: classref-item-separator @@ -5246,7 +5277,7 @@ Binds the ``uniform_set`` to this ``compute_list``. Godot ensures that all textu |void| **compute_list_dispatch**\ (\ compute_list\: :ref:`int`, x_groups\: :ref:`int`, y_groups\: :ref:`int`, z_groups\: :ref:`int`\ ) :ref:`πŸ”—` -Submits the compute list for processing on the GPU. This is the compute equivalent to :ref:`draw_list_draw`. +Submits the compute list for processing on the GPU. This is the compute equivalent to :ref:`draw_list_draw()`. .. rst-class:: classref-item-separator @@ -5282,7 +5313,7 @@ Finishes a list of compute commands created with the ``compute_*`` methods. |void| **compute_list_set_push_constant**\ (\ compute_list\: :ref:`int`, buffer\: :ref:`PackedByteArray`, size_bytes\: :ref:`int`\ ) :ref:`πŸ”—` -Sets the push constant data to ``buffer`` for the specified ``compute_list``. The shader determines how this binary data is used. The buffer's size in bytes must also be specified in ``size_bytes`` (this can be obtained by calling the :ref:`PackedByteArray.size` method on the passed ``buffer``). +Sets the push constant data to ``buffer`` for the specified ``compute_list``. The shader determines how this binary data is used. The buffer's size in bytes must also be specified in ``size_bytes`` (this can be obtained by calling the :ref:`PackedByteArray.size()` method on the passed ``buffer``). .. rst-class:: classref-item-separator @@ -5296,7 +5327,7 @@ Sets the push constant data to ``buffer`` for the specified ``compute_list``. Th Creates a new compute pipeline. It can be accessed with the RID that is returned. -Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid()` method. .. rst-class:: classref-item-separator @@ -5332,9 +5363,9 @@ Create a new local **RenderingDevice**. This is most useful for performing compu |void| **draw_command_begin_label**\ (\ name\: :ref:`String`, color\: :ref:`Color`\ ) :ref:`πŸ”—` -Create a command buffer debug label region that can be displayed in third-party tools such as `RenderDoc `__. All regions must be ended with a :ref:`draw_command_end_label` call. When viewed from the linear series of submissions to a single queue, calls to :ref:`draw_command_begin_label` and :ref:`draw_command_end_label` must be matched and balanced. +Create a command buffer debug label region that can be displayed in third-party tools such as `RenderDoc `__. All regions must be ended with a :ref:`draw_command_end_label()` call. When viewed from the linear series of submissions to a single queue, calls to :ref:`draw_command_begin_label()` and :ref:`draw_command_end_label()` must be matched and balanced. -The ``VK_EXT_DEBUG_UTILS_EXTENSION_NAME`` Vulkan extension must be available and enabled for command buffer debug label region to work. See also :ref:`draw_command_end_label`. +The ``VK_EXT_DEBUG_UTILS_EXTENSION_NAME`` Vulkan extension must be available and enabled for command buffer debug label region to work. See also :ref:`draw_command_end_label()`. .. rst-class:: classref-item-separator @@ -5346,7 +5377,7 @@ The ``VK_EXT_DEBUG_UTILS_EXTENSION_NAME`` Vulkan extension must be available and |void| **draw_command_end_label**\ (\ ) :ref:`πŸ”—` -Ends the command buffer debug label region started by a :ref:`draw_command_begin_label` call. +Ends the command buffer debug label region started by a :ref:`draw_command_begin_label()` call. .. rst-class:: classref-item-separator @@ -5374,7 +5405,7 @@ This method does nothing. Starts a list of raster drawing commands created with the ``draw_*`` methods. The returned value should be passed to other ``draw_list_*`` functions. -Multiple draw lists cannot be created at the same time; you must finish the previous draw list first using :ref:`draw_list_end`. +Multiple draw lists cannot be created at the same time; you must finish the previous draw list first using :ref:`draw_list_end()`. A simple drawing operation might look like this (code is not a complete example): @@ -5397,7 +5428,7 @@ A simple drawing operation might look like this (code is not a complete example) rd.draw_list_end() -The ``draw_flags`` indicates if the texture attachments of the framebuffer should be cleared or ignored. Only one of the two flags can be used for each individual attachment. Ignoring an attachment means that any contents that existed before the draw list will be completely discarded, reducing the memory bandwidth used by the render pass but producing garbage results if the pixels aren't replaced. The default behavior allows the engine to figure out the right operation to use if the texture is discardable, which can result in increased performance. See :ref:`RDTextureFormat` or :ref:`texture_set_discardable`. +The ``draw_flags`` indicates if the texture attachments of the framebuffer should be cleared or ignored. Only one of the two flags can be used for each individual attachment. Ignoring an attachment means that any contents that existed before the draw list will be completely discarded, reducing the memory bandwidth used by the render pass but producing garbage results if the pixels aren't replaced. The default behavior allows the engine to figure out the right operation to use if the texture is discardable, which can result in increased performance. See :ref:`RDTextureFormat` or :ref:`texture_set_discardable()`. The ``breadcrumb`` parameter can be an arbitrary 32-bit integer that is useful to diagnose GPU crashes. If Godot is built in dev or debug mode; when the GPU crashes Godot will dump all shaders that were being executed at the time of the crash and the breadcrumb is useful to diagnose what passes did those shaders belong to. @@ -5417,9 +5448,9 @@ It does not affect rendering behavior and can be set to 0. It is recommended to :ref:`int` **draw_list_begin_for_screen**\ (\ screen\: :ref:`int` = 0, clear_color\: :ref:`Color` = Color(0, 0, 0, 1)\ ) :ref:`πŸ”—` -High-level variant of :ref:`draw_list_begin`, with the parameters automatically being adjusted for drawing onto the window specified by the ``screen`` ID. +High-level variant of :ref:`draw_list_begin()`, with the parameters automatically being adjusted for drawing onto the window specified by the ``screen`` ID. -\ **Note:** Cannot be used with local RenderingDevices, as these don't have a screen. If called on a local RenderingDevice, :ref:`draw_list_begin_for_screen` returns :ref:`INVALID_ID`. +\ **Note:** Cannot be used with local RenderingDevices, as these don't have a screen. If called on a local RenderingDevice, :ref:`draw_list_begin_for_screen()` returns :ref:`INVALID_ID`. .. rst-class:: classref-item-separator @@ -5493,7 +5524,7 @@ Binds ``vertex_array`` to the specified ``draw_list``. |void| **draw_list_disable_scissor**\ (\ draw_list\: :ref:`int`\ ) :ref:`πŸ”—` -Removes and disables the scissor rectangle for the specified ``draw_list``. See also :ref:`draw_list_enable_scissor`. +Removes and disables the scissor rectangle for the specified ``draw_list``. See also :ref:`draw_list_enable_scissor()`. .. rst-class:: classref-item-separator @@ -5505,7 +5536,7 @@ Removes and disables the scissor rectangle for the specified ``draw_list``. See |void| **draw_list_draw**\ (\ draw_list\: :ref:`int`, use_indices\: :ref:`bool`, instances\: :ref:`int`, procedural_vertex_count\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Submits ``draw_list`` for rendering on the GPU. This is the raster equivalent to :ref:`compute_list_dispatch`. +Submits ``draw_list`` for rendering on the GPU. This is the raster equivalent to :ref:`compute_list_dispatch()`. .. rst-class:: classref-item-separator @@ -5529,7 +5560,7 @@ Submits ``draw_list`` for rendering on the GPU with the given parameters stored |void| **draw_list_enable_scissor**\ (\ draw_list\: :ref:`int`, rect\: :ref:`Rect2` = Rect2(0, 0, 0, 0)\ ) :ref:`πŸ”—` -Creates a scissor rectangle and enables it for the specified ``draw_list``. Scissor rectangles are used for clipping by discarding fragments that fall outside a specified rectangular portion of the screen. See also :ref:`draw_list_disable_scissor`. +Creates a scissor rectangle and enables it for the specified ``draw_list``. Scissor rectangles are used for clipping by discarding fragments that fall outside a specified rectangular portion of the screen. See also :ref:`draw_list_disable_scissor()`. \ **Note:** The specified ``rect`` is automatically intersected with the screen's dimensions, which means it cannot exceed the screen's dimensions. @@ -5567,7 +5598,7 @@ Sets blend constants for the specified ``draw_list`` to ``color``. Blend constan |void| **draw_list_set_push_constant**\ (\ draw_list\: :ref:`int`, buffer\: :ref:`PackedByteArray`, size_bytes\: :ref:`int`\ ) :ref:`πŸ”—` -Sets the push constant data to ``buffer`` for the specified ``draw_list``. The shader determines how this binary data is used. The buffer's size in bytes must also be specified in ``size_bytes`` (this can be obtained by calling the :ref:`PackedByteArray.size` method on the passed ``buffer``). +Sets the push constant data to ``buffer`` for the specified ``draw_list``. The shader determines how this binary data is used. The buffer's size in bytes must also be specified in ``size_bytes`` (this can be obtained by calling the :ref:`PackedByteArray.size()` method on the passed ``buffer``). .. rst-class:: classref-item-separator @@ -5607,7 +5638,7 @@ This method does nothing and always returns an empty :ref:`PackedInt64Array` method. +Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid()` method. .. rst-class:: classref-item-separator @@ -5621,7 +5652,7 @@ Once finished with your RID, you will want to free the RID using the RenderingDe Creates a new empty framebuffer. It can be accessed with the RID that is returned. -Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid()` method. .. rst-class:: classref-item-separator @@ -5635,7 +5666,7 @@ Once finished with your RID, you will want to free the RID using the RenderingDe Creates a new multipass framebuffer. It can be accessed with the RID that is returned. -Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid()` method. .. rst-class:: classref-item-separator @@ -5685,7 +5716,7 @@ Creates a multipass framebuffer format with the specified ``attachments``, ``pas :ref:`TextureSamples` **framebuffer_format_get_texture_samples**\ (\ format\: :ref:`int`, render_pass\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Returns the number of texture samples used for the given framebuffer ``format`` ID (returned by :ref:`framebuffer_get_format`). +Returns the number of texture samples used for the given framebuffer ``format`` ID (returned by :ref:`framebuffer_get_format()`). .. rst-class:: classref-item-separator @@ -5747,7 +5778,7 @@ This method does nothing. :ref:`int` **get_captured_timestamp_cpu_time**\ (\ index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the timestamp in CPU time for the rendering step specified by ``index`` (in microseconds since the engine started). See also :ref:`get_captured_timestamp_gpu_time` and :ref:`capture_timestamp`. +Returns the timestamp in CPU time for the rendering step specified by ``index`` (in microseconds since the engine started). See also :ref:`get_captured_timestamp_gpu_time()` and :ref:`capture_timestamp()`. .. rst-class:: classref-item-separator @@ -5759,7 +5790,7 @@ Returns the timestamp in CPU time for the rendering step specified by ``index`` :ref:`int` **get_captured_timestamp_gpu_time**\ (\ index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the timestamp in GPU time for the rendering step specified by ``index`` (in microseconds since the engine started). See also :ref:`get_captured_timestamp_cpu_time` and :ref:`capture_timestamp`. +Returns the timestamp in GPU time for the rendering step specified by ``index`` (in microseconds since the engine started). See also :ref:`get_captured_timestamp_cpu_time()` and :ref:`capture_timestamp()`. .. rst-class:: classref-item-separator @@ -5771,7 +5802,7 @@ Returns the timestamp in GPU time for the rendering step specified by ``index`` :ref:`String` **get_captured_timestamp_name**\ (\ index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the timestamp's name for the rendering step specified by ``index``. See also :ref:`capture_timestamp`. +Returns the timestamp's name for the rendering step specified by ``index``. See also :ref:`capture_timestamp()`. .. rst-class:: classref-item-separator @@ -5821,9 +5852,9 @@ This is only used by Vulkan in debug builds and can return 0 when this informati :ref:`int` **get_device_allocs_by_object_type**\ (\ type\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Same as :ref:`get_device_allocation_count` but filtered for a given object type. +Same as :ref:`get_device_allocation_count()` but filtered for a given object type. -The type argument must be in range ``[0; get_tracked_object_type_count - 1]``. If :ref:`get_tracked_object_type_count` is 0, then type argument is ignored and always returns 0. +The type argument must be in range ``[0; get_tracked_object_type_count - 1]``. If :ref:`get_tracked_object_type_count()` is 0, then type argument is ignored and always returns 0. This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown. @@ -5837,9 +5868,9 @@ This is only used by Vulkan in debug builds and can return 0 when this informati :ref:`int` **get_device_memory_by_object_type**\ (\ type\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Same as :ref:`get_device_total_memory` but filtered for a given object type. +Same as :ref:`get_device_total_memory()` but filtered for a given object type. -The type argument must be in range ``[0; get_tracked_object_type_count - 1]``. If :ref:`get_tracked_object_type_count` is 0, then type argument is ignored and always returns 0. +The type argument must be in range ``[0; get_tracked_object_type_count - 1]``. If :ref:`get_tracked_object_type_count()` is 0, then type argument is ignored and always returns 0. This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown. @@ -5853,7 +5884,7 @@ This is only used by Vulkan in debug builds and can return 0 when this informati :ref:`String` **get_device_name**\ (\ ) |const| :ref:`πŸ”—` -Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). Equivalent to :ref:`RenderingServer.get_video_adapter_name`. See also :ref:`get_device_vendor_name`. +Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). Equivalent to :ref:`RenderingServer.get_video_adapter_name()`. See also :ref:`get_device_vendor_name()`. .. rst-class:: classref-item-separator @@ -5891,7 +5922,7 @@ This is only used by Vulkan in debug builds and can return 0 when this informati :ref:`String` **get_device_vendor_name**\ (\ ) |const| :ref:`πŸ”—` -Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). Equivalent to :ref:`RenderingServer.get_video_adapter_vendor`. See also :ref:`get_device_name`. +Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). Equivalent to :ref:`RenderingServer.get_video_adapter_vendor()`. See also :ref:`get_device_name()`. .. rst-class:: classref-item-separator @@ -5917,9 +5948,9 @@ This is only used by Vulkan in debug builds and can return 0 when this informati :ref:`int` **get_driver_allocs_by_object_type**\ (\ type\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Same as :ref:`get_driver_allocation_count` but filtered for a given object type. +Same as :ref:`get_driver_allocation_count()` but filtered for a given object type. -The type argument must be in range ``[0; get_tracked_object_type_count - 1]``. If :ref:`get_tracked_object_type_count` is 0, then type argument is ignored and always returns 0. +The type argument must be in range ``[0; get_tracked_object_type_count - 1]``. If :ref:`get_tracked_object_type_count()` is 0, then type argument is ignored and always returns 0. This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown. @@ -5935,25 +5966,25 @@ This is only used by Vulkan in debug builds and can return 0 when this informati Returns string report in CSV format using the following methods: -- :ref:`get_tracked_object_name`\ +- :ref:`get_tracked_object_name()`\ -- :ref:`get_tracked_object_type_count`\ +- :ref:`get_tracked_object_type_count()`\ -- :ref:`get_driver_total_memory`\ +- :ref:`get_driver_total_memory()`\ -- :ref:`get_driver_allocation_count`\ +- :ref:`get_driver_allocation_count()`\ -- :ref:`get_driver_memory_by_object_type`\ +- :ref:`get_driver_memory_by_object_type()`\ -- :ref:`get_driver_allocs_by_object_type`\ +- :ref:`get_driver_allocs_by_object_type()`\ -- :ref:`get_device_total_memory`\ +- :ref:`get_device_total_memory()`\ -- :ref:`get_device_allocation_count`\ +- :ref:`get_device_allocation_count()`\ -- :ref:`get_device_memory_by_object_type`\ +- :ref:`get_device_memory_by_object_type()`\ -- :ref:`get_device_allocs_by_object_type`\ +- :ref:`get_device_allocs_by_object_type()`\ This is only used by Vulkan in debug builds. Godot must also be started with the ``--extra-gpu-memory-tracking`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. @@ -5967,9 +5998,9 @@ This is only used by Vulkan in debug builds. Godot must also be started with the :ref:`int` **get_driver_memory_by_object_type**\ (\ type\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Same as :ref:`get_driver_total_memory` but filtered for a given object type. +Same as :ref:`get_driver_total_memory()` but filtered for a given object type. -The type argument must be in range ``[0; get_tracked_object_type_count - 1]``. If :ref:`get_tracked_object_type_count` is 0, then type argument is ignored and always returns 0. +The type argument must be in range ``[0; get_tracked_object_type_count - 1]``. If :ref:`get_tracked_object_type_count()` is 0, then type argument is ignored and always returns 0. This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown. @@ -6045,9 +6076,9 @@ Returns a string with a performance report from the past frame. Updates every fr :ref:`String` **get_tracked_object_name**\ (\ type_index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the name of the type of object for the given ``type_index``. This value must be in range ``[0; get_tracked_object_type_count - 1]``. If :ref:`get_tracked_object_type_count` is 0, then type argument is ignored and always returns the same string. +Returns the name of the type of object for the given ``type_index``. This value must be in range ``[0; get_tracked_object_type_count - 1]``. If :ref:`get_tracked_object_type_count()` is 0, then type argument is ignored and always returns the same string. -The return value is important because it gives meaning to the types passed to :ref:`get_driver_memory_by_object_type`, :ref:`get_driver_allocs_by_object_type`, :ref:`get_device_memory_by_object_type`, and :ref:`get_device_allocs_by_object_type`. Examples of strings it can return (not exhaustive): +The return value is important because it gives meaning to the types passed to :ref:`get_driver_memory_by_object_type()`, :ref:`get_driver_allocs_by_object_type()`, :ref:`get_device_memory_by_object_type()`, and :ref:`get_device_allocs_by_object_type()`. Examples of strings it can return (not exhaustive): - DEVICE_MEMORY @@ -6099,7 +6130,7 @@ Returns ``true`` if the ``feature`` is supported by the GPU. Creates a new index array. It can be accessed with the RID that is returned. -Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid()` method. .. rst-class:: classref-item-separator @@ -6109,13 +6140,11 @@ Once finished with your RID, you will want to free the RID using the RenderingDe .. rst-class:: classref-method -:ref:`RID` **index_buffer_create**\ (\ size_indices\: :ref:`int`, format\: :ref:`IndexBufferFormat`, data\: :ref:`PackedByteArray` = PackedByteArray(), use_restart_indices\: :ref:`bool` = false, enable_device_address\: :ref:`bool` = false\ ) :ref:`πŸ”—` +:ref:`RID` **index_buffer_create**\ (\ size_indices\: :ref:`int`, format\: :ref:`IndexBufferFormat`, data\: :ref:`PackedByteArray` = PackedByteArray(), use_restart_indices\: :ref:`bool` = false, creation_bits\: |bitfield|\[:ref:`BufferCreationBits`\] = 0\ ) :ref:`πŸ”—` Creates a new index buffer. It can be accessed with the RID that is returned. -Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid` method. - -Optionally, set ``enable_device_address`` if you wish to use :ref:`buffer_get_device_address` functionality and the GPU supports it. +Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid()` method. .. rst-class:: classref-item-separator @@ -6143,7 +6172,7 @@ Limits for various graphics hardware can be found in the `Vulkan Hardware Databa Creates a new render pipeline. It can be accessed with the RID that is returned. -Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid()` method. .. rst-class:: classref-item-separator @@ -6169,7 +6198,7 @@ Returns ``true`` if the render pipeline specified by the ``render_pipeline`` RID Creates a new sampler. It can be accessed with the RID that is returned. -Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid()` method. .. rst-class:: classref-item-separator @@ -6195,7 +6224,7 @@ Returns ``true`` if implementation supports using a texture of ``format`` with t Returns the framebuffer format of the given screen. -\ **Note:** Only the main **RenderingDevice** returned by :ref:`RenderingServer.get_rendering_device` has a format. If called on a local **RenderingDevice**, this method prints an error and returns :ref:`INVALID_ID`. +\ **Note:** Only the main **RenderingDevice** returned by :ref:`RenderingServer.get_rendering_device()` has a format. If called on a local **RenderingDevice**, this method prints an error and returns :ref:`INVALID_ID`. .. rst-class:: classref-item-separator @@ -6207,9 +6236,9 @@ Returns the framebuffer format of the given screen. :ref:`int` **screen_get_height**\ (\ screen\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Returns the window height matching the graphics API context for the given window ID (in pixels). Despite the parameter being named ``screen``, this returns the *window* size. See also :ref:`screen_get_width`. +Returns the window height matching the graphics API context for the given window ID (in pixels). Despite the parameter being named ``screen``, this returns the *window* size. See also :ref:`screen_get_width()`. -\ **Note:** Only the main **RenderingDevice** returned by :ref:`RenderingServer.get_rendering_device` has a height. If called on a local **RenderingDevice**, this method prints an error and returns :ref:`INVALID_ID`. +\ **Note:** Only the main **RenderingDevice** returned by :ref:`RenderingServer.get_rendering_device()` has a height. If called on a local **RenderingDevice**, this method prints an error and returns :ref:`INVALID_ID`. .. rst-class:: classref-item-separator @@ -6221,9 +6250,9 @@ Returns the window height matching the graphics API context for the given window :ref:`int` **screen_get_width**\ (\ screen\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Returns the window width matching the graphics API context for the given window ID (in pixels). Despite the parameter being named ``screen``, this returns the *window* size. See also :ref:`screen_get_height`. +Returns the window width matching the graphics API context for the given window ID (in pixels). Despite the parameter being named ``screen``, this returns the *window* size. See also :ref:`screen_get_height()`. -\ **Note:** Only the main **RenderingDevice** returned by :ref:`RenderingServer.get_rendering_device` has a width. If called on a local **RenderingDevice**, this method prints an error and returns :ref:`INVALID_ID`. +\ **Note:** Only the main **RenderingDevice** returned by :ref:`RenderingServer.get_rendering_device()` has a width. If called on a local **RenderingDevice**, this method prints an error and returns :ref:`INVALID_ID`. .. rst-class:: classref-item-separator @@ -6239,7 +6268,7 @@ Sets the resource name for ``id`` to ``name``. This is used for debugging with t The following types of resources can be named: texture, sampler, vertex buffer, index buffer, uniform buffer, texture buffer, storage buffer, uniform set buffer, shader, render pipeline and compute pipeline. Framebuffers cannot be named. Attempting to name an incompatible resource type will print an error. -\ **Note:** Resource names are only set when the engine runs in verbose mode (:ref:`OS.is_stdout_verbose` = ``true``), or when using an engine build compiled with the ``dev_mode=yes`` SCons option. The graphics driver must also support the ``VK_EXT_DEBUG_UTILS_EXTENSION_NAME`` Vulkan extension for named resources to work. +\ **Note:** Resource names are only set when the engine runs in verbose mode (:ref:`OS.is_stdout_verbose()` = ``true``), or when using an engine build compiled with the ``dev_mode=yes`` SCons option. The graphics driver must also support the ``VK_EXT_DEBUG_UTILS_EXTENSION_NAME`` Vulkan extension for named resources to work. .. rst-class:: classref-item-separator @@ -6251,7 +6280,7 @@ The following types of resources can be named: texture, sampler, vertex buffer, :ref:`PackedByteArray` **shader_compile_binary_from_spirv**\ (\ spirv_data\: :ref:`RDShaderSPIRV`, name\: :ref:`String` = ""\ ) :ref:`πŸ”—` -Compiles a binary shader from ``spirv_data`` and returns the compiled binary data as a :ref:`PackedByteArray`. This compiled shader is specific to the GPU model and driver version used; it will not work on different GPU models or even different driver versions. See also :ref:`shader_compile_spirv_from_source`. +Compiles a binary shader from ``spirv_data`` and returns the compiled binary data as a :ref:`PackedByteArray`. This compiled shader is specific to the GPU model and driver version used; it will not work on different GPU models or even different driver versions. See also :ref:`shader_compile_spirv_from_source()`. \ ``name`` is an optional human-readable name that can be given to the compiled shader for organizational purposes. @@ -6265,7 +6294,7 @@ Compiles a binary shader from ``spirv_data`` and returns the compiled binary dat :ref:`RDShaderSPIRV` **shader_compile_spirv_from_source**\ (\ shader_source\: :ref:`RDShaderSource`, allow_cache\: :ref:`bool` = true\ ) :ref:`πŸ”—` -Compiles a SPIR-V from the shader source code in ``shader_source`` and returns the SPIR-V as a :ref:`RDShaderSPIRV`. This intermediate language shader is portable across different GPU models and driver versions, but cannot be run directly by GPUs until compiled into a binary shader using :ref:`shader_compile_binary_from_spirv`. +Compiles a SPIR-V from the shader source code in ``shader_source`` and returns the SPIR-V as a :ref:`RDShaderSPIRV`. This intermediate language shader is portable across different GPU models and driver versions, but cannot be run directly by GPUs until compiled into a binary shader using :ref:`shader_compile_binary_from_spirv()`. If ``allow_cache`` is ``true``, make use of the shader cache generated by Godot. This avoids a potentially lengthy shader compilation step if the shader is already in cache. If ``allow_cache`` is ``false``, Godot's shader cache is ignored and the shader will always be recompiled. @@ -6281,7 +6310,7 @@ If ``allow_cache`` is ``true``, make use of the shader cache generated by Godot. Creates a new shader instance from a binary compiled shader. It can be accessed with the RID that is returned. -Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid` method. See also :ref:`shader_compile_binary_from_spirv` and :ref:`shader_create_from_spirv`. +Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid()` method. See also :ref:`shader_compile_binary_from_spirv()` and :ref:`shader_create_from_spirv()`. .. rst-class:: classref-item-separator @@ -6295,7 +6324,7 @@ Once finished with your RID, you will want to free the RID using the RenderingDe Creates a new shader instance from SPIR-V intermediate code. It can be accessed with the RID that is returned. -Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid` method. See also :ref:`shader_compile_spirv_from_source` and :ref:`shader_create_from_bytecode`. +Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid()` method. See also :ref:`shader_compile_spirv_from_source()` and :ref:`shader_create_from_bytecode()`. .. rst-class:: classref-item-separator @@ -6307,7 +6336,7 @@ Once finished with your RID, you will want to free the RID using the RenderingDe :ref:`RID` **shader_create_placeholder**\ (\ ) :ref:`πŸ”—` -Create a placeholder RID by allocating an RID without initializing it for use in :ref:`shader_create_from_bytecode`. This allows you to create an RID for a shader and pass it around, but defer compiling the shader to a later time. +Create a placeholder RID by allocating an RID without initializing it for use in :ref:`shader_create_from_bytecode()`. This allows you to create an RID for a shader and pass it around, but defer compiling the shader to a later time. .. rst-class:: classref-item-separator @@ -6329,11 +6358,11 @@ Returns the internal vertex input mask. Internally, the vertex input mask is an .. rst-class:: classref-method -:ref:`RID` **storage_buffer_create**\ (\ size_bytes\: :ref:`int`, data\: :ref:`PackedByteArray` = PackedByteArray(), usage\: |bitfield|\[:ref:`StorageBufferUsage`\] = 0\ ) :ref:`πŸ”—` +:ref:`RID` **storage_buffer_create**\ (\ size_bytes\: :ref:`int`, data\: :ref:`PackedByteArray` = PackedByteArray(), usage\: |bitfield|\[:ref:`StorageBufferUsage`\] = 0, creation_bits\: |bitfield|\[:ref:`BufferCreationBits`\] = 0\ ) :ref:`πŸ”—` Creates a `storage buffer `__ with the specified ``data`` and ``usage``. It can be accessed with the RID that is returned. -Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid()` method. .. rst-class:: classref-item-separator @@ -6345,7 +6374,7 @@ Once finished with your RID, you will want to free the RID using the RenderingDe |void| **submit**\ (\ ) :ref:`πŸ”—` -Pushes the frame setup and draw command buffers then marks the local device as currently processing (which allows calling :ref:`sync`). +Pushes the frame setup and draw command buffers then marks the local device as currently processing (which allows calling :ref:`sync()`). \ **Note:** Only available in local RenderingDevices. @@ -6363,7 +6392,7 @@ Forces a synchronization between the CPU and GPU, which may be required in certa \ **Note:** Only available in local RenderingDevices. -\ **Note:** :ref:`sync` can only be called after a :ref:`submit`. +\ **Note:** :ref:`sync()` can only be called after a :ref:`submit()`. .. rst-class:: classref-item-separator @@ -6377,7 +6406,7 @@ Forces a synchronization between the CPU and GPU, which may be required in certa Creates a new texture buffer. It can be accessed with the RID that is returned. -Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid()` method. .. rst-class:: classref-item-separator @@ -6427,9 +6456,9 @@ Copies the ``from_texture`` to ``to_texture`` with the specified ``from_pos``, ` Creates a new texture. It can be accessed with the RID that is returned. -Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid()` method. -\ **Note:** Not to be confused with :ref:`RenderingServer.texture_2d_create`, which creates the Godot-specific :ref:`Texture2D` resource as opposed to the graphics API's own texture type. +\ **Note:** Not to be confused with :ref:`RenderingServer.texture_2d_create()`, which creates the Godot-specific :ref:`Texture2D` resource as opposed to the graphics API's own texture type. .. rst-class:: classref-item-separator @@ -6465,7 +6494,7 @@ Creates a shared texture using the specified ``view`` and the texture informatio :ref:`RID` **texture_create_shared_from_slice**\ (\ view\: :ref:`RDTextureView`, with_texture\: :ref:`RID`, layer\: :ref:`int`, mipmap\: :ref:`int`, mipmaps\: :ref:`int` = 1, slice_type\: :ref:`TextureSliceType` = 0\ ) :ref:`πŸ”—` -Creates a shared texture using the specified ``view`` and the texture information from ``with_texture``'s ``layer`` and ``mipmap``. The number of included mipmaps from the original texture can be controlled using the ``mipmaps`` parameter. Only relevant for textures with multiple layers, such as 3D textures, texture arrays and cubemaps. For single-layer textures, use :ref:`texture_create_shared`. +Creates a shared texture using the specified ``view`` and the texture information from ``with_texture``'s ``layer`` and ``mipmap``. The number of included mipmaps from the original texture can be controlled using the ``mipmaps`` parameter. Only relevant for textures with multiple layers, such as 3D textures, texture arrays and cubemaps. For single-layer textures, use :ref:`texture_create_shared()`. For 2D textures (which only have one layer), ``layer`` must be ``0``. @@ -6487,7 +6516,7 @@ Returns the ``texture`` data for the specified ``layer`` as raw binary data. For \ **Note:** ``texture`` requires the :ref:`TEXTURE_USAGE_CAN_COPY_FROM_BIT` to be retrieved. Otherwise, an error is printed and a empty :ref:`PackedByteArray` is returned. -\ **Note:** This method will block the GPU from working until the data is retrieved. Refer to :ref:`texture_get_data_async` for an alternative that returns the data in more performant way. +\ **Note:** This method will block the GPU from working until the data is retrieved. Refer to :ref:`texture_get_data_async()` for an alternative that returns the data in more performant way. .. rst-class:: classref-item-separator @@ -6499,7 +6528,7 @@ Returns the ``texture`` data for the specified ``layer`` as raw binary data. For :ref:`Error` **texture_get_data_async**\ (\ texture\: :ref:`RID`, layer\: :ref:`int`, callback\: :ref:`Callable`\ ) :ref:`πŸ”—` -Asynchronous version of :ref:`texture_get_data`. RenderingDevice will call ``callback`` in a certain amount of frames with the data the texture had at the time of the request. +Asynchronous version of :ref:`texture_get_data()`. RenderingDevice will call ``callback`` in a certain amount of frames with the data the texture had at the time of the request. \ **Note:** At the moment, the delay corresponds to the amount of frames specified by :ref:`ProjectSettings.rendering/rendering_device/vsync/frame_queue_size`. @@ -6536,7 +6565,7 @@ Returns the data format used to create this texture. :ref:`int` **texture_get_native_handle**\ (\ texture\: :ref:`RID`\ ) :ref:`πŸ”—` -**Deprecated:** Use :ref:`get_driver_resource` with :ref:`DRIVER_RESOURCE_TEXTURE` instead. +**Deprecated:** Use :ref:`get_driver_resource()` with :ref:`DRIVER_RESOURCE_TEXTURE` instead. Returns the internal graphics handle for this texture object. For use when communicating with third-party APIs mostly with GDExtension. @@ -6552,7 +6581,7 @@ Returns the internal graphics handle for this texture object. For use when commu :ref:`bool` **texture_is_discardable**\ (\ texture\: :ref:`RID`\ ) :ref:`πŸ”—` -Returns ``true`` if the ``texture`` is discardable, ``false`` otherwise. See :ref:`RDTextureFormat` or :ref:`texture_set_discardable`. +Returns ``true`` if the ``texture`` is discardable, ``false`` otherwise. See :ref:`RDTextureFormat` or :ref:`texture_set_discardable()`. .. rst-class:: classref-item-separator @@ -6658,13 +6687,11 @@ Updates texture data with new data, replacing the previous data in place. The up .. rst-class:: classref-method -:ref:`RID` **uniform_buffer_create**\ (\ size_bytes\: :ref:`int`, data\: :ref:`PackedByteArray` = PackedByteArray(), enable_device_address\: :ref:`bool` = false\ ) :ref:`πŸ”—` +:ref:`RID` **uniform_buffer_create**\ (\ size_bytes\: :ref:`int`, data\: :ref:`PackedByteArray` = PackedByteArray(), creation_bits\: |bitfield|\[:ref:`BufferCreationBits`\] = 0\ ) :ref:`πŸ”—` Creates a new uniform buffer. It can be accessed with the RID that is returned. -Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid` method. - -Optionally, set ``enable_device_address`` if you wish to use :ref:`buffer_get_device_address` functionality and the GPU supports it. +Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid()` method. .. rst-class:: classref-item-separator @@ -6678,7 +6705,7 @@ Optionally, set ``enable_device_address`` if you wish to use :ref:`buffer_get_de Creates a new uniform set. It can be accessed with the RID that is returned. -Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid()` method. .. rst-class:: classref-item-separator @@ -6712,13 +6739,11 @@ Creates a vertex array based on the specified buffers. Optionally, ``offsets`` ( .. rst-class:: classref-method -:ref:`RID` **vertex_buffer_create**\ (\ size_bytes\: :ref:`int`, data\: :ref:`PackedByteArray` = PackedByteArray(), use_as_storage\: :ref:`bool` = false, enable_device_address\: :ref:`bool` = false\ ) :ref:`πŸ”—` +:ref:`RID` **vertex_buffer_create**\ (\ size_bytes\: :ref:`int`, data\: :ref:`PackedByteArray` = PackedByteArray(), creation_bits\: |bitfield|\[:ref:`BufferCreationBits`\] = 0\ ) :ref:`πŸ”—` It can be accessed with the RID that is returned. -Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid` method. - -Optionally, set ``enable_device_address`` if you wish to use :ref:`buffer_get_device_address` functionality and the GPU supports it. +Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid()` method. .. rst-class:: classref-item-separator diff --git a/classes/class_renderingserver.rst b/classes/class_renderingserver.rst index 79f5007e1..1a2948750 100644 --- a/classes/class_renderingserver.rst +++ b/classes/class_renderingserver.rst @@ -25,13 +25,13 @@ The rendering server can be used to bypass the scene/:ref:`Node` sys Resources are created using the ``*_create`` functions. These functions return :ref:`RID`\ s which are not references to the objects themselves, but opaque *pointers* towards these objects. -All objects are drawn to a viewport. You can use the :ref:`Viewport` attached to the :ref:`SceneTree` or you can create one yourself with :ref:`viewport_create`. When using a custom scenario or canvas, the scenario or canvas needs to be attached to the viewport using :ref:`viewport_set_scenario` or :ref:`viewport_attach_canvas`. +All objects are drawn to a viewport. You can use the :ref:`Viewport` attached to the :ref:`SceneTree` or you can create one yourself with :ref:`viewport_create()`. When using a custom scenario or canvas, the scenario or canvas needs to be attached to the viewport using :ref:`viewport_set_scenario()` or :ref:`viewport_attach_canvas()`. -\ **Scenarios:** In 3D, all visual objects must be associated with a scenario. The scenario is a visual representation of the world. If accessing the rendering server from a running game, the scenario can be accessed from the scene tree from any :ref:`Node3D` node with :ref:`Node3D.get_world_3d`. Otherwise, a scenario can be created with :ref:`scenario_create`. +\ **Scenarios:** In 3D, all visual objects must be associated with a scenario. The scenario is a visual representation of the world. If accessing the rendering server from a running game, the scenario can be accessed from the scene tree from any :ref:`Node3D` node with :ref:`Node3D.get_world_3d()`. Otherwise, a scenario can be created with :ref:`scenario_create()`. Similarly, in 2D, a canvas is needed to draw all canvas items. -\ **3D:** In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using :ref:`instance_set_base`. The instance must also be attached to the scenario using :ref:`instance_set_scenario` in order to be visible. RenderingServer methods that don't have a prefix are usually 3D-specific (but not always). +\ **3D:** In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using :ref:`instance_set_base()`. The instance must also be attached to the scenario using :ref:`instance_set_scenario()` in order to be visible. RenderingServer methods that don't have a prefix are usually 3D-specific (but not always). \ **2D:** In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas. 2D-specific RenderingServer methods generally start with ``canvas_*``. @@ -1704,7 +1704,7 @@ Mask of custom format bits per custom channel. Must be shifted by one of the SHI :ref:`ArrayFormat` **ARRAY_COMPRESS_FLAGS_BASE** = ``25`` -Shift of first compress flag. Compress flags should be passed to :ref:`ArrayMesh.add_surface_from_arrays` and :ref:`SurfaceTool.commit`. +Shift of first compress flag. Compress flags should be passed to :ref:`ArrayMesh.add_surface_from_arrays()` and :ref:`SurfaceTool.commit()`. .. _class_RenderingServer_constant_ARRAY_FLAG_USE_2D_VERTICES: @@ -2466,7 +2466,7 @@ Apply automatically-sourced environment lighting inside the reflection probe's b :ref:`ReflectionProbeAmbientMode` **REFLECTION_PROBE_AMBIENT_COLOR** = ``2`` -Apply custom ambient lighting inside the reflection probe's box defined by its size. See :ref:`reflection_probe_set_ambient_color` and :ref:`reflection_probe_set_ambient_energy`. +Apply custom ambient lighting inside the reflection probe's box defined by its size. See :ref:`reflection_probe_set_ambient_color()` and :ref:`reflection_probe_set_ambient_energy()`. .. rst-class:: classref-item-separator @@ -3562,7 +3562,7 @@ Objects are displayed semi-transparent with additive blending so you can see whe Debug draw draws objects in wireframe. -\ **Note:** :ref:`set_debug_generate_wireframes` must be called before loading any meshes for wireframes to be visible when using the Compatibility renderer. +\ **Note:** :ref:`set_debug_generate_wireframes()` must be called before loading any meshes for wireframes to be visible when using the Compatibility renderer. .. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_NORMAL_BUFFER: @@ -3870,7 +3870,7 @@ Uses the same high quality importance sampling to process the radiance map as :r Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. If you need better quality, but still need to update the sky every frame, consider turning on :ref:`ProjectSettings.rendering/reflections/sky_reflections/fast_filter_high_quality`. -\ **Note:** The fast filtering algorithm is limited to 256Γ—256 cubemaps, so :ref:`sky_set_radiance_size` must be set to ``256``. Otherwise, a warning is printed and the overridden radiance size is ignored. +\ **Note:** The fast filtering algorithm is limited to 256Γ—256 cubemaps, so :ref:`sky_set_radiance_size()` must be set to ``256``. Otherwise, a warning is printed and the overridden radiance size is ignored. .. rst-class:: classref-item-separator @@ -4218,7 +4218,7 @@ enum **EnvironmentToneMapper**: :ref:`πŸ”—` **ENV_TONE_MAPPER_LINEAR** = ``0`` -Output color as they came in. This can cause bright lighting to look blown out, with noticeable clipping in the output colors. +Does not modify color data, resulting in a linear tonemapping curve which unnaturally clips bright values, causing bright lighting to look blown out. The simplest and fastest tonemapper. .. _class_RenderingServer_constant_ENV_TONE_MAPPER_REINHARD: @@ -4226,7 +4226,9 @@ Output color as they came in. This can cause bright lighting to look blown out, :ref:`EnvironmentToneMapper` **ENV_TONE_MAPPER_REINHARD** = ``1`` -Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors by this formula: ``color = color * (1 + color / (white * white)) / (1 + color)``. This avoids clipping bright highlights, but the resulting image can look a bit dull. When :ref:`Environment.tonemap_white` is left at the default value of ``1.0`` this is identical to :ref:`ENV_TONE_MAPPER_LINEAR` while also being slightly less performant. +A simple tonemapping curve that rolls off bright values to prevent clipping. This results in an image that can appear dull and low contrast. Slower than :ref:`ENV_TONE_MAPPER_LINEAR`. + +\ **Note:** When :ref:`Environment.tonemap_white` is left at the default value of ``1.0``, :ref:`ENV_TONE_MAPPER_REINHARD` produces an identical image to :ref:`ENV_TONE_MAPPER_LINEAR`. .. _class_RenderingServer_constant_ENV_TONE_MAPPER_FILMIC: @@ -4234,7 +4236,7 @@ Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors by :ref:`EnvironmentToneMapper` **ENV_TONE_MAPPER_FILMIC** = ``2`` -Use the filmic tonemapper. This avoids clipping bright highlights, with a resulting image that usually looks more vivid than :ref:`ENV_TONE_MAPPER_REINHARD`. +Uses a film-like tonemapping curve to prevent clipping of bright values and provide better contrast than :ref:`ENV_TONE_MAPPER_REINHARD`. Slightly slower than :ref:`ENV_TONE_MAPPER_REINHARD`. .. _class_RenderingServer_constant_ENV_TONE_MAPPER_ACES: @@ -4242,7 +4244,7 @@ Use the filmic tonemapper. This avoids clipping bright highlights, with a result :ref:`EnvironmentToneMapper` **ENV_TONE_MAPPER_ACES** = ``3`` -Use the Academy Color Encoding System tonemapper. ACES is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. ACES typically has a more contrasted output compared to :ref:`ENV_TONE_MAPPER_REINHARD` and :ref:`ENV_TONE_MAPPER_FILMIC`. +Uses a high-contrast film-like tonemapping curve and desaturates bright values for a more realistic appearance. Slightly slower than :ref:`ENV_TONE_MAPPER_FILMIC`. \ **Note:** This tonemapping operator is called "ACES Fitted" in Godot 3.x. @@ -4252,7 +4254,9 @@ Use the Academy Color Encoding System tonemapper. ACES is slightly more expensiv :ref:`EnvironmentToneMapper` **ENV_TONE_MAPPER_AGX** = ``4`` -Use the AgX tonemapper. AgX is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. AgX is less likely to darken parts of the scene compared to :ref:`ENV_TONE_MAPPER_ACES`, and can match :ref:`ENV_TONE_MAPPER_FILMIC` more closely. +Uses a film-like tonemapping curve and desaturates bright values for a more realistic appearance. Better than other tonemappers at maintaining the hue of colors as they become brighter. The slowest tonemapping option. + +\ **Note:** :ref:`Environment.tonemap_white` is fixed at a value of ``16.29``, which makes :ref:`ENV_TONE_MAPPER_AGX` unsuitable for use with the Mobile rendering method. .. rst-class:: classref-item-separator @@ -5018,7 +5022,7 @@ enum **BakeChannels**: :ref:`πŸ”—` :ref:`BakeChannels` **BAKE_CHANNEL_ALBEDO_ALPHA** = ``0`` -Index of :ref:`Image` in array of :ref:`Image`\ s returned by :ref:`bake_render_uv2`. Image uses :ref:`Image.FORMAT_RGBA8` and contains albedo color in the ``.rgb`` channels and alpha in the ``.a`` channel. +Index of :ref:`Image` in array of :ref:`Image`\ s returned by :ref:`bake_render_uv2()`. Image uses :ref:`Image.FORMAT_RGBA8` and contains albedo color in the ``.rgb`` channels and alpha in the ``.a`` channel. .. _class_RenderingServer_constant_BAKE_CHANNEL_NORMAL: @@ -5026,7 +5030,7 @@ Index of :ref:`Image` in array of :ref:`Image`\ s retu :ref:`BakeChannels` **BAKE_CHANNEL_NORMAL** = ``1`` -Index of :ref:`Image` in array of :ref:`Image`\ s returned by :ref:`bake_render_uv2`. Image uses :ref:`Image.FORMAT_RGBA8` and contains the per-pixel normal of the object in the ``.rgb`` channels and nothing in the ``.a`` channel. The per-pixel normal is encoded as ``normal * 0.5 + 0.5``. +Index of :ref:`Image` in array of :ref:`Image`\ s returned by :ref:`bake_render_uv2()`. Image uses :ref:`Image.FORMAT_RGBA8` and contains the per-pixel normal of the object in the ``.rgb`` channels and nothing in the ``.a`` channel. The per-pixel normal is encoded as ``normal * 0.5 + 0.5``. .. _class_RenderingServer_constant_BAKE_CHANNEL_ORM: @@ -5034,7 +5038,7 @@ Index of :ref:`Image` in array of :ref:`Image`\ s retu :ref:`BakeChannels` **BAKE_CHANNEL_ORM** = ``2`` -Index of :ref:`Image` in array of :ref:`Image`\ s returned by :ref:`bake_render_uv2`. Image uses :ref:`Image.FORMAT_RGBA8` and contains ambient occlusion (from material and decals only) in the ``.r`` channel, roughness in the ``.g`` channel, metallic in the ``.b`` channel and sub surface scattering amount in the ``.a`` channel. +Index of :ref:`Image` in array of :ref:`Image`\ s returned by :ref:`bake_render_uv2()`. Image uses :ref:`Image.FORMAT_RGBA8` and contains ambient occlusion (from material and decals only) in the ``.r`` channel, roughness in the ``.g`` channel, metallic in the ``.b`` channel and sub surface scattering amount in the ``.a`` channel. .. _class_RenderingServer_constant_BAKE_CHANNEL_EMISSION: @@ -5042,7 +5046,7 @@ Index of :ref:`Image` in array of :ref:`Image`\ s retu :ref:`BakeChannels` **BAKE_CHANNEL_EMISSION** = ``3`` -Index of :ref:`Image` in array of :ref:`Image`\ s returned by :ref:`bake_render_uv2`. Image uses :ref:`Image.FORMAT_RGBAH` and contains emission color in the ``.rgb`` channels and nothing in the ``.a`` channel. +Index of :ref:`Image` in array of :ref:`Image`\ s returned by :ref:`bake_render_uv2()`. Image uses :ref:`Image.FORMAT_RGBAH` and contains emission color in the ``.rgb`` channels and nothing in the ``.a`` channel. .. rst-class:: classref-item-separator @@ -6041,7 +6045,7 @@ Property Descriptions - |void| **set_render_loop_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_render_loop_enabled**\ (\ ) -If ``false``, disables rendering completely, but the engine logic is still being processed. You can call :ref:`force_draw` to draw a frame even with rendering disabled. +If ``false``, disables rendering completely, but the engine logic is still being processed. You can call :ref:`force_draw()` to draw a frame even with rendering disabled. .. rst-class:: classref-section-separator @@ -6084,7 +6088,7 @@ As the RenderingServer actual logic may run on an separate thread, accessing its Creates a camera attributes object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``camera_attributes_`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. \ **Note:** The equivalent resource is :ref:`CameraAttributes`. @@ -6174,7 +6178,7 @@ The exposure value can be calculated from aperture (in f-stops), shutter speed ( Creates a 3D camera and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``camera_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. \ **Note:** The equivalent node is :ref:`Camera3D`. @@ -6188,7 +6192,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe |void| **camera_set_camera_attributes**\ (\ camera\: :ref:`RID`, effects\: :ref:`RID`\ ) :ref:`πŸ”—` -Sets the camera_attributes created with :ref:`camera_attributes_create` to the given camera. +Sets the camera_attributes created with :ref:`camera_attributes_create()` to the given camera. .. rst-class:: classref-item-separator @@ -6298,7 +6302,7 @@ If ``true``, preserves the horizontal aspect ratio which is equivalent to :ref:` Creates a canvas and returns the assigned :ref:`RID`. It can be accessed with the RID that is returned. This RID will be used in all ``canvas_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. Canvas has no :ref:`Resource` or :ref:`Node` equivalent. @@ -6324,7 +6328,7 @@ Subsequent drawing commands will be ignored unless they fall within the specifie |void| **canvas_item_add_circle**\ (\ item\: :ref:`RID`, pos\: :ref:`Vector2`, radius\: :ref:`float`, color\: :ref:`Color`, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws a circle on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. See also :ref:`CanvasItem.draw_circle`. +Draws a circle on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. See also :ref:`CanvasItem.draw_circle()`. .. rst-class:: classref-item-separator @@ -6348,7 +6352,7 @@ If ``ignore`` is ``true``, ignore clipping on items drawn with this canvas item |void| **canvas_item_add_lcd_texture_rect_region**\ (\ item\: :ref:`RID`, rect\: :ref:`Rect2`, texture\: :ref:`RID`, src_rect\: :ref:`Rect2`, modulate\: :ref:`Color`\ ) :ref:`πŸ”—` -See also :ref:`CanvasItem.draw_lcd_texture_rect_region`. +See also :ref:`CanvasItem.draw_lcd_texture_rect_region()`. .. rst-class:: classref-item-separator @@ -6360,7 +6364,7 @@ See also :ref:`CanvasItem.draw_lcd_texture_rect_region`, from\: :ref:`Vector2`, to\: :ref:`Vector2`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws a line on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. See also :ref:`CanvasItem.draw_line`. +Draws a line on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. See also :ref:`CanvasItem.draw_line()`. .. rst-class:: classref-item-separator @@ -6372,7 +6376,7 @@ Draws a line on the :ref:`CanvasItem` pointed to by the ``item |void| **canvas_item_add_mesh**\ (\ item\: :ref:`RID`, mesh\: :ref:`RID`, transform\: :ref:`Transform2D` = Transform2D(1, 0, 0, 1, 0, 0), modulate\: :ref:`Color` = Color(1, 1, 1, 1), texture\: :ref:`RID` = RID()\ ) :ref:`πŸ”—` -Draws a mesh created with :ref:`mesh_create` with given ``transform``, ``modulate`` color, and ``texture``. This is used internally by :ref:`MeshInstance2D`. +Draws a mesh created with :ref:`mesh_create()` with given ``transform``, ``modulate`` color, and ``texture``. This is used internally by :ref:`MeshInstance2D`. .. rst-class:: classref-item-separator @@ -6384,7 +6388,7 @@ Draws a mesh created with :ref:`mesh_create`, rect\: :ref:`Rect2`, texture\: :ref:`RID`, src_rect\: :ref:`Rect2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1), outline_size\: :ref:`int` = 0, px_range\: :ref:`float` = 1.0, scale\: :ref:`float` = 1.0\ ) :ref:`πŸ”—` -See also :ref:`CanvasItem.draw_msdf_texture_rect_region`. +See also :ref:`CanvasItem.draw_msdf_texture_rect_region()`. .. rst-class:: classref-item-separator @@ -6396,7 +6400,7 @@ See also :ref:`CanvasItem.draw_msdf_texture_rect_region`, points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws a 2D multiline on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. See also :ref:`CanvasItem.draw_multiline` and :ref:`CanvasItem.draw_multiline_colors`. +Draws a 2D multiline on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. See also :ref:`CanvasItem.draw_multiline()` and :ref:`CanvasItem.draw_multiline_colors()`. .. rst-class:: classref-item-separator @@ -6408,7 +6412,7 @@ Draws a 2D multiline on the :ref:`CanvasItem` pointed to by th |void| **canvas_item_add_multimesh**\ (\ item\: :ref:`RID`, mesh\: :ref:`RID`, texture\: :ref:`RID` = RID()\ ) :ref:`πŸ”—` -Draws a 2D :ref:`MultiMesh` on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. See also :ref:`CanvasItem.draw_multimesh`. +Draws a 2D :ref:`MultiMesh` on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. See also :ref:`CanvasItem.draw_multimesh()`. .. rst-class:: classref-item-separator @@ -6444,9 +6448,9 @@ Draws particles on the :ref:`CanvasItem` pointed to by the ``i |void| **canvas_item_add_polygon**\ (\ item\: :ref:`RID`, points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, uvs\: :ref:`PackedVector2Array` = PackedVector2Array(), texture\: :ref:`RID` = RID()\ ) :ref:`πŸ”—` -Draws a 2D polygon on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. If you need more flexibility (such as being able to use bones), use :ref:`canvas_item_add_triangle_array` instead. See also :ref:`CanvasItem.draw_polygon`. +Draws a 2D polygon on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. If you need more flexibility (such as being able to use bones), use :ref:`canvas_item_add_triangle_array()` instead. See also :ref:`CanvasItem.draw_polygon()`. -\ **Note:** If you frequently redraw the same polygon with a large number of vertices, consider pre-calculating the triangulation with :ref:`Geometry2D.triangulate_polygon` and using :ref:`CanvasItem.draw_mesh`, :ref:`CanvasItem.draw_multimesh`, or :ref:`canvas_item_add_triangle_array`. +\ **Note:** If you frequently redraw the same polygon with a large number of vertices, consider pre-calculating the triangulation with :ref:`Geometry2D.triangulate_polygon()` and using :ref:`CanvasItem.draw_mesh()`, :ref:`CanvasItem.draw_multimesh()`, or :ref:`canvas_item_add_triangle_array()`. .. rst-class:: classref-item-separator @@ -6458,7 +6462,7 @@ Draws a 2D polygon on the :ref:`CanvasItem` pointed to by the |void| **canvas_item_add_polyline**\ (\ item\: :ref:`RID`, points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws a 2D polyline on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. See also :ref:`CanvasItem.draw_polyline` and :ref:`CanvasItem.draw_polyline_colors`. +Draws a 2D polyline on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. See also :ref:`CanvasItem.draw_polyline()` and :ref:`CanvasItem.draw_polyline_colors()`. .. rst-class:: classref-item-separator @@ -6470,7 +6474,7 @@ Draws a 2D polyline on the :ref:`CanvasItem` pointed to by the |void| **canvas_item_add_primitive**\ (\ item\: :ref:`RID`, points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, uvs\: :ref:`PackedVector2Array`, texture\: :ref:`RID`\ ) :ref:`πŸ”—` -Draws a 2D primitive on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. See also :ref:`CanvasItem.draw_primitive`. +Draws a 2D primitive on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. See also :ref:`CanvasItem.draw_primitive()`. .. rst-class:: classref-item-separator @@ -6482,7 +6486,7 @@ Draws a 2D primitive on the :ref:`CanvasItem` pointed to by th |void| **canvas_item_add_rect**\ (\ item\: :ref:`RID`, rect\: :ref:`Rect2`, color\: :ref:`Color`, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws a rectangle on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. See also :ref:`CanvasItem.draw_rect`. +Draws a rectangle on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. See also :ref:`CanvasItem.draw_rect()`. .. rst-class:: classref-item-separator @@ -6506,7 +6510,7 @@ Sets a :ref:`Transform2D` that will be used to transform subs |void| **canvas_item_add_texture_rect**\ (\ item\: :ref:`RID`, rect\: :ref:`Rect2`, texture\: :ref:`RID`, tile\: :ref:`bool` = false, modulate\: :ref:`Color` = Color(1, 1, 1, 1), transpose\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws a 2D textured rectangle on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. See also :ref:`CanvasItem.draw_texture_rect` and :ref:`Texture2D.draw_rect`. +Draws a 2D textured rectangle on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. See also :ref:`CanvasItem.draw_texture_rect()` and :ref:`Texture2D.draw_rect()`. .. rst-class:: classref-item-separator @@ -6518,7 +6522,7 @@ Draws a 2D textured rectangle on the :ref:`CanvasItem` pointed |void| **canvas_item_add_texture_rect_region**\ (\ item\: :ref:`RID`, rect\: :ref:`Rect2`, texture\: :ref:`RID`, src_rect\: :ref:`Rect2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1), transpose\: :ref:`bool` = false, clip_uv\: :ref:`bool` = true\ ) :ref:`πŸ”—` -Draws the specified region of a 2D textured rectangle on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. See also :ref:`CanvasItem.draw_texture_rect_region` and :ref:`Texture2D.draw_rect_region`. +Draws the specified region of a 2D textured rectangle on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. See also :ref:`CanvasItem.draw_texture_rect_region()` and :ref:`Texture2D.draw_rect_region()`. .. rst-class:: classref-item-separator @@ -6530,7 +6534,7 @@ Draws the specified region of a 2D textured rectangle on the :ref:`CanvasItem`, indices\: :ref:`PackedInt32Array`, points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, uvs\: :ref:`PackedVector2Array` = PackedVector2Array(), bones\: :ref:`PackedInt32Array` = PackedInt32Array(), weights\: :ref:`PackedFloat32Array` = PackedFloat32Array(), texture\: :ref:`RID` = RID(), count\: :ref:`int` = -1\ ) :ref:`πŸ”—` -Draws a triangle array on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. This is internally used by :ref:`Line2D` and :ref:`StyleBoxFlat` for rendering. :ref:`canvas_item_add_triangle_array` is highly flexible, but more complex to use than :ref:`canvas_item_add_polygon`. +Draws a triangle array on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. This is internally used by :ref:`Line2D` and :ref:`StyleBoxFlat` for rendering. :ref:`canvas_item_add_triangle_array()` is highly flexible, but more complex to use than :ref:`canvas_item_add_polygon()`. \ **Note:** ``count`` is unused and can be left unspecified. @@ -6570,7 +6574,7 @@ Clears the :ref:`CanvasItem` and removes all commands in it. Creates a new CanvasItem instance and returns its :ref:`RID`. It can be accessed with the RID that is returned. This RID will be used in all ``canvas_item_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. \ **Note:** The equivalent node is :ref:`CanvasItem`. @@ -6584,7 +6588,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe :ref:`Variant` **canvas_item_get_instance_shader_parameter**\ (\ instance\: :ref:`RID`, parameter\: :ref:`StringName`\ ) |const| :ref:`πŸ”—` -Returns the value of the per-instance shader uniform from the specified canvas item instance. Equivalent to :ref:`CanvasItem.get_instance_shader_parameter`. +Returns the value of the per-instance shader uniform from the specified canvas item instance. Equivalent to :ref:`CanvasItem.get_instance_shader_parameter()`. .. rst-class:: classref-item-separator @@ -6596,7 +6600,7 @@ Returns the value of the per-instance shader uniform from the specified canvas i :ref:`Variant` **canvas_item_get_instance_shader_parameter_default_value**\ (\ instance\: :ref:`RID`, parameter\: :ref:`StringName`\ ) |const| :ref:`πŸ”—` -Returns the default value of the per-instance shader uniform from the specified canvas item instance. Equivalent to :ref:`CanvasItem.get_instance_shader_parameter`. +Returns the default value of the per-instance shader uniform from the specified canvas item instance. Equivalent to :ref:`CanvasItem.get_instance_shader_parameter()`. .. rst-class:: classref-item-separator @@ -6636,7 +6640,7 @@ This is useful when moving a canvas item to a new location, to give an instantan |void| **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\ ) :ref:`πŸ”—` -Sets the canvas group mode used during 2D rendering for the canvas item specified by the ``item`` RID. For faster but more limited clipping, use :ref:`canvas_item_set_clip` instead. +Sets the canvas group mode used during 2D rendering for the canvas item specified by the ``item`` RID. For faster but more limited clipping, use :ref:`canvas_item_set_clip()` instead. \ **Note:** The equivalent node functionality is found in :ref:`CanvasGroup` and :ref:`CanvasItem.clip_children`. @@ -6650,7 +6654,7 @@ Sets the canvas group mode used during 2D rendering for the canvas item specifie |void| **canvas_item_set_clip**\ (\ item\: :ref:`RID`, clip\: :ref:`bool`\ ) :ref:`πŸ”—` -If ``clip`` is ``true``, makes the canvas item specified by the ``item`` RID not draw anything outside of its rect's coordinates. This clipping is fast, but works only with axis-aligned rectangles. This means that rotation is ignored by the clipping rectangle. For more advanced clipping shapes, use :ref:`canvas_item_set_canvas_group_mode` instead. +If ``clip`` is ``true``, makes the canvas item specified by the ``item`` RID not draw anything outside of its rect's coordinates. This clipping is fast, but works only with axis-aligned rectangles. This means that rotation is ignored by the clipping rectangle. For more advanced clipping shapes, use :ref:`canvas_item_set_canvas_group_mode()` instead. \ **Note:** The equivalent node functionality is found in :ref:`Label.clip_text`, :ref:`RichTextLabel` (always enabled) and more. @@ -6748,7 +6752,7 @@ Sets the index for the :ref:`CanvasItem`. |void| **canvas_item_set_instance_shader_parameter**\ (\ instance\: :ref:`RID`, parameter\: :ref:`StringName`, value\: :ref:`Variant`\ ) :ref:`πŸ”—` -Sets the per-instance shader uniform on the specified canvas item instance. Equivalent to :ref:`CanvasItem.set_instance_shader_parameter`. +Sets the per-instance shader uniform on the specified canvas item instance. Equivalent to :ref:`CanvasItem.set_instance_shader_parameter()`. .. rst-class:: classref-item-separator @@ -6796,7 +6800,7 @@ Sets a new ``material`` to the canvas item specified by the ``item`` RID. Equiva |void| **canvas_item_set_modulate**\ (\ item\: :ref:`RID`, color\: :ref:`Color`\ ) :ref:`πŸ”—` -Multiplies the color of the canvas item specified by the ``item`` RID, while affecting its children. See also :ref:`canvas_item_set_self_modulate`. Equivalent to :ref:`CanvasItem.modulate`. +Multiplies the color of the canvas item specified by the ``item`` RID, while affecting its children. See also :ref:`canvas_item_set_self_modulate()`. Equivalent to :ref:`CanvasItem.modulate`. .. rst-class:: classref-item-separator @@ -6820,7 +6824,7 @@ Sets a parent :ref:`CanvasItem` to the :ref:`CanvasItem`, color\: :ref:`Color`\ ) :ref:`πŸ”—` -Multiplies the color of the canvas item specified by the ``item`` RID, without affecting its children. See also :ref:`canvas_item_set_modulate`. Equivalent to :ref:`CanvasItem.self_modulate`. +Multiplies the color of the canvas item specified by the ``item`` RID, without affecting its children. See also :ref:`canvas_item_set_modulate()`. Equivalent to :ref:`CanvasItem.self_modulate`. .. rst-class:: classref-item-separator @@ -6958,7 +6962,7 @@ Attaches the canvas light to the canvas. Removes it from its previous canvas. Creates a canvas light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``canvas_light_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. \ **Note:** The equivalent node is :ref:`Light2D`. @@ -6986,7 +6990,7 @@ Attaches a light occluder to the canvas. Removes it from its previous canvas. Creates a light occluder and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``canvas_light_occluder_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. \ **Note:** The equivalent node is :ref:`LightOccluder2D`. @@ -7360,7 +7364,7 @@ This allows transforming a light without creating a "glitch" in the interpolatio Creates a new light occluder polygon and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``canvas_occluder_polygon_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. \ **Note:** The equivalent resource is :ref:`OccluderPolygon2D`. @@ -7414,7 +7418,7 @@ Sets the shape of the occluder polygon. A copy of the canvas item will be drawn with a local offset of the ``mirroring``. -\ **Note:** This is equivalent to calling :ref:`canvas_set_item_repeat` like ``canvas_set_item_repeat(item, mirroring, 1)``, with an additional check ensuring ``canvas`` is a parent of ``item``. +\ **Note:** This is equivalent to calling :ref:`canvas_set_item_repeat()` like ``canvas_set_item_repeat(item, mirroring, 1)``, with an additional check ensuring ``canvas`` is a parent of ``item``. .. rst-class:: classref-item-separator @@ -7464,7 +7468,7 @@ Sets the :ref:`ProjectSettings.rendering/2d/shadow_atlas/size` method. See also :ref:`texture_2d_create`. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. See also :ref:`texture_2d_create()`. \ **Note:** The equivalent resource is :ref:`CanvasTexture` and is only meant to be used in 2D rendering, not 3D. @@ -7528,7 +7532,7 @@ Sets the texture ``repeat`` mode to use for the canvas texture specified by the Creates a new compositor and adds it to the RenderingServer. It can be accessed with the RID that is returned. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. .. rst-class:: classref-item-separator @@ -7542,7 +7546,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe Creates a new rendering effect and adds it to the RenderingServer. It can be accessed with the RID that is returned. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. .. rst-class:: classref-item-separator @@ -7590,7 +7594,7 @@ Sets the flag (``flag``) for this rendering effect to ``true`` or ``false`` (``s |void| **compositor_set_compositor_effects**\ (\ compositor\: :ref:`RID`, effects\: :ref:`Array`\[:ref:`RID`\]\ ) :ref:`πŸ”—` -Sets the compositor effects for the specified compositor RID. ``effects`` should be an array containing RIDs created with :ref:`compositor_effect_create`. +Sets the compositor effects for the specified compositor RID. ``effects`` should be an array containing RIDs created with :ref:`compositor_effect_create()`. .. rst-class:: classref-item-separator @@ -7632,9 +7636,9 @@ Returns the bounding rectangle for a canvas item in local space, as calculated b Creates a decal and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``decal_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. -To place in a scene, attach this decal to an instance using :ref:`instance_set_base` using the returned RID. +To place in a scene, attach this decal to an instance using :ref:`instance_set_base()` using the returned RID. \ **Note:** The equivalent node is :ref:`Decal`. @@ -7744,7 +7748,7 @@ Sets the ``size`` of the decal specified by the ``decal`` RID. Equivalent to :re |void| **decal_set_texture**\ (\ decal\: :ref:`RID`, type\: :ref:`DecalTexture`, texture\: :ref:`RID`\ ) :ref:`πŸ”—` -Sets the ``texture`` in the given texture ``type`` slot for the specified decal. Equivalent to :ref:`Decal.set_texture`. +Sets the ``texture`` in the given texture ``type`` slot for the specified decal. Equivalent to :ref:`Decal.set_texture()`. .. rst-class:: classref-item-separator @@ -7770,9 +7774,9 @@ Sets the texture ``filter`` mode to use when rendering decals. This parameter is Creates a directional light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most ``light_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. -To place in a scene, attach this directional light to an instance using :ref:`instance_set_base` using the returned RID. +To place in a scene, attach this directional light to an instance using :ref:`instance_set_base()` using the returned RID. \ **Note:** The equivalent node is :ref:`DirectionalLight3D`. @@ -7810,7 +7814,7 @@ Sets the filter ``quality`` for directional light shadows in 3D. See also :ref:` :ref:`Image` **environment_bake_panorama**\ (\ environment\: :ref:`RID`, bake_irradiance\: :ref:`bool`, size\: :ref:`Vector2i`\ ) :ref:`πŸ”—` -Generates and returns an :ref:`Image` containing the radiance map for the specified ``environment`` RID's sky. This supports built-in sky material and custom sky shaders. If ``bake_irradiance`` is ``true``, the irradiance map is saved instead of the radiance map. The radiance map is used to render reflected light, while the irradiance map is used to render ambient light. See also :ref:`sky_bake_panorama`. +Generates and returns an :ref:`Image` containing the radiance map for the specified ``environment`` RID's sky. This supports built-in sky material and custom sky shaders. If ``bake_irradiance`` is ``true``, the irradiance map is saved instead of the radiance map. The radiance map is used to render reflected light, while the irradiance map is used to render ambient light. See also :ref:`sky_bake_panorama()`. \ **Note:** The image is saved in linear color space without any tonemapping performed, which means it will look too dark if viewed directly in an image editor. @@ -7828,7 +7832,7 @@ Generates and returns an :ref:`Image` containing the radiance map f Creates an environment and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``environment_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. \ **Note:** The equivalent resource is :ref:`Environment`. @@ -8158,7 +8162,7 @@ Sets the resolution of the volumetric fog's froxel buffer. ``size`` is modified Creates a new fog volume and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``fog_volume_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. \ **Note:** The equivalent node is :ref:`FogVolume`. @@ -8244,7 +8248,7 @@ Tries to free an object in the RenderingServer. To avoid memory leaks, this shou :ref:`String` **get_current_rendering_driver_name**\ (\ ) |const| :ref:`πŸ”—` -Returns the name of the current rendering driver. This can be ``vulkan``, ``d3d12``, ``metal``, ``opengl3``, ``opengl3_es``, or ``opengl3_angle``. See also :ref:`get_current_rendering_method`. +Returns the name of the current rendering driver. This can be ``vulkan``, ``d3d12``, ``metal``, ``opengl3``, ``opengl3_es``, or ``opengl3_angle``. See also :ref:`get_current_rendering_method()`. The rendering driver is determined by :ref:`ProjectSettings.rendering/rendering_device/driver`, the ``--rendering-driver`` command line argument that overrides this project setting, or an automatic fallback that is applied depending on the hardware. @@ -8258,7 +8262,7 @@ The rendering driver is determined by :ref:`ProjectSettings.rendering/rendering_ :ref:`String` **get_current_rendering_method**\ (\ ) |const| :ref:`πŸ”—` -Returns the name of the current rendering method. This can be ``forward_plus``, ``mobile``, or ``gl_compatibility``. See also :ref:`get_current_rendering_driver_name`. +Returns the name of the current rendering method. This can be ``forward_plus``, ``mobile``, or ``gl_compatibility``. See also :ref:`get_current_rendering_driver_name()`. The rendering method is determined by :ref:`ProjectSettings.rendering/renderer/rendering_method`, the ``--rendering-method`` command line argument that overrides this project setting, or an automatic fallback that is applied depending on the hardware. @@ -8272,7 +8276,7 @@ The rendering method is determined by :ref:`ProjectSettings.rendering/renderer/r :ref:`Color` **get_default_clear_color**\ (\ ) :ref:`πŸ”—` -Returns the default clear color which is used when a specific clear color has not been selected. See also :ref:`set_default_clear_color`. +Returns the default clear color which is used when a specific clear color has not been selected. See also :ref:`set_default_clear_color()`. .. rst-class:: classref-item-separator @@ -8284,7 +8288,7 @@ Returns the default clear color which is used when a specific clear color has no :ref:`float` **get_frame_setup_time_cpu**\ (\ ) |const| :ref:`πŸ”—` -Returns the time taken to setup rendering on the CPU in milliseconds. This value is shared across all viewports and does *not* require :ref:`viewport_set_measure_render_time` to be enabled on a viewport to be queried. See also :ref:`viewport_get_measured_render_time_cpu`. +Returns the time taken to setup rendering on the CPU in milliseconds. This value is shared across all viewports and does *not* require :ref:`viewport_set_measure_render_time()` to be enabled on a viewport to be queried. See also :ref:`viewport_get_measured_render_time_cpu()`. .. rst-class:: classref-item-separator @@ -8310,11 +8314,11 @@ Returns the global RenderingDevice. :ref:`int` **get_rendering_info**\ (\ info\: :ref:`RenderingInfo`\ ) :ref:`πŸ”—` -Returns a statistic about the rendering engine which can be used for performance profiling. See :ref:`RenderingInfo` for a list of values that can be queried. See also :ref:`viewport_get_render_info`, which returns information specific to a viewport. +Returns a statistic about the rendering engine which can be used for performance profiling. See :ref:`RenderingInfo` for a list of values that can be queried. See also :ref:`viewport_get_render_info()`, which returns information specific to a viewport. \ **Note:** Only 3D rendering is currently taken into account by some of these values, such as the number of draw calls. -\ **Note:** Rendering information is not available until at least 2 frames have been rendered by the engine. If rendering information is not available, :ref:`get_rendering_info` returns ``0``. To print rendering information in ``_ready()`` successfully, use the following: +\ **Note:** Rendering information is not available until at least 2 frames have been rendered by the engine. If rendering information is not available, :ref:`get_rendering_info()` returns ``0``. To print rendering information in ``_ready()`` successfully, use the following: :: @@ -8346,7 +8350,7 @@ Returns the parameters of a shader. :ref:`RID` **get_test_cube**\ (\ ) :ref:`πŸ”—` -Returns the RID of the test cube. This mesh will be created and returned on the first call to :ref:`get_test_cube`, then it will be cached for subsequent calls. See also :ref:`make_sphere_mesh`. +Returns the RID of the test cube. This mesh will be created and returned on the first call to :ref:`get_test_cube()`, then it will be cached for subsequent calls. See also :ref:`make_sphere_mesh()`. .. rst-class:: classref-item-separator @@ -8358,7 +8362,7 @@ Returns the RID of the test cube. This mesh will be created and returned on the :ref:`RID` **get_test_texture**\ (\ ) :ref:`πŸ”—` -Returns the RID of a 256Γ—256 texture with a testing pattern on it (in :ref:`Image.FORMAT_RGB8` format). This texture will be created and returned on the first call to :ref:`get_test_texture`, then it will be cached for subsequent calls. See also :ref:`get_white_texture`. +Returns the RID of a 256Γ—256 texture with a testing pattern on it (in :ref:`Image.FORMAT_RGB8` format). This texture will be created and returned on the first call to :ref:`get_test_texture()`, then it will be cached for subsequent calls. See also :ref:`get_white_texture()`. \ **Example:** Get the test texture and apply it to a :ref:`Sprite2D` node: @@ -8378,7 +8382,7 @@ Returns the RID of a 256Γ—256 texture with a testing pattern on it (in :ref:`Ima :ref:`String` **get_video_adapter_api_version**\ (\ ) |const| :ref:`πŸ”—` -Returns the version of the graphics video adapter *currently in use* (e.g. "1.2.189" for Vulkan, "3.3.0 NVIDIA 510.60.02" for OpenGL). This version may be different from the actual latest version supported by the hardware, as Godot may not always request the latest version. See also :ref:`OS.get_video_adapter_driver_info`. +Returns the version of the graphics video adapter *currently in use* (e.g. "1.2.189" for Vulkan, "3.3.0 NVIDIA 510.60.02" for OpenGL). This version may be different from the actual latest version supported by the hardware, as Godot may not always request the latest version. See also :ref:`OS.get_video_adapter_driver_info()`. \ **Note:** When running a headless or server binary, this function returns an empty string. @@ -8436,7 +8440,7 @@ Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). :ref:`RID` **get_white_texture**\ (\ ) :ref:`πŸ”—` -Returns the ID of a 4Γ—4 white texture (in :ref:`Image.FORMAT_RGB8` format). This texture will be created and returned on the first call to :ref:`get_white_texture`, then it will be cached for subsequent calls. See also :ref:`get_test_texture`. +Returns the ID of a 4Γ—4 white texture (in :ref:`Image.FORMAT_RGB8` format). This texture will be created and returned on the first call to :ref:`get_white_texture()`, then it will be cached for subsequent calls. See also :ref:`get_test_texture()`. \ **Example:** Get the white texture and apply it to a :ref:`Sprite2D` node: @@ -8484,7 +8488,7 @@ Creates a new global shader uniform. Returns the value of the global shader uniform specified by ``name``. -\ **Note:** :ref:`global_shader_parameter_get` has a large performance penalty as the rendering thread needs to synchronize with the calling thread, which is slow. Do not use this method during gameplay to avoid stuttering. If you need to read values in a script after setting them, consider creating an autoload where you store the values you need to query at the same time you're setting them as global parameters. +\ **Note:** :ref:`global_shader_parameter_get()` has a large performance penalty as the rendering thread needs to synchronize with the calling thread, which is slow. Do not use this method during gameplay to avoid stuttering. If you need to read values in a script after setting them, consider creating an autoload where you store the values you need to query at the same time you're setting them as global parameters. .. rst-class:: classref-item-separator @@ -8498,7 +8502,7 @@ Returns the value of the global shader uniform specified by ``name``. Returns the list of global shader uniform names. -\ **Note:** :ref:`global_shader_parameter_get` has a large performance penalty as the rendering thread needs to synchronize with the calling thread, which is slow. Do not use this method during gameplay to avoid stuttering. If you need to read values in a script after setting them, consider creating an autoload where you store the values you need to query at the same time you're setting them as global parameters. +\ **Note:** :ref:`global_shader_parameter_get()` has a large performance penalty as the rendering thread needs to synchronize with the calling thread, which is slow. Do not use this method during gameplay to avoid stuttering. If you need to read values in a script after setting them, consider creating an autoload where you store the values you need to query at the same time you're setting them as global parameters. .. rst-class:: classref-item-separator @@ -8512,7 +8516,7 @@ Returns the list of global shader uniform names. Returns the type associated to the global shader uniform specified by ``name``. -\ **Note:** :ref:`global_shader_parameter_get` has a large performance penalty as the rendering thread needs to synchronize with the calling thread, which is slow. Do not use this method during gameplay to avoid stuttering. If you need to read values in a script after setting them, consider creating an autoload where you store the values you need to query at the same time you're setting them as global parameters. +\ **Note:** :ref:`global_shader_parameter_get()` has a large performance penalty as the rendering thread needs to synchronize with the calling thread, which is slow. Do not use this method during gameplay to avoid stuttering. If you need to read values in a script after setting them, consider creating an autoload where you store the values you need to query at the same time you're setting them as global parameters. .. rst-class:: classref-item-separator @@ -8560,7 +8564,7 @@ Overrides the global shader uniform ``name`` with ``value``. Equivalent to the : :ref:`bool` **has_changed**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if changes have been made to the RenderingServer's data. :ref:`force_draw` is usually called if this happens. +Returns ``true`` if changes have been made to the RenderingServer's data. :ref:`force_draw()` is usually called if this happens. .. rst-class:: classref-item-separator @@ -8598,7 +8602,7 @@ Returns ``true`` if the OS supports a certain ``feature``. Features might be ``s |void| **instance_attach_object_instance_id**\ (\ instance\: :ref:`RID`, id\: :ref:`int`\ ) :ref:`πŸ”—` -Attaches a unique Object ID to instance. Object ID must be attached to instance for proper culling with :ref:`instances_cull_aabb`, :ref:`instances_cull_convex`, and :ref:`instances_cull_ray`. +Attaches a unique Object ID to instance. Object ID must be attached to instance for proper culling with :ref:`instances_cull_aabb()`, :ref:`instances_cull_convex()`, and :ref:`instances_cull_ray()`. .. rst-class:: classref-item-separator @@ -8624,9 +8628,9 @@ Attaches a skeleton to an instance. Removes the previous skeleton from the insta Creates a visual instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``instance_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. -An instance is a way of placing a 3D object in the scenario. Objects like particles, meshes, reflection probes and decals need to be associated with an instance to be visible in the scenario using :ref:`instance_set_base`. +An instance is a way of placing a 3D object in the scenario. Objects like particles, meshes, reflection probes and decals need to be associated with an instance to be visible in the scenario using :ref:`instance_set_base()`. \ **Note:** The equivalent node is :ref:`VisualInstance3D`. @@ -8642,7 +8646,7 @@ An instance is a way of placing a 3D object in the scenario. Objects like partic Creates a visual instance, adds it to the RenderingServer, and sets both base and scenario. It can be accessed with the RID that is returned. This RID will be used in all ``instance_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. This is a shorthand for using :ref:`instance_create` and setting the base and scenario manually. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. This is a shorthand for using :ref:`instance_create()` and setting the base and scenario manually. .. rst-class:: classref-item-separator @@ -8654,7 +8658,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe :ref:`Variant` **instance_geometry_get_shader_parameter**\ (\ instance\: :ref:`RID`, parameter\: :ref:`StringName`\ ) |const| :ref:`πŸ”—` -Returns the value of the per-instance shader uniform from the specified 3D geometry instance. Equivalent to :ref:`GeometryInstance3D.get_instance_shader_parameter`. +Returns the value of the per-instance shader uniform from the specified 3D geometry instance. Equivalent to :ref:`GeometryInstance3D.get_instance_shader_parameter()`. \ **Note:** Per-instance shader parameter names are case-sensitive. @@ -8668,7 +8672,7 @@ Returns the value of the per-instance shader uniform from the specified 3D geome :ref:`Variant` **instance_geometry_get_shader_parameter_default_value**\ (\ instance\: :ref:`RID`, parameter\: :ref:`StringName`\ ) |const| :ref:`πŸ”—` -Returns the default value of the per-instance shader uniform from the specified 3D geometry instance. Equivalent to :ref:`GeometryInstance3D.get_instance_shader_parameter`. +Returns the default value of the per-instance shader uniform from the specified 3D geometry instance. Equivalent to :ref:`GeometryInstance3D.get_instance_shader_parameter()`. .. rst-class:: classref-item-separator @@ -8680,7 +8684,7 @@ Returns the default value of the per-instance shader uniform from the specified :ref:`Array`\[:ref:`Dictionary`\] **instance_geometry_get_shader_parameter_list**\ (\ instance\: :ref:`RID`\ ) |const| :ref:`πŸ”—` -Returns a dictionary of per-instance shader uniform names of the per-instance shader uniform from the specified 3D geometry instance. The returned dictionary is in PropertyInfo format, with the keys ``name``, ``class_name``, ``type``, ``hint``, ``hint_string`` and ``usage``. Equivalent to :ref:`GeometryInstance3D.get_instance_shader_parameter`. +Returns a dictionary of per-instance shader uniform names of the per-instance shader uniform from the specified 3D geometry instance. The returned dictionary is in PropertyInfo format, with the keys ``name``, ``class_name``, ``type``, ``hint``, ``hint_string`` and ``usage``. Equivalent to :ref:`GeometryInstance3D.get_instance_shader_parameter()`. .. rst-class:: classref-item-separator @@ -8764,7 +8768,7 @@ Sets a material that will override the material for all surfaces on the mesh ass |void| **instance_geometry_set_shader_parameter**\ (\ instance\: :ref:`RID`, parameter\: :ref:`StringName`, value\: :ref:`Variant`\ ) :ref:`πŸ”—` -Sets the per-instance shader uniform on the specified 3D geometry instance. Equivalent to :ref:`GeometryInstance3D.set_instance_shader_parameter`. +Sets the per-instance shader uniform on the specified 3D geometry instance. Equivalent to :ref:`GeometryInstance3D.set_instance_shader_parameter()`. .. rst-class:: classref-item-separator @@ -8928,7 +8932,7 @@ Sets the scenario that the instance is in. The scenario is the 3D world that the |void| **instance_set_surface_override_material**\ (\ instance\: :ref:`RID`, surface\: :ref:`int`, material\: :ref:`RID`\ ) :ref:`πŸ”—` -Sets the override material of a specific surface. Equivalent to :ref:`MeshInstance3D.set_surface_override_material`. +Sets the override material of a specific surface. Equivalent to :ref:`MeshInstance3D.set_surface_override_material()`. .. rst-class:: classref-item-separator @@ -8976,7 +8980,7 @@ Sets whether an instance is drawn or not. Equivalent to :ref:`Node3D.visible` **instances_cull_aabb**\ (\ aabb\: :ref:`AABB`, scenario\: :ref:`RID` = RID()\ ) |const| :ref:`πŸ”—` -Returns an array of object IDs intersecting with the provided AABB. Only 3D nodes that inherit from :ref:`VisualInstance3D` are considered, such as :ref:`MeshInstance3D` or :ref:`DirectionalLight3D`. Use :ref:`@GlobalScope.instance_from_id` to obtain the actual nodes. A scenario RID must be provided, which is available in the :ref:`World3D` you want to query. This forces an update for all resources queued to update. +Returns an array of object IDs intersecting with the provided AABB. Only 3D nodes that inherit from :ref:`VisualInstance3D` are considered, such as :ref:`MeshInstance3D` or :ref:`DirectionalLight3D`. Use :ref:`@GlobalScope.instance_from_id()` to obtain the actual nodes. A scenario RID must be provided, which is available in the :ref:`World3D` you want to query. This forces an update for all resources queued to update. \ **Warning:** This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. @@ -8990,7 +8994,7 @@ Returns an array of object IDs intersecting with the provided AABB. Only 3D node :ref:`PackedInt64Array` **instances_cull_convex**\ (\ convex\: :ref:`Array`\[:ref:`Plane`\], scenario\: :ref:`RID` = RID()\ ) |const| :ref:`πŸ”—` -Returns an array of object IDs intersecting with the provided convex shape. Only 3D nodes that inherit from :ref:`VisualInstance3D` are considered, such as :ref:`MeshInstance3D` or :ref:`DirectionalLight3D`. Use :ref:`@GlobalScope.instance_from_id` to obtain the actual nodes. A scenario RID must be provided, which is available in the :ref:`World3D` you want to query. This forces an update for all resources queued to update. +Returns an array of object IDs intersecting with the provided convex shape. Only 3D nodes that inherit from :ref:`VisualInstance3D` are considered, such as :ref:`MeshInstance3D` or :ref:`DirectionalLight3D`. Use :ref:`@GlobalScope.instance_from_id()` to obtain the actual nodes. A scenario RID must be provided, which is available in the :ref:`World3D` you want to query. This forces an update for all resources queued to update. \ **Warning:** This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. @@ -9004,7 +9008,7 @@ Returns an array of object IDs intersecting with the provided convex shape. Only :ref:`PackedInt64Array` **instances_cull_ray**\ (\ from\: :ref:`Vector3`, to\: :ref:`Vector3`, scenario\: :ref:`RID` = RID()\ ) |const| :ref:`πŸ”—` -Returns an array of object IDs intersecting with the provided 3D ray. Only 3D nodes that inherit from :ref:`VisualInstance3D` are considered, such as :ref:`MeshInstance3D` or :ref:`DirectionalLight3D`. Use :ref:`@GlobalScope.instance_from_id` to obtain the actual nodes. A scenario RID must be provided, which is available in the :ref:`World3D` you want to query. This forces an update for all resources queued to update. +Returns an array of object IDs intersecting with the provided 3D ray. Only 3D nodes that inherit from :ref:`VisualInstance3D` are considered, such as :ref:`MeshInstance3D` or :ref:`DirectionalLight3D`. Use :ref:`@GlobalScope.instance_from_id()` to obtain the actual nodes. A scenario RID must be provided, which is available in the :ref:`World3D` you want to query. This forces an update for all resources queued to update. \ **Warning:** This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. @@ -9162,7 +9166,7 @@ If ``true``, the 3D light will subtract light instead of adding light. Equivalen |void| **light_set_param**\ (\ light\: :ref:`RID`, param\: :ref:`LightParam`, value\: :ref:`float`\ ) :ref:`πŸ”—` -Sets the specified 3D light parameter. See :ref:`LightParam` for options. Equivalent to :ref:`Light3D.set_param`. +Sets the specified 3D light parameter. See :ref:`LightParam` for options. Equivalent to :ref:`Light3D.set_param()`. .. rst-class:: classref-item-separator @@ -9186,7 +9190,7 @@ Sets the projector texture to use for the specified 3D light. Equivalent to :ref |void| **light_set_reverse_cull_face_mode**\ (\ light\: :ref:`RID`, enabled\: :ref:`bool`\ ) :ref:`πŸ”—` -If ``true``, reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with :ref:`instance_geometry_set_cast_shadows_setting`. Equivalent to :ref:`Light3D.shadow_reverse_cull_face`. +If ``true``, reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with :ref:`instance_geometry_set_cast_shadows_setting()`. Equivalent to :ref:`Light3D.shadow_reverse_cull_face`. .. rst-class:: classref-item-separator @@ -9224,7 +9228,7 @@ Sets the shadow caster mask for this 3D light. Shadows will only be cast using o Creates a new lightmap global illumination instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``lightmap_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. \ **Note:** The equivalent node is :ref:`LightmapGI`. @@ -9294,7 +9298,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe |void| **lightmap_set_baked_exposure_normalization**\ (\ lightmap\: :ref:`RID`, baked_exposure\: :ref:`float`\ ) :ref:`πŸ”—` -Used to inform the renderer what exposure normalization value was used while baking the lightmap. This value will be used and modulated at run time to ensure that the lightmap maintains a consistent level of exposure even if the scene-wide exposure normalization is changed at run time. For more information see :ref:`camera_attributes_set_exposure`. +Used to inform the renderer what exposure normalization value was used while baking the lightmap. This value will be used and modulated at run time to ensure that the lightmap maintains a consistent level of exposure even if the scene-wide exposure normalization is changed at run time. For more information see :ref:`camera_attributes_set_exposure()`. .. rst-class:: classref-item-separator @@ -9386,7 +9390,7 @@ Toggles whether a bicubic filter should be used when lightmaps are sampled. This :ref:`RID` **make_sphere_mesh**\ (\ latitudes\: :ref:`int`, longitudes\: :ref:`int`, radius\: :ref:`float`\ ) :ref:`πŸ”—` -Returns a mesh of a sphere with the given number of horizontal subdivisions, vertical subdivisions and radius. See also :ref:`get_test_cube`. +Returns a mesh of a sphere with the given number of horizontal subdivisions, vertical subdivisions and radius. See also :ref:`get_test_cube()`. .. rst-class:: classref-item-separator @@ -9400,7 +9404,7 @@ Returns a mesh of a sphere with the given number of horizontal subdivisions, ver Creates an empty material and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``material_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. \ **Note:** The equivalent resource is :ref:`Material`. @@ -9516,9 +9520,9 @@ Removes all surfaces from a mesh. Creates a new mesh and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``mesh_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. -To place in a scene, attach this mesh to an instance using :ref:`instance_set_base` using the returned RID. +To place in a scene, attach this mesh to an instance using :ref:`instance_set_base()` using the returned RID. \ **Note:** The equivalent resource is :ref:`Mesh`. @@ -9824,9 +9828,9 @@ Sets a mesh's surface's material. Creates a new multimesh on the RenderingServer and returns an :ref:`RID` handle. This RID will be used in all ``multimesh_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. -To place in a scene, attach this multimesh to an instance using :ref:`instance_set_base` using the returned RID. +To place in a scene, attach this multimesh to an instance using :ref:`instance_set_base()` using the returned RID. \ **Note:** The equivalent resource is :ref:`MultiMesh`. @@ -9852,9 +9856,9 @@ Calculates and returns the axis-aligned bounding box that encloses all instances :ref:`PackedFloat32Array` **multimesh_get_buffer**\ (\ multimesh\: :ref:`RID`\ ) |const| :ref:`πŸ”—` -Returns the MultiMesh data (such as instance transforms, colors, etc.). See :ref:`multimesh_set_buffer` for details on the returned data. +Returns the MultiMesh data (such as instance transforms, colors, etc.). See :ref:`multimesh_set_buffer()` for details on the returned data. -\ **Note:** If the buffer is in the engine's internal cache, it will have to be fetched from GPU memory and possibly decompressed. This means :ref:`multimesh_get_buffer` is potentially a slow operation and should be avoided whenever possible. +\ **Note:** If the buffer is in the engine's internal cache, it will have to be fetched from GPU memory and possibly decompressed. This means :ref:`multimesh_get_buffer()` is potentially a slow operation and should be avoided whenever possible. .. rst-class:: classref-item-separator @@ -9878,7 +9882,7 @@ Returns the :ref:`RenderingDevice` :ref:`RID` :ref:`RID` **multimesh_get_command_buffer_rd_rid**\ (\ multimesh\: :ref:`RID`\ ) |const| :ref:`πŸ”—` -Returns the :ref:`RenderingDevice` :ref:`RID` handle of the :ref:`MultiMesh` command buffer. This :ref:`RID` is only valid if ``use_indirect`` is set to ``true`` when allocating data through :ref:`multimesh_allocate_data`. It can be used to directly modify the instance count via buffer. +Returns the :ref:`RenderingDevice` :ref:`RID` handle of the :ref:`MultiMesh` command buffer. This :ref:`RID` is only valid if ``use_indirect`` is set to ``true`` when allocating data through :ref:`multimesh_allocate_data()`. It can be used to directly modify the instance count via buffer. The data structure is dependent on both how many surfaces the mesh contains and whether it is indexed or not, the buffer has 5 integers in it, with the last unused if the mesh is not indexed. @@ -10019,7 +10023,7 @@ This is useful when moving an instance to a new location, to give an instantaneo |void| **multimesh_instance_set_color**\ (\ multimesh\: :ref:`RID`, index\: :ref:`int`, color\: :ref:`Color`\ ) :ref:`πŸ”—` -Sets the color by which this instance will be modulated. Equivalent to :ref:`MultiMesh.set_instance_color`. +Sets the color by which this instance will be modulated. Equivalent to :ref:`MultiMesh.set_instance_color()`. .. rst-class:: classref-item-separator @@ -10031,7 +10035,7 @@ Sets the color by which this instance will be modulated. Equivalent to :ref:`Mul |void| **multimesh_instance_set_custom_data**\ (\ multimesh\: :ref:`RID`, index\: :ref:`int`, custom_data\: :ref:`Color`\ ) :ref:`πŸ”—` -Sets the custom data for this instance. Custom data is passed as a :ref:`Color`, but is interpreted as a ``vec4`` in the shader. Equivalent to :ref:`MultiMesh.set_instance_custom_data`. +Sets the custom data for this instance. Custom data is passed as a :ref:`Color`, but is interpreted as a ``vec4`` in the shader. Equivalent to :ref:`MultiMesh.set_instance_custom_data()`. .. rst-class:: classref-item-separator @@ -10043,7 +10047,7 @@ Sets the custom data for this instance. Custom data is passed as a :ref:`Color`, index\: :ref:`int`, transform\: :ref:`Transform3D`\ ) :ref:`πŸ”—` -Sets the :ref:`Transform3D` for this instance. Equivalent to :ref:`MultiMesh.set_instance_transform`. +Sets the :ref:`Transform3D` for this instance. Equivalent to :ref:`MultiMesh.set_instance_transform()`. .. rst-class:: classref-item-separator @@ -10055,7 +10059,7 @@ Sets the :ref:`Transform3D` for this instance. Equivalent to |void| **multimesh_instance_set_transform_2d**\ (\ multimesh\: :ref:`RID`, index\: :ref:`int`, transform\: :ref:`Transform2D`\ ) :ref:`πŸ”—` -Sets the :ref:`Transform2D` for this instance. For use when multimesh is used in 2D. Equivalent to :ref:`MultiMesh.set_instance_transform_2d`. +Sets the :ref:`Transform2D` for this instance. For use when multimesh is used in 2D. Equivalent to :ref:`MultiMesh.set_instance_transform_2d()`. .. rst-class:: classref-item-separator @@ -10067,7 +10071,7 @@ Sets the :ref:`Transform2D` for this instance. For use when m |void| **multimesh_set_buffer**\ (\ multimesh\: :ref:`RID`, buffer\: :ref:`PackedFloat32Array`\ ) :ref:`πŸ”—` -Set the entire data to use for drawing the ``multimesh`` at once to ``buffer`` (such as instance transforms and colors). ``buffer``'s size must match the number of instances multiplied by the per-instance data size (which depends on the enabled MultiMesh fields). Otherwise, an error message is printed and nothing is rendered. See also :ref:`multimesh_get_buffer`. +Set the entire data to use for drawing the ``multimesh`` at once to ``buffer`` (such as instance transforms and colors). ``buffer``'s size must match the number of instances multiplied by the per-instance data size (which depends on the enabled MultiMesh fields). Otherwise, an error message is printed and nothing is rendered. See also :ref:`multimesh_get_buffer()`. The per-instance data size and expected data order is: @@ -10100,7 +10104,7 @@ Instance transforms are in row-major order. Specifically: |void| **multimesh_set_buffer_interpolated**\ (\ multimesh\: :ref:`RID`, buffer\: :ref:`PackedFloat32Array`, buffer_previous\: :ref:`PackedFloat32Array`\ ) :ref:`πŸ”—` -Alternative version of :ref:`multimesh_set_buffer` for use with physics interpolation. +Alternative version of :ref:`multimesh_set_buffer()` for use with physics interpolation. Takes both an array of current data and an array of data for the previous physics tick. @@ -10178,7 +10182,7 @@ Sets the number of instances visible at a given time. If -1, all instances that Creates an occluder instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``occluder_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. \ **Note:** The equivalent resource is :ref:`Occluder3D` (not to be confused with the :ref:`OccluderInstance3D` node). @@ -10206,9 +10210,9 @@ Sets the mesh data for the given occluder RID, which controls the shape of the o Creates a new omni light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most ``light_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. -To place in a scene, attach this omni light to an instance using :ref:`instance_set_base` using the returned RID. +To place in a scene, attach this omni light to an instance using :ref:`instance_set_base()` using the returned RID. \ **Note:** The equivalent node is :ref:`OmniLight3D`. @@ -10370,9 +10374,9 @@ Sets the ``radius`` for the 3D GPU particles sphere collision or attractor speci Creates a GPU-based particle system and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``particles_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. -To place in a scene, attach these particles to an instance using :ref:`instance_set_base` using the returned RID. +To place in a scene, attach these particles to an instance using :ref:`instance_set_base()` using the returned RID. \ **Note:** The equivalent nodes are :ref:`GPUParticles2D` and :ref:`GPUParticles3D`. @@ -10400,7 +10404,7 @@ Manually emits particles from the ``particles`` instance. :ref:`AABB` **particles_get_current_aabb**\ (\ particles\: :ref:`RID`\ ) :ref:`πŸ”—` -Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to :ref:`GPUParticles3D.capture_aabb`. +Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to :ref:`GPUParticles3D.capture_aabb()`. .. rst-class:: classref-item-separator @@ -10436,7 +10440,7 @@ Returns ``true`` if particles are not emitting and particles are set to inactive |void| **particles_request_process**\ (\ particles\: :ref:`RID`\ ) :ref:`πŸ”—` -Add particle system to list of particle systems that need to be updated. Update will take place on the next frame, or on the next call to :ref:`instances_cull_aabb`, :ref:`instances_cull_convex`, or :ref:`instances_cull_ray`. +Add particle system to list of particle systems that need to be updated. Update will take place on the next frame, or on the next call to :ref:`instances_cull_aabb()`, :ref:`instances_cull_convex()`, or :ref:`instances_cull_ray()`. .. rst-class:: classref-item-separator @@ -10460,7 +10464,7 @@ Requests particles to process for extra process time during a single frame. |void| **particles_restart**\ (\ particles\: :ref:`RID`\ ) :ref:`πŸ”—` -Reset the particles on the next update. Equivalent to :ref:`GPUParticles3D.restart`. +Reset the particles on the next update. Equivalent to :ref:`GPUParticles3D.restart()`. .. rst-class:: classref-item-separator @@ -10822,9 +10826,9 @@ Sets the filter quality for omni and spot light shadows in 3D. See also :ref:`Pr Creates a reflection probe and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``reflection_probe_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. -To place in a scene, attach this reflection probe to an instance using :ref:`instance_set_base` using the returned RID. +To place in a scene, attach this reflection probe to an instance using :ref:`instance_set_base()` using the returned RID. \ **Note:** The equivalent node is :ref:`ReflectionProbe`. @@ -11044,7 +11048,7 @@ Schedules a callback to the given callable after a frame has been drawn. Creates a scenario and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``scenario_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. The scenario is the 3D world that all the visual instances exist in. @@ -11144,7 +11148,7 @@ If ``generate`` is ``true``, generates debug wireframes for all meshes that are |void| **set_default_clear_color**\ (\ color\: :ref:`Color`\ ) :ref:`πŸ”—` -Sets the default clear color which is used when a specific clear color has not been selected. See also :ref:`get_default_clear_color`. +Sets the default clear color which is used when a specific clear color has not been selected. See also :ref:`get_default_clear_color()`. .. rst-class:: classref-item-separator @@ -11158,7 +11162,7 @@ Sets the default clear color which is used when a specific clear color has not b Creates an empty shader and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``shader_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. \ **Note:** The equivalent resource is :ref:`Shader`. @@ -11312,7 +11316,7 @@ Sets the :ref:`Transform2D` for a specific bone of this skele Creates a skeleton and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``skeleton_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. .. rst-class:: classref-item-separator @@ -11350,7 +11354,7 @@ Returns the number of bones allocated for this skeleton. :ref:`Image` **sky_bake_panorama**\ (\ sky\: :ref:`RID`, energy\: :ref:`float`, bake_irradiance\: :ref:`bool`, size\: :ref:`Vector2i`\ ) :ref:`πŸ”—` -Generates and returns an :ref:`Image` containing the radiance map for the specified ``sky`` RID. This supports built-in sky material and custom sky shaders. If ``bake_irradiance`` is ``true``, the irradiance map is saved instead of the radiance map. The radiance map is used to render reflected light, while the irradiance map is used to render ambient light. See also :ref:`environment_bake_panorama`. +Generates and returns an :ref:`Image` containing the radiance map for the specified ``sky`` RID. This supports built-in sky material and custom sky shaders. If ``bake_irradiance`` is ``true``, the irradiance map is saved instead of the radiance map. The radiance map is used to render reflected light, while the irradiance map is used to render ambient light. See also :ref:`environment_bake_panorama()`. \ **Note:** The image is saved in linear color space without any tonemapping performed, which means it will look too dark if viewed directly in an image editor. ``energy`` values above ``1.0`` can be used to brighten the resulting image. @@ -11368,7 +11372,7 @@ Generates and returns an :ref:`Image` containing the radiance map f Creates an empty sky and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``sky_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. .. rst-class:: classref-item-separator @@ -11418,9 +11422,9 @@ Sets the ``radiance_size`` of the sky specified by the ``sky`` RID (in pixels). Creates a spot light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most ``light_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. -To place in a scene, attach this spot light to an instance using :ref:`instance_set_base` using the returned RID. +To place in a scene, attach this spot light to an instance using :ref:`instance_set_base()` using the returned RID. .. rst-class:: classref-item-separator @@ -11458,11 +11462,11 @@ Sets the :ref:`ProjectSettings.rendering/environment/subsurface_scattering/subsu Creates a 2-dimensional texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``texture_2d_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. \ **Note:** The equivalent resource is :ref:`Texture2D`. -\ **Note:** Not to be confused with :ref:`RenderingDevice.texture_create`, which creates the graphics API's own texture type as opposed to the Godot-specific :ref:`Texture2D` resource. +\ **Note:** Not to be confused with :ref:`RenderingDevice.texture_create()`, which creates the graphics API's own texture type as opposed to the Godot-specific :ref:`Texture2D` resource. .. rst-class:: classref-item-separator @@ -11476,7 +11480,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe Returns an :ref:`Image` instance from the given ``texture`` :ref:`RID`. -\ **Example:** Get the test texture from :ref:`get_test_texture` and apply it to a :ref:`Sprite2D` node: +\ **Example:** Get the test texture from :ref:`get_test_texture()` and apply it to a :ref:`Sprite2D` node: :: @@ -11508,7 +11512,7 @@ Returns an :ref:`Image` instance from the given ``texture`` :ref:`R Creates a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``texture_2d_layered_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. \ **Note:** The equivalent resource is :ref:`TextureLayered`. @@ -11522,7 +11526,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe :ref:`RID` **texture_2d_layered_placeholder_create**\ (\ layered_type\: :ref:`TextureLayeredType`\ ) :ref:`πŸ”—` -Creates a placeholder for a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``texture_2d_layered_*`` RenderingServer functions, although it does nothing when used. See also :ref:`texture_2d_placeholder_create`. +Creates a placeholder for a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``texture_2d_layered_*`` RenderingServer functions, although it does nothing when used. See also :ref:`texture_2d_placeholder_create()`. \ **Note:** The equivalent resource is :ref:`PlaceholderTextureLayered`. @@ -11536,9 +11540,9 @@ Creates a placeholder for a 2-dimensional layered texture and adds it to the Ren :ref:`RID` **texture_2d_placeholder_create**\ (\ ) :ref:`πŸ”—` -Creates a placeholder for a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``texture_2d_layered_*`` RenderingServer functions, although it does nothing when used. See also :ref:`texture_2d_layered_placeholder_create`. +Creates a placeholder for a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``texture_2d_layered_*`` RenderingServer functions, although it does nothing when used. See also :ref:`texture_2d_layered_placeholder_create()`. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. \ **Note:** The equivalent resource is :ref:`PlaceholderTexture2D`. @@ -11554,7 +11558,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe Updates the texture specified by the ``texture`` :ref:`RID` with the data in ``image``. A ``layer`` must also be specified, which should be ``0`` when updating a single-layer texture (:ref:`Texture2D`). -\ **Note:** The ``image`` must have the same width, height and format as the current ``texture`` data. Otherwise, an error will be printed and the original texture won't be modified. If you need to use different width, height or format, use :ref:`texture_replace` instead. +\ **Note:** The ``image`` must have the same width, height and format as the current ``texture`` data. Otherwise, an error will be printed and the original texture won't be modified. If you need to use different width, height or format, use :ref:`texture_replace()` instead. .. rst-class:: classref-item-separator @@ -11592,7 +11596,7 @@ Returns 3D texture data as an array of :ref:`Image`\ s for the spec Creates a placeholder for a 3-dimensional texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``texture_3d_*`` RenderingServer functions, although it does nothing when used. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. \ **Note:** The equivalent resource is :ref:`PlaceholderTexture3D`. @@ -11608,7 +11612,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe Updates the texture specified by the ``texture`` :ref:`RID`'s data with the data in ``data``. All the texture's layers must be replaced at once. -\ **Note:** The ``texture`` must have the same width, height, depth and format as the current texture data. Otherwise, an error will be printed and the original texture won't be modified. If you need to use different width, height, depth or format, use :ref:`texture_replace` instead. +\ **Note:** The ``texture`` must have the same width, height, depth and format as the current texture data. Otherwise, an error will be printed and the original texture won't be modified. If you need to use different width, height, depth or format, use :ref:`texture_replace()` instead. .. rst-class:: classref-item-separator @@ -11622,7 +11626,7 @@ Updates the texture specified by the ``texture`` :ref:`RID`'s data wi Creates a texture based on a native handle that was created outside of Godot's renderer. -\ **Note:** If using the rendering device renderer, using :ref:`RenderingDevice.texture_create_from_extension` rather than this method is recommended. It will give you much more control over the texture's format and usage. +\ **Note:** If using the rendering device renderer, using :ref:`RenderingDevice.texture_create_from_extension()` rather than this method is recommended. It will give you much more control over the texture's format and usage. .. rst-class:: classref-item-separator @@ -11804,7 +11808,7 @@ Sets a viewport's canvas. |void| **viewport_attach_to_screen**\ (\ viewport\: :ref:`RID`, rect\: :ref:`Rect2` = Rect2(0, 0, 0, 0), screen\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Copies the viewport to a region of the screen specified by ``rect``. If :ref:`viewport_set_render_direct_to_screen` is ``true``, then the viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to. +Copies the viewport to a region of the screen specified by ``rect``. If :ref:`viewport_set_render_direct_to_screen()` is ``true``, then the viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to. For example, you can set the root viewport to not render at all with the following code: @@ -11819,7 +11823,7 @@ For example, you can set the root viewport to not render at all with the followi -Using this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For further optimization, see :ref:`viewport_set_render_direct_to_screen`. +Using this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For further optimization, see :ref:`viewport_set_render_direct_to_screen()`. .. rst-class:: classref-item-separator @@ -11833,7 +11837,7 @@ Using this can result in significant optimization, especially on lower-end devic Creates an empty viewport and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``viewport_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. \ **Note:** The equivalent node is :ref:`Viewport`. @@ -11847,9 +11851,9 @@ Once finished with your RID, you will want to free the RID using the RenderingSe :ref:`float` **viewport_get_measured_render_time_cpu**\ (\ viewport\: :ref:`RID`\ ) |const| :ref:`πŸ”—` -Returns the CPU time taken to render the last frame in milliseconds. This *only* includes time spent in rendering-related operations; scripts' ``_process`` functions and other engine subsystems are not included in this readout. To get a complete readout of CPU time spent to render the scene, sum the render times of all viewports that are drawn every frame plus :ref:`get_frame_setup_time_cpu`. Unlike :ref:`Engine.get_frames_per_second`, this method will accurately reflect CPU utilization even if framerate is capped via V-Sync or :ref:`Engine.max_fps`. See also :ref:`viewport_get_measured_render_time_gpu`. +Returns the CPU time taken to render the last frame in milliseconds. This *only* includes time spent in rendering-related operations; scripts' ``_process`` functions and other engine subsystems are not included in this readout. To get a complete readout of CPU time spent to render the scene, sum the render times of all viewports that are drawn every frame plus :ref:`get_frame_setup_time_cpu()`. Unlike :ref:`Engine.get_frames_per_second()`, this method will accurately reflect CPU utilization even if framerate is capped via V-Sync or :ref:`Engine.max_fps`. See also :ref:`viewport_get_measured_render_time_gpu()`. -\ **Note:** Requires measurements to be enabled on the specified ``viewport`` using :ref:`viewport_set_measure_render_time`. Otherwise, this method returns ``0.0``. +\ **Note:** Requires measurements to be enabled on the specified ``viewport`` using :ref:`viewport_set_measure_render_time()`. Otherwise, this method returns ``0.0``. .. rst-class:: classref-item-separator @@ -11861,11 +11865,11 @@ Returns the CPU time taken to render the last frame in milliseconds. This *only* :ref:`float` **viewport_get_measured_render_time_gpu**\ (\ viewport\: :ref:`RID`\ ) |const| :ref:`πŸ”—` -Returns the GPU time taken to render the last frame in milliseconds. To get a complete readout of GPU time spent to render the scene, sum the render times of all viewports that are drawn every frame. Unlike :ref:`Engine.get_frames_per_second`, this method accurately reflects GPU utilization even if framerate is capped via V-Sync or :ref:`Engine.max_fps`. See also :ref:`viewport_get_measured_render_time_cpu`. +Returns the GPU time taken to render the last frame in milliseconds. To get a complete readout of GPU time spent to render the scene, sum the render times of all viewports that are drawn every frame. Unlike :ref:`Engine.get_frames_per_second()`, this method accurately reflects GPU utilization even if framerate is capped via V-Sync or :ref:`Engine.max_fps`. See also :ref:`viewport_get_measured_render_time_cpu()`. -\ **Note:** Requires measurements to be enabled on the specified ``viewport`` using :ref:`viewport_set_measure_render_time`. Otherwise, this method returns ``0.0``. +\ **Note:** Requires measurements to be enabled on the specified ``viewport`` using :ref:`viewport_set_measure_render_time()`. Otherwise, this method returns ``0.0``. -\ **Note:** When GPU utilization is low enough during a certain period of time, GPUs will decrease their power state (which in turn decreases core and memory clock speeds). This can cause the reported GPU time to increase if GPU utilization is kept low enough by a framerate cap (compared to what it would be at the GPU's highest power state). Keep this in mind when benchmarking using :ref:`viewport_get_measured_render_time_gpu`. This behavior can be overridden in the graphics driver settings at the cost of higher power usage. +\ **Note:** When GPU utilization is low enough during a certain period of time, GPUs will decrease their power state (which in turn decreases core and memory clock speeds). This can cause the reported GPU time to increase if GPU utilization is kept low enough by a framerate cap (compared to what it would be at the GPU's highest power state). Keep this in mind when benchmarking using :ref:`viewport_get_measured_render_time_gpu()`. This behavior can be overridden in the graphics driver settings at the cost of higher power usage. .. rst-class:: classref-item-separator @@ -11879,9 +11883,9 @@ Returns the GPU time taken to render the last frame in milliseconds. To get a co Returns a statistic about the rendering engine which can be used for performance profiling. This is separated into render pass ``type``\ s, each of them having the same ``info``\ s you can query (different passes will return different values). See :ref:`ViewportRenderInfoType` for a list of render pass types and :ref:`ViewportRenderInfo` for a list of information that can be queried. -See also :ref:`get_rendering_info`, which returns global information across all viewports. +See also :ref:`get_rendering_info()`, which returns global information across all viewports. -\ **Note:** Viewport rendering information is not available until at least 2 frames have been rendered by the engine. If rendering information is not available, :ref:`viewport_get_render_info` returns ``0``. To print rendering information in ``_ready()`` successfully, use the following: +\ **Note:** Viewport rendering information is not available until at least 2 frames have been rendered by the engine. If rendering information is not available, :ref:`viewport_get_render_info()` returns ``0``. To print rendering information in ``_ready()`` successfully, use the following: :: @@ -12131,7 +12135,7 @@ Sets the viewport's global transformation matrix. |void| **viewport_set_measure_render_time**\ (\ viewport\: :ref:`RID`, enable\: :ref:`bool`\ ) :ref:`πŸ”—` -Sets the measurement for the given ``viewport`` RID (obtained using :ref:`Viewport.get_viewport_rid`). Once enabled, :ref:`viewport_get_measured_render_time_cpu` and :ref:`viewport_get_measured_render_time_gpu` will return values greater than ``0.0`` when queried with the given ``viewport``. +Sets the measurement for the given ``viewport`` RID (obtained using :ref:`Viewport.get_viewport_rid()`). Once enabled, :ref:`viewport_get_measured_render_time_cpu()` and :ref:`viewport_get_measured_render_time_gpu()` will return values greater than ``0.0`` when queried with the given ``viewport``. .. rst-class:: classref-item-separator @@ -12203,7 +12207,7 @@ Sets the viewport's parent to the viewport specified by the ``parent_viewport`` |void| **viewport_set_positional_shadow_atlas_quadrant_subdivision**\ (\ viewport\: :ref:`RID`, quadrant\: :ref:`int`, subdivision\: :ref:`int`\ ) :ref:`πŸ”—` -Sets the number of subdivisions to use in the specified shadow atlas ``quadrant`` for omni and spot shadows. See also :ref:`Viewport.set_positional_shadow_atlas_quadrant_subdiv`. +Sets the number of subdivisions to use in the specified shadow atlas ``quadrant`` for omni and spot shadows. See also :ref:`Viewport.set_positional_shadow_atlas_quadrant_subdiv()`. .. rst-class:: classref-item-separator @@ -12479,9 +12483,9 @@ If set to :ref:`VIEWPORT_VRS_UPDATE_ONCE` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. -To place in a scene, attach this notifier to an instance using :ref:`instance_set_base` using the returned RID. +To place in a scene, attach this notifier to an instance using :ref:`instance_set_base()` using the returned RID. \ **Note:** The equivalent node is :ref:`VisibleOnScreenNotifier3D`. @@ -12539,7 +12543,7 @@ To place in a scene, attach this notifier to an instance using :ref:`instance_se Creates a new voxel-based global illumination object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``voxel_gi_*`` RenderingServer functions. -Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid()` method. \ **Note:** The equivalent node is :ref:`VoxelGI`. @@ -12637,7 +12641,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe |void| **voxel_gi_set_baked_exposure_normalization**\ (\ voxel_gi\: :ref:`RID`, baked_exposure\: :ref:`float`\ ) :ref:`πŸ”—` -Used to inform the renderer what exposure normalization value was used while baking the voxel gi. This value will be used and modulated at run time to ensure that the voxel gi maintains a consistent level of exposure even if the scene-wide exposure normalization is changed at run time. For more information see :ref:`camera_attributes_set_exposure`. +Used to inform the renderer what exposure normalization value was used while baking the voxel gi. This value will be used and modulated at run time to ensure that the voxel gi maintains a consistent level of exposure even if the scene-wide exposure normalization is changed at run time. For more information see :ref:`camera_attributes_set_exposure()`. .. rst-class:: classref-item-separator diff --git a/classes/class_renderscenebuffersrd.rst b/classes/class_renderscenebuffersrd.rst index 81e5bac58..8be2c7311 100644 --- a/classes/class_renderscenebuffersrd.rst +++ b/classes/class_renderscenebuffersrd.rst @@ -210,7 +210,7 @@ If ``msaa`` is ``true`` and MSAA is enabled, this returns the MSAA variant of th :ref:`float` **get_fsr_sharpness**\ (\ ) |const| :ref:`πŸ”—` -Returns the FSR sharpness value used while rendering the 3D content (if :ref:`get_scaling_3d_mode` is an FSR mode). +Returns the FSR sharpness value used while rendering the 3D content (if :ref:`get_scaling_3d_mode()` is an FSR mode). .. rst-class:: classref-item-separator diff --git a/classes/class_resource.rst b/classes/class_resource.rst index c7e8a6b5c..7f923aac6 100644 --- a/classes/class_resource.rst +++ b/classes/class_resource.rst @@ -23,9 +23,9 @@ Description Resource is the base class for all Godot-specific resource types, serving primarily as data containers. Since they inherit from :ref:`RefCounted`, resources are reference-counted and freed when no longer in use. They can also be nested within other resources, and saved on disk. :ref:`PackedScene`, one of the most common :ref:`Object`\ s in a Godot project, is also a resource, uniquely capable of storing and instantiating the :ref:`Node`\ s it contains as many times as desired. -In GDScript, resources can loaded from disk by their :ref:`resource_path` using :ref:`@GDScript.load` or :ref:`@GDScript.preload`. +In GDScript, resources can loaded from disk by their :ref:`resource_path` using :ref:`@GDScript.load()` or :ref:`@GDScript.preload()`. -The engine keeps a global cache of all loaded resources, referenced by paths (see :ref:`ResourceLoader.has_cached`). A resource will be cached when loaded for the first time and removed from cache once all references are released. When a resource is cached, subsequent loads using its path will return the cached reference. +The engine keeps a global cache of all loaded resources, referenced by paths (see :ref:`ResourceLoader.has_cached()`). A resource will be cached when loaded for the first time and removed from cache once all references are released. When a resource is cached, subsequent loads using its path will return the cached reference. \ **Note:** In C#, resources will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free resources that are no longer in use. This means that unused resources will remain in memory for a while before being removed. @@ -113,7 +113,7 @@ Signals **changed**\ (\ ) :ref:`πŸ”—` -Emitted when the resource changes, usually when one of its properties is modified. See also :ref:`emit_changed`. +Emitted when the resource changes, usually when one of its properties is modified. See also :ref:`emit_changed()`. \ **Note:** This signal is not emitted automatically for properties of custom resources. If necessary, a setter needs to be created to emit the signal. @@ -127,7 +127,7 @@ Emitted when the resource changes, usually when one of its properties is modifie **setup_local_to_scene_requested**\ (\ ) :ref:`πŸ”—` -**Deprecated:** This signal is only emitted when the resource is created. Override :ref:`_setup_local_to_scene` instead. +**Deprecated:** This signal is only emitted when the resource is created. Override :ref:`_setup_local_to_scene()` instead. Emitted by a newly duplicated resource with :ref:`resource_local_to_scene` set to ``true``. @@ -151,7 +151,7 @@ Property Descriptions - |void| **set_local_to_scene**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_local_to_scene**\ (\ ) -If ``true``, the resource is duplicated for each instance of all scenes using it. At run-time, the resource can be modified in one scene without affecting other instances (see :ref:`PackedScene.instantiate`). +If ``true``, the resource is duplicated for each instance of all scenes using it. At run-time, the resource can be modified in one scene without affecting other instances (see :ref:`PackedScene.instantiate()`). \ **Note:** Changing this property at run-time has no effect on already created duplicate resources. @@ -191,7 +191,7 @@ An optional name for this resource. When defined, its value is displayed to repr The unique path to this resource. If it has been saved to disk, the value will be its filepath. If the resource is exclusively contained within a scene, the value will be the :ref:`PackedScene`'s filepath, followed by a unique identifier. -\ **Note:** Setting this property manually may fail if a resource with the same path has already been previously loaded. If necessary, use :ref:`take_over_path`. +\ **Note:** Setting this property manually may fail if a resource with the same path has already been previously loaded. If necessary, use :ref:`take_over_path()`. .. rst-class:: classref-item-separator @@ -210,7 +210,7 @@ The unique path to this resource. If it has been saved to disk, the value will b An unique identifier relative to the this resource's scene. If left empty, the ID is automatically generated when this resource is saved inside a :ref:`PackedScene`. If the resource is not inside a scene, this property is empty by default. -\ **Note:** When the :ref:`PackedScene` is saved, if multiple resources in the same scene use the same ID, only the earliest resource in the scene hierarchy keeps the original ID. The other resources are assigned new IDs from :ref:`generate_scene_unique_id`. +\ **Note:** When the :ref:`PackedScene` is saved, if multiple resources in the same scene use the same ID, only the earliest resource in the scene hierarchy keeps the original ID. The other resources are assigned new IDs from :ref:`generate_scene_unique_id()`. \ **Note:** Setting this property does not emit the :ref:`changed` signal. @@ -231,7 +231,7 @@ Method Descriptions :ref:`RID` **_get_rid**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to return a custom :ref:`RID` when :ref:`get_rid` is called. +Override this method to return a custom :ref:`RID` when :ref:`get_rid()` is called. .. rst-class:: classref-item-separator @@ -243,7 +243,7 @@ Override this method to return a custom :ref:`RID` when :ref:`get_rid |void| **_reset_state**\ (\ ) |virtual| :ref:`πŸ”—` -For resources that use a variable number of properties, either via :ref:`Object._validate_property` or :ref:`Object._get_property_list`, this method should be implemented to correctly clear the resource's state. +For resources that use a variable number of properties, either via :ref:`Object._validate_property()` or :ref:`Object._get_property_list()`, this method should be implemented to correctly clear the resource's state. .. rst-class:: classref-item-separator @@ -267,7 +267,7 @@ Sets the resource's path to ``path`` without involving the resource cache. |void| **_setup_local_to_scene**\ (\ ) |virtual| :ref:`πŸ”—` -Override this method to customize the newly duplicated resource created from :ref:`PackedScene.instantiate`, if the original's :ref:`resource_local_to_scene` is set to ``true``. +Override this method to customize the newly duplicated resource created from :ref:`PackedScene.instantiate()`, if the original's :ref:`resource_local_to_scene` is set to ``true``. \ **Example:** Set a random ``damage`` value to every local resource from an instantiated scene: @@ -302,7 +302,7 @@ If ``subresources`` is ``false``, a shallow copy is returned; nested resources w - Subresources inside :ref:`Array` and :ref:`Dictionary` properties are never duplicated. -\ **Note:** For custom resources, this method will fail if :ref:`Object._init` has been defined with required parameters. +\ **Note:** For custom resources, this method will fail if :ref:`Object._init()` has been defined with required parameters. .. rst-class:: classref-item-separator @@ -398,7 +398,7 @@ Returns ``true`` if the resource is built-in (from the engine) or ``false`` if i |void| **reset_state**\ (\ ) :ref:`πŸ”—` -For resources that use a variable number of properties, either via :ref:`Object._validate_property` or :ref:`Object._get_property_list`, override :ref:`_reset_state` to correctly clear the resource's state. +For resources that use a variable number of properties, either via :ref:`Object._validate_property()` or :ref:`Object._get_property_list()`, override :ref:`_reset_state()` to correctly clear the resource's state. .. rst-class:: classref-item-separator @@ -438,7 +438,7 @@ Sets the resource's path to ``path`` without involving the resource cache. **Deprecated:** This method should only be called internally. -Calls :ref:`_setup_local_to_scene`. If :ref:`resource_local_to_scene` is set to ``true``, this method is automatically called from :ref:`PackedScene.instantiate` by the newly duplicated resource within the scene instance. +Calls :ref:`_setup_local_to_scene()`. If :ref:`resource_local_to_scene` is set to ``true``, this method is automatically called from :ref:`PackedScene.instantiate()` by the newly duplicated resource within the scene instance. .. rst-class:: classref-item-separator diff --git a/classes/class_resourceformatloader.rst b/classes/class_resourceformatloader.rst index 57d607686..bbe74530b 100644 --- a/classes/class_resourceformatloader.rst +++ b/classes/class_resourceformatloader.rst @@ -249,7 +249,7 @@ The ``cache_mode`` property defines whether and how the cache should be used or Tells whether or not this loader should load a resource from its resource path for a given type. -If it is not implemented, the default behavior returns whether the path's extension is within the ones provided by :ref:`_get_recognized_extensions`, and if the type is within the ones provided by :ref:`_get_resource_type`. +If it is not implemented, the default behavior returns whether the path's extension is within the ones provided by :ref:`_get_recognized_extensions()`, and if the type is within the ones provided by :ref:`_get_resource_type()`. .. rst-class:: classref-item-separator diff --git a/classes/class_resourceformatsaver.rst b/classes/class_resourceformatsaver.rst index c78825a92..47f8e6766 100644 --- a/classes/class_resourceformatsaver.rst +++ b/classes/class_resourceformatsaver.rst @@ -58,7 +58,7 @@ Method Descriptions :ref:`PackedStringArray` **_get_recognized_extensions**\ (\ resource\: :ref:`Resource`\ ) |virtual| |const| :ref:`πŸ”—` -Returns the list of extensions available for saving the resource object, provided it is recognized (see :ref:`_recognize`). +Returns the list of extensions available for saving the resource object, provided it is recognized (see :ref:`_recognize()`). .. rst-class:: classref-item-separator @@ -84,7 +84,7 @@ Returns whether the given resource object can be saved by this saver. Returns ``true`` if this saver handles a given save path and ``false`` otherwise. -If this method is not implemented, the default behavior returns whether the path's extension is within the ones provided by :ref:`_get_recognized_extensions`. +If this method is not implemented, the default behavior returns whether the path's extension is within the ones provided by :ref:`_get_recognized_extensions()`. .. rst-class:: classref-item-separator diff --git a/classes/class_resourceimporteroggvorbis.rst b/classes/class_resourceimporteroggvorbis.rst index a3e9feeb1..ec0f9f97a 100644 --- a/classes/class_resourceimporteroggvorbis.rst +++ b/classes/class_resourceimporteroggvorbis.rst @@ -158,7 +158,7 @@ Method Descriptions :ref:`AudioStreamOggVorbis` **load_from_buffer**\ (\ stream_data\: :ref:`PackedByteArray`\ ) |static| :ref:`πŸ”—` -**Deprecated:** Use :ref:`AudioStreamOggVorbis.load_from_buffer` instead. +**Deprecated:** Use :ref:`AudioStreamOggVorbis.load_from_buffer()` instead. Creates a new :ref:`AudioStreamOggVorbis` instance from the given buffer. The buffer must contain Ogg Vorbis data. @@ -172,7 +172,7 @@ Creates a new :ref:`AudioStreamOggVorbis` instance f :ref:`AudioStreamOggVorbis` **load_from_file**\ (\ path\: :ref:`String`\ ) |static| :ref:`πŸ”—` -**Deprecated:** Use :ref:`AudioStreamOggVorbis.load_from_file` instead. +**Deprecated:** Use :ref:`AudioStreamOggVorbis.load_from_file()` instead. Creates a new :ref:`AudioStreamOggVorbis` instance from the given file path. The file must be in Ogg Vorbis format. diff --git a/classes/class_resourceimporterscene.rst b/classes/class_resourceimporterscene.rst index 2ec10e2bf..ed8394e85 100644 --- a/classes/class_resourceimporterscene.rst +++ b/classes/class_resourceimporterscene.rst @@ -133,7 +133,7 @@ If ``true``, import animations from the 3D scene. :ref:`bool` **animation/import_rest_as_RESET** = ``false`` :ref:`πŸ”—` -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. +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 diff --git a/classes/class_resourceloader.rst b/classes/class_resourceloader.rst index e5b6e66aa..16ef7cc4e 100644 --- a/classes/class_resourceloader.rst +++ b/classes/class_resourceloader.rst @@ -23,7 +23,7 @@ A singleton used to load resource files from the filesystem. It uses the many :ref:`ResourceFormatLoader` classes registered in the engine (either built-in or from a plugin) to load files into memory and convert them to a format that can be used by the engine. -\ **Note:** You have to import the files into the engine first to load them using :ref:`load`. If you want to load :ref:`Image`\ s at run-time, you may use :ref:`Image.load`. If you want to import audio files, you can use the snippet described in :ref:`AudioStreamMP3.data`. +\ **Note:** You have to import the files into the engine first to load them using :ref:`load()`. If you want to load :ref:`Image`\ s at run-time, you may use :ref:`Image.load()`. If you want to import audio files, you can use the snippet described in :ref:`AudioStreamMP3.data`. \ **Note:** Non-resource files such as plain text files cannot be read using **ResourceLoader**. Use :ref:`FileAccess` for those files instead, and be aware that non-resource files are not exported by default (see notes in the :ref:`FileAccess` class description for instructions on exporting them). @@ -93,7 +93,7 @@ enum **ThreadLoadStatus**: :ref:`πŸ”—` :ref:`ThreadLoadStatus` **THREAD_LOAD_INVALID_RESOURCE** = ``0`` -The resource is invalid, or has not been loaded with :ref:`load_threaded_request`. +The resource is invalid, or has not been loaded with :ref:`load_threaded_request()`. .. _class_ResourceLoader_constant_THREAD_LOAD_IN_PROGRESS: @@ -117,7 +117,7 @@ Some error occurred during loading and it failed. :ref:`ThreadLoadStatus` **THREAD_LOAD_LOADED** = ``3`` -The resource was loaded successfully and can be accessed via :ref:`load_threaded_get`. +The resource was loaded successfully and can be accessed via :ref:`load_threaded_get()`. .. rst-class:: classref-item-separator @@ -184,7 +184,7 @@ Method Descriptions |void| **add_resource_format_loader**\ (\ format_loader\: :ref:`ResourceFormatLoader`, at_front\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Registers a new :ref:`ResourceFormatLoader`. The ResourceLoader will use the ResourceFormatLoader as described in :ref:`load`. +Registers a new :ref:`ResourceFormatLoader`. The ResourceLoader will use the ResourceFormatLoader as described in :ref:`load()`. This method is performed implicitly for ResourceFormatLoaders written in GDScript (see :ref:`ResourceFormatLoader` for more information). @@ -202,7 +202,7 @@ Returns whether a recognized resource exists for the given ``path``. An optional ``type_hint`` can be used to further specify the :ref:`Resource` type that should be handled by the :ref:`ResourceFormatLoader`. Anything that inherits from :ref:`Resource` can be used as a type hint, for example :ref:`Image`. -\ **Note:** If you use :ref:`Resource.take_over_path`, this method will return ``true`` for the taken path even if the resource wasn't saved (i.e. exists only in resource cache). +\ **Note:** If you use :ref:`Resource.take_over_path()`, this method will return ``true`` for the taken path even if the resource wasn't saved (i.e. exists only in resource cache). .. rst-class:: classref-item-separator @@ -230,7 +230,7 @@ Returns the cached resource reference for the given ``path``. Returns the dependencies for the resource at the given ``path``. -\ **Note:** The dependencies are returned with slices separated by ``::``. You can use :ref:`String.get_slice` to get their components. +\ **Note:** The dependencies are returned with slices separated by ``::``. You can use :ref:`String.get_slice()` to get their components. :: @@ -274,7 +274,7 @@ Returns the ID associated with a given resource path, or ``-1`` when no such ID Returns whether a cached resource is available for the given ``path``. -Once a resource has been loaded by the engine, it is cached in memory for faster access, and future calls to the :ref:`load` method will use the cached version. The cached resource can be overridden by using :ref:`Resource.take_over_path` on a new resource for that same path. +Once a resource has been loaded by the engine, it is cached in memory for faster access, and future calls to the :ref:`load()` method will use the cached version. The cached resource can be overridden by using :ref:`Resource.take_over_path()` on a new resource for that same path. .. rst-class:: classref-item-separator @@ -308,9 +308,9 @@ The ``cache_mode`` property defines whether and how the cache should be used or Returns an empty resource if no :ref:`ResourceFormatLoader` could handle the file, and prints an error if no file is found at the specified path. -GDScript has a simplified :ref:`@GDScript.load` built-in method which can be used in most situations, leaving the use of **ResourceLoader** for more advanced scenarios. +GDScript has a simplified :ref:`@GDScript.load()` built-in method which can be used in most situations, leaving the use of **ResourceLoader** for more advanced scenarios. -\ **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:** 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. @@ -324,9 +324,9 @@ GDScript has a simplified :ref:`@GDScript.load` bui :ref:`Resource` **load_threaded_get**\ (\ path\: :ref:`String`\ ) :ref:`πŸ”—` -Returns the resource loaded by :ref:`load_threaded_request`. +Returns the resource loaded by :ref:`load_threaded_request()`. -If this is called before the loading thread is done (i.e. :ref:`load_threaded_get_status` is not :ref:`THREAD_LOAD_LOADED`), the calling thread will be blocked until the resource has finished loading. However, it's recommended to use :ref:`load_threaded_get_status` to known when the load has actually completed. +If this is called before the loading thread is done (i.e. :ref:`load_threaded_get_status()` is not :ref:`THREAD_LOAD_LOADED`), the calling thread will be blocked until the resource has finished loading. However, it's recommended to use :ref:`load_threaded_get_status()` to known when the load has actually completed. .. rst-class:: classref-item-separator @@ -338,11 +338,11 @@ If this is called before the loading thread is done (i.e. :ref:`load_threaded_ge :ref:`ThreadLoadStatus` **load_threaded_get_status**\ (\ path\: :ref:`String`, progress\: :ref:`Array` = []\ ) :ref:`πŸ”—` -Returns the status of a threaded loading operation started with :ref:`load_threaded_request` for the resource at ``path``. See :ref:`ThreadLoadStatus` for possible return values. +Returns the status of a threaded loading operation started with :ref:`load_threaded_request()` for the resource at ``path``. See :ref:`ThreadLoadStatus` for possible return values. An array variable can optionally be passed via ``progress``, and will return a one-element array containing the ratio of completion of the threaded loading (between ``0.0`` and ``1.0``). -\ **Note:** The recommended way of using this method is to call it during different frames (e.g., in :ref:`Node._process`, instead of a loop). +\ **Note:** The recommended way of using this method is to call it during different frames (e.g., in :ref:`Node._process()`, instead of a loop). .. rst-class:: classref-item-separator diff --git a/classes/class_resourcepreloader.rst b/classes/class_resourcepreloader.rst index ea1aad522..f8310835f 100644 --- a/classes/class_resourcepreloader.rst +++ b/classes/class_resourcepreloader.rst @@ -21,7 +21,7 @@ Description This node is used to preload sub-resources inside a scene, so when the scene is loaded, all the resources are ready to use and can be retrieved from the preloader. You can add the resources using the ResourcePreloader tab when the node is selected. -GDScript has a simplified :ref:`@GDScript.preload` built-in method which can be used in most situations, leaving the use of **ResourcePreloader** for more advanced scenarios. +GDScript has a simplified :ref:`@GDScript.preload()` built-in method which can be used in most situations, leaving the use of **ResourcePreloader** for more advanced scenarios. .. rst-class:: classref-reftable-group diff --git a/classes/class_resourcesaver.rst b/classes/class_resourcesaver.rst index 5cae353d2..4855a2530 100644 --- a/classes/class_resourcesaver.rst +++ b/classes/class_resourcesaver.rst @@ -120,7 +120,7 @@ Compress the resource on save using :ref:`FileAccess.COMPRESSION_ZSTD` **FLAG_REPLACE_SUBRESOURCE_PATHS** = ``64`` -Take over the paths of the saved subresources (see :ref:`Resource.take_over_path`). +Take over the paths of the saved subresources (see :ref:`Resource.take_over_path()`). .. rst-class:: classref-section-separator @@ -137,7 +137,7 @@ Method Descriptions |void| **add_resource_format_saver**\ (\ format_saver\: :ref:`ResourceFormatSaver`, at_front\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Registers a new :ref:`ResourceFormatSaver`. The ResourceSaver will use the ResourceFormatSaver as described in :ref:`save`. +Registers a new :ref:`ResourceFormatSaver`. The ResourceSaver will use the ResourceFormatSaver as described in :ref:`save()`. This method is performed implicitly for ResourceFormatSavers written in GDScript (see :ref:`ResourceFormatSaver` for more information). diff --git a/classes/class_resourceuid.rst b/classes/class_resourceuid.rst index 47a1cf2a7..d379bd72a 100644 --- a/classes/class_resourceuid.rst +++ b/classes/class_resourceuid.rst @@ -85,7 +85,7 @@ Method Descriptions Adds a new UID value which is mapped to the given resource path. -Fails with an error if the UID already exists, so be sure to check :ref:`has_id` beforehand, or use :ref:`set_id` instead. +Fails with an error if the UID already exists, so be sure to check :ref:`has_id()` beforehand, or use :ref:`set_id()` instead. .. rst-class:: classref-item-separator @@ -99,7 +99,7 @@ Fails with an error if the UID already exists, so be sure to check :ref:`has_id< Generates a random resource UID which is guaranteed to be unique within the list of currently loaded UIDs. -In order for this UID to be registered, you must call :ref:`add_id` or :ref:`set_id`. +In order for this UID to be registered, you must call :ref:`add_id()` or :ref:`set_id()`. .. rst-class:: classref-item-separator @@ -113,7 +113,7 @@ In order for this UID to be registered, you must call :ref:`add_id` beforehand. +Fails with an error if the UID does not exist, so be sure to check :ref:`has_id()` beforehand. .. rst-class:: classref-item-separator @@ -151,7 +151,7 @@ Converts the given UID to a ``uid://`` string value. Removes a loaded UID value from the cache. -Fails with an error if the UID does not exist, so be sure to check :ref:`has_id` beforehand. +Fails with an error if the UID does not exist, so be sure to check :ref:`has_id()` beforehand. .. rst-class:: classref-item-separator @@ -165,7 +165,7 @@ Fails with an error if the UID does not exist, so be sure to check :ref:`has_id< Updates the resource path of an existing UID. -Fails with an error if the UID does not exist, so be sure to check :ref:`has_id` beforehand, or use :ref:`add_id` instead. +Fails with an error if the UID does not exist, so be sure to check :ref:`has_id()` beforehand, or use :ref:`add_id()` instead. .. rst-class:: classref-item-separator diff --git a/classes/class_richtexteffect.rst b/classes/class_richtexteffect.rst index 10be3363c..50e966c24 100644 --- a/classes/class_richtexteffect.rst +++ b/classes/class_richtexteffect.rst @@ -19,7 +19,7 @@ A custom effect for a :ref:`RichTextLabel`. Description ----------- -A custom effect for a :ref:`RichTextLabel`, which can be loaded in the :ref:`RichTextLabel` inspector or using :ref:`RichTextLabel.install_effect`. +A custom effect for a :ref:`RichTextLabel`, which can be loaded in the :ref:`RichTextLabel` inspector or using :ref:`RichTextLabel.install_effect()`. \ **Note:** For a **RichTextEffect** to be usable, a BBCode tag must be defined as a member variable called ``bbcode`` in the script. diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index 34dfdd83f..c461a1d68 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -21,9 +21,9 @@ Description A control for displaying text that can contain custom fonts, images, and basic formatting. **RichTextLabel** manages these as an internal tag stack. It also adapts itself to given width/heights. -\ **Note:** :ref:`newline`, :ref:`push_paragraph`, ``"\n"``, ``"\r\n"``, ``p`` tag, and alignment tags start a new paragraph. Each paragraph is processed independently, in its own BiDi context. If you want to force line wrapping within paragraph, any other line breaking character can be used, for example, Form Feed (U+000C), Next Line (U+0085), Line Separator (U+2028). +\ **Note:** :ref:`newline()`, :ref:`push_paragraph()`, ``"\n"``, ``"\r\n"``, ``p`` tag, and alignment tags start a new paragraph. Each paragraph is processed independently, in its own BiDi context. If you want to force line wrapping within paragraph, any other line breaking character can be used, for example, Form Feed (U+000C), Next Line (U+0085), Line Separator (U+2028). -\ **Note:** Assignments to :ref:`text` clear the tag stack and reconstruct it from the property's contents. Any edits made to :ref:`text` will erase previous edits made from other manual sources such as :ref:`append_text` and the ``push_*`` / :ref:`pop` methods. +\ **Note:** Assignments to :ref:`text` clear the tag stack and reconstruct it from the property's contents. Any edits made to :ref:`text` will erase previous edits made from other manual sources such as :ref:`append_text()` and the ``push_*`` / :ref:`pop()` methods. \ **Note:** RichTextLabel doesn't support entangled BBCode tags. For example, instead of using ``[b]bold[i]bold italic[/b]italic[/i]``, use ``[b]bold[i]bold italic[/i][/b][i]italic[/i]``. @@ -361,7 +361,7 @@ Triggered when the document is fully loaded. **meta_clicked**\ (\ meta\: :ref:`Variant`\ ) :ref:`πŸ”—` -Triggered when the user clicks on content between meta (URL) tags. If the meta is defined in BBCode, e.g. ``[url={"key": "value"}]Text[/url]``, then the parameter for this signal will always be a :ref:`String` type. If a particular type or an object is desired, the :ref:`push_meta` method must be used to manually insert the data into the tag stack. Alternatively, you can convert the :ref:`String` input to the desired type based on its contents (such as calling :ref:`JSON.parse` on it). +Triggered when the user clicks on content between meta (URL) tags. If the meta is defined in BBCode, e.g. ``[url={"key": "value"}]Text[/url]``, then the parameter for this signal will always be a :ref:`String` type. If a particular type or an object is desired, the :ref:`push_meta()` method must be used to manually insert the data into the tag stack. Alternatively, you can convert the :ref:`String` input to the desired type based on its contents (such as calling :ref:`JSON.parse()` on it). For example, the following method can be connected to :ref:`meta_clicked` to open clicked URLs using the user's default web browser: @@ -533,7 +533,7 @@ flags **ImageUpdateMask**: :ref:`πŸ”—` :ref:`ImageUpdateMask` **UPDATE_TEXTURE** = ``1`` -If this bit is set, :ref:`update_image` changes image texture. +If this bit is set, :ref:`update_image()` changes image texture. .. _class_RichTextLabel_constant_UPDATE_SIZE: @@ -541,7 +541,7 @@ If this bit is set, :ref:`update_image` :ref:`ImageUpdateMask` **UPDATE_SIZE** = ``2`` -If this bit is set, :ref:`update_image` changes image size. +If this bit is set, :ref:`update_image()` changes image size. .. _class_RichTextLabel_constant_UPDATE_COLOR: @@ -549,7 +549,7 @@ If this bit is set, :ref:`update_image` :ref:`ImageUpdateMask` **UPDATE_COLOR** = ``4`` -If this bit is set, :ref:`update_image` changes image color. +If this bit is set, :ref:`update_image()` changes image color. .. _class_RichTextLabel_constant_UPDATE_ALIGNMENT: @@ -557,7 +557,7 @@ If this bit is set, :ref:`update_image` :ref:`ImageUpdateMask` **UPDATE_ALIGNMENT** = ``8`` -If this bit is set, :ref:`update_image` changes image inline alignment. +If this bit is set, :ref:`update_image()` changes image inline alignment. .. _class_RichTextLabel_constant_UPDATE_REGION: @@ -565,7 +565,7 @@ If this bit is set, :ref:`update_image` :ref:`ImageUpdateMask` **UPDATE_REGION** = ``16`` -If this bit is set, :ref:`update_image` changes image texture region. +If this bit is set, :ref:`update_image()` changes image texture region. .. _class_RichTextLabel_constant_UPDATE_PAD: @@ -573,7 +573,7 @@ If this bit is set, :ref:`update_image` :ref:`ImageUpdateMask` **UPDATE_PAD** = ``32`` -If this bit is set, :ref:`update_image` changes image padding. +If this bit is set, :ref:`update_image()` changes image padding. .. _class_RichTextLabel_constant_UPDATE_TOOLTIP: @@ -581,7 +581,7 @@ If this bit is set, :ref:`update_image` :ref:`ImageUpdateMask` **UPDATE_TOOLTIP** = ``64`` -If this bit is set, :ref:`update_image` changes image tooltip. +If this bit is set, :ref:`update_image()` changes image tooltip. .. _class_RichTextLabel_constant_UPDATE_WIDTH_IN_PERCENT: @@ -589,7 +589,7 @@ If this bit is set, :ref:`update_image` :ref:`ImageUpdateMask` **UPDATE_WIDTH_IN_PERCENT** = ``128`` -If this bit is set, :ref:`update_image` changes image width from/to percents. +If this bit is set, :ref:`update_image()` changes image width from/to percents. .. rst-class:: classref-section-separator @@ -666,7 +666,7 @@ If ``true``, a right-click displays the context menu. The currently installed custom effects. This is an array of :ref:`RichTextEffect`\ s. -To add a custom effect, it's more convenient to use :ref:`install_effect`. +To add a custom effect, it's more convenient to use :ref:`install_effect()`. .. rst-class:: classref-item-separator @@ -838,7 +838,7 @@ The delay after which the loading progress bar is displayed, in milliseconds. Se - |void| **set_scroll_active**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_scroll_active**\ (\ ) -If ``true``, the scrollbar is visible. Setting this to ``false`` does not block scrolling completely. See :ref:`scroll_to_line`. +If ``true``, the scrollbar is visible. Setting this to ``false`` does not block scrolling completely. See :ref:`scroll_to_line()`. .. rst-class:: classref-item-separator @@ -978,7 +978,7 @@ Aligns text to the given tab-stops. The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited. -\ **Note:** If :ref:`bbcode_enabled` is ``true``, it is unadvised to use the ``+=`` operator with :ref:`text` (e.g. ``text += "some string"``) as it replaces the whole text and can cause slowdowns. It will also erase all BBCode that was added to stack using ``push_*`` methods. Use :ref:`append_text` for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call. +\ **Note:** If :ref:`bbcode_enabled` is ``true``, it is unadvised to use the ``+=`` operator with :ref:`text` (e.g. ``text += "some string"``) as it replaces the whole text and can cause slowdowns. It will also erase all BBCode that was added to stack using ``push_*`` methods. Use :ref:`append_text()` for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call. .. rst-class:: classref-item-separator @@ -1082,7 +1082,7 @@ Sets the clipping behavior when :ref:`visible_characters`\ ) - :ref:`float` **get_visible_ratio**\ (\ ) -The fraction of characters to display, relative to the total number of characters (see :ref:`get_total_character_count`). If set to ``1.0``, all characters are displayed. If set to ``0.5``, only half of the characters will be displayed. This can be useful when animating the text appearing in a dialog box. +The fraction of characters to display, relative to the total number of characters (see :ref:`get_total_character_count()`). If set to ``1.0``, all characters are displayed. If set to ``0.5``, only half of the characters will be displayed. This can be useful when animating the text appearing in a dialog box. \ **Note:** Setting this property updates :ref:`visible_characters` accordingly. @@ -1107,7 +1107,7 @@ If ``width`` or ``height`` is set to 0, the image size will be adjusted in order If ``width`` and ``height`` are not set, but ``region`` is, the region's rect will be used. -\ ``key`` is an optional identifier, that can be used to modify the image via :ref:`update_image`. +\ ``key`` is an optional identifier, that can be used to modify the image via :ref:`update_image()`. If ``pad`` is set, and the image is smaller than the size specified by ``width`` and ``height``, the image padding is added to match the size instead of upscaling. @@ -1137,7 +1137,7 @@ Adds raw non-BBCode-parsed text to the tag stack. Parses ``bbcode`` and adds tags to the tag stack as needed. -\ **Note:** Using this method, you can't close a tag that was opened in a previous :ref:`append_text` call. This is done to improve performance, especially when updating large RichTextLabels since rebuilding the whole BBCode every time would be slower. If you absolutely need to close a tag in a future method call, append the :ref:`text` instead of using :ref:`append_text`. +\ **Note:** Using this method, you can't close a tag that was opened in a previous :ref:`append_text()` call. This is done to improve performance, especially when updating large RichTextLabels since rebuilding the whole BBCode every time would be slower. If you absolutely need to close a tag in a future method call, append the :ref:`text` instead of using :ref:`append_text()`. .. rst-class:: classref-item-separator @@ -1177,7 +1177,7 @@ Clears the current selection. Returns the line number of the character position provided. Line and character numbers are both zero-indexed. -\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished` or :ref:`finished` to determine whether document is fully loaded. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished()` or :ref:`finished` to determine whether document is fully loaded. .. rst-class:: classref-item-separator @@ -1191,7 +1191,7 @@ Returns the line number of the character position provided. Line and character n Returns the paragraph number of the character position provided. Paragraph and character numbers are both zero-indexed. -\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished` or :ref:`finished` to determine whether document is fully loaded. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished()` or :ref:`finished` to determine whether document is fully loaded. .. rst-class:: classref-item-separator @@ -1205,7 +1205,7 @@ Returns the paragraph number of the character position provided. Paragraph and c Returns the height of the content. -\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished` or :ref:`finished` to determine whether document is fully loaded. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished()` or :ref:`finished` to determine whether document is fully loaded. .. rst-class:: classref-item-separator @@ -1219,7 +1219,7 @@ Returns the height of the content. Returns the width of the content. -\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished` or :ref:`finished` to determine whether document is fully loaded. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished()` or :ref:`finished` to determine whether document is fully loaded. .. rst-class:: classref-item-separator @@ -1235,7 +1235,7 @@ Returns the total number of lines in the text. Wrapped text is counted as multip \ **Note:** If :ref:`visible_characters_behavior` is set to :ref:`TextServer.VC_CHARS_BEFORE_SHAPING` only visible wrapped lines are counted. -\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished` or :ref:`finished` to determine whether document is fully loaded. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished()` or :ref:`finished` to determine whether document is fully loaded. .. rst-class:: classref-item-separator @@ -1249,7 +1249,7 @@ Returns the total number of lines in the text. Wrapped text is counted as multip Returns the vertical offset of the line found at the provided index. -\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished` or :ref:`finished` to determine whether document is fully loaded. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished()` or :ref:`finished` to determine whether document is fully loaded. .. rst-class:: classref-item-separator @@ -1265,7 +1265,7 @@ Returns the indexes of the first and last visible characters for the given ``lin \ **Note:** If :ref:`visible_characters_behavior` is set to :ref:`TextServer.VC_CHARS_BEFORE_SHAPING` only visible wrapped lines are counted. -\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished` or :ref:`finished` to determine whether document is fully loaded. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished()` or :ref:`finished` to determine whether document is fully loaded. .. rst-class:: classref-item-separator @@ -1350,7 +1350,7 @@ Returns the total number of paragraphs (newlines or ``p`` tags in the tag stack' Returns the vertical offset of the paragraph found at the provided index. -\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished` or :ref:`finished` to determine whether document is fully loaded. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished()` or :ref:`finished` to determine whether document is fully loaded. .. rst-class:: classref-item-separator @@ -1450,7 +1450,7 @@ Returns the vertical scrollbar. Returns the number of visible lines. -\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished` or :ref:`finished` to determine whether document is fully loaded. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished()` or :ref:`finished` to determine whether document is fully loaded. .. rst-class:: classref-item-separator @@ -1464,7 +1464,7 @@ Returns the number of visible lines. Returns the number of visible paragraphs. A paragraph is considered visible if at least one of its lines is visible. -\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished` or :ref:`finished` to determine whether document is fully loaded. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished()` or :ref:`finished` to determine whether document is fully loaded. .. rst-class:: classref-item-separator @@ -1549,7 +1549,7 @@ Returns whether the menu is visible. Use this instead of ``get_menu().visible`` :ref:`bool` **is_ready**\ (\ ) |const| :ref:`πŸ”—` -**Deprecated:** Use :ref:`is_finished` instead. +**Deprecated:** Use :ref:`is_finished()` instead. If :ref:`threaded` is enabled, returns ``true`` if the background thread has finished text processing, otherwise always return ``true``. @@ -1587,7 +1587,7 @@ Adds a newline tag to the tag stack. |void| **parse_bbcode**\ (\ bbcode\: :ref:`String`\ ) :ref:`πŸ”—` -The assignment version of :ref:`append_text`. Clears the tag stack and inserts the new content. +The assignment version of :ref:`append_text()`. Clears the tag stack and inserts the new content. .. rst-class:: classref-item-separator @@ -1635,7 +1635,7 @@ Terminates all tags opened by ``push_*`` methods. |void| **pop_context**\ (\ ) :ref:`πŸ”—` -Terminates tags opened after the last :ref:`push_context` call (including context marker), or all tags if there's no context marker on the stack. +Terminates tags opened after the last :ref:`push_context()` call (including context marker), or all tags if there's no context marker on the stack. .. rst-class:: classref-item-separator @@ -1683,7 +1683,7 @@ Adds a ``[font]`` tag with a bold italics font to the tag stack. |void| **push_cell**\ (\ ) :ref:`πŸ”—` -Adds a ``[cell]`` tag to the tag stack. Must be inside a ``[table]`` tag. See :ref:`push_table` for details. Use :ref:`set_table_column_expand` to set column expansion ratio, :ref:`set_cell_border_color` to set cell border, :ref:`set_cell_row_background_color` to set cell background, :ref:`set_cell_size_override` to override cell size, and :ref:`set_cell_padding` to set padding. +Adds a ``[cell]`` tag to the tag stack. Must be inside a ``[table]`` tag. See :ref:`push_table()` for details. Use :ref:`set_table_column_expand()` to set column expansion ratio, :ref:`set_cell_border_color()` to set cell border, :ref:`set_cell_row_background_color()` to set cell background, :ref:`set_cell_size_override()` to override cell size, and :ref:`set_cell_padding()` to set padding. .. rst-class:: classref-item-separator @@ -1707,7 +1707,7 @@ Adds a ``[color]`` tag to the tag stack. |void| **push_context**\ (\ ) :ref:`πŸ”—` -Adds a context marker to the tag stack. See :ref:`pop_context`. +Adds a context marker to the tag stack. See :ref:`pop_context()`. .. rst-class:: classref-item-separator @@ -1929,7 +1929,7 @@ Adds a ``[s]`` tag to the tag stack. |void| **push_table**\ (\ columns\: :ref:`int`, inline_align\: :ref:`InlineAlignment` = 0, align_to_row\: :ref:`int` = -1\ ) :ref:`πŸ”—` -Adds a ``[table=columns,inline_align]`` tag to the tag stack. Use :ref:`set_table_column_expand` to set column expansion ratio. Use :ref:`push_cell` to add cells. +Adds a ``[table=columns,inline_align]`` tag to the tag stack. Use :ref:`set_table_column_expand()` to set column expansion ratio. Use :ref:`push_cell()` to add cells. .. rst-class:: classref-item-separator @@ -1957,7 +1957,7 @@ Removes a paragraph of content from the label. Returns ``true`` if the paragraph The ``paragraph`` argument is the index of the paragraph to remove, it can take values in the interval ``[0, get_paragraph_count() - 1]``. -If ``no_invalidate`` is set to ``true``, cache for the subsequent paragraphs is not invalidated. Use it for faster updates if deleted paragraph is fully self-contained (have no unclosed tags), or this call is part of the complex edit operation and :ref:`invalidate_paragraph` will be called at the end of operation. +If ``no_invalidate`` is set to ``true``, cache for the subsequent paragraphs is not invalidated. Use it for faster updates if deleted paragraph is fully self-contained (have no unclosed tags), or this call is part of the complex edit operation and :ref:`invalidate_paragraph()` will be called at the end of operation. .. rst-class:: classref-item-separator @@ -2083,7 +2083,7 @@ If ``expand`` is ``false``, the column will not contribute to the total ratio. |void| **update_image**\ (\ key\: :ref:`Variant`, mask\: |bitfield|\[:ref:`ImageUpdateMask`\], image\: :ref:`Texture2D`, width\: :ref:`int` = 0, height\: :ref:`int` = 0, color\: :ref:`Color` = Color(1, 1, 1, 1), inline_align\: :ref:`InlineAlignment` = 5, region\: :ref:`Rect2` = Rect2(0, 0, 0, 0), pad\: :ref:`bool` = false, tooltip\: :ref:`String` = "", size_in_percent\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Updates the existing images with the key ``key``. Only properties specified by ``mask`` bits are updated. See :ref:`add_image`. +Updates the existing images with the key ``key``. Only properties specified by ``mask`` bits are updated. See :ref:`add_image()`. .. rst-class:: classref-section-separator diff --git a/classes/class_rigidbody2d.rst b/classes/class_rigidbody2d.rst index d35a92116..06d6db404 100644 --- a/classes/class_rigidbody2d.rst +++ b/classes/class_rigidbody2d.rst @@ -29,7 +29,7 @@ A rigid body will always maintain its shape and size, even when forces are appli If you need to override the default physics behavior, you can write a custom force integration function. See :ref:`custom_integrator`. -\ **Note:** Changing the 2D transform or :ref:`linear_velocity` of a **RigidBody2D** very often may lead to some unpredictable behaviors. If you need to directly affect the body, prefer :ref:`_integrate_forces` as it allows you to directly access the physics state. +\ **Note:** Changing the 2D transform or :ref:`linear_velocity` of a **RigidBody2D** very often may lead to some unpredictable behaviors. If you need to directly affect the body, prefer :ref:`_integrate_forces()` as it allows you to directly access the physics state. .. rst-class:: classref-introduction-group @@ -464,7 +464,7 @@ Defines the way the body's center of mass is set. See :ref:`CenterOfMassMode` and :ref:`add_constant_central_force`. +See :ref:`add_constant_force()` and :ref:`add_constant_central_force()`. .. rst-class:: classref-item-separator @@ -483,7 +483,7 @@ See :ref:`add_constant_force` and : The body's total constant rotational forces applied during each physics update. -See :ref:`add_constant_torque`. +See :ref:`add_constant_torque()`. .. rst-class:: classref-item-separator @@ -538,9 +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``, 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. +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. +Setting this property will call the method :ref:`PhysicsServer2D.body_set_omit_force_integration()` internally. .. rst-class:: classref-item-separator @@ -697,7 +697,7 @@ Defines how :ref:`linear_damp` is applie - |void| **set_linear_velocity**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_linear_velocity**\ (\ ) -The body's linear velocity in pixels per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces` as your process loop for precise control of the body state. +The body's linear velocity in pixels per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces()` as your process loop for precise control of the body state. .. rst-class:: classref-item-separator @@ -748,7 +748,7 @@ The body's mass. - |void| **set_max_contacts_reported**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_max_contacts_reported**\ (\ ) -The maximum number of contacts that will be recorded. Requires a value greater than 0 and :ref:`contact_monitor` to be set to ``true`` to start to register contacts. Use :ref:`get_contact_count` to retrieve the count or :ref:`get_colliding_bodies` to retrieve bodies that have been collided with. +The maximum number of contacts that will be recorded. Requires a value greater than 0 and :ref:`contact_monitor` to be set to ``true`` to start to register contacts. Use :ref:`get_contact_count()` to retrieve the count or :ref:`get_colliding_bodies()` to retrieve bodies that have been collided with. \ **Note:** The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner). @@ -786,7 +786,7 @@ If a material is assigned to this property, it will be used instead of any other - |void| **set_sleeping**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_sleeping**\ (\ ) -If ``true``, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the :ref:`apply_impulse` or :ref:`apply_force` methods. +If ``true``, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the :ref:`apply_impulse()` or :ref:`apply_force()` methods. .. rst-class:: classref-section-separator @@ -817,7 +817,7 @@ Called during physics processing, allowing you to read and safely modify the sim Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with ``constant_force = Vector2(0, 0)``. -This is equivalent to using :ref:`add_constant_force` at the body's center of mass. +This is equivalent to using :ref:`add_constant_force()` at the body's center of mass. .. rst-class:: classref-item-separator @@ -857,7 +857,7 @@ Adds a constant rotational force without affecting position that keeps being app Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. -This is equivalent to using :ref:`apply_force` at the body's center of mass. +This is equivalent to using :ref:`apply_force()` at the body's center of mass. .. rst-class:: classref-item-separator @@ -873,7 +873,7 @@ Applies a directional impulse without affecting rotation. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). -This is equivalent to using :ref:`apply_impulse` at the body's center of mass. +This is equivalent to using :ref:`apply_impulse()` at the body's center of mass. .. rst-class:: classref-item-separator @@ -961,7 +961,7 @@ Returns a list of the bodies colliding with this one. Requires :ref:`contact_mon Returns the number of contacts this body has with other bodies. By default, this returns 0 unless bodies are configured to monitor contacts (see :ref:`contact_monitor`). -\ **Note:** To retrieve the colliding bodies, use :ref:`get_colliding_bodies`. +\ **Note:** To retrieve the colliding bodies, use :ref:`get_colliding_bodies()`. .. rst-class:: classref-item-separator diff --git a/classes/class_rigidbody3d.rst b/classes/class_rigidbody3d.rst index 36da3d9f2..271c98712 100644 --- a/classes/class_rigidbody3d.rst +++ b/classes/class_rigidbody3d.rst @@ -29,7 +29,7 @@ A rigid body will always maintain its shape and size, even when forces are appli If you need to override the default physics behavior, you can write a custom force integration function. See :ref:`custom_integrator`. -\ **Note:** Changing the 3D transform or :ref:`linear_velocity` of a **RigidBody3D** very often may lead to some unpredictable behaviors. If you need to directly affect the body, prefer :ref:`_integrate_forces` as it allows you to directly access the physics state. +\ **Note:** Changing the 3D transform or :ref:`linear_velocity` of a **RigidBody3D** very often may lead to some unpredictable behaviors. If you need to directly affect the body, prefer :ref:`_integrate_forces()` as it allows you to directly access the physics state. .. rst-class:: classref-introduction-group @@ -434,7 +434,7 @@ Defines the way the body's center of mass is set. See :ref:`CenterOfMassMode` and :ref:`add_constant_central_force`. +See :ref:`add_constant_force()` and :ref:`add_constant_central_force()`. .. rst-class:: classref-item-separator @@ -453,7 +453,7 @@ See :ref:`add_constant_force` and : The body's total constant rotational forces applied during each physics update. -See :ref:`add_constant_torque`. +See :ref:`add_constant_torque()`. .. rst-class:: classref-item-separator @@ -508,9 +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``, 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. +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. +Setting this property will call the method :ref:`PhysicsServer3D.body_set_omit_force_integration()` internally. .. rst-class:: classref-item-separator @@ -667,7 +667,7 @@ Defines how :ref:`linear_damp` is applie - |void| **set_linear_velocity**\ (\ value\: :ref:`Vector3`\ ) - :ref:`Vector3` **get_linear_velocity**\ (\ ) -The body's linear velocity in units per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces` as your process loop for precise control of the body state. +The body's linear velocity in units per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces()` as your process loop for precise control of the body state. .. rst-class:: classref-item-separator @@ -718,7 +718,7 @@ The body's mass. - |void| **set_max_contacts_reported**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_max_contacts_reported**\ (\ ) -The maximum number of contacts that will be recorded. Requires a value greater than 0 and :ref:`contact_monitor` to be set to ``true`` to start to register contacts. Use :ref:`get_contact_count` to retrieve the count or :ref:`get_colliding_bodies` to retrieve bodies that have been collided with. +The maximum number of contacts that will be recorded. Requires a value greater than 0 and :ref:`contact_monitor` to be set to ``true`` to start to register contacts. Use :ref:`get_contact_count()` to retrieve the count or :ref:`get_colliding_bodies()` to retrieve bodies that have been collided with. \ **Note:** The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner). @@ -756,7 +756,7 @@ If a material is assigned to this property, it will be used instead of any other - |void| **set_sleeping**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_sleeping**\ (\ ) -If ``true``, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the :ref:`apply_impulse` or :ref:`apply_force` methods. +If ``true``, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the :ref:`apply_impulse()` or :ref:`apply_force()` methods. .. rst-class:: classref-section-separator @@ -787,7 +787,7 @@ Called during physics processing, allowing you to read and safely modify the sim Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with ``constant_force = Vector3(0, 0, 0)``. -This is equivalent to using :ref:`add_constant_force` at the body's center of mass. +This is equivalent to using :ref:`add_constant_force()` at the body's center of mass. .. rst-class:: classref-item-separator @@ -827,7 +827,7 @@ Adds a constant rotational force without affecting position that keeps being app Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. -This is equivalent to using :ref:`apply_force` at the body's center of mass. +This is equivalent to using :ref:`apply_force()` at the body's center of mass. .. rst-class:: classref-item-separator @@ -843,7 +843,7 @@ Applies a directional impulse without affecting rotation. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). -This is equivalent to using :ref:`apply_impulse` at the body's center of mass. +This is equivalent to using :ref:`apply_impulse()` at the body's center of mass. .. rst-class:: classref-item-separator @@ -931,7 +931,7 @@ Returns a list of the bodies colliding with this one. Requires :ref:`contact_mon Returns the number of contacts this body has with other bodies. By default, this returns 0 unless bodies are configured to monitor contacts (see :ref:`contact_monitor`). -\ **Note:** To retrieve the colliding bodies, use :ref:`get_colliding_bodies`. +\ **Note:** To retrieve the colliding bodies, use :ref:`get_colliding_bodies()`. .. rst-class:: classref-item-separator diff --git a/classes/class_scenemultiplayer.rst b/classes/class_scenemultiplayer.rst index 683287f4d..4e82acfdc 100644 --- a/classes/class_scenemultiplayer.rst +++ b/classes/class_scenemultiplayer.rst @@ -21,7 +21,7 @@ Description This class is the default implementation of :ref:`MultiplayerAPI`, used to provide multiplayer functionalities in Godot Engine. -This implementation supports RPCs via :ref:`Node.rpc` and :ref:`Node.rpc_id` and requires :ref:`MultiplayerAPI.rpc` to be passed a :ref:`Node` (it will fail for other object types). +This implementation supports RPCs via :ref:`Node.rpc()` and :ref:`Node.rpc_id()` and requires :ref:`MultiplayerAPI.rpc()` to be passed a :ref:`Node` (it will fail for other object types). This implementation additionally provide :ref:`SceneTree` replication via the :ref:`MultiplayerSpawner` and :ref:`MultiplayerSynchronizer` nodes, and the :ref:`SceneReplicationConfig` resource. @@ -92,7 +92,7 @@ Signals **peer_authenticating**\ (\ id\: :ref:`int`\ ) :ref:`πŸ”—` -Emitted when this MultiplayerAPI's :ref:`MultiplayerAPI.multiplayer_peer` connects to a new peer and a valid :ref:`auth_callback` is set. In this case, the :ref:`MultiplayerAPI.peer_connected` will not be emitted until :ref:`complete_auth` is called with given peer ``id``. While in this state, the peer will not be included in the list returned by :ref:`MultiplayerAPI.get_peers` (but in the one returned by :ref:`get_authenticating_peers`), and only authentication data will be sent or received. See :ref:`send_auth` for sending authentication data. +Emitted when this MultiplayerAPI's :ref:`MultiplayerAPI.multiplayer_peer` connects to a new peer and a valid :ref:`auth_callback` is set. In this case, the :ref:`MultiplayerAPI.peer_connected` will not be emitted until :ref:`complete_auth()` is called with given peer ``id``. While in this state, the peer will not be included in the list returned by :ref:`MultiplayerAPI.get_peers()` (but in the one returned by :ref:`get_authenticating_peers()`), and only authentication data will be sent or received. See :ref:`send_auth()` for sending authentication data. .. rst-class:: classref-item-separator @@ -116,7 +116,7 @@ Emitted when this MultiplayerAPI's :ref:`MultiplayerAPI.multiplayer_peer`, packet\: :ref:`PackedByteArray`\ ) :ref:`πŸ”—` -Emitted when this MultiplayerAPI's :ref:`MultiplayerAPI.multiplayer_peer` receives a ``packet`` with custom data (see :ref:`send_bytes`). ID is the peer ID of the peer that sent the packet. +Emitted when this MultiplayerAPI's :ref:`MultiplayerAPI.multiplayer_peer` receives a ``packet`` with custom data (see :ref:`send_bytes()`). ID is the peer ID of the peer that sent the packet. .. rst-class:: classref-section-separator @@ -157,7 +157,7 @@ If ``true``, the MultiplayerAPI will allow encoding and decoding of object durin - |void| **set_auth_callback**\ (\ value\: :ref:`Callable`\ ) - :ref:`Callable` **get_auth_callback**\ (\ ) -The callback to execute when receiving authentication data sent via :ref:`send_auth`. If the :ref:`Callable` is empty (default), peers will be automatically accepted as soon as they connect. +The callback to execute when receiving authentication data sent via :ref:`send_auth()`. If the :ref:`Callable` is empty (default), peers will be automatically accepted as soon as they connect. .. rst-class:: classref-item-separator @@ -265,7 +265,7 @@ Enable or disable the server feature that notifies clients of other peers' conne \ **Note:** Changing this option while other peers are connected may lead to unexpected behaviors. -\ **Note:** Support for this feature may depend on the current :ref:`MultiplayerPeer` configuration. See :ref:`MultiplayerPeer.is_server_relay_supported`. +\ **Note:** Support for this feature may depend on the current :ref:`MultiplayerPeer` configuration. See :ref:`MultiplayerPeer.is_server_relay_supported()`. .. rst-class:: classref-section-separator @@ -296,7 +296,7 @@ Clears the current SceneMultiplayer network state (you shouldn't call this unles Mark the authentication step as completed for the remote peer identified by ``id``. The :ref:`MultiplayerAPI.peer_connected` signal will be emitted for this peer once the remote side also completes the authentication. No further authentication messages are expected to be received from this peer. -If a peer disconnects before completing authentication, either due to a network issue, the :ref:`auth_timeout` expiring, or manually calling :ref:`disconnect_peer`, the :ref:`peer_authentication_failed` signal will be emitted instead of :ref:`MultiplayerAPI.peer_disconnected`. +If a peer disconnects before completing authentication, either due to a network issue, the :ref:`auth_timeout` expiring, or manually calling :ref:`disconnect_peer()`, the :ref:`peer_authentication_failed` signal will be emitted instead of :ref:`MultiplayerAPI.peer_disconnected`. .. rst-class:: classref-item-separator @@ -344,7 +344,7 @@ Sends the specified ``data`` to the remote peer identified by ``id`` as part of :ref:`Error` **send_bytes**\ (\ bytes\: :ref:`PackedByteArray`, id\: :ref:`int` = 0, mode\: :ref:`TransferMode` = 2, channel\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Sends the given raw ``bytes`` to a specific peer identified by ``id`` (see :ref:`MultiplayerPeer.set_target_peer`). Default ID is ``0``, i.e. broadcast to all peers. +Sends the given raw ``bytes`` to a specific peer identified by ``id`` (see :ref:`MultiplayerPeer.set_target_peer()`). Default ID is ``0``, i.e. broadcast to all peers. .. |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_scenereplicationconfig.rst b/classes/class_scenereplicationconfig.rst index d5ea1b029..c4a2a92be 100644 --- a/classes/class_scenereplicationconfig.rst +++ b/classes/class_scenereplicationconfig.rst @@ -178,7 +178,7 @@ Returns ``true`` if the property identified by the given ``path`` is configured :ref:`bool` **property_get_sync**\ (\ path\: :ref:`NodePath`\ ) :ref:`πŸ”—` -**Deprecated:** Use :ref:`property_get_replication_mode` instead. +**Deprecated:** Use :ref:`property_get_replication_mode()` instead. Returns ``true`` if the property identified by the given ``path`` is configured to be synchronized on process. @@ -192,7 +192,7 @@ Returns ``true`` if the property identified by the given ``path`` is configured :ref:`bool` **property_get_watch**\ (\ path\: :ref:`NodePath`\ ) :ref:`πŸ”—` -**Deprecated:** Use :ref:`property_get_replication_mode` instead. +**Deprecated:** Use :ref:`property_get_replication_mode()` instead. Returns ``true`` if the property identified by the given ``path`` is configured to be reliably synchronized when changes are detected on process. @@ -230,7 +230,7 @@ Sets whether the property identified by the given ``path`` is configured to be s |void| **property_set_sync**\ (\ path\: :ref:`NodePath`, enabled\: :ref:`bool`\ ) :ref:`πŸ”—` -**Deprecated:** Use :ref:`property_set_replication_mode` with :ref:`REPLICATION_MODE_ALWAYS` instead. +**Deprecated:** Use :ref:`property_set_replication_mode()` with :ref:`REPLICATION_MODE_ALWAYS` instead. Sets whether the property identified by the given ``path`` is configured to be synchronized on process. @@ -244,7 +244,7 @@ Sets whether the property identified by the given ``path`` is configured to be s |void| **property_set_watch**\ (\ path\: :ref:`NodePath`, enabled\: :ref:`bool`\ ) :ref:`πŸ”—` -**Deprecated:** Use :ref:`property_set_replication_mode` with :ref:`REPLICATION_MODE_ON_CHANGE` instead. +**Deprecated:** Use :ref:`property_set_replication_mode()` with :ref:`REPLICATION_MODE_ON_CHANGE` instead. Sets whether the property identified by the given ``path`` is configured to be reliably synchronized when changes are detected on process. diff --git a/classes/class_scenestate.rst b/classes/class_scenestate.rst index 469bee388..28c604c31 100644 --- a/classes/class_scenestate.rst +++ b/classes/class_scenestate.rst @@ -21,7 +21,7 @@ Description Maintains a list of resources, nodes, exported and overridden properties, and built-in scripts associated with a scene. They cannot be modified from a **SceneState**, only accessed. Useful for peeking into what a :ref:`PackedScene` contains without instantiating it. -This class cannot be instantiated directly, it is retrieved for a given scene as the result of :ref:`PackedScene.get_state`. +This class cannot be instantiated directly, it is retrieved for a given scene as the result of :ref:`PackedScene.get_state()`. .. rst-class:: classref-reftable-group @@ -96,7 +96,7 @@ enum **GenEditState**: :ref:`πŸ”—` :ref:`GenEditState` **GEN_EDIT_STATE_DISABLED** = ``0`` -If passed to :ref:`PackedScene.instantiate`, blocks edits to the scene state. +If passed to :ref:`PackedScene.instantiate()`, blocks edits to the scene state. .. _class_SceneState_constant_GEN_EDIT_STATE_INSTANCE: @@ -104,7 +104,7 @@ If passed to :ref:`PackedScene.instantiate :ref:`GenEditState` **GEN_EDIT_STATE_INSTANCE** = ``1`` -If passed to :ref:`PackedScene.instantiate`, provides inherited scene resources to the local scene. +If passed to :ref:`PackedScene.instantiate()`, provides inherited scene resources to the local scene. \ **Note:** Only available in editor builds. @@ -114,7 +114,7 @@ If passed to :ref:`PackedScene.instantiate :ref:`GenEditState` **GEN_EDIT_STATE_MAIN** = ``2`` -If passed to :ref:`PackedScene.instantiate`, provides local scene resources to the local scene. Only the main scene should receive the main edit state. +If passed to :ref:`PackedScene.instantiate()`, provides local scene resources to the local scene. Only the main scene should receive the main edit state. \ **Note:** Only available in editor builds. @@ -124,7 +124,7 @@ If passed to :ref:`PackedScene.instantiate :ref:`GenEditState` **GEN_EDIT_STATE_MAIN_INHERITED** = ``3`` -If passed to :ref:`PackedScene.instantiate`, it's similar to :ref:`GEN_EDIT_STATE_MAIN`, but for the case where the scene is being instantiated to be the base of another one. +If passed to :ref:`PackedScene.instantiate()`, it's similar to :ref:`GEN_EDIT_STATE_MAIN`, but for the case where the scene is being instantiated to be the base of another one. \ **Note:** Only available in editor builds. diff --git a/classes/class_scenetree.rst b/classes/class_scenetree.rst index 3b3562a85..2dc39b5bf 100644 --- a/classes/class_scenetree.rst +++ b/classes/class_scenetree.rst @@ -149,7 +149,7 @@ Emitted when the ``node`` enters this tree. **node_configuration_warning_changed**\ (\ node\: :ref:`Node`\ ) :ref:`πŸ”—` -Emitted when the ``node``'s :ref:`Node.update_configuration_warnings` is called. Only emitted in the editor. +Emitted when the ``node``'s :ref:`Node.update_configuration_warnings()` is called. Only emitted in the editor. .. rst-class:: classref-item-separator @@ -185,7 +185,7 @@ Emitted when the ``node``'s :ref:`Node.name` is change **physics_frame**\ (\ ) :ref:`πŸ”—` -Emitted immediately before :ref:`Node._physics_process` is called on every node in this tree. +Emitted immediately before :ref:`Node._physics_process()` is called on every node in this tree. .. rst-class:: classref-item-separator @@ -197,7 +197,7 @@ Emitted immediately before :ref:`Node._physics_process` -Emitted immediately before :ref:`Node._process` is called on every node in this tree. +Emitted immediately before :ref:`Node._process()` is called on every node in this tree. .. rst-class:: classref-item-separator @@ -260,7 +260,7 @@ Call nodes within a group in reverse tree hierarchy order (all nested children a :ref:`GroupCallFlags` **GROUP_CALL_DEFERRED** = ``2`` -Call nodes within a group at the end of the current frame (can be either process or physics frame), similar to :ref:`Object.call_deferred`. +Call nodes within a group at the end of the current frame (can be either process or physics frame), similar to :ref:`Object.call_deferred()`. .. _class_SceneTree_constant_GROUP_CALL_UNIQUE: @@ -311,7 +311,7 @@ For mobile platforms, see :ref:`quit_on_go_back`\ ) - :ref:`Node` **get_current_scene**\ (\ ) -The root node of the currently loaded main scene, usually as a direct child of :ref:`root`. See also :ref:`change_scene_to_file`, :ref:`change_scene_to_packed`, and :ref:`reload_current_scene`. +The root node of the currently loaded main scene, usually as a direct child of :ref:`root`. See also :ref:`change_scene_to_file()`, :ref:`change_scene_to_packed()`, and :ref:`reload_current_scene()`. \ **Warning:** Setting this property directly may not work as expected, as it does *not* add or remove any nodes from this tree. @@ -408,7 +408,7 @@ The root of the scene currently being edited in the editor. This is usually a di If ``true`` (default value), enables automatic polling of the :ref:`MultiplayerAPI` for this SceneTree during :ref:`process_frame`. -If ``false``, you need to manually call :ref:`MultiplayerAPI.poll` to process network packets and deliver RPCs. This allows running RPCs in a different loop (e.g. physics, thread, specific time step) and for manual :ref:`Mutex` protection when accessing the :ref:`MultiplayerAPI` from threads. +If ``false``, you need to manually call :ref:`MultiplayerAPI.poll()` to process network packets and deliver RPCs. This allows running RPCs in a different loop (e.g. physics, thread, specific time step) and for manual :ref:`Mutex` protection when accessing the :ref:`MultiplayerAPI` from threads. .. rst-class:: classref-item-separator @@ -429,7 +429,7 @@ If ``true``, the scene tree is considered paused. This causes the following beha - 2D and 3D physics will be stopped, as well as collision detection and related signals. -- Depending on each node's :ref:`Node.process_mode`, their :ref:`Node._process`, :ref:`Node._physics_process` and :ref:`Node._input` callback methods may not called anymore. +- Depending on each node's :ref:`Node.process_mode`, their :ref:`Node._process()`, :ref:`Node._physics_process()` and :ref:`Node._input()` callback methods may not called anymore. .. rst-class:: classref-item-separator @@ -502,7 +502,7 @@ Method Descriptions |void| **call_group**\ (\ group\: :ref:`StringName`, method\: :ref:`StringName`, ...\ ) |vararg| :ref:`πŸ”—` -Calls ``method`` on each node inside this tree added to the given ``group``. You can pass arguments to ``method`` by specifying them at the end of this method call. Nodes that cannot call ``method`` (either because the method doesn't exist or the arguments do not match) are ignored. See also :ref:`set_group` and :ref:`notify_group`. +Calls ``method`` on each node inside this tree added to the given ``group``. You can pass arguments to ``method`` by specifying them at the end of this method call. Nodes that cannot call ``method`` (either because the method doesn't exist or the arguments do not match) are ignored. See also :ref:`set_group()` and :ref:`notify_group()`. \ **Note:** This method acts immediately on all selected nodes at once, which may cause stuttering in some performance-intensive situations. @@ -543,7 +543,7 @@ Changes the running scene to the one at the given ``path``, after loading it int Returns :ref:`@GlobalScope.OK` on success, :ref:`@GlobalScope.ERR_CANT_OPEN` if the ``path`` cannot be loaded into a :ref:`PackedScene`, or :ref:`@GlobalScope.ERR_CANT_CREATE` if that scene cannot be instantiated. -\ **Note:** See :ref:`change_scene_to_packed` for details on the order of operations. +\ **Note:** See :ref:`change_scene_to_packed()` for details on the order of operations. .. rst-class:: classref-item-separator @@ -559,13 +559,13 @@ Changes the running scene to a new instance of the given :ref:`PackedScene` on success, :ref:`@GlobalScope.ERR_CANT_CREATE` if the scene cannot be instantiated, or :ref:`@GlobalScope.ERR_INVALID_PARAMETER` if the scene is invalid. -\ **Note:** Operations happen in the following order when :ref:`change_scene_to_packed` is called: +\ **Note:** Operations happen in the following order when :ref:`change_scene_to_packed()` is called: -1. The current scene node is immediately removed from the tree. From that point, :ref:`Node.get_tree` called on the current (outgoing) scene will return ``null``. :ref:`current_scene` will be ``null``, too, because the new scene is not available yet. +1. The current scene node is immediately removed from the tree. From that point, :ref:`Node.get_tree()` called on the current (outgoing) scene will return ``null``. :ref:`current_scene` will be ``null``, too, because the new scene is not available yet. -2. At the end of the frame, the formerly current scene, already removed from the tree, will be deleted (freed from memory) and then the new scene will be instantiated and added to the tree. :ref:`Node.get_tree` and :ref:`current_scene` will be back to working as usual. +2. At the end of the frame, the formerly current scene, already removed from the tree, will be deleted (freed from memory) and then the new scene will be instantiated and added to the tree. :ref:`Node.get_tree()` and :ref:`current_scene` will be back to working as usual. -This ensures that both scenes aren't running at the same time, while still freeing the previous scene in a safe way similar to :ref:`Node.queue_free`. +This ensures that both scenes aren't running at the same time, while still freeing the previous scene in a safe way similar to :ref:`Node.queue_free()`. .. rst-class:: classref-item-separator @@ -608,7 +608,7 @@ This method is commonly used to create a one-shot delay timer, as in the followi -\ **Note:** The timer is always updated *after* all of the nodes in the tree. A node's :ref:`Node._process` method would be called before the timer updates (or :ref:`Node._physics_process` if ``process_in_physics`` is set to ``true``). +\ **Note:** The timer is always updated *after* all of the nodes in the tree. A node's :ref:`Node._process()` method would be called before the timer updates (or :ref:`Node._physics_process()` if ``process_in_physics`` is set to ``true``). .. rst-class:: classref-item-separator @@ -622,7 +622,7 @@ This method is commonly used to create a one-shot delay timer, as in the followi Creates and returns a new :ref:`Tween` processed in this tree. The Tween will start automatically on the next process frame or physics frame (depending on its :ref:`TweenProcessMode`). -\ **Note:** A :ref:`Tween` created using this method is not bound to any :ref:`Node`. It may keep working until there is nothing left to animate. If you want the :ref:`Tween` to be automatically killed when the :ref:`Node` is freed, use :ref:`Node.create_tween` or :ref:`Tween.bind_node`. +\ **Note:** A :ref:`Tween` created using this method is not bound to any :ref:`Node`. It may keep working until there is nothing left to animate. If you want the :ref:`Tween` to be automatically killed when the :ref:`Node` is freed, use :ref:`Node.create_tween()` or :ref:`Tween.bind_node()`. .. rst-class:: classref-item-separator @@ -634,7 +634,7 @@ Creates and returns a new :ref:`Tween` processed in this tree. The :ref:`Node` **get_first_node_in_group**\ (\ group\: :ref:`StringName`\ ) :ref:`πŸ”—` -Returns the first :ref:`Node` found inside the tree, that has been added to the given ``group``, in scene hierarchy order. Returns ``null`` if no match is found. See also :ref:`get_nodes_in_group`. +Returns the first :ref:`Node` found inside the tree, that has been added to the given ``group``, in scene hierarchy order. Returns ``null`` if no match is found. See also :ref:`get_nodes_in_group()`. .. rst-class:: classref-item-separator @@ -658,7 +658,7 @@ Returns how many frames have been processed, since the application started. This :ref:`MultiplayerAPI` **get_multiplayer**\ (\ for_path\: :ref:`NodePath` = NodePath("")\ ) |const| :ref:`πŸ”—` -Searches for the :ref:`MultiplayerAPI` configured for the given path, if one does not exist it searches the parent paths until one is found. If the path is empty, or none is found, the default one is returned. See :ref:`set_multiplayer`. +Searches for the :ref:`MultiplayerAPI` configured for the given path, if one does not exist it searches the parent paths until one is found. If the path is empty, or none is found, the default one is returned. See :ref:`set_multiplayer()`. .. rst-class:: classref-item-separator @@ -730,7 +730,7 @@ Returns ``true`` if a node added to the given group ``name`` exists in the tree. |void| **notify_group**\ (\ group\: :ref:`StringName`, notification\: :ref:`int`\ ) :ref:`πŸ”—` -Calls :ref:`Object.notification` with the given ``notification`` to all nodes inside this tree added to the ``group``. See also :doc:`Godot notifications <../tutorials/best_practices/godot_notifications>` and :ref:`call_group` and :ref:`set_group`. +Calls :ref:`Object.notification()` with the given ``notification`` to all nodes inside this tree added to the ``group``. See also :doc:`Godot notifications <../tutorials/best_practices/godot_notifications>` and :ref:`call_group()` and :ref:`set_group()`. \ **Note:** This method acts immediately on all selected nodes at once, which may cause stuttering in some performance-intensive situations. @@ -744,7 +744,7 @@ Calls :ref:`Object.notification` with the give |void| **notify_group_flags**\ (\ call_flags\: :ref:`int`, group\: :ref:`StringName`, notification\: :ref:`int`\ ) :ref:`πŸ”—` -Calls :ref:`Object.notification` with the given ``notification`` to all nodes inside this tree added to the ``group``. Use ``call_flags`` to customize this method's behavior (see :ref:`GroupCallFlags`). +Calls :ref:`Object.notification()` with the given ``notification`` to all nodes inside this tree added to the ``group``. Use ``call_flags`` to customize this method's behavior (see :ref:`GroupCallFlags`). .. rst-class:: classref-item-separator @@ -756,7 +756,7 @@ Calls :ref:`Object.notification` with the give |void| **queue_delete**\ (\ obj\: :ref:`Object`\ ) :ref:`πŸ”—` -Queues the given ``obj`` to be deleted, calling its :ref:`Object.free` at the end of the current frame. This method is similar to :ref:`Node.queue_free`. +Queues the given ``obj`` to be deleted, calling its :ref:`Object.free()` at the end of the current frame. This method is similar to :ref:`Node.queue_free()`. .. rst-class:: classref-item-separator @@ -798,7 +798,7 @@ Returns :ref:`@GlobalScope.OK` on success, :ref: |void| **set_group**\ (\ group\: :ref:`StringName`, property\: :ref:`String`, value\: :ref:`Variant`\ ) :ref:`πŸ”—` -Sets the given ``property`` to ``value`` on all nodes inside this tree added to the given ``group``. Nodes that do not have the ``property`` are ignored. See also :ref:`call_group` and :ref:`notify_group`. +Sets the given ``property`` to ``value`` on all nodes inside this tree added to the given ``group``. Nodes that do not have the ``property`` are ignored. See also :ref:`call_group()` and :ref:`notify_group()`. \ **Note:** This method acts immediately on all selected nodes at once, which may cause stuttering in some performance-intensive situations. diff --git a/classes/class_scenetreetimer.rst b/classes/class_scenetreetimer.rst index 356e38dc7..ec82f5b67 100644 --- a/classes/class_scenetreetimer.rst +++ b/classes/class_scenetreetimer.rst @@ -19,7 +19,7 @@ One-shot timer. Description ----------- -A one-shot timer managed by the scene tree, which emits :ref:`timeout` on completion. See also :ref:`SceneTree.create_timer`. +A one-shot timer managed by the scene tree, which emits :ref:`timeout` on completion. See also :ref:`SceneTree.create_timer()`. As opposed to :ref:`Timer`, it does not require the instantiation of a node. Commonly used to create a one-shot delay timer as in the following example: @@ -46,7 +46,7 @@ As opposed to :ref:`Timer`, it does not require the instantiation o The timer will be dereferenced after its time elapses. To preserve the timer, you can keep a reference to it. See :ref:`RefCounted`. -\ **Note:** The timer is processed after all of the nodes in the current frame, i.e. node's :ref:`Node._process` method would be called before the timer (or :ref:`Node._physics_process` if ``process_in_physics`` in :ref:`SceneTree.create_timer` has been set to ``true``). +\ **Note:** The timer is processed after all of the nodes in the current frame, i.e. node's :ref:`Node._process()` method would be called before the timer (or :ref:`Node._physics_process()` if ``process_in_physics`` in :ref:`SceneTree.create_timer()` has been set to ``true``). .. rst-class:: classref-reftable-group diff --git a/classes/class_script.rst b/classes/class_script.rst index afee8c998..8f9706c29 100644 --- a/classes/class_script.rst +++ b/classes/class_script.rst @@ -25,7 +25,7 @@ A class stored as a resource. A script extends the functionality of all objects This is the base class for all scripts and should not be used directly. Trying to create a new script with this class will result in an error. -The ``new`` method of a script subclass creates a new instance. :ref:`Object.set_script` extends an existing object, if that object's class matches one of the script's base classes. +The ``new`` method of a script subclass creates a new instance. :ref:`Object.set_script()` extends an existing object, if that object's class matches one of the script's base classes. .. rst-class:: classref-introduction-group @@ -280,7 +280,7 @@ Returns ``true`` if the script, or a base class, defines a signal with the given Returns ``true`` if the script contains non-empty source code. -\ **Note:** If a script does not have source code, this does not mean that it is invalid or unusable. For example, a :ref:`GDScript` that was exported with binary tokenization has no source code, but still behaves as expected and could be instantiated. This can be checked with :ref:`can_instantiate`. +\ **Note:** If a script does not have source code, this does not mean that it is invalid or unusable. For example, a :ref:`GDScript` that was exported with binary tokenization has no source code, but still behaves as expected and could be instantiated. This can be checked with :ref:`can_instantiate()`. .. rst-class:: classref-item-separator diff --git a/classes/class_scriptcreatedialog.rst b/classes/class_scriptcreatedialog.rst index fb1a0e45e..69ce4613c 100644 --- a/classes/class_scriptcreatedialog.rst +++ b/classes/class_scriptcreatedialog.rst @@ -19,7 +19,7 @@ Godot editor's popup dialog for creating new :ref:`Script` files. Description ----------- -The **ScriptCreateDialog** creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling one of the :ref:`Window.popup` methods. +The **ScriptCreateDialog** creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling one of the :ref:`Window.popup()` methods. .. tabs:: diff --git a/classes/class_scripteditor.rst b/classes/class_scripteditor.rst index 81f899c43..30b7be4eb 100644 --- a/classes/class_scripteditor.rst +++ b/classes/class_scripteditor.rst @@ -21,7 +21,7 @@ Description Godot editor's script editor. -\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_script_editor`. +\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_script_editor()`. .. rst-class:: classref-reftable-group diff --git a/classes/class_scrollcontainer.rst b/classes/class_scrollcontainer.rst index 040e680fd..c3aad94b5 100644 --- a/classes/class_scrollcontainer.rst +++ b/classes/class_scrollcontainer.rst @@ -268,7 +268,7 @@ Deadzone for touch scrolling. Lower deadzone makes the scrolling more sensitive. The current horizontal scroll value. -\ **Note:** If you are setting this value in the :ref:`Node._ready` function or earlier, it needs to be wrapped with :ref:`Object.set_deferred`, since scroll bar's :ref:`Range.max_value` is not initialized yet. +\ **Note:** If you are setting this value in the :ref:`Node._ready()` function or earlier, it needs to be wrapped with :ref:`Object.set_deferred()`, since scroll bar's :ref:`Range.max_value` is not initialized yet. :: diff --git a/classes/class_semaphore.rst b/classes/class_semaphore.rst index ab7c8890d..7f834d4b2 100644 --- a/classes/class_semaphore.rst +++ b/classes/class_semaphore.rst @@ -81,7 +81,7 @@ Lowers the **Semaphore**, allowing one thread in, or more if ``count`` is specif :ref:`bool` **try_wait**\ (\ ) :ref:`πŸ”—` -Like :ref:`wait`, but won't block, so if the value is zero, fails immediately and returns ``false``. If non-zero, it returns ``true`` to report success. +Like :ref:`wait()`, but won't block, so if the value is zero, fails immediately and returns ``false``. If non-zero, it returns ``true`` to report success. .. rst-class:: classref-item-separator diff --git a/classes/class_shader.rst b/classes/class_shader.rst index 21e0a31aa..392d8ea75 100644 --- a/classes/class_shader.rst +++ b/classes/class_shader.rst @@ -184,7 +184,7 @@ Returns the shader mode for the shader. :ref:`Array` **get_shader_uniform_list**\ (\ get_groups\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Returns the list of shader uniforms that can be assigned to a :ref:`ShaderMaterial`, for use with :ref:`ShaderMaterial.set_shader_parameter` and :ref:`ShaderMaterial.get_shader_parameter`. The parameters returned are contained in dictionaries in a similar format to the ones returned by :ref:`Object.get_property_list`. +Returns the list of shader uniforms that can be assigned to a :ref:`ShaderMaterial`, for use with :ref:`ShaderMaterial.set_shader_parameter()` and :ref:`ShaderMaterial.get_shader_parameter()`. The parameters returned are contained in dictionaries in a similar format to the ones returned by :ref:`Object.get_property_list()`. If argument ``get_groups`` is ``true``, parameter grouping hints are also included in the list. @@ -198,7 +198,7 @@ If argument ``get_groups`` is ``true``, parameter grouping hints are also includ |void| **inspect_native_shader_code**\ (\ ) :ref:`πŸ”—` -Only available when running in the editor. Opens a popup that visualizes the generated shader code, including all variants and internal shader code. See also :ref:`Material.inspect_native_shader_code`. +Only available when running in the editor. Opens a popup that visualizes the generated shader code, including all variants and internal shader code. See also :ref:`Material.inspect_native_shader_code()`. .. rst-class:: classref-item-separator diff --git a/classes/class_shadermaterial.rst b/classes/class_shadermaterial.rst index 7f8ad034f..6208b9e2b 100644 --- a/classes/class_shadermaterial.rst +++ b/classes/class_shadermaterial.rst @@ -111,7 +111,7 @@ Changes the value set for this material of a uniform in the shader. \ **Note:** ``param`` is case-sensitive and must match the name of the uniform in the code exactly (not the capitalized name in the inspector). -\ **Note:** Changes to the shader uniform will be effective on all instances using this **ShaderMaterial**. To prevent this, use per-instance uniforms with :ref:`GeometryInstance3D.set_instance_shader_parameter` or duplicate the **ShaderMaterial** resource using :ref:`Resource.duplicate`. Per-instance uniforms allow for better shader reuse and are therefore faster, so they should be preferred over duplicating the **ShaderMaterial** when possible. +\ **Note:** Changes to the shader uniform will be effective on all instances using this **ShaderMaterial**. To prevent this, use per-instance uniforms with :ref:`GeometryInstance3D.set_instance_shader_parameter()` or duplicate the **ShaderMaterial** resource using :ref:`Resource.duplicate()`. Per-instance uniforms allow for better shader reuse and are therefore faster, so they should be preferred over duplicating the **ShaderMaterial** when possible. .. |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_shapecast2d.rst b/classes/class_shapecast2d.rst index 0e93e897b..15295c7a7 100644 --- a/classes/class_shapecast2d.rst +++ b/classes/class_shapecast2d.rst @@ -21,7 +21,7 @@ Description Shape casting allows to detect collision objects by sweeping its :ref:`shape` along the cast direction determined by :ref:`target_position`. This is similar to :ref:`RayCast2D`, but it allows for sweeping a region of space, rather than just a straight line. **ShapeCast2D** can detect multiple collision objects. It is useful for things like wide laser beams or snapping a simple shape to a floor. -Immediate collision overlaps can be done with the :ref:`target_position` set to ``Vector2(0, 0)`` and by calling :ref:`force_shapecast_update` within the same physics frame. This helps to overcome some limitations of :ref:`Area2D` when used as an instantaneous detection area, as collision information isn't immediately available to it. +Immediate collision overlaps can be done with the :ref:`target_position` set to ``Vector2(0, 0)`` and by calling :ref:`force_shapecast_update()` within the same physics frame. This helps to overcome some limitations of :ref:`Area2D` when used as an instantaneous detection area, as collision information isn't immediately available to it. \ **Note:** Shape casting is more computationally expensive than ray casting. @@ -169,7 +169,7 @@ The shape's collision mask. Only objects in at least one collision layer enabled - :ref:`Array` **get_collision_result**\ (\ ) -Returns the complete collision information from the collision sweep. The data returned is the same as in the :ref:`PhysicsDirectSpaceState2D.get_rest_info` method. +Returns the complete collision information from the collision sweep. The data returned is the same as in the :ref:`PhysicsDirectSpaceState2D.get_rest_info()` method. .. rst-class:: classref-item-separator @@ -352,7 +352,7 @@ Returns the fraction from this cast's origin to its :ref:`target_position` of how far the shape must move to trigger a collision, as a value between ``0.0`` and ``1.0``. -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. +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 @@ -364,7 +364,7 @@ In ideal conditions this would be the same as :ref:`get_closest_collision_safe_f :ref:`Object` **get_collider**\ (\ index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the collided :ref:`Object` of one of the multiple collisions at ``index``, or ``null`` if no object is intersecting the shape (i.e. :ref:`is_colliding` returns ``false``). +Returns the collided :ref:`Object` of one of the multiple collisions at ``index``, or ``null`` if no object is intersecting the shape (i.e. :ref:`is_colliding()` returns ``false``). .. rst-class:: classref-item-separator @@ -388,7 +388,7 @@ Returns the :ref:`RID` of the collided object of one of the multiple :ref:`int` **get_collider_shape**\ (\ index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the shape ID of the colliding shape of one of the multiple collisions at ``index``, or ``0`` if no object is intersecting the shape (i.e. :ref:`is_colliding` returns ``false``). +Returns the shape ID of the colliding shape of one of the multiple collisions at ``index``, or ``0`` if no object is intersecting the shape (i.e. :ref:`is_colliding()` returns ``false``). .. rst-class:: classref-item-separator @@ -400,7 +400,7 @@ Returns the shape ID of the colliding shape of one of the multiple collisions at :ref:`int` **get_collision_count**\ (\ ) |const| :ref:`πŸ”—` -The number of collisions detected at the point of impact. Use this to iterate over multiple collisions as provided by :ref:`get_collider`, :ref:`get_collider_shape`, :ref:`get_collision_point`, and :ref:`get_collision_normal` methods. +The number of collisions detected at the point of impact. Use this to iterate over multiple collisions as provided by :ref:`get_collider()`, :ref:`get_collider_shape()`, :ref:`get_collision_point()`, and :ref:`get_collision_normal()` methods. .. rst-class:: classref-item-separator diff --git a/classes/class_shapecast3d.rst b/classes/class_shapecast3d.rst index cb1dc3cbd..db507b546 100644 --- a/classes/class_shapecast3d.rst +++ b/classes/class_shapecast3d.rst @@ -21,7 +21,7 @@ Description Shape casting allows to detect collision objects by sweeping its :ref:`shape` along the cast direction determined by :ref:`target_position`. This is similar to :ref:`RayCast3D`, but it allows for sweeping a region of space, rather than just a straight line. **ShapeCast3D** can detect multiple collision objects. It is useful for things like wide laser beams or snapping a simple shape to a floor. -Immediate collision overlaps can be done with the :ref:`target_position` set to ``Vector3(0, 0, 0)`` and by calling :ref:`force_shapecast_update` within the same physics frame. This helps to overcome some limitations of :ref:`Area3D` when used as an instantaneous detection area, as collision information isn't immediately available to it. +Immediate collision overlaps can be done with the :ref:`target_position` set to ``Vector3(0, 0, 0)`` and by calling :ref:`force_shapecast_update()` within the same physics frame. This helps to overcome some limitations of :ref:`Area3D` when used as an instantaneous detection area, as collision information isn't immediately available to it. \ **Note:** Shape casting is more computationally expensive than ray casting. @@ -173,7 +173,7 @@ The shape's collision mask. Only objects in at least one collision layer enabled - :ref:`Array` **get_collision_result**\ (\ ) -Returns the complete collision information from the collision sweep. The data returned is the same as in the :ref:`PhysicsDirectSpaceState3D.get_rest_info` method. +Returns the complete collision information from the collision sweep. The data returned is the same as in the :ref:`PhysicsDirectSpaceState3D.get_rest_info()` method. .. rst-class:: classref-item-separator @@ -375,7 +375,7 @@ Returns the fraction from this cast's origin to its :ref:`target_position` of how far the shape must move to trigger a collision, as a value between ``0.0`` and ``1.0``. -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. +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 @@ -387,7 +387,7 @@ In ideal conditions this would be the same as :ref:`get_closest_collision_safe_f :ref:`Object` **get_collider**\ (\ index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the collided :ref:`Object` of one of the multiple collisions at ``index``, or ``null`` if no object is intersecting the shape (i.e. :ref:`is_colliding` returns ``false``). +Returns the collided :ref:`Object` of one of the multiple collisions at ``index``, or ``null`` if no object is intersecting the shape (i.e. :ref:`is_colliding()` returns ``false``). .. rst-class:: classref-item-separator @@ -411,7 +411,7 @@ Returns the :ref:`RID` of the collided object of one of the multiple :ref:`int` **get_collider_shape**\ (\ index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the shape ID of the colliding shape of one of the multiple collisions at ``index``, or ``0`` if no object is intersecting the shape (i.e. :ref:`is_colliding` returns ``false``). +Returns the shape ID of the colliding shape of one of the multiple collisions at ``index``, or ``0`` if no object is intersecting the shape (i.e. :ref:`is_colliding()` returns ``false``). .. rst-class:: classref-item-separator @@ -423,7 +423,7 @@ Returns the shape ID of the colliding shape of one of the multiple collisions at :ref:`int` **get_collision_count**\ (\ ) |const| :ref:`πŸ”—` -The number of collisions detected at the point of impact. Use this to iterate over multiple collisions as provided by :ref:`get_collider`, :ref:`get_collider_shape`, :ref:`get_collision_point`, and :ref:`get_collision_normal` methods. +The number of collisions detected at the point of impact. Use this to iterate over multiple collisions as provided by :ref:`get_collider()`, :ref:`get_collider_shape()`, :ref:`get_collision_point()`, and :ref:`get_collision_normal()` methods. .. rst-class:: classref-item-separator diff --git a/classes/class_shortcut.rst b/classes/class_shortcut.rst index fad61bc5e..dc0b4926b 100644 --- a/classes/class_shortcut.rst +++ b/classes/class_shortcut.rst @@ -114,7 +114,7 @@ Returns whether :ref:`events` contains an :ref:` :ref:`bool` **matches_event**\ (\ event\: :ref:`InputEvent`\ ) |const| :ref:`πŸ”—` -Returns whether any :ref:`InputEvent` in :ref:`events` equals ``event``. This uses :ref:`InputEvent.is_match` to compare events. +Returns whether any :ref:`InputEvent` in :ref:`events` equals ``event``. This uses :ref:`InputEvent.is_match()` to compare events. .. |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_signal.rst b/classes/class_signal.rst index d6d55d46b..0f8493a4e 100644 --- a/classes/class_signal.rst +++ b/classes/class_signal.rst @@ -17,7 +17,7 @@ A built-in type representing a signal of an :ref:`Object`. Description ----------- -**Signal** is a built-in :ref:`Variant` type that represents a signal of an :ref:`Object` instance. Like all :ref:`Variant` types, it can be stored in variables and passed to functions. Signals allow all connected :ref:`Callable`\ s (and by extension their respective objects) to listen and react to events, without directly referencing one another. This keeps the code flexible and easier to manage. You can check whether an :ref:`Object` has a given signal name using :ref:`Object.has_signal`. +**Signal** is a built-in :ref:`Variant` type that represents a signal of an :ref:`Object` instance. Like all :ref:`Variant` types, it can be stored in variables and passed to functions. Signals allow all connected :ref:`Callable`\ s (and by extension their respective objects) to listen and react to events, without directly referencing one another. This keeps the code flexible and easier to manage. You can check whether an :ref:`Object` has a given signal name using :ref:`Object.has_signal()`. In GDScript, signals can be declared with the ``signal`` keyword. In C#, you may use the ``[Signal]`` attribute on a delegate. @@ -169,9 +169,9 @@ Method Descriptions :ref:`int` **connect**\ (\ callable\: :ref:`Callable`, flags\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Connects this signal to the specified ``callable``. Optional ``flags`` can be also added to configure the connection's behavior (see :ref:`ConnectFlags` constants). You can provide additional arguments to the connected ``callable`` by using :ref:`Callable.bind`. +Connects this signal to the specified ``callable``. Optional ``flags`` can be also added to configure the connection's behavior (see :ref:`ConnectFlags` constants). You can provide additional arguments to the connected ``callable`` by using :ref:`Callable.bind()`. -A signal can only be connected once to the same :ref:`Callable`. If the signal is already connected, returns :ref:`@GlobalScope.ERR_INVALID_PARAMETER` and pushes an error message, unless the signal is connected with :ref:`Object.CONNECT_REFERENCE_COUNTED`. To prevent this, use :ref:`is_connected` first to check for existing connections. +A signal can only be connected once to the same :ref:`Callable`. If the signal is already connected, returns :ref:`@GlobalScope.ERR_INVALID_PARAMETER` and pushes an error message, unless the signal is connected with :ref:`Object.CONNECT_REFERENCE_COUNTED`. To prevent this, use :ref:`is_connected()` first to check for existing connections. :: @@ -191,7 +191,7 @@ A signal can only be connected once to the same :ref:`Callable`. |void| **disconnect**\ (\ callable\: :ref:`Callable`\ ) :ref:`πŸ”—` -Disconnects this signal from the specified :ref:`Callable`. If the connection does not exist, generates an error. Use :ref:`is_connected` to make sure that the connection exists. +Disconnects this signal from the specified :ref:`Callable`. If the connection does not exist, generates an error. Use :ref:`is_connected()` to make sure that the connection exists. .. rst-class:: classref-item-separator @@ -257,7 +257,7 @@ Returns the object emitting this signal. :ref:`int` **get_object_id**\ (\ ) |const| :ref:`πŸ”—` -Returns the ID of the object emitting this signal (see :ref:`Object.get_instance_id`). +Returns the ID of the object emitting this signal (see :ref:`Object.get_instance_id()`). .. rst-class:: classref-item-separator diff --git a/classes/class_skeleton3d.rst b/classes/class_skeleton3d.rst index 7c06cbe53..2656f07ec 100644 --- a/classes/class_skeleton3d.rst +++ b/classes/class_skeleton3d.rst @@ -169,7 +169,7 @@ Signals **bone_enabled_changed**\ (\ bone_idx\: :ref:`int`\ ) :ref:`πŸ”—` -Emitted when the bone at ``bone_idx`` is toggled with :ref:`set_bone_enabled`. Use :ref:`is_bone_enabled` to check the new value. +Emitted when the bone at ``bone_idx`` is toggled with :ref:`set_bone_enabled()`. Use :ref:`is_bone_enabled()` to check the new value. .. rst-class:: classref-item-separator @@ -307,7 +307,7 @@ Property Descriptions **Deprecated:** This property may be changed or removed in future versions. -If you follow the recommended workflow and explicitly have :ref:`PhysicalBoneSimulator3D` as a child of **Skeleton3D**, you can control whether it is affected by raycasting without running :ref:`physical_bones_start_simulation`, by its :ref:`SkeletonModifier3D.active`. +If you follow the recommended workflow and explicitly have :ref:`PhysicalBoneSimulator3D` as a child of **Skeleton3D**, you can control whether it is affected by raycasting without running :ref:`physical_bones_start_simulation()`, by its :ref:`SkeletonModifier3D.active`. However, for old (deprecated) configurations, **Skeleton3D** has an internal virtual :ref:`PhysicalBoneSimulator3D` for compatibility. This property controls the internal virtual :ref:`PhysicalBoneSimulator3D`'s :ref:`SkeletonModifier3D.active`. @@ -851,7 +851,7 @@ Disables the pose for the bone at ``bone_idx`` if ``false``, enables the bone po Sets the global pose transform, ``pose``, for the bone at ``bone_idx``. -\ **Note:** If other bone poses have been changed, this method executes a dirty poses recalculation and will cause performance to deteriorate. If you know that multiple global poses will be applied, consider using :ref:`set_bone_pose` with precalculation. +\ **Note:** If other bone poses have been changed, this method executes a dirty poses recalculation 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 @@ -869,7 +869,7 @@ 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. -\ **Note:** The pose transform needs to be a global pose! To convert a world transform from a :ref:`Node3D` to a global bone pose, multiply the :ref:`Transform3D.affine_inverse` of the node's :ref:`Node3D.global_transform` by the desired world transform. +\ **Note:** The pose transform needs to be a global pose! To convert a world transform from a :ref:`Node3D` to a global bone pose, multiply the :ref:`Transform3D.affine_inverse()` of the node's :ref:`Node3D.global_transform` by the desired world transform. .. rst-class:: classref-item-separator diff --git a/classes/class_skeletonik3d.rst b/classes/class_skeletonik3d.rst index 9be85b987..8b4f70d90 100644 --- a/classes/class_skeletonik3d.rst +++ b/classes/class_skeletonik3d.rst @@ -295,7 +295,7 @@ Returns the parent :ref:`Skeleton3D` node that was present whe :ref:`bool` **is_running**\ (\ ) :ref:`πŸ”—` -Returns ``true`` if SkeletonIK is applying IK effects on continues frames to the :ref:`Skeleton3D` bones. Returns ``false`` if SkeletonIK is stopped or :ref:`start` was used with the ``one_time`` parameter set to ``true``. +Returns ``true`` if SkeletonIK is applying IK effects on continues frames to the :ref:`Skeleton3D` bones. Returns ``false`` if SkeletonIK is stopped or :ref:`start()` was used with the ``one_time`` parameter set to ``true``. .. rst-class:: classref-item-separator @@ -319,7 +319,7 @@ Starts applying IK effects on each frame to the :ref:`Skeleton3D` -Stops applying IK effects on each frame to the :ref:`Skeleton3D` bones and also calls :ref:`Skeleton3D.clear_bones_global_pose_override` to remove existing overrides on all bones. +Stops applying IK effects on each frame to the :ref:`Skeleton3D` bones and also calls :ref:`Skeleton3D.clear_bones_global_pose_override()` to remove existing overrides on all bones. .. |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_skeletonmodification2d.rst b/classes/class_skeletonmodification2d.rst index 7475c8735..a48689dd1 100644 --- a/classes/class_skeletonmodification2d.rst +++ b/classes/class_skeletonmodification2d.rst @@ -89,7 +89,7 @@ Property Descriptions - |void| **set_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_enabled**\ (\ ) -If ``true``, the modification's :ref:`_execute` function will be called by the :ref:`SkeletonModificationStack2D`. +If ``true``, the modification's :ref:`_execute()` function will be called by the :ref:`SkeletonModificationStack2D`. .. rst-class:: classref-item-separator @@ -125,7 +125,7 @@ Method Descriptions Used for drawing **editor-only** modification gizmos. This function will only be called in the Godot editor and can be overridden to draw custom gizmos. -\ **Note:** You will need to use the Skeleton2D from :ref:`SkeletonModificationStack2D.get_skeleton` and it's draw functions, as the **SkeletonModification2D** resource cannot draw on its own. +\ **Note:** You will need to use the Skeleton2D from :ref:`SkeletonModificationStack2D.get_skeleton()` and it's draw functions, as the **SkeletonModification2D** resource cannot draw on its own. .. rst-class:: classref-item-separator @@ -173,7 +173,7 @@ Takes an angle and clamps it so it is within the passed-in ``min`` and ``max`` r :ref:`bool` **get_editor_draw_gizmo**\ (\ ) |const| :ref:`πŸ”—` -Returns whether this modification will call :ref:`_draw_editor_gizmo` in the Godot editor to draw modification-specific gizmos. +Returns whether this modification will call :ref:`_draw_editor_gizmo()` in the Godot editor to draw modification-specific gizmos. .. rst-class:: classref-item-separator @@ -209,7 +209,7 @@ Returns the :ref:`SkeletonModificationStack2D |void| **set_editor_draw_gizmo**\ (\ draw_gizmo\: :ref:`bool`\ ) :ref:`πŸ”—` -Sets whether this modification will call :ref:`_draw_editor_gizmo` in the Godot editor to draw modification-specific gizmos. +Sets whether this modification will call :ref:`_draw_editor_gizmo()` in the Godot editor to draw modification-specific gizmos. .. rst-class:: classref-item-separator diff --git a/classes/class_skeletonmodification2dccdik.rst b/classes/class_skeletonmodification2dccdik.rst index dce4267f4..d5857d0f2 100644 --- a/classes/class_skeletonmodification2dccdik.rst +++ b/classes/class_skeletonmodification2dccdik.rst @@ -178,7 +178,7 @@ Returns the index of the :ref:`Bone2D` node assigned to the CCDIK :ref:`bool` **get_ccdik_joint_constraint_angle_invert**\ (\ joint_idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns whether the CCDIK joint at ``joint_idx`` uses an inverted joint constraint. See :ref:`set_ccdik_joint_constraint_angle_invert` for details. +Returns whether the CCDIK joint at ``joint_idx`` uses an inverted joint constraint. See :ref:`set_ccdik_joint_constraint_angle_invert()` for details. .. rst-class:: classref-item-separator diff --git a/classes/class_skeletonmodifier3d.rst b/classes/class_skeletonmodifier3d.rst index ee5456736..abbf2c1f6 100644 --- a/classes/class_skeletonmodifier3d.rst +++ b/classes/class_skeletonmodifier3d.rst @@ -79,7 +79,7 @@ Signals 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. +\ **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 @@ -202,7 +202,7 @@ Method Descriptions Override this virtual method to implement a custom skeleton modifier. You should do things like get the :ref:`Skeleton3D`'s current pose and apply the pose here. -\ :ref:`_process_modification` must not apply :ref:`influence` to bone poses because the :ref:`Skeleton3D` automatically applies influence to all bone poses set by the modifier. +\ :ref:`_process_modification()` must not apply :ref:`influence` to bone poses because the :ref:`Skeleton3D` automatically applies influence to all bone poses set by the modifier. .. rst-class:: classref-item-separator diff --git a/classes/class_skinreference.rst b/classes/class_skinreference.rst index 57379e5d4..ea33a56d1 100644 --- a/classes/class_skinreference.rst +++ b/classes/class_skinreference.rst @@ -21,7 +21,7 @@ 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`. +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. @@ -58,7 +58,7 @@ Method Descriptions :ref:`RID` **get_skeleton**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`RID` owned by this SkinReference, as returned by :ref:`RenderingServer.skeleton_create`. +Returns the :ref:`RID` owned by this SkinReference, as returned by :ref:`RenderingServer.skeleton_create()`. .. rst-class:: classref-item-separator diff --git a/classes/class_spinbox.rst b/classes/class_spinbox.rst index e917bda31..729690dab 100644 --- a/classes/class_spinbox.rst +++ b/classes/class_spinbox.rst @@ -53,7 +53,7 @@ See :ref:`Range` class for more options over the **SpinBox**. \ **Note:** **SpinBox** relies on an underlying :ref:`LineEdit` node. To theme a **SpinBox**'s background, add theme items for :ref:`LineEdit` and customize them. The :ref:`LineEdit` has the ``SpinBoxInnerLineEdit`` theme variation, so that you can give it a distinct appearance from regular :ref:`LineEdit`\ s. -\ **Note:** If you want to implement drag and drop for the underlying :ref:`LineEdit`, you can use :ref:`Control.set_drag_forwarding` on the node returned by :ref:`get_line_edit`. +\ **Note:** If you want to implement drag and drop for the underlying :ref:`LineEdit`, you can use :ref:`Control.set_drag_forwarding()` on the node returned by :ref:`get_line_edit()`. .. rst-class:: classref-reftable-group diff --git a/classes/class_springbonecollision3d.rst b/classes/class_springbonecollision3d.rst index 0bde80b02..ff3070fe3 100644 --- a/classes/class_springbonecollision3d.rst +++ b/classes/class_springbonecollision3d.rst @@ -23,7 +23,7 @@ Description A collision can be a child of :ref:`SpringBoneSimulator3D`. If it is not a child of :ref:`SpringBoneSimulator3D`, it has no effect. -The colliding and sliding are done in the :ref:`SpringBoneSimulator3D`'s modification process in order of its collision list which is set by :ref:`SpringBoneSimulator3D.set_collision_path`. If :ref:`SpringBoneSimulator3D.are_all_child_collisions_enabled` is ``true``, the order matches :ref:`SceneTree`. +The colliding and sliding are done in the :ref:`SpringBoneSimulator3D`'s modification process in order of its collision list which is set by :ref:`SpringBoneSimulator3D.set_collision_path()`. If :ref:`SpringBoneSimulator3D.are_all_child_collisions_enabled()` is ``true``, the order matches :ref:`SceneTree`. If :ref:`bone` is set, it synchronizes with the bone pose of the ancestor :ref:`Skeleton3D`, which is done in before the :ref:`SpringBoneSimulator3D`'s modification process as the pre-process. diff --git a/classes/class_springbonesimulator3d.rst b/classes/class_springbonesimulator3d.rst index eef8310b9..258acdb04 100644 --- a/classes/class_springbonesimulator3d.rst +++ b/classes/class_springbonesimulator3d.rst @@ -21,13 +21,13 @@ Description This :ref:`SkeletonModifier3D` can be used to wiggle hair, cloth, and tails. This modifier behaves differently from :ref:`PhysicalBoneSimulator3D` as it attempts to return the original pose after modification. -If you setup :ref:`set_root_bone` and :ref:`set_end_bone`, it is treated as one bone chain. Note that it does not support a branched chain like Y-shaped chains. +If you setup :ref:`set_root_bone()` and :ref:`set_end_bone()`, it is treated as one bone chain. Note that it does not support a branched chain like Y-shaped chains. When a bone chain is created, an array is generated from the bones that exist in between and listed in the joint list. -Several properties can be applied to each joint, such as :ref:`set_joint_stiffness`, :ref:`set_joint_drag`, and :ref:`set_joint_gravity`. +Several properties can be applied to each joint, such as :ref:`set_joint_stiffness()`, :ref:`set_joint_drag()`, and :ref:`set_joint_gravity()`. -For simplicity, you can set values to all joints at the same time by using a :ref:`Curve`. If you want to specify detailed values individually, set :ref:`set_individual_config` to ``true``. +For simplicity, you can set values to all joints at the same time by using a :ref:`Curve`. If you want to specify detailed values individually, set :ref:`set_individual_config()` to ``true``. For physical simulation, **SpringBoneSimulator3D** can have children as self-standing collisions that are not related to :ref:`PhysicsServer3D`, see also :ref:`SpringBoneCollision3D`. @@ -296,7 +296,7 @@ The world origin is defined as center. :ref:`CenterFrom` **CENTER_FROM_NODE** = ``1`` -The :ref:`Node3D` specified by :ref:`set_center_node` is defined as center. +The :ref:`Node3D` specified by :ref:`set_center_node()` is defined as center. If :ref:`Node3D` is not found, the parent :ref:`Skeleton3D` is treated as center. @@ -306,7 +306,7 @@ If :ref:`Node3D` is not found, the parent :ref:`Skeleton3D` **CENTER_FROM_BONE** = ``2`` -The bone pose origin of the parent :ref:`Skeleton3D` specified by :ref:`set_center_bone` is defined as center. +The bone pose origin of the parent :ref:`Skeleton3D` specified by :ref:`set_center_bone()` is defined as center. If :ref:`Node3D` is not found, the parent :ref:`Skeleton3D` is treated as center. @@ -401,7 +401,7 @@ Returns ``true`` if the all child :ref:`SpringBoneCollision3D`\ ) :ref:`πŸ”—` -Clears all collisions from the collision list at ``index`` in the settings when :ref:`are_all_child_collisions_enabled` is ``false``. +Clears all collisions from the collision list at ``index`` in the settings when :ref:`are_all_child_collisions_enabled()` is ``false``. .. rst-class:: classref-item-separator @@ -413,7 +413,7 @@ Clears all collisions from the collision list at ``index`` in the settings when |void| **clear_exclude_collisions**\ (\ index\: :ref:`int`\ ) :ref:`πŸ”—` -Clears all exclude collisions from the collision list at ``index`` in the settings when :ref:`are_all_child_collisions_enabled` is ``true``. +Clears all exclude collisions from the collision list at ``index`` in the settings when :ref:`are_all_child_collisions_enabled()` is ``true``. .. rst-class:: classref-item-separator @@ -485,7 +485,7 @@ Returns the center node path of the bone chain. :ref:`int` **get_collision_count**\ (\ index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the collision count of the bone chain's collision list when :ref:`are_all_child_collisions_enabled` is ``false``. +Returns the collision count of the bone chain's collision list when :ref:`are_all_child_collisions_enabled()` is ``false``. .. rst-class:: classref-item-separator @@ -497,7 +497,7 @@ Returns the collision count of the bone chain's collision list when :ref:`are_al :ref:`NodePath` **get_collision_path**\ (\ index\: :ref:`int`, collision\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the node path of the :ref:`SpringBoneCollision3D` at ``collision`` in the bone chain's collision list when :ref:`are_all_child_collisions_enabled` is ``false``. +Returns the node path of the :ref:`SpringBoneCollision3D` at ``collision`` in the bone chain's collision list when :ref:`are_all_child_collisions_enabled()` is ``false``. .. rst-class:: classref-item-separator @@ -545,7 +545,7 @@ Returns the end bone index of the bone chain. :ref:`BoneDirection` **get_end_bone_direction**\ (\ index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the end bone's tail direction of the bone chain when :ref:`is_end_bone_extended` is ``true``. +Returns the end bone's tail direction of the bone chain when :ref:`is_end_bone_extended()` is ``true``. .. rst-class:: classref-item-separator @@ -557,7 +557,7 @@ Returns the end bone's tail direction of the bone chain when :ref:`is_end_bone_e :ref:`float` **get_end_bone_length**\ (\ index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the end bone's tail length of the bone chain when :ref:`is_end_bone_extended` is ``true``. +Returns the end bone's tail length of the bone chain when :ref:`is_end_bone_extended()` is ``true``. .. rst-class:: classref-item-separator @@ -581,7 +581,7 @@ Returns the end bone name of the bone chain. :ref:`int` **get_exclude_collision_count**\ (\ index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the exclude collision count of the bone chain's exclude collision list when :ref:`are_all_child_collisions_enabled` is ``true``. +Returns the exclude collision count of the bone chain's exclude collision list when :ref:`are_all_child_collisions_enabled()` is ``true``. .. rst-class:: classref-item-separator @@ -593,7 +593,7 @@ Returns the exclude collision count of the bone chain's exclude collision list w :ref:`NodePath` **get_exclude_collision_path**\ (\ index\: :ref:`int`, collision\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the node path of the :ref:`SpringBoneCollision3D` at ``collision`` in the bone chain's exclude collision list when :ref:`are_all_child_collisions_enabled` is ``true``. +Returns the node path of the :ref:`SpringBoneCollision3D` at ``collision`` in the bone chain's exclude collision list when :ref:`are_all_child_collisions_enabled()` is ``true``. .. rst-class:: classref-item-separator @@ -859,7 +859,7 @@ Returns ``true`` if the end bone is extended to have the tail. Resets a simulating state with respect to the current bone pose. -It is useful to prevent the simulation result getting violent. For example, calling this immediately after a call to :ref:`AnimationPlayer.play` without a fading, or within the previous :ref:`SkeletonModifier3D.modification_processed` signal if it's condition changes significantly. +It is useful to prevent the simulation result getting violent. For example, calling this immediately after a call to :ref:`AnimationPlayer.play()` without a fading, or within the previous :ref:`SkeletonModifier3D.modification_processed` signal if it's condition changes significantly. .. rst-class:: classref-item-separator @@ -925,7 +925,7 @@ Sets the center node path of the bone chain. |void| **set_collision_count**\ (\ index\: :ref:`int`, count\: :ref:`int`\ ) :ref:`πŸ”—` -Sets the number of collisions in the collision list at ``index`` in the settings when :ref:`are_all_child_collisions_enabled` is ``false``. +Sets the number of collisions in the collision list at ``index`` in the settings when :ref:`are_all_child_collisions_enabled()` is ``false``. .. rst-class:: classref-item-separator @@ -937,7 +937,7 @@ Sets the number of collisions in the collision list at ``index`` in the settings |void| **set_collision_path**\ (\ index\: :ref:`int`, collision\: :ref:`int`, node_path\: :ref:`NodePath`\ ) :ref:`πŸ”—` -Sets the node path of the :ref:`SpringBoneCollision3D` at ``collision`` in the bone chain's collision list when :ref:`are_all_child_collisions_enabled` is ``false``. +Sets the node path of the :ref:`SpringBoneCollision3D` at ``collision`` in the bone chain's collision list when :ref:`are_all_child_collisions_enabled()` is ``false``. .. rst-class:: classref-item-separator @@ -951,7 +951,7 @@ Sets the node path of the :ref:`SpringBoneCollision3D` and cached in each joint setting in the joint list. +The value is scaled by :ref:`set_drag_damping_curve()` and cached in each joint setting in the joint list. .. rst-class:: classref-item-separator @@ -975,9 +975,9 @@ Sets the drag force damping curve of the bone chain. |void| **set_enable_all_child_collisions**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`πŸ”—` -If sets ``enabled`` to ``true``, the all child :ref:`SpringBoneCollision3D`\ s are collided and :ref:`set_exclude_collision_path` is enabled as an exclusion list at ``index`` in the settings. +If sets ``enabled`` to ``true``, the all child :ref:`SpringBoneCollision3D`\ s are collided and :ref:`set_exclude_collision_path()` is enabled as an exclusion list at ``index`` in the settings. -If sets ``enabled`` to ``false``, you need to manually register all valid collisions with :ref:`set_collision_path`. +If sets ``enabled`` to ``false``, you need to manually register all valid collisions with :ref:`set_collision_path()`. .. rst-class:: classref-item-separator @@ -1001,7 +1001,7 @@ Sets the end bone index of the bone chain. |void| **set_end_bone_direction**\ (\ index\: :ref:`int`, bone_direction\: :ref:`BoneDirection`\ ) :ref:`πŸ”—` -Sets the end bone tail direction of the bone chain when :ref:`is_end_bone_extended` is ``true``. +Sets the end bone tail direction of the bone chain when :ref:`is_end_bone_extended()` is ``true``. .. rst-class:: classref-item-separator @@ -1013,7 +1013,7 @@ Sets the end bone tail direction of the bone chain when :ref:`is_end_bone_extend |void| **set_end_bone_length**\ (\ index\: :ref:`int`, length\: :ref:`float`\ ) :ref:`πŸ”—` -Sets the end bone tail length of the bone chain when :ref:`is_end_bone_extended` is ``true``. +Sets the end bone tail length of the bone chain when :ref:`is_end_bone_extended()` is ``true``. .. rst-class:: classref-item-separator @@ -1027,7 +1027,7 @@ Sets the end bone tail length of the bone chain when :ref:`is_end_bone_extended< Sets the end bone name of the bone chain. -\ **Note:** End bone must be the root bone or a child of the root bone. If they are the same, the tail must be extended by :ref:`set_extend_end_bone` to jiggle the bone. +\ **Note:** End bone must be the root bone or a child of the root bone. If they are the same, the tail must be extended by :ref:`set_extend_end_bone()` to jiggle the bone. .. rst-class:: classref-item-separator @@ -1039,7 +1039,7 @@ Sets the end bone name of the bone chain. |void| **set_exclude_collision_count**\ (\ index\: :ref:`int`, count\: :ref:`int`\ ) :ref:`πŸ”—` -Sets the number of exclude collisions in the exclude collision list at ``index`` in the settings when :ref:`are_all_child_collisions_enabled` is ``true``. +Sets the number of exclude collisions in the exclude collision list at ``index`` in the settings when :ref:`are_all_child_collisions_enabled()` is ``true``. .. rst-class:: classref-item-separator @@ -1051,7 +1051,7 @@ Sets the number of exclude collisions in the exclude collision list at ``index`` |void| **set_exclude_collision_path**\ (\ index\: :ref:`int`, collision\: :ref:`int`, node_path\: :ref:`NodePath`\ ) :ref:`πŸ”—` -Sets the node path of the :ref:`SpringBoneCollision3D` at ``collision`` in the bone chain's exclude collision list when :ref:`are_all_child_collisions_enabled` is ``true``. +Sets the node path of the :ref:`SpringBoneCollision3D` at ``collision`` in the bone chain's exclude collision list when :ref:`are_all_child_collisions_enabled()` is ``true``. .. rst-class:: classref-item-separator @@ -1079,11 +1079,11 @@ In other words, if you set ``enabled`` is ``false``, the config of last element |void| **set_gravity**\ (\ index\: :ref:`int`, gravity\: :ref:`float`\ ) :ref:`πŸ”—` -Sets the gravity amount of the bone chain. This value is not an acceleration, but a constant velocity of movement in :ref:`set_gravity_direction`. +Sets the gravity amount of the bone chain. This value is not an acceleration, but a constant velocity of movement in :ref:`set_gravity_direction()`. If ``gravity`` is not ``0``, the modified pose will not return to the original pose since it is always affected by gravity. -The value is scaled by :ref:`set_gravity_damping_curve` and cached in each joint setting in the joint list. +The value is scaled by :ref:`set_gravity_damping_curve()` and cached in each joint setting in the joint list. .. rst-class:: classref-item-separator @@ -1107,7 +1107,7 @@ Sets the gravity amount damping curve of the bone chain. |void| **set_gravity_direction**\ (\ index\: :ref:`int`, gravity_direction\: :ref:`Vector3`\ ) :ref:`πŸ”—` -Sets the gravity direction of the bone chain. This value is internally normalized and then multiplied by :ref:`set_gravity`. +Sets the gravity direction of the bone chain. This value is internally normalized and then multiplied by :ref:`set_gravity()`. The value is cached in each joint setting in the joint list. @@ -1133,7 +1133,7 @@ If ``enabled`` is ``true``, the config can be edited individually for each joint |void| **set_joint_drag**\ (\ index\: :ref:`int`, joint\: :ref:`int`, drag\: :ref:`float`\ ) :ref:`πŸ”—` -Sets the drag force at ``joint`` in the bone chain's joint list when :ref:`is_config_individual` is ``true``. +Sets the drag force at ``joint`` in the bone chain's joint list when :ref:`is_config_individual()` is ``true``. .. rst-class:: classref-item-separator @@ -1145,7 +1145,7 @@ Sets the drag force at ``joint`` in the bone chain's joint list when :ref:`is_co |void| **set_joint_gravity**\ (\ index\: :ref:`int`, joint\: :ref:`int`, gravity\: :ref:`float`\ ) :ref:`πŸ”—` -Sets the gravity amount at ``joint`` in the bone chain's joint list when :ref:`is_config_individual` is ``true``. +Sets the gravity amount at ``joint`` in the bone chain's joint list when :ref:`is_config_individual()` is ``true``. .. rst-class:: classref-item-separator @@ -1157,7 +1157,7 @@ Sets the gravity amount at ``joint`` in the bone chain's joint list when :ref:`i |void| **set_joint_gravity_direction**\ (\ index\: :ref:`int`, joint\: :ref:`int`, gravity_direction\: :ref:`Vector3`\ ) :ref:`πŸ”—` -Sets the gravity direction at ``joint`` in the bone chain's joint list when :ref:`is_config_individual` is ``true``. +Sets the gravity direction at ``joint`` in the bone chain's joint list when :ref:`is_config_individual()` is ``true``. .. rst-class:: classref-item-separator @@ -1169,7 +1169,7 @@ Sets the gravity direction at ``joint`` in the bone chain's joint list when :ref |void| **set_joint_radius**\ (\ index\: :ref:`int`, joint\: :ref:`int`, radius\: :ref:`float`\ ) :ref:`πŸ”—` -Sets the joint radius at ``joint`` in the bone chain's joint list when :ref:`is_config_individual` is ``true``. +Sets the joint radius at ``joint`` in the bone chain's joint list when :ref:`is_config_individual()` is ``true``. .. rst-class:: classref-item-separator @@ -1181,7 +1181,7 @@ Sets the joint radius at ``joint`` in the bone chain's joint list when :ref:`is_ |void| **set_joint_rotation_axis**\ (\ index\: :ref:`int`, joint\: :ref:`int`, axis\: :ref:`RotationAxis`\ ) :ref:`πŸ”—` -Sets the rotation axis at ``joint`` in the bone chain's joint list when :ref:`is_config_individual` is ``true``. +Sets the rotation axis at ``joint`` in the bone chain's joint list when :ref:`is_config_individual()` is ``true``. .. rst-class:: classref-item-separator @@ -1193,7 +1193,7 @@ Sets the rotation axis at ``joint`` in the bone chain's joint list when :ref:`is |void| **set_joint_stiffness**\ (\ index\: :ref:`int`, joint\: :ref:`int`, stiffness\: :ref:`float`\ ) :ref:`πŸ”—` -Sets the stiffness force at ``joint`` in the bone chain's joint list when :ref:`is_config_individual` is ``true``. +Sets the stiffness force at ``joint`` in the bone chain's joint list when :ref:`is_config_individual()` is ``true``. .. rst-class:: classref-item-separator @@ -1207,7 +1207,7 @@ Sets the stiffness force at ``joint`` in the bone chain's joint list when :ref:` Sets the joint radius of the bone chain. It is used to move and slide with the :ref:`SpringBoneCollision3D` in the collision list. -The value is scaled by :ref:`set_radius_damping_curve` and cached in each joint setting in the joint list. +The value is scaled by :ref:`set_radius_damping_curve()` and cached in each joint setting in the joint list. .. rst-class:: classref-item-separator @@ -1275,7 +1275,7 @@ Sets the stiffness force of the bone chain. The greater the value, the faster it If ``stiffness`` is ``0``, the modified pose will not return to the original pose. -The value is scaled by :ref:`set_stiffness_damping_curve` and cached in each joint setting in the joint list. +The value is scaled by :ref:`set_stiffness_damping_curve()` and cached in each joint setting in the joint list. .. rst-class:: classref-item-separator diff --git a/classes/class_spriteframes.rst b/classes/class_spriteframes.rst index ab0236981..8298ba514 100644 --- a/classes/class_spriteframes.rst +++ b/classes/class_spriteframes.rst @@ -94,7 +94,7 @@ Adds a new ``anim`` animation to the library. |void| **add_frame**\ (\ anim\: :ref:`StringName`, texture\: :ref:`Texture2D`, duration\: :ref:`float` = 1.0, at_position\: :ref:`int` = -1\ ) :ref:`πŸ”—` -Adds a frame to the ``anim`` animation. If ``at_position`` is ``-1``, the frame will be added to the end of the animation. ``duration`` specifies the relative duration, see :ref:`get_frame_duration` for details. +Adds a frame to the ``anim`` animation. If ``at_position`` is ``-1``, the frame will be added to the end of the animation. ``duration`` specifies the relative duration, see :ref:`get_frame_duration()` for details. .. rst-class:: classref-item-separator @@ -196,7 +196,7 @@ Returns a relative duration of the frame ``idx`` in the ``anim`` animation (defa absolute_duration = relative_duration / (animation_fps * abs(playing_speed)) -In this example, ``playing_speed`` refers to either :ref:`AnimatedSprite2D.get_playing_speed` or :ref:`AnimatedSprite3D.get_playing_speed`. +In this example, ``playing_speed`` refers to either :ref:`AnimatedSprite2D.get_playing_speed()` or :ref:`AnimatedSprite3D.get_playing_speed()`. .. rst-class:: classref-item-separator @@ -292,7 +292,7 @@ Sets the speed for the ``anim`` animation in frames per second. |void| **set_frame**\ (\ anim\: :ref:`StringName`, idx\: :ref:`int`, texture\: :ref:`Texture2D`, duration\: :ref:`float` = 1.0\ ) :ref:`πŸ”—` -Sets the ``texture`` and the ``duration`` of the frame ``idx`` in the ``anim`` animation. ``duration`` specifies the relative duration, see :ref:`get_frame_duration` for details. +Sets the ``texture`` and the ``duration`` of the frame ``idx`` in the ``anim`` animation. ``duration`` specifies the relative duration, see :ref:`get_frame_duration()` for 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_streampeer.rst b/classes/class_streampeer.rst index 28c05ed3f..f59119718 100644 --- a/classes/class_streampeer.rst +++ b/classes/class_streampeer.rst @@ -270,7 +270,7 @@ Returns a chunk data with the received bytes. The number of bytes to be received :ref:`String` **get_string**\ (\ bytes\: :ref:`int` = -1\ ) :ref:`πŸ”—` -Gets an ASCII string with byte-length ``bytes`` from the stream. If ``bytes`` is negative (default) the length will be read from the stream using the reverse process of :ref:`put_string`. +Gets an ASCII string with byte-length ``bytes`` from the stream. If ``bytes`` is negative (default) the length will be read from the stream using the reverse process of :ref:`put_string()`. .. rst-class:: classref-item-separator @@ -330,7 +330,7 @@ Gets an unsigned 64-bit value from the stream. :ref:`String` **get_utf8_string**\ (\ bytes\: :ref:`int` = -1\ ) :ref:`πŸ”—` -Gets a UTF-8 string with byte-length ``bytes`` from the stream (this decodes the string sent as UTF-8). If ``bytes`` is negative (default) the length will be read from the stream using the reverse process of :ref:`put_utf8_string`. +Gets a UTF-8 string with byte-length ``bytes`` from the stream (this decodes the string sent as UTF-8). If ``bytes`` is negative (default) the length will be read from the stream using the reverse process of :ref:`put_utf8_string()`. .. rst-class:: classref-item-separator @@ -344,7 +344,7 @@ Gets a UTF-8 string with byte-length ``bytes`` from the stream (this decodes the Gets a Variant from the stream. If ``allow_objects`` is ``true``, decoding objects is allowed. -Internally, this uses the same decoding mechanism as the :ref:`@GlobalScope.bytes_to_var` method. +Internally, this uses the same decoding mechanism as the :ref:`@GlobalScope.bytes_to_var()` method. \ **Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. @@ -468,7 +468,7 @@ Sends a chunk of data through the connection. If all the data could not be sent Puts a zero-terminated ASCII string into the stream prepended by a 32-bit unsigned integer representing its size. -\ **Note:** To put an ASCII string without prepending its size, you can use :ref:`put_data`: +\ **Note:** To put an ASCII string without prepending its size, you can use :ref:`put_data()`: .. tabs:: @@ -543,7 +543,7 @@ Puts an unsigned 64-bit value into the stream. Puts a zero-terminated UTF-8 string into the stream prepended by a 32 bits unsigned integer representing its size. -\ **Note:** To put a UTF-8 string without prepending its size, you can use :ref:`put_data`: +\ **Note:** To put a UTF-8 string without prepending its size, you can use :ref:`put_data()`: .. tabs:: @@ -570,7 +570,7 @@ Puts a zero-terminated UTF-8 string into the stream prepended by a 32 bits unsig Puts a Variant into the stream. If ``full_objects`` is ``true`` encoding objects is allowed (and can potentially include code). -Internally, this uses the same encoding mechanism as the :ref:`@GlobalScope.var_to_bytes` method. +Internally, this uses the same encoding mechanism as the :ref:`@GlobalScope.var_to_bytes()` method. .. |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_streampeergzip.rst b/classes/class_streampeergzip.rst index 853765553..8870bb807 100644 --- a/classes/class_streampeergzip.rst +++ b/classes/class_streampeergzip.rst @@ -23,7 +23,7 @@ Description This class allows to compress or decompress data using GZIP/deflate in a streaming fashion. This is particularly useful when compressing or decompressing files that have to be sent through the network without needing to allocate them all in memory. -After starting the stream via :ref:`start_compression` (or :ref:`start_decompression`), calling :ref:`StreamPeer.put_partial_data` on this stream will compress (or decompress) the data, writing it to the internal buffer. Calling :ref:`StreamPeer.get_available_bytes` will return the pending bytes in the internal buffer, and :ref:`StreamPeer.get_partial_data` will retrieve the compressed (or decompressed) bytes from it. When the stream is over, you must call :ref:`finish` to ensure the internal buffer is properly flushed (make sure to call :ref:`StreamPeer.get_available_bytes` on last time to check if more data needs to be read after that). +After starting the stream via :ref:`start_compression()` (or :ref:`start_decompression()`), calling :ref:`StreamPeer.put_partial_data()` on this stream will compress (or decompress) the data, writing it to the internal buffer. Calling :ref:`StreamPeer.get_available_bytes()` will return the pending bytes in the internal buffer, and :ref:`StreamPeer.get_partial_data()` will retrieve the compressed (or decompressed) bytes from it. When the stream is over, you must call :ref:`finish()` to ensure the internal buffer is properly flushed (make sure to call :ref:`StreamPeer.get_available_bytes()` on last time to check if more data needs to be read after that). .. rst-class:: classref-reftable-group diff --git a/classes/class_streampeertcp.rst b/classes/class_streampeertcp.rst index eb67657b1..55bb3e140 100644 --- a/classes/class_streampeertcp.rst +++ b/classes/class_streampeertcp.rst @@ -115,7 +115,7 @@ Method Descriptions Opens the TCP socket, and binds it to the specified local address. -This method is generally not needed, and only used to force the subsequent call to :ref:`connect_to_host` to use the specified ``host`` and ``port`` as source address. This can be desired in some NAT punchthrough techniques, or when forcing the source network interface. +This method is generally not needed, and only used to force the subsequent call to :ref:`connect_to_host()` to use the specified ``host`` and ``port`` as source address. This can be desired in some NAT punchthrough techniques, or when forcing the source network interface. .. rst-class:: classref-item-separator @@ -199,7 +199,7 @@ Returns the status of the connection, see :ref:`Status` **poll**\ (\ ) :ref:`πŸ”—` -Poll the socket, updating its state. See :ref:`get_status`. +Poll the socket, updating its state. See :ref:`get_status()`. .. rst-class:: classref-item-separator diff --git a/classes/class_streampeertls.rst b/classes/class_streampeertls.rst index 7d3b3f1a2..d5b2ae6ff 100644 --- a/classes/class_streampeertls.rst +++ b/classes/class_streampeertls.rst @@ -122,7 +122,7 @@ Method Descriptions :ref:`Error` **accept_stream**\ (\ stream\: :ref:`StreamPeer`, server_options\: :ref:`TLSOptions`\ ) :ref:`πŸ”—` -Accepts a peer connection as a server using the given ``server_options``. See :ref:`TLSOptions.server`. +Accepts a peer connection as a server using the given ``server_options``. See :ref:`TLSOptions.server()`. .. rst-class:: classref-item-separator @@ -134,7 +134,7 @@ Accepts a peer connection as a server using the given ``server_options``. See :r :ref:`Error` **connect_to_stream**\ (\ stream\: :ref:`StreamPeer`, common_name\: :ref:`String`, client_options\: :ref:`TLSOptions` = null\ ) :ref:`πŸ”—` -Connects to a peer using an underlying :ref:`StreamPeer` ``stream`` and verifying the remote certificate is correctly signed for the given ``common_name``. You can pass the optional ``client_options`` parameter to customize the trusted certification authorities, or disable the common name verification. See :ref:`TLSOptions.client` and :ref:`TLSOptions.client_unsafe`. +Connects to a peer using an underlying :ref:`StreamPeer` ``stream`` and verifying the remote certificate is correctly signed for the given ``common_name``. You can pass the optional ``client_options`` parameter to customize the trusted certification authorities, or disable the common name verification. See :ref:`TLSOptions.client()` and :ref:`TLSOptions.client_unsafe()`. .. rst-class:: classref-item-separator @@ -170,7 +170,7 @@ Returns the status of the connection. See :ref:`Status` **get_stream**\ (\ ) |const| :ref:`πŸ”—` -Returns the underlying :ref:`StreamPeer` connection, used in :ref:`accept_stream` or :ref:`connect_to_stream`. +Returns the underlying :ref:`StreamPeer` connection, used in :ref:`accept_stream()` or :ref:`connect_to_stream()`. .. rst-class:: classref-item-separator @@ -182,7 +182,7 @@ Returns the underlying :ref:`StreamPeer` connection, used in : |void| **poll**\ (\ ) :ref:`πŸ”—` -Poll the connection to check for incoming bytes. Call this right before :ref:`StreamPeer.get_available_bytes` for it to work properly. +Poll the connection to check for incoming bytes. Call this right before :ref:`StreamPeer.get_available_bytes()` for it to work properly. .. |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_string.rst b/classes/class_string.rst index 20a9dc19d..f34bc3b60 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -19,9 +19,9 @@ Description This is the built-in string Variant type (and the one used by GDScript). Strings may contain any number of Unicode characters, and expose methods useful for manipulating and generating strings. Strings are reference-counted and use a copy-on-write approach (every modification to a string returns a new **String**), so passing them around is cheap in resources. -Some string methods have corresponding variations. Variations suffixed with ``n`` (:ref:`countn`, :ref:`findn`, :ref:`replacen`, etc.) are **case-insensitive** (they make no distinction between uppercase and lowercase letters). Method variations prefixed with ``r`` (:ref:`rfind`, :ref:`rsplit`, etc.) are reversed, and start from the end of the string, instead of the beginning. +Some string methods have corresponding variations. Variations suffixed with ``n`` (:ref:`countn()`, :ref:`findn()`, :ref:`replacen()`, etc.) are **case-insensitive** (they make no distinction between uppercase and lowercase letters). Method variations prefixed with ``r`` (:ref:`rfind()`, :ref:`rsplit()`, etc.) are reversed, and start from the end of the string, instead of the beginning. -To convert any :ref:`Variant` to or from a string, see :ref:`@GlobalScope.str`, :ref:`@GlobalScope.str_to_var`, and :ref:`@GlobalScope.var_to_str`. +To convert any :ref:`Variant` to or from a string, see :ref:`@GlobalScope.str()`, :ref:`@GlobalScope.str_to_var()`, and :ref:`@GlobalScope.var_to_str()`. \ **Note:** In a boolean context, a string will evaluate to ``false`` if it is empty (``""``). Otherwise, a string will always evaluate to ``true``. @@ -378,7 +378,7 @@ Method Descriptions :ref:`bool` **begins_with**\ (\ text\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the string begins with the given ``text``. See also :ref:`ends_with`. +Returns ``true`` if the string begins with the given ``text``. See also :ref:`ends_with()`. .. rst-class:: classref-item-separator @@ -494,7 +494,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:`filecasecmp_to`, and :ref:`naturalcasecmp_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 @@ -541,7 +541,7 @@ Returns ``true`` if the string contains ``what``. In GDScript, this corresponds -If you need to know where ``what`` is within the string, use :ref:`find`. See also :ref:`containsn`. +If you need to know where ``what`` is within the string, use :ref:`find()`. See also :ref:`containsn()`. .. rst-class:: classref-item-separator @@ -555,7 +555,7 @@ If you need to know where ``what`` is within the string, use :ref:`find`. See also :ref:`contains`. +If you need to know where ``what`` is within the string, use :ref:`findn()`. See also :ref:`contains()`. .. rst-class:: classref-item-separator @@ -591,7 +591,7 @@ Returns the number of occurrences of the substring ``what`` between ``from`` and :ref:`String` **dedent**\ (\ ) |const| :ref:`πŸ”—` -Returns a copy of the string with indentation (leading tabs and spaces) removed. See also :ref:`indent` to add indentation. +Returns a copy of the string with indentation (leading tabs and spaces) removed. See also :ref:`indent()` to add indentation. .. rst-class:: classref-item-separator @@ -603,7 +603,7 @@ Returns a copy of the string with indentation (leading tabs and spaces) removed. :ref:`bool` **ends_with**\ (\ text\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the string ends with the given ``text``. See also :ref:`begins_with`. +Returns ``true`` if the string ends with the given ``text``. See also :ref:`begins_with()`. .. rst-class:: classref-item-separator @@ -627,9 +627,9 @@ Returns a string with ``chars`` characters erased starting from ``position``. If :ref:`int` **filecasecmp_to**\ (\ to\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Like :ref:`naturalcasecmp_to` but prioritizes strings that begin with periods (``.``) and underscores (``_``) before any other character. Useful when sorting folders or file names. +Like :ref:`naturalcasecmp_to()` but prioritizes 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`. +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 @@ -641,9 +641,9 @@ To get a :ref:`bool` result from a string comparison, use the ``==`` :ref:`int` **filenocasecmp_to**\ (\ to\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Like :ref:`naturalnocasecmp_to` but prioritizes strings that begin with periods (``.``) and underscores (``_``) before any other character. Useful when sorting folders or file names. +Like :ref:`naturalnocasecmp_to()` but prioritizes 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`. +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 @@ -678,7 +678,7 @@ Returns the index of the **first** occurrence of ``what`` in this string, or ``- -\ **Note:** If you just want to know whether the string contains ``what``, use :ref:`contains`. In GDScript, you may also use the ``in`` operator. +\ **Note:** If you just want to know whether the string contains ``what``, use :ref:`contains()`. In GDScript, you may also use the ``in`` operator. .. rst-class:: classref-item-separator @@ -723,7 +723,7 @@ Some additional handling is performed when ``values`` is an :ref:`Array`, the property names from :ref:`Object.get_property_list` are used as keys. +When passing an :ref:`Object`, the property names from :ref:`Object.get_property_list()` are used as keys. :: @@ -828,7 +828,7 @@ If the string is a valid file path, returns the file name, including the extensi Splits the string using a ``delimiter`` and returns the substring at index ``slice``. Returns the original string if ``delimiter`` does not occur in the string. Returns an empty string if the ``slice`` does not exist. -This is faster than :ref:`split`, if you only need one substring. +This is faster than :ref:`split()`, if you only need one substring. :: @@ -844,7 +844,7 @@ This is faster than :ref:`split`, if you only need on :ref:`int` **get_slice_count**\ (\ delimiter\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Returns the total number of slices when the string is split with the given ``delimiter`` (see :ref:`split`). +Returns the total number of slices when the string is split with the given ``delimiter`` (see :ref:`split()`). .. rst-class:: classref-item-separator @@ -858,7 +858,7 @@ Returns the total number of slices when the string is split with the given ``del Splits the string using a Unicode character with code ``delimiter`` and returns the substring at index ``slice``. Returns an empty string if the ``slice`` does not exist. -This is faster than :ref:`split`, if you only need one substring. +This is faster than :ref:`split()`, if you only need one substring. .. rst-class:: classref-item-separator @@ -954,7 +954,7 @@ The result is in `IEC prefix format ` **indent**\ (\ prefix\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Indents every line of the string with the given ``prefix``. Empty lines are not indented. See also :ref:`dedent` to remove indentation. +Indents every line of the string with the given ``prefix``. Empty lines are not indented. See also :ref:`dedent()` to remove indentation. For example, the string can be indented with two tabulations using ``"\t\t"``, or four spaces using ``" "``. @@ -980,7 +980,7 @@ Inserts ``what`` at the given ``position`` in the string. :ref:`bool` **is_absolute_path**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the string is a path to a file or directory, and its starting point is explicitly defined. This method is the opposite of :ref:`is_relative_path`. +Returns ``true`` if the string is a path to a file or directory, and its starting point is explicitly defined. This method is the opposite of :ref:`is_relative_path()`. This includes all paths starting with ``"res://"``, ``"user://"``, ``"C:\"``, ``"/"``, etc. @@ -994,7 +994,7 @@ This includes all paths starting with ``"res://"``, ``"user://"``, ``"C:\"``, `` :ref:`bool` **is_empty**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the string's length is ``0`` (``""``). See also :ref:`length`. +Returns ``true`` if the string's length is ``0`` (``""``). See also :ref:`length()`. .. rst-class:: classref-item-separator @@ -1006,7 +1006,7 @@ Returns ``true`` if the string's length is ``0`` (``""``). See also :ref:`length :ref:`bool` **is_relative_path**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the string is a path, and its starting point is dependent on context. The path could begin from the current directory, or the current :ref:`Node` (if the string is derived from a :ref:`NodePath`), and may sometimes be prefixed with ``"./"``. This method is the opposite of :ref:`is_absolute_path`. +Returns ``true`` if the string is a path, and its starting point is dependent on context. The path could begin from the current directory, or the current :ref:`Node` (if the string is derived from a :ref:`NodePath`), and may sometimes be prefixed with ``"./"``. This method is the opposite of :ref:`is_absolute_path()`. .. rst-class:: classref-item-separator @@ -1060,7 +1060,7 @@ Returns ``true`` if this string is a valid ASCII identifier. A valid ASCII ident print("1st_method".is_valid_ascii_identifier()) # Prints false print("MyMethod#2".is_valid_ascii_identifier()) # Prints false -See also :ref:`is_valid_unicode_identifier`. +See also :ref:`is_valid_unicode_identifier()`. .. rst-class:: classref-item-separator @@ -1084,7 +1084,7 @@ Returns ``true`` if this string does not contain characters that are not allowed :ref:`bool` **is_valid_float**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this string represents a valid floating-point number. A valid float may contain only digits, one decimal point (``.``), and the exponent letter (``e``). It may also be prefixed with a positive (``+``) or negative (``-``) sign. Any valid integer is also a valid float (see :ref:`is_valid_int`). See also :ref:`to_float`. +Returns ``true`` if this string represents a valid floating-point number. A valid float may contain only digits, one decimal point (``.``), and the exponent letter (``e``). It may also be prefixed with a positive (``+``) or negative (``-``) sign. Any valid integer is also a valid float (see :ref:`is_valid_int()`). See also :ref:`to_float()`. :: @@ -1125,7 +1125,7 @@ If ``with_prefix`` is ``true``, the hexadecimal number needs to prefixed by ``"0 :ref:`bool` **is_valid_html_color**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this string is a valid color in hexadecimal HTML notation. The string must be a hexadecimal value (see :ref:`is_valid_hex_number`) of either 3, 4, 6 or 8 digits, and may be prefixed by a hash sign (``#``). Other HTML notations for colors, such as names or ``hsl()``, are not considered valid. See also :ref:`Color.html`. +Returns ``true`` if this string is a valid color in hexadecimal HTML notation. The string must be a hexadecimal value (see :ref:`is_valid_hex_number()`) of either 3, 4, 6 or 8 digits, and may be prefixed by a hash sign (``#``). Other HTML notations for colors, such as names or ``hsl()``, are not considered valid. See also :ref:`Color.html()`. .. rst-class:: classref-item-separator @@ -1137,7 +1137,7 @@ Returns ``true`` if this string is a valid color in hexadecimal HTML notation. T :ref:`bool` **is_valid_identifier**\ (\ ) |const| :ref:`πŸ”—` -**Deprecated:** Use :ref:`is_valid_ascii_identifier` instead. +**Deprecated:** Use :ref:`is_valid_ascii_identifier()` instead. Returns ``true`` if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores (``_``), and the first character may not be a digit. @@ -1158,7 +1158,7 @@ Returns ``true`` if this string is a valid identifier. A valid identifier may co :ref:`bool` **is_valid_int**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this string represents a valid integer. A valid integer only contains digits, and may be prefixed with a positive (``+``) or negative (``-``) sign. See also :ref:`to_int`. +Returns ``true`` if this string represents a valid integer. A valid integer only contains digits, and may be prefixed with a positive (``+``) or negative (``-``) sign. See also :ref:`to_int()`. :: @@ -1203,9 +1203,9 @@ A valid Unicode identifier must begin with a Unicode character of class ``XID_St print("Π²Ρ‹Π½ΠΎΡΠ»ΠΈΠ²ΠΎΡΡ‚ΡŒ".is_valid_unicode_identifier()) # Prints true print("δ½“εŠ›".is_valid_unicode_identifier()) # Prints true -See also :ref:`is_valid_ascii_identifier`. +See also :ref:`is_valid_ascii_identifier()`. -\ **Note:** This method checks identifiers the same way as GDScript. See :ref:`TextServer.is_valid_identifier` for more advanced checks. +\ **Note:** This method checks identifiers the same way as GDScript. See :ref:`TextServer.is_valid_identifier()` for more advanced checks. .. rst-class:: classref-item-separator @@ -1217,7 +1217,7 @@ See also :ref:`is_valid_ascii_identifier` **join**\ (\ parts\: :ref:`PackedStringArray`\ ) |const| :ref:`πŸ”—` -Returns the concatenation of ``parts``' elements, with each element separated by the string calling this method. This method is the opposite of :ref:`split`. +Returns the concatenation of ``parts``' elements, with each element separated by the string calling this method. This method is the opposite of :ref:`split()`. .. tabs:: @@ -1249,7 +1249,7 @@ Returns the concatenation of ``parts``' elements, with each element separated by :ref:`String` **json_escape**\ (\ ) |const| :ref:`πŸ”—` -Returns a copy of the string with special characters escaped using the JSON standard. Because it closely matches the C standard, it is possible to use :ref:`c_unescape` to unescape the string, if necessary. +Returns a copy of the string with special characters escaped using the JSON standard. Because it closely matches the C standard, it is possible to use :ref:`c_unescape()` to unescape the string, if necessary. .. rst-class:: classref-item-separator @@ -1278,7 +1278,7 @@ Returns the first ``length`` characters from the beginning of the string. If ``l :ref:`int` **length**\ (\ ) |const| :ref:`πŸ”—` -Returns the number of characters in the string. Empty strings (``""``) always return ``0``. See also :ref:`is_empty`. +Returns the number of characters in the string. Empty strings (``""``) always return ``0``. See also :ref:`is_empty()`. .. rst-class:: classref-item-separator @@ -1290,7 +1290,7 @@ Returns the number of characters in the string. Empty strings (``""``) always re :ref:`String` **lpad**\ (\ min_length\: :ref:`int`, character\: :ref:`String` = " "\ ) |const| :ref:`πŸ”—` -Formats the string to be at least ``min_length`` long by adding ``character``\ s to the left of the string, if necessary. See also :ref:`rpad`. +Formats the string to be at least ``min_length`` long by adding ``character``\ s to the left of the string, if necessary. See also :ref:`rpad()`. .. rst-class:: classref-item-separator @@ -1302,9 +1302,9 @@ Formats the string to be at least ``min_length`` long by adding ``character``\ s :ref:`String` **lstrip**\ (\ chars\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Removes a set of characters defined in ``chars`` from the string's beginning. See also :ref:`rstrip`. +Removes a set of characters defined in ``chars`` from the string's beginning. See also :ref:`rstrip()`. -\ **Note:** ``chars`` is not a prefix. Use :ref:`trim_prefix` to remove a single prefix, rather than a set of characters. +\ **Note:** ``chars`` is not a prefix. Use :ref:`trim_prefix()` to remove a single prefix, rather than a set of characters. .. rst-class:: classref-item-separator @@ -1370,7 +1370,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:`filecasecmp_to`, and :ref:`nocasecmp_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 @@ -1388,7 +1388,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:`filenocasecmp_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 @@ -1404,7 +1404,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:`filenocasecmp_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 @@ -1597,7 +1597,7 @@ Returns the copy of this string in reverse order. This operation works on unicod :ref:`int` **rfind**\ (\ what\: :ref:`String`, from\: :ref:`int` = -1\ ) |const| :ref:`πŸ”—` -Returns the index of the **last** occurrence of ``what`` in this string, or ``-1`` if there are none. The search's start can be specified with ``from``, continuing to the beginning of the string. This method is the reverse of :ref:`find`. +Returns the index of the **last** occurrence of ``what`` in this string, or ``-1`` if there are none. The search's start can be specified with ``from``, continuing to the beginning of the string. This method is the reverse of :ref:`find()`. .. rst-class:: classref-item-separator @@ -1609,7 +1609,7 @@ Returns the index of the **last** occurrence of ``what`` in this string, or ``-1 :ref:`int` **rfindn**\ (\ what\: :ref:`String`, from\: :ref:`int` = -1\ ) |const| :ref:`πŸ”—` -Returns the index of the **last** **case-insensitive** occurrence of ``what`` in this string, or ``-1`` if there are none. The starting search index can be specified with ``from``, continuing to the beginning of the string. This method is the reverse of :ref:`findn`. +Returns the index of the **last** **case-insensitive** occurrence of ``what`` in this string, or ``-1`` if there are none. The starting search index can be specified with ``from``, continuing to the beginning of the string. This method is the reverse of :ref:`findn()`. .. rst-class:: classref-item-separator @@ -1638,7 +1638,7 @@ Returns the last ``length`` characters from the end of the string. If ``length`` :ref:`String` **rpad**\ (\ min_length\: :ref:`int`, character\: :ref:`String` = " "\ ) |const| :ref:`πŸ”—` -Formats the string to be at least ``min_length`` long, by adding ``character``\ s to the right of the string, if necessary. See also :ref:`lpad`. +Formats the string to be at least ``min_length`` long, by adding ``character``\ s to the right of the string, if necessary. See also :ref:`lpad()`. .. rst-class:: classref-item-separator @@ -1654,7 +1654,7 @@ Splits the string using a ``delimiter`` and returns an array of the substrings, If ``allow_empty`` is ``false``, empty strings between adjacent delimiters are excluded from the array. -If ``maxsplit`` is greater than ``0``, the number of splits may not exceed ``maxsplit``. By default, the entire string is split, which is mostly identical to :ref:`split`. +If ``maxsplit`` is greater than ``0``, the number of splits may not exceed ``maxsplit``. By default, the entire string is split, which is mostly identical to :ref:`split()`. .. tabs:: @@ -1684,9 +1684,9 @@ If ``maxsplit`` is greater than ``0``, the number of splits may not exceed ``max :ref:`String` **rstrip**\ (\ chars\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Removes a set of characters defined in ``chars`` from the string's end. See also :ref:`lstrip`. +Removes a set of characters defined in ``chars`` from the string's end. See also :ref:`lstrip()`. -\ **Note:** ``chars`` is not a suffix. Use :ref:`trim_suffix` to remove a single suffix, rather than a set of characters. +\ **Note:** ``chars`` is not a suffix. Use :ref:`trim_suffix()` to remove a single suffix, rather than a set of characters. .. rst-class:: classref-item-separator @@ -1782,7 +1782,7 @@ If the string is a valid file path, converts the string into a canonical path. T :ref:`PackedStringArray` **split**\ (\ delimiter\: :ref:`String` = "", allow_empty\: :ref:`bool` = true, maxsplit\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Splits the string using a ``delimiter`` and returns an array of the substrings. If ``delimiter`` is an empty string, each substring will be a single character. This method is the opposite of :ref:`join`. +Splits the string using a ``delimiter`` and returns an array of the substrings. If ``delimiter`` is an empty string, each substring will be a single character. This method is the opposite of :ref:`join()`. If ``allow_empty`` is ``false``, empty strings between adjacent delimiters are excluded from the array. @@ -1811,7 +1811,7 @@ If ``maxsplit`` is greater than ``0``, the number of splits may not exceed ``max -\ **Note:** If you only need one substring from the array, consider using :ref:`get_slice` which is faster. If you need to split strings with more complex rules, use the :ref:`RegEx` class instead. +\ **Note:** If you only need one substring from the array, consider using :ref:`get_slice()` which is faster. If you need to split strings with more complex rules, use the :ref:`RegEx` class instead. .. rst-class:: classref-item-separator @@ -1881,7 +1881,7 @@ Returns part of the string from the position ``from`` with length ``len``. If `` :ref:`PackedByteArray` **to_ascii_buffer**\ (\ ) |const| :ref:`πŸ”—` -Converts the string to an `ASCII `__/Latin-1 encoded :ref:`PackedByteArray`. This method is slightly faster than :ref:`to_utf8_buffer`, but replaces all unsupported characters with spaces. This is the inverse of :ref:`PackedByteArray.get_string_from_ascii`. +Converts the string to an `ASCII `__/Latin-1 encoded :ref:`PackedByteArray`. This method is slightly faster than :ref:`to_utf8_buffer()`, but replaces all unsupported characters with spaces. This is the inverse of :ref:`PackedByteArray.get_string_from_ascii()`. .. rst-class:: classref-item-separator @@ -1905,7 +1905,7 @@ Returns the string converted to ``camelCase``. :ref:`float` **to_float**\ (\ ) |const| :ref:`πŸ”—` -Converts the string representing a decimal number into a :ref:`float`. This method stops on the first non-number character, except the first decimal point (``.``) and the exponent letter (``e``). See also :ref:`is_valid_float`. +Converts the string representing a decimal number into a :ref:`float`. This method stops on the first non-number character, except the first decimal point (``.``) and the exponent letter (``e``). See also :ref:`is_valid_float()`. :: @@ -1925,7 +1925,7 @@ Converts the string representing a decimal number into a :ref:`float` **to_int**\ (\ ) |const| :ref:`πŸ”—` -Converts the string representing an integer number into an :ref:`int`. This method removes any non-number character and stops at the first decimal point (``.``). See also :ref:`is_valid_int`. +Converts the string representing an integer number into an :ref:`int`. This method removes any non-number character and stops at the first decimal point (``.``). See also :ref:`is_valid_int()`. :: @@ -2011,7 +2011,7 @@ Returns the string converted to ``UPPERCASE``. :ref:`PackedByteArray` **to_utf8_buffer**\ (\ ) |const| :ref:`πŸ”—` -Converts the string to a `UTF-8 `__ encoded :ref:`PackedByteArray`. This method is slightly slower than :ref:`to_ascii_buffer`, but supports all UTF-8 characters. For most cases, prefer using this method. This is the inverse of :ref:`PackedByteArray.get_string_from_utf8`. +Converts the string to a `UTF-8 `__ encoded :ref:`PackedByteArray`. This method is slightly slower than :ref:`to_ascii_buffer()`, but supports all UTF-8 characters. For most cases, prefer using this method. This is the inverse of :ref:`PackedByteArray.get_string_from_utf8()`. .. rst-class:: classref-item-separator @@ -2023,7 +2023,7 @@ Converts the string to a `UTF-8 `__ encoded :ref:`PackedByteArray` **to_utf16_buffer**\ (\ ) |const| :ref:`πŸ”—` -Converts the string to a `UTF-16 `__ encoded :ref:`PackedByteArray`. This is the inverse of :ref:`PackedByteArray.get_string_from_utf16`. +Converts the string to a `UTF-16 `__ encoded :ref:`PackedByteArray`. This is the inverse of :ref:`PackedByteArray.get_string_from_utf16()`. .. rst-class:: classref-item-separator @@ -2035,7 +2035,7 @@ Converts the string to a `UTF-16 `__ encod :ref:`PackedByteArray` **to_utf32_buffer**\ (\ ) |const| :ref:`πŸ”—` -Converts the string to a `UTF-32 `__ encoded :ref:`PackedByteArray`. This is the inverse of :ref:`PackedByteArray.get_string_from_utf32`. +Converts the string to a `UTF-32 `__ encoded :ref:`PackedByteArray`. This is the inverse of :ref:`PackedByteArray.get_string_from_utf32()`. .. rst-class:: classref-item-separator @@ -2047,7 +2047,7 @@ Converts the string to a `UTF-32 `__ encod :ref:`PackedByteArray` **to_wchar_buffer**\ (\ ) |const| :ref:`πŸ”—` -Converts the string to a `wide character `__ (``wchar_t``, UTF-16 on Windows, UTF-32 on other platforms) encoded :ref:`PackedByteArray`. This is the inverse of :ref:`PackedByteArray.get_string_from_wchar`. +Converts the string to a `wide character `__ (``wchar_t``, UTF-16 on Windows, UTF-32 on other platforms) encoded :ref:`PackedByteArray`. This is the inverse of :ref:`PackedByteArray.get_string_from_wchar()`. .. rst-class:: classref-item-separator @@ -2095,7 +2095,7 @@ Returns the character code at position ``at``. :ref:`String` **uri_decode**\ (\ ) |const| :ref:`πŸ”—` -Decodes the string from its URL-encoded format. This method is meant to properly decode the parameters in a URL when receiving an HTTP request. See also :ref:`uri_encode`. +Decodes the string from its URL-encoded format. This method is meant to properly decode the parameters in a URL when receiving an HTTP request. See also :ref:`uri_encode()`. .. tabs:: @@ -2122,7 +2122,7 @@ Decodes the string from its URL-encoded format. This method is meant to properly :ref:`String` **uri_encode**\ (\ ) |const| :ref:`πŸ”—` -Encodes the string to URL-friendly format. This method is meant to properly encode the parameters in a URL when sending an HTTP request. See also :ref:`uri_decode`. +Encodes the string to URL-friendly format. This method is meant to properly encode the parameters in a URL when sending an HTTP request. See also :ref:`uri_decode()`. .. tabs:: @@ -2153,7 +2153,7 @@ Encodes the string to URL-friendly format. This method is meant to properly enco :ref:`String` **validate_filename**\ (\ ) |const| :ref:`πŸ”—` -Returns a copy of the string with all characters that are not allowed in :ref:`is_valid_filename` replaced with underscores. +Returns a copy of the string with all characters that are not allowed in :ref:`is_valid_filename()` replaced with underscores. .. rst-class:: classref-item-separator diff --git a/classes/class_stringname.rst b/classes/class_stringname.rst index ca8f28803..ac06d1a17 100644 --- a/classes/class_stringname.rst +++ b/classes/class_stringname.rst @@ -349,7 +349,7 @@ Method Descriptions :ref:`bool` **begins_with**\ (\ text\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the string begins with the given ``text``. See also :ref:`ends_with`. +Returns ``true`` if the string begins with the given ``text``. See also :ref:`ends_with()`. .. rst-class:: classref-item-separator @@ -465,7 +465,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:`filecasecmp_to`, and :ref:`naturalcasecmp_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 @@ -495,7 +495,7 @@ Returns ``true`` if the string contains ``what``. In GDScript, this corresponds -If you need to know where ``what`` is within the string, use :ref:`find`. See also :ref:`containsn`. +If you need to know where ``what`` is within the string, use :ref:`find()`. See also :ref:`containsn()`. .. rst-class:: classref-item-separator @@ -509,7 +509,7 @@ If you need to know where ``what`` is within the string, use :ref:`find`. See also :ref:`contains`. +If you need to know where ``what`` is within the string, use :ref:`findn()`. See also :ref:`contains()`. .. rst-class:: classref-item-separator @@ -545,7 +545,7 @@ Returns the number of occurrences of the substring ``what`` between ``from`` and :ref:`String` **dedent**\ (\ ) |const| :ref:`πŸ”—` -Returns a copy of the string with indentation (leading tabs and spaces) removed. See also :ref:`indent` to add indentation. +Returns a copy of the string with indentation (leading tabs and spaces) removed. See also :ref:`indent()` to add indentation. .. rst-class:: classref-item-separator @@ -557,7 +557,7 @@ Returns a copy of the string with indentation (leading tabs and spaces) removed. :ref:`bool` **ends_with**\ (\ text\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the string ends with the given ``text``. See also :ref:`begins_with`. +Returns ``true`` if the string ends with the given ``text``. See also :ref:`begins_with()`. .. rst-class:: classref-item-separator @@ -581,9 +581,9 @@ Returns a string with ``chars`` characters erased starting from ``position``. If :ref:`int` **filecasecmp_to**\ (\ to\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Like :ref:`naturalcasecmp_to` but prioritizes strings that begin with periods (``.``) and underscores (``_``) before any other character. Useful when sorting folders or file names. +Like :ref:`naturalcasecmp_to()` but prioritizes 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`. +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 @@ -595,9 +595,9 @@ To get a :ref:`bool` result from a string comparison, use the ``==`` :ref:`int` **filenocasecmp_to**\ (\ to\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Like :ref:`naturalnocasecmp_to` but prioritizes strings that begin with periods (``.``) and underscores (``_``) before any other character. Useful when sorting folders or file names. +Like :ref:`naturalnocasecmp_to()` but prioritizes 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`. +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 @@ -632,7 +632,7 @@ Returns the index of the **first** occurrence of ``what`` in this string, or ``- -\ **Note:** If you just want to know whether the string contains ``what``, use :ref:`contains`. In GDScript, you may also use the ``in`` operator. +\ **Note:** If you just want to know whether the string contains ``what``, use :ref:`contains()`. In GDScript, you may also use the ``in`` operator. .. rst-class:: classref-item-separator @@ -677,7 +677,7 @@ Some additional handling is performed when ``values`` is an :ref:`Array`, the property names from :ref:`Object.get_property_list` are used as keys. +When passing an :ref:`Object`, the property names from :ref:`Object.get_property_list()` are used as keys. :: @@ -782,7 +782,7 @@ If the string is a valid file path, returns the file name, including the extensi Splits the string using a ``delimiter`` and returns the substring at index ``slice``. Returns the original string if ``delimiter`` does not occur in the string. Returns an empty string if the ``slice`` does not exist. -This is faster than :ref:`split`, if you only need one substring. +This is faster than :ref:`split()`, if you only need one substring. :: @@ -798,7 +798,7 @@ This is faster than :ref:`split`, if you only nee :ref:`int` **get_slice_count**\ (\ delimiter\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Returns the total number of slices when the string is split with the given ``delimiter`` (see :ref:`split`). +Returns the total number of slices when the string is split with the given ``delimiter`` (see :ref:`split()`). .. rst-class:: classref-item-separator @@ -812,7 +812,7 @@ Returns the total number of slices when the string is split with the given ``del Splits the string using a Unicode character with code ``delimiter`` and returns the substring at index ``slice``. Returns an empty string if the ``slice`` does not exist. -This is faster than :ref:`split`, if you only need one substring. +This is faster than :ref:`split()`, if you only need one substring. .. rst-class:: classref-item-separator @@ -894,7 +894,7 @@ Converts the string representing a hexadecimal number into an :ref:`int` **indent**\ (\ prefix\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Indents every line of the string with the given ``prefix``. Empty lines are not indented. See also :ref:`dedent` to remove indentation. +Indents every line of the string with the given ``prefix``. Empty lines are not indented. See also :ref:`dedent()` to remove indentation. For example, the string can be indented with two tabulations using ``"\t\t"``, or four spaces using ``" "``. @@ -920,7 +920,7 @@ Inserts ``what`` at the given ``position`` in the string. :ref:`bool` **is_absolute_path**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the string is a path to a file or directory, and its starting point is explicitly defined. This method is the opposite of :ref:`is_relative_path`. +Returns ``true`` if the string is a path to a file or directory, and its starting point is explicitly defined. This method is the opposite of :ref:`is_relative_path()`. This includes all paths starting with ``"res://"``, ``"user://"``, ``"C:\"``, ``"/"``, etc. @@ -934,7 +934,7 @@ This includes all paths starting with ``"res://"``, ``"user://"``, ``"C:\"``, `` :ref:`bool` **is_empty**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the string's length is ``0`` (``""``). See also :ref:`length`. +Returns ``true`` if the string's length is ``0`` (``""``). See also :ref:`length()`. .. rst-class:: classref-item-separator @@ -946,7 +946,7 @@ Returns ``true`` if the string's length is ``0`` (``""``). See also :ref:`length :ref:`bool` **is_relative_path**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the string is a path, and its starting point is dependent on context. The path could begin from the current directory, or the current :ref:`Node` (if the string is derived from a :ref:`NodePath`), and may sometimes be prefixed with ``"./"``. This method is the opposite of :ref:`is_absolute_path`. +Returns ``true`` if the string is a path, and its starting point is dependent on context. The path could begin from the current directory, or the current :ref:`Node` (if the string is derived from a :ref:`NodePath`), and may sometimes be prefixed with ``"./"``. This method is the opposite of :ref:`is_absolute_path()`. .. rst-class:: classref-item-separator @@ -1000,7 +1000,7 @@ Returns ``true`` if this string is a valid ASCII identifier. A valid ASCII ident print("1st_method".is_valid_ascii_identifier()) # Prints false print("MyMethod#2".is_valid_ascii_identifier()) # Prints false -See also :ref:`is_valid_unicode_identifier`. +See also :ref:`is_valid_unicode_identifier()`. .. rst-class:: classref-item-separator @@ -1024,7 +1024,7 @@ Returns ``true`` if this string does not contain characters that are not allowed :ref:`bool` **is_valid_float**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this string represents a valid floating-point number. A valid float may contain only digits, one decimal point (``.``), and the exponent letter (``e``). It may also be prefixed with a positive (``+``) or negative (``-``) sign. Any valid integer is also a valid float (see :ref:`is_valid_int`). See also :ref:`to_float`. +Returns ``true`` if this string represents a valid floating-point number. A valid float may contain only digits, one decimal point (``.``), and the exponent letter (``e``). It may also be prefixed with a positive (``+``) or negative (``-``) sign. Any valid integer is also a valid float (see :ref:`is_valid_int()`). See also :ref:`to_float()`. :: @@ -1065,7 +1065,7 @@ If ``with_prefix`` is ``true``, the hexadecimal number needs to prefixed by ``"0 :ref:`bool` **is_valid_html_color**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this string is a valid color in hexadecimal HTML notation. The string must be a hexadecimal value (see :ref:`is_valid_hex_number`) of either 3, 4, 6 or 8 digits, and may be prefixed by a hash sign (``#``). Other HTML notations for colors, such as names or ``hsl()``, are not considered valid. See also :ref:`Color.html`. +Returns ``true`` if this string is a valid color in hexadecimal HTML notation. The string must be a hexadecimal value (see :ref:`is_valid_hex_number()`) of either 3, 4, 6 or 8 digits, and may be prefixed by a hash sign (``#``). Other HTML notations for colors, such as names or ``hsl()``, are not considered valid. See also :ref:`Color.html()`. .. rst-class:: classref-item-separator @@ -1077,7 +1077,7 @@ Returns ``true`` if this string is a valid color in hexadecimal HTML notation. T :ref:`bool` **is_valid_identifier**\ (\ ) |const| :ref:`πŸ”—` -**Deprecated:** Use :ref:`is_valid_ascii_identifier` instead. +**Deprecated:** Use :ref:`is_valid_ascii_identifier()` instead. Returns ``true`` if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores (``_``), and the first character may not be a digit. @@ -1098,7 +1098,7 @@ Returns ``true`` if this string is a valid identifier. A valid identifier may co :ref:`bool` **is_valid_int**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this string represents a valid integer. A valid integer only contains digits, and may be prefixed with a positive (``+``) or negative (``-``) sign. See also :ref:`to_int`. +Returns ``true`` if this string represents a valid integer. A valid integer only contains digits, and may be prefixed with a positive (``+``) or negative (``-``) sign. See also :ref:`to_int()`. :: @@ -1143,9 +1143,9 @@ A valid Unicode identifier must begin with a Unicode character of class ``XID_St print("Π²Ρ‹Π½ΠΎΡΠ»ΠΈΠ²ΠΎΡΡ‚ΡŒ".is_valid_unicode_identifier()) # Prints true print("δ½“εŠ›".is_valid_unicode_identifier()) # Prints true -See also :ref:`is_valid_ascii_identifier`. +See also :ref:`is_valid_ascii_identifier()`. -\ **Note:** This method checks identifiers the same way as GDScript. See :ref:`TextServer.is_valid_identifier` for more advanced checks. +\ **Note:** This method checks identifiers the same way as GDScript. See :ref:`TextServer.is_valid_identifier()` for more advanced checks. .. rst-class:: classref-item-separator @@ -1157,7 +1157,7 @@ See also :ref:`is_valid_ascii_identifier` **join**\ (\ parts\: :ref:`PackedStringArray`\ ) |const| :ref:`πŸ”—` -Returns the concatenation of ``parts``' elements, with each element separated by the string calling this method. This method is the opposite of :ref:`split`. +Returns the concatenation of ``parts``' elements, with each element separated by the string calling this method. This method is the opposite of :ref:`split()`. .. tabs:: @@ -1189,7 +1189,7 @@ Returns the concatenation of ``parts``' elements, with each element separated by :ref:`String` **json_escape**\ (\ ) |const| :ref:`πŸ”—` -Returns a copy of the string with special characters escaped using the JSON standard. Because it closely matches the C standard, it is possible to use :ref:`c_unescape` to unescape the string, if necessary. +Returns a copy of the string with special characters escaped using the JSON standard. Because it closely matches the C standard, it is possible to use :ref:`c_unescape()` to unescape the string, if necessary. .. rst-class:: classref-item-separator @@ -1218,7 +1218,7 @@ Returns the first ``length`` characters from the beginning of the string. If ``l :ref:`int` **length**\ (\ ) |const| :ref:`πŸ”—` -Returns the number of characters in the string. Empty strings (``""``) always return ``0``. See also :ref:`is_empty`. +Returns the number of characters in the string. Empty strings (``""``) always return ``0``. See also :ref:`is_empty()`. .. rst-class:: classref-item-separator @@ -1230,7 +1230,7 @@ Returns the number of characters in the string. Empty strings (``""``) always re :ref:`String` **lpad**\ (\ min_length\: :ref:`int`, character\: :ref:`String` = " "\ ) |const| :ref:`πŸ”—` -Formats the string to be at least ``min_length`` long by adding ``character``\ s to the left of the string, if necessary. See also :ref:`rpad`. +Formats the string to be at least ``min_length`` long by adding ``character``\ s to the left of the string, if necessary. See also :ref:`rpad()`. .. rst-class:: classref-item-separator @@ -1242,9 +1242,9 @@ Formats the string to be at least ``min_length`` long by adding ``character``\ s :ref:`String` **lstrip**\ (\ chars\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Removes a set of characters defined in ``chars`` from the string's beginning. See also :ref:`rstrip`. +Removes a set of characters defined in ``chars`` from the string's beginning. See also :ref:`rstrip()`. -\ **Note:** ``chars`` is not a prefix. Use :ref:`trim_prefix` to remove a single prefix, rather than a set of characters. +\ **Note:** ``chars`` is not a prefix. Use :ref:`trim_prefix()` to remove a single prefix, rather than a set of characters. .. rst-class:: classref-item-separator @@ -1310,7 +1310,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:`filecasecmp_to`, and :ref:`nocasecmp_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 @@ -1328,7 +1328,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:`filenocasecmp_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 @@ -1344,7 +1344,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:`filenocasecmp_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 @@ -1442,7 +1442,7 @@ Returns the copy of this string in reverse order. This operation works on unicod :ref:`int` **rfind**\ (\ what\: :ref:`String`, from\: :ref:`int` = -1\ ) |const| :ref:`πŸ”—` -Returns the index of the **last** occurrence of ``what`` in this string, or ``-1`` if there are none. The search's start can be specified with ``from``, continuing to the beginning of the string. This method is the reverse of :ref:`find`. +Returns the index of the **last** occurrence of ``what`` in this string, or ``-1`` if there are none. The search's start can be specified with ``from``, continuing to the beginning of the string. This method is the reverse of :ref:`find()`. .. rst-class:: classref-item-separator @@ -1454,7 +1454,7 @@ Returns the index of the **last** occurrence of ``what`` in this string, or ``-1 :ref:`int` **rfindn**\ (\ what\: :ref:`String`, from\: :ref:`int` = -1\ ) |const| :ref:`πŸ”—` -Returns the index of the **last** **case-insensitive** occurrence of ``what`` in this string, or ``-1`` if there are none. The starting search index can be specified with ``from``, continuing to the beginning of the string. This method is the reverse of :ref:`findn`. +Returns the index of the **last** **case-insensitive** occurrence of ``what`` in this string, or ``-1`` if there are none. The starting search index can be specified with ``from``, continuing to the beginning of the string. This method is the reverse of :ref:`findn()`. .. rst-class:: classref-item-separator @@ -1483,7 +1483,7 @@ Returns the last ``length`` characters from the end of the string. If ``length`` :ref:`String` **rpad**\ (\ min_length\: :ref:`int`, character\: :ref:`String` = " "\ ) |const| :ref:`πŸ”—` -Formats the string to be at least ``min_length`` long, by adding ``character``\ s to the right of the string, if necessary. See also :ref:`lpad`. +Formats the string to be at least ``min_length`` long, by adding ``character``\ s to the right of the string, if necessary. See also :ref:`lpad()`. .. rst-class:: classref-item-separator @@ -1499,7 +1499,7 @@ Splits the string using a ``delimiter`` and returns an array of the substrings, If ``allow_empty`` is ``false``, empty strings between adjacent delimiters are excluded from the array. -If ``maxsplit`` is greater than ``0``, the number of splits may not exceed ``maxsplit``. By default, the entire string is split, which is mostly identical to :ref:`split`. +If ``maxsplit`` is greater than ``0``, the number of splits may not exceed ``maxsplit``. By default, the entire string is split, which is mostly identical to :ref:`split()`. .. tabs:: @@ -1529,9 +1529,9 @@ If ``maxsplit`` is greater than ``0``, the number of splits may not exceed ``max :ref:`String` **rstrip**\ (\ chars\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Removes a set of characters defined in ``chars`` from the string's end. See also :ref:`lstrip`. +Removes a set of characters defined in ``chars`` from the string's end. See also :ref:`lstrip()`. -\ **Note:** ``chars`` is not a suffix. Use :ref:`trim_suffix` to remove a single suffix, rather than a set of characters. +\ **Note:** ``chars`` is not a suffix. Use :ref:`trim_suffix()` to remove a single suffix, rather than a set of characters. .. rst-class:: classref-item-separator @@ -1627,7 +1627,7 @@ If the string is a valid file path, converts the string into a canonical path. T :ref:`PackedStringArray` **split**\ (\ delimiter\: :ref:`String` = "", allow_empty\: :ref:`bool` = true, maxsplit\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Splits the string using a ``delimiter`` and returns an array of the substrings. If ``delimiter`` is an empty string, each substring will be a single character. This method is the opposite of :ref:`join`. +Splits the string using a ``delimiter`` and returns an array of the substrings. If ``delimiter`` is an empty string, each substring will be a single character. This method is the opposite of :ref:`join()`. If ``allow_empty`` is ``false``, empty strings between adjacent delimiters are excluded from the array. @@ -1656,7 +1656,7 @@ If ``maxsplit`` is greater than ``0``, the number of splits may not exceed ``max -\ **Note:** If you only need one substring from the array, consider using :ref:`get_slice` which is faster. If you need to split strings with more complex rules, use the :ref:`RegEx` class instead. +\ **Note:** If you only need one substring from the array, consider using :ref:`get_slice()` which is faster. If you need to split strings with more complex rules, use the :ref:`RegEx` class instead. .. rst-class:: classref-item-separator @@ -1726,7 +1726,7 @@ Returns part of the string from the position ``from`` with length ``len``. If `` :ref:`PackedByteArray` **to_ascii_buffer**\ (\ ) |const| :ref:`πŸ”—` -Converts the string to an `ASCII `__/Latin-1 encoded :ref:`PackedByteArray`. This method is slightly faster than :ref:`to_utf8_buffer`, but replaces all unsupported characters with spaces. This is the inverse of :ref:`PackedByteArray.get_string_from_ascii`. +Converts the string to an `ASCII `__/Latin-1 encoded :ref:`PackedByteArray`. This method is slightly faster than :ref:`to_utf8_buffer()`, but replaces all unsupported characters with spaces. This is the inverse of :ref:`PackedByteArray.get_string_from_ascii()`. .. rst-class:: classref-item-separator @@ -1750,7 +1750,7 @@ Returns the string converted to ``camelCase``. :ref:`float` **to_float**\ (\ ) |const| :ref:`πŸ”—` -Converts the string representing a decimal number into a :ref:`float`. This method stops on the first non-number character, except the first decimal point (``.``) and the exponent letter (``e``). See also :ref:`is_valid_float`. +Converts the string representing a decimal number into a :ref:`float`. This method stops on the first non-number character, except the first decimal point (``.``) and the exponent letter (``e``). See also :ref:`is_valid_float()`. :: @@ -1770,7 +1770,7 @@ Converts the string representing a decimal number into a :ref:`float` **to_int**\ (\ ) |const| :ref:`πŸ”—` -Converts the string representing an integer number into an :ref:`int`. This method removes any non-number character and stops at the first decimal point (``.``). See also :ref:`is_valid_int`. +Converts the string representing an integer number into an :ref:`int`. This method removes any non-number character and stops at the first decimal point (``.``). See also :ref:`is_valid_int()`. :: @@ -1856,7 +1856,7 @@ Returns the string converted to ``UPPERCASE``. :ref:`PackedByteArray` **to_utf8_buffer**\ (\ ) |const| :ref:`πŸ”—` -Converts the string to a `UTF-8 `__ encoded :ref:`PackedByteArray`. This method is slightly slower than :ref:`to_ascii_buffer`, but supports all UTF-8 characters. For most cases, prefer using this method. This is the inverse of :ref:`PackedByteArray.get_string_from_utf8`. +Converts the string to a `UTF-8 `__ encoded :ref:`PackedByteArray`. This method is slightly slower than :ref:`to_ascii_buffer()`, but supports all UTF-8 characters. For most cases, prefer using this method. This is the inverse of :ref:`PackedByteArray.get_string_from_utf8()`. .. rst-class:: classref-item-separator @@ -1868,7 +1868,7 @@ Converts the string to a `UTF-8 `__ encoded :ref:`PackedByteArray` **to_utf16_buffer**\ (\ ) |const| :ref:`πŸ”—` -Converts the string to a `UTF-16 `__ encoded :ref:`PackedByteArray`. This is the inverse of :ref:`PackedByteArray.get_string_from_utf16`. +Converts the string to a `UTF-16 `__ encoded :ref:`PackedByteArray`. This is the inverse of :ref:`PackedByteArray.get_string_from_utf16()`. .. rst-class:: classref-item-separator @@ -1880,7 +1880,7 @@ Converts the string to a `UTF-16 `__ encod :ref:`PackedByteArray` **to_utf32_buffer**\ (\ ) |const| :ref:`πŸ”—` -Converts the string to a `UTF-32 `__ encoded :ref:`PackedByteArray`. This is the inverse of :ref:`PackedByteArray.get_string_from_utf32`. +Converts the string to a `UTF-32 `__ encoded :ref:`PackedByteArray`. This is the inverse of :ref:`PackedByteArray.get_string_from_utf32()`. .. rst-class:: classref-item-separator @@ -1892,7 +1892,7 @@ Converts the string to a `UTF-32 `__ encod :ref:`PackedByteArray` **to_wchar_buffer**\ (\ ) |const| :ref:`πŸ”—` -Converts the string to a `wide character `__ (``wchar_t``, UTF-16 on Windows, UTF-32 on other platforms) encoded :ref:`PackedByteArray`. This is the inverse of :ref:`PackedByteArray.get_string_from_wchar`. +Converts the string to a `wide character `__ (``wchar_t``, UTF-16 on Windows, UTF-32 on other platforms) encoded :ref:`PackedByteArray`. This is the inverse of :ref:`PackedByteArray.get_string_from_wchar()`. .. rst-class:: classref-item-separator @@ -1940,7 +1940,7 @@ Returns the character code at position ``at``. :ref:`String` **uri_decode**\ (\ ) |const| :ref:`πŸ”—` -Decodes the string from its URL-encoded format. This method is meant to properly decode the parameters in a URL when receiving an HTTP request. See also :ref:`uri_encode`. +Decodes the string from its URL-encoded format. This method is meant to properly decode the parameters in a URL when receiving an HTTP request. See also :ref:`uri_encode()`. .. tabs:: @@ -1967,7 +1967,7 @@ Decodes the string from its URL-encoded format. This method is meant to properly :ref:`String` **uri_encode**\ (\ ) |const| :ref:`πŸ”—` -Encodes the string to URL-friendly format. This method is meant to properly encode the parameters in a URL when sending an HTTP request. See also :ref:`uri_decode`. +Encodes the string to URL-friendly format. This method is meant to properly encode the parameters in a URL when sending an HTTP request. See also :ref:`uri_decode()`. .. tabs:: @@ -1998,7 +1998,7 @@ Encodes the string to URL-friendly format. This method is meant to properly enco :ref:`String` **validate_filename**\ (\ ) |const| :ref:`πŸ”—` -Returns a copy of the string with all characters that are not allowed in :ref:`is_valid_filename` replaced with underscores. +Returns a copy of the string with all characters that are not allowed in :ref:`is_valid_filename()` replaced with underscores. .. rst-class:: classref-item-separator diff --git a/classes/class_stylebox.rst b/classes/class_stylebox.rst index 9f4c6290d..b4878193d 100644 --- a/classes/class_stylebox.rst +++ b/classes/class_stylebox.rst @@ -105,7 +105,7 @@ If this value is negative, it is ignored and a child-specific margin is used ins It is up to the code using this style box to decide what these contents are: for example, a :ref:`Button` respects this content margin for the textual contents of the button. -\ :ref:`get_margin` should be used to fetch this value as consumer instead of reading these properties directly. This is because it correctly respects negative values and the fallback mentioned above. +\ :ref:`get_margin()` should be used to fetch this value as consumer instead of reading these properties directly. This is because it correctly respects negative values and the fallback mentioned above. .. rst-class:: classref-item-separator @@ -207,7 +207,7 @@ Method Descriptions :ref:`Vector2` **_get_minimum_size**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Virtual method to be implemented by the user. Returns a custom minimum size that the stylebox must respect when drawing. By default :ref:`get_minimum_size` only takes content margins into account. This method can be overridden to add another size restriction. A combination of the default behavior and the output of this method will be used, to account for both sizes. +Virtual method to be implemented by the user. Returns a custom minimum size that the stylebox must respect when drawing. By default :ref:`get_minimum_size()` only takes content margins into account. This method can be overridden to add another size restriction. A combination of the default behavior and the output of this method will be used, to account for both sizes. .. rst-class:: classref-item-separator @@ -235,7 +235,7 @@ Virtual method to be implemented by the user. Returns a custom minimum size that Draws this stylebox using a canvas item identified by the given :ref:`RID`. -The :ref:`RID` value can either be the result of :ref:`CanvasItem.get_canvas_item` called on an existing :ref:`CanvasItem`-derived node, or directly from creating a canvas item in the :ref:`RenderingServer` with :ref:`RenderingServer.canvas_item_create`. +The :ref:`RID` value can either be the result of :ref:`CanvasItem.get_canvas_item()` called on an existing :ref:`CanvasItem`-derived node, or directly from creating a canvas item in the :ref:`RenderingServer` with :ref:`RenderingServer.canvas_item_create()`. .. rst-class:: classref-item-separator @@ -259,7 +259,7 @@ Returns the default margin of the specified :ref:`Side`. :ref:`CanvasItem` **get_current_item_drawn**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`CanvasItem` that handles its :ref:`CanvasItem.NOTIFICATION_DRAW` or :ref:`CanvasItem._draw` callback at this moment. +Returns the :ref:`CanvasItem` that handles its :ref:`CanvasItem.NOTIFICATION_DRAW` or :ref:`CanvasItem._draw()` callback at this moment. .. rst-class:: classref-item-separator diff --git a/classes/class_styleboxflat.rst b/classes/class_styleboxflat.rst index 043c1a26f..d722f7b2b 100644 --- a/classes/class_styleboxflat.rst +++ b/classes/class_styleboxflat.rst @@ -299,7 +299,7 @@ Border width for the top border. - |void| **set_corner_detail**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_corner_detail**\ (\ ) -This sets the number of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value, you should take the corner radius (:ref:`set_corner_radius_all`) into account. +This sets the number of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value, you should take the corner radius (:ref:`set_corner_radius_all()`) into account. For corner radii less than 10, ``4`` or ``5`` should be enough. For corner radii less than 30, values between ``8`` and ``12`` should be enough. diff --git a/classes/class_subtweentweener.rst b/classes/class_subtweentweener.rst index fb6af8f61..101385721 100644 --- a/classes/class_subtweentweener.rst +++ b/classes/class_subtweentweener.rst @@ -19,9 +19,9 @@ Runs a :ref:`Tween` nested within another :ref:`Tween` Description ----------- -**SubtweenTweener** is used to execute a :ref:`Tween` as one step in a sequence defined by another :ref:`Tween`. See :ref:`Tween.tween_subtween` for more usage information. +**SubtweenTweener** is used to execute a :ref:`Tween` as one step in a sequence defined by another :ref:`Tween`. See :ref:`Tween.tween_subtween()` for more usage information. -\ **Note:** :ref:`Tween.tween_subtween` is the only correct way to create **SubtweenTweener**. Any **SubtweenTweener** created manually will not function correctly. +\ **Note:** :ref:`Tween.tween_subtween()` is the only correct way to create **SubtweenTweener**. Any **SubtweenTweener** created manually will not function correctly. .. rst-class:: classref-reftable-group diff --git a/classes/class_surfacetool.rst b/classes/class_surfacetool.rst index d9b082ab2..3a92526fd 100644 --- a/classes/class_surfacetool.rst +++ b/classes/class_surfacetool.rst @@ -19,7 +19,7 @@ Helper tool to create geometry. Description ----------- -The **SurfaceTool** is used to construct a :ref:`Mesh` by specifying vertex attributes individually. It can be used to construct a :ref:`Mesh` from a script. All properties except indices need to be added before calling :ref:`add_vertex`. For example, to add vertex colors and UVs: +The **SurfaceTool** is used to construct a :ref:`Mesh` by specifying vertex attributes individually. It can be used to construct a :ref:`Mesh` from a script. All properties except indices need to be added before calling :ref:`add_vertex()`. For example, to add vertex colors and UVs: .. tabs:: @@ -42,9 +42,9 @@ The **SurfaceTool** is used to construct a :ref:`Mesh` by specifying -The above **SurfaceTool** now contains one vertex of a triangle which has a UV coordinate and a specified :ref:`Color`. If another vertex were added without calling :ref:`set_uv` or :ref:`set_color`, then the last values would be used. +The above **SurfaceTool** now contains one vertex of a triangle which has a UV coordinate and a specified :ref:`Color`. If another vertex were added without calling :ref:`set_uv()` or :ref:`set_color()`, then the last values would be used. -Vertex attributes must be passed **before** calling :ref:`add_vertex`. Failure to do so will result in an error when committing the vertex information to a mesh. +Vertex attributes must be passed **before** calling :ref:`add_vertex()`. Failure to do so will result in an error when committing the vertex information to a mesh. Additionally, the attributes used before the first vertex is added determine the format of the mesh. For example, if you only add UVs to the first vertex, you cannot add color to any of the subsequent vertices. @@ -158,7 +158,7 @@ enum **CustomFormat**: :ref:`πŸ”—` :ref:`CustomFormat` **CUSTOM_RGBA8_UNORM** = ``0`` -Limits range of data passed to :ref:`set_custom` to unsigned normalized 0 to 1 stored in 8 bits per channel. See :ref:`Mesh.ARRAY_CUSTOM_RGBA8_UNORM`. +Limits range of data passed to :ref:`set_custom()` to unsigned normalized 0 to 1 stored in 8 bits per channel. See :ref:`Mesh.ARRAY_CUSTOM_RGBA8_UNORM`. .. _class_SurfaceTool_constant_CUSTOM_RGBA8_SNORM: @@ -166,7 +166,7 @@ Limits range of data passed to :ref:`set_custom` **CUSTOM_RGBA8_SNORM** = ``1`` -Limits range of data passed to :ref:`set_custom` to signed normalized -1 to 1 stored in 8 bits per channel. See :ref:`Mesh.ARRAY_CUSTOM_RGBA8_SNORM`. +Limits range of data passed to :ref:`set_custom()` to signed normalized -1 to 1 stored in 8 bits per channel. See :ref:`Mesh.ARRAY_CUSTOM_RGBA8_SNORM`. .. _class_SurfaceTool_constant_CUSTOM_RG_HALF: @@ -174,7 +174,7 @@ Limits range of data passed to :ref:`set_custom` **CUSTOM_RG_HALF** = ``2`` -Stores data passed to :ref:`set_custom` as half precision floats, and uses only red and green color channels. See :ref:`Mesh.ARRAY_CUSTOM_RG_HALF`. +Stores data passed to :ref:`set_custom()` as half precision floats, and uses only red and green color channels. See :ref:`Mesh.ARRAY_CUSTOM_RG_HALF`. .. _class_SurfaceTool_constant_CUSTOM_RGBA_HALF: @@ -182,7 +182,7 @@ Stores data passed to :ref:`set_custom` as :ref:`CustomFormat` **CUSTOM_RGBA_HALF** = ``3`` -Stores data passed to :ref:`set_custom` as half precision floats and uses all color channels. See :ref:`Mesh.ARRAY_CUSTOM_RGBA_HALF`. +Stores data passed to :ref:`set_custom()` as half precision floats and uses all color channels. See :ref:`Mesh.ARRAY_CUSTOM_RGBA_HALF`. .. _class_SurfaceTool_constant_CUSTOM_R_FLOAT: @@ -190,7 +190,7 @@ Stores data passed to :ref:`set_custom` as :ref:`CustomFormat` **CUSTOM_R_FLOAT** = ``4`` -Stores data passed to :ref:`set_custom` as full precision floats, and uses only red color channel. See :ref:`Mesh.ARRAY_CUSTOM_R_FLOAT`. +Stores data passed to :ref:`set_custom()` as full precision floats, and uses only red color channel. See :ref:`Mesh.ARRAY_CUSTOM_R_FLOAT`. .. _class_SurfaceTool_constant_CUSTOM_RG_FLOAT: @@ -198,7 +198,7 @@ Stores data passed to :ref:`set_custom` as :ref:`CustomFormat` **CUSTOM_RG_FLOAT** = ``5`` -Stores data passed to :ref:`set_custom` as full precision floats, and uses only red and green color channels. See :ref:`Mesh.ARRAY_CUSTOM_RG_FLOAT`. +Stores data passed to :ref:`set_custom()` as full precision floats, and uses only red and green color channels. See :ref:`Mesh.ARRAY_CUSTOM_RG_FLOAT`. .. _class_SurfaceTool_constant_CUSTOM_RGB_FLOAT: @@ -206,7 +206,7 @@ Stores data passed to :ref:`set_custom` as :ref:`CustomFormat` **CUSTOM_RGB_FLOAT** = ``6`` -Stores data passed to :ref:`set_custom` as full precision floats, and uses only red, green and blue color channels. See :ref:`Mesh.ARRAY_CUSTOM_RGB_FLOAT`. +Stores data passed to :ref:`set_custom()` as full precision floats, and uses only red, green and blue color channels. See :ref:`Mesh.ARRAY_CUSTOM_RGB_FLOAT`. .. _class_SurfaceTool_constant_CUSTOM_RGBA_FLOAT: @@ -214,7 +214,7 @@ Stores data passed to :ref:`set_custom` as :ref:`CustomFormat` **CUSTOM_RGBA_FLOAT** = ``7`` -Stores data passed to :ref:`set_custom` as full precision floats, and uses all color channels. See :ref:`Mesh.ARRAY_CUSTOM_RGBA_FLOAT`. +Stores data passed to :ref:`set_custom()` as full precision floats, and uses all color channels. See :ref:`Mesh.ARRAY_CUSTOM_RGBA_FLOAT`. .. _class_SurfaceTool_constant_CUSTOM_MAX: @@ -353,7 +353,7 @@ The ``flags`` argument can be the bitwise OR of :ref:`Mesh.ARRAY_FLAG_USE_DYNAMI :ref:`Array` **commit_to_arrays**\ (\ ) :ref:`πŸ”—` -Commits the data to the same format used by :ref:`ArrayMesh.add_surface_from_arrays`, :ref:`ImporterMesh.add_surface`, and :ref:`create_from_arrays`. This way you can further process the mesh data using the :ref:`ArrayMesh` or :ref:`ImporterMesh` APIs. +Commits the data to the same format used by :ref:`ArrayMesh.add_surface_from_arrays()`, :ref:`ImporterMesh.add_surface()`, and :ref:`create_from_arrays()`. This way you can further process the mesh data using the :ref:`ArrayMesh` or :ref:`ImporterMesh` APIs. .. rst-class:: classref-item-separator @@ -377,7 +377,7 @@ Creates a vertex array from an existing :ref:`Mesh`. |void| **create_from_arrays**\ (\ arrays\: :ref:`Array`, primitive_type\: :ref:`PrimitiveType` = 3\ ) :ref:`πŸ”—` -Creates this SurfaceTool from existing vertex arrays such as returned by :ref:`commit_to_arrays`, :ref:`Mesh.surface_get_arrays`, :ref:`Mesh.surface_get_blend_shape_arrays`, :ref:`ImporterMesh.get_surface_arrays`, and :ref:`ImporterMesh.get_surface_blend_shape_arrays`. ``primitive_type`` controls the type of mesh data, defaulting to :ref:`Mesh.PRIMITIVE_TRIANGLES`. +Creates this SurfaceTool from existing vertex arrays such as returned by :ref:`commit_to_arrays()`, :ref:`Mesh.surface_get_arrays()`, :ref:`Mesh.surface_get_blend_shape_arrays()`, :ref:`ImporterMesh.get_surface_arrays()`, and :ref:`ImporterMesh.get_surface_blend_shape_arrays()`. ``primitive_type`` controls the type of mesh data, defaulting to :ref:`Mesh.PRIMITIVE_TRIANGLES`. .. rst-class:: classref-item-separator @@ -413,7 +413,7 @@ Removes the index array by expanding the vertex array. :ref:`PackedInt32Array` **generate_lod**\ (\ nd_threshold\: :ref:`float`, target_index_count\: :ref:`int` = 3\ ) :ref:`πŸ”—` -**Deprecated:** This method is unused internally, as it does not preserve normals or UVs. Consider using :ref:`ImporterMesh.generate_lods` instead. +**Deprecated:** This method is unused internally, as it does not preserve normals or UVs. Consider using :ref:`ImporterMesh.generate_lods()` instead. Generates an LOD for a given ``nd_threshold`` in linear units (square root of quadric error metric), using at most ``target_index_count`` indices. @@ -427,11 +427,11 @@ Generates an LOD for a given ``nd_threshold`` in linear units (square root of qu |void| **generate_normals**\ (\ flip\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Generates normals from vertices so you do not have to do it manually. If ``flip`` is ``true``, the resulting normals will be inverted. :ref:`generate_normals` should be called *after* generating geometry and *before* committing the mesh using :ref:`commit` or :ref:`commit_to_arrays`. For correct display of normal-mapped surfaces, you will also have to generate tangents using :ref:`generate_tangents`. +Generates normals from vertices so you do not have to do it manually. If ``flip`` is ``true``, the resulting normals will be inverted. :ref:`generate_normals()` should be called *after* generating geometry and *before* committing the mesh using :ref:`commit()` or :ref:`commit_to_arrays()`. For correct display of normal-mapped surfaces, you will also have to generate tangents using :ref:`generate_tangents()`. -\ **Note:** :ref:`generate_normals` only works if the primitive type is set to :ref:`Mesh.PRIMITIVE_TRIANGLES`. +\ **Note:** :ref:`generate_normals()` only works if the primitive type is set to :ref:`Mesh.PRIMITIVE_TRIANGLES`. -\ **Note:** :ref:`generate_normals` takes smooth groups into account. To generate smooth normals, set the smooth group to a value greater than or equal to ``0`` using :ref:`set_smooth_group` or leave the smooth group at the default of ``0``. To generate flat normals, set the smooth group to ``-1`` using :ref:`set_smooth_group` prior to adding vertices. +\ **Note:** :ref:`generate_normals()` takes smooth groups into account. To generate smooth normals, set the smooth group to a value greater than or equal to ``0`` using :ref:`set_smooth_group()` or leave the smooth group at the default of ``0``. To generate flat normals, set the smooth group to ``-1`` using :ref:`set_smooth_group()` prior to adding vertices. .. rst-class:: classref-item-separator @@ -443,7 +443,7 @@ Generates normals from vertices so you do not have to do it manually. If ``flip` |void| **generate_tangents**\ (\ ) :ref:`πŸ”—` -Generates a tangent vector for each vertex. Requires that each vertex already has UVs and normals set (see :ref:`generate_normals`). +Generates a tangent vector for each vertex. Requires that each vertex already has UVs and normals set (see :ref:`generate_normals()`). .. rst-class:: classref-item-separator @@ -519,7 +519,7 @@ Shrinks the vertex array by creating an index array. This can improve performanc |void| **optimize_indices_for_cache**\ (\ ) :ref:`πŸ”—` -Optimizes triangle sorting for performance. Requires that :ref:`get_primitive_type` is :ref:`Mesh.PRIMITIVE_TRIANGLES`. +Optimizes triangle sorting for performance. Requires that :ref:`get_primitive_type()` is :ref:`Mesh.PRIMITIVE_TRIANGLES`. .. rst-class:: classref-item-separator @@ -559,7 +559,7 @@ Specifies a :ref:`Color` to use for the *next* vertex. If every ver Sets the custom value on this vertex for ``channel_index``. -\ :ref:`set_custom_format` must be called first for this ``channel_index``. Formats which are not RGBA will ignore other color channels. +\ :ref:`set_custom_format()` must be called first for this ``channel_index``. Formats which are not RGBA will ignore other color channels. .. rst-class:: classref-item-separator @@ -573,7 +573,7 @@ Sets the custom value on this vertex for ``channel_index``. Sets the color format for this custom ``channel_index``. Use :ref:`CUSTOM_MAX` to disable. -Must be invoked after :ref:`begin` and should be set before :ref:`commit` or :ref:`commit_to_arrays`. +Must be invoked after :ref:`begin()` and should be set before :ref:`commit()` or :ref:`commit_to_arrays()`. .. rst-class:: classref-item-separator diff --git a/classes/class_syntaxhighlighter.rst b/classes/class_syntaxhighlighter.rst index a59fc5d46..42f8589c8 100644 --- a/classes/class_syntaxhighlighter.rst +++ b/classes/class_syntaxhighlighter.rst @@ -78,7 +78,7 @@ Virtual method which can be overridden to clear any local caches. Virtual method which can be overridden to return syntax highlighting data. -See :ref:`get_line_syntax_highlighting` for more details. +See :ref:`get_line_syntax_highlighting()` for more details. .. rst-class:: classref-item-separator @@ -104,7 +104,7 @@ Virtual method which can be overridden to update any local caches. Clears all cached syntax highlighting data. -Then calls overridable method :ref:`_clear_highlighting_cache`. +Then calls overridable method :ref:`_clear_highlighting_cache()`. .. rst-class:: classref-item-separator @@ -116,7 +116,7 @@ Then calls overridable method :ref:`_clear_highlighting_cache` **get_line_syntax_highlighting**\ (\ line\: :ref:`int`\ ) :ref:`πŸ”—` -Returns the syntax highlighting data for the line at index ``line``. If the line is not cached, calls :ref:`_get_line_syntax_highlighting` first to calculate the data. +Returns the syntax highlighting data for the line at index ``line``. If the line is not cached, calls :ref:`_get_line_syntax_highlighting()` first to calculate the data. Each entry is a column number containing a nested :ref:`Dictionary`. The column number denotes the start of a region, the region will end if another region is found, or at the end of the line. The nested :ref:`Dictionary` contains the data for that region. Currently only the key ``"color"`` is supported. @@ -155,7 +155,7 @@ Returns the associated :ref:`TextEdit` node. |void| **update_cache**\ (\ ) :ref:`πŸ”—` -Clears then updates the **SyntaxHighlighter** caches. Override :ref:`_update_cache` for a callback. +Clears then updates the **SyntaxHighlighter** caches. Override :ref:`_update_cache()` for a callback. \ **Note:** This is called automatically when the associated :ref:`TextEdit` node, updates its own cache. diff --git a/classes/class_tabbar.rst b/classes/class_tabbar.rst index ec493b937..f3cb144d0 100644 --- a/classes/class_tabbar.rst +++ b/classes/class_tabbar.rst @@ -216,7 +216,7 @@ Emitted when the active tab is rearranged via mouse drag. See :ref:`drag_to_rear **tab_button_pressed**\ (\ tab\: :ref:`int`\ ) :ref:`πŸ”—` -Emitted when a tab's right button is pressed. See :ref:`set_tab_button_icon`. +Emitted when a tab's right button is pressed. See :ref:`set_tab_button_icon()`. .. rst-class:: classref-item-separator @@ -740,7 +740,7 @@ Returns tab title language code. :ref:`Variant` **get_tab_metadata**\ (\ tab_idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the metadata value set to the tab at index ``tab_idx`` using :ref:`set_tab_metadata`. If no metadata was previously set, returns ``null`` by default. +Returns the metadata value set to the tab at index ``tab_idx`` using :ref:`set_tab_metadata()`. If no metadata was previously set, returns ``null`` by default. .. rst-class:: classref-item-separator @@ -956,7 +956,7 @@ Sets language code of tab title used for line-breaking and text shaping algorith |void| **set_tab_metadata**\ (\ tab_idx\: :ref:`int`, metadata\: :ref:`Variant`\ ) :ref:`πŸ”—` -Sets the metadata value for the tab at index ``tab_idx``, which can be retrieved later using :ref:`get_tab_metadata`. +Sets the metadata value for the tab at index ``tab_idx``, which can be retrieved later using :ref:`get_tab_metadata()`. .. rst-class:: classref-item-separator @@ -1095,7 +1095,7 @@ The horizontal separation between the elements inside tabs. :ref:`int` **icon_max_width** = ``0`` :ref:`πŸ”—` -The maximum allowed width of the tab's icon. This limit is applied on top of the default size of the icon, but before the value set with :ref:`set_tab_icon_max_width`. The height is adjusted according to the icon's ratio. +The maximum allowed width of the tab's icon. This limit is applied on top of the default size of the icon, but before the value set with :ref:`set_tab_icon_max_width()`. The height is adjusted according to the icon's ratio. .. rst-class:: classref-item-separator diff --git a/classes/class_tabcontainer.rst b/classes/class_tabcontainer.rst index 51abbf5d4..00b64f330 100644 --- a/classes/class_tabcontainer.rst +++ b/classes/class_tabcontainer.rst @@ -215,7 +215,7 @@ Emitted when the active tab is rearranged via mouse drag. See :ref:`drag_to_rear **pre_popup_pressed**\ (\ ) :ref:`πŸ”—` -Emitted when the **TabContainer**'s :ref:`Popup` button is clicked. See :ref:`set_popup` for details. +Emitted when the **TabContainer**'s :ref:`Popup` button is clicked. See :ref:`set_popup()` for details. .. rst-class:: classref-item-separator @@ -541,7 +541,7 @@ Returns the child :ref:`Control` node located at the active tab i :ref:`Popup` **get_popup**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`Popup` node instance if one has been set already with :ref:`set_popup`. +Returns the :ref:`Popup` node instance if one has been set already with :ref:`set_popup()`. \ **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their :ref:`Window.visible` property. @@ -665,7 +665,7 @@ Returns the index of the tab tied to the given ``control``. The control must be :ref:`Variant` **get_tab_metadata**\ (\ tab_idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the metadata value set to the tab at index ``tab_idx`` using :ref:`set_tab_metadata`. If no metadata was previously set, returns ``null`` by default. +Returns the metadata value set to the tab at index ``tab_idx`` using :ref:`set_tab_metadata()`. If no metadata was previously set, returns ``null`` by default. .. rst-class:: classref-item-separator @@ -677,7 +677,7 @@ Returns the metadata value set to the tab at index ``tab_idx`` using :ref:`set_t :ref:`String` **get_tab_title**\ (\ tab_idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the title of the tab at index ``tab_idx``. Tab titles default to the name of the indexed child node, but this can be overridden with :ref:`set_tab_title`. +Returns the title of the tab at index ``tab_idx``. Tab titles default to the name of the indexed child node, but this can be overridden with :ref:`set_tab_title()`. .. rst-class:: classref-item-separator @@ -821,7 +821,7 @@ Sets the maximum allowed width of the icon for the tab at index ``tab_idx``. Thi |void| **set_tab_metadata**\ (\ tab_idx\: :ref:`int`, metadata\: :ref:`Variant`\ ) :ref:`πŸ”—` -Sets the metadata value for the tab at index ``tab_idx``, which can be retrieved later using :ref:`get_tab_metadata`. +Sets the metadata value for the tab at index ``tab_idx``, which can be retrieved later using :ref:`get_tab_metadata()`. .. rst-class:: classref-item-separator @@ -936,7 +936,7 @@ Font color of the other, unselected tabs. :ref:`int` **icon_max_width** = ``0`` :ref:`πŸ”—` -The maximum allowed width of the tab's icon. This limit is applied on top of the default size of the icon, but before the value set with :ref:`TabBar.set_tab_icon_max_width`. The height is adjusted according to the icon's ratio. +The maximum allowed width of the tab's icon. This limit is applied on top of the default size of the icon, but before the value set with :ref:`TabBar.set_tab_icon_max_width()`. The height is adjusted according to the icon's ratio. .. rst-class:: classref-item-separator @@ -976,7 +976,7 @@ The size of the tab text outline. The space at the left or right edges of the tab bar, accordingly with the current :ref:`tab_alignment`. -The margin is ignored with :ref:`TabBar.ALIGNMENT_RIGHT` if the tabs are clipped (see :ref:`clip_tabs`) or a popup has been set (see :ref:`set_popup`). The margin is always ignored with :ref:`TabBar.ALIGNMENT_CENTER`. +The margin is ignored with :ref:`TabBar.ALIGNMENT_RIGHT` if the tabs are clipped (see :ref:`clip_tabs`) or a popup has been set (see :ref:`set_popup()`). The margin is always ignored with :ref:`TabBar.ALIGNMENT_CENTER`. .. rst-class:: classref-item-separator @@ -1072,7 +1072,7 @@ Icon for the right arrow button that appears when there are too many tabs to fit :ref:`Texture2D` **menu** :ref:`πŸ”—` -The icon for the menu button (see :ref:`set_popup`). +The icon for the menu button (see :ref:`set_popup()`). .. rst-class:: classref-item-separator @@ -1084,7 +1084,7 @@ The icon for the menu button (see :ref:`set_popup` **menu_highlight** :ref:`πŸ”—` -The icon for the menu button (see :ref:`set_popup`) when it's being hovered with the cursor. +The icon for the menu button (see :ref:`set_popup()`) when it's being hovered with the cursor. .. rst-class:: classref-item-separator diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index 5214b14e8..1a5c0cbcb 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -605,7 +605,7 @@ Emitted when the text changes. **text_set**\ (\ ) :ref:`πŸ”—` -Emitted when :ref:`clear` is called or :ref:`text` is set. +Emitted when :ref:`clear()` is called or :ref:`text` is set. .. rst-class:: classref-section-separator @@ -1072,7 +1072,7 @@ enum **GutterType**: :ref:`πŸ”—` :ref:`GutterType` **GUTTER_TYPE_STRING** = ``0`` -When a gutter is set to string using :ref:`set_gutter_type`, it is used to contain text set via the :ref:`set_line_gutter_text` method. +When a gutter is set to string using :ref:`set_gutter_type()`, it is used to contain text set via the :ref:`set_line_gutter_text()` method. .. _class_TextEdit_constant_GUTTER_TYPE_ICON: @@ -1080,7 +1080,7 @@ When a gutter is set to string using :ref:`set_gutter_type` **GUTTER_TYPE_ICON** = ``1`` -When a gutter is set to icon using :ref:`set_gutter_type`, it is used to contain an icon set via the :ref:`set_line_gutter_icon` method. +When a gutter is set to icon using :ref:`set_gutter_type()`, it is used to contain an icon set via the :ref:`set_line_gutter_icon()` method. .. _class_TextEdit_constant_GUTTER_TYPE_CUSTOM: @@ -1088,7 +1088,7 @@ When a gutter is set to icon using :ref:`set_gutter_type` **GUTTER_TYPE_CUSTOM** = ``2`` -When a gutter is set to custom using :ref:`set_gutter_type`, it is used to contain custom visuals controlled by a callback method set via the :ref:`set_gutter_custom_draw` method. +When a gutter is set to custom using :ref:`set_gutter_type()`, it is used to contain custom visuals controlled by a callback method set via the :ref:`set_gutter_custom_draw()` method. .. rst-class:: classref-section-separator @@ -1216,7 +1216,7 @@ If ``false``, the context menu ignores mouse location. - |void| **set_multiple_carets_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_multiple_carets_enabled**\ (\ ) -If ``true``, multiple carets are allowed. Left-clicking with :kbd:`Alt` adds a new caret. See :ref:`add_caret` and :ref:`get_caret_count`. +If ``true``, multiple carets are allowed. Left-clicking with :kbd:`Alt` adds a new caret. See :ref:`add_caret()` and :ref:`get_caret_count()`. .. rst-class:: classref-item-separator @@ -1679,7 +1679,7 @@ If there is a vertical scrollbar, this determines the current vertical scroll va If ``true``, text can be selected. -If ``false``, text can not be selected by the user or by the :ref:`select` or :ref:`select_all` methods. +If ``false``, text can not be selected by the user or by the :ref:`select()` or :ref:`select_all()` methods. .. rst-class:: classref-item-separator @@ -2028,7 +2028,7 @@ Applies text from the `Input Method Editor ` = -1\ ) :ref:`πŸ”—` -Called when the user presses the backspace key. Can be overridden with :ref:`_backspace`. +Called when the user presses the backspace key. Can be overridden with :ref:`_backspace()`. .. rst-class:: classref-item-separator @@ -2040,7 +2040,7 @@ Called when the user presses the backspace key. Can be overridden with :ref:`_ba |void| **begin_complex_operation**\ (\ ) :ref:`πŸ”—` -Starts a multipart edit. All edits will be treated as one action until :ref:`end_complex_operation` is called. +Starts a multipart edit. All edits will be treated as one action until :ref:`end_complex_operation()` is called. .. rst-class:: classref-item-separator @@ -2052,7 +2052,7 @@ Starts a multipart edit. All edits will be treated as one action until :ref:`end |void| **begin_multicaret_edit**\ (\ ) :ref:`πŸ”—` -Starts an edit for multiple carets. The edit must be ended with :ref:`end_multicaret_edit`. Multicaret edits can be used to edit text at multiple carets and delay merging the carets until the end, so the caret indexes aren't affected immediately. :ref:`begin_multicaret_edit` and :ref:`end_multicaret_edit` can be nested, and the merge will happen at the last :ref:`end_multicaret_edit`. +Starts an edit for multiple carets. The edit must be ended with :ref:`end_multicaret_edit()`. Multicaret edits can be used to edit text at multiple carets and delay merging the carets until the end, so the caret indexes aren't affected immediately. :ref:`begin_multicaret_edit()` and :ref:`end_multicaret_edit()` can be nested, and the merge will happen at the last :ref:`end_multicaret_edit()`. :: @@ -2127,9 +2127,9 @@ Collapse all carets in the given range to the ``from_line`` and ``from_column`` \ ``inclusive`` applies to both ends. -If :ref:`is_in_mulitcaret_edit` is ``true``, carets that are collapsed will be ``true`` for :ref:`multicaret_edit_ignore_caret`. +If :ref:`is_in_mulitcaret_edit()` is ``true``, carets that are collapsed will be ``true`` for :ref:`multicaret_edit_ignore_caret()`. -\ :ref:`merge_overlapping_carets` will be called if any carets were collapsed. +\ :ref:`merge_overlapping_carets()` will be called if any carets were collapsed. .. rst-class:: classref-item-separator @@ -2141,7 +2141,7 @@ If :ref:`is_in_mulitcaret_edit` is |void| **copy**\ (\ caret_index\: :ref:`int` = -1\ ) :ref:`πŸ”—` -Copies the current text selection. Can be overridden with :ref:`_copy`. +Copies the current text selection. Can be overridden with :ref:`_copy()`. .. rst-class:: classref-item-separator @@ -2153,7 +2153,7 @@ Copies the current text selection. Can be overridden with :ref:`_copy` = -1\ ) :ref:`πŸ”—` -Cut's the current selection. Can be overridden with :ref:`_cut`. +Cut's the current selection. Can be overridden with :ref:`_cut()`. .. rst-class:: classref-item-separator @@ -2189,7 +2189,7 @@ Deselects the current selection. |void| **end_action**\ (\ ) :ref:`πŸ”—` -Marks the end of steps in the current action started with :ref:`start_action`. +Marks the end of steps in the current action started with :ref:`start_action()`. .. rst-class:: classref-item-separator @@ -2201,7 +2201,7 @@ Marks the end of steps in the current action started with :ref:`start_action` -Ends a multipart edit, started with :ref:`begin_complex_operation`. If called outside a complex operation, the current operation is pushed onto the undo/redo stack. +Ends a multipart edit, started with :ref:`begin_complex_operation()`. If called outside a complex operation, the current operation is pushed onto the undo/redo stack. .. rst-class:: classref-item-separator @@ -2213,7 +2213,7 @@ Ends a multipart edit, started with :ref:`begin_complex_operation` -Ends an edit for multiple carets, that was started with :ref:`begin_multicaret_edit`. If this was the last :ref:`end_multicaret_edit` and :ref:`merge_overlapping_carets` was called, carets will be merged. +Ends an edit for multiple carets, that was started with :ref:`begin_multicaret_edit()`. If this was the last :ref:`end_multicaret_edit()` and :ref:`merge_overlapping_carets()` was called, carets will be merged. .. rst-class:: classref-item-separator @@ -2261,9 +2261,9 @@ Returns the caret pixel draw position. :ref:`PackedInt32Array` **get_caret_index_edit_order**\ (\ ) :ref:`πŸ”—` -**Deprecated:** Carets no longer need to be edited in any specific order. If the carets need to be sorted, use :ref:`get_sorted_carets` instead. +**Deprecated:** Carets no longer need to be edited in any specific order. If the carets need to be sorted, use :ref:`get_sorted_carets()` instead. -Returns a list of caret indexes in their edit order, this done from bottom to top. Edit order refers to the way actions such as :ref:`insert_text_at_caret` are applied. +Returns a list of caret indexes in their edit order, this done from bottom to top. Edit order refers to the way actions such as :ref:`insert_text_at_caret()` are applied. .. rst-class:: classref-item-separator @@ -2383,7 +2383,7 @@ Returns the :ref:`HScrollBar` used by **TextEdit**. :ref:`int` **get_indent_level**\ (\ line\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the indent level of the given line. This is the number of spaces and tabs at the beginning of the line, with the tabs taking the tab size into account (see :ref:`get_tab_size`). +Returns the indent level of the given line. This is the number of spaces and tabs at the beginning of the line, with the tabs taking the tab size into account (see :ref:`get_tab_size()`). .. rst-class:: classref-item-separator @@ -2395,7 +2395,7 @@ Returns the indent level of the given line. This is the number of spaces and tab :ref:`int` **get_last_full_visible_line**\ (\ ) |const| :ref:`πŸ”—` -Returns the last visible line. Use :ref:`get_last_full_visible_line_wrap_index` for the wrap index. +Returns the last visible line. Use :ref:`get_last_full_visible_line_wrap_index()` for the wrap index. .. rst-class:: classref-item-separator @@ -2483,7 +2483,7 @@ Returns the number of lines in the text. :ref:`Texture2D` **get_line_gutter_icon**\ (\ line\: :ref:`int`, gutter\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the icon currently in ``gutter`` at ``line``. This only works when the gutter type is :ref:`GUTTER_TYPE_ICON` (see :ref:`set_gutter_type`). +Returns the icon currently in ``gutter`` at ``line``. This only works when the gutter type is :ref:`GUTTER_TYPE_ICON` (see :ref:`set_gutter_type()`). .. rst-class:: classref-item-separator @@ -2519,7 +2519,7 @@ Returns the metadata currently in ``gutter`` at ``line``. :ref:`String` **get_line_gutter_text**\ (\ line\: :ref:`int`, gutter\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the text currently in ``gutter`` at ``line``. This only works when the gutter type is :ref:`GUTTER_TYPE_STRING` (see :ref:`set_gutter_type`). +Returns the text currently in ``gutter`` at ``line``. This only works when the gutter type is :ref:`GUTTER_TYPE_STRING` (see :ref:`set_gutter_type()`). .. rst-class:: classref-item-separator @@ -2547,7 +2547,7 @@ Returns the maximum value of the line height among all lines. Returns an :ref:`Array` of line ranges where ``x`` is the first line and ``y`` is the last line. All lines within these ranges will have a caret on them or be part of a selection. Each line will only be part of one line range, even if it has multiple carets on it. -If a selection's end column (:ref:`get_selection_to_column`) is at column ``0``, that line will not be included. If a selection begins on the line after another selection ends and ``merge_adjacent`` is ``true``, or they begin and end on the same line, one line range will include both selections. +If a selection's end column (:ref:`get_selection_to_column()`) is at column ``0``, that line will not be included. If a selection begins on the line after another selection ends and ``merge_adjacent`` is ``true``, or they begin and end on the same line, one line range will include both selections. .. rst-class:: classref-item-separator @@ -2595,7 +2595,7 @@ Returns the number of times the given line is wrapped. :ref:`int` **get_line_wrap_index_at_column**\ (\ line\: :ref:`int`, column\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the wrap index of the given column on the given line. This ranges from ``0`` to :ref:`get_line_wrap_count`. +Returns the wrap index of the given column on the given line. This ranges from ``0`` to :ref:`get_line_wrap_count()`. .. rst-class:: classref-item-separator @@ -2714,7 +2714,7 @@ Returns the number of lines that may be drawn on the minimap. :ref:`Vector2i` **get_next_visible_line_index_offset_from**\ (\ line\: :ref:`int`, wrap_index\: :ref:`int`, visible_amount\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Similar to :ref:`get_next_visible_line_offset_from`, but takes into account the line wrap indexes. In the returned vector, ``x`` is the line, ``y`` is the wrap index. +Similar to :ref:`get_next_visible_line_offset_from()`, but takes into account the line wrap indexes. In the returned vector, ``x`` is the line, ``y`` is the wrap index. .. rst-class:: classref-item-separator @@ -2740,7 +2740,7 @@ Returns the count to the next visible line from ``line`` to ``line + visible_amo Returns the local position for the given ``line`` and ``column``. If ``x`` or ``y`` of the returned vector equal ``-1``, the position is outside of the viewable area of the control. -\ **Note:** The Y position corresponds to the bottom side of the line. Use :ref:`get_rect_at_line_column` to get the top side position. +\ **Note:** The Y position corresponds to the bottom side of the line. Use :ref:`get_rect_at_line_column()` to get the top side position. .. rst-class:: classref-item-separator @@ -2754,7 +2754,7 @@ Returns the local position for the given ``line`` and ``column``. If ``x`` or `` Returns the local position and size for the grapheme at the given ``line`` and ``column``. If ``x`` or ``y`` position of the returned rect equal ``-1``, the position is outside of the viewable area of the control. -\ **Note:** The Y position of the returned rect corresponds to the top side of the line, unlike :ref:`get_pos_at_line_column` which returns the bottom side. +\ **Note:** The Y position of the returned rect corresponds to the top side of the line, unlike :ref:`get_pos_at_line_column()` which returns the bottom side. .. rst-class:: classref-item-separator @@ -2766,7 +2766,7 @@ Returns the local position and size for the grapheme at the given ``line`` and ` :ref:`int` **get_saved_version**\ (\ ) |const| :ref:`πŸ”—` -Returns the last tagged saved version from :ref:`tag_saved_version`. +Returns the last tagged saved version from :ref:`tag_saved_version()`. .. rst-class:: classref-item-separator @@ -2816,7 +2816,7 @@ If ``include_edges`` is ``false``, the position must be inside the selection and :ref:`int` **get_selection_column**\ (\ caret_index\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -**Deprecated:** Use :ref:`get_selection_origin_column` instead. +**Deprecated:** Use :ref:`get_selection_origin_column()` instead. Returns the original start column of the selection. @@ -2854,7 +2854,7 @@ Returns the selection begin line. Returns the caret line if there is no selectio :ref:`int` **get_selection_line**\ (\ caret_index\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -**Deprecated:** Use :ref:`get_selection_origin_line` instead. +**Deprecated:** Use :ref:`get_selection_origin_line()` instead. Returns the original start line of the selection. @@ -2930,7 +2930,7 @@ Returns the selection end line. Returns the caret line if there is no selection. Returns the carets sorted by selection beginning from lowest line and column to highest (from top to bottom of text). -If ``include_ignored_carets`` is ``false``, carets from :ref:`multicaret_edit_ignore_caret` will be ignored. +If ``include_ignored_carets`` is ``false``, carets from :ref:`multicaret_edit_ignore_caret()` will be ignored. .. rst-class:: classref-item-separator @@ -2966,7 +2966,7 @@ Returns the total width of all gutters and internal padding. :ref:`int` **get_total_visible_line_count**\ (\ ) |const| :ref:`πŸ”—` -Returns the total number of lines in the text. This includes wrapped lines and excludes folded lines. If :ref:`wrap_mode` is set to :ref:`LINE_WRAPPING_NONE` and no lines are folded (see :ref:`CodeEdit.is_line_folded`) then this is equivalent to :ref:`get_line_count`. See :ref:`get_visible_line_count_in_range` for a limited range of lines. +Returns the total number of lines in the text. This includes wrapped lines and excludes folded lines. If :ref:`wrap_mode` is set to :ref:`LINE_WRAPPING_NONE` and no lines are folded (see :ref:`CodeEdit.is_line_folded()`) then this is equivalent to :ref:`get_line_count()`. See :ref:`get_visible_line_count_in_range()` for a limited range of lines. .. rst-class:: classref-item-separator @@ -3014,7 +3014,7 @@ Returns the number of lines that can visually fit, rounded down, based on this c :ref:`int` **get_visible_line_count_in_range**\ (\ from_line\: :ref:`int`, to_line\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the total number of lines between ``from_line`` and ``to_line`` (inclusive) in the text. This includes wrapped lines and excludes folded lines. If the range covers all lines it is equivalent to :ref:`get_total_visible_line_count`. +Returns the total number of lines between ``from_line`` and ``to_line`` (inclusive) in the text. This includes wrapped lines and excludes folded lines. If the range covers all lines it is equivalent to :ref:`get_total_visible_line_count()`. .. rst-class:: classref-item-separator @@ -3152,7 +3152,7 @@ Returns ``true`` if the caret of the selection is after the selection origin. Th Returns ``true`` if the caret is visible, ``false`` otherwise. A caret will be considered hidden if it is outside the scrollable area when scrolling is enabled. -\ **Note:** :ref:`is_caret_visible` does not account for a caret being off-screen if it is still within the scrollable area. It will return ``true`` even if the caret is off-screen as long as it meets **TextEdit**'s own conditions for being visible. This includes uses of :ref:`scroll_fit_content_width` and :ref:`scroll_fit_content_height` that cause the **TextEdit** to expand beyond the viewport's bounds. +\ **Note:** :ref:`is_caret_visible()` does not account for a caret being off-screen if it is still within the scrollable area. It will return ``true`` even if the caret is off-screen as long as it meets **TextEdit**'s own conditions for being visible. This includes uses of :ref:`scroll_fit_content_width` and :ref:`scroll_fit_content_height` that cause the **TextEdit** to expand beyond the viewport's bounds. .. rst-class:: classref-item-separator @@ -3176,7 +3176,7 @@ Returns ``true`` if the user is dragging their mouse for scrolling, selecting, o :ref:`bool` **is_gutter_clickable**\ (\ gutter\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the gutter at the given index is clickable. See :ref:`set_gutter_clickable`. +Returns ``true`` if the gutter at the given index is clickable. See :ref:`set_gutter_clickable()`. .. rst-class:: classref-item-separator @@ -3188,7 +3188,7 @@ Returns ``true`` if the gutter at the given index is clickable. See :ref:`set_gu :ref:`bool` **is_gutter_drawn**\ (\ gutter\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the gutter at the given index is currently drawn. See :ref:`set_gutter_draw`. +Returns ``true`` if the gutter at the given index is currently drawn. See :ref:`set_gutter_draw()`. .. rst-class:: classref-item-separator @@ -3200,7 +3200,7 @@ Returns ``true`` if the gutter at the given index is currently drawn. See :ref:` :ref:`bool` **is_gutter_overwritable**\ (\ gutter\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the gutter at the given index is overwritable. See :ref:`set_gutter_overwritable`. +Returns ``true`` if the gutter at the given index is overwritable. See :ref:`set_gutter_overwritable()`. .. rst-class:: classref-item-separator @@ -3212,7 +3212,7 @@ Returns ``true`` if the gutter at the given index is overwritable. See :ref:`set :ref:`bool` **is_in_mulitcaret_edit**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if a :ref:`begin_multicaret_edit` has been called and :ref:`end_multicaret_edit` has not yet been called. +Returns ``true`` if a :ref:`begin_multicaret_edit()` has been called and :ref:`end_multicaret_edit()` has not yet been called. .. rst-class:: classref-item-separator @@ -3224,7 +3224,7 @@ Returns ``true`` if a :ref:`begin_multicaret_edit` **is_line_gutter_clickable**\ (\ line\: :ref:`int`, gutter\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the gutter at the given index on the given line is clickable. See :ref:`set_line_gutter_clickable`. +Returns ``true`` if the gutter at the given index on the given line is clickable. See :ref:`set_line_gutter_clickable()`. .. rst-class:: classref-item-separator @@ -3248,7 +3248,7 @@ Returns if the given line is wrapped. :ref:`bool` **is_menu_visible**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the menu is visible. Use this instead of ``get_menu().visible`` to improve performance (so the creation of the menu is avoided). See :ref:`get_menu`. +Returns ``true`` if the menu is visible. Use this instead of ``get_menu().visible`` to improve performance (so the creation of the menu is avoided). See :ref:`get_menu()`. .. rst-class:: classref-item-separator @@ -3272,7 +3272,7 @@ Returns ``true`` if the mouse is over a selection. If ``edges`` is ``true``, the :ref:`bool` **is_overtype_mode_enabled**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if overtype mode is enabled. See :ref:`set_overtype_mode_enabled`. +Returns ``true`` if overtype mode is enabled. See :ref:`set_overtype_mode_enabled()`. .. rst-class:: classref-item-separator @@ -3296,7 +3296,7 @@ Executes a given action as defined in the :ref:`MenuItems`, to_line\: :ref:`int`\ ) :ref:`πŸ”—` -Merge the gutters from ``from_line`` into ``to_line``. Only overwritable gutters will be copied. See :ref:`set_gutter_overwritable`. +Merge the gutters from ``from_line`` into ``to_line``. Only overwritable gutters will be copied. See :ref:`set_gutter_overwritable()`. .. rst-class:: classref-item-separator @@ -3310,7 +3310,7 @@ Merge the gutters from ``from_line`` into ``to_line``. Only overwritable gutters Merges any overlapping carets. Will favor the newest caret, or the caret with a selection. -If :ref:`is_in_mulitcaret_edit` is ``true``, the merge will be queued to happen at the end of the multicaret edit. See :ref:`begin_multicaret_edit` and :ref:`end_multicaret_edit`. +If :ref:`is_in_mulitcaret_edit()` is ``true``, the merge will be queued to happen at the end of the multicaret edit. See :ref:`begin_multicaret_edit()` and :ref:`end_multicaret_edit()`. \ **Note:** This is not called when a caret changes position but after certain actions, so it is possible to get into a state where carets overlap. @@ -3324,7 +3324,7 @@ If :ref:`is_in_mulitcaret_edit` is :ref:`bool` **multicaret_edit_ignore_caret**\ (\ caret_index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the given ``caret_index`` should be ignored as part of a multicaret edit. See :ref:`begin_multicaret_edit` and :ref:`end_multicaret_edit`. Carets that should be ignored are ones that were part of removed text and will likely be merged at the end of the edit, or carets that were added during the edit. +Returns ``true`` if the given ``caret_index`` should be ignored as part of a multicaret edit. See :ref:`begin_multicaret_edit()` and :ref:`end_multicaret_edit()`. Carets that should be ignored are ones that were part of removed text and will likely be merged at the end of the edit, or carets that were added during the edit. It is recommended to ``continue`` within a loop iterating on multiple carets if a caret should be ignored. @@ -3338,7 +3338,7 @@ It is recommended to ``continue`` within a loop iterating on multiple carets if |void| **paste**\ (\ caret_index\: :ref:`int` = -1\ ) :ref:`πŸ”—` -Paste at the current location. Can be overridden with :ref:`_paste`. +Paste at the current location. Can be overridden with :ref:`_paste()`. .. rst-class:: classref-item-separator @@ -3479,7 +3479,7 @@ Selects text from ``origin_line`` and ``origin_column`` to ``caret_line`` and `` If :ref:`selecting_enabled` is ``false``, no selection will occur. -\ **Note:** If supporting multiple carets this will not check for any overlap. See :ref:`merge_overlapping_carets`. +\ **Note:** If supporting multiple carets this will not check for any overlap. See :ref:`merge_overlapping_carets()`. .. rst-class:: classref-item-separator @@ -3521,7 +3521,7 @@ Moves the caret to the specified ``column`` index. If ``adjust_viewport`` is ``true``, the viewport will center at the caret position after the move occurs. -\ **Note:** If supporting multiple carets this will not check for any overlap. See :ref:`merge_overlapping_carets`. +\ **Note:** If supporting multiple carets this will not check for any overlap. See :ref:`merge_overlapping_carets()`. .. rst-class:: classref-item-separator @@ -3533,15 +3533,15 @@ If ``adjust_viewport`` is ``true``, the viewport will center at the caret positi |void| **set_caret_line**\ (\ line\: :ref:`int`, adjust_viewport\: :ref:`bool` = true, can_be_hidden\: :ref:`bool` = true, wrap_index\: :ref:`int` = 0, caret_index\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Moves the caret to the specified ``line`` index. The caret column will be moved to the same visual position it was at the last time :ref:`set_caret_column` was called, or clamped to the end of the line. +Moves the caret to the specified ``line`` index. The caret column will be moved to the same visual position it was at the last time :ref:`set_caret_column()` was called, or clamped to the end of the line. If ``adjust_viewport`` is ``true``, the viewport will center at the caret position after the move occurs. If ``can_be_hidden`` is ``true``, the specified ``line`` can be hidden. -If ``wrap_index`` is ``-1``, the caret column will be clamped to the ``line``'s length. If ``wrap_index`` is greater than ``-1``, the column will be moved to attempt to match the visual x position on the line's ``wrap_index`` to the position from the last time :ref:`set_caret_column` was called. +If ``wrap_index`` is ``-1``, the caret column will be clamped to the ``line``'s length. If ``wrap_index`` is greater than ``-1``, the column will be moved to attempt to match the visual x position on the line's ``wrap_index`` to the position from the last time :ref:`set_caret_column()` was called. -\ **Note:** If supporting multiple carets this will not check for any overlap. See :ref:`merge_overlapping_carets`. +\ **Note:** If supporting multiple carets this will not check for any overlap. See :ref:`merge_overlapping_carets()`. .. rst-class:: classref-item-separator @@ -3553,7 +3553,7 @@ If ``wrap_index`` is ``-1``, the caret column will be clamped to the ``line``'s |void| **set_gutter_clickable**\ (\ gutter\: :ref:`int`, clickable\: :ref:`bool`\ ) :ref:`πŸ”—` -If ``true``, the mouse cursor will change to a pointing hand (:ref:`Control.CURSOR_POINTING_HAND`) when hovering over the gutter at the given index. See :ref:`is_gutter_clickable` and :ref:`set_line_gutter_clickable`. +If ``true``, the mouse cursor will change to a pointing hand (:ref:`Control.CURSOR_POINTING_HAND`) when hovering over the gutter at the given index. See :ref:`is_gutter_clickable()` and :ref:`set_line_gutter_clickable()`. .. rst-class:: classref-item-separator @@ -3565,7 +3565,7 @@ If ``true``, the mouse cursor will change to a pointing hand (:ref:`Control.CURS |void| **set_gutter_custom_draw**\ (\ column\: :ref:`int`, draw_callback\: :ref:`Callable`\ ) :ref:`πŸ”—` -Set a custom draw callback for the gutter at the given index. ``draw_callback`` must take the following arguments: A line index :ref:`int`, a gutter index :ref:`int`, and an area :ref:`Rect2`. This callback only works when the gutter type is :ref:`GUTTER_TYPE_CUSTOM` (see :ref:`set_gutter_type`). +Set a custom draw callback for the gutter at the given index. ``draw_callback`` must take the following arguments: A line index :ref:`int`, a gutter index :ref:`int`, and an area :ref:`Rect2`. This callback only works when the gutter type is :ref:`GUTTER_TYPE_CUSTOM` (see :ref:`set_gutter_type()`). .. rst-class:: classref-item-separator @@ -3577,7 +3577,7 @@ Set a custom draw callback for the gutter at the given index. ``draw_callback`` |void| **set_gutter_draw**\ (\ gutter\: :ref:`int`, draw\: :ref:`bool`\ ) :ref:`πŸ”—` -If ``true``, the gutter at the given index is drawn. The gutter type (:ref:`set_gutter_type`) determines how it is drawn. See :ref:`is_gutter_drawn`. +If ``true``, the gutter at the given index is drawn. The gutter type (:ref:`set_gutter_type()`) determines how it is drawn. See :ref:`is_gutter_drawn()`. .. rst-class:: classref-item-separator @@ -3601,7 +3601,7 @@ Sets the name of the gutter at the given index. |void| **set_gutter_overwritable**\ (\ gutter\: :ref:`int`, overwritable\: :ref:`bool`\ ) :ref:`πŸ”—` -If ``true``, the line data of the gutter at the given index can be overridden when using :ref:`merge_gutters`. See :ref:`is_gutter_overwritable`. +If ``true``, the line data of the gutter at the given index can be overridden when using :ref:`merge_gutters()`. See :ref:`is_gutter_overwritable()`. .. rst-class:: classref-item-separator @@ -3699,7 +3699,7 @@ Sets the custom background color of the given line. If transparent, this color i |void| **set_line_gutter_clickable**\ (\ line\: :ref:`int`, gutter\: :ref:`int`, clickable\: :ref:`bool`\ ) :ref:`πŸ”—` -If ``clickable`` is ``true``, makes the ``gutter`` on the given ``line`` clickable. This is like :ref:`set_gutter_clickable`, but for a single line. If :ref:`is_gutter_clickable` is ``true``, this will not have any effect. See :ref:`is_line_gutter_clickable` and :ref:`gutter_clicked`. +If ``clickable`` is ``true``, makes the ``gutter`` on the given ``line`` clickable. This is like :ref:`set_gutter_clickable()`, but for a single line. If :ref:`is_gutter_clickable()` is ``true``, this will not have any effect. See :ref:`is_line_gutter_clickable()` and :ref:`gutter_clicked`. .. rst-class:: classref-item-separator @@ -3711,7 +3711,7 @@ If ``clickable`` is ``true``, makes the ``gutter`` on the given ``line`` clickab |void| **set_line_gutter_icon**\ (\ line\: :ref:`int`, gutter\: :ref:`int`, icon\: :ref:`Texture2D`\ ) :ref:`πŸ”—` -Sets the icon for ``gutter`` on ``line`` to ``icon``. This only works when the gutter type is :ref:`GUTTER_TYPE_ICON` (see :ref:`set_gutter_type`). +Sets the icon for ``gutter`` on ``line`` to ``icon``. This only works when the gutter type is :ref:`GUTTER_TYPE_ICON` (see :ref:`set_gutter_type()`). .. rst-class:: classref-item-separator @@ -3747,7 +3747,7 @@ Sets the metadata for ``gutter`` on ``line`` to ``metadata``. |void| **set_line_gutter_text**\ (\ line\: :ref:`int`, gutter\: :ref:`int`, text\: :ref:`String`\ ) :ref:`πŸ”—` -Sets the text for ``gutter`` on ``line`` to ``text``. This only works when the gutter type is :ref:`GUTTER_TYPE_STRING` (see :ref:`set_gutter_type`). +Sets the text for ``gutter`` on ``line`` to ``text``. This only works when the gutter type is :ref:`GUTTER_TYPE_STRING` (see :ref:`set_gutter_type()`). .. rst-class:: classref-item-separator @@ -3759,7 +3759,7 @@ Sets the text for ``gutter`` on ``line`` to ``text``. This only works when the g |void| **set_overtype_mode_enabled**\ (\ enabled\: :ref:`bool`\ ) :ref:`πŸ”—` -If ``true``, enables overtype mode. In this mode, typing overrides existing text instead of inserting text. The :ref:`ProjectSettings.input/ui_text_toggle_insert_mode` action toggles overtype mode. See :ref:`is_overtype_mode_enabled`. +If ``true``, enables overtype mode. In this mode, typing overrides existing text instead of inserting text. The :ref:`ProjectSettings.input/ui_text_toggle_insert_mode` action toggles overtype mode. See :ref:`is_overtype_mode_enabled()`. .. rst-class:: classref-item-separator @@ -3771,7 +3771,7 @@ If ``true``, enables overtype mode. In this mode, typing overrides existing text |void| **set_search_flags**\ (\ flags\: :ref:`int`\ ) :ref:`πŸ”—` -Sets the search ``flags``. This is used with :ref:`set_search_text` to highlight occurrences of the searched text. Search flags can be specified from the :ref:`SearchFlags` enum. +Sets the search ``flags``. This is used with :ref:`set_search_text()` to highlight occurrences of the searched text. Search flags can be specified from the :ref:`SearchFlags` enum. .. rst-class:: classref-item-separator @@ -3783,7 +3783,7 @@ Sets the search ``flags``. This is used with :ref:`set_search_text`\ ) :ref:`πŸ”—` -Sets the search text. See :ref:`set_search_flags`. +Sets the search text. See :ref:`set_search_flags()`. .. rst-class:: classref-item-separator @@ -3823,7 +3823,7 @@ Sets the selection origin line to the ``line`` for the given ``caret_index``. If If ``can_be_hidden`` is ``false``, The line will be set to the nearest unhidden line below or above. -If ``wrap_index`` is ``-1``, the selection origin column will be clamped to the ``line``'s length. If ``wrap_index`` is greater than ``-1``, the column will be moved to attempt to match the visual x position on the line's ``wrap_index`` to the position from the last time :ref:`set_selection_origin_column` or :ref:`select` was called. +If ``wrap_index`` is ``-1``, the selection origin column will be clamped to the ``line``'s length. If ``wrap_index`` is greater than ``-1``, the column will be moved to attempt to match the visual x position on the line's ``wrap_index`` to the position from the last time :ref:`set_selection_origin_column()` or :ref:`select()` was called. .. rst-class:: classref-item-separator @@ -3873,7 +3873,7 @@ Moves a selection and a caret for the next occurrence of the current selection. Starts an action, will end the current action if ``action`` is different. -An action will also end after a call to :ref:`end_action`, after :ref:`ProjectSettings.gui/timers/text_edit_idle_detect_sec` is triggered or a new undoable step outside the :ref:`start_action` and :ref:`end_action` calls. +An action will also end after a call to :ref:`end_action()`, after :ref:`ProjectSettings.gui/timers/text_edit_idle_detect_sec` is triggered or a new undoable step outside the :ref:`start_action()` and :ref:`end_action()` calls. .. rst-class:: classref-item-separator diff --git a/classes/class_textmesh.rst b/classes/class_textmesh.rst index 123e8e39d..8c5e716b0 100644 --- a/classes/class_textmesh.rst +++ b/classes/class_textmesh.rst @@ -321,7 +321,7 @@ Set additional options for BiDi override. The text to generate mesh from. -\ **Note:** Due to being a :ref:`Resource`, it doesn't follow the rules of :ref:`Node.auto_translate_mode`. If disabling translation is desired, it should be done manually with :ref:`Object.set_message_translation`. +\ **Note:** Due to being a :ref:`Resource`, it doesn't follow the rules of :ref:`Node.auto_translate_mode`. If disabling translation is desired, it should be done manually with :ref:`Object.set_message_translation()`. .. rst-class:: classref-item-separator diff --git a/classes/class_textserver.rst b/classes/class_textserver.rst index 73a61ba6c..1357efc5c 100644 --- a/classes/class_textserver.rst +++ b/classes/class_textserver.rst @@ -1341,7 +1341,7 @@ TextServer supports locale dependent and context sensitive case conversion. :ref:`Feature` **FEATURE_USE_SUPPORT_DATA** = ``4096`` -TextServer require external data file for some features, see :ref:`load_support_data`. +TextServer require external data file for some features, see :ref:`load_support_data()`. .. _class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS: @@ -1349,7 +1349,7 @@ TextServer require external data file for some features, see :ref:`load_support_ :ref:`Feature` **FEATURE_UNICODE_IDENTIFIERS** = ``8192`` -TextServer supports UAX #31 identifier validation, see :ref:`is_valid_identifier`. +TextServer supports UAX #31 identifier validation, see :ref:`is_valid_identifier()`. .. _class_TextServer_constant_FEATURE_UNICODE_SECURITY: @@ -1592,7 +1592,7 @@ Method Descriptions :ref:`RID` **create_font**\ (\ ) :ref:`πŸ”—` -Creates a new, empty font cache entry resource. To free the resulting resource, use the :ref:`free_rid` method. +Creates a new, empty font cache entry resource. To free the resulting resource, use the :ref:`free_rid()` method. .. rst-class:: classref-item-separator @@ -1604,7 +1604,7 @@ Creates a new, empty font cache entry resource. To free the resulting resource, :ref:`RID` **create_font_linked_variation**\ (\ font_rid\: :ref:`RID`\ ) :ref:`πŸ”—` -Creates a new variation existing font which is reusing the same glyph cache and font data. To free the resulting resource, use the :ref:`free_rid` method. +Creates a new variation existing font which is reusing the same glyph cache and font data. To free the resulting resource, use the :ref:`free_rid()` method. .. rst-class:: classref-item-separator @@ -1616,7 +1616,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\ ) :ref:`πŸ”—` -Creates a 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`). @@ -1646,7 +1646,7 @@ Draws box displaying character hexadecimal code. Used for replacing missing char 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. +\ **Note:** This function will not remove textures associated with the glyphs, use :ref:`font_remove_texture()` to remove them manually. .. rst-class:: classref-item-separator @@ -1684,7 +1684,7 @@ Removes all font sizes from the cache entry. Removes all textures from font cache entry. -\ **Note:** This function will not remove glyphs associated with the texture, use :ref:`font_remove_glyph` to remove them manually. +\ **Note:** This function will not remove glyphs associated with the texture, use :ref:`font_remove_glyph()` to remove them manually. .. rst-class:: classref-item-separator @@ -1698,7 +1698,7 @@ Removes all textures from font cache entry. Draws single glyph into a canvas item at the position, using ``font_rid`` at the size ``size``. -\ **Note:** Glyph index is specific to the font, use glyphs indices returned by :ref:`shaped_text_get_glyphs` or :ref:`font_get_glyph_index`. +\ **Note:** Glyph index is specific to the font, use glyphs indices returned by :ref:`shaped_text_get_glyphs()` or :ref:`font_get_glyph_index()`. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update. @@ -1714,7 +1714,7 @@ Draws single glyph into a canvas item at the position, using ``font_rid`` at the Draws single glyph outline of size ``outline_size`` into a canvas item at the position, using ``font_rid`` at the size ``size``. -\ **Note:** Glyph index is specific to the font, use glyphs indices returned by :ref:`shaped_text_get_glyphs` or :ref:`font_get_glyph_index`. +\ **Note:** Glyph index is specific to the font, use glyphs indices returned by :ref:`shaped_text_get_glyphs()` or :ref:`font_get_glyph_index()`. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update. @@ -1764,7 +1764,7 @@ Returns extra baseline offset (as a fraction of font height). :ref:`int` **font_get_char_from_glyph_index**\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, glyph_index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns character code associated with ``glyph_index``, or ``0`` if ``glyph_index`` is invalid. See :ref:`font_get_glyph_index`. +Returns character code associated with ``glyph_index``, or ``0`` if ``glyph_index`` is invalid. See :ref:`font_get_glyph_index()`. .. rst-class:: classref-item-separator @@ -1926,7 +1926,7 @@ Returns outline contours of the glyph as a :ref:`Dictionary` w :ref:`int` **font_get_glyph_index**\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, char\: :ref:`int`, variation_selector\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the glyph index of a ``char``, optionally modified by the ``variation_selector``. See :ref:`font_get_char_from_glyph_index`. +Returns the glyph index of a ``char``, optionally modified by the ``variation_selector``. See :ref:`font_get_char_from_glyph_index()`. .. rst-class:: classref-item-separator @@ -2374,7 +2374,7 @@ Returns thickness of the underline in pixels. :ref:`Dictionary` **font_get_variation_coordinates**\ (\ font_rid\: :ref:`RID`\ ) |const| :ref:`πŸ”—` -Returns variation coordinates for the specified font cache entry. See :ref:`font_supported_variation_list` for more info. +Returns variation coordinates for the specified font cache entry. See :ref:`font_supported_variation_list()` for more info. .. rst-class:: classref-item-separator @@ -2472,7 +2472,7 @@ Returns ``true``, if font supports given script (ISO 15924 code). Removes specified 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. +\ **Note:** This function will not remove textures associated with the glyphs, use :ref:`font_remove_texture()` to remove them manually. .. rst-class:: classref-item-separator @@ -2534,7 +2534,7 @@ Removes specified font size from the cache entry. Removes specified texture from the cache entry. -\ **Note:** This function will not remove glyphs associated with the texture, remove them manually, using :ref:`font_remove_glyph`. +\ **Note:** This function will not remove glyphs associated with the texture, remove them manually, using :ref:`font_remove_glyph()`. .. rst-class:: classref-item-separator @@ -2838,7 +2838,7 @@ Sets kerning for the pair of glyphs. |void| **font_set_language_support_override**\ (\ font_rid\: :ref:`RID`, language\: :ref:`String`, supported\: :ref:`bool`\ ) :ref:`πŸ”—` -Adds override for :ref:`font_is_language_supported`. +Adds override for :ref:`font_is_language_supported()`. .. rst-class:: classref-item-separator @@ -2936,7 +2936,7 @@ Sets scaling factor of the color bitmap font. |void| **font_set_script_support_override**\ (\ font_rid\: :ref:`RID`, script\: :ref:`String`, supported\: :ref:`bool`\ ) :ref:`πŸ”—` -Adds override for :ref:`font_is_script_supported`. +Adds override for :ref:`font_is_script_supported()`. .. rst-class:: classref-item-separator @@ -2962,7 +2962,7 @@ Sets the spacing for ``spacing`` (see :ref:`SpacingType`, :ref:`font_set_variation_coordinates`, or :ref:`font_set_transform` instead. +\ **Note:** This value is used for font matching only and will not affect font rendering. Use :ref:`font_set_face_index()`, :ref:`font_set_variation_coordinates()`, or :ref:`font_set_transform()` instead. .. rst-class:: classref-item-separator @@ -2976,7 +2976,7 @@ Sets font stretch amount, compared to a normal width. A percentage value between Sets the font style flags, see :ref:`FontStyle`. -\ **Note:** This value is used for font matching only and will not affect font rendering. Use :ref:`font_set_face_index`, :ref:`font_set_variation_coordinates`, :ref:`font_set_embolden`, or :ref:`font_set_transform` instead. +\ **Note:** This value is used for font matching only and will not affect font rendering. Use :ref:`font_set_face_index()`, :ref:`font_set_variation_coordinates()`, :ref:`font_set_embolden()`, or :ref:`font_set_transform()` instead. .. rst-class:: classref-item-separator @@ -3074,7 +3074,7 @@ Sets thickness of the underline in pixels. |void| **font_set_variation_coordinates**\ (\ font_rid\: :ref:`RID`, variation_coordinates\: :ref:`Dictionary`\ ) :ref:`πŸ”—` -Sets variation coordinates for the specified font cache entry. See :ref:`font_supported_variation_list` for more info. +Sets variation coordinates for the specified font cache entry. See :ref:`font_supported_variation_list()` for more info. .. rst-class:: classref-item-separator @@ -3088,7 +3088,7 @@ Sets variation coordinates for the specified font cache entry. See :ref:`font_su Sets weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``. -\ **Note:** This value is used for font matching only and will not affect font rendering. Use :ref:`font_set_face_index`, :ref:`font_set_variation_coordinates`, or :ref:`font_set_embolden` instead. +\ **Note:** This value is used for font matching only and will not affect font rendering. Use :ref:`font_set_face_index()`, :ref:`font_set_variation_coordinates()`, or :ref:`font_set_embolden()` instead. .. rst-class:: classref-item-separator @@ -3248,7 +3248,7 @@ Returns ``true`` if the server supports a feature. Returns index of the first string in ``dict`` which is visually confusable with the ``string``, or ``-1`` if none is found. -\ **Note:** This method doesn't detect invisible characters, for spoof detection use it in combination with :ref:`spoof_check`. +\ **Note:** This method doesn't detect invisible characters, for spoof detection use it in combination with :ref:`spoof_check()`. \ **Note:** Always returns ``-1`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY` feature. @@ -3390,7 +3390,7 @@ Saves optional TextServer database (e.g. ICU break iterators and dictionaries) t :ref:`int` **shaped_get_span_count**\ (\ shaped\: :ref:`RID`\ ) |const| :ref:`πŸ”—` -Returns number of text spans added using :ref:`shaped_text_add_string` or :ref:`shaped_text_add_object`. +Returns number of text spans added using :ref:`shaped_text_add_string()` or :ref:`shaped_text_add_object()`. .. rst-class:: classref-item-separator diff --git a/classes/class_textserverextension.rst b/classes/class_textserverextension.rst index 9709d6210..d52a0cb4e 100644 --- a/classes/class_textserverextension.rst +++ b/classes/class_textserverextension.rst @@ -1918,7 +1918,7 @@ Sets kerning for the pair of glyphs. **Optional.**\ -Adds override for :ref:`_font_is_language_supported`. +Adds override for :ref:`_font_is_language_supported()`. .. rst-class:: classref-item-separator @@ -2030,7 +2030,7 @@ Sets scaling factor of the color bitmap font. **Optional.**\ -Adds override for :ref:`_font_is_script_supported`. +Adds override for :ref:`_font_is_script_supported()`. .. rst-class:: classref-item-separator @@ -2520,7 +2520,7 @@ Saves optional TextServer database (e.g. ICU break iterators and dictionaries) t **Required.**\ -Returns number of text spans added using :ref:`_shaped_text_add_string` or :ref:`_shaped_text_add_object`. +Returns number of text spans added using :ref:`_shaped_text_add_string()` or :ref:`_shaped_text_add_object()`. .. rst-class:: classref-item-separator diff --git a/classes/class_textserverfallback.rst b/classes/class_textserverfallback.rst index ff8fba457..92b6cdf00 100644 --- a/classes/class_textserverfallback.rst +++ b/classes/class_textserverfallback.rst @@ -21,7 +21,7 @@ Description A fallback implementation of Godot's text server. This fallback is faster than :ref:`TextServerAdvanced` for processing a lot of text, but it does not support BiDi and complex text layout. -\ **Note:** This text server is not part of official Godot binaries. If you want to use it, compile the engine with the option ``module_text_server_fb_enabled=yes``. +\ **Note:** This text server is not part of official Godot binaries. If you want to use it, compile the engine with the option ``module_text_server_fb_enabled=yes``. When building with **TextServerFallback**, consider also disabling :ref:`TextServerAdvanced` with ``module_text_server_adv_enabled=no`` to reduce binary size. .. |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_texture2d.rst b/classes/class_texture2d.rst index 86b105bda..b89347854 100644 --- a/classes/class_texture2d.rst +++ b/classes/class_texture2d.rst @@ -23,7 +23,7 @@ Description A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D :ref:`Sprite2D` or GUI :ref:`Control`. -Textures are often created by loading them from a file. See :ref:`@GDScript.load`. +Textures are often created by loading them from a file. See :ref:`@GDScript.load()`. \ **Texture2D** is a base for other resources. It cannot be used directly. @@ -240,7 +240,7 @@ Returns an :ref:`Image` that is a copy of data from this **Texture2 \ **Note:** This will return ``null`` if this **Texture2D** is invalid. -\ **Note:** This will fetch the texture data from the GPU, which might cause performance problems when overused. Avoid calling :ref:`get_image` every frame, especially on large textures. +\ **Note:** This will fetch the texture data from the GPU, which might cause performance problems when overused. Avoid calling :ref:`get_image()` every frame, especially on large textures. .. rst-class:: classref-item-separator diff --git a/classes/class_texturelayered.rst b/classes/class_texturelayered.rst index 128466124..fb9e75198 100644 --- a/classes/class_texturelayered.rst +++ b/classes/class_texturelayered.rst @@ -27,7 +27,7 @@ Data is set on a per-layer basis. For :ref:`Texture2DArray All images need to have the same width, height and number of mipmap levels. -A **TextureLayered** can be loaded with :ref:`ResourceLoader.load`. +A **TextureLayered** can be loaded with :ref:`ResourceLoader.load()`. Internally, Godot maps these files to their respective counterparts in the target rendering driver (Vulkan, OpenGL3). diff --git a/classes/class_theme.rst b/classes/class_theme.rst index e9c5589bd..f8aabeeee 100644 --- a/classes/class_theme.rst +++ b/classes/class_theme.rst @@ -19,7 +19,7 @@ A resource used for styling/skinning :ref:`Control`\ s and :ref:` Description ----------- -A resource used for styling/skinning :ref:`Control` and :ref:`Window` nodes. While individual controls can be styled using their local theme overrides (see :ref:`Control.add_theme_color_override`), theme resources allow you to store and apply the same settings across all controls sharing the same type (e.g. style all :ref:`Button`\ s the same). One theme resource can be used for the entire project, but you can also set a separate theme resource to a branch of control nodes. A theme resource assigned to a control applies to the control itself, as well as all of its direct and indirect children (as long as a chain of controls is uninterrupted). +A resource used for styling/skinning :ref:`Control` and :ref:`Window` nodes. While individual controls can be styled using their local theme overrides (see :ref:`Control.add_theme_color_override()`), theme resources allow you to store and apply the same settings across all controls sharing the same type (e.g. style all :ref:`Button`\ s the same). One theme resource can be used for the entire project, but you can also set a separate theme resource to a branch of control nodes. A theme resource assigned to a control applies to the control itself, as well as all of its direct and indirect children (as long as a chain of controls is uninterrupted). Use :ref:`ProjectSettings.gui/theme/custom` to set up a project-scope theme that will be available to every control in your project. @@ -277,7 +277,7 @@ Property Descriptions The default base scale factor of this theme resource. Used by some controls to scale their visual properties based on the global scale factor. If this value is set to ``0.0``, the global scale factor is used (see :ref:`ThemeDB.fallback_base_scale`). -Use :ref:`has_default_base_scale` to check if this value is valid. +Use :ref:`has_default_base_scale()` to check if this value is valid. .. rst-class:: classref-item-separator @@ -296,7 +296,7 @@ Use :ref:`has_default_base_scale` to The default font of this theme resource. Used as the default value when trying to fetch a font resource that doesn't exist in this theme or is in invalid state. If the default font is also missing or invalid, the engine fallback value is used (see :ref:`ThemeDB.fallback_font`). -Use :ref:`has_default_font` to check if this value is valid. +Use :ref:`has_default_font()` to check if this value is valid. .. rst-class:: classref-item-separator @@ -315,7 +315,7 @@ Use :ref:`has_default_font` to check if thi The default font size of this theme resource. Used as the default value when trying to fetch a font size value that doesn't exist in this theme or is in invalid state. If the default font size is also missing or invalid, the engine fallback value is used (see :ref:`ThemeDB.fallback_font_size`). -Values below ``1`` are invalid and can be used to unset the property. Use :ref:`has_default_font_size` to check if this value is valid. +Values below ``1`` are invalid and can be used to unset the property. Use :ref:`has_default_font_size()` to check if this value is valid. .. rst-class:: classref-section-separator @@ -360,7 +360,7 @@ Removes all the theme properties defined on the theme resource. Removes the :ref:`Color` property defined by ``name`` and ``theme_type``, if it exists. -Fails if it doesn't exist. Use :ref:`has_color` to check for existence. +Fails if it doesn't exist. Use :ref:`has_color()` to check for existence. .. rst-class:: classref-item-separator @@ -374,7 +374,7 @@ Fails if it doesn't exist. Use :ref:`has_color` to Removes the constant property defined by ``name`` and ``theme_type``, if it exists. -Fails if it doesn't exist. Use :ref:`has_constant` to check for existence. +Fails if it doesn't exist. Use :ref:`has_constant()` to check for existence. .. rst-class:: classref-item-separator @@ -388,7 +388,7 @@ Fails if it doesn't exist. Use :ref:`has_constant` property defined by ``name`` and ``theme_type``, if it exists. -Fails if it doesn't exist. Use :ref:`has_font` to check for existence. +Fails if it doesn't exist. Use :ref:`has_font()` to check for existence. .. rst-class:: classref-item-separator @@ -402,7 +402,7 @@ Fails if it doesn't exist. Use :ref:`has_font` to c Removes the font size property defined by ``name`` and ``theme_type``, if it exists. -Fails if it doesn't exist. Use :ref:`has_font_size` to check for existence. +Fails if it doesn't exist. Use :ref:`has_font_size()` to check for existence. .. rst-class:: classref-item-separator @@ -416,7 +416,7 @@ Fails if it doesn't exist. Use :ref:`has_font_size` to check for existence. +Fails if it doesn't exist. Use :ref:`has_icon()` to check for existence. .. rst-class:: classref-item-separator @@ -430,7 +430,7 @@ Fails if it doesn't exist. Use :ref:`has_icon` to c Removes the :ref:`StyleBox` property defined by ``name`` and ``theme_type``, if it exists. -Fails if it doesn't exist. Use :ref:`has_stylebox` to check for existence. +Fails if it doesn't exist. Use :ref:`has_stylebox()` to check for existence. .. rst-class:: classref-item-separator @@ -444,7 +444,7 @@ Fails if it doesn't exist. Use :ref:`has_stylebox` to check for existence. +Fails if it doesn't exist. Use :ref:`has_theme_item()` to check for existence. \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic. @@ -458,7 +458,7 @@ Fails if it doesn't exist. Use :ref:`has_theme_item`\ ) :ref:`πŸ”—` -Unmarks ``theme_type`` as being a variation of another theme type. See :ref:`set_type_variation`. +Unmarks ``theme_type`` as being a variation of another theme type. See :ref:`set_type_variation()`. .. rst-class:: classref-item-separator @@ -472,7 +472,7 @@ Unmarks ``theme_type`` as being a variation of another theme type. See :ref:`set Returns the :ref:`Color` property defined by ``name`` and ``theme_type``, if it exists. -Returns the default color value if the property doesn't exist. Use :ref:`has_color` to check for existence. +Returns the default color value if the property doesn't exist. Use :ref:`has_color()` to check for existence. .. rst-class:: classref-item-separator @@ -484,7 +484,7 @@ Returns the default color value if the property doesn't exist. Use :ref:`has_col :ref:`PackedStringArray` **get_color_list**\ (\ theme_type\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Returns a list of names for :ref:`Color` properties defined with ``theme_type``. Use :ref:`get_color_type_list` to get a list of possible theme type names. +Returns a list of names for :ref:`Color` properties defined with ``theme_type``. Use :ref:`get_color_type_list()` to get a list of possible theme type names. .. rst-class:: classref-item-separator @@ -496,7 +496,7 @@ Returns a list of names for :ref:`Color` properties defined with `` :ref:`PackedStringArray` **get_color_type_list**\ (\ ) |const| :ref:`πŸ”—` -Returns a list of all unique theme type names for :ref:`Color` properties. Use :ref:`get_type_list` to get a list of all unique theme types. +Returns a list of all unique theme type names for :ref:`Color` properties. Use :ref:`get_type_list()` to get a list of all unique theme types. .. rst-class:: classref-item-separator @@ -510,7 +510,7 @@ Returns a list of all unique theme type names for :ref:`Color` prop Returns the constant property defined by ``name`` and ``theme_type``, if it exists. -Returns ``0`` if the property doesn't exist. Use :ref:`has_constant` to check for existence. +Returns ``0`` if the property doesn't exist. Use :ref:`has_constant()` to check for existence. .. rst-class:: classref-item-separator @@ -522,7 +522,7 @@ Returns ``0`` if the property doesn't exist. Use :ref:`has_constant` **get_constant_list**\ (\ theme_type\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Returns a list of names for constant properties defined with ``theme_type``. Use :ref:`get_constant_type_list` to get a list of possible theme type names. +Returns a list of names for constant properties defined with ``theme_type``. Use :ref:`get_constant_type_list()` to get a list of possible theme type names. .. rst-class:: classref-item-separator @@ -534,7 +534,7 @@ Returns a list of names for constant properties defined with ``theme_type``. Use :ref:`PackedStringArray` **get_constant_type_list**\ (\ ) |const| :ref:`πŸ”—` -Returns a list of all unique theme type names for constant properties. Use :ref:`get_type_list` to get a list of all unique theme types. +Returns a list of all unique theme type names for constant properties. Use :ref:`get_type_list()` to get a list of all unique theme types. .. rst-class:: classref-item-separator @@ -548,7 +548,7 @@ Returns a list of all unique theme type names for constant properties. Use :ref: Returns the :ref:`Font` property defined by ``name`` and ``theme_type``, if it exists. -Returns the default theme font if the property doesn't exist and the default theme font is set up (see :ref:`default_font`). Use :ref:`has_font` to check for existence of the property and :ref:`has_default_font` to check for existence of the default theme font. +Returns the default theme font if the property doesn't exist and the default theme font is set up (see :ref:`default_font`). Use :ref:`has_font()` to check for existence of the property and :ref:`has_default_font()` to check for existence of the default theme font. Returns the engine fallback font value, if neither exist (see :ref:`ThemeDB.fallback_font`). @@ -562,7 +562,7 @@ Returns the engine fallback font value, if neither exist (see :ref:`ThemeDB.fall :ref:`PackedStringArray` **get_font_list**\ (\ theme_type\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Returns a list of names for :ref:`Font` properties defined with ``theme_type``. Use :ref:`get_font_type_list` to get a list of possible theme type names. +Returns a list of names for :ref:`Font` properties defined with ``theme_type``. Use :ref:`get_font_type_list()` to get a list of possible theme type names. .. rst-class:: classref-item-separator @@ -576,7 +576,7 @@ Returns a list of names for :ref:`Font` properties defined with ``th Returns the font size property defined by ``name`` and ``theme_type``, if it exists. -Returns the default theme font size if the property doesn't exist and the default theme font size is set up (see :ref:`default_font_size`). Use :ref:`has_font_size` to check for existence of the property and :ref:`has_default_font_size` to check for existence of the default theme font. +Returns the default theme font size if the property doesn't exist and the default theme font size is set up (see :ref:`default_font_size`). Use :ref:`has_font_size()` to check for existence of the property and :ref:`has_default_font_size()` to check for existence of the default theme font. Returns the engine fallback font size value, if neither exist (see :ref:`ThemeDB.fallback_font_size`). @@ -590,7 +590,7 @@ Returns the engine fallback font size value, if neither exist (see :ref:`ThemeDB :ref:`PackedStringArray` **get_font_size_list**\ (\ theme_type\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Returns a list of names for font size properties defined with ``theme_type``. Use :ref:`get_font_size_type_list` to get a list of possible theme type names. +Returns a list of names for font size properties defined with ``theme_type``. Use :ref:`get_font_size_type_list()` to get a list of possible theme type names. .. rst-class:: classref-item-separator @@ -602,7 +602,7 @@ Returns a list of names for font size properties defined with ``theme_type``. Us :ref:`PackedStringArray` **get_font_size_type_list**\ (\ ) |const| :ref:`πŸ”—` -Returns a list of all unique theme type names for font size properties. Use :ref:`get_type_list` to get a list of all unique theme types. +Returns a list of all unique theme type names for font size properties. Use :ref:`get_type_list()` to get a list of all unique theme types. .. rst-class:: classref-item-separator @@ -614,7 +614,7 @@ Returns a list of all unique theme type names for font size properties. Use :ref :ref:`PackedStringArray` **get_font_type_list**\ (\ ) |const| :ref:`πŸ”—` -Returns a list of all unique theme type names for :ref:`Font` properties. Use :ref:`get_type_list` to get a list of all unique theme types. +Returns a list of all unique theme type names for :ref:`Font` properties. Use :ref:`get_type_list()` to get a list of all unique theme types. .. rst-class:: classref-item-separator @@ -628,7 +628,7 @@ Returns a list of all unique theme type names for :ref:`Font` proper Returns the icon property defined by ``name`` and ``theme_type``, if it exists. -Returns the engine fallback icon value if the property doesn't exist (see :ref:`ThemeDB.fallback_icon`). Use :ref:`has_icon` to check for existence. +Returns the engine fallback icon value if the property doesn't exist (see :ref:`ThemeDB.fallback_icon`). Use :ref:`has_icon()` to check for existence. .. rst-class:: classref-item-separator @@ -640,7 +640,7 @@ Returns the engine fallback icon value if the property doesn't exist (see :ref:` :ref:`PackedStringArray` **get_icon_list**\ (\ theme_type\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Returns a list of names for icon properties defined with ``theme_type``. Use :ref:`get_icon_type_list` to get a list of possible theme type names. +Returns a list of names for icon properties defined with ``theme_type``. Use :ref:`get_icon_type_list()` to get a list of possible theme type names. .. rst-class:: classref-item-separator @@ -652,7 +652,7 @@ Returns a list of names for icon properties defined with ``theme_type``. Use :re :ref:`PackedStringArray` **get_icon_type_list**\ (\ ) |const| :ref:`πŸ”—` -Returns a list of all unique theme type names for icon properties. Use :ref:`get_type_list` to get a list of all unique theme types. +Returns a list of all unique theme type names for icon properties. Use :ref:`get_type_list()` to get a list of all unique theme types. .. rst-class:: classref-item-separator @@ -666,7 +666,7 @@ Returns a list of all unique theme type names for icon properties. Use :ref:`get Returns the :ref:`StyleBox` property defined by ``name`` and ``theme_type``, if it exists. -Returns the engine fallback stylebox value if the property doesn't exist (see :ref:`ThemeDB.fallback_stylebox`). Use :ref:`has_stylebox` to check for existence. +Returns the engine fallback stylebox value if the property doesn't exist (see :ref:`ThemeDB.fallback_stylebox`). Use :ref:`has_stylebox()` to check for existence. .. rst-class:: classref-item-separator @@ -678,7 +678,7 @@ Returns the engine fallback stylebox value if the property doesn't exist (see :r :ref:`PackedStringArray` **get_stylebox_list**\ (\ theme_type\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Returns a list of names for :ref:`StyleBox` properties defined with ``theme_type``. Use :ref:`get_stylebox_type_list` to get a list of possible theme type names. +Returns a list of names for :ref:`StyleBox` properties defined with ``theme_type``. Use :ref:`get_stylebox_type_list()` to get a list of possible theme type names. .. rst-class:: classref-item-separator @@ -690,7 +690,7 @@ Returns a list of names for :ref:`StyleBox` properties defined w :ref:`PackedStringArray` **get_stylebox_type_list**\ (\ ) |const| :ref:`πŸ”—` -Returns a list of all unique theme type names for :ref:`StyleBox` properties. Use :ref:`get_type_list` to get a list of all unique theme types. +Returns a list of all unique theme type names for :ref:`StyleBox` properties. Use :ref:`get_type_list()` to get a list of all unique theme types. .. rst-class:: classref-item-separator @@ -704,7 +704,7 @@ Returns a list of all unique theme type names for :ref:`StyleBox Returns the theme property of ``data_type`` defined by ``name`` and ``theme_type``, if it exists. -Returns the engine fallback value if the property doesn't exist (see :ref:`ThemeDB`). Use :ref:`has_theme_item` to check for existence. +Returns the engine fallback value if the property doesn't exist (see :ref:`ThemeDB`). Use :ref:`has_theme_item()` to check for existence. \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic. @@ -718,7 +718,7 @@ Returns the engine fallback value if the property doesn't exist (see :ref:`Theme :ref:`PackedStringArray` **get_theme_item_list**\ (\ data_type\: :ref:`DataType`, theme_type\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Returns a list of names for properties of ``data_type`` defined with ``theme_type``. Use :ref:`get_theme_item_type_list` to get a list of possible theme type names. +Returns a list of names for properties of ``data_type`` defined with ``theme_type``. Use :ref:`get_theme_item_type_list()` to get a list of possible theme type names. \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic. @@ -732,7 +732,7 @@ Returns a list of names for properties of ``data_type`` defined with ``theme_typ :ref:`PackedStringArray` **get_theme_item_type_list**\ (\ data_type\: :ref:`DataType`\ ) |const| :ref:`πŸ”—` -Returns a list of all unique theme type names for ``data_type`` properties. Use :ref:`get_type_list` to get a list of all unique theme types. +Returns a list of all unique theme type names for ``data_type`` properties. Use :ref:`get_type_list()` to get a list of all unique theme types. \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic. @@ -784,7 +784,7 @@ Returns a list of all type variations for the given ``base_type``. Returns ``true`` if the :ref:`Color` property defined by ``name`` and ``theme_type`` exists. -Returns ``false`` if it doesn't exist. Use :ref:`set_color` to define it. +Returns ``false`` if it doesn't exist. Use :ref:`set_color()` to define it. .. rst-class:: classref-item-separator @@ -798,7 +798,7 @@ Returns ``false`` if it doesn't exist. Use :ref:`set_color` to define it. +Returns ``false`` if it doesn't exist. Use :ref:`set_constant()` to define it. .. rst-class:: classref-item-separator @@ -852,9 +852,9 @@ Returns ``false`` if it doesn't. The value must be greater than ``0`` to be cons :ref:`bool` **has_font**\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the :ref:`Font` property defined by ``name`` and ``theme_type`` exists, or if the default theme font is set up (see :ref:`has_default_font`). +Returns ``true`` if the :ref:`Font` property defined by ``name`` and ``theme_type`` exists, or if the default theme font is set up (see :ref:`has_default_font()`). -Returns ``false`` if neither exist. Use :ref:`set_font` to define the property. +Returns ``false`` if neither exist. Use :ref:`set_font()` to define the property. .. rst-class:: classref-item-separator @@ -866,9 +866,9 @@ Returns ``false`` if neither exist. Use :ref:`set_font` **has_font_size**\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the font size property defined by ``name`` and ``theme_type`` exists, or if the default theme font size is set up (see :ref:`has_default_font_size`). +Returns ``true`` if the font size property defined by ``name`` and ``theme_type`` exists, or if the default theme font size is set up (see :ref:`has_default_font_size()`). -Returns ``false`` if neither exist. Use :ref:`set_font_size` to define the property. +Returns ``false`` if neither exist. Use :ref:`set_font_size()` to define the property. .. rst-class:: classref-item-separator @@ -882,7 +882,7 @@ Returns ``false`` if neither exist. Use :ref:`set_font_size` to define it. +Returns ``false`` if it doesn't exist. Use :ref:`set_icon()` to define it. .. rst-class:: classref-item-separator @@ -896,7 +896,7 @@ Returns ``false`` if it doesn't exist. Use :ref:`set_icon` property defined by ``name`` and ``theme_type`` exists. -Returns ``false`` if it doesn't exist. Use :ref:`set_stylebox` to define it. +Returns ``false`` if it doesn't exist. Use :ref:`set_stylebox()` to define it. .. rst-class:: classref-item-separator @@ -910,7 +910,7 @@ Returns ``false`` if it doesn't exist. Use :ref:`set_stylebox` to define it. +Returns ``false`` if it doesn't exist. Use :ref:`set_theme_item()` to define it. \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic. @@ -964,7 +964,7 @@ Removes the theme type, gracefully discarding defined theme items. If the type i Renames the :ref:`Color` property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. -Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_color` to check for existence, and :ref:`clear_color` to remove the existing property. +Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_color()` to check for existence, and :ref:`clear_color()` to remove the existing property. .. rst-class:: classref-item-separator @@ -978,7 +978,7 @@ Fails if it doesn't exist, or if a similar property with the new name already ex Renames the constant property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. -Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_constant` to check for existence, and :ref:`clear_constant` to remove the existing property. +Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_constant()` to check for existence, and :ref:`clear_constant()` to remove the existing property. .. rst-class:: classref-item-separator @@ -992,7 +992,7 @@ Fails if it doesn't exist, or if a similar property with the new name already ex Renames the :ref:`Font` property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. -Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_font` to check for existence, and :ref:`clear_font` to remove the existing property. +Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_font()` to check for existence, and :ref:`clear_font()` to remove the existing property. .. rst-class:: classref-item-separator @@ -1006,7 +1006,7 @@ Fails if it doesn't exist, or if a similar property with the new name already ex Renames the font size property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. -Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_font_size` to check for existence, and :ref:`clear_font_size` to remove the existing property. +Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_font_size()` to check for existence, and :ref:`clear_font_size()` to remove the existing property. .. rst-class:: classref-item-separator @@ -1020,7 +1020,7 @@ Fails if it doesn't exist, or if a similar property with the new name already ex Renames the icon property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. -Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_icon` to check for existence, and :ref:`clear_icon` to remove the existing property. +Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_icon()` to check for existence, and :ref:`clear_icon()` to remove the existing property. .. rst-class:: classref-item-separator @@ -1034,7 +1034,7 @@ Fails if it doesn't exist, or if a similar property with the new name already ex Renames the :ref:`StyleBox` property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. -Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_stylebox` to check for existence, and :ref:`clear_stylebox` to remove the existing property. +Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_stylebox()` to check for existence, and :ref:`clear_stylebox()` to remove the existing property. .. rst-class:: classref-item-separator @@ -1048,7 +1048,7 @@ Fails if it doesn't exist, or if a similar property with the new name already ex Renames the theme property of ``data_type`` defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. -Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_theme_item` to check for existence, and :ref:`clear_theme_item` to remove the existing property. +Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_theme_item()` to check for existence, and :ref:`clear_theme_item()` to remove the existing property. \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic. @@ -1062,7 +1062,7 @@ Fails if it doesn't exist, or if a similar property with the new name already ex |void| **set_color**\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName`, color\: :ref:`Color`\ ) :ref:`πŸ”—` -Creates or changes the value of the :ref:`Color` property defined by ``name`` and ``theme_type``. Use :ref:`clear_color` to remove the property. +Creates or changes the value of the :ref:`Color` property defined by ``name`` and ``theme_type``. Use :ref:`clear_color()` to remove the property. .. rst-class:: classref-item-separator @@ -1074,7 +1074,7 @@ Creates or changes the value of the :ref:`Color` property defined b |void| **set_constant**\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName`, constant\: :ref:`int`\ ) :ref:`πŸ”—` -Creates or changes the value of the constant property defined by ``name`` and ``theme_type``. Use :ref:`clear_constant` to remove the property. +Creates or changes the value of the constant property defined by ``name`` and ``theme_type``. Use :ref:`clear_constant()` to remove the property. .. rst-class:: classref-item-separator @@ -1086,7 +1086,7 @@ Creates or changes the value of the constant property defined by ``name`` and `` |void| **set_font**\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName`, font\: :ref:`Font`\ ) :ref:`πŸ”—` -Creates or changes the value of the :ref:`Font` property defined by ``name`` and ``theme_type``. Use :ref:`clear_font` to remove the property. +Creates or changes the value of the :ref:`Font` property defined by ``name`` and ``theme_type``. Use :ref:`clear_font()` to remove the property. .. rst-class:: classref-item-separator @@ -1098,7 +1098,7 @@ Creates or changes the value of the :ref:`Font` property defined by |void| **set_font_size**\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName`, font_size\: :ref:`int`\ ) :ref:`πŸ”—` -Creates or changes the value of the font size property defined by ``name`` and ``theme_type``. Use :ref:`clear_font_size` to remove the property. +Creates or changes the value of the font size property defined by ``name`` and ``theme_type``. Use :ref:`clear_font_size()` to remove the property. .. rst-class:: classref-item-separator @@ -1110,7 +1110,7 @@ Creates or changes the value of the font size property defined by ``name`` and ` |void| **set_icon**\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName`, texture\: :ref:`Texture2D`\ ) :ref:`πŸ”—` -Creates or changes the value of the icon property defined by ``name`` and ``theme_type``. Use :ref:`clear_icon` to remove the property. +Creates or changes the value of the icon property defined by ``name`` and ``theme_type``. Use :ref:`clear_icon()` to remove the property. .. rst-class:: classref-item-separator @@ -1122,7 +1122,7 @@ Creates or changes the value of the icon property defined by ``name`` and ``them |void| **set_stylebox**\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName`, texture\: :ref:`StyleBox`\ ) :ref:`πŸ”—` -Creates or changes the value of the :ref:`StyleBox` property defined by ``name`` and ``theme_type``. Use :ref:`clear_stylebox` to remove the property. +Creates or changes the value of the :ref:`StyleBox` property defined by ``name`` and ``theme_type``. Use :ref:`clear_stylebox()` to remove the property. .. rst-class:: classref-item-separator @@ -1134,7 +1134,7 @@ Creates or changes the value of the :ref:`StyleBox` property def |void| **set_theme_item**\ (\ data_type\: :ref:`DataType`, name\: :ref:`StringName`, theme_type\: :ref:`StringName`, value\: :ref:`Variant`\ ) :ref:`πŸ”—` -Creates or changes the value of the theme property of ``data_type`` defined by ``name`` and ``theme_type``. Use :ref:`clear_theme_item` to remove the property. +Creates or changes the value of the theme property of ``data_type`` defined by ``name`` and ``theme_type``. Use :ref:`clear_theme_item()` to remove the property. Fails if the ``value`` type is not accepted by ``data_type``. diff --git a/classes/class_thread.rst b/classes/class_thread.rst index d8937d468..ff5d5b8e8 100644 --- a/classes/class_thread.rst +++ b/classes/class_thread.rst @@ -29,7 +29,7 @@ To ensure proper cleanup without crashes or deadlocks, when a **Thread**'s refer - It must not be waiting on any :ref:`Semaphore` objects. -- :ref:`wait_to_finish` should have been called on it. +- :ref:`wait_to_finish()` should have been called on it. .. rst-class:: classref-introduction-group @@ -118,7 +118,7 @@ Method Descriptions :ref:`String` **get_id**\ (\ ) |const| :ref:`πŸ”—` -Returns the current **Thread**'s ID, uniquely identifying it among all threads. If the **Thread** has not started running or if :ref:`wait_to_finish` has been called, this returns an empty string. +Returns the current **Thread**'s ID, uniquely identifying it among all threads. If the **Thread** has not started running or if :ref:`wait_to_finish()` has been called, this returns an empty string. .. rst-class:: classref-item-separator @@ -130,9 +130,9 @@ Returns the current **Thread**'s ID, uniquely identifying it among all threads. :ref:`bool` **is_alive**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this **Thread** is currently running the provided function. This is useful for determining if :ref:`wait_to_finish` can be called without blocking the calling thread. +Returns ``true`` if this **Thread** is currently running the provided function. This is useful for determining if :ref:`wait_to_finish()` can be called without blocking the calling thread. -To check if a **Thread** is joinable, use :ref:`is_started`. +To check if a **Thread** is joinable, use :ref:`is_started()`. .. rst-class:: classref-item-separator @@ -144,7 +144,7 @@ To check if a **Thread** is joinable, use :ref:`is_started` **is_started**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this **Thread** has been started. Once started, this will return ``true`` until it is joined using :ref:`wait_to_finish`. For checking if a **Thread** is still executing its task, use :ref:`is_alive`. +Returns ``true`` if this **Thread** has been started. Once started, this will return ``true`` until it is joined using :ref:`wait_to_finish()`. For checking if a **Thread** is still executing its task, use :ref:`is_alive()`. .. rst-class:: classref-item-separator @@ -182,7 +182,7 @@ Because of that, there may be cases where the user may want to disable them (``e Starts a new **Thread** that calls ``callable``. -If the method takes some arguments, you can pass them using :ref:`Callable.bind`. +If the method takes some arguments, you can pass them using :ref:`Callable.bind()`. The ``priority`` of the **Thread** can be changed by passing a value from the :ref:`Priority` enum. @@ -198,11 +198,11 @@ Returns :ref:`@GlobalScope.OK` on success, or :r :ref:`Variant` **wait_to_finish**\ (\ ) :ref:`πŸ”—` -Joins the **Thread** and waits for it to finish. Returns the output of the :ref:`Callable` passed to :ref:`start`. +Joins the **Thread** and waits for it to finish. Returns the output of the :ref:`Callable` passed to :ref:`start()`. Should either be used when you want to retrieve the value returned from the method called by the **Thread** or before freeing the instance that contains the **Thread**. -To determine if this can be called without blocking the calling thread, check if :ref:`is_alive` is ``false``. +To determine if this can be called without blocking the calling thread, check if :ref:`is_alive()` is ``false``. .. |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_tiledata.rst b/classes/class_tiledata.rst index adf61149a..af4581a4d 100644 --- a/classes/class_tiledata.rst +++ b/classes/class_tiledata.rst @@ -19,7 +19,7 @@ Settings for a single tile in a :ref:`TileSet`. Description ----------- -**TileData** object represents a single tile in a :ref:`TileSet`. It is usually edited using the tileset editor, but it can be modified at runtime using :ref:`TileMap._tile_data_runtime_update`. +**TileData** object represents a single tile in a :ref:`TileSet`. It is usually edited using the tileset editor, but it can be modified at runtime using :ref:`TileMap._tile_data_runtime_update()`. .. rst-class:: classref-reftable-group @@ -435,7 +435,7 @@ Returns the constant linear velocity applied to objects colliding with this tile :ref:`Variant` **get_custom_data**\ (\ layer_name\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Returns the custom data value for custom data layer named ``layer_name``. To check if a custom data layer exists, use :ref:`has_custom_data`. +Returns the custom data value for custom data layer named ``layer_name``. To check if a custom data layer exists, use :ref:`has_custom_data()`. .. rst-class:: classref-item-separator @@ -473,7 +473,7 @@ Returns the navigation polygon of the tile for the TileSet navigation layer with :ref:`OccluderPolygon2D` **get_occluder**\ (\ layer_id\: :ref:`int`, flip_h\: :ref:`bool` = false, flip_v\: :ref:`bool` = false, transpose\: :ref:`bool` = false\ ) |const| :ref:`πŸ”—` -**Deprecated:** Use :ref:`get_occluder_polygon` instead. +**Deprecated:** Use :ref:`get_occluder_polygon()` instead. Returns the occluder polygon of the tile for the TileSet occlusion layer with index ``layer_id``. @@ -515,7 +515,7 @@ Returns the number of occluder polygons of the tile in the TileSet occlusion lay :ref:`int` **get_terrain_peering_bit**\ (\ peering_bit\: :ref:`CellNeighbor`\ ) |const| :ref:`πŸ”—` -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`. +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 @@ -695,7 +695,7 @@ Sets the navigation polygon for the TileSet navigation layer with index ``layer_ |void| **set_occluder**\ (\ layer_id\: :ref:`int`, occluder_polygon\: :ref:`OccluderPolygon2D`\ ) :ref:`πŸ”—` -**Deprecated:** Use :ref:`set_occluder_polygon` instead. +**Deprecated:** Use :ref:`set_occluder_polygon()` instead. Sets the occluder for the TileSet occlusion layer with index ``layer_id``. @@ -733,7 +733,7 @@ Sets the occluder polygon count in the TileSet occlusion layer with index ``laye |void| **set_terrain_peering_bit**\ (\ peering_bit\: :ref:`CellNeighbor`, terrain\: :ref:`int`\ ) :ref:`πŸ”—` -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`. +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 c77c7fc8f..f9bc361eb 100644 --- a/classes/class_tilemap.rst +++ b/classes/class_tilemap.rst @@ -28,7 +28,9 @@ Node for 2D tile-based maps. Tilemaps use a :ref:`TileSet` which 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`. +To force an update earlier on, call :ref:`update_internals()`. + +\ **Note:** For performance and compatibility reasons, the coordinates serialized by **TileMap** are limited to 16-bit signed integers, i.e. the range for X and Y coordinates is from ``-32768`` to ``32767``. When saving tile data, tiles outside this range are wrapped. .. rst-class:: classref-introduction-group @@ -356,11 +358,11 @@ Method Descriptions Called with a TileData object about to be used internally by the TileMap, 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`` and ``layer``. +This method is only called if :ref:`_use_tile_data_runtime_update()` is implemented and returns ``true`` for the given tile ``coords`` and ``layer``. \ **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 TileMap it needs an update. +\ **Note:** If the properties of ``tile_data`` object should change over time, use :ref:`notify_runtime_tile_data_update()` to notify the TileMap it needs an update. .. rst-class:: classref-item-separator @@ -376,7 +378,7 @@ Should return ``true`` if the tile at coordinates ``coords`` on layer ``layer`` \ **Warning:** Make sure this function only return ``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 changed, use :ref:`notify_runtime_tile_data_update` to notify the TileMap it needs an update. +\ **Note:** If the result of this function should changed, use :ref:`notify_runtime_tile_data_update()` to notify the TileMap it needs an update. .. rst-class:: classref-item-separator @@ -452,7 +454,7 @@ Clears cells that do not exist in the tileset. |void| **force_update**\ (\ layer\: :ref:`int` = -1\ ) :ref:`πŸ”—` -**Deprecated:** Use :ref:`notify_runtime_tile_data_update` and/or :ref:`update_internals` instead. +**Deprecated:** Use :ref:`notify_runtime_tile_data_update()` and/or :ref:`update_internals()` instead. Forces the TileMap and the layer ``layer`` to update. @@ -468,7 +470,7 @@ Forces the TileMap and the layer ``layer`` to update. 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 ``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. @@ -484,7 +486,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 atlas coordinate 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. @@ -500,7 +502,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 source 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. @@ -528,7 +530,7 @@ If ``layer`` is negative, the layers are accessed from the last one. else: return 0 -If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s tile proxies. See :ref:`TileSet.map_tile_proxy`. +If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s tile proxies. See :ref:`TileSet.map_tile_proxy()`. .. rst-class:: classref-item-separator @@ -540,7 +542,7 @@ If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s til :ref:`Vector2i` **get_coords_for_body_rid**\ (\ body\: :ref:`RID`\ ) :ref:`πŸ”—` -Returns the coordinates of the tile for given physics body RID. Such RID can be retrieved from :ref:`KinematicCollision2D.get_collider_rid`, when colliding with a tile. +Returns the coordinates of the tile for given physics body RID. Such RID can be retrieved from :ref:`KinematicCollision2D.get_collider_rid()`, when colliding with a tile. .. rst-class:: classref-item-separator @@ -552,7 +554,7 @@ Returns the coordinates of the tile for given physics body RID. Such RID can be :ref:`int` **get_layer_for_body_rid**\ (\ body\: :ref:`RID`\ ) :ref:`πŸ”—` -Returns the tilemap layer of the tile for given physics body RID. Such RID can be retrieved from :ref:`KinematicCollision2D.get_collider_rid`, when colliding with a tile. +Returns the tilemap layer of the tile for given physics body RID. Such RID can be retrieved from :ref:`KinematicCollision2D.get_collider_rid()`, when colliding with a tile. .. rst-class:: classref-item-separator @@ -596,7 +598,7 @@ Returns the :ref:`RID` of the :ref:`NavigationServer2D` navigation map for the first TileMap layer. For each additional TileMap layer a new navigation map is created for the additional layer. -In order to make :ref:`NavigationAgent2D` switch between TileMap layer navigation maps use :ref:`NavigationAgent2D.set_navigation_map` with the navigation map received from :ref:`get_layer_navigation_map`. +In order to make :ref:`NavigationAgent2D` switch between TileMap layer navigation maps use :ref:`NavigationAgent2D.set_navigation_map()` with the navigation map received from :ref:`get_layer_navigation_map()`. If ``layer`` is negative, the layers are accessed from the last one. @@ -650,7 +652,7 @@ Returns the number of layers in the TileMap. :ref:`RID` **get_navigation_map**\ (\ layer\: :ref:`int`\ ) |const| :ref:`πŸ”—` -**Deprecated:** Use :ref:`get_layer_navigation_map` instead. +**Deprecated:** Use :ref:`get_layer_navigation_map()` instead. Returns the :ref:`RID` of the :ref:`NavigationServer2D` navigation map assigned to the specified TileMap layer ``layer``. @@ -718,7 +720,7 @@ If ``layer`` is negative, the layers are accessed from the last one. Returns a :ref:`Vector2i` array with the positions of all cells containing a tile in the given layer. 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 value, this method returns the same result as :ref:`get_used_cells`. +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 value, this method returns the same result as :ref:`get_used_cells()`. A cell is considered empty if its source identifier equals -1, its atlas coordinates identifiers is ``Vector2(-1, -1)`` and its alternative identifier is -1. @@ -822,7 +824,7 @@ If ``layer`` is negative, the layers are accessed from the last one. :ref:`Vector2i` **local_to_map**\ (\ local_position\: :ref:`Vector2`\ ) |const| :ref:`πŸ”—` -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`. +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 @@ -834,7 +836,7 @@ Returns the map coordinates of the cell containing the given ``local_position``. :ref:`Vector2i` **map_pattern**\ (\ position_in_tilemap\: :ref:`Vector2i`, coords_in_pattern\: :ref:`Vector2i`, pattern\: :ref:`TileMapPattern`\ ) :ref:`πŸ”—` -Returns for the given coordinate ``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``. +Returns for the given coordinate ``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 @@ -846,7 +848,7 @@ Returns for the given coordinate ``coords_in_pattern`` in a :ref:`TileMapPattern :ref:`Vector2` **map_to_local**\ (\ map_position\: :ref:`Vector2i`\ ) |const| :ref:`πŸ”—` -Returns the centered position of a cell in the TileMap's local coordinate space. To convert the returned value into global coordinates, use :ref:`Node2D.to_global`. See also :ref:`local_to_map`. +Returns the centered position of a cell in the TileMap'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. @@ -872,13 +874,13 @@ Moves the layer at index ``layer`` to the given position ``to_position`` in the |void| **notify_runtime_tile_data_update**\ (\ layer\: :ref:`int` = -1\ ) :ref:`πŸ”—` -Notifies the TileMap 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 TileMap update. +Notifies the TileMap 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 TileMap update. If ``layer`` is provided, only notifies changes for the given layer. Providing the ``layer`` argument (when applicable) is usually preferred for performance reasons. \ **Warning:** Updating the TileMap 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 TileMap, the update will be done at the end of the frame as usual (unless you call :ref:`update_internals`). +\ **Note:** This does not trigger a direct update of the TileMap, the update will be done at the end of the frame as usual (unless you call :ref:`update_internals()`). .. rst-class:: classref-item-separator @@ -904,7 +906,7 @@ Removes the layer at index ``layer``. Sets the tile identifiers for the cell on layer ``layer`` 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 source identifier ``source_id`` identifies a :ref:`TileSetSource` identifier. See :ref:`TileSet.set_source_id()`, - The atlas coordinates 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)``), @@ -1018,7 +1020,7 @@ Assigns ``map`` as a :ref:`NavigationServer2D` navigat By default the TileMap uses the default :ref:`World2D` navigation map for the first TileMap layer. For each additional TileMap layer a new navigation map is created for the additional layer. -In order to make :ref:`NavigationAgent2D` switch between TileMap layer navigation maps use :ref:`NavigationAgent2D.set_navigation_map` with the navigation map received from :ref:`get_layer_navigation_map`. +In order to make :ref:`NavigationAgent2D` switch between TileMap layer navigation maps use :ref:`NavigationAgent2D.set_navigation_map()` with the navigation map received from :ref:`get_layer_navigation_map()`. If ``layer`` is negative, the layers are accessed from the last one. @@ -1078,7 +1080,7 @@ If ``layer`` is negative, the layers are accessed from the last one. |void| **set_navigation_map**\ (\ layer\: :ref:`int`, map\: :ref:`RID`\ ) :ref:`πŸ”—` -**Deprecated:** Use :ref:`set_layer_navigation_map` instead. +**Deprecated:** Use :ref:`set_layer_navigation_map()` instead. Assigns ``map`` as a :ref:`NavigationServer2D` navigation map for the specified TileMap layer ``layer``. diff --git a/classes/class_tilemaplayer.rst b/classes/class_tilemaplayer.rst index 125e03a92..250f405a3 100644 --- a/classes/class_tilemaplayer.rst +++ b/classes/class_tilemaplayer.rst @@ -23,7 +23,9 @@ Node for 2D tile-based maps. A **TileMapLayer** uses a :ref:`TileSet` 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`. +To force an update earlier on, call :ref:`update_internals()`. + +\ **Note:** For performance and compatibility reasons, the coordinates serialized by **TileMapLayer** are limited to 16-bit signed integers, i.e. the range for X and Y coordinates is from ``-32768`` to ``32767``. When saving tile data, tiles outside this range are wrapped. .. rst-class:: classref-introduction-group @@ -171,7 +173,7 @@ Signals 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`). +\ **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 @@ -444,11 +446,11 @@ Method Descriptions 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``. +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. +\ **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 @@ -472,7 +474,7 @@ Called when this **TileMapLayer**'s cells need an internal update. This update m - The node is freed. -Note that any internal update happening while one of these conditions is verified is considered to be a "cleanup". See also :ref:`update_internals`. +Note that any internal update happening while one of these conditions is verified is considered to be a "cleanup". See also :ref:`update_internals()`. \ **Warning:** Implementing this method may degrade the **TileMapLayer**'s performance. @@ -490,7 +492,7 @@ Should return ``true`` if the tile at coordinates ``coords`` requires a runtime \ **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. +\ **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 @@ -596,7 +598,7 @@ Returns the :ref:`TileData` object associated with the given cel :ref:`Vector2i` **get_coords_for_body_rid**\ (\ body\: :ref:`RID`\ ) |const| :ref:`πŸ”—` -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. +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 @@ -610,7 +612,7 @@ Returns the coordinates of the tile for given physics body :ref:`RID` 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`. +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 @@ -634,7 +636,7 @@ Returns the neighboring cell to the one at coordinates ``coords``, identified by :ref:`TileMapPattern` **get_pattern**\ (\ coords_array\: :ref:`Array`\[:ref:`Vector2i`\]\ ) :ref:`πŸ”—` -Creates and returns a new :ref:`TileMapPattern` from the given array of cells. See also :ref:`set_pattern`. +Creates and returns a new :ref:`TileMapPattern` from the given array of cells. See also :ref:`set_pattern()`. .. rst-class:: classref-item-separator @@ -672,7 +674,7 @@ Returns a :ref:`Vector2i` array with the positions of all cells 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`. +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``. @@ -746,7 +748,7 @@ Returns ``true`` if the cell at coordinates ``coords`` is transposed. The result :ref:`Vector2i` **local_to_map**\ (\ local_position\: :ref:`Vector2`\ ) |const| :ref:`πŸ”—` -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`. +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 @@ -758,7 +760,7 @@ Returns the map coordinates of the cell containing the given ``local_position``. :ref:`Vector2i` **map_pattern**\ (\ position_in_tilemap\: :ref:`Vector2i`, coords_in_pattern\: :ref:`Vector2i`, pattern\: :ref:`TileMapPattern`\ ) :ref:`πŸ”—` -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``. +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 @@ -770,7 +772,7 @@ Returns for the given coordinates ``coords_in_pattern`` in a :ref:`TileMapPatter :ref:`Vector2` **map_to_local**\ (\ map_position\: :ref:`Vector2i`\ ) |const| :ref:`πŸ”—` -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`. +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. @@ -784,11 +786,11 @@ Returns the centered position of a cell in the **TileMapLayer**'s local coordina |void| **notify_runtime_tile_data_update**\ (\ ) :ref:`πŸ”—` -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. +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`). +\ **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 @@ -802,7 +804,7 @@ Notifies the **TileMapLayer** node that calls to :ref:`_use_tile_data_runtime_up 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 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)``, @@ -864,7 +866,7 @@ Sets a custom ``map`` as a :ref:`NavigationServer2D` n |void| **set_pattern**\ (\ position\: :ref:`Vector2i`, pattern\: :ref:`TileMapPattern`\ ) :ref:`πŸ”—` -Pastes the :ref:`TileMapPattern` at the given ``position`` in the tile map. See also :ref:`get_pattern`. +Pastes the :ref:`TileMapPattern` at the given ``position`` in the tile map. See also :ref:`get_pattern()`. .. rst-class:: classref-item-separator diff --git a/classes/class_tilemappattern.rst b/classes/class_tilemappattern.rst index d168dab9e..1400b4241 100644 --- a/classes/class_tilemappattern.rst +++ b/classes/class_tilemappattern.rst @@ -164,7 +164,7 @@ Remove the cell at the given coordinates. |void| **set_cell**\ (\ coords\: :ref:`Vector2i`, source_id\: :ref:`int` = -1, atlas_coords\: :ref:`Vector2i` = Vector2i(-1, -1), alternative_tile\: :ref:`int` = -1\ ) :ref:`πŸ”—` -Sets the tile identifiers for the cell at coordinates ``coords``. See :ref:`TileMap.set_cell`. +Sets the tile identifiers for the cell at coordinates ``coords``. See :ref:`TileMap.set_cell()`. .. rst-class:: classref-item-separator diff --git a/classes/class_tileset.rst b/classes/class_tileset.rst index 9d7f47f56..326066cb1 100644 --- a/classes/class_tileset.rst +++ b/classes/class_tileset.rst @@ -892,7 +892,7 @@ Returns the navigation layers count. :ref:`int` **get_next_source_id**\ (\ ) |const| :ref:`πŸ”—` -Returns a new unused source ID. This generated ID is the same that a call to :ref:`add_source` would return. +Returns a new unused source ID. This generated ID is the same that a call to :ref:`add_source()` would return. .. rst-class:: classref-item-separator diff --git a/classes/class_tilesetatlassource.rst b/classes/class_tilesetatlassource.rst index 166623add..341a29e7d 100644 --- a/classes/class_tilesetatlassource.rst +++ b/classes/class_tilesetatlassource.rst @@ -19,13 +19,13 @@ Exposes a 2D atlas texture as a set of tiles for a :ref:`TileSet` Description ----------- -An atlas is a grid of tiles laid out on a texture. Each tile in the grid must be exposed using :ref:`create_tile`. Those tiles are then indexed using their coordinates in the grid. +An atlas is a grid of tiles laid out on a texture. Each tile in the grid must be exposed using :ref:`create_tile()`. Those tiles are then indexed using their coordinates in the grid. Each tile can also have a size in the grid coordinates, making it more or less cells in the atlas. -Alternatives version of a tile can be created using :ref:`create_alternative_tile`, which are then indexed using an alternative ID. The main tile (the one in the grid), is accessed with an alternative ID equal to 0. +Alternatives version of a tile can be created using :ref:`create_alternative_tile()`, which are then indexed using an alternative ID. The main tile (the one in the grid), is accessed with an alternative ID equal to 0. -Each tile alternate has a set of properties that is defined by the source's :ref:`TileSet` layers. Those properties are stored in a TileData object that can be accessed and modified using :ref:`get_tile_data`. +Each tile alternate has a set of properties that is defined by the source's :ref:`TileSet` layers. Those properties are stored in a TileData object that can be accessed and modified using :ref:`get_tile_data()`. As TileData properties are stored directly in the TileSetAtlasSource resource, their properties might also be set using ``TileSetAtlasSource.set("://")``. @@ -318,7 +318,7 @@ Method Descriptions |void| **clear_tiles_outside_texture**\ (\ ) :ref:`πŸ”—` -Removes all tiles that don't fit the available texture area. This method iterates over all the source's tiles, so it's advised to use :ref:`has_tiles_outside_texture` beforehand. +Removes all tiles that don't fit the available texture area. This method iterates over all the source's tiles, so it's advised to use :ref:`has_tiles_outside_texture()` beforehand. .. rst-class:: classref-item-separator @@ -368,7 +368,7 @@ Returns the atlas grid size, which depends on how many tiles can fit in the text :ref:`int` **get_next_alternative_tile_id**\ (\ atlas_coords\: :ref:`Vector2i`\ ) |const| :ref:`πŸ”—` -Returns the alternative ID a following call to :ref:`create_alternative_tile` would return. +Returns the alternative ID a following call to :ref:`create_alternative_tile()` would return. .. rst-class:: classref-item-separator @@ -392,9 +392,9 @@ If :ref:`use_texture_padding` **get_runtime_tile_texture_region**\ (\ atlas_coords\: :ref:`Vector2i`, frame\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the region of the tile at coordinates ``atlas_coords`` for the given ``frame`` inside the texture returned by :ref:`get_runtime_texture`. +Returns the region of the tile at coordinates ``atlas_coords`` for the given ``frame`` inside the texture returned by :ref:`get_runtime_texture()`. -\ **Note:** If :ref:`use_texture_padding` is ``false``, returns the same as :ref:`get_tile_texture_region`. +\ **Note:** If :ref:`use_texture_padding` is ``false``, returns the same as :ref:`get_tile_texture_region()`. .. rst-class:: classref-item-separator @@ -442,7 +442,7 @@ Returns how many animation frames has the tile at coordinates ``atlas_coords``. :ref:`TileAnimationMode` **get_tile_animation_mode**\ (\ atlas_coords\: :ref:`Vector2i`\ ) |const| :ref:`πŸ”—` -Returns the tile animation mode of the tile at ``atlas_coords``. See also :ref:`set_tile_animation_mode`. +Returns the tile animation mode of the tile at ``atlas_coords``. See also :ref:`set_tile_animation_mode()`. .. rst-class:: classref-item-separator @@ -578,7 +578,7 @@ Move the tile and its alternatives at the ``atlas_coords`` coordinates to the `` If ``new_atlas_coords`` is ``Vector2i(-1, -1)``, keeps the tile's coordinates. If ``new_size`` is ``Vector2i(-1, -1)``, keeps the tile's size. -To avoid an error, first check if a move is possible using :ref:`has_room_for_tile`. +To avoid an error, first check if a move is possible using :ref:`has_room_for_tile()`. .. rst-class:: classref-item-separator @@ -666,7 +666,7 @@ Sets how many animation frames the tile at coordinates ``atlas_coords`` has. |void| **set_tile_animation_mode**\ (\ atlas_coords\: :ref:`Vector2i`, mode\: :ref:`TileAnimationMode`\ ) :ref:`πŸ”—` -Sets the tile animation mode of the tile at ``atlas_coords`` to ``mode``. See also :ref:`get_tile_animation_mode`. +Sets the tile animation mode of the tile at ``atlas_coords`` to ``mode``. See also :ref:`get_tile_animation_mode()`. .. rst-class:: classref-item-separator diff --git a/classes/class_tilesetscenescollectionsource.rst b/classes/class_tilesetscenescollectionsource.rst index f3942c6b9..2da305892 100644 --- a/classes/class_tilesetscenescollectionsource.rst +++ b/classes/class_tilesetscenescollectionsource.rst @@ -23,7 +23,7 @@ When placed on a :ref:`TileMap`, tiles from **TileSetScenesCollec Scenes are instantiated as children of the :ref:`TileMap` when it enters the tree. If you add/remove a scene tile in the :ref:`TileMap` that is already inside the tree, the :ref:`TileMap` will automatically instantiate/free the scene accordingly. -\ **Note:** Scene tiles all occupy one tile slot and instead use alternate tile ID to identify scene index. :ref:`TileSetSource.get_tiles_count` will always return ``1``. Use :ref:`get_scene_tiles_count` to get a number of scenes in a **TileSetScenesCollectionSource**. +\ **Note:** Scene tiles all occupy one tile slot and instead use alternate tile ID to identify scene index. :ref:`TileSetSource.get_tiles_count()` will always return ``1``. Use :ref:`get_scene_tiles_count()` to get a number of scenes in a **TileSetScenesCollectionSource**. Use this code if you want to find the scene path at a given tile in :ref:`TileMapLayer`: @@ -117,7 +117,7 @@ Returns a newly generated unique ID. :ref:`int` **get_next_scene_tile_id**\ (\ ) |const| :ref:`πŸ”—` -Returns the scene ID a following call to :ref:`create_scene_tile` would return. +Returns the scene ID a following call to :ref:`create_scene_tile()` would return. .. rst-class:: classref-item-separator diff --git a/classes/class_tilesetsource.rst b/classes/class_tilesetsource.rst index 25a1e4c36..7bb5eeeca 100644 --- a/classes/class_tilesetsource.rst +++ b/classes/class_tilesetsource.rst @@ -27,9 +27,9 @@ Tiles in a source are indexed with two IDs, coordinates ID (of type Vector2i) an Depending on the TileSet source type, those IDs might have restrictions on their values, this is why the base **TileSetSource** class only exposes getters for them. -You can iterate over all tiles exposed by a TileSetSource by first iterating over coordinates IDs using :ref:`get_tiles_count` and :ref:`get_tile_id`, then over alternative IDs using :ref:`get_alternative_tiles_count` and :ref:`get_alternative_tile_id`. +You can iterate over all tiles exposed by a TileSetSource by first iterating over coordinates IDs using :ref:`get_tiles_count()` and :ref:`get_tile_id()`, then over alternative IDs using :ref:`get_alternative_tiles_count()` and :ref:`get_alternative_tile_id()`. -\ **Warning:** **TileSetSource** can only be added to one TileSet at the same time. Calling :ref:`TileSet.add_source` on a second :ref:`TileSet` will remove the source from the first one. +\ **Warning:** **TileSetSource** can only be added to one TileSet at the same time. Calling :ref:`TileSet.add_source()` on a second :ref:`TileSet` will remove the source from the first one. .. rst-class:: classref-reftable-group diff --git a/classes/class_time.rst b/classes/class_time.rst index b5695a8d6..1e5be38c0 100644 --- a/classes/class_time.rst +++ b/classes/class_time.rst @@ -25,9 +25,9 @@ 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 uses UTC as it returns the seconds passed since the `Unix epoch `__. +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). +\ **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). .. rst-class:: classref-reftable-group @@ -355,7 +355,7 @@ Returns the current date as a dictionary of keys: ``year``, ``month``, ``day``, Converts the given Unix timestamp to a dictionary of keys: ``year``, ``month``, ``day``, ``weekday``, ``hour``, ``minute``, and ``second``. -The returned Dictionary's values will be the same as the :ref:`get_datetime_dict_from_system` if the Unix timestamp is the current time, with the exception of Daylight Savings Time as it cannot be determined from the epoch. +The returned Dictionary's values will be the same as the :ref:`get_datetime_dict_from_system()` if the Unix timestamp is the current time, with the exception of Daylight Savings Time as it cannot be determined from the epoch. .. rst-class:: classref-item-separator @@ -529,7 +529,7 @@ The given dictionary can be populated with the following keys: ``year``, ``month If the dictionary is empty, ``0`` is returned. If some keys are omitted, they default to the equivalent values for the Unix epoch timestamp 0 (1970-01-01 at 00:00:00). -You can pass the output from :ref:`get_datetime_dict_from_unix_time` directly into this function and get the same as what was put in. +You can pass the output from :ref:`get_datetime_dict_from_unix_time()` directly into this function and get the same as what was put in. \ **Note:** Unix timestamps are often in UTC. This method does not do any timezone conversion, so the timestamp will be in the same timezone as the given datetime dictionary. diff --git a/classes/class_timer.rst b/classes/class_timer.rst index 25d9dbb35..044ea2f3d 100644 --- a/classes/class_timer.rst +++ b/classes/class_timer.rst @@ -21,7 +21,7 @@ Description The **Timer** node is a countdown timer and is the simplest way to handle time-based logic in the engine. When a timer reaches the end of its :ref:`wait_time`, it will emit the :ref:`timeout` signal. -After a timer enters the tree, it can be manually started with :ref:`start`. A timer node is also started automatically if :ref:`autostart` is ``true``. +After a timer enters the tree, it can be manually started with :ref:`start()`. A timer node is also started automatically if :ref:`autostart` is ``true``. Without requiring much code, a timer node can be added and configured in the editor. The :ref:`timeout` signal it emits can also be connected through the Node dock in the editor: @@ -30,7 +30,7 @@ Without requiring much code, a timer node can be added and configured in the edi func _on_timer_timeout(): print("Time to attack!") -\ **Note:** To create a one-shot timer without instantiating a node, use :ref:`SceneTree.create_timer`. +\ **Note:** To create a one-shot timer without instantiating a node, use :ref:`SceneTree.create_timer()`. \ **Note:** Timers are affected by :ref:`Engine.time_scale`. The higher the time scale, the sooner timers will end. How often a timer processes may depend on the framerate or :ref:`Engine.physics_ticks_per_second`. @@ -204,7 +204,7 @@ If ``true``, the timer will stop after reaching the end. Otherwise, as by defaul - |void| **set_paused**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_paused**\ (\ ) -If ``true``, the timer is paused. A paused timer does not process until this property is set back to ``false``, even when :ref:`start` is called. +If ``true``, the timer is paused. A paused timer does not process until this property is set back to ``false``, even when :ref:`start()` is called. .. rst-class:: classref-item-separator @@ -256,7 +256,7 @@ The timer's remaining time in seconds. This is always ``0`` if the timer is stop - |void| **set_wait_time**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_wait_time**\ (\ ) -The time required for the timer to end, in seconds. This property can also be set every time :ref:`start` is called. +The time required for the timer to end, in seconds. This property can also be set every time :ref:`start()` is called. \ **Note:** Timers can only process once per physics or process frame (depending on the :ref:`process_callback`). An unstable framerate may cause the timer to end inconsistently, which is especially noticeable if the wait time is lower than roughly ``0.05`` seconds. For very short timers, it is recommended to write your own code instead of using a **Timer** node. Timers are also affected by :ref:`Engine.time_scale`. diff --git a/classes/class_tlsoptions.rst b/classes/class_tlsoptions.rst index c7f121a1c..a02a42822 100644 --- a/classes/class_tlsoptions.rst +++ b/classes/class_tlsoptions.rst @@ -21,7 +21,7 @@ Description TLSOptions abstracts the configuration options for the :ref:`StreamPeerTLS` and :ref:`PacketPeerDTLS` classes. -Objects of this class cannot be instantiated directly, and one of the static methods :ref:`client`, :ref:`client_unsafe`, or :ref:`server` should be used instead. +Objects of this class cannot be instantiated directly, and one of the static methods :ref:`client()`, :ref:`client_unsafe()`, or :ref:`server()` should be used instead. .. tabs:: @@ -112,7 +112,7 @@ Creates an **unsafe** TLS client configuration where certificate validation is o :ref:`String` **get_common_name_override**\ (\ ) |const| :ref:`πŸ”—` -Returns the common name (domain name) override specified when creating with :ref:`client`. +Returns the common name (domain name) override specified when creating with :ref:`client()`. .. rst-class:: classref-item-separator @@ -124,7 +124,7 @@ Returns the common name (domain name) override specified when creating with :ref :ref:`X509Certificate` **get_own_certificate**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`X509Certificate` specified when creating with :ref:`server`. +Returns the :ref:`X509Certificate` specified when creating with :ref:`server()`. .. rst-class:: classref-item-separator @@ -136,7 +136,7 @@ Returns the :ref:`X509Certificate` specified when creatin :ref:`CryptoKey` **get_private_key**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`CryptoKey` specified when creating with :ref:`server`. +Returns the :ref:`CryptoKey` specified when creating with :ref:`server()`. .. rst-class:: classref-item-separator @@ -148,7 +148,7 @@ Returns the :ref:`CryptoKey` specified when creating with :ref: :ref:`X509Certificate` **get_trusted_ca_chain**\ (\ ) |const| :ref:`πŸ”—` -Returns the CA :ref:`X509Certificate` chain specified when creating with :ref:`client` or :ref:`client_unsafe`. +Returns the CA :ref:`X509Certificate` chain specified when creating with :ref:`client()` or :ref:`client_unsafe()`. .. rst-class:: classref-item-separator @@ -160,7 +160,7 @@ Returns the CA :ref:`X509Certificate` chain specified whe :ref:`bool` **is_server**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if created with :ref:`server`, ``false`` otherwise. +Returns ``true`` if created with :ref:`server()`, ``false`` otherwise. .. rst-class:: classref-item-separator @@ -172,7 +172,7 @@ Returns ``true`` if created with :ref:`server`, :ref:`bool` **is_unsafe_client**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if created with :ref:`client_unsafe`, ``false`` otherwise. +Returns ``true`` if created with :ref:`client_unsafe()`, ``false`` otherwise. .. rst-class:: classref-item-separator diff --git a/classes/class_transform2d.rst b/classes/class_transform2d.rst index efcf904e1..9dc780281 100644 --- a/classes/class_transform2d.rst +++ b/classes/class_transform2d.rst @@ -19,7 +19,7 @@ Description The **Transform2D** built-in :ref:`Variant` type is a 2Γ—3 `matrix `__ representing a transformation in 2D space. It contains three :ref:`Vector2` values: :ref:`x`, :ref:`y`, and :ref:`origin`. Together, they can represent translation, rotation, scale, and skew. -The :ref:`x` and :ref:`y` axes form a 2Γ—2 matrix, known as the transform's **basis**. The length of each axis (:ref:`Vector2.length`) influences the transform's scale, while the direction of all axes influence the rotation. Usually, both axes are perpendicular to one another. However, when you rotate one axis individually, the transform becomes skewed. Applying a skewed transform to a 2D sprite will make the sprite appear distorted. +The :ref:`x` and :ref:`y` axes form a 2Γ—2 matrix, known as the transform's **basis**. The length of each axis (:ref:`Vector2.length()`) influences the transform's scale, while the direction of all axes influence the rotation. Usually, both axes are perpendicular to one another. However, when you rotate one axis individually, the transform becomes skewed. Applying a skewed transform to a 2D sprite will make the sprite appear distorted. For a general introduction, see the :doc:`Matrices and transforms <../tutorials/math/matrices_and_transforms>` tutorial. @@ -337,9 +337,9 @@ Method Descriptions :ref:`Transform2D` **affine_inverse**\ (\ ) |const| :ref:`πŸ”—` -Returns the inverted version of this transform. Unlike :ref:`inverse`, this method works with almost any basis, including non-uniform ones, but is slower. +Returns the inverted version of this transform. Unlike :ref:`inverse()`, this method works with almost any basis, including non-uniform ones, but is slower. -\ **Note:** For this method to return correctly, the transform's basis needs to have a determinant that is not exactly ``0.0`` (see :ref:`determinant`). +\ **Note:** For this method to return correctly, the transform's basis needs to have a determinant that is not exactly ``0.0`` (see :ref:`determinant()`). .. rst-class:: classref-item-separator @@ -363,9 +363,9 @@ Returns a copy of the ``v`` vector, transformed (multiplied) by the transform ba :ref:`Vector2` **basis_xform_inv**\ (\ v\: :ref:`Vector2`\ ) |const| :ref:`πŸ”—` -Returns a copy of the ``v`` vector, transformed (multiplied) by the inverse transform basis's matrix (see :ref:`inverse`). This method ignores the :ref:`origin`. +Returns a copy of the ``v`` vector, transformed (multiplied) by the inverse transform basis's matrix (see :ref:`inverse()`). This method ignores the :ref:`origin`. -\ **Note:** This method assumes that this transform's basis is *orthonormal* (see :ref:`orthonormalized`). If the basis is not orthonormal, ``transform.affine_inverse().basis_xform(vector)`` should be used instead (see :ref:`affine_inverse`). +\ **Note:** This method assumes that this transform's basis is *orthonormal* (see :ref:`orthonormalized()`). If the basis is not orthonormal, ``transform.affine_inverse().basis_xform(vector)`` should be used instead (see :ref:`affine_inverse()`). .. rst-class:: classref-item-separator @@ -379,7 +379,7 @@ Returns a copy of the ``v`` vector, transformed (multiplied) by the inverse tran Returns the `determinant `__ of this transform basis's matrix. For advanced math, this number can be used to determine a few attributes: -- If the determinant is exactly ``0.0``, the basis is not invertible (see :ref:`inverse`). +- If the determinant is exactly ``0.0``, the basis is not invertible (see :ref:`inverse()`). - If the determinant is a negative number, the basis represents a negative scale. @@ -407,7 +407,7 @@ Returns this transform's translation. Equivalent to :ref:`origin` **get_rotation**\ (\ ) |const| :ref:`πŸ”—` -Returns this transform's rotation (in radians). This is equivalent to :ref:`x`'s angle (see :ref:`Vector2.angle`). +Returns this transform's rotation (in radians). This is equivalent to :ref:`x`'s angle (see :ref:`Vector2.angle()`). .. rst-class:: classref-item-separator @@ -450,7 +450,7 @@ Returns the length of both :ref:`x` and :ref:`y` is negative, the scale is also negative. +\ **Note:** If the value returned by :ref:`determinant()` is negative, the scale is also negative. .. rst-class:: classref-item-separator @@ -490,7 +490,7 @@ The ``weight`` should be between ``0.0`` and ``1.0`` (inclusive). Values outside Returns the `inverted version of this transform `__. -\ **Note:** For this method to return correctly, the transform's basis needs to be *orthonormal* (see :ref:`orthonormalized`). That means the basis should only represent a rotation. If it does not, use :ref:`affine_inverse` instead. +\ **Note:** For this method to return correctly, the transform's basis needs to be *orthonormal* (see :ref:`orthonormalized()`). That means the basis should only represent a rotation. If it does not, use :ref:`affine_inverse()` instead. .. rst-class:: classref-item-separator @@ -514,7 +514,7 @@ Returns ``true`` if this transform's basis is conformal. A conformal basis is bo :ref:`bool` **is_equal_approx**\ (\ xform\: :ref:`Transform2D`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this transform and ``xform`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. +Returns ``true`` if this transform and ``xform`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx()` on each component. .. rst-class:: classref-item-separator @@ -526,7 +526,7 @@ Returns ``true`` if this transform and ``xform`` are approximately equal, by run :ref:`bool` **is_finite**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this transform is finite, by calling :ref:`@GlobalScope.is_finite` on each component. +Returns ``true`` if this transform is finite, by calling :ref:`@GlobalScope.is_finite()` on each component. .. rst-class:: classref-item-separator @@ -667,7 +667,7 @@ Operator Descriptions Returns ``true`` if the components of both transforms are not equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. rst-class:: classref-item-separator @@ -711,11 +711,11 @@ This is the operation performed between parent and child :ref:`CanvasItem` or :ref:`translated_local`. +- For translation, see :ref:`translated()` or :ref:`translated_local()`. -- For rotation, see :ref:`rotated` or :ref:`rotated_local`. +- For rotation, see :ref:`rotated()` or :ref:`rotated_local()`. -- For scale, see :ref:`scaled` or :ref:`scaled_local`. +- For scale, see :ref:`scaled()` or :ref:`scaled_local()`. .. rst-class:: classref-item-separator @@ -789,7 +789,7 @@ Divides all components of the **Transform2D** by the given :ref:`int` Returns ``true`` if the components of both transforms are exactly equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. rst-class:: classref-item-separator diff --git a/classes/class_transform3d.rst b/classes/class_transform3d.rst index 6f96a3ebe..6917cee9f 100644 --- a/classes/class_transform3d.rst +++ b/classes/class_transform3d.rst @@ -316,9 +316,9 @@ Method Descriptions :ref:`Transform3D` **affine_inverse**\ (\ ) |const| :ref:`πŸ”—` -Returns the inverted version of this transform. Unlike :ref:`inverse`, this method works with almost any :ref:`basis`, including non-uniform ones, but is slower. See also :ref:`Basis.inverse`. +Returns the inverted version of this transform. Unlike :ref:`inverse()`, this method works with almost any :ref:`basis`, including non-uniform ones, but is slower. See also :ref:`Basis.inverse()`. -\ **Note:** For this method to return correctly, the transform's :ref:`basis` needs to have a determinant that is not exactly ``0.0`` (see :ref:`Basis.determinant`). +\ **Note:** For this method to return correctly, the transform's :ref:`basis` needs to have a determinant that is not exactly ``0.0`` (see :ref:`Basis.determinant()`). .. rst-class:: classref-item-separator @@ -344,9 +344,9 @@ The ``weight`` should be between ``0.0`` and ``1.0`` (inclusive). Values outside :ref:`Transform3D` **inverse**\ (\ ) |const| :ref:`πŸ”—` -Returns the `inverted version of this transform `__. See also :ref:`Basis.inverse`. +Returns the `inverted version of this transform `__. See also :ref:`Basis.inverse()`. -\ **Note:** For this method to return correctly, the transform's :ref:`basis` needs to be *orthonormal* (see :ref:`orthonormalized`). That means the basis should only represent a rotation. If it does not, use :ref:`affine_inverse` instead. +\ **Note:** For this method to return correctly, the transform's :ref:`basis` needs to be *orthonormal* (see :ref:`orthonormalized()`). That means the basis should only represent a rotation. If it does not, use :ref:`affine_inverse()` instead. .. rst-class:: classref-item-separator @@ -358,7 +358,7 @@ Returns the `inverted version of this transform ` **is_equal_approx**\ (\ xform\: :ref:`Transform3D`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this transform and ``xform`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. +Returns ``true`` if this transform and ``xform`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx()` on each component. .. rst-class:: classref-item-separator @@ -370,7 +370,7 @@ Returns ``true`` if this transform and ``xform`` are approximately equal, by run :ref:`bool` **is_finite**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this transform is finite, by calling :ref:`@GlobalScope.is_finite` on each component. +Returns ``true`` if this transform is finite, by calling :ref:`@GlobalScope.is_finite()` on each component. .. rst-class:: classref-item-separator @@ -398,7 +398,7 @@ If ``use_model_front`` is ``true``, the +Z axis (asset front) is treated as forw :ref:`Transform3D` **orthonormalized**\ (\ ) |const| :ref:`πŸ”—` -Returns a copy of this transform with its :ref:`basis` orthonormalized. An orthonormal basis is both *orthogonal* (the axes are perpendicular to each other) and *normalized* (the axes have a length of ``1.0``), which also means it can only represent a rotation. See also :ref:`Basis.orthonormalized`. +Returns a copy of this transform with its :ref:`basis` orthonormalized. An orthonormal basis is both *orthogonal* (the axes are perpendicular to each other) and *normalized* (the axes have a length of ``1.0``), which also means it can only represent a rotation. See also :ref:`Basis.orthonormalized()`. .. rst-class:: classref-item-separator @@ -412,7 +412,7 @@ Returns a copy of this transform with its :ref:`basis`). If ``angle`` is positive, the basis is rotated counter-clockwise around the axis. +The ``axis`` must be a normalized vector (see :ref:`Vector3.normalized()`). If ``angle`` is positive, the basis is rotated counter-clockwise around the axis. This method is an optimized version of multiplying the given transform ``X`` with a corresponding rotation transform ``R`` from the left, i.e., ``R * X``. @@ -517,7 +517,7 @@ Operator Descriptions Returns ``true`` if the components of both transforms are not equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. rst-class:: classref-item-separator @@ -573,11 +573,11 @@ This is the operation performed between parent and child :ref:`Node3D` or :ref:`translated_local`. +- For translation, see :ref:`translated()` or :ref:`translated_local()`. -- For rotation, see :ref:`rotated` or :ref:`rotated_local`. +- For rotation, see :ref:`rotated()` or :ref:`rotated_local()`. -- For scale, see :ref:`scaled` or :ref:`scaled_local`. +- For scale, see :ref:`scaled()` or :ref:`scaled_local()`. .. rst-class:: classref-item-separator @@ -651,7 +651,7 @@ Divides all components of the **Transform3D** by the given :ref:`int` Returns ``true`` if the components of both transforms are exactly equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. |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_translation.rst b/classes/class_translation.rst index 56e84a449..606a7625c 100644 --- a/classes/class_translation.rst +++ b/classes/class_translation.rst @@ -111,7 +111,7 @@ Method Descriptions :ref:`StringName` **_get_message**\ (\ src_message\: :ref:`StringName`, context\: :ref:`StringName`\ ) |virtual| |const| :ref:`πŸ”—` -Virtual method to override :ref:`get_message`. +Virtual method to override :ref:`get_message()`. .. rst-class:: classref-item-separator @@ -123,7 +123,7 @@ Virtual method to override :ref:`get_message` **_get_plural_message**\ (\ src_message\: :ref:`StringName`, src_plural_message\: :ref:`StringName`, n\: :ref:`int`, context\: :ref:`StringName`\ ) |virtual| |const| :ref:`πŸ”—` -Virtual method to override :ref:`get_plural_message`. +Virtual method to override :ref:`get_plural_message()`. .. rst-class:: classref-item-separator diff --git a/classes/class_translationserver.rst b/classes/class_translationserver.rst index 2b00409dd..102d843a0 100644 --- a/classes/class_translationserver.rst +++ b/classes/class_translationserver.rst @@ -249,7 +249,7 @@ Returns an array of all loaded locales of the project. Returns the current locale of the project. -See also :ref:`OS.get_locale` and :ref:`OS.get_locale_language` to query the locale of the user system. +See also :ref:`OS.get_locale()` and :ref:`OS.get_locale_language()` to query the locale of the user system. .. rst-class:: classref-item-separator @@ -299,7 +299,7 @@ Returns a readable script name for the ``script`` code. Returns the current locale of the editor. -\ **Note:** When called from an exported project returns the same value as :ref:`get_locale`. +\ **Note:** When called from an exported project returns the same value as :ref:`get_locale()`. .. rst-class:: classref-item-separator diff --git a/classes/class_tree.rst b/classes/class_tree.rst index 861d16a82..2ebe1f2f5 100644 --- a/classes/class_tree.rst +++ b/classes/class_tree.rst @@ -52,7 +52,7 @@ Trees are built via code, using :ref:`TreeItem` objects to creat -To iterate over all the :ref:`TreeItem` objects in a **Tree** object, use :ref:`TreeItem.get_next` and :ref:`TreeItem.get_first_child` after getting the root through :ref:`get_root`. You can use :ref:`Object.free` on a :ref:`TreeItem` to remove it from the **Tree**. +To iterate over all the :ref:`TreeItem` objects in a **Tree** object, use :ref:`TreeItem.get_next()` and :ref:`TreeItem.get_first_child()` after getting the root through :ref:`get_root()`. You can use :ref:`Object.free()` on a :ref:`TreeItem` to remove it from the **Tree**. \ **Incremental search:** Like :ref:`ItemList` and :ref:`PopupMenu`, **Tree** supports searching within the list while the control is focused. Press a key that matches the first letter of an item's name to select the first item starting with the given letter. After that point, there are two ways to perform incremental search: 1) Press the same key again before the timeout duration to select the next item starting with the same letter. 2) Press letter keys that match the rest of the word before the timeout duration to match to select the item in question directly. Both of these actions will be reset to the beginning of the list if the timeout duration has passed since the last keystroke was registered. You can adjust the timeout duration by changing :ref:`ProjectSettings.gui/timers/incremental_search_max_interval_msec`. @@ -341,7 +341,7 @@ Signals **button_clicked**\ (\ item\: :ref:`TreeItem`, column\: :ref:`int`, id\: :ref:`int`, mouse_button_index\: :ref:`int`\ ) :ref:`πŸ”—` -Emitted when a button on the tree was pressed (see :ref:`TreeItem.add_button`). +Emitted when a button on the tree was pressed (see :ref:`TreeItem.add_button()`). .. rst-class:: classref-item-separator @@ -365,7 +365,7 @@ Emitted when a cell is selected. **check_propagated_to_item**\ (\ item\: :ref:`TreeItem`, column\: :ref:`int`\ ) :ref:`πŸ”—` -Emitted when :ref:`TreeItem.propagate_check` is called. Connect to this signal to process the items that are affected when :ref:`TreeItem.propagate_check` is invoked. The order that the items affected will be processed is as follows: the item that invoked the method, children of that item, and finally parents of that item. +Emitted when :ref:`TreeItem.propagate_check()` is called. Connect to this signal to process the items that are affected when :ref:`TreeItem.propagate_check()` is invoked. The order that the items affected will be processed is as follows: the item that invoked the method, children of that item, and finally parents of that item. .. rst-class:: classref-item-separator @@ -572,7 +572,7 @@ enum **DropModeFlags**: :ref:`πŸ”—` :ref:`DropModeFlags` **DROP_MODE_DISABLED** = ``0`` -Disables all drop sections, but still allows to detect the "on item" drop section by :ref:`get_drop_section_at_position`. +Disables all drop sections, but still allows to detect the "on item" drop section by :ref:`get_drop_section_at_position()`. \ **Note:** This is the default flag, it has no effect when combined with other flags. @@ -667,7 +667,7 @@ If ``true``, allows navigating the **Tree** with letter keys through incremental - |void| **set_auto_tooltip**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_auto_tooltip_enabled**\ (\ ) -If ``true``, tree items with no tooltip assigned display their text as their tooltip. See also :ref:`TreeItem.get_tooltip_text` and :ref:`TreeItem.get_button_tooltip_text`. +If ``true``, tree items with no tooltip assigned display their text as their tooltip. See also :ref:`TreeItem.get_tooltip_text()` and :ref:`TreeItem.get_button_tooltip_text()`. .. rst-class:: classref-item-separator @@ -718,7 +718,7 @@ The number of columns. - |void| **set_drop_mode_flags**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_drop_mode_flags**\ (\ ) -The drop mode as an OR combination of flags. See :ref:`DropModeFlags` constants. Once dropping is done, reverts to :ref:`DROP_MODE_DISABLED`. Setting this during :ref:`Control._can_drop_data` is recommended. +The drop mode as an OR combination of flags. See :ref:`DropModeFlags` constants. Once dropping is done, reverts to :ref:`DROP_MODE_DISABLED`. Setting this during :ref:`Control._can_drop_data()` is recommended. This controls the drop sections, i.e. the decision and drawing of possible drop locations based on the mouse position. @@ -881,7 +881,7 @@ Deselects all tree items (rows and columns). In :ref:`SELECT_MULTI` or ``force_edit`` must be ``true``. +Either the item must be set editable with :ref:`TreeItem.set_editable()` or ``force_edit`` must be ``true``. Returns ``true`` if the item could be edited. Fails if no item is selected. @@ -1007,7 +1007,7 @@ Returns the column's width in pixels. :ref:`Rect2` **get_custom_popup_rect**\ (\ ) |const| :ref:`πŸ”—` -Returns the rectangle for custom popups. Helper to create custom cell controls that display a popup. See :ref:`TreeItem.set_cell_mode`. +Returns the rectangle for custom popups. Helper to create custom cell controls that display a popup. See :ref:`TreeItem.set_cell_mode()`. .. rst-class:: classref-item-separator @@ -1023,7 +1023,7 @@ Returns the drop section at ``position``, or -100 if no item is there. Values -1, 0, or 1 will be returned for the "above item", "on item", and "below item" drop sections, respectively. See :ref:`DropModeFlags` for a description of each drop section. -To get the item which the returned drop section is relative to, use :ref:`get_item_at_position`. +To get the item which the returned drop section is relative to, use :ref:`get_item_at_position()`. .. rst-class:: classref-item-separator @@ -1162,7 +1162,7 @@ Returns the currently focused item, or ``null`` if no item is focused. In :ref:`SELECT_ROW` and :ref:`SELECT_SINGLE` modes, the focused item is same as the selected item. In :ref:`SELECT_MULTI` mode, the focused item is the item under the focus cursor, not necessarily selected. -To get the currently selected item(s), use :ref:`get_next_selected`. +To get the currently selected item(s), use :ref:`get_next_selected()`. .. rst-class:: classref-item-separator @@ -1178,7 +1178,7 @@ Returns the currently focused column, or -1 if no column is focused. In :ref:`SELECT_SINGLE` mode, the focused column is the selected column. In :ref:`SELECT_ROW` mode, the focused column is always 0 if any item is selected. In :ref:`SELECT_MULTI` mode, the focused column is the column under the focus cursor, and there are not necessarily any column selected. -To tell whether a column of an item is selected, use :ref:`TreeItem.is_selected`. +To tell whether a column of an item is selected, use :ref:`TreeItem.is_selected()`. .. rst-class:: classref-item-separator @@ -1190,7 +1190,7 @@ To tell whether a column of an item is selected, use :ref:`TreeItem.is_selected< :ref:`bool` **is_column_clipping_content**\ (\ column\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the column has enabled clipping (see :ref:`set_column_clip_content`). +Returns ``true`` if the column has enabled clipping (see :ref:`set_column_clip_content()`). .. rst-class:: classref-item-separator @@ -1202,7 +1202,7 @@ Returns ``true`` if the column has enabled clipping (see :ref:`set_column_clip_c :ref:`bool` **is_column_expanding**\ (\ column\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the column has enabled expanding (see :ref:`set_column_expand`). +Returns ``true`` if the column has enabled expanding (see :ref:`set_column_expand()`). .. rst-class:: classref-item-separator @@ -1250,7 +1250,7 @@ Overrides the calculated minimum width of a column. It can be set to ``0`` to re |void| **set_column_expand**\ (\ column\: :ref:`int`, expand\: :ref:`bool`\ ) :ref:`πŸ”—` -If ``true``, the column will have the "Expand" flag of :ref:`Control`. Columns that have the "Expand" flag will use their expand ratio in a similar fashion to :ref:`Control.size_flags_stretch_ratio` (see :ref:`set_column_expand_ratio`). +If ``true``, the column will have the "Expand" flag of :ref:`Control`. Columns that have the "Expand" flag will use their expand ratio in a similar fashion to :ref:`Control.size_flags_stretch_ratio` (see :ref:`set_column_expand_ratio()`). .. rst-class:: classref-item-separator @@ -1262,7 +1262,7 @@ If ``true``, the column will have the "Expand" flag of :ref:`Control`, ratio\: :ref:`int`\ ) :ref:`πŸ”—` -Sets the relative expand ratio for a column. See :ref:`set_column_expand`. +Sets the relative expand ratio for a column. See :ref:`set_column_expand()`. .. rst-class:: classref-item-separator @@ -1387,7 +1387,7 @@ Default text :ref:`Color` of the item. :ref:`Color` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` :ref:`πŸ”—` -Text :ref:`Color` for a :ref:`TreeItem.CELL_MODE_CHECK` mode cell when it's non-editable (see :ref:`TreeItem.set_editable`). +Text :ref:`Color` for a :ref:`TreeItem.CELL_MODE_CHECK` mode cell when it's non-editable (see :ref:`TreeItem.set_editable()`). .. rst-class:: classref-item-separator @@ -1555,7 +1555,7 @@ The horizontal space between item cells. This is also used as the margin at the :ref:`int` **icon_max_width** = ``0`` :ref:`πŸ”—` -The maximum allowed width of the icon in item's cells. This limit is applied on top of the default size of the icon, but before the value set with :ref:`TreeItem.set_icon_max_width`. The height is adjusted according to the icon's ratio. +The maximum allowed width of the icon in item's cells. This limit is applied on top of the default size of the icon, but before the value set with :ref:`TreeItem.set_icon_max_width()`. The height is adjusted according to the icon's ratio. .. rst-class:: classref-item-separator @@ -1869,7 +1869,7 @@ The arrow icon used when a foldable item is collapsed (for right-to-left layouts :ref:`Texture2D` **checked** :ref:`πŸ”—` -The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is checked and editable (see :ref:`TreeItem.set_editable`). +The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is checked and editable (see :ref:`TreeItem.set_editable()`). .. rst-class:: classref-item-separator @@ -1881,7 +1881,7 @@ The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` **checked_disabled** :ref:`πŸ”—` -The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is checked and non-editable (see :ref:`TreeItem.set_editable`). +The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is checked and non-editable (see :ref:`TreeItem.set_editable()`). .. rst-class:: classref-item-separator @@ -1893,7 +1893,7 @@ The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` **indeterminate** :ref:`πŸ”—` -The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is indeterminate and editable (see :ref:`TreeItem.set_editable`). +The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is indeterminate and editable (see :ref:`TreeItem.set_editable()`). .. rst-class:: classref-item-separator @@ -1905,7 +1905,7 @@ The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` **indeterminate_disabled** :ref:`πŸ”—` -The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is indeterminate and non-editable (see :ref:`TreeItem.set_editable`). +The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is indeterminate and non-editable (see :ref:`TreeItem.set_editable()`). .. rst-class:: classref-item-separator @@ -1929,7 +1929,7 @@ The arrow icon to display for the :ref:`TreeItem.CELL_MODE_RANGE` **unchecked** :ref:`πŸ”—` -The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is unchecked and editable (see :ref:`TreeItem.set_editable`). +The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is unchecked and editable (see :ref:`TreeItem.set_editable()`). .. rst-class:: classref-item-separator @@ -1941,7 +1941,7 @@ The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` **unchecked_disabled** :ref:`πŸ”—` -The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is unchecked and non-editable (see :ref:`TreeItem.set_editable`). +The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is unchecked and non-editable (see :ref:`TreeItem.set_editable()`). .. rst-class:: classref-item-separator @@ -2013,7 +2013,7 @@ The updown arrow icon to display for the :ref:`TreeItem.CELL_MODE_RANGE` **custom_button** :ref:`πŸ”—` -Default :ref:`StyleBox` for a :ref:`TreeItem.CELL_MODE_CUSTOM` mode cell when button is enabled with :ref:`TreeItem.set_custom_as_button`. +Default :ref:`StyleBox` for a :ref:`TreeItem.CELL_MODE_CUSTOM` mode cell when button is enabled with :ref:`TreeItem.set_custom_as_button()`. .. rst-class:: classref-item-separator diff --git a/classes/class_treeitem.rst b/classes/class_treeitem.rst index 3c7c2b83b..27611d641 100644 --- a/classes/class_treeitem.rst +++ b/classes/class_treeitem.rst @@ -21,7 +21,7 @@ Description A single item of a :ref:`Tree` control. It can contain other **TreeItem**\ s as children, which allows it to create a hierarchy. It can also contain text and buttons. **TreeItem** is not a :ref:`Node`, it is internal to the :ref:`Tree`. -To create a **TreeItem**, use :ref:`Tree.create_item` or :ref:`create_child`. To remove a **TreeItem**, use :ref:`Object.free`. +To create a **TreeItem**, use :ref:`Tree.create_item()` or :ref:`create_child()`. To remove a **TreeItem**, use :ref:`Object.free()`. \ **Note:** The ID values used for buttons are 32-bit, unlike :ref:`int` which is always 64-bit. They go from ``-2147483648`` to ``2147483647``. @@ -290,7 +290,7 @@ enum **TreeCellMode**: :ref:`πŸ”—` :ref:`TreeCellMode` **CELL_MODE_STRING** = ``0`` -Cell shows a string label, optionally with an icon. When editable, the text can be edited using a :ref:`LineEdit`, or a :ref:`TextEdit` popup if :ref:`set_edit_multiline` is used. +Cell shows a string label, optionally with an icon. When editable, the text can be edited using a :ref:`LineEdit`, or a :ref:`TextEdit` popup if :ref:`set_edit_multiline()` is used. .. _class_TreeItem_constant_CELL_MODE_CHECK: @@ -298,7 +298,7 @@ Cell shows a string label, optionally with an icon. When editable, the text can :ref:`TreeCellMode` **CELL_MODE_CHECK** = ``1`` -Cell shows a checkbox, optionally with text and an icon. The checkbox can be pressed, released, or indeterminate (via :ref:`set_indeterminate`). The checkbox can't be clicked unless the cell is editable. +Cell shows a checkbox, optionally with text and an icon. The checkbox can be pressed, released, or indeterminate (via :ref:`set_indeterminate()`). The checkbox can't be clicked unless the cell is editable. .. _class_TreeItem_constant_CELL_MODE_RANGE: @@ -306,9 +306,9 @@ Cell shows a checkbox, optionally with text and an icon. The checkbox can be pre :ref:`TreeCellMode` **CELL_MODE_RANGE** = ``2`` -Cell shows a numeric range. When editable, it can be edited using a range slider. Use :ref:`set_range` to set the value and :ref:`set_range_config` to configure the range. +Cell shows a numeric range. When editable, it can be edited using a range slider. Use :ref:`set_range()` to set the value and :ref:`set_range_config()` to configure the range. -This cell can also be used in a text dropdown mode when you assign a text with :ref:`set_text`. Separate options with a comma, e.g. ``"Option1,Option2,Option3"``. +This cell can also be used in a text dropdown mode when you assign a text with :ref:`set_text()`. Separate options with a comma, e.g. ``"Option1,Option2,Option3"``. .. _class_TreeItem_constant_CELL_MODE_ICON: @@ -324,9 +324,9 @@ Cell shows an icon. It can't be edited nor display text. The icon is always cent :ref:`TreeCellMode` **CELL_MODE_CUSTOM** = ``4`` -Cell shows as a clickable button. It will display an arrow similar to :ref:`OptionButton`, but doesn't feature a dropdown (for that you can use :ref:`CELL_MODE_RANGE`). Clicking the button emits the :ref:`Tree.item_edited` signal. The button is flat by default, you can use :ref:`set_custom_as_button` to display it with a :ref:`StyleBox`. +Cell shows as a clickable button. It will display an arrow similar to :ref:`OptionButton`, but doesn't feature a dropdown (for that you can use :ref:`CELL_MODE_RANGE`). Clicking the button emits the :ref:`Tree.item_edited` signal. The button is flat by default, you can use :ref:`set_custom_as_button()` to display it with a :ref:`StyleBox`. -This mode also supports custom drawing using :ref:`set_custom_draw_callback`. +This mode also supports custom drawing using :ref:`set_custom_draw_callback()`. .. rst-class:: classref-section-separator @@ -418,7 +418,7 @@ Method Descriptions |void| **add_button**\ (\ column\: :ref:`int`, button\: :ref:`Texture2D`, id\: :ref:`int` = -1, disabled\: :ref:`bool` = false, tooltip_text\: :ref:`String` = ""\ ) :ref:`πŸ”—` -Adds a button with :ref:`Texture2D` ``button`` to the end of the cell at column ``column``. The ``id`` is used to identify the button in the according :ref:`Tree.button_clicked` signal and can be different from the buttons index. If not specified, the next available index is used, which may be retrieved by calling :ref:`get_button_count` immediately before this method. Optionally, the button can be ``disabled`` and have a ``tooltip_text``. +Adds a button with :ref:`Texture2D` ``button`` to the end of the cell at column ``column``. The ``id`` is used to identify the button in the according :ref:`Tree.button_clicked` signal and can be different from the buttons index. If not specified, the next available index is used, which may be retrieved by calling :ref:`get_button_count()` immediately before this method. Optionally, the button can be ``disabled`` and have a ``tooltip_text``. .. rst-class:: classref-item-separator @@ -430,7 +430,7 @@ Adds a button with :ref:`Texture2D` ``button`` to the end of th |void| **add_child**\ (\ child\: :ref:`TreeItem`\ ) :ref:`πŸ”—` -Adds a previously unparented **TreeItem** as a direct child of this one. The ``child`` item must not be a part of any :ref:`Tree` or parented to any **TreeItem**. See also :ref:`remove_child`. +Adds a previously unparented **TreeItem** as a direct child of this one. The ``child`` item must not be a part of any :ref:`Tree` or parented to any **TreeItem**. See also :ref:`remove_child()`. .. rst-class:: classref-item-separator @@ -636,7 +636,7 @@ Returns the column's cell mode. :ref:`TreeItem` **get_child**\ (\ index\: :ref:`int`\ ) :ref:`πŸ”—` -Returns a child item by its ``index`` (see :ref:`get_child_count`). This method is often used for iterating all children of an item. +Returns a child item by its ``index`` (see :ref:`get_child_count()`). This method is often used for iterating all children of an item. Negative indices access the children from the last one. @@ -842,7 +842,7 @@ Returns item's text language code. :ref:`Variant` **get_metadata**\ (\ column\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the metadata value that was set for the given column using :ref:`set_metadata`. +Returns the metadata value that was set for the given column using :ref:`set_metadata()`. .. rst-class:: classref-item-separator @@ -1116,7 +1116,7 @@ Returns ``true`` if the given ``column`` is checked. :ref:`bool` **is_custom_set_as_button**\ (\ column\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the cell was made into a button with :ref:`set_custom_as_button`. +Returns ``true`` if the cell was made into a button with :ref:`set_custom_as_button()`. .. rst-class:: classref-item-separator @@ -1240,9 +1240,9 @@ Propagates this item's checked status to its children and parents for the given |void| **remove_child**\ (\ child\: :ref:`TreeItem`\ ) :ref:`πŸ”—` -Removes the given child **TreeItem** and all its children from the :ref:`Tree`. Note that it doesn't free the item from memory, so it can be reused later (see :ref:`add_child`). To completely remove a **TreeItem** use :ref:`Object.free`. +Removes the given child **TreeItem** and all its children from the :ref:`Tree`. Note that it doesn't free the item from memory, so it can be reused later (see :ref:`add_child()`). To completely remove a **TreeItem** use :ref:`Object.free()`. -\ **Note:** If you want to move a child from one :ref:`Tree` to another, then instead of removing and adding it manually you can use :ref:`move_before` or :ref:`move_after`. +\ **Note:** If you want to move a child from one :ref:`Tree` to another, then instead of removing and adding it manually you can use :ref:`move_before()` or :ref:`move_after()`. .. rst-class:: classref-item-separator @@ -1412,7 +1412,7 @@ Sets the given column's custom color. |void| **set_custom_draw**\ (\ column\: :ref:`int`, object\: :ref:`Object`, callback\: :ref:`StringName`\ ) :ref:`πŸ”—` -**Deprecated:** Use :ref:`set_custom_draw_callback` instead. +**Deprecated:** Use :ref:`set_custom_draw_callback()` instead. Sets the given column's custom draw callback to the ``callback`` method on ``object``. @@ -1468,7 +1468,7 @@ Sets custom font size used to draw text in the given ``column``. If ``multiline`` is ``true``, the given ``column`` is multiline editable. -\ **Note:** This option only affects the type of control (:ref:`LineEdit` or :ref:`TextEdit`) that appears when editing the column. You can set multiline values with :ref:`set_text` even if the column is not multiline editable. +\ **Note:** This option only affects the type of control (:ref:`LineEdit` or :ref:`TextEdit`) that appears when editing the column. You can set multiline values with :ref:`set_text()` even if the column is not multiline editable. .. rst-class:: classref-item-separator @@ -1590,7 +1590,7 @@ Sets language code of item's text used for line-breaking and text shaping algori |void| **set_metadata**\ (\ column\: :ref:`int`, meta\: :ref:`Variant`\ ) :ref:`πŸ”—` -Sets the metadata value for the given column, which can be retrieved later using :ref:`get_metadata`. This can be used, for example, to store a reference to the original data. +Sets the metadata value for the given column, which can be retrieved later using :ref:`get_metadata()`. This can be used, for example, to store a reference to the original data. .. rst-class:: classref-item-separator diff --git a/classes/class_tween.rst b/classes/class_tween.rst index e6f8c47a4..421cde891 100644 --- a/classes/class_tween.rst +++ b/classes/class_tween.rst @@ -23,9 +23,9 @@ Tweens are mostly useful for animations requiring a numerical property to be int \ **Tween** is more suited than :ref:`AnimationPlayer` for animations where you don't know the final values in advance. For example, interpolating a dynamically-chosen camera zoom value is best done with a **Tween**; it would be difficult to do the same thing with an :ref:`AnimationPlayer` node. Tweens are also more light-weight than :ref:`AnimationPlayer`, so they are very much suited for simple animations or general tasks that don't require visual tweaking provided by the editor. They can be used in a "fire-and-forget" manner for some logic that normally would be done by code. You can e.g. make something shoot periodically by using a looped :ref:`CallbackTweener` with a delay. -A **Tween** can be created by using either :ref:`SceneTree.create_tween` or :ref:`Node.create_tween`. **Tween**\ s created manually (i.e. by using ``Tween.new()``) are invalid and can't be used for tweening values. +A **Tween** can be created by using either :ref:`SceneTree.create_tween()` or :ref:`Node.create_tween()`. **Tween**\ s created manually (i.e. by using ``Tween.new()``) are invalid and can't be used for tweening values. -A tween animation is created by adding :ref:`Tweener`\ s to the **Tween** object, using :ref:`tween_property`, :ref:`tween_interval`, :ref:`tween_callback` or :ref:`tween_method`: +A tween animation is created by adding :ref:`Tweener`\ s to the **Tween** object, using :ref:`tween_property()`, :ref:`tween_interval()`, :ref:`tween_callback()` or :ref:`tween_method()`: .. tabs:: @@ -46,9 +46,9 @@ A tween animation is created by adding :ref:`Tweener`\ s to the * -This sequence will make the ``$Sprite`` node turn red, then shrink, before finally calling :ref:`Node.queue_free` to free the sprite. :ref:`Tweener`\ s are executed one after another by default. This behavior can be changed using :ref:`parallel` and :ref:`set_parallel`. +This sequence will make the ``$Sprite`` node turn red, then shrink, before finally calling :ref:`Node.queue_free()` to free the sprite. :ref:`Tweener`\ s are executed one after another by default. This behavior can be changed using :ref:`parallel()` and :ref:`set_parallel()`. -When a :ref:`Tweener` is created with one of the ``tween_*`` methods, a chained method call can be used to tweak the properties of this :ref:`Tweener`. For example, if you want to set a different transition type in the above example, you can use :ref:`set_trans`: +When a :ref:`Tweener` is created with one of the ``tween_*`` methods, a chained method call can be used to tweak the properties of this :ref:`Tweener`. For example, if you want to set a different transition type in the above example, you can use :ref:`set_trans()`: .. tabs:: @@ -143,7 +143,7 @@ Some :ref:`Tweener`\ s use transitions and eases. The first accep \ **Note:** Tweens are not designed to be reused and trying to do so results in an undefined behavior. Create a new Tween for each animation and every time you replay an animation from start. Keep in mind that Tweens start immediately, so only create a Tween when you want to start animating. -\ **Note:** The tween is processed after all of the nodes in the current frame, i.e. node's :ref:`Node._process` method would be called before the tween (or :ref:`Node._physics_process` depending on the value passed to :ref:`set_process_mode`). +\ **Note:** The tween is processed after all of the nodes in the current frame, i.e. node's :ref:`Node._process()` method would be called before the tween (or :ref:`Node._physics_process()` depending on the value passed to :ref:`set_process_mode()`). .. rst-class:: classref-reftable-group @@ -222,7 +222,7 @@ Signals **finished**\ (\ ) :ref:`πŸ”—` -Emitted when the **Tween** has finished all tweening. Never emitted when the **Tween** is set to infinite looping (see :ref:`set_loops`). +Emitted when the **Tween** has finished all tweening. Never emitted when the **Tween** is set to infinite looping (see :ref:`set_loops()`). .. rst-class:: classref-item-separator @@ -234,7 +234,7 @@ Emitted when the **Tween** has finished all tweening. Never emitted when the **T **loop_finished**\ (\ loop_count\: :ref:`int`\ ) :ref:`πŸ”—` -Emitted when a full loop is complete (see :ref:`set_loops`), providing the loop index. This signal is not emitted after the final loop, use :ref:`finished` instead for this case. +Emitted when a full loop is complete (see :ref:`set_loops()`), providing the loop index. This signal is not emitted after the final loop, use :ref:`finished` instead for this case. .. rst-class:: classref-item-separator @@ -269,7 +269,7 @@ enum **TweenProcessMode**: :ref:`πŸ”—` :ref:`TweenProcessMode` **TWEEN_PROCESS_PHYSICS** = ``0`` -The **Tween** updates after each physics frame (see :ref:`Node._physics_process`). +The **Tween** updates after each physics frame (see :ref:`Node._physics_process()`). .. _class_Tween_constant_TWEEN_PROCESS_IDLE: @@ -277,7 +277,7 @@ The **Tween** updates after each physics frame (see :ref:`Node._physics_process< :ref:`TweenProcessMode` **TWEEN_PROCESS_IDLE** = ``1`` -The **Tween** updates after each process frame (see :ref:`Node._process`). +The **Tween** updates after each process frame (see :ref:`Node._process()`). .. rst-class:: classref-item-separator @@ -478,7 +478,7 @@ Method Descriptions Binds this **Tween** with the given ``node``. **Tween**\ s are processed directly by the :ref:`SceneTree`, so they run independently of the animated nodes. When you bind a :ref:`Node` with the **Tween**, the **Tween** will halt the animation when the object is not inside tree and the **Tween** will be automatically killed when the bound object is freed. Also :ref:`TWEEN_PAUSE_BOUND` will make the pausing behavior dependent on the bound node. -For a shorter way to create and bind a **Tween**, you can use :ref:`Node.create_tween`. +For a shorter way to create and bind a **Tween**, you can use :ref:`Node.create_tween()`. .. rst-class:: classref-item-separator @@ -490,7 +490,7 @@ For a shorter way to create and bind a **Tween**, you can use :ref:`Node.create_ :ref:`Tween` **chain**\ (\ ) :ref:`πŸ”—` -Used to chain two :ref:`Tweener`\ s after :ref:`set_parallel` is called with ``true``. +Used to chain two :ref:`Tweener`\ s after :ref:`set_parallel()` is called with ``true``. .. tabs:: @@ -535,7 +535,7 @@ Returns ``true`` if the **Tween** still has :ref:`Tweener`\ s tha :ref:`int` **get_loops_left**\ (\ ) |const| :ref:`πŸ”—` -Returns the number of remaining loops for this **Tween** (see :ref:`set_loops`). A return value of ``-1`` indicates an infinitely looping **Tween**, and a return value of ``0`` indicates that the **Tween** has already finished. +Returns the number of remaining loops for this **Tween** (see :ref:`set_loops()`). A return value of ``-1`` indicates an infinitely looping **Tween**, and a return value of ``0`` indicates that the **Tween** has already finished. .. rst-class:: classref-item-separator @@ -547,7 +547,7 @@ Returns the number of remaining loops for this **Tween** (see :ref:`set_loops` **get_total_elapsed_time**\ (\ ) |const| :ref:`πŸ”—` -Returns the total time in seconds the **Tween** has been animating (i.e. the time since it started, not counting pauses etc.). The time is affected by :ref:`set_speed_scale`, and :ref:`stop` will reset it to ``0``. +Returns the total time in seconds the **Tween** has been animating (i.e. the time since it started, not counting pauses etc.). The time is affected by :ref:`set_speed_scale()`, and :ref:`stop()` will reset it to ``0``. \ **Note:** As it results from accumulating frame deltas, the time returned after the **Tween** has finished animating will be slightly greater than the actual **Tween** duration. @@ -561,7 +561,7 @@ Returns the total time in seconds the **Tween** has been animating (i.e. the tim :ref:`Variant` **interpolate_value**\ (\ initial_value\: :ref:`Variant`, delta_value\: :ref:`Variant`, elapsed_time\: :ref:`float`, duration\: :ref:`float`, trans_type\: :ref:`TransitionType`, ease_type\: :ref:`EaseType`\ ) |static| :ref:`πŸ”—` -This method can be used for manual interpolation of a value, when you don't want **Tween** to do animating for you. It's similar to :ref:`@GlobalScope.lerp`, but with support for custom transition and easing. +This method can be used for manual interpolation of a value, when you don't want **Tween** to do animating for you. It's similar to :ref:`@GlobalScope.lerp()`, but with support for custom transition and easing. \ ``initial_value`` is the starting value of the interpolation. @@ -595,7 +595,7 @@ Returns whether the **Tween** is currently running, i.e. it wasn't paused and it :ref:`bool` **is_valid**\ (\ ) :ref:`πŸ”—` -Returns whether the **Tween** is valid. A valid **Tween** is a **Tween** contained by the scene tree (i.e. the array from :ref:`SceneTree.get_processed_tweens` will contain this **Tween**). A **Tween** might become invalid when it has finished tweening, is killed, or when created with ``Tween.new()``. Invalid **Tween**\ s can't have :ref:`Tweener`\ s appended. +Returns whether the **Tween** is valid. A valid **Tween** is a **Tween** contained by the scene tree (i.e. the array from :ref:`SceneTree.get_processed_tweens()` will contain this **Tween**). A **Tween** might become invalid when it has finished tweening, is killed, or when created with ``Tween.new()``. Invalid **Tween**\ s can't have :ref:`Tweener`\ s appended. .. rst-class:: classref-item-separator @@ -642,7 +642,7 @@ Makes the next :ref:`Tweener` run parallelly to the previous one. All :ref:`Tweener`\ s in the example will run at the same time. -You can make the **Tween** parallel by default by using :ref:`set_parallel`. +You can make the **Tween** parallel by default by using :ref:`set_parallel()`. .. rst-class:: classref-item-separator @@ -654,9 +654,9 @@ You can make the **Tween** parallel by default by using :ref:`set_parallel` -Pauses the tweening. The animation can be resumed by using :ref:`play`. +Pauses the tweening. The animation can be resumed by using :ref:`play()`. -\ **Note:** If a Tween is paused and not bound to any node, it will exist indefinitely until manually started or invalidated. If you lose a reference to such Tween, you can retrieve it using :ref:`SceneTree.get_processed_tweens`. +\ **Note:** If a Tween is paused and not bound to any node, it will exist indefinitely until manually started or invalidated. If you lose a reference to such Tween, you can retrieve it using :ref:`SceneTree.get_processed_tweens()`. .. rst-class:: classref-item-separator @@ -715,9 +715,9 @@ If ``ignore`` is ``true``, the tween will ignore :ref:`Engine.time_scale`, the **Tween**'s bound node is freed, or all the animated objects have been freed (which makes further animation impossible). +Calling this method without arguments will make the **Tween** run infinitely, until either it is killed with :ref:`kill()`, the **Tween**'s bound node is freed, or all the animated objects have been freed (which makes further animation impossible). -\ **Warning:** Make sure to always add some duration/delay when using infinite loops. To prevent the game freezing, 0-duration looped animations (e.g. a single :ref:`CallbackTweener` with no delay) are stopped after a small number of loops, which may produce unexpected results. If a **Tween**'s lifetime depends on some node, always use :ref:`bind_node`. +\ **Warning:** Make sure to always add some duration/delay when using infinite loops. To prevent the game freezing, 0-duration looped animations (e.g. a single :ref:`CallbackTweener` with no delay) are stopped after a small number of loops, which may produce unexpected results. If a **Tween**'s lifetime depends on some node, always use :ref:`bind_node()`. .. rst-class:: classref-item-separator @@ -731,7 +731,7 @@ Calling this method without arguments will make the **Tween** run infinitely, un If ``parallel`` is ``true``, the :ref:`Tweener`\ s appended after this method will by default run simultaneously, as opposed to sequentially. -\ **Note:** Just like with :ref:`parallel`, the tweener added right before this method will also be part of the parallel step. +\ **Note:** Just like with :ref:`parallel()`, the tweener added right before this method will also be part of the parallel step. :: @@ -763,7 +763,7 @@ Default value is :ref:`TWEEN_PAUSE_BOUND :ref:`Tween` **set_process_mode**\ (\ mode\: :ref:`TweenProcessMode`\ ) :ref:`πŸ”—` -Determines whether the **Tween** should run after process frames (see :ref:`Node._process`) or physics frames (see :ref:`Node._physics_process`). +Determines whether the **Tween** should run after process frames (see :ref:`Node._process()`) or physics frames (see :ref:`Node._physics_process()`). Default value is :ref:`TWEEN_PROCESS_IDLE`. @@ -830,7 +830,7 @@ Stops the tweening and resets the **Tween** to its initial state. This will not tween.stop() tween.play() -\ **Note:** If a Tween is stopped and not bound to any node, it will exist indefinitely until manually started or invalidated. If you lose a reference to such Tween, you can retrieve it using :ref:`SceneTree.get_processed_tweens`. +\ **Note:** If a Tween is stopped and not bound to any node, it will exist indefinitely until manually started or invalidated. If you lose a reference to such Tween, you can retrieve it using :ref:`SceneTree.get_processed_tweens()`. .. rst-class:: classref-item-separator @@ -842,7 +842,7 @@ Stops the tweening and resets the **Tween** to its initial state. This will not :ref:`CallbackTweener` **tween_callback**\ (\ callback\: :ref:`Callable`\ ) :ref:`πŸ”—` -Creates and appends a :ref:`CallbackTweener`. This method can be used to call an arbitrary method in any object. Use :ref:`Callable.bind` to bind additional arguments for the call. +Creates and appends a :ref:`CallbackTweener`. This method can be used to call an arbitrary method in any object. Use :ref:`Callable.bind()` to bind additional arguments for the call. \ **Example:** Object that keeps shooting every 1 second: @@ -949,7 +949,7 @@ Creates and appends an :ref:`IntervalTweener`. This metho :ref:`MethodTweener` **tween_method**\ (\ method\: :ref:`Callable`, from\: :ref:`Variant`, to\: :ref:`Variant`, duration\: :ref:`float`\ ) :ref:`πŸ”—` -Creates and appends a :ref:`MethodTweener`. This method is similar to a combination of :ref:`tween_callback` and :ref:`tween_property`. It calls a method over time with a tweened value provided as an argument. The value is tweened between ``from`` and ``to`` over the time specified by ``duration``, in seconds. Use :ref:`Callable.bind` to bind additional arguments for the call. You can use :ref:`MethodTweener.set_ease` and :ref:`MethodTweener.set_trans` to tweak the easing and transition of the value or :ref:`MethodTweener.set_delay` to delay the tweening. +Creates and appends a :ref:`MethodTweener`. This method is similar to a combination of :ref:`tween_callback()` and :ref:`tween_property()`. It calls a method over time with a tweened value provided as an argument. The value is tweened between ``from`` and ``to`` over the time specified by ``duration``, in seconds. Use :ref:`Callable.bind()` to bind additional arguments for the call. You can use :ref:`MethodTweener.set_ease()` and :ref:`MethodTweener.set_trans()` to tweak the easing and transition of the value or :ref:`MethodTweener.set_delay()` to delay the tweening. \ **Example:** Making a 3D object look from one point to another point: @@ -1028,7 +1028,7 @@ Creates and appends a :ref:`PropertyTweener`. This method -will move the sprite to position (100, 200) and then to (200, 300). If you use :ref:`PropertyTweener.from` or :ref:`PropertyTweener.from_current`, the starting position will be overwritten by the given value instead. See other methods in :ref:`PropertyTweener` to see how the tweening can be tweaked further. +will move the sprite to position (100, 200) and then to (200, 300). If you use :ref:`PropertyTweener.from()` or :ref:`PropertyTweener.from_current()`, the starting position will be overwritten by the given value instead. See other methods in :ref:`PropertyTweener` to see how the tweening can be tweaked further. \ **Note:** You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using ``"property:component"`` (eg. ``position:x``), where it would only apply to that particular component. @@ -1076,9 +1076,9 @@ Creates and appends a :ref:`SubtweenTweener`. This method tween.tween_subtween(subtween) tween.tween_property(self, "position:x", 300, 2.0) -\ **Note:** The methods :ref:`pause`, :ref:`stop`, and :ref:`set_loops` can cause the parent **Tween** to get stuck on the subtween step; see the documentation for those methods for more information. +\ **Note:** The methods :ref:`pause()`, :ref:`stop()`, and :ref:`set_loops()` can cause the parent **Tween** to get stuck on the subtween step; see the documentation for those methods for more information. -\ **Note:** The pause and process modes set by :ref:`set_pause_mode` and :ref:`set_process_mode` on ``subtween`` will be overridden by the parent **Tween**'s settings. +\ **Note:** The pause and process modes set by :ref:`set_pause_mode()` and :ref:`set_process_mode()` on ``subtween`` will be overridden by the parent **Tween**'s settings. .. |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_udpserver.rst b/classes/class_udpserver.rst index 974b9384b..73f297eb4 100644 --- a/classes/class_udpserver.rst +++ b/classes/class_udpserver.rst @@ -19,9 +19,9 @@ Helper class to implement a UDP server. Description ----------- -A simple server that opens a UDP socket and returns connected :ref:`PacketPeerUDP` upon receiving new packets. See also :ref:`PacketPeerUDP.connect_to_host`. +A simple server that opens a UDP socket and returns connected :ref:`PacketPeerUDP` upon receiving new packets. See also :ref:`PacketPeerUDP.connect_to_host()`. -After starting the server (:ref:`listen`), you will need to :ref:`poll` it at regular intervals (e.g. inside :ref:`Node._process`) for it to process new packets, delivering them to the appropriate :ref:`PacketPeerUDP`, and taking new connections. +After starting the server (:ref:`listen()`), you will need to :ref:`poll()` it at regular intervals (e.g. inside :ref:`Node._process()`) for it to process new packets, delivering them to the appropriate :ref:`PacketPeerUDP`, and taking new connections. Below a small example of how it can be used: @@ -205,7 +205,7 @@ Property Descriptions - |void| **set_max_pending_connections**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_max_pending_connections**\ (\ ) -Define the maximum number of pending connections, during :ref:`poll`, any new pending connection exceeding that value will be automatically dropped. Setting this value to ``0`` effectively prevents any new pending connection to be accepted (e.g. when all your players have connected). +Define the maximum number of pending connections, during :ref:`poll()`, any new pending connection exceeding that value will be automatically dropped. Setting this value to ``0`` effectively prevents any new pending connection to be accepted (e.g. when all your players have connected). .. rst-class:: classref-section-separator @@ -258,7 +258,7 @@ Returns ``true`` if the socket is open and listening on a port. :ref:`Error` **listen**\ (\ port\: :ref:`int`, bind_address\: :ref:`String` = "*"\ ) :ref:`πŸ”—` -Starts the server by opening a UDP socket listening on the given ``port``. You can optionally specify a ``bind_address`` to only listen for packets sent to that address. See also :ref:`PacketPeerUDP.bind`. +Starts the server by opening a UDP socket listening on the given ``port``. You can optionally specify a ``bind_address`` to only listen for packets sent to that address. See also :ref:`PacketPeerUDP.bind()`. .. rst-class:: classref-item-separator @@ -270,7 +270,7 @@ Starts the server by opening a UDP socket listening on the given ``port``. You c :ref:`Error` **poll**\ (\ ) :ref:`πŸ”—` -Call this method at regular intervals (e.g. inside :ref:`Node._process`) to process new packets. And packet from known address/port pair will be delivered to the appropriate :ref:`PacketPeerUDP`, any packet received from an unknown address/port pair will be added as a pending connection (see :ref:`is_connection_available`, :ref:`take_connection`). The maximum number of pending connection is defined via :ref:`max_pending_connections`. +Call this method at regular intervals (e.g. inside :ref:`Node._process()`) to process new packets. And packet from known address/port pair will be delivered to the appropriate :ref:`PacketPeerUDP`, any packet received from an unknown address/port pair will be added as a pending connection (see :ref:`is_connection_available()`, :ref:`take_connection()`). The maximum number of pending connection is defined via :ref:`max_pending_connections`. .. rst-class:: classref-item-separator @@ -282,7 +282,7 @@ Call this method at regular intervals (e.g. inside :ref:`Node._process` -Stops the server, closing the UDP socket if open. Will close all connected :ref:`PacketPeerUDP` accepted via :ref:`take_connection` (remote peers will not be notified). +Stops the server, closing the UDP socket if open. Will close all connected :ref:`PacketPeerUDP` accepted via :ref:`take_connection()` (remote peers will not be notified). .. rst-class:: classref-item-separator @@ -294,7 +294,7 @@ Stops the server, closing the UDP socket if open. Will close all connected :ref: :ref:`PacketPeerUDP` **take_connection**\ (\ ) :ref:`πŸ”—` -Returns the first pending connection (connected to the appropriate address/port). Will return ``null`` if no new connection is available. See also :ref:`is_connection_available`, :ref:`PacketPeerUDP.connect_to_host`. +Returns the first pending connection (connected to the appropriate address/port). Will return ``null`` if no new connection is available. See also :ref:`is_connection_available()`, :ref:`PacketPeerUDP.connect_to_host()`. .. |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_undoredo.rst b/classes/class_undoredo.rst index 83b5df292..fea2cb11b 100644 --- a/classes/class_undoredo.rst +++ b/classes/class_undoredo.rst @@ -21,7 +21,7 @@ Description UndoRedo works by registering methods and property changes inside "actions". You can create an action, then provide ways to do and undo this action using function calls and property changes, then commit the action. -When an action is committed, all of the ``do_*`` methods will run. If the :ref:`undo` method is used, the ``undo_*`` methods will run. If the :ref:`redo` method is used, once again, all of the ``do_*`` methods will run. +When an action is committed, all of the ``do_*`` methods will run. If the :ref:`undo()` method is used, the ``undo_*`` methods will run. If the :ref:`redo()` method is used, once again, all of the ``do_*`` methods will run. Here's an example on how to add an action: @@ -79,9 +79,9 @@ Here's an example on how to add an action: -Before calling any of the ``add_(un)do_*`` methods, you need to first call :ref:`create_action`. Afterwards you need to call :ref:`commit_action`. +Before calling any of the ``add_(un)do_*`` methods, you need to first call :ref:`create_action()`. Afterwards you need to call :ref:`commit_action()`. -If you don't need to register a method, you can leave :ref:`add_do_method` and :ref:`add_undo_method` out; the same goes for properties. You can also register more than one method/property. +If you don't need to register a method, you can leave :ref:`add_do_method()` and :ref:`add_undo_method()` out; the same goes for properties. You can also register more than one method/property. If you are making an :ref:`EditorPlugin` and want to integrate into the editor's undo history, use :ref:`EditorUndoRedoManager` instead. @@ -199,7 +199,7 @@ Signals **version_changed**\ (\ ) :ref:`πŸ”—` -Called when :ref:`undo` or :ref:`redo` was called. +Called when :ref:`undo()` or :ref:`redo()` was called. .. rst-class:: classref-section-separator @@ -260,7 +260,7 @@ Property Descriptions - |void| **set_max_steps**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_max_steps**\ (\ ) -The maximum number of steps that can be stored in the undo/redo history. If the number of stored steps exceeds this limit, older steps are removed from history and can no longer be reached by calling :ref:`undo`. A value of ``0`` or lower means no limit. +The maximum number of steps that can be stored in the undo/redo history. If the number of stored steps exceeds this limit, older steps are removed from history and can no longer be reached by calling :ref:`undo()`. A value of ``0`` or lower means no limit. .. rst-class:: classref-section-separator @@ -397,7 +397,7 @@ Commit the action. If ``execute`` is ``true`` (which it is by default), all "do" |void| **create_action**\ (\ name\: :ref:`String`, merge_mode\: :ref:`MergeMode` = 0, backward_undo_ops\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Create a new action. After this is called, do all your calls to :ref:`add_do_method`, :ref:`add_undo_method`, :ref:`add_do_property`, and :ref:`add_undo_property`, then commit the action with :ref:`commit_action`. +Create a new action. After this is called, do all your calls to :ref:`add_do_method()`, :ref:`add_undo_method()`, :ref:`add_do_property()`, and :ref:`add_undo_property()`, then commit the action with :ref:`commit_action()`. The way actions are merged is dictated by ``merge_mode``. See :ref:`MergeMode` for details. @@ -413,7 +413,7 @@ The way undo operation are ordered in actions is dictated by ``backward_undo_ops |void| **end_force_keep_in_merge_ends**\ (\ ) :ref:`πŸ”—` -Stops marking operations as to be processed even if the action gets merged with another in the :ref:`MERGE_ENDS` mode. See :ref:`start_force_keep_in_merge_ends`. +Stops marking operations as to be processed even if the action gets merged with another in the :ref:`MERGE_ENDS` mode. See :ref:`start_force_keep_in_merge_ends()`. .. rst-class:: classref-item-separator @@ -511,7 +511,7 @@ Returns ``true`` if an "undo" action is available. :ref:`bool` **is_committing_action**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the **UndoRedo** is currently committing the action, i.e. running its "do" method or property change (see :ref:`commit_action`). +Returns ``true`` if the **UndoRedo** is currently committing the action, i.e. running its "do" method or property change (see :ref:`commit_action()`). .. rst-class:: classref-item-separator @@ -535,7 +535,7 @@ Redo the last action. |void| **start_force_keep_in_merge_ends**\ (\ ) :ref:`πŸ”—` -Marks the next "do" and "undo" operations to be processed even if the action gets merged with another in the :ref:`MERGE_ENDS` mode. Return to normal operation using :ref:`end_force_keep_in_merge_ends`. +Marks the next "do" and "undo" operations to be processed even if the action gets merged with another in the :ref:`MERGE_ENDS` mode. Return to normal operation using :ref:`end_force_keep_in_merge_ends()`. .. rst-class:: classref-item-separator diff --git a/classes/class_upnp.rst b/classes/class_upnp.rst index 648596817..281c87997 100644 --- a/classes/class_upnp.rst +++ b/classes/class_upnp.rst @@ -21,7 +21,7 @@ Description This class can be used to discover compatible :ref:`UPNPDevice`\ s on the local network and execute commands on them, like managing port mappings (for port forwarding/NAT traversal) and querying the local and remote network IP address. Note that methods on this class are synchronous and block the calling thread. -To forward a specific port (here ``7777``, note both :ref:`discover` and :ref:`add_port_mapping` can return errors that should be checked): +To forward a specific port (here ``7777``, note both :ref:`discover()` and :ref:`add_port_mapping()` can return errors that should be checked): :: @@ -362,7 +362,7 @@ Error allocating memory. :ref:`UPNPResult` **UPNP_RESULT_NO_GATEWAY** = ``26`` -No gateway available. You may need to call :ref:`discover` first, or discovery didn't detect any valid IGDs (InternetGatewayDevices). +No gateway available. You may need to call :ref:`discover()` first, or discovery didn't detect any valid IGDs (InternetGatewayDevices). .. _class_UPNP_constant_UPNP_RESULT_NO_DEVICES: @@ -370,7 +370,7 @@ No gateway available. You may need to call :ref:`discover` **UPNP_RESULT_NO_DEVICES** = ``27`` -No devices available. You may need to call :ref:`discover` first, or discovery didn't detect any valid :ref:`UPNPDevice`\ s. +No devices available. You may need to call :ref:`discover()` first, or discovery didn't detect any valid :ref:`UPNPDevice`\ s. .. _class_UPNP_constant_UPNP_RESULT_UNKNOWN_ERROR: @@ -463,7 +463,7 @@ Adds the given :ref:`UPNPDevice` to the list of discovered dev :ref:`int` **add_port_mapping**\ (\ port\: :ref:`int`, port_internal\: :ref:`int` = 0, desc\: :ref:`String` = "", proto\: :ref:`String` = "UDP", duration\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Adds a mapping to forward the external ``port`` (between 1 and 65535, although recommended to use port 1024 or above) on the default gateway (see :ref:`get_gateway`) to the ``port_internal`` on the local machine for the given protocol ``proto`` (either ``"TCP"`` or ``"UDP"``, with UDP being the default). If a port mapping for the given port and protocol combination already exists on that gateway device, this method tries to overwrite it. If that is not desired, you can retrieve the gateway manually with :ref:`get_gateway` and call :ref:`add_port_mapping` on it, if any. Note that forwarding a well-known port (below 1024) with UPnP may fail depending on the device. +Adds a mapping to forward the external ``port`` (between 1 and 65535, although recommended to use port 1024 or above) on the default gateway (see :ref:`get_gateway()`) to the ``port_internal`` on the local machine for the given protocol ``proto`` (either ``"TCP"`` or ``"UDP"``, with UDP being the default). If a port mapping for the given port and protocol combination already exists on that gateway device, this method tries to overwrite it. If that is not desired, you can retrieve the gateway manually with :ref:`get_gateway()` and call :ref:`add_port_mapping()` on it, if any. Note that forwarding a well-known port (below 1024) with UPnP may fail depending on the device. Depending on the gateway device, if a mapping for that port already exists, it will either be updated or it will refuse this command due to that conflict, especially if the existing mapping for that port wasn't created via UPnP or points to a different network address (or device) than this one. @@ -497,7 +497,7 @@ Clears the list of discovered devices. :ref:`int` **delete_port_mapping**\ (\ port\: :ref:`int`, proto\: :ref:`String` = "UDP"\ ) |const| :ref:`πŸ”—` -Deletes the port mapping for the given port and protocol combination on the default gateway (see :ref:`get_gateway`) if one exists. ``port`` must be a valid port between 1 and 65535, ``proto`` can be either ``"TCP"`` or ``"UDP"``. May be refused for mappings pointing to addresses other than this one, for well-known ports (below 1024), or for mappings not added via UPnP. See :ref:`UPNPResult` for possible return values. +Deletes the port mapping for the given port and protocol combination on the default gateway (see :ref:`get_gateway()`) if one exists. ``port`` must be a valid port between 1 and 65535, ``proto`` can be either ``"TCP"`` or ``"UDP"``. May be refused for mappings pointing to addresses other than this one, for well-known ports (below 1024), or for mappings not added via UPnP. See :ref:`UPNPResult` for possible return values. .. rst-class:: classref-item-separator @@ -561,7 +561,7 @@ Returns the default gateway. That is the first discovered :ref:`UPNPDevice` **query_external_address**\ (\ ) |const| :ref:`πŸ”—` -Returns the external :ref:`IP` address of the default gateway (see :ref:`get_gateway`) as string. Returns an empty string on error. +Returns the external :ref:`IP` address of the default gateway (see :ref:`get_gateway()`) as string. Returns an empty string on error. .. rst-class:: classref-item-separator diff --git a/classes/class_upnpdevice.rst b/classes/class_upnpdevice.rst index d93766f18..8df32dd83 100644 --- a/classes/class_upnpdevice.rst +++ b/classes/class_upnpdevice.rst @@ -282,7 +282,7 @@ Method Descriptions :ref:`int` **add_port_mapping**\ (\ port\: :ref:`int`, port_internal\: :ref:`int` = 0, desc\: :ref:`String` = "", proto\: :ref:`String` = "UDP", duration\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Adds a port mapping to forward the given external port on this **UPNPDevice** for the given protocol to the local machine. See :ref:`UPNP.add_port_mapping`. +Adds a port mapping to forward the given external port on this **UPNPDevice** for the given protocol to the local machine. See :ref:`UPNP.add_port_mapping()`. .. rst-class:: classref-item-separator @@ -294,7 +294,7 @@ Adds a port mapping to forward the given external port on this **UPNPDevice** fo :ref:`int` **delete_port_mapping**\ (\ port\: :ref:`int`, proto\: :ref:`String` = "UDP"\ ) |const| :ref:`πŸ”—` -Deletes the port mapping identified by the given port and protocol combination on this device. See :ref:`UPNP.delete_port_mapping`. +Deletes the port mapping identified by the given port and protocol combination on this device. See :ref:`UPNP.delete_port_mapping()`. .. rst-class:: classref-item-separator diff --git a/classes/class_variant.rst b/classes/class_variant.rst index b58d32518..6f1b6e0d5 100644 --- a/classes/class_variant.rst +++ b/classes/class_variant.rst @@ -51,7 +51,7 @@ Godot tracks all scripting API variables within Variants. Without even realizing - C# is statically typed, but uses its own implementation of the Variant type in place of Godot's **Variant** class when it needs to represent a dynamic value. C# Variant can be assigned any compatible type implicitly but converting requires an explicit cast. -The global :ref:`@GlobalScope.typeof` function returns the enumerated value of the Variant type stored in the current variable (see :ref:`Variant.Type`). +The global :ref:`@GlobalScope.typeof()` function returns the enumerated value of the Variant type stored in the current variable (see :ref:`Variant.Type`). .. tabs:: diff --git a/classes/class_vector2.rst b/classes/class_vector2.rst index cdec82eb2..d6e6aa447 100644 --- a/classes/class_vector2.rst +++ b/classes/class_vector2.rst @@ -247,7 +247,7 @@ enum **Axis**: :ref:`πŸ”—` :ref:`Axis` **AXIS_X** = ``0`` -Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +Enumerated value for the X axis. Returned by :ref:`max_axis_index()` and :ref:`min_axis_index()`. .. _class_Vector2_constant_AXIS_Y: @@ -255,7 +255,7 @@ Enumerated value for the X axis. Returned by :ref:`max_axis_index` **AXIS_Y** = ``1`` -Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +Enumerated value for the Y axis. Returned by :ref:`max_axis_index()` and :ref:`min_axis_index()`. .. rst-class:: classref-section-separator @@ -431,7 +431,7 @@ For example, ``Vector2.RIGHT.angle()`` will return zero, ``Vector2.DOWN.angle()` \ `Illustration of the returned angle. `__\ -Equivalent to the result of :ref:`@GlobalScope.atan2` when called with the vector's :ref:`y` and :ref:`x` as parameters: ``atan2(y, x)``. +Equivalent to the result of :ref:`@GlobalScope.atan2()` when called with the vector's :ref:`y` and :ref:`x` as parameters: ``atan2(y, x)``. .. rst-class:: classref-item-separator @@ -443,7 +443,7 @@ Equivalent to the result of :ref:`@GlobalScope.atan2` **angle_to**\ (\ to\: :ref:`Vector2`\ ) |const| :ref:`πŸ”—` -Returns the angle to the given vector, in radians. +Returns the signed angle to the given vector, in radians. \ `Illustration of the returned angle. `__ @@ -511,7 +511,7 @@ Returns the point at the given ``t`` on the `BΓ©zier curve ` performs the operation that most engines and frameworks call ``reflect()``. +\ **Note:** :ref:`bounce()` performs the operation that most engines and frameworks call ``reflect()``. .. rst-class:: classref-item-separator @@ -535,7 +535,7 @@ Returns a new vector with all components rounded up (towards positive infinity). :ref:`Vector2` **clamp**\ (\ min\: :ref:`Vector2`, max\: :ref:`Vector2`\ ) |const| :ref:`πŸ”—` -Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp` on each component. +Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp()` on each component. .. rst-class:: classref-item-separator @@ -547,7 +547,7 @@ Returns a new vector with all components clamped between the components of ``min :ref:`Vector2` **clampf**\ (\ min\: :ref:`float`, max\: :ref:`float`\ ) |const| :ref:`πŸ”—` -Returns a new vector with all components clamped between ``min`` and ``max``, by running :ref:`@GlobalScope.clamp` on each component. +Returns a new vector with all components clamped between ``min`` and ``max``, by running :ref:`@GlobalScope.clamp()` on each component. .. rst-class:: classref-item-separator @@ -589,7 +589,7 @@ Performs a cubic interpolation between this vector and ``b`` using ``pre_a`` and Performs a cubic interpolation between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. -It can perform smoother interpolation than :ref:`cubic_interpolate` by the time values. +It can perform smoother interpolation than :ref:`cubic_interpolate()` by the time values. .. rst-class:: classref-item-separator @@ -615,7 +615,7 @@ Returns the normalized vector pointing from this vector to ``to``. This is equiv Returns the squared distance between this vector and ``to``. -This method runs faster than :ref:`distance_to`, so prefer it if you need to compare vectors or need the squared distance for some formula. +This method runs faster than :ref:`distance_to()`, so prefer it if you need to compare vectors or need the squared distance for some formula. .. rst-class:: classref-item-separator @@ -687,7 +687,7 @@ Creates a unit **Vector2** rotated to the given ``angle`` in radians. This is eq :ref:`bool` **is_equal_approx**\ (\ to\: :ref:`Vector2`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this vector and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. +Returns ``true`` if this vector and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx()` on each component. .. rst-class:: classref-item-separator @@ -699,7 +699,7 @@ Returns ``true`` if this vector and ``to`` are approximately equal, by running : :ref:`bool` **is_finite**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this vector is finite, by calling :ref:`@GlobalScope.is_finite` on each component. +Returns ``true`` if this vector is finite, by calling :ref:`@GlobalScope.is_finite()` on each component. .. rst-class:: classref-item-separator @@ -723,9 +723,9 @@ Returns ``true`` if the vector is normalized, i.e. its length is approximately e :ref:`bool` **is_zero_approx**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this vector's values are approximately zero, by running :ref:`@GlobalScope.is_zero_approx` on each component. +Returns ``true`` if this vector's values are approximately zero, by running :ref:`@GlobalScope.is_zero_approx()` on each component. -This method is faster than using :ref:`is_equal_approx` with one value as a zero vector. +This method is faster than using :ref:`is_equal_approx()` with one value as a zero vector. .. rst-class:: classref-item-separator @@ -751,7 +751,7 @@ Returns the length (magnitude) of this vector. Returns the squared length (squared magnitude) of this vector. -This method runs faster than :ref:`length`, so prefer it if you need to compare vectors or need the squared distance for some formula. +This method runs faster than :ref:`length()`, so prefer it if you need to compare vectors or need the squared distance for some formula. .. rst-class:: classref-item-separator @@ -871,7 +871,7 @@ Returns a new vector moved toward ``to`` by the fixed ``delta`` amount. Will not :ref:`Vector2` **normalized**\ (\ ) |const| :ref:`πŸ”—` -Returns the result of scaling the vector to unit length. Equivalent to ``v / v.length()``. Returns ``(0, 0)`` if ``v.length() == 0``. See also :ref:`is_normalized`. +Returns the result of scaling the vector to unit length. Equivalent to ``v / v.length()``. Returns ``(0, 0)`` if ``v.length() == 0``. See also :ref:`is_normalized()`. \ **Note:** This function may return incorrect values if the input vector length is near zero. @@ -897,7 +897,7 @@ Returns a perpendicular vector rotated 90 degrees counter-clockwise compared to :ref:`Vector2` **posmod**\ (\ mod\: :ref:`float`\ ) |const| :ref:`πŸ”—` -Returns a vector composed of the :ref:`@GlobalScope.fposmod` of this vector's components and ``mod``. +Returns a vector composed of the :ref:`@GlobalScope.fposmod()` of this vector's components and ``mod``. .. rst-class:: classref-item-separator @@ -909,7 +909,7 @@ Returns a vector composed of the :ref:`@GlobalScope.fposmod` **posmodv**\ (\ modv\: :ref:`Vector2`\ ) |const| :ref:`πŸ”—` -Returns a vector composed of the :ref:`@GlobalScope.fposmod` of this vector's components and ``modv``'s components. +Returns a vector composed of the :ref:`@GlobalScope.fposmod()` of this vector's components and ``modv``'s components. .. rst-class:: classref-item-separator @@ -921,7 +921,7 @@ Returns a vector composed of the :ref:`@GlobalScope.fposmod` **project**\ (\ b\: :ref:`Vector2`\ ) |const| :ref:`πŸ”—` -Returns a new vector resulting from projecting this vector onto the given vector ``b``. The resulting new vector is parallel to ``b``. See also :ref:`slide`. +Returns a new vector resulting from projecting this vector onto the given vector ``b``. The resulting new vector is parallel to ``b``. See also :ref:`slide()`. \ **Note:** If the vector ``b`` is a zero vector, the components of the resulting new vector will be :ref:`@GDScript.NAN`. @@ -937,7 +937,7 @@ Returns a new vector resulting from projecting this vector onto the given vector Returns the result of reflecting the vector from a line defined by the given direction vector ``line``. -\ **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()``. +\ **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 @@ -949,7 +949,7 @@ Returns the result of reflecting the vector from a line defined by the given dir :ref:`Vector2` **rotated**\ (\ angle\: :ref:`float`\ ) |const| :ref:`πŸ”—` -Returns the result of rotating this vector by ``angle`` (in radians). See also :ref:`@GlobalScope.deg_to_rad`. +Returns the result of rotating this vector by ``angle`` (in radians). See also :ref:`@GlobalScope.deg_to_rad()`. .. rst-class:: classref-item-separator @@ -973,7 +973,7 @@ Returns a new vector with all components rounded to the nearest integer, with ha :ref:`Vector2` **sign**\ (\ ) |const| :ref:`πŸ”—` -Returns a new vector with each component set to ``1.0`` if it's positive, ``-1.0`` if it's negative, and ``0.0`` if it's zero. The result is identical to calling :ref:`@GlobalScope.sign` on each component. +Returns a new vector with each component set to ``1.0`` if it's positive, ``-1.0`` if it's negative, and ``0.0`` if it's zero. The result is identical to calling :ref:`@GlobalScope.sign()` on each component. .. rst-class:: classref-item-separator @@ -987,7 +987,7 @@ Returns a new vector with each component set to ``1.0`` if it's positive, ``-1.0 Returns the result of spherical linear interpolation between this vector and ``to``, by amount ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. -This method also handles interpolating the lengths if the input vectors have different lengths. For the special case of one or both input vectors having zero length, this method behaves like :ref:`lerp`. +This method also handles interpolating the lengths if the input vectors have different lengths. For the special case of one or both input vectors having zero length, this method behaves like :ref:`lerp()`. .. rst-class:: classref-item-separator @@ -999,9 +999,9 @@ This method also handles interpolating the lengths if the input vectors have dif :ref:`Vector2` **slide**\ (\ n\: :ref:`Vector2`\ ) |const| :ref:`πŸ”—` -Returns a new vector resulting from sliding this vector along a line with normal ``n``. The resulting new vector is perpendicular to ``n``, and is equivalent to this vector minus its projection on ``n``. See also :ref:`project`. +Returns a new vector resulting from sliding this vector along a line with normal ``n``. The resulting new vector is perpendicular to ``n``, and is equivalent to this vector minus its projection on ``n``. See also :ref:`project()`. -\ **Note:** The vector ``n`` must be normalized. See also :ref:`normalized`. +\ **Note:** The vector ``n`` must be normalized. See also :ref:`normalized()`. .. rst-class:: classref-item-separator @@ -1044,7 +1044,7 @@ Operator Descriptions Returns ``true`` if the vectors are not equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. \ **Note:** Vectors with :ref:`@GDScript.NAN` elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included. @@ -1060,9 +1060,9 @@ Returns ``true`` if the vectors are not equal. Inversely transforms (multiplies) the **Vector2** by the given :ref:`Transform2D` transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). -\ ``vector * transform`` is equivalent to ``transform.inverse() * vector``. See :ref:`Transform2D.inverse`. +\ ``vector * transform`` is equivalent to ``transform.inverse() * vector``. See :ref:`Transform2D.inverse()`. -For transforming by inverse of an affine transformation (e.g. with scaling) ``transform.affine_inverse() * vector`` can be used instead. See :ref:`Transform2D.affine_inverse`. +For transforming by inverse of an affine transformation (e.g. with scaling) ``transform.affine_inverse() * vector`` can be used instead. See :ref:`Transform2D.affine_inverse()`. .. rst-class:: classref-item-separator @@ -1216,7 +1216,7 @@ Compares two **Vector2** vectors by first checking if the X value of the left ve Returns ``true`` if the vectors are exactly equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. \ **Note:** Vectors with :ref:`@GDScript.NAN` elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included. diff --git a/classes/class_vector2i.rst b/classes/class_vector2i.rst index 853aadfb8..6f1db05e5 100644 --- a/classes/class_vector2i.rst +++ b/classes/class_vector2i.rst @@ -179,7 +179,7 @@ enum **Axis**: :ref:`πŸ”—` :ref:`Axis` **AXIS_X** = ``0`` -Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +Enumerated value for the X axis. Returned by :ref:`max_axis_index()` and :ref:`min_axis_index()`. .. _class_Vector2i_constant_AXIS_Y: @@ -187,7 +187,7 @@ Enumerated value for the X axis. Returned by :ref:`max_axis_index` **AXIS_Y** = ``1`` -Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +Enumerated value for the Y axis. Returned by :ref:`max_axis_index()` and :ref:`min_axis_index()`. .. rst-class:: classref-section-separator @@ -326,7 +326,7 @@ Constructs a **Vector2i** as a copy of the given **Vector2i**. :ref:`Vector2i` **Vector2i**\ (\ from\: :ref:`Vector2`\ ) -Constructs a new **Vector2i** from the given :ref:`Vector2` by truncating components' fractional parts (rounding towards zero). For a different behavior consider passing the result of :ref:`Vector2.ceil`, :ref:`Vector2.floor` or :ref:`Vector2.round` to this constructor instead. +Constructs a new **Vector2i** from the given :ref:`Vector2` by truncating components' fractional parts (rounding towards zero). For a different behavior consider passing the result of :ref:`Vector2.ceil()`, :ref:`Vector2.floor()` or :ref:`Vector2.round()` to this constructor instead. .. rst-class:: classref-item-separator @@ -377,7 +377,7 @@ Returns the aspect ratio of this vector, the ratio of :ref:`x` **clamp**\ (\ min\: :ref:`Vector2i`, max\: :ref:`Vector2i`\ ) |const| :ref:`πŸ”—` -Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp` on each component. +Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp()` on each component. .. rst-class:: classref-item-separator @@ -389,7 +389,7 @@ Returns a new vector with all components clamped between the components of ``min :ref:`Vector2i` **clampi**\ (\ min\: :ref:`int`, max\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns a new vector with all components clamped between ``min`` and ``max``, by running :ref:`@GlobalScope.clamp` on each component. +Returns a new vector with all components clamped between ``min`` and ``max``, by running :ref:`@GlobalScope.clamp()` on each component. .. rst-class:: classref-item-separator @@ -403,7 +403,7 @@ Returns a new vector with all components clamped between ``min`` and ``max``, by Returns the squared distance between this vector and ``to``. -This method runs faster than :ref:`distance_to`, so prefer it if you need to compare vectors or need the squared distance for some formula. +This method runs faster than :ref:`distance_to()`, so prefer it if you need to compare vectors or need the squared distance for some formula. .. rst-class:: classref-item-separator @@ -441,7 +441,7 @@ Returns the length (magnitude) of this vector. Returns the squared length (squared magnitude) of this vector. -This method runs faster than :ref:`length`, so prefer it if you need to compare vectors or need the squared distance for some formula. +This method runs faster than :ref:`length()`, so prefer it if you need to compare vectors or need the squared distance for some formula. .. rst-class:: classref-item-separator @@ -525,7 +525,7 @@ Returns the component-wise minimum of this and ``with``, equivalent to ``Vector2 :ref:`Vector2i` **sign**\ (\ ) |const| :ref:`πŸ”—` -Returns a new vector with each component set to ``1`` if it's positive, ``-1`` if it's negative, and ``0`` if it's zero. The result is identical to calling :ref:`@GlobalScope.sign` on each component. +Returns a new vector with each component set to ``1`` if it's positive, ``-1`` if it's negative, and ``0`` if it's zero. The result is identical to calling :ref:`@GlobalScope.sign()` on each component. .. rst-class:: classref-item-separator @@ -578,7 +578,7 @@ Returns ``true`` if the vectors are not equal. :ref:`Vector2i` **operator %**\ (\ right\: :ref:`Vector2i`\ ) :ref:`πŸ”—` -Gets the remainder of each component of the **Vector2i** with the components of the given **Vector2i**. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod` instead if you want to handle negative numbers. +Gets the remainder of each component of the **Vector2i** with the components of the given **Vector2i**. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod()` instead if you want to handle negative numbers. :: @@ -594,7 +594,7 @@ Gets the remainder of each component of the **Vector2i** with the components of :ref:`Vector2i` **operator %**\ (\ right\: :ref:`int`\ ) :ref:`πŸ”—` -Gets the remainder of each component of the **Vector2i** with the given :ref:`int`. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod` instead if you want to handle negative numbers. +Gets the remainder of each component of the **Vector2i** with the given :ref:`int`. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod()` instead if you want to handle negative numbers. :: diff --git a/classes/class_vector3.rst b/classes/class_vector3.rst index d93fc6f8b..f4af9da0e 100644 --- a/classes/class_vector3.rst +++ b/classes/class_vector3.rst @@ -253,7 +253,7 @@ enum **Axis**: :ref:`πŸ”—` :ref:`Axis` **AXIS_X** = ``0`` -Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +Enumerated value for the X axis. Returned by :ref:`max_axis_index()` and :ref:`min_axis_index()`. .. _class_Vector3_constant_AXIS_Y: @@ -261,7 +261,7 @@ Enumerated value for the X axis. Returned by :ref:`max_axis_index` **AXIS_Y** = ``1`` -Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +Enumerated value for the Y axis. Returned by :ref:`max_axis_index()` and :ref:`min_axis_index()`. .. _class_Vector3_constant_AXIS_Z: @@ -269,7 +269,7 @@ Enumerated value for the Y axis. Returned by :ref:`max_axis_index` **AXIS_Z** = ``2`` -Enumerated value for the Z axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +Enumerated value for the Z axis. Returned by :ref:`max_axis_index()` and :ref:`min_axis_index()`. .. rst-class:: classref-section-separator @@ -553,7 +553,7 @@ Returns the point at the given ``t`` on the `BΓ©zier curve ` performs the operation that most engines and frameworks call ``reflect()``. +\ **Note:** :ref:`bounce()` performs the operation that most engines and frameworks call ``reflect()``. .. rst-class:: classref-item-separator @@ -577,7 +577,7 @@ Returns a new vector with all components rounded up (towards positive infinity). :ref:`Vector3` **clamp**\ (\ min\: :ref:`Vector3`, max\: :ref:`Vector3`\ ) |const| :ref:`πŸ”—` -Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp` on each component. +Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp()` on each component. .. rst-class:: classref-item-separator @@ -589,7 +589,7 @@ Returns a new vector with all components clamped between the components of ``min :ref:`Vector3` **clampf**\ (\ min\: :ref:`float`, max\: :ref:`float`\ ) |const| :ref:`πŸ”—` -Returns a new vector with all components clamped between ``min`` and ``max``, by running :ref:`@GlobalScope.clamp` on each component. +Returns a new vector with all components clamped between ``min`` and ``max``, by running :ref:`@GlobalScope.clamp()` on each component. .. rst-class:: classref-item-separator @@ -629,7 +629,7 @@ Performs a cubic interpolation between this vector and ``b`` using ``pre_a`` and Performs a cubic interpolation between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. -It can perform smoother interpolation than :ref:`cubic_interpolate` by the time values. +It can perform smoother interpolation than :ref:`cubic_interpolate()` by the time values. .. rst-class:: classref-item-separator @@ -655,7 +655,7 @@ Returns the normalized vector pointing from this vector to ``to``. This is equiv Returns the squared distance between this vector and ``to``. -This method runs faster than :ref:`distance_to`, so prefer it if you need to compare vectors or need the squared distance for some formula. +This method runs faster than :ref:`distance_to()`, so prefer it if you need to compare vectors or need the squared distance for some formula. .. rst-class:: classref-item-separator @@ -721,7 +721,7 @@ Returns the inverse of the vector. This is the same as ``Vector3(1.0 / v.x, 1.0 :ref:`bool` **is_equal_approx**\ (\ to\: :ref:`Vector3`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this vector and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. +Returns ``true`` if this vector and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx()` on each component. .. rst-class:: classref-item-separator @@ -733,7 +733,7 @@ Returns ``true`` if this vector and ``to`` are approximately equal, by running : :ref:`bool` **is_finite**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this vector is finite, by calling :ref:`@GlobalScope.is_finite` on each component. +Returns ``true`` if this vector is finite, by calling :ref:`@GlobalScope.is_finite()` on each component. .. rst-class:: classref-item-separator @@ -757,9 +757,9 @@ Returns ``true`` if the vector is normalized, i.e. its length is approximately e :ref:`bool` **is_zero_approx**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this vector's values are approximately zero, by running :ref:`@GlobalScope.is_zero_approx` on each component. +Returns ``true`` if this vector's values are approximately zero, by running :ref:`@GlobalScope.is_zero_approx()` on each component. -This method is faster than using :ref:`is_equal_approx` with one value as a zero vector. +This method is faster than using :ref:`is_equal_approx()` with one value as a zero vector. .. rst-class:: classref-item-separator @@ -785,7 +785,7 @@ Returns the length (magnitude) of this vector. Returns the squared length (squared magnitude) of this vector. -This method runs faster than :ref:`length`, so prefer it if you need to compare vectors or need the squared distance for some formula. +This method runs faster than :ref:`length()`, so prefer it if you need to compare vectors or need the squared distance for some formula. .. rst-class:: classref-item-separator @@ -905,7 +905,7 @@ Returns a new vector moved toward ``to`` by the fixed ``delta`` amount. Will not :ref:`Vector3` **normalized**\ (\ ) |const| :ref:`πŸ”—` -Returns the result of scaling the vector to unit length. Equivalent to ``v / v.length()``. Returns ``(0, 0, 0)`` if ``v.length() == 0``. See also :ref:`is_normalized`. +Returns the result of scaling the vector to unit length. Equivalent to ``v / v.length()``. Returns ``(0, 0, 0)`` if ``v.length() == 0``. See also :ref:`is_normalized()`. \ **Note:** This function may return incorrect values if the input vector length is near zero. @@ -919,7 +919,7 @@ Returns the result of scaling the vector to unit length. Equivalent to ``v / v.l :ref:`Vector3` **octahedron_decode**\ (\ uv\: :ref:`Vector2`\ ) |static| :ref:`πŸ”—` -Returns the **Vector3** from an octahedral-compressed form created using :ref:`octahedron_encode` (stored as a :ref:`Vector2`). +Returns the **Vector3** from an octahedral-compressed form created using :ref:`octahedron_encode()` (stored as a :ref:`Vector2`). .. rst-class:: classref-item-separator @@ -931,9 +931,9 @@ Returns the **Vector3** from an octahedral-compressed form created using :ref:`o :ref:`Vector2` **octahedron_encode**\ (\ ) |const| :ref:`πŸ”—` -Returns the octahedral-encoded (oct32) form of this **Vector3** as a :ref:`Vector2`. Since a :ref:`Vector2` occupies 1/3 less memory compared to **Vector3**, this form of compression can be used to pass greater amounts of :ref:`normalized` **Vector3**\ s without increasing storage or memory requirements. See also :ref:`octahedron_decode`. +Returns the octahedral-encoded (oct32) form of this **Vector3** as a :ref:`Vector2`. Since a :ref:`Vector2` occupies 1/3 less memory compared to **Vector3**, this form of compression can be used to pass greater amounts of :ref:`normalized()` **Vector3**\ s without increasing storage or memory requirements. See also :ref:`octahedron_decode()`. -\ **Note:** :ref:`octahedron_encode` can only be used for :ref:`normalized` vectors. :ref:`octahedron_encode` does *not* check whether this **Vector3** is normalized, and will return a value that does not decompress to the original value if the **Vector3** is not normalized. +\ **Note:** :ref:`octahedron_encode()` can only be used for :ref:`normalized()` vectors. :ref:`octahedron_encode()` does *not* check whether this **Vector3** is normalized, and will return a value that does not decompress to the original value if the **Vector3** is not normalized. \ **Note:** Octahedral compression is *lossy*, although visual differences are rarely perceptible in real world scenarios. @@ -959,7 +959,7 @@ Returns the outer product with ``with``. :ref:`Vector3` **posmod**\ (\ mod\: :ref:`float`\ ) |const| :ref:`πŸ”—` -Returns a vector composed of the :ref:`@GlobalScope.fposmod` of this vector's components and ``mod``. +Returns a vector composed of the :ref:`@GlobalScope.fposmod()` of this vector's components and ``mod``. .. rst-class:: classref-item-separator @@ -971,7 +971,7 @@ Returns a vector composed of the :ref:`@GlobalScope.fposmod` **posmodv**\ (\ modv\: :ref:`Vector3`\ ) |const| :ref:`πŸ”—` -Returns a vector composed of the :ref:`@GlobalScope.fposmod` of this vector's components and ``modv``'s components. +Returns a vector composed of the :ref:`@GlobalScope.fposmod()` of this vector's components and ``modv``'s components. .. rst-class:: classref-item-separator @@ -983,7 +983,7 @@ Returns a vector composed of the :ref:`@GlobalScope.fposmod` **project**\ (\ b\: :ref:`Vector3`\ ) |const| :ref:`πŸ”—` -Returns a new vector resulting from projecting this vector onto the given vector ``b``. The resulting new vector is parallel to ``b``. See also :ref:`slide`. +Returns a new vector resulting from projecting this vector onto the given vector ``b``. The resulting new vector is parallel to ``b``. See also :ref:`slide()`. \ **Note:** If the vector ``b`` is a zero vector, the components of the resulting new vector will be :ref:`@GDScript.NAN`. @@ -999,7 +999,7 @@ Returns a new vector resulting from projecting this vector onto the given vector Returns the result of reflecting the vector through a plane defined by the given normal vector ``n``. -\ **Note:** :ref:`reflect` differs from what other engines and frameworks call ``reflect()``. In other engines, ``reflect()`` returns the result of the vector reflected by the given plane. The reflection thus passes through the given normal. While in Godot the reflection passes through the plane and can be thought of as bouncing off the normal. See also :ref:`bounce` which does what most engines call ``reflect()``. +\ **Note:** :ref:`reflect()` differs from what other engines and frameworks call ``reflect()``. In other engines, ``reflect()`` returns the result of the vector reflected by the given plane. The reflection thus passes through the given normal. While in Godot the reflection passes through the plane and can be thought of as bouncing off the normal. See also :ref:`bounce()` which does what most engines call ``reflect()``. .. rst-class:: classref-item-separator @@ -1011,7 +1011,7 @@ Returns the result of reflecting the vector through a plane defined by the given :ref:`Vector3` **rotated**\ (\ axis\: :ref:`Vector3`, angle\: :ref:`float`\ ) |const| :ref:`πŸ”—` -Returns the result of rotating this vector around a given axis by ``angle`` (in radians). The axis must be a normalized vector. See also :ref:`@GlobalScope.deg_to_rad`. +Returns the result of rotating this vector around a given axis by ``angle`` (in radians). The axis must be a normalized vector. See also :ref:`@GlobalScope.deg_to_rad()`. .. rst-class:: classref-item-separator @@ -1035,7 +1035,7 @@ Returns a new vector with all components rounded to the nearest integer, with ha :ref:`Vector3` **sign**\ (\ ) |const| :ref:`πŸ”—` -Returns a new vector with each component set to ``1.0`` if it's positive, ``-1.0`` if it's negative, and ``0.0`` if it's zero. The result is identical to calling :ref:`@GlobalScope.sign` on each component. +Returns a new vector with each component set to ``1.0`` if it's positive, ``-1.0`` if it's negative, and ``0.0`` if it's zero. The result is identical to calling :ref:`@GlobalScope.sign()` on each component. .. rst-class:: classref-item-separator @@ -1061,7 +1061,7 @@ Returns the signed angle to the given vector, in radians. The sign of the angle Returns the result of spherical linear interpolation between this vector and ``to``, by amount ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. -This method also handles interpolating the lengths if the input vectors have different lengths. For the special case of one or both input vectors having zero length, this method behaves like :ref:`lerp`. +This method also handles interpolating the lengths if the input vectors have different lengths. For the special case of one or both input vectors having zero length, this method behaves like :ref:`lerp()`. .. rst-class:: classref-item-separator @@ -1073,9 +1073,9 @@ This method also handles interpolating the lengths if the input vectors have dif :ref:`Vector3` **slide**\ (\ n\: :ref:`Vector3`\ ) |const| :ref:`πŸ”—` -Returns a new vector resulting from sliding this vector along a plane with normal ``n``. The resulting new vector is perpendicular to ``n``, and is equivalent to this vector minus its projection on ``n``. See also :ref:`project`. +Returns a new vector resulting from sliding this vector along a plane with normal ``n``. The resulting new vector is perpendicular to ``n``, and is equivalent to this vector minus its projection on ``n``. See also :ref:`project()`. -\ **Note:** The vector ``n`` must be normalized. See also :ref:`normalized`. +\ **Note:** The vector ``n`` must be normalized. See also :ref:`normalized()`. .. rst-class:: classref-item-separator @@ -1118,7 +1118,7 @@ Operator Descriptions Returns ``true`` if the vectors are not equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. \ **Note:** Vectors with :ref:`@GDScript.NAN` elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included. @@ -1134,9 +1134,9 @@ Returns ``true`` if the vectors are not equal. Inversely transforms (multiplies) the **Vector3** by the given :ref:`Basis` matrix, under the assumption that the basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). -\ ``vector * basis`` is equivalent to ``basis.transposed() * vector``. See :ref:`Basis.transposed`. +\ ``vector * basis`` is equivalent to ``basis.transposed() * vector``. See :ref:`Basis.transposed()`. -For transforming by inverse of a non-orthonormal basis (e.g. with scaling) ``basis.inverse() * vector`` can be used instead. See :ref:`Basis.inverse`. +For transforming by inverse of a non-orthonormal basis (e.g. with scaling) ``basis.inverse() * vector`` can be used instead. See :ref:`Basis.inverse()`. .. rst-class:: classref-item-separator @@ -1150,7 +1150,7 @@ For transforming by inverse of a non-orthonormal basis (e.g. with scaling) ``bas Inversely transforms (multiplies) the **Vector3** by the given :ref:`Quaternion`. -\ ``vector * quaternion`` is equivalent to ``quaternion.inverse() * vector``. See :ref:`Quaternion.inverse`. +\ ``vector * quaternion`` is equivalent to ``quaternion.inverse() * vector``. See :ref:`Quaternion.inverse()`. .. rst-class:: classref-item-separator @@ -1164,9 +1164,9 @@ Inversely transforms (multiplies) the **Vector3** by the given :ref:`Quaternion< Inversely transforms (multiplies) the **Vector3** by the given :ref:`Transform3D` transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). -\ ``vector * transform`` is equivalent to ``transform.inverse() * vector``. See :ref:`Transform3D.inverse`. +\ ``vector * transform`` is equivalent to ``transform.inverse() * vector``. See :ref:`Transform3D.inverse()`. -For transforming by inverse of an affine transformation (e.g. with scaling) ``transform.affine_inverse() * vector`` can be used instead. See :ref:`Transform3D.affine_inverse`. +For transforming by inverse of an affine transformation (e.g. with scaling) ``transform.affine_inverse() * vector`` can be used instead. See :ref:`Transform3D.affine_inverse()`. .. rst-class:: classref-item-separator @@ -1320,7 +1320,7 @@ Compares two **Vector3** vectors by first checking if the X value of the left ve Returns ``true`` if the vectors are exactly equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. \ **Note:** Vectors with :ref:`@GDScript.NAN` elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included. diff --git a/classes/class_vector3i.rst b/classes/class_vector3i.rst index a836db56c..1b52a0d2e 100644 --- a/classes/class_vector3i.rst +++ b/classes/class_vector3i.rst @@ -179,7 +179,7 @@ enum **Axis**: :ref:`πŸ”—` :ref:`Axis` **AXIS_X** = ``0`` -Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +Enumerated value for the X axis. Returned by :ref:`max_axis_index()` and :ref:`min_axis_index()`. .. _class_Vector3i_constant_AXIS_Y: @@ -187,7 +187,7 @@ Enumerated value for the X axis. Returned by :ref:`max_axis_index` **AXIS_Y** = ``1`` -Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +Enumerated value for the Y axis. Returned by :ref:`max_axis_index()` and :ref:`min_axis_index()`. .. _class_Vector3i_constant_AXIS_Z: @@ -195,7 +195,7 @@ Enumerated value for the Y axis. Returned by :ref:`max_axis_index` **AXIS_Z** = ``2`` -Enumerated value for the Z axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +Enumerated value for the Z axis. Returned by :ref:`max_axis_index()` and :ref:`min_axis_index()`. .. rst-class:: classref-section-separator @@ -362,7 +362,7 @@ Constructs a **Vector3i** as a copy of the given **Vector3i**. :ref:`Vector3i` **Vector3i**\ (\ from\: :ref:`Vector3`\ ) -Constructs a new **Vector3i** from the given :ref:`Vector3` by truncating components' fractional parts (rounding towards zero). For a different behavior consider passing the result of :ref:`Vector3.ceil`, :ref:`Vector3.floor` or :ref:`Vector3.round` to this constructor instead. +Constructs a new **Vector3i** from the given :ref:`Vector3` by truncating components' fractional parts (rounding towards zero). For a different behavior consider passing the result of :ref:`Vector3.ceil()`, :ref:`Vector3.floor()` or :ref:`Vector3.round()` to this constructor instead. .. rst-class:: classref-item-separator @@ -401,7 +401,7 @@ Returns a new vector with all components in absolute values (i.e. positive). :ref:`Vector3i` **clamp**\ (\ min\: :ref:`Vector3i`, max\: :ref:`Vector3i`\ ) |const| :ref:`πŸ”—` -Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp` on each component. +Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp()` on each component. .. rst-class:: classref-item-separator @@ -413,7 +413,7 @@ Returns a new vector with all components clamped between the components of ``min :ref:`Vector3i` **clampi**\ (\ min\: :ref:`int`, max\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns a new vector with all components clamped between ``min`` and ``max``, by running :ref:`@GlobalScope.clamp` on each component. +Returns a new vector with all components clamped between ``min`` and ``max``, by running :ref:`@GlobalScope.clamp()` on each component. .. rst-class:: classref-item-separator @@ -427,7 +427,7 @@ Returns a new vector with all components clamped between ``min`` and ``max``, by Returns the squared distance between this vector and ``to``. -This method runs faster than :ref:`distance_to`, so prefer it if you need to compare vectors or need the squared distance for some formula. +This method runs faster than :ref:`distance_to()`, so prefer it if you need to compare vectors or need the squared distance for some formula. .. rst-class:: classref-item-separator @@ -465,7 +465,7 @@ Returns the length (magnitude) of this vector. Returns the squared length (squared magnitude) of this vector. -This method runs faster than :ref:`length`, so prefer it if you need to compare vectors or need the squared distance for some formula. +This method runs faster than :ref:`length()`, so prefer it if you need to compare vectors or need the squared distance for some formula. .. rst-class:: classref-item-separator @@ -549,7 +549,7 @@ Returns the component-wise minimum of this and ``with``, equivalent to ``Vector3 :ref:`Vector3i` **sign**\ (\ ) |const| :ref:`πŸ”—` -Returns a new vector with each component set to ``1`` if it's positive, ``-1`` if it's negative, and ``0`` if it's zero. The result is identical to calling :ref:`@GlobalScope.sign` on each component. +Returns a new vector with each component set to ``1`` if it's positive, ``-1`` if it's negative, and ``0`` if it's zero. The result is identical to calling :ref:`@GlobalScope.sign()` on each component. .. rst-class:: classref-item-separator @@ -602,7 +602,7 @@ Returns ``true`` if the vectors are not equal. :ref:`Vector3i` **operator %**\ (\ right\: :ref:`Vector3i`\ ) :ref:`πŸ”—` -Gets the remainder of each component of the **Vector3i** with the components of the given **Vector3i**. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod` instead if you want to handle negative numbers. +Gets the remainder of each component of the **Vector3i** with the components of the given **Vector3i**. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod()` instead if you want to handle negative numbers. :: @@ -618,7 +618,7 @@ Gets the remainder of each component of the **Vector3i** with the components of :ref:`Vector3i` **operator %**\ (\ right\: :ref:`int`\ ) :ref:`πŸ”—` -Gets the remainder of each component of the **Vector3i** with the given :ref:`int`. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod` instead if you want to handle negative numbers. +Gets the remainder of each component of the **Vector3i** with the given :ref:`int`. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod()` instead if you want to handle negative numbers. :: diff --git a/classes/class_vector4.rst b/classes/class_vector4.rst index a17a8388b..0af493ae9 100644 --- a/classes/class_vector4.rst +++ b/classes/class_vector4.rst @@ -202,7 +202,7 @@ enum **Axis**: :ref:`πŸ”—` :ref:`Axis` **AXIS_X** = ``0`` -Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +Enumerated value for the X axis. Returned by :ref:`max_axis_index()` and :ref:`min_axis_index()`. .. _class_Vector4_constant_AXIS_Y: @@ -210,7 +210,7 @@ Enumerated value for the X axis. Returned by :ref:`max_axis_index` **AXIS_Y** = ``1`` -Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +Enumerated value for the Y axis. Returned by :ref:`max_axis_index()` and :ref:`min_axis_index()`. .. _class_Vector4_constant_AXIS_Z: @@ -218,7 +218,7 @@ Enumerated value for the Y axis. Returned by :ref:`max_axis_index` **AXIS_Z** = ``2`` -Enumerated value for the Z axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +Enumerated value for the Z axis. Returned by :ref:`max_axis_index()` and :ref:`min_axis_index()`. .. _class_Vector4_constant_AXIS_W: @@ -226,7 +226,7 @@ Enumerated value for the Z axis. Returned by :ref:`max_axis_index` **AXIS_W** = ``3`` -Enumerated value for the W axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +Enumerated value for the W axis. Returned by :ref:`max_axis_index()` and :ref:`min_axis_index()`. .. rst-class:: classref-section-separator @@ -400,7 +400,7 @@ Returns a new vector with all components rounded up (towards positive infinity). :ref:`Vector4` **clamp**\ (\ min\: :ref:`Vector4`, max\: :ref:`Vector4`\ ) |const| :ref:`πŸ”—` -Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp` on each component. +Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp()` on each component. .. rst-class:: classref-item-separator @@ -412,7 +412,7 @@ Returns a new vector with all components clamped between the components of ``min :ref:`Vector4` **clampf**\ (\ min\: :ref:`float`, max\: :ref:`float`\ ) |const| :ref:`πŸ”—` -Returns a new vector with all components clamped between ``min`` and ``max``, by running :ref:`@GlobalScope.clamp` on each component. +Returns a new vector with all components clamped between ``min`` and ``max``, by running :ref:`@GlobalScope.clamp()` on each component. .. rst-class:: classref-item-separator @@ -438,7 +438,7 @@ Performs a cubic interpolation between this vector and ``b`` using ``pre_a`` and Performs a cubic interpolation between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. -It can perform smoother interpolation than :ref:`cubic_interpolate` by the time values. +It can perform smoother interpolation than :ref:`cubic_interpolate()` by the time values. .. rst-class:: classref-item-separator @@ -464,7 +464,7 @@ Returns the normalized vector pointing from this vector to ``to``. This is equiv Returns the squared distance between this vector and ``to``. -This method runs faster than :ref:`distance_to`, so prefer it if you need to compare vectors or need the squared distance for some formula. +This method runs faster than :ref:`distance_to()`, so prefer it if you need to compare vectors or need the squared distance for some formula. .. rst-class:: classref-item-separator @@ -524,7 +524,7 @@ Returns the inverse of the vector. This is the same as ``Vector4(1.0 / v.x, 1.0 :ref:`bool` **is_equal_approx**\ (\ to\: :ref:`Vector4`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this vector and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. +Returns ``true`` if this vector and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx()` on each component. .. rst-class:: classref-item-separator @@ -536,7 +536,7 @@ Returns ``true`` if this vector and ``to`` are approximately equal, by running : :ref:`bool` **is_finite**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this vector is finite, by calling :ref:`@GlobalScope.is_finite` on each component. +Returns ``true`` if this vector is finite, by calling :ref:`@GlobalScope.is_finite()` on each component. .. rst-class:: classref-item-separator @@ -560,9 +560,9 @@ Returns ``true`` if the vector is normalized, i.e. its length is approximately e :ref:`bool` **is_zero_approx**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this vector's values are approximately zero, by running :ref:`@GlobalScope.is_zero_approx` on each component. +Returns ``true`` if this vector's values are approximately zero, by running :ref:`@GlobalScope.is_zero_approx()` on each component. -This method is faster than using :ref:`is_equal_approx` with one value as a zero vector. +This method is faster than using :ref:`is_equal_approx()` with one value as a zero vector. .. rst-class:: classref-item-separator @@ -588,7 +588,7 @@ Returns the length (magnitude) of this vector. Returns the squared length (squared magnitude) of this vector. -This method runs faster than :ref:`length`, so prefer it if you need to compare vectors or need the squared distance for some formula. +This method runs faster than :ref:`length()`, so prefer it if you need to compare vectors or need the squared distance for some formula. .. rst-class:: classref-item-separator @@ -684,7 +684,7 @@ Returns the component-wise minimum of this and ``with``, equivalent to ``Vector4 :ref:`Vector4` **normalized**\ (\ ) |const| :ref:`πŸ”—` -Returns the result of scaling the vector to unit length. Equivalent to ``v / v.length()``. Returns ``(0, 0, 0, 0)`` if ``v.length() == 0``. See also :ref:`is_normalized`. +Returns the result of scaling the vector to unit length. Equivalent to ``v / v.length()``. Returns ``(0, 0, 0, 0)`` if ``v.length() == 0``. See also :ref:`is_normalized()`. \ **Note:** This function may return incorrect values if the input vector length is near zero. @@ -698,7 +698,7 @@ Returns the result of scaling the vector to unit length. Equivalent to ``v / v.l :ref:`Vector4` **posmod**\ (\ mod\: :ref:`float`\ ) |const| :ref:`πŸ”—` -Returns a vector composed of the :ref:`@GlobalScope.fposmod` of this vector's components and ``mod``. +Returns a vector composed of the :ref:`@GlobalScope.fposmod()` of this vector's components and ``mod``. .. rst-class:: classref-item-separator @@ -710,7 +710,7 @@ Returns a vector composed of the :ref:`@GlobalScope.fposmod` **posmodv**\ (\ modv\: :ref:`Vector4`\ ) |const| :ref:`πŸ”—` -Returns a vector composed of the :ref:`@GlobalScope.fposmod` of this vector's components and ``modv``'s components. +Returns a vector composed of the :ref:`@GlobalScope.fposmod()` of this vector's components and ``modv``'s components. .. rst-class:: classref-item-separator @@ -734,7 +734,7 @@ Returns a new vector with all components rounded to the nearest integer, with ha :ref:`Vector4` **sign**\ (\ ) |const| :ref:`πŸ”—` -Returns a new vector with each component set to ``1.0`` if it's positive, ``-1.0`` if it's negative, and ``0.0`` if it's zero. The result is identical to calling :ref:`@GlobalScope.sign` on each component. +Returns a new vector with each component set to ``1.0`` if it's positive, ``-1.0`` if it's negative, and ``0.0`` if it's zero. The result is identical to calling :ref:`@GlobalScope.sign()` on each component. .. rst-class:: classref-item-separator @@ -777,7 +777,7 @@ Operator Descriptions Returns ``true`` if the vectors are not equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. \ **Note:** Vectors with :ref:`@GDScript.NAN` elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included. @@ -793,7 +793,7 @@ Returns ``true`` if the vectors are not equal. Transforms (multiplies) the **Vector4** by the transpose of the given :ref:`Projection` matrix. -For transforming by inverse of a projection ``projection.inverse() * vector`` can be used instead. See :ref:`Projection.inverse`. +For transforming by inverse of a projection ``projection.inverse() * vector`` can be used instead. See :ref:`Projection.inverse()`. .. rst-class:: classref-item-separator @@ -955,7 +955,7 @@ Compares two **Vector4** vectors by first checking if the X value of the left ve Returns ``true`` if the vectors are exactly equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. \ **Note:** Vectors with :ref:`@GDScript.NAN` elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included. diff --git a/classes/class_vector4i.rst b/classes/class_vector4i.rst index 0ee7d81d7..d6adffd25 100644 --- a/classes/class_vector4i.rst +++ b/classes/class_vector4i.rst @@ -170,7 +170,7 @@ enum **Axis**: :ref:`πŸ”—` :ref:`Axis` **AXIS_X** = ``0`` -Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +Enumerated value for the X axis. Returned by :ref:`max_axis_index()` and :ref:`min_axis_index()`. .. _class_Vector4i_constant_AXIS_Y: @@ -178,7 +178,7 @@ Enumerated value for the X axis. Returned by :ref:`max_axis_index` **AXIS_Y** = ``1`` -Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +Enumerated value for the Y axis. Returned by :ref:`max_axis_index()` and :ref:`min_axis_index()`. .. _class_Vector4i_constant_AXIS_Z: @@ -186,7 +186,7 @@ Enumerated value for the Y axis. Returned by :ref:`max_axis_index` **AXIS_Z** = ``2`` -Enumerated value for the Z axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +Enumerated value for the Z axis. Returned by :ref:`max_axis_index()` and :ref:`min_axis_index()`. .. _class_Vector4i_constant_AXIS_W: @@ -194,7 +194,7 @@ Enumerated value for the Z axis. Returned by :ref:`max_axis_index` **AXIS_W** = ``3`` -Enumerated value for the W axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +Enumerated value for the W axis. Returned by :ref:`max_axis_index()` and :ref:`min_axis_index()`. .. rst-class:: classref-section-separator @@ -325,7 +325,7 @@ Constructs a **Vector4i** as a copy of the given **Vector4i**. :ref:`Vector4i` **Vector4i**\ (\ from\: :ref:`Vector4`\ ) -Constructs a new **Vector4i** from the given :ref:`Vector4` by truncating components' fractional parts (rounding towards zero). For a different behavior consider passing the result of :ref:`Vector4.ceil`, :ref:`Vector4.floor` or :ref:`Vector4.round` to this constructor instead. +Constructs a new **Vector4i** from the given :ref:`Vector4` by truncating components' fractional parts (rounding towards zero). For a different behavior consider passing the result of :ref:`Vector4.ceil()`, :ref:`Vector4.floor()` or :ref:`Vector4.round()` to this constructor instead. .. rst-class:: classref-item-separator @@ -364,7 +364,7 @@ Returns a new vector with all components in absolute values (i.e. positive). :ref:`Vector4i` **clamp**\ (\ min\: :ref:`Vector4i`, max\: :ref:`Vector4i`\ ) |const| :ref:`πŸ”—` -Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp` on each component. +Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp()` on each component. .. rst-class:: classref-item-separator @@ -376,7 +376,7 @@ Returns a new vector with all components clamped between the components of ``min :ref:`Vector4i` **clampi**\ (\ min\: :ref:`int`, max\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns a new vector with all components clamped between ``min`` and ``max``, by running :ref:`@GlobalScope.clamp` on each component. +Returns a new vector with all components clamped between ``min`` and ``max``, by running :ref:`@GlobalScope.clamp()` on each component. .. rst-class:: classref-item-separator @@ -390,7 +390,7 @@ Returns a new vector with all components clamped between ``min`` and ``max``, by Returns the squared distance between this vector and ``to``. -This method runs faster than :ref:`distance_to`, so prefer it if you need to compare vectors or need the squared distance for some formula. +This method runs faster than :ref:`distance_to()`, so prefer it if you need to compare vectors or need the squared distance for some formula. .. rst-class:: classref-item-separator @@ -428,7 +428,7 @@ Returns the length (magnitude) of this vector. Returns the squared length (squared magnitude) of this vector. -This method runs faster than :ref:`length`, so prefer it if you need to compare vectors or need the squared distance for some formula. +This method runs faster than :ref:`length()`, so prefer it if you need to compare vectors or need the squared distance for some formula. .. rst-class:: classref-item-separator @@ -512,7 +512,7 @@ Returns the component-wise minimum of this and ``with``, equivalent to ``Vector4 :ref:`Vector4i` **sign**\ (\ ) |const| :ref:`πŸ”—` -Returns a new vector with each component set to ``1`` if it's positive, ``-1`` if it's negative, and ``0`` if it's zero. The result is identical to calling :ref:`@GlobalScope.sign` on each component. +Returns a new vector with each component set to ``1`` if it's positive, ``-1`` if it's negative, and ``0`` if it's zero. The result is identical to calling :ref:`@GlobalScope.sign()` on each component. .. rst-class:: classref-item-separator @@ -565,7 +565,7 @@ Returns ``true`` if the vectors are not equal. :ref:`Vector4i` **operator %**\ (\ right\: :ref:`Vector4i`\ ) :ref:`πŸ”—` -Gets the remainder of each component of the **Vector4i** with the components of the given **Vector4i**. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod` instead if you want to handle negative numbers. +Gets the remainder of each component of the **Vector4i** with the components of the given **Vector4i**. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod()` instead if you want to handle negative numbers. :: @@ -581,7 +581,7 @@ Gets the remainder of each component of the **Vector4i** with the components of :ref:`Vector4i` **operator %**\ (\ right\: :ref:`int`\ ) :ref:`πŸ”—` -Gets the remainder of each component of the **Vector4i** with the given :ref:`int`. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod` instead if you want to handle negative numbers. +Gets the remainder of each component of the **Vector4i** with the given :ref:`int`. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod()` instead if you want to handle negative numbers. :: diff --git a/classes/class_videostreamplayback.rst b/classes/class_videostreamplayback.rst index bc719c5dc..bcf64c568 100644 --- a/classes/class_videostreamplayback.rst +++ b/classes/class_videostreamplayback.rst @@ -134,7 +134,7 @@ Allocates a :ref:`Texture2D` in which decoded video frames will :ref:`bool` **_is_paused**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Returns the paused status, as set by :ref:`_set_paused`. +Returns the paused status, as set by :ref:`_set_paused()`. .. rst-class:: classref-item-separator @@ -146,7 +146,7 @@ Returns the paused status, as set by :ref:`_set_paused` **_is_playing**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Returns the playback state, as determined by calls to :ref:`_play` and :ref:`_stop`. +Returns the playback state, as determined by calls to :ref:`_play()` and :ref:`_stop()`. .. rst-class:: classref-item-separator @@ -158,7 +158,7 @@ Returns the playback state, as determined by calls to :ref:`_play` -Called in response to :ref:`VideoStreamPlayer.autoplay` or :ref:`VideoStreamPlayer.play`. Note that manual playback may also invoke :ref:`_stop` multiple times before this method is called. :ref:`_is_playing` should return ``true`` once playing. +Called in response to :ref:`VideoStreamPlayer.autoplay` or :ref:`VideoStreamPlayer.play()`. Note that manual playback may also invoke :ref:`_stop()` multiple times before this method is called. :ref:`_is_playing()` should return ``true`` once playing. .. rst-class:: classref-item-separator @@ -194,7 +194,7 @@ Select the audio track ``idx``. Called when playback starts, and in response to |void| **_set_paused**\ (\ paused\: :ref:`bool`\ ) |virtual| :ref:`πŸ”—` -Set the paused status of video playback. :ref:`_is_paused` must return ``paused``. Called in response to the :ref:`VideoStreamPlayer.paused` setter. +Set the paused status of video playback. :ref:`_is_paused()` must return ``paused``. Called in response to the :ref:`VideoStreamPlayer.paused` setter. .. rst-class:: classref-item-separator @@ -206,7 +206,7 @@ Set the paused status of video playback. :ref:`_is_paused` -Stops playback. May be called multiple times before :ref:`_play`, or in response to :ref:`VideoStreamPlayer.stop`. :ref:`_is_playing` should return ``false`` once stopped. +Stops playback. May be called multiple times before :ref:`_play()`, or in response to :ref:`VideoStreamPlayer.stop()`. :ref:`_is_playing()` should return ``false`` once stopped. .. rst-class:: classref-item-separator @@ -218,7 +218,7 @@ Stops playback. May be called multiple times before :ref:`_play`\ ) |virtual| :ref:`πŸ”—` -Ticks video playback for ``delta`` seconds. Called every frame as long as both :ref:`_is_paused` and :ref:`_is_playing` return ``true``. +Ticks video playback for ``delta`` seconds. Called every frame as long as both :ref:`_is_paused()` and :ref:`_is_playing()` return ``true``. .. rst-class:: classref-item-separator @@ -230,7 +230,7 @@ Ticks video playback for ``delta`` seconds. Called every frame as long as both : :ref:`int` **mix_audio**\ (\ num_frames\: :ref:`int`, buffer\: :ref:`PackedFloat32Array` = PackedFloat32Array(), offset\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Render ``num_frames`` audio frames (of :ref:`_get_channels` floats each) from ``buffer``, starting from index ``offset`` in the array. Returns the number of audio frames rendered, or -1 on error. +Render ``num_frames`` audio frames (of :ref:`_get_channels()` floats each) from ``buffer``, starting from index ``offset`` in the array. Returns the number of audio frames rendered, or -1 on error. .. |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_viewport.rst b/classes/class_viewport.rst index cc2a3621a..27081e5bc 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -406,7 +406,7 @@ More information: `MetalFX `_ Use the `MetalFX temporal upscaler `__ for the viewport's 3D buffer. -The amount of scaling can be set using :ref:`scaling_3d_scale`. To determine the minimum input scale, use the :ref:`RenderingDevice.limit_get` method with :ref:`RenderingDevice.LIMIT_METALFX_TEMPORAL_SCALER_MIN_SCALE`. +The amount of scaling can be set using :ref:`scaling_3d_scale`. To determine the minimum input scale, use the :ref:`RenderingDevice.limit_get()` method with :ref:`RenderingDevice.LIMIT_METALFX_TEMPORAL_SCALER_MIN_SCALE`. Values less than ``1.0`` will be result in the viewport being upscaled using MetalFX. Values greater than ``1.0`` are not supported and bilinear downsampling will be used instead. A value of ``1.0`` will use MetalFX at native resolution as a TAA solution. @@ -698,7 +698,7 @@ Objects are displayed semi-transparent with additive blending so you can see whe Objects are displayed as wireframe models. -\ **Note:** :ref:`RenderingServer.set_debug_generate_wireframes` must be called before loading any meshes for wireframes to be visible when using the Compatibility renderer. +\ **Note:** :ref:`RenderingServer.set_debug_generate_wireframes()` must be called before loading any meshes for wireframes to be visible when using the Compatibility renderer. .. _class_Viewport_constant_DEBUG_DRAW_NORMAL_BUFFER: @@ -1422,7 +1422,7 @@ If ``true``, this viewport will mark incoming input events as handled by itself. A :ref:`SubViewportContainer` will automatically set this property to ``false`` for the **Viewport** contained inside of it. -See also :ref:`set_input_as_handled` and :ref:`is_input_handled`. +See also :ref:`set_input_as_handled()` and :ref:`is_input_handled()`. .. rst-class:: classref-item-separator @@ -1462,7 +1462,7 @@ To control this property on the root viewport, set the :ref:`ProjectSettings.ren The multisample antialiasing mode for 2D/Canvas rendering. A higher number results in smoother edges at the cost of significantly worse performance. A value of :ref:`MSAA_2X` or :ref:`MSAA_4X` is best unless targeting very high-end systems. This has no effect on shader-induced aliasing or texture aliasing. -See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/msaa_2d` and :ref:`RenderingServer.viewport_set_msaa_2d`. +See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/msaa_2d` and :ref:`RenderingServer.viewport_set_msaa_2d()`. .. rst-class:: classref-item-separator @@ -1481,7 +1481,7 @@ See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/msaa_2d` or :ref:`MSAA_4X` is best unless targeting very high-end systems. See also bilinear scaling 3D :ref:`scaling_3d_mode` for supersampling, which provides higher quality but is much more expensive. This has no effect on shader-induced aliasing or texture aliasing. -See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/msaa_3d` and :ref:`RenderingServer.viewport_set_msaa_3d`. +See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/msaa_3d` and :ref:`RenderingServer.viewport_set_msaa_3d()`. .. rst-class:: classref-item-separator @@ -1722,7 +1722,7 @@ To control this property on the root viewport, set the :ref:`ProjectSettings.ren Sets the screen-space antialiasing method used. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry. -See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa` and :ref:`RenderingServer.viewport_set_screen_space_aa`. +See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa` and :ref:`RenderingServer.viewport_set_screen_space_aa()`. .. rst-class:: classref-item-separator @@ -1853,7 +1853,7 @@ If ``true``, uses a fast post-processing filter to make banding significantly le In some cases, debanding may introduce a slightly noticeable dithering pattern. It's recommended to enable debanding only when actually needed since the dithering pattern will make lossless-compressed screenshots larger. -See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/use_debanding` and :ref:`RenderingServer.viewport_set_use_debanding`. +See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/use_debanding` and :ref:`RenderingServer.viewport_set_use_debanding()`. .. rst-class:: classref-item-separator @@ -1914,7 +1914,7 @@ Enables temporal antialiasing for this viewport. TAA works by jittering the came \ **Note:** The implementation is not complete yet, some visual instances such as particles and skinned meshes may show artifacts. -See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/use_taa` and :ref:`RenderingServer.viewport_set_use_taa`. +See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/use_taa` and :ref:`RenderingServer.viewport_set_use_taa()`. .. rst-class:: classref-item-separator @@ -2206,7 +2206,7 @@ Returns the transform from the Viewport's coordinates to the screen coordinates :ref:`Transform2D` **get_stretch_transform**\ (\ ) |const| :ref:`πŸ”—` -Returns the automatically computed 2D stretch transform, taking the **Viewport**'s stretch settings into account. The final value is multiplied by :ref:`Window.content_scale_factor`, but only for the root viewport. If this method is called on a :ref:`SubViewport` (e.g., in a scene tree with :ref:`SubViewportContainer` and :ref:`SubViewport`), the scale factor of the root window will not be applied. Using :ref:`Transform2D.get_scale` on the returned value, this can be used to compensate for scaling when zooming a :ref:`Camera2D` node, or to scale down a :ref:`TextureRect` to be pixel-perfect regardless of the automatically computed scale factor. +Returns the automatically computed 2D stretch transform, taking the **Viewport**'s stretch settings into account. The final value is multiplied by :ref:`Window.content_scale_factor`, but only for the root viewport. If this method is called on a :ref:`SubViewport` (e.g., in a scene tree with :ref:`SubViewportContainer` and :ref:`SubViewport`), the scale factor of the root window will not be applied. Using :ref:`Transform2D.get_scale()` on the returned value, this can be used to compensate for scaling when zooming a :ref:`Camera2D` node, or to scale down a :ref:`TextureRect` to be pixel-perfect regardless of the automatically computed scale factor. \ **Note:** Due to how pixel scaling works, the returned transform's X and Y scale may differ slightly, even when :ref:`Window.content_scale_aspect` is set to a mode that preserves the pixels' aspect ratio. If :ref:`Window.content_scale_aspect` is :ref:`Window.CONTENT_SCALE_ASPECT_IGNORE`, the X and Y scale may differ *significantly*. @@ -2222,7 +2222,7 @@ Returns the automatically computed 2D stretch transform, taking the **Viewport** Returns the viewport's texture. -\ **Note:** When trying to store the current texture (e.g. in a file), it might be completely black or outdated if used too early, especially when used in e.g. :ref:`Node._ready`. To make sure the texture you get is correct, you can await :ref:`RenderingServer.frame_post_draw` signal. +\ **Note:** When trying to store the current texture (e.g. in a file), it might be completely black or outdated if used too early, especially when used in e.g. :ref:`Node._ready()`. To make sure the texture you get is correct, you can await :ref:`RenderingServer.frame_post_draw` signal. :: @@ -2266,7 +2266,7 @@ Returns the visible rectangle in global screen coordinates. |void| **gui_cancel_drag**\ (\ ) :ref:`πŸ”—` -Cancels the drag operation that was previously started through :ref:`Control._get_drag_data` or forced with :ref:`Control.force_drag`. +Cancels the drag operation that was previously started through :ref:`Control._get_drag_data()` or forced with :ref:`Control.force_drag()`. .. rst-class:: classref-item-separator @@ -2278,7 +2278,7 @@ Cancels the drag operation that was previously started through :ref:`Control._ge :ref:`Variant` **gui_get_drag_data**\ (\ ) |const| :ref:`πŸ”—` -Returns the drag data from the GUI, that was previously returned by :ref:`Control._get_drag_data`. +Returns the drag data from the GUI, that was previously returned by :ref:`Control._get_drag_data()`. .. rst-class:: classref-item-separator @@ -2304,7 +2304,7 @@ Returns the currently focused :ref:`Control` within this viewport Returns the :ref:`Control` that the mouse is currently hovering over in this viewport. If no :ref:`Control` has the cursor, returns ``null``. -Typically the leaf :ref:`Control` node or deepest level of the subtree which claims hover. This is very useful when used together with :ref:`Node.is_ancestor_of` to find if the mouse is within a control tree. +Typically the leaf :ref:`Control` node or deepest level of the subtree which claims hover. This is very useful when used together with :ref:`Node.is_ancestor_of()` to find if the mouse is within a control tree. .. rst-class:: classref-item-separator @@ -2354,11 +2354,11 @@ Removes the focus from the currently focused :ref:`Control` withi :ref:`bool` **is_input_handled**\ (\ ) |const| :ref:`πŸ”—` -Returns whether the current :ref:`InputEvent` has been handled. Input events are not handled until :ref:`set_input_as_handled` has been called during the lifetime of an :ref:`InputEvent`. +Returns whether the current :ref:`InputEvent` has been handled. Input events are not handled until :ref:`set_input_as_handled()` has been called during the lifetime of an :ref:`InputEvent`. -This is usually done as part of input handling methods like :ref:`Node._input`, :ref:`Control._gui_input` or others, as well as in corresponding signal handlers. +This is usually done as part of input handling methods like :ref:`Node._input()`, :ref:`Control._gui_input()` or others, as well as in corresponding signal handlers. -If :ref:`handle_input_locally` is set to ``false``, this method will try finding the first parent viewport that is set to handle input locally, and return its value for :ref:`is_input_handled` instead. +If :ref:`handle_input_locally` is set to ``false``, this method will try finding the first parent viewport that is set to handle input locally, and return its value for :ref:`is_input_handled()` instead. .. rst-class:: classref-item-separator @@ -2370,7 +2370,7 @@ If :ref:`handle_input_locally` is |void| **notify_mouse_entered**\ (\ ) :ref:`πŸ”—` -Inform the Viewport that the mouse has entered its area. Use this function before sending an :ref:`InputEventMouseButton` or :ref:`InputEventMouseMotion` to the **Viewport** with :ref:`push_input`. See also :ref:`notify_mouse_exited`. +Inform the Viewport that the mouse has entered its area. Use this function before sending an :ref:`InputEventMouseButton` or :ref:`InputEventMouseMotion` to the **Viewport** with :ref:`push_input()`. See also :ref:`notify_mouse_exited()`. \ **Note:** In most cases, it is not necessary to call this function because :ref:`SubViewport` nodes that are children of :ref:`SubViewportContainer` are notified automatically. This is only necessary when interacting with viewports in non-default ways, for example as textures in :ref:`TextureRect` or with an :ref:`Area3D` that forwards input events. @@ -2384,7 +2384,7 @@ Inform the Viewport that the mouse has entered its area. Use this function befor |void| **notify_mouse_exited**\ (\ ) :ref:`πŸ”—` -Inform the Viewport that the mouse has left its area. Use this function when the node that displays the viewport notices the mouse has left the area of the displayed viewport. See also :ref:`notify_mouse_entered`. +Inform the Viewport that the mouse has left its area. Use this function when the node that displays the viewport notices the mouse has left the area of the displayed viewport. See also :ref:`notify_mouse_entered()`. \ **Note:** In most cases, it is not necessary to call this function because :ref:`SubViewport` nodes that are children of :ref:`SubViewportContainer` are notified automatically. This is only necessary when interacting with viewports in non-default ways, for example as textures in :ref:`TextureRect` or with an :ref:`Area3D` that forwards input events. @@ -2402,21 +2402,21 @@ Triggers the given ``event`` in this **Viewport**. This can be used to pass an : If ``in_local_coords`` is ``false``, the event's position is in the embedder's coordinates and will be converted to viewport coordinates. If ``in_local_coords`` is ``true``, the event's position is in viewport coordinates. -While this method serves a similar purpose as :ref:`Input.parse_input_event`, it does not remap the specified ``event`` based on project settings like :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse`. +While this method serves a similar purpose as :ref:`Input.parse_input_event()`, it does not remap the specified ``event`` based on project settings like :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse`. Calling this method will propagate calls to child nodes for following methods in the given order: -- :ref:`Node._input`\ +- :ref:`Node._input()`\ -- :ref:`Control._gui_input` for :ref:`Control` nodes +- :ref:`Control._gui_input()` for :ref:`Control` nodes -- :ref:`Node._shortcut_input`\ +- :ref:`Node._shortcut_input()`\ -- :ref:`Node._unhandled_key_input`\ +- :ref:`Node._unhandled_key_input()`\ -- :ref:`Node._unhandled_input`\ +- :ref:`Node._unhandled_input()`\ -If an earlier method marks the input as handled via :ref:`set_input_as_handled`, any later method in this list will not be called. +If an earlier method marks the input as handled via :ref:`set_input_as_handled()`, any later method in this list will not be called. If none of the methods handle the event and :ref:`physics_object_picking` is ``true``, the event is used for physics object picking. @@ -2442,7 +2442,7 @@ Helper method which calls the ``set_text()`` method on the currently focused :re |void| **push_unhandled_input**\ (\ event\: :ref:`InputEvent`, in_local_coords\: :ref:`bool` = false\ ) :ref:`πŸ”—` -**Deprecated:** Use :ref:`push_input` instead. +**Deprecated:** Use :ref:`push_input()` instead. Triggers the given ``event`` in this **Viewport**. This can be used to pass an :ref:`InputEvent` between viewports, or to locally apply inputs that were sent over the network or saved to a file. @@ -2450,13 +2450,13 @@ If ``in_local_coords`` is ``false``, the event's position is in the embedder's c Calling this method will propagate calls to child nodes for following methods in the given order: -- :ref:`Node._shortcut_input`\ +- :ref:`Node._shortcut_input()`\ -- :ref:`Node._unhandled_key_input`\ +- :ref:`Node._unhandled_key_input()`\ -- :ref:`Node._unhandled_input`\ +- :ref:`Node._unhandled_input()`\ -If an earlier method marks the input as handled via :ref:`set_input_as_handled`, any later method in this list will not be called. +If an earlier method marks the input as handled via :ref:`set_input_as_handled()`, any later method in this list will not be called. If none of the methods handle the event and :ref:`physics_object_picking` is ``true``, the event is used for physics object picking. @@ -2524,7 +2524,7 @@ Force instantly updating the display based on the current mouse cursor position. Moves the mouse pointer to the specified position in this **Viewport** using the coordinate system of this **Viewport**. -\ **Note:** :ref:`warp_mouse` is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web. +\ **Note:** :ref:`warp_mouse()` is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web. .. |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_viewporttexture.rst b/classes/class_viewporttexture.rst index 76bdee8c3..c5459db20 100644 --- a/classes/class_viewporttexture.rst +++ b/classes/class_viewporttexture.rst @@ -21,7 +21,7 @@ Description 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 get 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`). @@ -34,7 +34,7 @@ To get a **ViewportTexture** in code, use the :ref:`Viewport.get_texture`, :ref:`Light3D`, and :ref:`PointLight2D` do not support using **ViewportTexture** directly. To use texture data from a **ViewportTexture** in these nodes, you need to create an :ref:`ImageTexture` by calling :ref:`Texture2D.get_image` on the **ViewportTexture** and passing the result to :ref:`ImageTexture.create_from_image`. This conversion is a slow operation, so it should not be performed every frame. +\ **Note:** Some nodes such as :ref:`Decal`, :ref:`Light3D`, and :ref:`PointLight2D` do not support using **ViewportTexture** directly. To use texture data from a **ViewportTexture** in these nodes, you need to create an :ref:`ImageTexture` by calling :ref:`Texture2D.get_image()` on the **ViewportTexture** and passing the result to :ref:`ImageTexture.create_from_image()`. This conversion is a slow operation, so it should not be performed every frame. .. rst-class:: classref-introduction-group @@ -81,7 +81,7 @@ 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 local scene root (see :ref:`Resource.get_local_scene`), **not** to the nodes that use this 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, this path may not automatically update if the scene root cannot be found. diff --git a/classes/class_visualinstance3d.rst b/classes/class_visualinstance3d.rst index 4645f7c45..75ce854b7 100644 --- a/classes/class_visualinstance3d.rst +++ b/classes/class_visualinstance3d.rst @@ -89,7 +89,7 @@ This object will only be visible for :ref:`Camera3D`\ s whose cu For :ref:`Light3D`\ s, this can be used to control which **VisualInstance3D**\ s are affected by a specific light. For :ref:`GPUParticles3D`, this can be used to control which particles are effected by a specific attractor. For :ref:`Decal`\ s, this can be used to control which **VisualInstance3D**\ s are affected by a specific decal. -To adjust :ref:`layers` more easily using a script, use :ref:`get_layer_mask_value` and :ref:`set_layer_mask_value`. +To adjust :ref:`layers` more easily using a script, use :ref:`get_layer_mask_value()` and :ref:`set_layer_mask_value()`. \ **Note:** :ref:`VoxelGI`, SDFGI and :ref:`LightmapGI` will always take all layers into account to determine what contributes to global illumination. If this is an issue, set :ref:`GeometryInstance3D.gi_mode` to :ref:`GeometryInstance3D.GI_MODE_DISABLED` for meshes and :ref:`Light3D.light_bake_mode` to :ref:`Light3D.BAKE_DISABLED` for lights to exclude them from global illumination. @@ -182,7 +182,7 @@ Returns the RID of the resource associated with this **VisualInstance3D**. For e :ref:`RID` **get_instance**\ (\ ) |const| :ref:`πŸ”—` -Returns the RID of this instance. This RID is the same as the RID returned by :ref:`RenderingServer.instance_create`. This RID is needed if you want to call :ref:`RenderingServer` functions directly on this **VisualInstance3D**. +Returns the RID of this instance. This RID is the same as the RID returned by :ref:`RenderingServer.instance_create()`. This RID is needed if you want to call :ref:`RenderingServer` functions directly on this **VisualInstance3D**. .. rst-class:: classref-item-separator @@ -206,7 +206,7 @@ Returns whether or not the specified layer of the :ref:`layers`\ ) :ref:`πŸ”—` -Sets the resource that is instantiated by this **VisualInstance3D**, which changes how the engine handles the **VisualInstance3D** under the hood. Equivalent to :ref:`RenderingServer.instance_set_base`. +Sets the resource that is instantiated by this **VisualInstance3D**, which changes how the engine handles the **VisualInstance3D** under the hood. Equivalent to :ref:`RenderingServer.instance_set_base()`. .. rst-class:: classref-item-separator diff --git a/classes/class_visualshadernodecustom.rst b/classes/class_visualshadernodecustom.rst index ff0cc375a..b4a50c0f3 100644 --- a/classes/class_visualshadernodecustom.rst +++ b/classes/class_visualshadernodecustom.rst @@ -217,7 +217,7 @@ Defining this method is **required**. If not overridden, the node has no input p :ref:`Variant` **_get_input_port_default_value**\ (\ port\: :ref:`int`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to define the default value for the specified input port. Prefer use this over :ref:`VisualShaderNode.set_input_port_default_value`. +Override this method to define the default value for the specified input port. Prefer use this over :ref:`VisualShaderNode.set_input_port_default_value()`. Defining this method is **required**. If not overridden, the node has no default values for their input ports. @@ -231,7 +231,7 @@ Defining this method is **required**. If not overridden, the node has no default :ref:`String` **_get_input_port_name**\ (\ port\: :ref:`int`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to define the names of input ports of the associated custom node. The names are used both for the input slots in the editor and as identifiers in the shader code, and are passed in the ``input_vars`` array in :ref:`_get_code`. +Override this method to define the names of input ports of the associated custom node. The names are used both for the input slots in the editor and as identifiers in the shader code, and are passed in the ``input_vars`` array in :ref:`_get_code()`. Defining this method is **optional**, but recommended. If not overridden, input ports are named as ``"in" + str(port)``. @@ -287,7 +287,7 @@ Defining this method is **required**. If not overridden, the node has no output :ref:`String` **_get_output_port_name**\ (\ port\: :ref:`int`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to define the names of output ports of the associated custom node. The names are used both for the output slots in the editor and as identifiers in the shader code, and are passed in the ``output_vars`` array in :ref:`_get_code`. +Override this method to define the names of output ports of the associated custom node. The names are used both for the output slots in the editor and as identifiers in the shader code, and are passed in the ``output_vars`` array in :ref:`_get_code()`. Defining this method is **optional**, but recommended. If not overridden, output ports are named as ``"out" + str(port)``. @@ -413,7 +413,7 @@ Defining this method is **optional**. If not overridden, it's ``false``. :ref:`int` **get_option_index**\ (\ option\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the selected index of the drop-down list option within a graph. You may use this function to define the specific behavior in the :ref:`_get_code` or :ref:`_get_global_code`. +Returns the selected index of the drop-down list option within a graph. You may use this function to define the specific behavior in the :ref:`_get_code()` or :ref:`_get_global_code()`. .. |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_visualshadernodeframe.rst b/classes/class_visualshadernodeframe.rst index 631c7480d..c37625e71 100644 --- a/classes/class_visualshadernodeframe.rst +++ b/classes/class_visualshadernodeframe.rst @@ -168,7 +168,7 @@ Method Descriptions |void| **add_attached_node**\ (\ node\: :ref:`int`\ ) :ref:`πŸ”—` -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. +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 @@ -180,7 +180,7 @@ Adds a node to the list of nodes attached to the frame. Should not be called dir |void| **remove_attached_node**\ (\ node\: :ref:`int`\ ) :ref:`πŸ”—` -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. +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.)` diff --git a/classes/class_visualshadernodegroupbase.rst b/classes/class_visualshadernodegroupbase.rst index ea0c2a97d..7c06f49a9 100644 --- a/classes/class_visualshadernodegroupbase.rst +++ b/classes/class_visualshadernodegroupbase.rst @@ -138,7 +138,7 @@ Removes all previously specified output ports. :ref:`int` **get_free_input_port_id**\ (\ ) |const| :ref:`πŸ”—` -Returns a free input port ID which can be used in :ref:`add_input_port`. +Returns a free input port ID which can be used in :ref:`add_input_port()`. .. rst-class:: classref-item-separator @@ -150,7 +150,7 @@ Returns a free input port ID which can be used in :ref:`add_input_port` **get_free_output_port_id**\ (\ ) |const| :ref:`πŸ”—` -Returns a free output port ID which can be used in :ref:`add_output_port`. +Returns a free output port ID which can be used in :ref:`add_output_port()`. .. rst-class:: classref-item-separator @@ -162,7 +162,7 @@ Returns a free output port ID which can be used in :ref:`add_output_port` **get_input_port_count**\ (\ ) |const| :ref:`πŸ”—` -Returns the number of input ports in use. Alternative for :ref:`get_free_input_port_id`. +Returns the number of input ports in use. Alternative for :ref:`get_free_input_port_id()`. .. rst-class:: classref-item-separator @@ -174,7 +174,7 @@ Returns the number of input ports in use. Alternative for :ref:`get_free_input_p :ref:`String` **get_inputs**\ (\ ) |const| :ref:`πŸ”—` -Returns a :ref:`String` description of the input ports as a colon-separated list using the format ``id,type,name;`` (see :ref:`add_input_port`). +Returns a :ref:`String` description of the input ports as a colon-separated list using the format ``id,type,name;`` (see :ref:`add_input_port()`). .. rst-class:: classref-item-separator @@ -186,7 +186,7 @@ Returns a :ref:`String` description of the input ports as a colon- :ref:`int` **get_output_port_count**\ (\ ) |const| :ref:`πŸ”—` -Returns the number of output ports in use. Alternative for :ref:`get_free_output_port_id`. +Returns the number of output ports in use. Alternative for :ref:`get_free_output_port_id()`. .. rst-class:: classref-item-separator @@ -198,7 +198,7 @@ Returns the number of output ports in use. Alternative for :ref:`get_free_output :ref:`String` **get_outputs**\ (\ ) |const| :ref:`πŸ”—` -Returns a :ref:`String` description of the output ports as a colon-separated list using the format ``id,type,name;`` (see :ref:`add_output_port`). +Returns a :ref:`String` description of the output ports as a colon-separated list using the format ``id,type,name;`` (see :ref:`add_output_port()`). .. rst-class:: classref-item-separator @@ -294,7 +294,7 @@ Sets the specified input port's type (see :ref:`PortType`\ ) :ref:`πŸ”—` -Defines all input ports using a :ref:`String` formatted as a colon-separated list: ``id,type,name;`` (see :ref:`add_input_port`). +Defines all input ports using a :ref:`String` formatted as a colon-separated list: ``id,type,name;`` (see :ref:`add_input_port()`). .. rst-class:: classref-item-separator @@ -330,7 +330,7 @@ Sets the specified output port's type (see :ref:`PortType`\ ) :ref:`πŸ”—` -Defines all output ports using a :ref:`String` formatted as a colon-separated list: ``id,type,name;`` (see :ref:`add_output_port`). +Defines all output ports using a :ref:`String` formatted as a colon-separated list: ``id,type,name;`` (see :ref:`add_output_port()`). .. |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_visualshadernoderemap.rst b/classes/class_visualshadernoderemap.rst index b127da50f..e3962eaec 100644 --- a/classes/class_visualshadernoderemap.rst +++ b/classes/class_visualshadernoderemap.rst @@ -19,7 +19,7 @@ A visual shader node for remap function. Description ----------- -Remap will transform the input range into output range, e.g. you can change a ``0..1`` value to ``-2..2`` etc. See :ref:`@GlobalScope.remap` for more details. +Remap will transform the input range into output range, e.g. you can change a ``0..1`` value to ``-2..2`` etc. See :ref:`@GlobalScope.remap()` for more details. .. rst-class:: classref-reftable-group diff --git a/classes/class_voxelgi.rst b/classes/class_voxelgi.rst index e473c3bdc..1f443d787 100644 --- a/classes/class_voxelgi.rst +++ b/classes/class_voxelgi.rst @@ -217,9 +217,9 @@ Method Descriptions Bakes the effect from all :ref:`GeometryInstance3D`\ s marked with :ref:`GeometryInstance3D.GI_MODE_STATIC` and :ref:`Light3D`\ s marked with either :ref:`Light3D.BAKE_STATIC` or :ref:`Light3D.BAKE_DYNAMIC`. If ``create_visual_debug`` is ``true``, after baking the light, this will generate a :ref:`MultiMesh` that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the **VoxelGI**'s data and debug any issues that may be occurring. -\ **Note:** :ref:`bake` works from the editor and in exported projects. This makes it suitable for procedurally generated or user-built levels. Baking a **VoxelGI** node generally takes from 5 to 20 seconds in most scenes. Reducing :ref:`subdiv` can speed up baking. +\ **Note:** :ref:`bake()` works from the editor and in exported projects. This makes it suitable for procedurally generated or user-built levels. Baking a **VoxelGI** node generally takes from 5 to 20 seconds in most scenes. Reducing :ref:`subdiv` can speed up baking. -\ **Note:** :ref:`GeometryInstance3D`\ s and :ref:`Light3D`\ s must be fully ready before :ref:`bake` is called. If you are procedurally creating those and some meshes or lights are missing from your baked **VoxelGI**, use ``call_deferred("bake")`` instead of calling :ref:`bake` directly. +\ **Note:** :ref:`GeometryInstance3D`\ s and :ref:`Light3D`\ s must be fully ready before :ref:`bake()` is called. If you are procedurally creating those and some meshes or lights are missing from your baked **VoxelGI**, use ``call_deferred("bake")`` instead of calling :ref:`bake()` directly. .. rst-class:: classref-item-separator @@ -231,7 +231,7 @@ Bakes the effect from all :ref:`GeometryInstance3D`\ s |void| **debug_bake**\ (\ ) :ref:`πŸ”—` -Calls :ref:`bake` with ``create_visual_debug`` enabled. +Calls :ref:`bake()` with ``create_visual_debug`` enabled. .. |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_voxelgidata.rst b/classes/class_voxelgidata.rst index a45bccc41..cf8aba480 100644 --- a/classes/class_voxelgidata.rst +++ b/classes/class_voxelgidata.rst @@ -233,7 +233,7 @@ Method Descriptions Returns the bounds of the baked voxel data as an :ref:`AABB`, which should match :ref:`VoxelGI.size` after being baked (which only contains the size as a :ref:`Vector3`). -\ **Note:** If the size was modified without baking the VoxelGI data, then the value of :ref:`get_bounds` and :ref:`VoxelGI.size` will not match. +\ **Note:** If the size was modified without baking the VoxelGI data, then the value of :ref:`get_bounds()` and :ref:`VoxelGI.size` will not match. .. rst-class:: classref-item-separator diff --git a/classes/class_weakref.rst b/classes/class_weakref.rst index 310884670..6bdb8979d 100644 --- a/classes/class_weakref.rst +++ b/classes/class_weakref.rst @@ -19,7 +19,7 @@ Holds an :ref:`Object`. If the object is :ref:`RefCounted` without contributing to the reference counter. A weakref can be created from an :ref:`Object` using :ref:`@GlobalScope.weakref`. If this object is not a reference, weakref still works, however, it does not have any effect on the object. Weakrefs are useful in cases where multiple classes have variables that refer to each other. Without weakrefs, using these classes could lead to memory leaks, since both references keep each other from being released. Making part of the variables a weakref can prevent this cyclic dependency, and allows the references to be released. +A weakref can hold a :ref:`RefCounted` without contributing to the reference counter. A weakref can be created from an :ref:`Object` using :ref:`@GlobalScope.weakref()`. If this object is not a reference, weakref still works, however, it does not have any effect on the object. Weakrefs are useful in cases where multiple classes have variables that refer to each other. Without weakrefs, using these classes could lead to memory leaks, since both references keep each other from being released. Making part of the variables a weakref can prevent this cyclic dependency, and allows the references to be released. .. rst-class:: classref-reftable-group diff --git a/classes/class_webrtcmultiplayerpeer.rst b/classes/class_webrtcmultiplayerpeer.rst index 73da750ea..dd6adf98f 100644 --- a/classes/class_webrtcmultiplayerpeer.rst +++ b/classes/class_webrtcmultiplayerpeer.rst @@ -21,9 +21,9 @@ Description This class constructs a full mesh of :ref:`WebRTCPeerConnection` (one connection for each peer) that can be used as a :ref:`MultiplayerAPI.multiplayer_peer`. -You can add each :ref:`WebRTCPeerConnection` via :ref:`add_peer` or remove them via :ref:`remove_peer`. Peers must be added in :ref:`WebRTCPeerConnection.STATE_NEW` state to allow it to create the appropriate channels. This class will not create offers nor set descriptions, it will only poll them, and notify connections and disconnections. +You can add each :ref:`WebRTCPeerConnection` via :ref:`add_peer()` or remove them via :ref:`remove_peer()`. Peers must be added in :ref:`WebRTCPeerConnection.STATE_NEW` state to allow it to create the appropriate channels. This class will not create offers nor set descriptions, it will only poll them, and notify connections and disconnections. -When creating the peer via :ref:`create_client` or :ref:`create_server` the :ref:`MultiplayerPeer.is_server_relay_supported` method will return ``true`` enabling peer exchange and packet relaying when supported by the :ref:`MultiplayerAPI` implementation. +When creating the peer via :ref:`create_client()` or :ref:`create_server()` the :ref:`MultiplayerPeer.is_server_relay_supported()` method will return ``true`` enabling peer exchange and packet relaying when supported by the :ref:`MultiplayerAPI` implementation. \ **Note:** When exporting to Android, make sure to enable the ``INTERNET`` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. @@ -70,7 +70,7 @@ Method Descriptions Add a new peer to the mesh with the given ``peer_id``. The :ref:`WebRTCPeerConnection` must be in state :ref:`WebRTCPeerConnection.STATE_NEW`. -Three channels will be created for reliable, unreliable, and ordered transport. The value of ``unreliable_lifetime`` will be passed to the ``"maxPacketLifetime"`` option when creating unreliable and ordered channels (see :ref:`WebRTCPeerConnection.create_data_channel`). +Three channels will be created for reliable, unreliable, and ordered transport. The value of ``unreliable_lifetime`` will be passed to the ``"maxPacketLifetime"`` option when creating unreliable and ordered channels (see :ref:`WebRTCPeerConnection.create_data_channel()`). .. rst-class:: classref-item-separator @@ -82,7 +82,7 @@ Three channels will be created for reliable, unreliable, and ordered transport. :ref:`Error` **create_client**\ (\ peer_id\: :ref:`int`, channels_config\: :ref:`Array` = []\ ) :ref:`πŸ”—` -Initialize the multiplayer peer as a client with the given ``peer_id`` (must be between 2 and 2147483647). In this mode, you should only call :ref:`add_peer` once and with ``peer_id`` of ``1``. This mode enables :ref:`MultiplayerPeer.is_server_relay_supported`, allowing the upper :ref:`MultiplayerAPI` layer to perform peer exchange and packet relaying. +Initialize the multiplayer peer as a client with the given ``peer_id`` (must be between 2 and 2147483647). In this mode, you should only call :ref:`add_peer()` once and with ``peer_id`` of ``1``. This mode enables :ref:`MultiplayerPeer.is_server_relay_supported()`, allowing the upper :ref:`MultiplayerAPI` layer to perform peer exchange and packet relaying. You can optionally specify a ``channels_config`` array of :ref:`TransferMode` which will be used to create extra channels (WebRTC only supports one transfer mode per channel). @@ -108,7 +108,7 @@ Initialize the multiplayer peer as a mesh (i.e. all peers connect to each other) :ref:`Error` **create_server**\ (\ channels_config\: :ref:`Array` = []\ ) :ref:`πŸ”—` -Initialize the multiplayer peer as a server (with unique ID of ``1``). This mode enables :ref:`MultiplayerPeer.is_server_relay_supported`, allowing the upper :ref:`MultiplayerAPI` layer to perform peer exchange and packet relaying. +Initialize the multiplayer peer as a server (with unique ID of ``1``). This mode enables :ref:`MultiplayerPeer.is_server_relay_supported()`, allowing the upper :ref:`MultiplayerAPI` layer to perform peer exchange and packet relaying. You can optionally specify a ``channels_config`` array of :ref:`TransferMode` which will be used to create extra channels (WebRTC only supports one transfer mode per channel). @@ -134,7 +134,7 @@ Returns a dictionary representation of the peer with given ``peer_id`` with thre :ref:`Dictionary` **get_peers**\ (\ ) :ref:`πŸ”—` -Returns a dictionary which keys are the peer ids and values the peer representation as in :ref:`get_peer`. +Returns a dictionary which keys are the peer ids and values the peer representation as in :ref:`get_peer()`. .. rst-class:: classref-item-separator diff --git a/classes/class_webrtcpeerconnection.rst b/classes/class_webrtcpeerconnection.rst index 669141706..0b1526140 100644 --- a/classes/class_webrtcpeerconnection.rst +++ b/classes/class_webrtcpeerconnection.rst @@ -84,7 +84,7 @@ Signals Emitted when a new in-band channel is received, i.e. when the channel was created with ``negotiated: false`` (default). -The object will be an instance of :ref:`WebRTCDataChannel`. You must keep a reference of it or it will be closed automatically. See :ref:`create_data_channel`. +The object will be an instance of :ref:`WebRTCDataChannel`. You must keep a reference of it or it will be closed automatically. See :ref:`create_data_channel()`. .. rst-class:: classref-item-separator @@ -108,7 +108,7 @@ Emitted when a new ICE candidate has been created. The three parameters are mean **session_description_created**\ (\ type\: :ref:`String`, sdp\: :ref:`String`\ ) :ref:`πŸ”—` -Emitted after a successful call to :ref:`create_offer` or :ref:`set_remote_description` (when it generates an answer). The parameters are meant to be passed to :ref:`set_local_description` on this object, and sent to the remote peer over the signaling server. +Emitted after a successful call to :ref:`create_offer()` or :ref:`set_remote_description()` (when it generates an answer). The parameters are meant to be passed to :ref:`set_local_description()` on this object, and sent to the remote peer over the signaling server. .. rst-class:: classref-section-separator @@ -171,7 +171,7 @@ One or more of the ICE transports failed. :ref:`ConnectionState` **STATE_CLOSED** = ``5`` -The peer connection is closed (after calling :ref:`close` for example). +The peer connection is closed (after calling :ref:`close()` for example). .. rst-class:: classref-item-separator @@ -231,7 +231,7 @@ There is no ongoing exchange of offer and answer underway. This may mean that th :ref:`SignalingState` **SIGNALING_STATE_HAVE_LOCAL_OFFER** = ``1`` -The local peer has called :ref:`set_local_description`, passing in SDP representing an offer (usually created by calling :ref:`create_offer`), and the offer has been applied successfully. +The local peer has called :ref:`set_local_description()`, passing in SDP representing an offer (usually created by calling :ref:`create_offer()`), and the offer has been applied successfully. .. _class_WebRTCPeerConnection_constant_SIGNALING_STATE_HAVE_REMOTE_OFFER: @@ -239,7 +239,7 @@ The local peer has called :ref:`set_local_description` **SIGNALING_STATE_HAVE_REMOTE_OFFER** = ``2`` -The remote peer has created an offer and used the signaling server to deliver it to the local peer, which has set the offer as the remote description by calling :ref:`set_remote_description`. +The remote peer has created an offer and used the signaling server to deliver it to the local peer, which has set the offer as the remote description by calling :ref:`set_remote_description()`. .. _class_WebRTCPeerConnection_constant_SIGNALING_STATE_HAVE_LOCAL_PRANSWER: @@ -247,7 +247,7 @@ The remote peer has created an offer and used the signaling server to deliver it :ref:`SignalingState` **SIGNALING_STATE_HAVE_LOCAL_PRANSWER** = ``3`` -The offer sent by the remote peer has been applied and an answer has been created and applied by calling :ref:`set_local_description`. This provisional answer describes the supported media formats and so forth, but may not have a complete set of ICE candidates included. Further candidates will be delivered separately later. +The offer sent by the remote peer has been applied and an answer has been created and applied by calling :ref:`set_local_description()`. This provisional answer describes the supported media formats and so forth, but may not have a complete set of ICE candidates included. Further candidates will be delivered separately later. .. _class_WebRTCPeerConnection_constant_SIGNALING_STATE_HAVE_REMOTE_PRANSWER: @@ -255,7 +255,7 @@ The offer sent by the remote peer has been applied and an answer has been create :ref:`SignalingState` **SIGNALING_STATE_HAVE_REMOTE_PRANSWER** = ``4`` -A provisional answer has been received and successfully applied in response to an offer previously sent and established by calling :ref:`set_local_description`. +A provisional answer has been received and successfully applied in response to an offer previously sent and established by calling :ref:`set_local_description()`. .. _class_WebRTCPeerConnection_constant_SIGNALING_STATE_CLOSED: @@ -294,7 +294,7 @@ Add an ice candidate generated by a remote peer (and received over the signaling Close the peer connection and all data channels associated with it. -\ **Note:** You cannot reuse this object for a new connection unless you call :ref:`initialize`. +\ **Note:** You cannot reuse this object for a new connection unless you call :ref:`initialize()`. .. rst-class:: classref-item-separator @@ -308,7 +308,7 @@ Close the peer connection and all data channels associated with it. Returns a new :ref:`WebRTCDataChannel` (or ``null`` on failure) with given ``label`` and optionally configured via the ``options`` dictionary. This method can only be called when the connection is in state :ref:`STATE_NEW`. -There are two ways to create a working data channel: either call :ref:`create_data_channel` on only one of the peer and listen to :ref:`data_channel_received` on the other, or call :ref:`create_data_channel` on both peers, with the same values, and the ``"negotiated"`` option set to ``true``. +There are two ways to create a working data channel: either call :ref:`create_data_channel()` on only one of the peer and listen to :ref:`data_channel_received` on the other, or call :ref:`create_data_channel()` on both peers, with the same values, and the ``"negotiated"`` option set to ``true``. Valid ``options`` are: @@ -417,7 +417,7 @@ Valid ``configuration`` options are: :ref:`Error` **poll**\ (\ ) :ref:`πŸ”—` -Call this method frequently (e.g. in :ref:`Node._process` or :ref:`Node._physics_process`) to properly receive signals. +Call this method frequently (e.g. in :ref:`Node._process()` or :ref:`Node._physics_process()`) to properly receive signals. .. rst-class:: classref-item-separator diff --git a/classes/class_websocketmultiplayerpeer.rst b/classes/class_websocketmultiplayerpeer.rst index 902da2836..e1203787d 100644 --- a/classes/class_websocketmultiplayerpeer.rst +++ b/classes/class_websocketmultiplayerpeer.rst @@ -191,7 +191,7 @@ Method Descriptions :ref:`Error` **create_client**\ (\ url\: :ref:`String`, tls_client_options\: :ref:`TLSOptions` = null\ ) :ref:`πŸ”—` -Starts a new multiplayer client connecting to the given ``url``. TLS certificates will be verified against the hostname when connecting using the ``wss://`` protocol. You can pass the optional ``tls_client_options`` parameter to customize the trusted certification authorities, or disable the common name verification. See :ref:`TLSOptions.client` and :ref:`TLSOptions.client_unsafe`. +Starts a new multiplayer client connecting to the given ``url``. TLS certificates will be verified against the hostname when connecting using the ``wss://`` protocol. You can pass the optional ``tls_client_options`` parameter to customize the trusted certification authorities, or disable the common name verification. See :ref:`TLSOptions.client()` and :ref:`TLSOptions.client_unsafe()`. \ **Note:** It is recommended to specify the scheme part of the URL, i.e. the ``url`` should start with either ``ws://`` or ``wss://``. @@ -205,7 +205,7 @@ Starts a new multiplayer client connecting to the given ``url``. TLS certificate :ref:`Error` **create_server**\ (\ port\: :ref:`int`, bind_address\: :ref:`String` = "*", tls_server_options\: :ref:`TLSOptions` = null\ ) :ref:`πŸ”—` -Starts a new multiplayer server listening on the given ``port``. You can optionally specify a ``bind_address``, and provide valid ``tls_server_options`` to use TLS. See :ref:`TLSOptions.server`. +Starts a new multiplayer server listening on the given ``port``. You can optionally specify a ``bind_address``, and provide valid ``tls_server_options`` to use TLS. See :ref:`TLSOptions.server()`. .. rst-class:: classref-item-separator diff --git a/classes/class_websocketpeer.rst b/classes/class_websocketpeer.rst index f528d525f..8f07b5d12 100644 --- a/classes/class_websocketpeer.rst +++ b/classes/class_websocketpeer.rst @@ -21,9 +21,9 @@ Description This class represents WebSocket connection, and can be used as a WebSocket client (RFC 6455-compliant) or as a remote peer of a WebSocket server. -You can send WebSocket binary frames using :ref:`PacketPeer.put_packet`, and WebSocket text frames using :ref:`send` (prefer text frames when interacting with text-based API). You can check the frame type of the last packet via :ref:`was_string_packet`. +You can send WebSocket binary frames using :ref:`PacketPeer.put_packet()`, and WebSocket text frames using :ref:`send()` (prefer text frames when interacting with text-based API). You can check the frame type of the last packet via :ref:`was_string_packet()`. -To start a WebSocket client, first call :ref:`connect_to_url`, then regularly call :ref:`poll` (e.g. during :ref:`Node` process). You can query the socket state via :ref:`get_ready_state`, get the number of pending packets using :ref:`PacketPeer.get_available_packet_count`, and retrieve them via :ref:`PacketPeer.get_packet`. +To start a WebSocket client, first call :ref:`connect_to_url()`, then regularly call :ref:`poll()` (e.g. during :ref:`Node` process). You can query the socket state via :ref:`get_ready_state()`, get the number of pending packets using :ref:`PacketPeer.get_available_packet_count()`, and retrieve them via :ref:`PacketPeer.get_packet()`. .. tabs:: @@ -54,7 +54,7 @@ To start a WebSocket client, first call :ref:`connect_to_url` and the online tutorial. +To use the peer as part of a WebSocket server refer to :ref:`accept_stream()` and the online tutorial. .. rst-class:: classref-reftable-group @@ -323,7 +323,7 @@ Method Descriptions :ref:`Error` **accept_stream**\ (\ stream\: :ref:`StreamPeer`\ ) :ref:`πŸ”—` -Accepts a peer connection performing the HTTP handshake as a WebSocket server. The ``stream`` must be a valid TCP stream retrieved via :ref:`TCPServer.take_connection`, or a TLS stream accepted via :ref:`StreamPeerTLS.accept_stream`. +Accepts a peer connection performing the HTTP handshake as a WebSocket server. The ``stream`` must be a valid TCP stream retrieved via :ref:`TCPServer.take_connection()`, or a TLS stream accepted via :ref:`StreamPeerTLS.accept_stream()`. \ **Note:** Not supported in Web exports due to browsers' restrictions. @@ -353,9 +353,9 @@ Closes this WebSocket connection. ``code`` is the status code for the closure (s :ref:`Error` **connect_to_url**\ (\ url\: :ref:`String`, tls_client_options\: :ref:`TLSOptions` = null\ ) :ref:`πŸ”—` -Connects to the given URL. TLS certificates will be verified against the hostname when connecting using the ``wss://`` protocol. You can pass the optional ``tls_client_options`` parameter to customize the trusted certification authorities, or disable the common name verification. See :ref:`TLSOptions.client` and :ref:`TLSOptions.client_unsafe`. +Connects to the given URL. TLS certificates will be verified against the hostname when connecting using the ``wss://`` protocol. You can pass the optional ``tls_client_options`` parameter to customize the trusted certification authorities, or disable the common name verification. See :ref:`TLSOptions.client()` and :ref:`TLSOptions.client_unsafe()`. -\ **Note:** This method is non-blocking, and will return :ref:`@GlobalScope.OK` before the connection is established as long as the provided parameters are valid and the peer is not in an invalid state (e.g. already connected). Regularly call :ref:`poll` (e.g. during :ref:`Node` process) and check the result of :ref:`get_ready_state` to know whether the connection succeeds or fails. +\ **Note:** This method is non-blocking, and will return :ref:`@GlobalScope.OK` before the connection is established as long as the provided parameters are valid and the peer is not in an invalid state (e.g. already connected). Regularly call :ref:`poll()` (e.g. during :ref:`Node` process) and check the result of :ref:`get_ready_state()` to know whether the connection succeeds or fails. \ **Note:** To avoid mixed content warnings or errors in Web, you may have to use a ``url`` that starts with ``wss://`` (secure) instead of ``ws://``. When doing so, make sure to use the fully qualified domain name that matches the one defined in the server's TLS certificate. Do not connect directly via the IP address for ``wss://`` connections, as it won't match with the TLS certificate. @@ -369,7 +369,7 @@ Connects to the given URL. TLS certificates will be verified against the hostnam :ref:`int` **get_close_code**\ (\ ) |const| :ref:`πŸ”—` -Returns the received WebSocket close frame status code, or ``-1`` when the connection was not cleanly closed. Only call this method when :ref:`get_ready_state` returns :ref:`STATE_CLOSED`. +Returns the received WebSocket close frame status code, or ``-1`` when the connection was not cleanly closed. Only call this method when :ref:`get_ready_state()` returns :ref:`STATE_CLOSED`. .. rst-class:: classref-item-separator @@ -381,7 +381,7 @@ Returns the received WebSocket close frame status code, or ``-1`` when the conne :ref:`String` **get_close_reason**\ (\ ) |const| :ref:`πŸ”—` -Returns the received WebSocket close frame status reason string. Only call this method when :ref:`get_ready_state` returns :ref:`STATE_CLOSED`. +Returns the received WebSocket close frame status reason string. Only call this method when :ref:`get_ready_state()` returns :ref:`STATE_CLOSED`. .. rst-class:: classref-item-separator @@ -445,7 +445,7 @@ Returns the ready state of the connection. See :ref:`State` **get_requested_url**\ (\ ) |const| :ref:`πŸ”—` -Returns the URL requested by this peer. The URL is derived from the ``url`` passed to :ref:`connect_to_url` or from the HTTP headers when acting as server (i.e. when using :ref:`accept_stream`). +Returns the URL requested by this peer. The URL is derived from the ``url`` passed to :ref:`connect_to_url()` or from the HTTP headers when acting as server (i.e. when using :ref:`accept_stream()`). .. rst-class:: classref-item-separator @@ -481,7 +481,7 @@ Updates the connection state and receive incoming packets. Call this function re :ref:`Error` **send**\ (\ message\: :ref:`PackedByteArray`, write_mode\: :ref:`WriteMode` = 1\ ) :ref:`πŸ”—` -Sends the given ``message`` using the desired ``write_mode``. When sending a :ref:`String`, prefer using :ref:`send_text`. +Sends the given ``message`` using the desired ``write_mode``. When sending a :ref:`String`, prefer using :ref:`send_text()`. .. rst-class:: classref-item-separator @@ -493,7 +493,7 @@ Sends the given ``message`` using the desired ``write_mode``. When sending a :re :ref:`Error` **send_text**\ (\ message\: :ref:`String`\ ) :ref:`πŸ”—` -Sends the given ``message`` using WebSocket text mode. Prefer this method over :ref:`PacketPeer.put_packet` when interacting with third-party text-based API (e.g. when using :ref:`JSON` formatted messages). +Sends the given ``message`` using WebSocket text mode. Prefer this method over :ref:`PacketPeer.put_packet()` when interacting with third-party text-based API (e.g. when using :ref:`JSON` formatted messages). .. rst-class:: classref-item-separator @@ -505,7 +505,7 @@ Sends the given ``message`` using WebSocket text mode. Prefer this method over : |void| **set_no_delay**\ (\ enabled\: :ref:`bool`\ ) :ref:`πŸ”—` -Disable Nagle's algorithm on the underlying TCP socket (default). See :ref:`StreamPeerTCP.set_no_delay` for more information. +Disable Nagle's algorithm on the underlying TCP socket (default). See :ref:`StreamPeerTCP.set_no_delay()` for more information. \ **Note:** Not available in the Web export. diff --git a/classes/class_webxrinterface.rst b/classes/class_webxrinterface.rst index a2526124c..204211454 100644 --- a/classes/class_webxrinterface.rst +++ b/classes/class_webxrinterface.rst @@ -201,7 +201,7 @@ Emitted after the display's refresh rate has changed. Emitted to indicate that the reference space has been reset or reconfigured. -When (or whether) this is emitted depends on the user's browser or device, but may include when the user has changed the dimensions of their play space (which you may be able to access via :ref:`XRInterface.get_play_area`) or pressed/held a button to recenter their position. +When (or whether) this is emitted depends on the user's browser or device, but may include when the user has changed the dimensions of their play space (which you may be able to access via :ref:`XRInterface.get_play_area()`) or pressed/held a button to recenter their position. See `WebXR's XRReferenceSpace reset event `__ for more information. @@ -217,7 +217,7 @@ See `WebXR's XRReferenceSpace reset event ` and :ref:`get_input_source_target_ray_mode` to get more information about the input source. +Use :ref:`get_input_source_tracker()` and :ref:`get_input_source_target_ray_mode()` to get more information about the input source. .. rst-class:: classref-item-separator @@ -231,7 +231,7 @@ Use :ref:`get_input_source_tracker` and :ref:`get_input_source_target_ray_mode` to get more information about the input source. +Use :ref:`get_input_source_tracker()` and :ref:`get_input_source_target_ray_mode()` to get more information about the input source. .. rst-class:: classref-item-separator @@ -245,7 +245,7 @@ Use :ref:`get_input_source_tracker` and :ref:`get_input_source_target_ray_mode` to get more information about the input source. +Use :ref:`get_input_source_tracker()` and :ref:`get_input_source_target_ray_mode()` to get more information about the input source. .. rst-class:: classref-item-separator @@ -271,7 +271,7 @@ At this point, you should do ``get_viewport().use_xr = false`` to instruct Godot **session_failed**\ (\ message\: :ref:`String`\ ) :ref:`πŸ”—` -Emitted by :ref:`XRInterface.initialize` if the session fails to start. +Emitted by :ref:`XRInterface.initialize()` if the session fails to start. \ ``message`` may optionally contain an error message from WebXR, or an empty string if no message is available. @@ -285,7 +285,7 @@ Emitted by :ref:`XRInterface.initialize` if **session_started**\ (\ ) :ref:`πŸ”—` -Emitted by :ref:`XRInterface.initialize` if the session is successfully started. +Emitted by :ref:`XRInterface.initialize()` if the session is successfully started. At this point, it's safe to do ``get_viewport().use_xr = true`` to instruct Godot to start rendering to the XR device. @@ -299,7 +299,7 @@ At this point, it's safe to do ``get_viewport().use_xr = true`` to instruct Godo **session_supported**\ (\ session_mode\: :ref:`String`, supported\: :ref:`bool`\ ) :ref:`πŸ”—` -Emitted by :ref:`is_session_supported` to indicate if the given ``session_mode`` is supported or not. +Emitted by :ref:`is_session_supported()` to indicate if the given ``session_mode`` is supported or not. .. rst-class:: classref-item-separator @@ -313,7 +313,7 @@ Emitted by :ref:`is_session_supported` and :ref:`get_input_source_target_ray_mode` to get more information about the input source. +Use :ref:`get_input_source_tracker()` and :ref:`get_input_source_target_ray_mode()` to get more information about the input source. .. rst-class:: classref-item-separator @@ -327,7 +327,7 @@ Use :ref:`get_input_source_tracker` and :ref:`get_input_source_target_ray_mode` to get more information about the input source. +Use :ref:`get_input_source_tracker()` and :ref:`get_input_source_target_ray_mode()` to get more information about the input source. .. rst-class:: classref-item-separator @@ -341,7 +341,7 @@ Use :ref:`get_input_source_tracker` and :ref:`get_input_source_target_ray_mode` to get more information about the input source. +Use :ref:`get_input_source_tracker()` and :ref:`get_input_source_target_ray_mode()` to get more information about the input source. .. rst-class:: classref-item-separator @@ -421,7 +421,7 @@ Property Descriptions - :ref:`String` **get_enabled_features**\ (\ ) -A comma-separated list of features that were successfully enabled by :ref:`XRInterface.initialize` when setting up the WebXR session. +A comma-separated list of features that were successfully enabled by :ref:`XRInterface.initialize()` when setting up the WebXR session. This may include features requested by setting :ref:`required_features` and :ref:`optional_features`, and will only be available after :ref:`session_started` has been emitted. @@ -442,7 +442,7 @@ This may include features requested by setting :ref:`required_features`\ ) - :ref:`String` **get_optional_features**\ (\ ) -A comma-seperated list of optional features used by :ref:`XRInterface.initialize` when setting up the WebXR session. +A comma-seperated list of optional features used by :ref:`XRInterface.initialize()` when setting up the WebXR session. If a user's browser or device doesn't support one of the given features, initialization will continue, but you won't be able to use the requested feature. @@ -464,7 +464,7 @@ Possible values come from `WebXR's XRReferenceSpaceType ` **get_reference_space_type**\ (\ ) -The reference space type (from the list of requested types set in the :ref:`requested_reference_space_types` property), that was ultimately used by :ref:`XRInterface.initialize` when setting up the WebXR session. +The reference space type (from the list of requested types set in the :ref:`requested_reference_space_types` property), that was ultimately used by :ref:`XRInterface.initialize()` when setting up the WebXR session. Possible values come from `WebXR's XRReferenceSpaceType `__. If you want to use a particular reference space type, it must be listed in either :ref:`required_features` or :ref:`optional_features`. @@ -483,7 +483,7 @@ Possible values come from `WebXR's XRReferenceSpaceType `\ ) - :ref:`String` **get_requested_reference_space_types**\ (\ ) -A comma-seperated list of reference space types used by :ref:`XRInterface.initialize` when setting up the WebXR session. +A comma-seperated list of reference space types used by :ref:`XRInterface.initialize()` when setting up the WebXR session. The reference space types are requested in order, and the first one supported by the users device or browser will be used. The :ref:`reference_space_type` property contains the reference space type that was ultimately selected. @@ -506,7 +506,7 @@ Possible values come from `WebXR's XRReferenceSpaceType `\ ) - :ref:`String` **get_required_features**\ (\ ) -A comma-seperated list of required features used by :ref:`XRInterface.initialize` when setting up the WebXR session. +A comma-seperated list of required features used by :ref:`XRInterface.initialize()` when setting up the WebXR session. If a user's browser or device doesn't support one of the given features, initialization will fail and :ref:`session_failed` will be emitted. @@ -529,7 +529,7 @@ Possible values come from `WebXR's XRReferenceSpaceType `\ ) - :ref:`String` **get_session_mode**\ (\ ) -The session mode used by :ref:`XRInterface.initialize` when setting up the WebXR session. +The session mode used by :ref:`XRInterface.initialize()` when setting up the WebXR session. This doesn't have any effect on the interface when already initialized. @@ -580,7 +580,7 @@ Returns display refresh rates supported by the current HMD. Only returned if thi :ref:`float` **get_display_refresh_rate**\ (\ ) |const| :ref:`πŸ”—` -Returns the display refresh rate for the current HMD. Not supported on all HMDs and browsers. It may not report an accurate value until after using :ref:`set_display_refresh_rate`. +Returns the display refresh rate for the current HMD. Not supported on all HMDs and browsers. It may not report an accurate value until after using :ref:`set_display_refresh_rate()`. .. rst-class:: classref-item-separator diff --git a/classes/class_window.rst b/classes/class_window.rst index 4016b9f5a..79a44792a 100644 --- a/classes/class_window.rst +++ b/classes/class_window.rst @@ -312,7 +312,7 @@ Signals **about_to_popup**\ (\ ) :ref:`πŸ”—` -Emitted right after :ref:`popup` call, before the **Window** appears or does anything. +Emitted right after :ref:`popup()` call, before the **Window** appears or does anything. .. rst-class:: classref-item-separator @@ -326,7 +326,7 @@ Emitted right after :ref:`popup` call, before the **W Emitted when the **Window**'s close button is pressed or when :ref:`popup_window` is enabled and user clicks outside the window. -This signal can be used to handle window closing, e.g. by connecting it to :ref:`hide`. +This signal can be used to handle window closing, e.g. by connecting it to :ref:`hide()`. .. rst-class:: classref-item-separator @@ -663,7 +663,7 @@ Window style is overridden, forcing sharp corners. :ref:`Flags` **FLAG_EXCLUDE_FROM_CAPTURE** = ``9`` -Windows is excluded from screenshots taken by :ref:`DisplayServer.screen_get_image`, :ref:`DisplayServer.screen_get_image_rect`, and :ref:`DisplayServer.screen_get_pixel`. +Windows is excluded from screenshots taken by :ref:`DisplayServer.screen_get_image()`, :ref:`DisplayServer.screen_get_image_rect()`, and :ref:`DisplayServer.screen_get_pixel()`. \ **Note:** This flag is implemented on macOS and Windows. @@ -1036,7 +1036,7 @@ Specifies how the content's aspect behaves when the **Window** is resized. The b - |void| **set_content_scale_factor**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_content_scale_factor**\ (\ ) -Specifies the base scale of **Window**'s content when its :ref:`size` is equal to :ref:`content_scale_size`. See also :ref:`Viewport.get_stretch_transform`. +Specifies the base scale of **Window**'s content when its :ref:`size` is equal to :ref:`content_scale_size`. See also :ref:`Viewport.get_stretch_transform()`. .. rst-class:: classref-item-separator @@ -1121,7 +1121,7 @@ The screen the window is currently on. - |void| **set_flag**\ (\ flag\: :ref:`Flags`, enabled\: :ref:`bool`\ ) - :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| -Windows is excluded from screenshots taken by :ref:`DisplayServer.screen_get_image`, :ref:`DisplayServer.screen_get_image_rect`, and :ref:`DisplayServer.screen_get_pixel`. +Windows is excluded from screenshots taken by :ref:`DisplayServer.screen_get_image()`, :ref:`DisplayServer.screen_get_image_rect()`, and :ref:`DisplayServer.screen_get_pixel()`. .. rst-class:: classref-item-separator @@ -1250,7 +1250,7 @@ If non-zero, the **Window** can't be resized to be bigger than this size. If non-zero, the **Window** can't be resized to be smaller than this size. -\ **Note:** This property will be ignored in favor of :ref:`get_contents_minimum_size` if :ref:`wrap_controls` is enabled and if its size is bigger. +\ **Note:** This property will be ignored in favor of :ref:`get_contents_minimum_size()` if :ref:`wrap_controls` is enabled and if its size is bigger. .. rst-class:: classref-item-separator @@ -1602,7 +1602,7 @@ If ``true``, the window is visible. If ``true``, the window's size will automatically update when a child node is added or removed, ignoring :ref:`min_size` if the new size is bigger. -If ``false``, you need to call :ref:`child_controls_changed` manually. +If ``false``, you need to call :ref:`child_controls_changed()` manually. .. rst-class:: classref-section-separator @@ -1619,7 +1619,7 @@ Method Descriptions :ref:`Vector2` **_get_contents_minimum_size**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Virtual method to be implemented by the user. Overrides the value returned by :ref:`get_contents_minimum_size`. +Virtual method to be implemented by the user. Overrides the value returned by :ref:`get_contents_minimum_size()`. .. rst-class:: classref-item-separator @@ -1631,9 +1631,9 @@ Virtual method to be implemented by the user. Overrides the value returned by :r |void| **add_theme_color_override**\ (\ name\: :ref:`StringName`, color\: :ref:`Color`\ ) :ref:`πŸ”—` -Creates a local override for a theme :ref:`Color` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_color_override`. +Creates a local override for a theme :ref:`Color` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_color_override()`. -See also :ref:`get_theme_color` and :ref:`Control.add_theme_color_override` for more details. +See also :ref:`get_theme_color()` and :ref:`Control.add_theme_color_override()` for more details. .. rst-class:: classref-item-separator @@ -1645,9 +1645,9 @@ See also :ref:`get_theme_color` and :ref:`C |void| **add_theme_constant_override**\ (\ name\: :ref:`StringName`, constant\: :ref:`int`\ ) :ref:`πŸ”—` -Creates a local override for a theme constant with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_constant_override`. +Creates a local override for a theme constant with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_constant_override()`. -See also :ref:`get_theme_constant`. +See also :ref:`get_theme_constant()`. .. rst-class:: classref-item-separator @@ -1659,9 +1659,9 @@ See also :ref:`get_theme_constant`. |void| **add_theme_font_override**\ (\ name\: :ref:`StringName`, font\: :ref:`Font`\ ) :ref:`πŸ”—` -Creates a local override for a theme :ref:`Font` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_font_override`. +Creates a local override for a theme :ref:`Font` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_font_override()`. -See also :ref:`get_theme_font`. +See also :ref:`get_theme_font()`. .. rst-class:: classref-item-separator @@ -1673,9 +1673,9 @@ See also :ref:`get_theme_font`. |void| **add_theme_font_size_override**\ (\ name\: :ref:`StringName`, font_size\: :ref:`int`\ ) :ref:`πŸ”—` -Creates a local override for a theme font size with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_font_size_override`. +Creates a local override for a theme font size with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_font_size_override()`. -See also :ref:`get_theme_font_size`. +See also :ref:`get_theme_font_size()`. .. rst-class:: classref-item-separator @@ -1687,9 +1687,9 @@ See also :ref:`get_theme_font_size`. |void| **add_theme_icon_override**\ (\ name\: :ref:`StringName`, texture\: :ref:`Texture2D`\ ) :ref:`πŸ”—` -Creates a local override for a theme icon with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_icon_override`. +Creates a local override for a theme icon with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_icon_override()`. -See also :ref:`get_theme_icon`. +See also :ref:`get_theme_icon()`. .. rst-class:: classref-item-separator @@ -1701,9 +1701,9 @@ See also :ref:`get_theme_icon`. |void| **add_theme_stylebox_override**\ (\ name\: :ref:`StringName`, stylebox\: :ref:`StyleBox`\ ) :ref:`πŸ”—` -Creates a local override for a theme :ref:`StyleBox` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_stylebox_override`. +Creates a local override for a theme :ref:`StyleBox` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_stylebox_override()`. -See also :ref:`get_theme_stylebox` and :ref:`Control.add_theme_stylebox_override` for more details. +See also :ref:`get_theme_stylebox()` and :ref:`Control.add_theme_stylebox_override()` for more details. .. rst-class:: classref-item-separator @@ -1715,7 +1715,7 @@ See also :ref:`get_theme_stylebox` and : |void| **begin_bulk_theme_override**\ (\ ) :ref:`πŸ”—` -Prevents ``*_theme_*_override`` methods from emitting :ref:`NOTIFICATION_THEME_CHANGED` until :ref:`end_bulk_theme_override` is called. +Prevents ``*_theme_*_override`` methods from emitting :ref:`NOTIFICATION_THEME_CHANGED` until :ref:`end_bulk_theme_override()` is called. .. rst-class:: classref-item-separator @@ -1751,7 +1751,7 @@ Requests an update of the **Window** size to fit underlying :ref:`Control` -Ends a bulk theme override update. See :ref:`begin_bulk_theme_override`. +Ends a bulk theme override update. See :ref:`begin_bulk_theme_override()`. .. rst-class:: classref-item-separator @@ -1763,9 +1763,9 @@ Ends a bulk theme override update. See :ref:`begin_bulk_theme_override` **get_contents_minimum_size**\ (\ ) |const| :ref:`πŸ”—` -Returns the combined minimum size from the child :ref:`Control` nodes of the window. Use :ref:`child_controls_changed` to update it when child nodes have changed. +Returns the combined minimum size from the child :ref:`Control` nodes of the window. Use :ref:`child_controls_changed()` to update it when child nodes have changed. -The value returned by this method can be overridden with :ref:`_get_contents_minimum_size`. +The value returned by this method can be overridden with :ref:`_get_contents_minimum_size()`. .. rst-class:: classref-item-separator @@ -1831,7 +1831,7 @@ Returns the window's size including its border. Returns a :ref:`Color` from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a color item with the specified ``name`` and ``theme_type``. -See :ref:`Control.get_theme_color` for more details. +See :ref:`Control.get_theme_color()` for more details. .. rst-class:: classref-item-separator @@ -1845,7 +1845,7 @@ See :ref:`Control.get_theme_color` for mor Returns a constant from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a constant item with the specified ``name`` and ``theme_type``. -See :ref:`Control.get_theme_color` for more details. +See :ref:`Control.get_theme_color()` for more details. .. rst-class:: classref-item-separator @@ -1859,7 +1859,7 @@ See :ref:`Control.get_theme_color` for mor Returns the default base scale value from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a valid :ref:`Theme.default_base_scale` value. -See :ref:`Control.get_theme_color` for details. +See :ref:`Control.get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -1873,7 +1873,7 @@ See :ref:`Control.get_theme_color` for det Returns the default font from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a valid :ref:`Theme.default_font` value. -See :ref:`Control.get_theme_color` for details. +See :ref:`Control.get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -1887,7 +1887,7 @@ See :ref:`Control.get_theme_color` for det Returns the default font size value from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a valid :ref:`Theme.default_font_size` value. -See :ref:`Control.get_theme_color` for details. +See :ref:`Control.get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -1901,7 +1901,7 @@ See :ref:`Control.get_theme_color` for det Returns a :ref:`Font` from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a font item with the specified ``name`` and ``theme_type``. -See :ref:`Control.get_theme_color` for details. +See :ref:`Control.get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -1915,7 +1915,7 @@ See :ref:`Control.get_theme_color` for det Returns a font size from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a font size item with the specified ``name`` and ``theme_type``. -See :ref:`Control.get_theme_color` for details. +See :ref:`Control.get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -1929,7 +1929,7 @@ See :ref:`Control.get_theme_color` for det Returns an icon from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has an icon item with the specified ``name`` and ``theme_type``. -See :ref:`Control.get_theme_color` for details. +See :ref:`Control.get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -1943,7 +1943,7 @@ See :ref:`Control.get_theme_color` for det Returns a :ref:`StyleBox` from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a stylebox item with the specified ``name`` and ``theme_type``. -See :ref:`Control.get_theme_color` for details. +See :ref:`Control.get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -1993,7 +1993,7 @@ Returns ``true`` if the window is focused. Returns ``true`` if there is a matching :ref:`Theme` in the tree that has a color item with the specified ``name`` and ``theme_type``. -See :ref:`Control.get_theme_color` for details. +See :ref:`Control.get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2007,7 +2007,7 @@ See :ref:`Control.get_theme_color` for det Returns ``true`` if there is a local override for a theme :ref:`Color` with the specified ``name`` in this :ref:`Control` node. -See :ref:`add_theme_color_override`. +See :ref:`add_theme_color_override()`. .. rst-class:: classref-item-separator @@ -2021,7 +2021,7 @@ See :ref:`add_theme_color_override Returns ``true`` if there is a matching :ref:`Theme` in the tree that has a constant item with the specified ``name`` and ``theme_type``. -See :ref:`Control.get_theme_color` for details. +See :ref:`Control.get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2035,7 +2035,7 @@ See :ref:`Control.get_theme_color` for det Returns ``true`` if there is a local override for a theme constant with the specified ``name`` in this :ref:`Control` node. -See :ref:`add_theme_constant_override`. +See :ref:`add_theme_constant_override()`. .. rst-class:: classref-item-separator @@ -2049,7 +2049,7 @@ See :ref:`add_theme_constant_override` in the tree that has a font item with the specified ``name`` and ``theme_type``. -See :ref:`Control.get_theme_color` for details. +See :ref:`Control.get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2063,7 +2063,7 @@ See :ref:`Control.get_theme_color` for det Returns ``true`` if there is a local override for a theme :ref:`Font` with the specified ``name`` in this :ref:`Control` node. -See :ref:`add_theme_font_override`. +See :ref:`add_theme_font_override()`. .. rst-class:: classref-item-separator @@ -2077,7 +2077,7 @@ See :ref:`add_theme_font_override`. Returns ``true`` if there is a matching :ref:`Theme` in the tree that has a font size item with the specified ``name`` and ``theme_type``. -See :ref:`Control.get_theme_color` for details. +See :ref:`Control.get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2091,7 +2091,7 @@ See :ref:`Control.get_theme_color` for det Returns ``true`` if there is a local override for a theme font size with the specified ``name`` in this :ref:`Control` node. -See :ref:`add_theme_font_size_override`. +See :ref:`add_theme_font_size_override()`. .. rst-class:: classref-item-separator @@ -2105,7 +2105,7 @@ See :ref:`add_theme_font_size_override` in the tree that has an icon item with the specified ``name`` and ``theme_type``. -See :ref:`Control.get_theme_color` for details. +See :ref:`Control.get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2119,7 +2119,7 @@ See :ref:`Control.get_theme_color` for det Returns ``true`` if there is a local override for a theme icon with the specified ``name`` in this :ref:`Control` node. -See :ref:`add_theme_icon_override`. +See :ref:`add_theme_icon_override()`. .. rst-class:: classref-item-separator @@ -2133,7 +2133,7 @@ See :ref:`add_theme_icon_override`. Returns ``true`` if there is a matching :ref:`Theme` in the tree that has a stylebox item with the specified ``name`` and ``theme_type``. -See :ref:`Control.get_theme_color` for details. +See :ref:`Control.get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2147,7 +2147,7 @@ See :ref:`Control.get_theme_color` for det Returns ``true`` if there is a local override for a theme :ref:`StyleBox` with the specified ``name`` in this :ref:`Control` node. -See :ref:`add_theme_stylebox_override`. +See :ref:`add_theme_stylebox_override()`. .. rst-class:: classref-item-separator @@ -2159,7 +2159,7 @@ See :ref:`add_theme_stylebox_override` -Hides the window. This is not the same as minimized state. Hidden window can't be interacted with and needs to be made visible with :ref:`show`. +Hides the window. This is not the same as minimized state. Hidden window can't be interacted with and needs to be made visible with :ref:`show()`. .. rst-class:: classref-item-separator @@ -2207,7 +2207,7 @@ Returns ``true`` if the window can be maximized (the maximize button is enabled) :ref:`bool` **is_using_font_oversampling**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if font oversampling is enabled. See :ref:`set_use_font_oversampling`. +Returns ``true`` if font oversampling is enabled. See :ref:`set_use_font_oversampling()`. .. rst-class:: classref-item-separator @@ -2231,7 +2231,7 @@ Centers a native window on the current screen and an embedded window on its embe |void| **move_to_foreground**\ (\ ) :ref:`πŸ”—` -**Deprecated:** Use :ref:`grab_focus` instead. +**Deprecated:** Use :ref:`grab_focus()` instead. Causes the window to grab focus, allowing it to receive user input. @@ -2305,9 +2305,9 @@ If **Window** is a native window, popups the **Window** centered inside the scre |void| **popup_exclusive**\ (\ from_node\: :ref:`Node`, rect\: :ref:`Rect2i` = Rect2i(0, 0, 0, 0)\ ) :ref:`πŸ”—` -Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup` on it. The dialog must have no current parent, otherwise the method fails. +Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup()` on it. The dialog must have no current parent, otherwise the method fails. -See also :ref:`set_unparent_when_invisible` and :ref:`Node.get_last_exclusive_window`. +See also :ref:`set_unparent_when_invisible()` and :ref:`Node.get_last_exclusive_window()`. .. rst-class:: classref-item-separator @@ -2319,9 +2319,9 @@ See also :ref:`set_unparent_when_invisible`, minsize\: :ref:`Vector2i` = Vector2i(0, 0)\ ) :ref:`πŸ”—` -Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup_centered` on it. The dialog must have no current parent, otherwise the method fails. +Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup_centered()` on it. The dialog must have no current parent, otherwise the method fails. -See also :ref:`set_unparent_when_invisible` and :ref:`Node.get_last_exclusive_window`. +See also :ref:`set_unparent_when_invisible()` and :ref:`Node.get_last_exclusive_window()`. .. rst-class:: classref-item-separator @@ -2333,9 +2333,9 @@ See also :ref:`set_unparent_when_invisible`, minsize\: :ref:`Vector2i` = Vector2i(0, 0), fallback_ratio\: :ref:`float` = 0.75\ ) :ref:`πŸ”—` -Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup_centered_clamped` on it. The dialog must have no current parent, otherwise the method fails. +Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup_centered_clamped()` on it. The dialog must have no current parent, otherwise the method fails. -See also :ref:`set_unparent_when_invisible` and :ref:`Node.get_last_exclusive_window`. +See also :ref:`set_unparent_when_invisible()` and :ref:`Node.get_last_exclusive_window()`. .. rst-class:: classref-item-separator @@ -2347,9 +2347,9 @@ See also :ref:`set_unparent_when_invisible`, ratio\: :ref:`float` = 0.8\ ) :ref:`πŸ”—` -Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup_centered_ratio` on it. The dialog must have no current parent, otherwise the method fails. +Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup_centered_ratio()` on it. The dialog must have no current parent, otherwise the method fails. -See also :ref:`set_unparent_when_invisible` and :ref:`Node.get_last_exclusive_window`. +See also :ref:`set_unparent_when_invisible()` and :ref:`Node.get_last_exclusive_window()`. .. rst-class:: classref-item-separator @@ -2361,9 +2361,9 @@ See also :ref:`set_unparent_when_invisible`, parent_rect\: :ref:`Rect2i`\ ) :ref:`πŸ”—` -Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup_on_parent` on it. The dialog must have no current parent, otherwise the method fails. +Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup_on_parent()` on it. The dialog must have no current parent, otherwise the method fails. -See also :ref:`set_unparent_when_invisible` and :ref:`Node.get_last_exclusive_window`. +See also :ref:`set_unparent_when_invisible()` and :ref:`Node.get_last_exclusive_window()`. .. rst-class:: classref-item-separator @@ -2375,7 +2375,7 @@ See also :ref:`set_unparent_when_invisible`\ ) :ref:`πŸ”—` -Popups the **Window** with a position shifted by parent **Window**'s position. If the **Window** is embedded, has the same effect as :ref:`popup`. +Popups the **Window** with a position shifted by parent **Window**'s position. If the **Window** is embedded, has the same effect as :ref:`popup()`. .. rst-class:: classref-item-separator @@ -2387,7 +2387,7 @@ Popups the **Window** with a position shifted by parent **Window**'s position. I |void| **remove_theme_color_override**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Removes a local override for a theme :ref:`Color` with the specified ``name`` previously added by :ref:`add_theme_color_override` or via the Inspector dock. +Removes a local override for a theme :ref:`Color` with the specified ``name`` previously added by :ref:`add_theme_color_override()` or via the Inspector dock. .. rst-class:: classref-item-separator @@ -2399,7 +2399,7 @@ Removes a local override for a theme :ref:`Color` with the specifie |void| **remove_theme_constant_override**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Removes a local override for a theme constant with the specified ``name`` previously added by :ref:`add_theme_constant_override` or via the Inspector dock. +Removes a local override for a theme constant with the specified ``name`` previously added by :ref:`add_theme_constant_override()` or via the Inspector dock. .. rst-class:: classref-item-separator @@ -2411,7 +2411,7 @@ Removes a local override for a theme constant with the specified ``name`` previo |void| **remove_theme_font_override**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Removes a local override for a theme :ref:`Font` with the specified ``name`` previously added by :ref:`add_theme_font_override` or via the Inspector dock. +Removes a local override for a theme :ref:`Font` with the specified ``name`` previously added by :ref:`add_theme_font_override()` or via the Inspector dock. .. rst-class:: classref-item-separator @@ -2423,7 +2423,7 @@ Removes a local override for a theme :ref:`Font` with the specified |void| **remove_theme_font_size_override**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Removes a local override for a theme font size with the specified ``name`` previously added by :ref:`add_theme_font_size_override` or via the Inspector dock. +Removes a local override for a theme font size with the specified ``name`` previously added by :ref:`add_theme_font_size_override()` or via the Inspector dock. .. rst-class:: classref-item-separator @@ -2435,7 +2435,7 @@ Removes a local override for a theme font size with the specified ``name`` previ |void| **remove_theme_icon_override**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Removes a local override for a theme icon with the specified ``name`` previously added by :ref:`add_theme_icon_override` or via the Inspector dock. +Removes a local override for a theme icon with the specified ``name`` previously added by :ref:`add_theme_icon_override()` or via the Inspector dock. .. rst-class:: classref-item-separator @@ -2447,7 +2447,7 @@ Removes a local override for a theme icon with the specified ``name`` previously |void| **remove_theme_stylebox_override**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Removes a local override for a theme :ref:`StyleBox` with the specified ``name`` previously added by :ref:`add_theme_stylebox_override` or via the Inspector dock. +Removes a local override for a theme :ref:`StyleBox` with the specified ``name`` previously added by :ref:`add_theme_stylebox_override()` or via the Inspector dock. .. rst-class:: classref-item-separator @@ -2471,7 +2471,7 @@ Tells the OS that the **Window** needs an attention. This makes the window stand |void| **reset_size**\ (\ ) :ref:`πŸ”—` -Resets the size to the minimum size, which is the max of :ref:`min_size` and (if :ref:`wrap_controls` is enabled) :ref:`get_contents_minimum_size`. This is equivalent to calling ``set_size(Vector2i())`` (or any size below the minimum). +Resets the size to the minimum size, which is the max of :ref:`min_size` and (if :ref:`wrap_controls` is enabled) :ref:`get_contents_minimum_size()`. This is equivalent to calling ``set_size(Vector2i())`` (or any size below the minimum). .. rst-class:: classref-item-separator @@ -2533,7 +2533,7 @@ Sets layout direction and text writing direction. Right-to-left layouts are nece If ``unparent`` is ``true``, the window is automatically unparented when going invisible. -\ **Note:** Make sure to keep a reference to the node, otherwise it will be orphaned. You also need to manually call :ref:`Node.queue_free` to free the window if it's not parented. +\ **Note:** Make sure to keep a reference to the node, otherwise it will be orphaned. You also need to manually call :ref:`Node.queue_free()` to free the window if it's not parented. .. rst-class:: classref-item-separator @@ -2557,7 +2557,7 @@ Enables font oversampling. This makes fonts look better when they are scaled up. |void| **show**\ (\ ) :ref:`πŸ”—` -Makes the **Window** appear. This enables interactions with the **Window** and doesn't change any of its property other than visibility (unlike e.g. :ref:`popup`). +Makes the **Window** appear. This enables interactions with the **Window** and doesn't change any of its property other than visibility (unlike e.g. :ref:`popup()`). .. rst-class:: classref-item-separator diff --git a/classes/class_workerthreadpool.rst b/classes/class_workerthreadpool.rst index 8aa1dbc4a..f063276a8 100644 --- a/classes/class_workerthreadpool.rst +++ b/classes/class_workerthreadpool.rst @@ -120,7 +120,7 @@ The number of threads the task is distributed to is defined by ``tasks_needed``, Returns a group task ID that can be used by other methods. -\ **Warning:** Every task must be waited for completion using :ref:`wait_for_task_completion` or :ref:`wait_for_group_task_completion` at some point so that any allocated resources inside the task can be cleaned up. +\ **Warning:** Every task must be waited for completion using :ref:`wait_for_task_completion()` or :ref:`wait_for_group_task_completion()` at some point so that any allocated resources inside the task can be cleaned up. .. rst-class:: classref-item-separator @@ -136,7 +136,7 @@ Adds ``action`` as a task to be executed by a worker thread. ``high_priority`` d Returns a task ID that can be used by other methods. -\ **Warning:** Every task must be waited for completion using :ref:`wait_for_task_completion` or :ref:`wait_for_group_task_completion` at some point so that any allocated resources inside the task can be cleaned up. +\ **Warning:** Every task must be waited for completion using :ref:`wait_for_task_completion()` or :ref:`wait_for_group_task_completion()` at some point so that any allocated resources inside the task can be cleaned up. .. rst-class:: classref-item-separator diff --git a/classes/class_world2d.rst b/classes/class_world2d.rst index 4413b96ed..5bb0db8cd 100644 --- a/classes/class_world2d.rst +++ b/classes/class_world2d.rst @@ -81,7 +81,7 @@ The :ref:`RID` of this world's canvas resource. Used by the :ref:`Ren - :ref:`PhysicsDirectSpaceState2D` **get_direct_space_state**\ (\ ) -Direct access to the world's physics 2D space state. Used for querying current and potential collisions. When using multi-threaded physics, access is limited to :ref:`Node._physics_process` in the main thread. +Direct access to the world's physics 2D space state. Used for querying current and potential collisions. When using multi-threaded physics, access is limited to :ref:`Node._physics_process()` in the main thread. .. rst-class:: classref-item-separator diff --git a/classes/class_world3d.rst b/classes/class_world3d.rst index db863832d..798932e7a 100644 --- a/classes/class_world3d.rst +++ b/classes/class_world3d.rst @@ -88,7 +88,7 @@ The default :ref:`CameraAttributes` resource to use if n - :ref:`PhysicsDirectSpaceState3D` **get_direct_space_state**\ (\ ) -Direct access to the world's physics 3D space state. Used for querying current and potential collisions. When using multi-threaded physics, access is limited to :ref:`Node._physics_process` in the main thread. +Direct access to the world's physics 3D space state. Used for querying current and potential collisions. When using multi-threaded physics, access is limited to :ref:`Node._physics_process()` in the main thread. .. rst-class:: classref-item-separator diff --git a/classes/class_x509certificate.rst b/classes/class_x509certificate.rst index e78145802..c31c86e2e 100644 --- a/classes/class_x509certificate.rst +++ b/classes/class_x509certificate.rst @@ -21,7 +21,7 @@ Description The X509Certificate class represents an X509 certificate. Certificates can be loaded and saved like any other :ref:`Resource`. -They can be used as the server certificate in :ref:`StreamPeerTLS.accept_stream` (along with the proper :ref:`CryptoKey`), and to specify the only certificate that should be accepted when connecting to a TLS server via :ref:`StreamPeerTLS.connect_to_stream`. +They can be used as the server certificate in :ref:`StreamPeerTLS.accept_stream()` (along with the proper :ref:`CryptoKey`), and to specify the only certificate that should be accepted when connecting to a TLS server via :ref:`StreamPeerTLS.connect_to_stream()`. .. rst-class:: classref-introduction-group diff --git a/classes/class_xmlparser.rst b/classes/class_xmlparser.rst index 6fe88965d..9030741a7 100644 --- a/classes/class_xmlparser.rst +++ b/classes/class_xmlparser.rst @@ -21,7 +21,7 @@ Description Provides a low-level interface for creating parsers for `XML `__ files. This class can serve as base to make custom XML parsers. -To parse XML, you must open a file with the :ref:`open` 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. +To parse XML, you must open a file with the :ref:`open()` 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 an SVG file (which is based on XML), printing each element and its attributes as a dictionary: diff --git a/classes/class_xrinterface.rst b/classes/class_xrinterface.rst index 83ffa387f..faad8b998 100644 --- a/classes/class_xrinterface.rst +++ b/classes/class_xrinterface.rst @@ -190,7 +190,7 @@ This interface supports AR (video background and real world tracking). :ref:`Capabilities` **XR_EXTERNAL** = ``32`` -This interface outputs to an external device. If the main viewport is used, the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of :ref:`get_render_target_size`). Using a separate viewport node frees up the main viewport for other purposes. +This interface outputs to an external device. If the main viewport is used, the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of :ref:`get_render_target_size()`). Using a separate viewport node frees up the main viewport for other purposes. .. rst-class:: classref-item-separator @@ -290,7 +290,7 @@ Player is free to move around, full positional tracking. :ref:`PlayAreaMode` **XR_PLAY_AREA_STAGE** = ``4`` -Same as :ref:`XR_PLAY_AREA_ROOMSCALE` but origin point is fixed to the center of the physical space. In this mode, system-level recentering may be disabled, requiring the use of :ref:`XRServer.center_on_hmd`. +Same as :ref:`XR_PLAY_AREA_ROOMSCALE` but origin point is fixed to the center of the physical space. In this mode, system-level recentering may be disabled, requiring the use of :ref:`XRServer.center_on_hmd()`. .. rst-class:: classref-item-separator @@ -500,7 +500,7 @@ Returns the an array of supported environment blend modes, see :ref:`Environment Returns a :ref:`Dictionary` with extra system info. Interfaces are expected to return ``XRRuntimeName`` and ``XRRuntimeVersion`` providing info about the used XR runtime. Additional entries may be provided specific to an interface. -\ **Note:**\ This information may only be available after :ref:`initialize` was successfully called. +\ **Note:**\ This information may only be available after :ref:`initialize()` was successfully called. .. rst-class:: classref-item-separator @@ -598,7 +598,7 @@ Returns ``true`` if passthrough is enabled. :ref:`bool` **is_passthrough_supported**\ (\ ) :ref:`πŸ”—` -**Deprecated:** Check that :ref:`XR_ENV_BLEND_MODE_ALPHA_BLEND` is supported using :ref:`get_supported_environment_blend_modes`, instead. +**Deprecated:** Check that :ref:`XR_ENV_BLEND_MODE_ALPHA_BLEND` is supported using :ref:`get_supported_environment_blend_modes()`, instead. Returns ``true`` if this interface supports passthrough. @@ -644,7 +644,7 @@ Sets the active environment blend mode. Sets the active play area mode, will return ``false`` if the mode can't be used with this interface. -\ **Note:** Changing this after the interface has already been initialized can be jarring for the player, so it's recommended to recenter on the HMD with :ref:`XRServer.center_on_hmd` (if switching to :ref:`XR_PLAY_AREA_STAGE`) or make the switch during a scene change. +\ **Note:** Changing this after the interface has already been initialized can be jarring for the player, so it's recommended to recenter on the HMD with :ref:`XRServer.center_on_hmd()` (if switching to :ref:`XR_PLAY_AREA_STAGE`) or make the switch during a scene change. .. rst-class:: classref-item-separator diff --git a/classes/class_xrserver.rst b/classes/class_xrserver.rst index 4028974ce..bab4fc923 100644 --- a/classes/class_xrserver.rst +++ b/classes/class_xrserver.rst @@ -428,7 +428,7 @@ You should call this method after a few seconds have passed. For example, when t |void| **clear_reference_frame**\ (\ ) :ref:`πŸ”—` -Clears the reference frame that was set by previous calls to :ref:`center_on_hmd`. +Clears the reference frame that was set by previous calls to :ref:`center_on_hmd()`. .. rst-class:: classref-item-separator diff --git a/classes/class_zippacker.rst b/classes/class_zippacker.rst index 9eb302994..e82d8aabc 100644 --- a/classes/class_zippacker.rst +++ b/classes/class_zippacker.rst @@ -152,7 +152,7 @@ This must be called before everything else. Starts writing to a file within the archive. Only one file can be written at the same time. -Must be called after :ref:`open`. +Must be called after :ref:`open()`. .. rst-class:: classref-item-separator @@ -166,7 +166,7 @@ Must be called after :ref:`open`. Write the given ``data`` to the file. -Needs to be called after :ref:`start_file`. +Needs to be called after :ref:`start_file()`. .. |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_zipreader.rst b/classes/class_zipreader.rst index 84d54eeea..c3e7273bc 100644 --- a/classes/class_zipreader.rst +++ b/classes/class_zipreader.rst @@ -108,7 +108,7 @@ Closes the underlying resources used by this instance. Returns ``true`` if the file exists in the loaded zip archive. -Must be called after :ref:`open`. +Must be called after :ref:`open()`. .. rst-class:: classref-item-separator @@ -122,7 +122,7 @@ Must be called after :ref:`open`. Returns the list of names of all files in the loaded archive. -Must be called after :ref:`open`. +Must be called after :ref:`open()`. .. rst-class:: classref-item-separator @@ -148,7 +148,7 @@ Opens the zip archive at the given ``path`` and reads its file index. Loads the whole content of a file in the loaded zip archive into memory and returns it. -Must be called after :ref:`open`. +Must be called after :ref:`open()`. .. |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.)`