diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7dbec5c5c2d..87ae495bf06 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: - name: Linter checks run: | bash _tools/format.sh - codespell -I _tools/codespell-ignore.txt -x _tools/codespell-ignore-lines.txt {about,community,development,getting_started,tutorials}/**/*.rst + codespell -I _tools/codespell-ignore.txt -x _tools/codespell-ignore-lines.txt -S tutorials/i18n/locales.rst {about,community,development,getting_started,tutorials}/**/*.rst # Use dummy builder to improve performance as we don't need the generated HTML in this workflow. - name: Sphinx build diff --git a/.gitignore b/.gitignore index 94c3fee6bc2..b9e2fbe6c42 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,6 @@ tmp-unused-images-history # User created Python virtual environement as described in the docs godot-docs-venv/ + +# Jetbrains IDE files +/.idea/ diff --git a/_static/css/custom.css b/_static/css/custom.css index b2134a1551c..815d26eebce 100644 --- a/_static/css/custom.css +++ b/_static/css/custom.css @@ -112,7 +112,7 @@ --copybtn-tooltip-background-color: #24292f; --copybtn-box-shadow: 0 1px 0 rgba(27,31,36,0.04), inset 0 1px 0 rgba(255,255,255,0.25); --copybtn-border-color-success: #2da44e; - + --contribute-background-color: #d7dee8; --contribute-text-color: #646e72; @@ -1714,7 +1714,7 @@ p + .classref-constant { left: 3.5px; top: 3.5px; color: var(--copybtn-icon-color); - pointer-events: none; + pointer-events: none; } .highlight button.copybtn.success { border-color: var(--copybtn-border-color-success); @@ -1729,3 +1729,29 @@ p + .classref-constant { border-radius: 6px; padding: 0.5em 0.75em; } + +/* Allow :abbr: tags' content to be displayed on mobile platforms by tapping the word */ +@media (hover: none), (hover: on-demand), (-moz-touch-enabled: 1), (pointer:coarse) { + /* Do not enable on desktop platforms to avoid doubling the tooltip */ + abbr[title] { + position: relative; + } + + abbr[title]:hover::after, + abbr[title]:focus::after { + content: attr(title); + + position: absolute; + left: 0; + bottom: -32px; + width: auto; + white-space: nowrap; + + background-color: #1e1e1e; + color: #fff; + border-radius: 3px; + box-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.4); + font-size: 14px; + padding: 3px 5px; + } +} diff --git a/_tools/codespell-ignore-lines.txt b/_tools/codespell-ignore-lines.txt index e8b1816ef75..dc72b48eec3 100644 --- a/_tools/codespell-ignore-lines.txt +++ b/_tools/codespell-ignore-lines.txt @@ -1,20 +1 @@ -| ba | Bashkir | -| dum | Middle Dutch | -| fo | Faroese | -| fro | Old French | -| inh | Ingush | -| mye | Myene | -| nd | North Ndebele | -| ro | Romanian | -| seh | Sena | -| shs | Shuswap | -| te | Telugu | -| tem | Timne | -| Beng | Bengali | -| Maka | Makasar | -| BA | Bosnia and Herzegovina | -| FO | Faroe Islands | -| MM, BU | Myanmar | -| RO | Romania | -| VN | Viet Nam | .. image:: img/expres.png diff --git a/about/complying_with_licenses.rst b/about/complying_with_licenses.rst index af180d82d89..0a013277f66 100644 --- a/about/complying_with_licenses.rst +++ b/about/complying_with_licenses.rst @@ -16,6 +16,12 @@ distribute the software (and derivative projects, including games made with it). Your game or project can have a different license, but it still needs to comply with the original one. +.. note:: + + This section covers compliance with licenses from a user perspective. + If you are interested in licence compliance as a contributor, you can find + guidelines :ref:`here `. + .. warning:: In your project's credits screen, remember to also list third-party notices diff --git a/about/introduction.rst b/about/introduction.rst index c6c9accc05a..d4339d46fe9 100644 --- a/about/introduction.rst +++ b/about/introduction.rst @@ -65,7 +65,7 @@ This documentation is organized into several sections: engine to make games. It starts with the :ref:`Step by step ` tutorial which should be the entry point for all new users. **This is the best place to start if you're new!** -- The **Manual** can be read or referenced as needed, +- The **Manual** can be read or referenced as needed, in any order. It contains feature-specific tutorials and documentation. - **Contributing** gives information related to contributing to Godot, whether to the core engine, documentation, demos or other parts. diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index f695dbeb8be..b02122829b2 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -10,7 +10,7 @@ @GDScript ========= -Built-in GDScript functions. +Built-in GDScript constants, functions, and annotations. .. rst-class:: classref-introduction-group @@ -109,7 +109,7 @@ Positive floating-point infinity. This is the result of floating-point division **NAN** = ``nan`` -"Not a Number", an invalid floating-point value. :ref:`NAN` has special properties, including that it is not equal to itself (``NAN == NAN`` returns ``false``). It is output by some invalid operations, such as dividing floating-point ``0.0`` by ``0.0``. +"Not a Number", an invalid floating-point value. :ref:`NAN` has special properties, including that ``!=`` always returns ``true``, while other comparison operators always return ``false``. This is true even when comparing with itself (``NAN == NAN`` returns ``false`` and ``NAN != NAN`` returns ``true``). It is returned by some invalid operations, such as dividing floating-point ``0.0`` by ``0.0``. \ **Warning:** "Not a Number" is only a concept with floating-point numbers, and has no equivalent for integers. Dividing an integer ``0`` by ``0`` will not result in :ref:`NAN` and will result in a run-time error instead. @@ -133,7 +133,7 @@ Mark the following property as exported (editable in the Inspector dock and save @export var string = "" @export var int_number = 5 @export var float_number: float = 5 - @export var image : Image + @export var image: Image .. rst-class:: classref-item-separator @@ -173,7 +173,7 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_COLOR_NO_ALPHA`. + +See also :ref:`@GlobalScope.PROPERTY_HINT_LAYERS_AVOIDANCE`. + +:: + + @export_flags_avoidance var avoidance_layers: int + +.. rst-class:: classref-item-separator + +---- + .. _class_@GDScript_annotation_@export_global_dir: .. rst-class:: classref-annotation @@ -465,7 +483,7 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_GLOBAL_FILE` to add subgroups within groups. @@ -662,6 +680,18 @@ The order of ``mode``, ``sync`` and ``transfer_mode`` does not matter and all ar ---- +.. _class_@GDScript_annotation_@static_unload: + +.. rst-class:: classref-annotation + +**@static_unload** **(** **)** + +Make a script with static variables to not persist after all references are lost. If the script is loaded again the static variables will revert to their default values. + +.. rst-class:: classref-item-separator + +---- + .. _class_@GDScript_annotation_@tool: .. rst-class:: classref-annotation @@ -712,7 +742,7 @@ Method Descriptions :ref:`Color` **Color8** **(** :ref:`int` r8, :ref:`int` g8, :ref:`int` b8, :ref:`int` a8=255 **)** -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. +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`. :: @@ -720,6 +750,8 @@ 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. + .. rst-class:: classref-item-separator ---- @@ -887,7 +919,7 @@ Examples: 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 an 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). @@ -936,6 +968,8 @@ This function is a simplified version of :ref:`ResourceLoader.load`\ 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``. + .. rst-class:: classref-item-separator ---- @@ -1034,8 +1068,8 @@ To iterate over an :ref:`Array` backwards, use: :: var array = [3, 6, 9] - for i in range(array.size(), 0, -1): - print(array[i - 1]) + for i in range(array.size() - 1, -1, -1): + print(array[i]) Output: diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 87e5bfa09fe..1d6c8cb06d9 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -2823,7 +2823,7 @@ Enum value which doesn't correspond to any MIDI message. This is used to initial :ref:`MIDIMessage` **MIDI_MESSAGE_NOTE_OFF** = ``8`` -MIDI note OFF message. See the documentation of :ref:`InputEventMIDI` for information of how to use MIDI inputs. +MIDI note OFF message. Not all MIDI devices send this event; some send :ref:`MIDI_MESSAGE_NOTE_ON` with zero velocity instead. See the documentation of :ref:`InputEventMIDI` for information of how to use MIDI inputs. .. _class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_ON: @@ -2831,7 +2831,7 @@ MIDI note OFF message. See the documentation of :ref:`InputEventMIDI` **MIDI_MESSAGE_NOTE_ON** = ``9`` -MIDI note ON message. See the documentation of :ref:`InputEventMIDI` for information of how to use MIDI inputs. +MIDI note ON message. Some MIDI devices send this event with velocity zero instead of :ref:`MIDI_MESSAGE_NOTE_OFF`, but implementations vary. See the documentation of :ref:`InputEventMIDI` for information of how to use MIDI inputs. .. _class_@GlobalScope_constant_MIDI_MESSAGE_AFTERTOUCH: @@ -3509,6 +3509,14 @@ Hints that an :ref:`int` property is a bitmask using the optionally n Hints that an :ref:`int` property is a bitmask using the optionally named 3D navigation layers. +.. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_AVOIDANCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_LAYERS_AVOIDANCE** = ``37`` + +Hints that an integer property is a bitmask using the optionally named avoidance layers. + .. _class_@GlobalScope_constant_PROPERTY_HINT_FILE: .. rst-class:: classref-enumeration-constant @@ -3714,7 +3722,7 @@ Hints that a string property is a password, and every character is replaced with .. rst-class:: classref-enumeration-constant -:ref:`PropertyHint` **PROPERTY_HINT_MAX** = ``37`` +:ref:`PropertyHint` **PROPERTY_HINT_MAX** = ``38`` Represents the size of the :ref:`PropertyHint` enum. @@ -3758,7 +3766,7 @@ The property is shown in the :ref:`EditorInspector` (defa :ref:`PropertyUsageFlags` **PROPERTY_USAGE_INTERNAL** = ``8`` - +The property is excluded from the class reference. .. _class_@GlobalScope_constant_PROPERTY_USAGE_CHECKABLE: @@ -3960,13 +3968,21 @@ The property is only shown in the editor if modern renderers are supported (the The property is read-only in the :ref:`EditorInspector`. +.. _class_@GlobalScope_constant_PROPERTY_USAGE_SECRET: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_SECRET** = ``536870912`` + +An export preset property with this flag contains confidential information and is stored separately from the rest of the export preset configuration. + .. _class_@GlobalScope_constant_PROPERTY_USAGE_DEFAULT: .. rst-class:: classref-enumeration-constant :ref:`PropertyUsageFlags` **PROPERTY_USAGE_DEFAULT** = ``6`` -Default usage (storage, editor and network). +Default usage (storage and editor). .. _class_@GlobalScope_constant_PROPERTY_USAGE_NO_EDITOR: @@ -3974,7 +3990,7 @@ Default usage (storage, editor and network). :ref:`PropertyUsageFlags` **PROPERTY_USAGE_NO_EDITOR** = ``2`` -Default usage but without showing the property in the editor (storage, network). +Default usage but without showing the property in the editor (storage). .. rst-class:: classref-item-separator @@ -5114,7 +5130,7 @@ Returns the absolute value of int parameter ``x`` (i.e. positive value). :ref:`float` **acos** **(** :ref:`float` x **)** -Returns the arc cosine of ``x`` in radians. Use to get the angle of cosine ``x``. ``x`` must be between ``-1.0`` and ``1.0`` (inclusive), otherwise, :ref:`acos` will return :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`. :: @@ -5131,7 +5147,7 @@ Returns the arc cosine of ``x`` in radians. Use to get the angle of cosine ``x`` :ref:`float` **asin** **(** :ref:`float` x **)** -Returns the arc sine of ``x`` in radians. Use to get the angle of sine ``x``. ``x`` must be between ``-1.0`` and ``1.0`` (inclusive), otherwise, :ref:`asin` will return :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`. :: @@ -5287,7 +5303,7 @@ A type-safe version of :ref:`ceil`, returning an :ref:`Variant` **clamp** **(** :ref:`Variant` value, :ref:`Variant` min, :ref:`Variant` max **)** -Clamps the ``value``, returning a :ref:`Variant` not less than ``min`` and not more than ``max``. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector2i`, :ref:`Vector3`, :ref:`Vector3i`, :ref:`Vector4`, :ref:`Vector4i`. +Clamps the ``value``, returning a :ref:`Variant` not less than ``min`` and not more than ``max``. Any values that can be compared with the less than and greater than operators will work. :: @@ -5309,7 +5325,7 @@ Clamps the ``value``, returning a :ref:`Variant` not less than `` var f = clamp(Vector3i(-7, -8, -9), Vector3i(-1, 2, 3), Vector3i(-4, -5, -6)) # f is (-4, -5, -6) -\ **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`, or :ref:`Vector4i.clamp`. +\ **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`. .. rst-class:: classref-item-separator @@ -5904,7 +5920,7 @@ Linearly interpolates between two values by the factor defined in ``weight``. To :: - lerp(0, 4, 0.75) # Returns 3.0 + 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`. @@ -5939,9 +5955,9 @@ Converts from linear energy to decibels (audio). This can be used to implement v :ref:`float` **log** **(** :ref:`float` x **)** -Returns the natural logarithm of ``x``. This is the amount of time needed to reach a certain level of continuous growth. +Returns the `natural logarithm `__ of ``x`` (base `[i]e[/i] `__, with *e* being approximately 2.71828). This is the amount of time needed to reach a certain level of continuous growth. -\ **Note:** This is not the same as the "log" function on most calculators, which uses a base 10 logarithm. +\ **Note:** This is not the same as the "log" function on most calculators, which uses a base 10 logarithm. To use base 10 logarithm, use ``log(x) / log(10)``. :: @@ -6208,25 +6224,33 @@ Converts one or more arguments of any type to string in the best way possible an void **print_rich** **(** ... **)** |vararg| -Converts one or more arguments of any type to string in the best way possible and prints them to the console. The following BBCode tags are supported: b, i, u, s, indent, code, url, center, right, color, bgcolor, fgcolor. Color tags only support named colors such as ``red``, *not* hexadecimal color codes. Unsupported tags will be left as-is in standard output. +Converts one or more arguments of any type to string in the best way possible and prints them to the console. + +The following BBCode tags are supported: ``b``, ``i``, ``u``, ``s``, ``indent``, ``code``, ``url``, ``center``, ``right``, ``color``, ``bgcolor``, ``fgcolor``. -When printing to standard output, the supported subset of BBCode is converted to ANSI escape codes for the terminal emulator to display. Displaying ANSI escape codes is currently only supported on Linux and macOS. Support for ANSI escape codes may vary across terminal emulators, especially for italic and strikethrough. +Color tags only support the following named colors: ``black``, ``red``, ``green``, ``yellow``, ``blue``, ``magenta``, ``pink``, ``purple``, ``cyan``, ``white``, ``orange``, ``gray``. Hexadecimal color codes are not supported. + +URL tags only support URLs wrapped by a URL tag, not URLs with a different title. + +When printing to standard output, the supported subset of BBCode is converted to ANSI escape codes for the terminal emulator to display. Support for ANSI escape codes varies across terminal emulators, especially for italic and strikethrough. In standard output, ``code`` is represented with faint text but without any font change. Unsupported tags are left as-is in standard output. .. tabs:: .. code-tab:: gdscript - print_rich("[code][b]Hello world![/b][/code]") # Prints out: [b]Hello world![/b] + print_rich("[color=green][b]Hello world![/b][/color]") # Prints out "Hello world!" in green with a bold font .. code-tab:: csharp - GD.PrintRich("[code][b]Hello world![/b][/code]"); // Prints out: [b]Hello world![/b] + GD.PrintRich("[color=green][b]Hello world![/b][/color]"); // Prints out "Hello world!" in green with a bold font \ **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. + .. rst-class:: classref-item-separator ---- @@ -6735,9 +6759,9 @@ Returns ``-1.0`` if ``x`` is negative, ``1.0`` if ``x`` is positive, and ``0.0`` :: - sign(-6.5) # Returns -1.0 - sign(0.0) # Returns 0.0 - sign(6.5) # Returns 1.0 + signf(-6.5) # Returns -1.0 + signf(0.0) # Returns 0.0 + signf(6.5) # Returns 1.0 .. rst-class:: classref-item-separator @@ -6753,9 +6777,9 @@ Returns ``-1`` if ``x`` is negative, ``1`` if ``x`` is positive, and ``0`` if if :: - sign(-6) # Returns -1 - sign(0) # Returns 0 - sign(6) # Returns 1 + signi(-6) # Returns -1 + signi(0) # Returns 0 + signi(6) # Returns 1 .. rst-class:: classref-item-separator @@ -6859,8 +6883,8 @@ A type-safe version of :ref:`snapped`, return :: - snapped(32.0, 2.5) # Returns 32.5 - snapped(3.14159, 0.01) # Returns 3.14 + snappedf(32.0, 2.5) # Returns 32.5 + snappedf(3.14159, 0.01) # Returns 3.14 .. rst-class:: classref-item-separator @@ -6878,8 +6902,8 @@ A type-safe version of :ref:`snapped`, return :: - snapped(53, 16) # Returns 48 - snapped(4096, 100) # Returns 4100 + snappedi(53, 16) # Returns 48 + snappedi(4096, 100) # Returns 4100 .. rst-class:: classref-item-separator diff --git a/classes/class_aabb.rst b/classes/class_aabb.rst index f6746b71dcb..ea5ab670e96 100644 --- a/classes/class_aabb.rst +++ b/classes/class_aabb.rst @@ -10,7 +10,7 @@ AABB ==== -Axis-Aligned Bounding Box. +A 3D axis-aligned bounding box. .. rst-class:: classref-introduction-group @@ -502,7 +502,7 @@ Returns ``true`` if the **AABB** is on both sides of a plane. :ref:`Variant` **intersects_ray** **(** :ref:`Vector3` from, :ref:`Vector3` dir **)** |const| -Returns ``true`` if the given ray intersects with this **AABB**. Ray length is infinite. +Returns the point of intersection of the given ray with this **AABB** or ``null`` if there is no intersection. Ray length is infinite. .. rst-class:: classref-item-separator @@ -514,7 +514,7 @@ Returns ``true`` if the given ray intersects with this **AABB**. Ray length is i :ref:`Variant` **intersects_segment** **(** :ref:`Vector3` from, :ref:`Vector3` to **)** |const| -Returns ``true`` if the **AABB** intersects the line segment between ``from`` and ``to``. +Returns the point of intersection between ``from`` and ``to`` with this **AABB** or ``null`` if there is no intersection. .. rst-class:: classref-item-separator @@ -567,7 +567,7 @@ Operator Descriptions :ref:`bool` **operator !=** **(** :ref:`AABB` right **)** -Returns ``true`` if the vectors are not equal. +Returns ``true`` if the AABBs are not equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. diff --git a/classes/class_acceptdialog.rst b/classes/class_acceptdialog.rst index 0ab313ec234..b7742ded138 100644 --- a/classes/class_acceptdialog.rst +++ b/classes/class_acceptdialog.rst @@ -14,14 +14,14 @@ AcceptDialog **Inherited By:** :ref:`ConfirmationDialog` -Base dialog for user notification. +A base dialog used for user notification. .. rst-class:: classref-introduction-group Description ----------- -This dialog is useful for small notifications to the user about an event. It can only be accepted or closed, with the same result. +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 diff --git a/classes/class_aescontext.rst b/classes/class_aescontext.rst index 9a2f1fdc8a4..7face9d113d 100644 --- a/classes/class_aescontext.rst +++ b/classes/class_aescontext.rst @@ -12,14 +12,14 @@ AESContext **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Interface to low level AES encryption features. +Provides access to AES encryption/decryption of raw data. .. rst-class:: classref-introduction-group Description ----------- -This class provides access to AES encryption/decryption of raw data. Both AES-ECB and AES-CBC mode are supported. +This class holds the context information required for encryption and decryption operations with AES (Advanced Encryption Standard). Both AES-ECB and AES-CBC modes are supported. .. tabs:: @@ -34,27 +34,27 @@ This class provides access to AES encryption/decryption of raw data. Both AES-EC var key = "My secret key!!!" # Key must be either 16 or 32 bytes. var data = "My secret text!!" # Data size must be multiple of 16 bytes, apply padding if needed. # Encrypt ECB - aes.start(AESContext.MODE_ECB_ENCRYPT, key.to_utf8()) - var encrypted = aes.update(data.to_utf8()) + aes.start(AESContext.MODE_ECB_ENCRYPT, key.to_utf8_buffer()) + var encrypted = aes.update(data.to_utf8_buffer()) aes.finish() # Decrypt ECB - aes.start(AESContext.MODE_ECB_DECRYPT, key.to_utf8()) + aes.start(AESContext.MODE_ECB_DECRYPT, key.to_utf8_buffer()) var decrypted = aes.update(encrypted) aes.finish() # Check ECB - assert(decrypted == data.to_utf8()) + assert(decrypted == data.to_utf8_buffer()) var iv = "My secret iv!!!!" # IV must be of exactly 16 bytes. # Encrypt CBC - aes.start(AESContext.MODE_CBC_ENCRYPT, key.to_utf8(), iv.to_utf8()) - encrypted = aes.update(data.to_utf8()) + aes.start(AESContext.MODE_CBC_ENCRYPT, key.to_utf8_buffer(), iv.to_utf8_buffer()) + encrypted = aes.update(data.to_utf8_buffer()) aes.finish() # Decrypt CBC - aes.start(AESContext.MODE_CBC_DECRYPT, key.to_utf8(), iv.to_utf8()) + aes.start(AESContext.MODE_CBC_DECRYPT, key.to_utf8_buffer(), iv.to_utf8_buffer()) decrypted = aes.update(encrypted) aes.finish() # Check CBC - assert(decrypted == data.to_utf8()) + assert(decrypted == data.to_utf8_buffer()) .. code-tab:: csharp @@ -70,27 +70,27 @@ This class provides access to AES encryption/decryption of raw data. Both AES-EC string key = "My secret key!!!"; // Key must be either 16 or 32 bytes. string data = "My secret text!!"; // Data size must be multiple of 16 bytes, apply padding if needed. // Encrypt ECB - _aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8()); - byte[] encrypted = _aes.Update(data.ToUtf8()); + _aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer()); + byte[] encrypted = _aes.Update(data.ToUtf8Buffer()); _aes.Finish(); // Decrypt ECB - _aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8()); + _aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8Buffer()); byte[] decrypted = _aes.Update(encrypted); _aes.Finish(); // Check ECB - Debug.Assert(decrypted == data.ToUtf8()); + Debug.Assert(decrypted == data.ToUtf8Buffer()); string iv = "My secret iv!!!!"; // IV must be of exactly 16 bytes. // Encrypt CBC - _aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8(), iv.ToUtf8()); - encrypted = _aes.Update(data.ToUtf8()); + _aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer(), iv.ToUtf8Buffer()); + encrypted = _aes.Update(data.ToUtf8Buffer()); _aes.Finish(); // Decrypt CBC - _aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8(), iv.ToUtf8()); + _aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8Buffer(), iv.ToUtf8Buffer()); decrypted = _aes.Update(encrypted); _aes.Finish(); // Check CBC - Debug.Assert(decrypted == data.ToUtf8()); + Debug.Assert(decrypted == data.ToUtf8Buffer()); } } diff --git a/classes/class_animatablebody2d.rst b/classes/class_animatablebody2d.rst index 11264de808f..88eafe26ae4 100644 --- a/classes/class_animatablebody2d.rst +++ b/classes/class_animatablebody2d.rst @@ -12,18 +12,16 @@ AnimatableBody2D **Inherits:** :ref:`StaticBody2D` **<** :ref:`PhysicsBody2D` **<** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Physics body for 2D physics which moves only by script or animation. Useful for moving platforms and doors. +A 2D physics body that can't be moved by external forces. When moved manually, it affects other bodies in its path. .. rst-class:: classref-introduction-group Description ----------- -Animatable body for 2D physics. +An animatable 2D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationPlayer`\ s (with :ref:`AnimationPlayer.playback_process_mode` set to ``ANIMATION_PROCESS_PHYSICS``), and :ref:`RemoteTransform2D`. -An animatable body can't be moved by external forces or contacts, but can be moved by script or animation to affect other bodies in its path. It is ideal for implementing moving objects in the environment, such as moving platforms or doors. - -When the body is moved manually, either from code or from an :ref:`AnimationPlayer` (with :ref:`AnimationPlayer.playback_process_mode` set to ``physics``), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). +When **AnimatableBody2D** is moved, its linear and angular velocity are estimated and used to affect other physics bodies in its path. This makes it useful for moving platforms, doors, and other moving objects. .. rst-class:: classref-reftable-group diff --git a/classes/class_animatablebody3d.rst b/classes/class_animatablebody3d.rst index 347d2a310aa..38153de4ecb 100644 --- a/classes/class_animatablebody3d.rst +++ b/classes/class_animatablebody3d.rst @@ -12,20 +12,16 @@ AnimatableBody3D **Inherits:** :ref:`StaticBody3D` **<** :ref:`PhysicsBody3D` **<** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -Physics body for 3D physics which moves only by script or animation. Useful for moving platforms and doors. +A 3D physics body that can't be moved by external forces. When moved manually, it affects other bodies in its path. .. rst-class:: classref-introduction-group Description ----------- -Animatable body for 3D physics. +An animatable 3D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationPlayer`\ s (with :ref:`AnimationPlayer.playback_process_mode` set to ``ANIMATION_PROCESS_PHYSICS``), and :ref:`RemoteTransform3D`. -An animatable body can't be moved by external forces or contacts, but can be moved by script or animation to affect other bodies in its path. It is ideal for implementing moving objects in the environment, such as moving platforms or doors. - -When the body is moved manually, either from code or from an :ref:`AnimationPlayer` (with :ref:`AnimationPlayer.playback_process_mode` set to ``physics``), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). - -\ **Warning:** With a non-uniform scale this node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size(s) of its collision shape(s) instead. +When **AnimatableBody3D** is moved, its linear and angular velocity are estimated and used to affect other physics bodies in its path. This makes it useful for moving platforms, doors, and other moving objects. .. rst-class:: classref-introduction-group diff --git a/classes/class_animatedtexture.rst b/classes/class_animatedtexture.rst index 2aa6bdcfa5d..8e2f91c84b7 100644 --- a/classes/class_animatedtexture.rst +++ b/classes/class_animatedtexture.rst @@ -27,7 +27,9 @@ The playback of the animation is controlled by the :ref:`speed_scale`\ s. Each frame needs to be a separate :ref:`Texture2D`. -\ **Warning:** AnimatedTexture is deprecated, and might be removed in a future release. Its current implementation is not efficient for the modern renderers. +\ **Warning:** The current implementation is not efficient for the modern renderers. + +\ *Deprecated.* This class is deprecated, and might be removed in a future release. .. rst-class:: classref-reftable-group diff --git a/classes/class_animation.rst b/classes/class_animation.rst index b0d9235d3d7..b4e3691a461 100644 --- a/classes/class_animation.rst +++ b/classes/class_animation.rst @@ -12,14 +12,14 @@ Animation **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Contains data used to animate everything in the engine. +Holds data that can be used to animate anything in the engine. .. rst-class:: classref-introduction-group Description ----------- -An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track. +This resource holds data that can be used to animate anything in the engine. Animations are divided into tracks and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track. .. tabs:: @@ -126,6 +126,8 @@ Methods +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`blend_shape_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`float` amount **)** | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`blend_shape_track_interpolate` **(** :ref:`int` track_idx, :ref:`float` time_sec **)** |const| | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear` **(** **)** | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`compress` **(** :ref:`int` page_size=8192, :ref:`int` fps=120, :ref:`float` split_tolerance=4.0 **)** | @@ -142,12 +144,18 @@ Methods +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`position_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Vector3` position **)** | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`position_track_interpolate` **(** :ref:`int` track_idx, :ref:`float` time_sec **)** |const| | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_track` **(** :ref:`int` track_idx **)** | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rotation_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Quaternion` rotation **)** | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`rotation_track_interpolate` **(** :ref:`int` track_idx, :ref:`float` time_sec **)** |const| | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`scale_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Vector3` scale **)** | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`scale_track_interpolate` **(** :ref:`int` track_idx, :ref:`float` time_sec **)** |const| | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`track_find_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`FindMode` find_mode=0 **)** |const| | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`track_get_interpolation_loop_wrap` **(** :ref:`int` track_idx **)** |const| | @@ -825,6 +833,18 @@ Inserts a key in a given blend shape track. Returns the key index. ---- +.. _class_Animation_method_blend_shape_track_interpolate: + +.. rst-class:: classref-method + +:ref:`float` **blend_shape_track_interpolate** **(** :ref:`int` track_idx, :ref:`float` time_sec **)** |const| + +Returns the interpolated blend shape value at the given time (in seconds). The ``track_idx`` must be the index of a blend shape track. + +.. rst-class:: classref-item-separator + +---- + .. _class_Animation_method_clear: .. rst-class:: classref-method @@ -923,6 +943,18 @@ Inserts a key in a given 3D position track. Returns the key index. ---- +.. _class_Animation_method_position_track_interpolate: + +.. rst-class:: classref-method + +:ref:`Vector3` **position_track_interpolate** **(** :ref:`int` track_idx, :ref:`float` time_sec **)** |const| + +Returns the interpolated position value at the given time (in seconds). The ``track_idx`` must be the index of a 3D position track. + +.. rst-class:: classref-item-separator + +---- + .. _class_Animation_method_remove_track: .. rst-class:: classref-method @@ -947,6 +979,18 @@ Inserts a key in a given 3D rotation track. Returns the key index. ---- +.. _class_Animation_method_rotation_track_interpolate: + +.. rst-class:: classref-method + +:ref:`Quaternion` **rotation_track_interpolate** **(** :ref:`int` track_idx, :ref:`float` time_sec **)** |const| + +Returns the interpolated rotation value at the given time (in seconds). The ``track_idx`` must be the index of a 3D rotation track. + +.. rst-class:: classref-item-separator + +---- + .. _class_Animation_method_scale_track_insert_key: .. rst-class:: classref-method @@ -959,6 +1003,18 @@ Inserts a key in a given 3D scale track. Returns the key index. ---- +.. _class_Animation_method_scale_track_interpolate: + +.. rst-class:: classref-method + +:ref:`Vector3` **scale_track_interpolate** **(** :ref:`int` track_idx, :ref:`float` time_sec **)** |const| + +Returns the interpolated scale value at the given time (in seconds). The ``track_idx`` must be the index of a 3D scale track. + +.. rst-class:: classref-item-separator + +---- + .. _class_Animation_method_track_find_key: .. rst-class:: classref-method diff --git a/classes/class_animationnode.rst b/classes/class_animationnode.rst index 223eab5fb41..23f52a02932 100644 --- a/classes/class_animationnode.rst +++ b/classes/class_animationnode.rst @@ -14,7 +14,7 @@ AnimationNode **Inherited By:** :ref:`AnimationNodeOutput`, :ref:`AnimationNodeSync`, :ref:`AnimationNodeTimeScale`, :ref:`AnimationNodeTimeSeek`, :ref:`AnimationRootNode` -Base resource for :ref:`AnimationTree` nodes. +Base class for :ref:`AnimationTree` nodes. Not related to scene nodes. .. rst-class:: classref-introduction-group @@ -23,14 +23,14 @@ Description Base resource for :ref:`AnimationTree` nodes. In general, it's not used directly, but you can create custom ones with custom blending formulas. -Inherit this when creating nodes mainly for use in :ref:`AnimationNodeBlendTree`, otherwise :ref:`AnimationRootNode` should be used instead. +Inherit this when creating animation nodes mainly for use in :ref:`AnimationNodeBlendTree`, otherwise :ref:`AnimationRootNode` should be used instead. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`AnimationTree <../tutorials/animation/animation_tree>` +- :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` .. rst-class:: classref-reftable-group @@ -52,49 +52,49 @@ Methods .. table:: :widths: auto - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_caption` **(** **)** |virtual| |const| | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AnimationNode` | :ref:`_get_child_by_name` **(** :ref:`StringName` name **)** |virtual| |const| | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_get_child_nodes` **(** **)** |virtual| |const| | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_get_parameter_default_value` **(** :ref:`StringName` parameter **)** |virtual| |const| | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`_get_parameter_list` **(** **)** |virtual| |const| | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_filter` **(** **)** |virtual| |const| | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_parameter_read_only` **(** :ref:`StringName` parameter **)** |virtual| |const| | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_process` **(** :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking **)** |virtual| |const| | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`add_input` **(** :ref:`String` name **)** | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`blend_animation` **(** :ref:`StringName` animation, :ref:`float` time, :ref:`float` delta, :ref:`bool` seeked, :ref:`bool` is_external_seeking, :ref:`float` blend, :ref:`LoopedFlag` looped_flag=0 **)** | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`blend_input` **(** :ref:`int` input_index, :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` sync=true **)** | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`blend_node` **(** :ref:`StringName` name, :ref:`AnimationNode` node, :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` sync=true **)** | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`find_input` **(** :ref:`String` name **)** |const| | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_input_count` **(** **)** |const| | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_input_name` **(** :ref:`int` input **)** |const| | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_parameter` **(** :ref:`StringName` name **)** |const| | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_path_filtered` **(** :ref:`NodePath` path **)** |const| | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_input` **(** :ref:`int` index **)** | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_filter_path` **(** :ref:`NodePath` path, :ref:`bool` enable **)** | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`set_input_name` **(** :ref:`int` input, :ref:`String` name **)** | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_parameter` **(** :ref:`StringName` name, :ref:`Variant` value **)** | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_caption` **(** **)** |virtual| |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AnimationNode` | :ref:`_get_child_by_name` **(** :ref:`StringName` name **)** |virtual| |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_child_nodes` **(** **)** |virtual| |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_parameter_default_value` **(** :ref:`StringName` parameter **)** |virtual| |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`_get_parameter_list` **(** **)** |virtual| |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_filter` **(** **)** |virtual| |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_parameter_read_only` **(** :ref:`StringName` parameter **)** |virtual| |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_process` **(** :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking, :ref:`bool` test_only **)** |virtual| |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`add_input` **(** :ref:`String` name **)** | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`blend_animation` **(** :ref:`StringName` animation, :ref:`float` time, :ref:`float` delta, :ref:`bool` seeked, :ref:`bool` is_external_seeking, :ref:`float` blend, :ref:`LoopedFlag` looped_flag=0 **)** | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`blend_input` **(** :ref:`int` input_index, :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` sync=true, :ref:`bool` test_only=false **)** | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`blend_node` **(** :ref:`StringName` name, :ref:`AnimationNode` node, :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` sync=true, :ref:`bool` test_only=false **)** | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find_input` **(** :ref:`String` name **)** |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_input_count` **(** **)** |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_input_name` **(** :ref:`int` input **)** |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_parameter` **(** :ref:`StringName` name **)** |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_path_filtered` **(** :ref:`NodePath` path **)** |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_input` **(** :ref:`int` index **)** | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_filter_path` **(** :ref:`NodePath` path, :ref:`bool` enable **)** | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`set_input_name` **(** :ref:`int` input, :ref:`String` name **)** | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_parameter` **(** :ref:`StringName` name, :ref:`Variant` value **)** | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -111,7 +111,7 @@ Signals **animation_node_removed** **(** :ref:`int` object_id, :ref:`String` name **)** -Emitted by nodes that inherit from this class and that have an internal tree when one of their nodes removes. The nodes that emit this signal are :ref:`AnimationNodeBlendSpace1D`, :ref:`AnimationNodeBlendSpace2D`, :ref:`AnimationNodeStateMachine`, and :ref:`AnimationNodeBlendTree`. +Emitted by nodes that inherit from this class and that have an internal tree when one of their animation nodes removes. The animation nodes that emit this signal are :ref:`AnimationNodeBlendSpace1D`, :ref:`AnimationNodeBlendSpace2D`, :ref:`AnimationNodeStateMachine`, and :ref:`AnimationNodeBlendTree`. .. rst-class:: classref-item-separator @@ -123,7 +123,7 @@ Emitted by nodes that inherit from this class and that have an internal tree whe **animation_node_renamed** **(** :ref:`int` object_id, :ref:`String` old_name, :ref:`String` new_name **)** -Emitted by nodes that inherit from this class and that have an internal tree when one of their node names changes. The nodes that emit this signal are :ref:`AnimationNodeBlendSpace1D`, :ref:`AnimationNodeBlendSpace2D`, :ref:`AnimationNodeStateMachine`, and :ref:`AnimationNodeBlendTree`. +Emitted by nodes that inherit from this class and that have an internal tree when one of their animation node names changes. The animation nodes that emit this signal are :ref:`AnimationNodeBlendSpace1D`, :ref:`AnimationNodeBlendSpace2D`, :ref:`AnimationNodeStateMachine`, and :ref:`AnimationNodeBlendTree`. .. rst-class:: classref-item-separator @@ -135,7 +135,7 @@ Emitted by nodes that inherit from this class and that have an internal tree whe **tree_changed** **(** **)** -Emitted by nodes that inherit from this class and that have an internal tree when one of their nodes changes. The nodes that emit this signal are :ref:`AnimationNodeBlendSpace1D`, :ref:`AnimationNodeBlendSpace2D`, :ref:`AnimationNodeStateMachine`, :ref:`AnimationNodeBlendTree` and :ref:`AnimationNodeTransition`. +Emitted by nodes that inherit from this class and that have an internal tree when one of their animation nodes changes. The animation nodes that emit this signal are :ref:`AnimationNodeBlendSpace1D`, :ref:`AnimationNodeBlendSpace2D`, :ref:`AnimationNodeStateMachine`, :ref:`AnimationNodeBlendTree` and :ref:`AnimationNodeTransition`. .. rst-class:: classref-section-separator @@ -221,7 +221,7 @@ Method Descriptions :ref:`String` **_get_caption** **(** **)** |virtual| |const| -When inheriting from :ref:`AnimationRootNode`, implement this virtual method to override the text caption for this node. +When inheriting from :ref:`AnimationRootNode`, implement this virtual method to override the text caption for this animation node. .. rst-class:: classref-item-separator @@ -233,7 +233,7 @@ When inheriting from :ref:`AnimationRootNode`, implemen :ref:`AnimationNode` **_get_child_by_name** **(** :ref:`StringName` name **)** |virtual| |const| -When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return a child node by its ``name``. +When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return a child animation node by its ``name``. .. rst-class:: classref-item-separator @@ -245,7 +245,7 @@ When inheriting from :ref:`AnimationRootNode`, implemen :ref:`Dictionary` **_get_child_nodes** **(** **)** |virtual| |const| -When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return all children nodes in order as a ``name: node`` dictionary. +When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return all children animation nodes in order as a ``name: node`` dictionary. .. rst-class:: classref-item-separator @@ -257,7 +257,7 @@ When inheriting from :ref:`AnimationRootNode`, implemen :ref:`Variant` **_get_parameter_default_value** **(** :ref:`StringName` parameter **)** |virtual| |const| -When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return the default value of a ``parameter``. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. +When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return the default value of a ``parameter``. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees. .. rst-class:: classref-item-separator @@ -269,7 +269,7 @@ When inheriting from :ref:`AnimationRootNode`, implemen :ref:`Array` **_get_parameter_list** **(** **)** |virtual| |const| -When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return a list of the properties on this node. Parameters are custom local memory used for your 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 @@ -281,7 +281,7 @@ When inheriting from :ref:`AnimationRootNode`, implemen :ref:`bool` **_has_filter** **(** **)** |virtual| |const| -When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return whether the blend tree editor should display filter editing on this node. +When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return whether the blend tree editor should display filter editing on this animation node. .. rst-class:: classref-item-separator @@ -293,7 +293,7 @@ When inheriting from :ref:`AnimationRootNode`, implemen :ref:`bool` **_is_parameter_read_only** **(** :ref:`StringName` parameter **)** |virtual| |const| -When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return whether the ``parameter`` is read-only. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. +When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return whether the ``parameter`` is read-only. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees. .. rst-class:: classref-item-separator @@ -303,9 +303,9 @@ When inheriting from :ref:`AnimationRootNode`, implemen .. rst-class:: classref-method -:ref:`float` **_process** **(** :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking **)** |virtual| |const| +:ref:`float` **_process** **(** :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking, :ref:`bool` test_only **)** |virtual| |const| -When inheriting from :ref:`AnimationRootNode`, implement this virtual method to run some code when this node is processed. The ``time`` parameter is a relative delta, unless ``seek`` is ``true``, in which case it is absolute. +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. @@ -321,7 +321,7 @@ This function should return the time left for the current animation to finish (i :ref:`bool` **add_input** **(** :ref:`String` name **)** -Adds an input to the node. This is only useful for nodes created for use in an :ref:`AnimationNodeBlendTree`. If the addition fails, returns ``false``. +Adds an input to the animation node. This is only useful for animation nodes created for use in an :ref:`AnimationNodeBlendTree`. If the addition fails, returns ``false``. .. rst-class:: classref-item-separator @@ -345,9 +345,9 @@ A ``looped_flag`` is used by internal processing immediately after the loop. See .. rst-class:: classref-method -:ref:`float` **blend_input** **(** :ref:`int` input_index, :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` sync=true **)** +:ref:`float` **blend_input** **(** :ref:`int` input_index, :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` sync=true, :ref:`bool` test_only=false **)** -Blend an input. This is only useful for nodes created for an :ref:`AnimationNodeBlendTree`. The ``time`` parameter is a relative delta, unless ``seek`` is ``true``, in which case it is absolute. A filter mode may be optionally passed (see :ref:`FilterAction` for options). +Blend an input. This is only useful for animation nodes created for an :ref:`AnimationNodeBlendTree`. The ``time`` parameter is a relative delta, unless ``seek`` is ``true``, in which case it is absolute. A filter mode may be optionally passed (see :ref:`FilterAction` for options). .. rst-class:: classref-item-separator @@ -357,9 +357,9 @@ Blend an input. This is only useful for nodes created for an :ref:`AnimationNode .. rst-class:: classref-method -:ref:`float` **blend_node** **(** :ref:`StringName` name, :ref:`AnimationNode` node, :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` sync=true **)** +:ref:`float` **blend_node** **(** :ref:`StringName` name, :ref:`AnimationNode` node, :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` sync=true, :ref:`bool` test_only=false **)** -Blend another animation node (in case this node contains children animation nodes). This function is only useful if you inherit from :ref:`AnimationRootNode` instead, else editors will not display your node for addition. +Blend another animation node (in case this animation node contains children animation nodes). This function is only useful if you inherit from :ref:`AnimationRootNode` instead, else editors will not display your animation node for addition. .. rst-class:: classref-item-separator @@ -383,7 +383,7 @@ Returns the input index which corresponds to ``name``. If not found, returns ``- :ref:`int` **get_input_count** **(** **)** |const| -Amount of inputs in this node, only useful for nodes that go into :ref:`AnimationNodeBlendTree`. +Amount of inputs in this animation node, only useful for animation nodes that go into :ref:`AnimationNodeBlendTree`. .. rst-class:: classref-item-separator @@ -407,7 +407,7 @@ Gets the name of an input by index. :ref:`Variant` **get_parameter** **(** :ref:`StringName` name **)** |const| -Gets the value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. +Gets the value of a parameter. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees. .. rst-class:: classref-item-separator diff --git a/classes/class_animationnodeadd2.rst b/classes/class_animationnodeadd2.rst index 76fef4516e8..e365005da7e 100644 --- a/classes/class_animationnodeadd2.rst +++ b/classes/class_animationnodeadd2.rst @@ -19,14 +19,18 @@ Blends two animations additively inside of an :ref:`AnimationNodeBlendTree`. Blends two animations additively based on an amount value in the ``[0.0, 1.0]`` range. +A resource to add to an :ref:`AnimationNodeBlendTree`. Blends two animations additively based on the amount value. + +If the amount is greater than ``1.0``, the animation connected to "in" port is blended with the amplified animation connected to "add" port. + +If the amount is less than ``0.0``, the animation connected to "in" port is blended with the inverted animation connected to "add" port. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`AnimationTree <../tutorials/animation/animation_tree>` +- :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` .. |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_animationnodeadd3.rst b/classes/class_animationnodeadd3.rst index e8ddb4ff80d..78109d78fc4 100644 --- a/classes/class_animationnodeadd3.rst +++ b/classes/class_animationnodeadd3.rst @@ -19,22 +19,24 @@ Blends two of three animations additively inside of an :ref:`AnimationNodeBlendT Description ----------- -A resource to add to an :ref:`AnimationNodeBlendTree`. Blends two animations together additively out of three based on a value in the ``[-1.0, 1.0]`` range. +A resource to add to an :ref:`AnimationNodeBlendTree`. Blends two animations out of three additively out of three based on the amounmt value. -This node has three inputs: +This animation node has three inputs: - The base animation to add to -- A -add animation to blend with when the blend amount is in the ``[-1.0, 0.0]`` range. +- A "-add" animation to blend with when the blend amount is negative -- A +add animation to blend with when the blend amount is in the ``[0.0, 1.0]`` range +- A "+add" animation to blend with when the blend amount is positive + +If the absolute value of the amount is greater than ``1.0``, the animation connected to "in" port is blended with the amplified animation connected to "-add"/"+add" port. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`AnimationTree <../tutorials/animation/animation_tree>` +- :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` - `Third Person Shooter Demo `__ diff --git a/classes/class_animationnodeanimation.rst b/classes/class_animationnodeanimation.rst index 5eabf6fb22d..fa57e5c6161 100644 --- a/classes/class_animationnodeanimation.rst +++ b/classes/class_animationnodeanimation.rst @@ -12,21 +12,21 @@ AnimationNodeAnimation **Inherits:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Input animation to use in an :ref:`AnimationNodeBlendTree`. +An input animation for an :ref:`AnimationNodeBlendTree`. .. rst-class:: classref-introduction-group Description ----------- -A resource to add to an :ref:`AnimationNodeBlendTree`. Only features one output set using the :ref:`animation` property. Use it as an input for :ref:`AnimationNode` that blend animations together. +A resource to add to an :ref:`AnimationNodeBlendTree`. Only has one output port using the :ref:`animation` property. Used as an input for :ref:`AnimationNode`\ s that blend animations together. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`AnimationTree <../tutorials/animation/animation_tree>` +- :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` - `3D Platformer Demo `__ diff --git a/classes/class_animationnodeblend2.rst b/classes/class_animationnodeblend2.rst index b68126473d2..abceca448ac 100644 --- a/classes/class_animationnodeblend2.rst +++ b/classes/class_animationnodeblend2.rst @@ -19,14 +19,16 @@ Blends two animations linearly inside of an :ref:`AnimationNodeBlendTree`. Blends two animations linearly based on an amount value in the ``[0.0, 1.0]`` range. +A resource to add to an :ref:`AnimationNodeBlendTree`. Blends two animations linearly based on the amount value. + +In general, the blend value should be in the ``[0.0, 1.0]`` range. Values outside of this range can blend amplified or inverted animations, however, :ref:`AnimationNodeAdd2` works better for this purpose. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`AnimationTree <../tutorials/animation/animation_tree>` +- :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` - `3D Platformer Demo `__ diff --git a/classes/class_animationnodeblend3.rst b/classes/class_animationnodeblend3.rst index a6b35dee9a0..743ee5a56bf 100644 --- a/classes/class_animationnodeblend3.rst +++ b/classes/class_animationnodeblend3.rst @@ -19,22 +19,24 @@ Blends two of three animations linearly inside of an :ref:`AnimationNodeBlendTre Description ----------- -A resource to add to an :ref:`AnimationNodeBlendTree`. Blends two animations together linearly out of three based on a value in the ``[-1.0, 1.0]`` range. +A resource to add to an :ref:`AnimationNodeBlendTree`. Blends two animations out of three linearly out of three based on the amounmt value. -This node has three inputs: +This animation node has three inputs: -- The base animation +- The base animation to blend with -- A -blend animation to blend with when the blend amount is in the ``[-1.0, 0.0]`` range. +- A "-blend" animation to blend with when the blend amount is negative value -- A +blend animation to blend with when the blend amount is in the ``[0.0, 1.0]`` range +- A "+blend" animation to blend with when the blend amount is positive value + +In general, the blend value should be in the ``[-1.0, 1.0]`` range. Values outside of this range can blend amplified animations, however, :ref:`AnimationNodeAdd3` works better for this purpose. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`AnimationTree <../tutorials/animation/animation_tree>` +- :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` .. |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_animationnodeblendspace1d.rst b/classes/class_animationnodeblendspace1d.rst index 6b1efe8eec6..0d9f8384315 100644 --- a/classes/class_animationnodeblendspace1d.rst +++ b/classes/class_animationnodeblendspace1d.rst @@ -12,27 +12,25 @@ AnimationNodeBlendSpace1D **Inherits:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Blends linearly between two of any number of :ref:`AnimationNode` of any type placed on a virtual axis. +A set of :ref:`AnimationRootNode`\ s placed on a virtual axis, crossfading between the two adjacent ones. Used by :ref:`AnimationTree`. .. rst-class:: classref-introduction-group Description ----------- -A resource to add to an :ref:`AnimationNodeBlendTree`. +A resource used by :ref:`AnimationNodeBlendTree`. -This is a virtual axis on which you can add any type of :ref:`AnimationNode` using :ref:`add_blend_point`. +\ **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. -Outputs the linear blend of the two :ref:`AnimationNode`\ s closest to the node's current value. - -You can set the extents of the axis using the :ref:`min_space` and :ref:`max_space`. +You can set the extents of the axis with :ref:`min_space` and :ref:`max_space`. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`AnimationTree <../tutorials/animation/animation_tree>` +- :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` .. rst-class:: classref-reftable-group @@ -109,7 +107,7 @@ The interpolation between animations is linear. :ref:`BlendMode` **BLEND_MODE_DISCRETE** = ``1`` -The blend space plays the animation of the node the blending position is closest to. Useful for frame-by-frame 2D animations. +The blend space plays the animation of the animation node which blending position is closest to. Useful for frame-by-frame 2D animations. .. _class_AnimationNodeBlendSpace1D_constant_BLEND_MODE_DISCRETE_CARRY: diff --git a/classes/class_animationnodeblendspace2d.rst b/classes/class_animationnodeblendspace2d.rst index 622791deb32..7638c947edd 100644 --- a/classes/class_animationnodeblendspace2d.rst +++ b/classes/class_animationnodeblendspace2d.rst @@ -12,25 +12,25 @@ AnimationNodeBlendSpace2D **Inherits:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Blends linearly between three :ref:`AnimationNode` of any type placed in a 2D space. +A set of :ref:`AnimationRootNode`\ s placed on 2D coordinates, crossfading between the three adjacent ones. Used by :ref:`AnimationTree`. .. rst-class:: classref-introduction-group Description ----------- -A resource to add to an :ref:`AnimationNodeBlendTree`. +A resource used by :ref:`AnimationNodeBlendTree`. -This node allows you to blend linearly between three animations using a :ref:`Vector2` weight. +\ :ref:`AnimationNodeBlendSpace1D` 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 create up 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 Tutorials --------- -- :doc:`AnimationTree <../tutorials/animation/animation_tree>` +- :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` - `Third Person Shooter Demo `__ @@ -138,7 +138,7 @@ The interpolation between animations is linear. :ref:`BlendMode` **BLEND_MODE_DISCRETE** = ``1`` -The blend space plays the animation of the node the blending position is closest to. Useful for frame-by-frame 2D animations. +The blend space plays the animation of the animation node which blending position is closest to. Useful for frame-by-frame 2D animations. .. _class_AnimationNodeBlendSpace2D_constant_BLEND_MODE_DISCRETE_CARRY: diff --git a/classes/class_animationnodeblendtree.rst b/classes/class_animationnodeblendtree.rst index cb4c43c9df9..48b1d6cec75 100644 --- a/classes/class_animationnodeblendtree.rst +++ b/classes/class_animationnodeblendtree.rst @@ -12,14 +12,14 @@ AnimationNodeBlendTree **Inherits:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -:ref:`AnimationTree` node resource that contains many blend type nodes. +A sub-tree of many type :ref:`AnimationNode`\ s used for complex animations. Used by :ref:`AnimationTree`. .. rst-class:: classref-introduction-group Description ----------- -This node may contain a sub-tree of any other blend type nodes, such as :ref:`AnimationNodeTransition`, :ref:`AnimationNodeBlend2`, :ref:`AnimationNodeBlend3`, :ref:`AnimationNodeOneShot`, etc. This is one of the most commonly used roots. +This animation node may contain a sub-tree of any other type animation nodes, such as :ref:`AnimationNodeTransition`, :ref:`AnimationNodeBlend2`, :ref:`AnimationNodeBlend3`, :ref:`AnimationNodeOneShot`, etc. This is one of the most commonly used animation node roots. An :ref:`AnimationNodeOutput` node named ``output`` is created by default. @@ -28,7 +28,7 @@ An :ref:`AnimationNodeOutput` node named ``output`` i Tutorials --------- -- :doc:`AnimationTree <../tutorials/animation/animation_tree>` +- :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` .. rst-class:: classref-reftable-group @@ -164,7 +164,7 @@ Property Descriptions - void **set_graph_offset** **(** :ref:`Vector2` value **)** - :ref:`Vector2` **get_graph_offset** **(** **)** -The global offset of all sub-nodes. +The global offset of all sub animation nodes. .. rst-class:: classref-section-separator @@ -181,7 +181,7 @@ Method Descriptions void **add_node** **(** :ref:`StringName` name, :ref:`AnimationNode` node, :ref:`Vector2` position=Vector2(0, 0) **)** -Adds an :ref:`AnimationNode` at the given ``position``. The ``name`` is used to identify the created sub-node later. +Adds an :ref:`AnimationNode` at the given ``position``. The ``name`` is used to identify the created sub animation node later. .. rst-class:: classref-item-separator @@ -205,7 +205,7 @@ Connects the output of an :ref:`AnimationNode` as input for void **disconnect_node** **(** :ref:`StringName` input_node, :ref:`int` input_index **)** -Disconnects the node connected to the specified input. +Disconnects the animation node connected to the specified input. .. rst-class:: classref-item-separator @@ -217,7 +217,7 @@ Disconnects the node connected to the specified input. :ref:`AnimationNode` **get_node** **(** :ref:`StringName` name **)** |const| -Returns the sub-node with the specified ``name``. +Returns the sub animation node with the specified ``name``. .. rst-class:: classref-item-separator @@ -229,7 +229,7 @@ Returns the sub-node with the specified ``name``. :ref:`Vector2` **get_node_position** **(** :ref:`StringName` name **)** |const| -Returns the position of the sub-node with the specified ``name``. +Returns the position of the sub animation node with the specified ``name``. .. rst-class:: classref-item-separator @@ -241,7 +241,7 @@ Returns the position of the sub-node with the specified ``name``. :ref:`bool` **has_node** **(** :ref:`StringName` name **)** |const| -Returns ``true`` if a sub-node with specified ``name`` exists. +Returns ``true`` if a sub animation node with specified ``name`` exists. .. rst-class:: classref-item-separator @@ -253,7 +253,7 @@ Returns ``true`` if a sub-node with specified ``name`` exists. void **remove_node** **(** :ref:`StringName` name **)** -Removes a sub-node. +Removes a sub animation node. .. rst-class:: classref-item-separator @@ -265,7 +265,7 @@ Removes a sub-node. void **rename_node** **(** :ref:`StringName` name, :ref:`StringName` new_name **)** -Changes the name of a sub-node. +Changes the name of a sub animation node. .. rst-class:: classref-item-separator @@ -277,7 +277,7 @@ Changes the name of a sub-node. void **set_node_position** **(** :ref:`StringName` name, :ref:`Vector2` position **)** -Modifies the position of a sub-node. +Modifies the position of a sub animation node. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_animationnodeoneshot.rst b/classes/class_animationnodeoneshot.rst index 8808ba8f164..e28b64332da 100644 --- a/classes/class_animationnodeoneshot.rst +++ b/classes/class_animationnodeoneshot.rst @@ -12,14 +12,14 @@ AnimationNodeOneShot **Inherits:** :ref:`AnimationNodeSync` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Plays an animation once in :ref:`AnimationNodeBlendTree`. +Plays an animation once in an :ref:`AnimationNodeBlendTree`. .. rst-class:: classref-introduction-group Description ----------- -A resource to add to an :ref:`AnimationNodeBlendTree`. This node will execute a sub-animation and return once it finishes. Blend times for fading in and out can be customized, as well as filters. +A resource to add to an :ref:`AnimationNodeBlendTree`. This animation node will execute a sub-animation and return once it finishes. Blend times for fading in and out can be customized, as well as filters. After setting the request and changing the animation playback, the one-shot node automatically clears the request on the next process frame by setting its ``request`` value to :ref:`ONE_SHOT_REQUEST_NONE`. @@ -38,21 +38,37 @@ After setting the request and changing the animation playback, the one-shot node # Alternative syntax (same result as above). animation_tree["parameters/OneShot/request"] = AnimationNodeOneShot.ONE_SHOT_REQUEST_ABORT + # Abort child animation with fading out connected to "shot" port. + animation_tree.set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_FADE_OUT) + # Alternative syntax (same result as above). + animation_tree["parameters/OneShot/request"] = AnimationNodeOneShot.ONE_SHOT_REQUEST_FADE_OUT + # Get current state (read-only). - animation_tree.get("parameters/OneShot/active")) + animation_tree.get("parameters/OneShot/active") # Alternative syntax (same result as above). animation_tree["parameters/OneShot/active"] + + # Get current internal state (read-only). + animation_tree.get("parameters/OneShot/internal_active") + # Alternative syntax (same result as above). + animation_tree["parameters/OneShot/internal_active"] .. code-tab:: csharp // Play child animation connected to "shot" port. - animationTree.Set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE); + animationTree.Set("parameters/OneShot/request", (int)AnimationNodeOneShot.OneShotRequest.Fire); // Abort child animation connected to "shot" port. - animationTree.Set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_ABORT); + animationTree.Set("parameters/OneShot/request", (int)AnimationNodeOneShot.OneShotRequest.Abort); + + // Abort child animation with fading out connected to "shot" port. + animationTree.Set("parameters/OneShot/request", (int)AnimationNodeOneShot.OneShotRequest.FadeOut); // Get current state (read-only). animationTree.Get("parameters/OneShot/active"); + + // Get current internal state (read-only). + animationTree.Get("parameters/OneShot/internal_active"); @@ -61,7 +77,7 @@ After setting the request and changing the animation playback, the one-shot node Tutorials --------- -- :doc:`AnimationTree <../tutorials/animation/animation_tree>` +- :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` - `Third Person Shooter Demo `__ @@ -80,8 +96,12 @@ Properties +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`autorestart_random_delay` | ``0.0`` | +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`Curve` | :ref:`fadein_curve` | | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`fadein_time` | ``0.0`` | +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`Curve` | :ref:`fadeout_curve` | | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`fadeout_time` | ``0.0`` | +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`MixMode` | :ref:`mix_mode` | ``0`` | @@ -126,6 +146,14 @@ The request to play the animation connected to "shot" port. The request to stop the animation connected to "shot" port. +.. _class_AnimationNodeOneShot_constant_ONE_SHOT_REQUEST_FADE_OUT: + +.. rst-class:: classref-enumeration-constant + +:ref:`OneShotRequest` **ONE_SHOT_REQUEST_FADE_OUT** = ``3`` + +The request to fade out the animation connected to "shot" port. + .. rst-class:: classref-item-separator ---- @@ -214,6 +242,23 @@ If :ref:`autorestart` is ``true ---- +.. _class_AnimationNodeOneShot_property_fadein_curve: + +.. rst-class:: classref-property + +:ref:`Curve` **fadein_curve** + +.. rst-class:: classref-property-setget + +- void **set_fadein_curve** **(** :ref:`Curve` value **)** +- :ref:`Curve` **get_fadein_curve** **(** **)** + +Determines how cross-fading between animations is eased. If empty, the transition will be linear. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationNodeOneShot_property_fadein_time: .. rst-class:: classref-property @@ -225,7 +270,24 @@ If :ref:`autorestart` is ``true - void **set_fadein_time** **(** :ref:`float` value **)** - :ref:`float` **get_fadein_time** **(** **)** -The fade-in duration. For example, setting this to ``1.0`` for a 5 second length animation will produce a crossfade that starts at 0 second and ends at 1 second during the animation. +The fade-in duration. For example, setting this to ``1.0`` for a 5 second length animation will produce a cross-fade that starts at 0 second and ends at 1 second during the animation. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationNodeOneShot_property_fadeout_curve: + +.. rst-class:: classref-property + +:ref:`Curve` **fadeout_curve** + +.. rst-class:: classref-property-setget + +- void **set_fadeout_curve** **(** :ref:`Curve` value **)** +- :ref:`Curve` **get_fadeout_curve** **(** **)** + +Determines how cross-fading between animations is eased. If empty, the transition will be linear. .. rst-class:: classref-item-separator @@ -242,7 +304,7 @@ The fade-in duration. For example, setting this to ``1.0`` for a 5 second length - void **set_fadeout_time** **(** :ref:`float` value **)** - :ref:`float` **get_fadeout_time** **(** **)** -The fade-out duration. For example, setting this to ``1.0`` for a 5 second length animation will produce a crossfade that starts at 4 second and ends at 5 second during the animation. +The fade-out duration. For example, setting this to ``1.0`` for a 5 second length animation will produce a cross-fade that starts at 4 second and ends at 5 second during the animation. .. rst-class:: classref-item-separator diff --git a/classes/class_animationnodeoutput.rst b/classes/class_animationnodeoutput.rst index add79da80b5..853c81d7520 100644 --- a/classes/class_animationnodeoutput.rst +++ b/classes/class_animationnodeoutput.rst @@ -12,14 +12,21 @@ AnimationNodeOutput **Inherits:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Generic output node to be added to :ref:`AnimationNodeBlendTree`. +The animation output node of an :ref:`AnimationNodeBlendTree`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +A node created automatically in an :ref:`AnimationNodeBlendTree` that outputs the final animation. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`AnimationTree <../tutorials/animation/animation_tree>` +- :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` - `3D Platformer Demo `__ diff --git a/classes/class_animationnodestatemachine.rst b/classes/class_animationnodestatemachine.rst index b9af0a4ea99..520a4021f01 100644 --- a/classes/class_animationnodestatemachine.rst +++ b/classes/class_animationnodestatemachine.rst @@ -12,14 +12,14 @@ AnimationNodeStateMachine **Inherits:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -State machine for control of animations. +A state machine with multiple :ref:`AnimationRootNode`\ s, used by :ref:`AnimationTree`. .. rst-class:: classref-introduction-group Description ----------- -Contains multiple nodes representing animation states, connected in a graph. Node transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the :ref:`AnimationNodeStateMachinePlayback` object from the :ref:`AnimationTree` node to control it programmatically. +Contains multiple :ref:`AnimationRootNode`\ s representing animation states, connected in a graph. State transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the :ref:`AnimationNodeStateMachinePlayback` object from the :ref:`AnimationTree` node to control it programmatically. \ **Example:**\ @@ -43,7 +43,7 @@ Contains multiple nodes representing animation states, connected in a graph. Nod Tutorials --------- -- :doc:`AnimationTree <../tutorials/animation/animation_tree>` +- :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` .. rst-class:: classref-reftable-group @@ -53,9 +53,13 @@ Properties .. table:: :widths: auto - +-------------------------+----------------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`allow_transition_to_self` | ``false`` | - +-------------------------+----------------------------------------------------------------------------------------------------+-----------+ + +--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`allow_transition_to_self` | ``false`` | + +--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`reset_ends` | ``false`` | + +--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`StateMachineType` | :ref:`state_machine_type` | ``0`` | + +--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -111,6 +115,45 @@ Methods .. rst-class:: classref-descriptions-group +Enumerations +------------ + +.. _enum_AnimationNodeStateMachine_StateMachineType: + +.. rst-class:: classref-enumeration + +enum **StateMachineType**: + +.. _class_AnimationNodeStateMachine_constant_STATE_MACHINE_TYPE_ROOT: + +.. rst-class:: classref-enumeration-constant + +:ref:`StateMachineType` **STATE_MACHINE_TYPE_ROOT** = ``0`` + +Seeking to the beginning is treated as playing from the start state. Transition to the end state is treated as exiting the state machine. + +.. _class_AnimationNodeStateMachine_constant_STATE_MACHINE_TYPE_NESTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`StateMachineType` **STATE_MACHINE_TYPE_NESTED** = ``1`` + +Seeking to the beginning is treated as seeking to the beginning of the animation in the current state. Transition to the end state, or the absence of transitions in each state, is treated as exiting the state machine. + +.. _class_AnimationNodeStateMachine_constant_STATE_MACHINE_TYPE_GROUPED: + +.. rst-class:: classref-enumeration-constant + +:ref:`StateMachineType` **STATE_MACHINE_TYPE_GROUPED** = ``2`` + +This is a grouped state machine that can be controlled from a parent state machine. It does not work on standalone. There must be a state machine with :ref:`state_machine_type` of :ref:`STATE_MACHINE_TYPE_ROOT` or :ref:`STATE_MACHINE_TYPE_NESTED` in the parent or ancestor. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- @@ -127,6 +170,42 @@ Property Descriptions 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 + +---- + +.. _class_AnimationNodeStateMachine_property_reset_ends: + +.. rst-class:: classref-property + +:ref:`bool` **reset_ends** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_reset_ends** **(** :ref:`bool` value **)** +- :ref:`bool` **are_ends_reset** **(** **)** + +If ``true``, treat the cross-fade to the start and end nodes as a blend with the RESET animation. + +In most cases, when additional cross-fades are performed in the parent :ref:`AnimationNode` of the state machine, setting this property to ``false`` and matching the cross-fade time of the parent :ref:`AnimationNode` and the state machine's start node and end node gives good results. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationNodeStateMachine_property_state_machine_type: + +.. rst-class:: classref-property + +:ref:`StateMachineType` **state_machine_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_state_machine_type** **(** :ref:`StateMachineType` value **)** +- :ref:`StateMachineType` **get_state_machine_type** **(** **)** + +This property can define the process of transitions for different use cases. See also :ref:`StateMachineType`. + .. rst-class:: classref-section-separator ---- @@ -142,7 +221,7 @@ Method Descriptions void **add_node** **(** :ref:`StringName` name, :ref:`AnimationNode` node, :ref:`Vector2` position=Vector2(0, 0) **)** -Adds a new node to the graph. The ``position`` is used for display in the editor. +Adds a new animation node to the graph. The ``position`` is used for display in the editor. .. rst-class:: classref-item-separator @@ -154,7 +233,7 @@ Adds a new node to the graph. The ``position`` is used for display in the editor void **add_transition** **(** :ref:`StringName` from, :ref:`StringName` to, :ref:`AnimationNodeStateMachineTransition` transition **)** -Adds a transition between the given nodes. +Adds a transition between the given animation nodes. .. rst-class:: classref-item-separator @@ -202,7 +281,7 @@ Returns the given animation node's name. :ref:`Vector2` **get_node_position** **(** :ref:`StringName` name **)** |const| -Returns the given node's coordinates. Used for display in the editor. +Returns the given animation node's coordinates. Used for display in the editor. .. rst-class:: classref-item-separator @@ -262,7 +341,7 @@ Returns the given transition's end node. :ref:`bool` **has_node** **(** :ref:`StringName` name **)** |const| -Returns ``true`` if the graph contains the given node. +Returns ``true`` if the graph contains the given animation node. .. rst-class:: classref-item-separator @@ -274,7 +353,7 @@ Returns ``true`` if the graph contains the given node. :ref:`bool` **has_transition** **(** :ref:`StringName` from, :ref:`StringName` to **)** |const| -Returns ``true`` if there is a transition between the given nodes. +Returns ``true`` if there is a transition between the given animation nodes. .. rst-class:: classref-item-separator @@ -286,7 +365,7 @@ Returns ``true`` if there is a transition between the given nodes. void **remove_node** **(** :ref:`StringName` name **)** -Deletes the given node from the graph. +Deletes the given animation node from the graph. .. rst-class:: classref-item-separator @@ -298,7 +377,7 @@ Deletes the given node from the graph. void **remove_transition** **(** :ref:`StringName` from, :ref:`StringName` to **)** -Deletes the transition between the two specified nodes. +Deletes the transition between the two specified animation nodes. .. rst-class:: classref-item-separator @@ -322,7 +401,7 @@ Deletes the given transition by index. void **rename_node** **(** :ref:`StringName` name, :ref:`StringName` new_name **)** -Renames the given node. +Renames the given animation node. .. rst-class:: classref-item-separator @@ -360,7 +439,7 @@ Sets the draw offset of the graph. Used for display in the editor. void **set_node_position** **(** :ref:`StringName` name, :ref:`Vector2` position **)** -Sets the node's coordinates. Used for display in the editor. +Sets the animation node's coordinates. Used for display in the editor. .. |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_animationnodestatemachineplayback.rst b/classes/class_animationnodestatemachineplayback.rst index 7d07a380f83..412ac528b5c 100644 --- a/classes/class_animationnodestatemachineplayback.rst +++ b/classes/class_animationnodestatemachineplayback.rst @@ -12,7 +12,7 @@ AnimationNodeStateMachinePlayback **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Playback control for :ref:`AnimationNodeStateMachine`. +Provides playback control for an :ref:`AnimationNodeStateMachine`. .. rst-class:: classref-introduction-group @@ -33,7 +33,7 @@ Allows control of :ref:`AnimationTree` state machines creat .. code-tab:: csharp - var stateMachine = GetNode("AnimationTree").Get("parameters/playback") as AnimationNodeStateMachinePlayback; + var stateMachine = GetNode("AnimationTree").Get("parameters/playback").As(); stateMachine.Travel("some_state"); @@ -43,7 +43,7 @@ Allows control of :ref:`AnimationTree` state machines creat Tutorials --------- -- :doc:`AnimationTree <../tutorials/animation/animation_tree>` +- :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` .. rst-class:: classref-reftable-group @@ -65,27 +65,27 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_current_length` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`get_current_node` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_current_play_position` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`get_fading_from_node` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_travel_path` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_playing` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`next` **(** **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`start` **(** :ref:`StringName` node, :ref:`bool` reset=true **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`stop` **(** **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`travel` **(** :ref:`StringName` to_node, :ref:`bool` reset_on_teleport=true **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_current_length` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_current_node` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_current_play_position` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_fading_from_node` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName[]` | :ref:`get_travel_path` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_playing` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`next` **(** **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`start` **(** :ref:`StringName` node, :ref:`bool` reset=true **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`stop` **(** **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`travel` **(** :ref:`StringName` to_node, :ref:`bool` reset_on_teleport=true **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -152,7 +152,7 @@ Returns the starting state of currently fading animation. .. rst-class:: classref-method -:ref:`PackedStringArray` **get_travel_path** **(** **)** |const| +:ref:`StringName[]` **get_travel_path** **(** **)** |const| Returns the current travel path as computed internally by the A\* algorithm. diff --git a/classes/class_animationnodestatemachinetransition.rst b/classes/class_animationnodestatemachinetransition.rst index d7fdca2ebf2..59d429e168a 100644 --- a/classes/class_animationnodestatemachinetransition.rst +++ b/classes/class_animationnodestatemachinetransition.rst @@ -12,7 +12,7 @@ AnimationNodeStateMachineTransition **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A resource to connect each node to make a path for :ref:`AnimationNodeStateMachine`. +A transition within an :ref:`AnimationNodeStateMachine` connecting two :ref:`AnimationRootNode`\ s. .. rst-class:: classref-introduction-group @@ -28,7 +28,7 @@ You can set the timing and conditions of the transition in detail. Tutorials --------- -- :doc:`AnimationTree <../tutorials/animation/animation_tree>` +- :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` .. rst-class:: classref-reftable-group diff --git a/classes/class_animationnodesub2.rst b/classes/class_animationnodesub2.rst new file mode 100644 index 00000000000..7fdcd1b35c8 --- /dev/null +++ b/classes/class_animationnodesub2.rst @@ -0,0 +1,42 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AnimationNodeSub2.xml. + +.. _class_AnimationNodeSub2: + +AnimationNodeSub2 +================= + +**Inherits:** :ref:`AnimationNodeSync` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +Blends two animations subtractively inside of an :ref:`AnimationNodeBlendTree`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +A resource to add to an :ref:`AnimationNodeBlendTree`. Blends two animations subtractively based on the amount value. + +This animation node is usually used for pre-calculation to cancel out any extra poses from the animation for the "add" animation source in :ref:`AnimationNodeAdd2` or :ref:`AnimationNodeAdd3`. + +In general, the blend value should be in the ``[0.0, 1.0]`` range, but values outside of this range can be used for amplified or inverted animations. + +\ **Note:** This calculation is different from using a negative value in :ref:`AnimationNodeAdd2`, since the transformation matrices do not satisfy the commutative law. **AnimationNodeSub2** multiplies the transformation matrix of the inverted animation from the left side, while negative :ref:`AnimationNodeAdd2` multiplies it from the right side. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`AnimationTree <../tutorials/animation/animation_tree>` + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_animationnodesync.rst b/classes/class_animationnodesync.rst index 44eb8feb12b..b6afa72d80d 100644 --- a/classes/class_animationnodesync.rst +++ b/classes/class_animationnodesync.rst @@ -12,9 +12,23 @@ AnimationNodeSync **Inherits:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AnimationNodeAdd2`, :ref:`AnimationNodeAdd3`, :ref:`AnimationNodeBlend2`, :ref:`AnimationNodeBlend3`, :ref:`AnimationNodeOneShot`, :ref:`AnimationNodeTransition` +**Inherited By:** :ref:`AnimationNodeAdd2`, :ref:`AnimationNodeAdd3`, :ref:`AnimationNodeBlend2`, :ref:`AnimationNodeBlend3`, :ref:`AnimationNodeOneShot`, :ref:`AnimationNodeSub2`, :ref:`AnimationNodeTransition` -The base class for :ref:`AnimationNode` which has more than two input ports and needs to synchronize them. +Base class for :ref:`AnimationNode`\ s with more than two input ports that must be synchronized. + +.. rst-class:: classref-introduction-group + +Description +----------- + +An animation node used to combine, mix, or blend two or more animations together while keeping them synchronized within an :ref:`AnimationTree`. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` .. rst-class:: classref-reftable-group diff --git a/classes/class_animationnodetimescale.rst b/classes/class_animationnodetimescale.rst index 89fc37aeeb0..6c68ad8129f 100644 --- a/classes/class_animationnodetimescale.rst +++ b/classes/class_animationnodetimescale.rst @@ -12,21 +12,21 @@ AnimationNodeTimeScale **Inherits:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A time-scaling animation node to be used with :ref:`AnimationTree`. +A time-scaling animation node used in :ref:`AnimationTree`. .. rst-class:: classref-introduction-group Description ----------- -Allows scaling the speed of the animation (or reversing it) in any children nodes. Setting it to 0 will pause the animation. +Allows to scale the speed of the animation (or reverse it) in any children :ref:`AnimationNode`\ s. Setting it to ``0.0`` will pause the animation. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`AnimationTree <../tutorials/animation/animation_tree>` +- :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` - `3D Platformer Demo `__ diff --git a/classes/class_animationnodetimeseek.rst b/classes/class_animationnodetimeseek.rst index 698447494d2..4a4de14776f 100644 --- a/classes/class_animationnodetimeseek.rst +++ b/classes/class_animationnodetimeseek.rst @@ -12,14 +12,14 @@ AnimationNodeTimeSeek **Inherits:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A time-seeking animation node to be used with :ref:`AnimationTree`. +A time-seeking animation node used in :ref:`AnimationTree`. .. rst-class:: classref-introduction-group Description ----------- -This node can be used to cause a seek command to happen to any sub-children of the animation graph. Use this node type to play an :ref:`Animation` from the start or a certain playback position inside the :ref:`AnimationNodeBlendTree`. +This animation node can be used to cause a seek command to happen to any sub-children of the animation graph. Use to play an :ref:`Animation` from the start or a certain playback position inside the :ref:`AnimationNodeBlendTree`. After setting the time and changing the animation playback, the time seek node automatically goes into sleep mode on the next process frame by setting its ``seek_request`` value to ``-1.0``. @@ -53,7 +53,7 @@ After setting the time and changing the animation playback, the time seek node a Tutorials --------- -- :doc:`AnimationTree <../tutorials/animation/animation_tree>` +- :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_animationnodetransition.rst b/classes/class_animationnodetransition.rst index 23f44adcdfd..3bcea87e908 100644 --- a/classes/class_animationnodetransition.rst +++ b/classes/class_animationnodetransition.rst @@ -12,7 +12,7 @@ AnimationNodeTransition **Inherits:** :ref:`AnimationNodeSync` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A generic animation transition node for :ref:`AnimationTree`. +A transition within an :ref:`AnimationTree` connecting two :ref:`AnimationNode`\ s. .. rst-class:: classref-introduction-group @@ -41,7 +41,7 @@ After setting the request and changing the animation playback, the transition no animation_tree["parameters/Transition/current_state"] # Get current state index (read-only). - animation_tree.get("parameters/Transition/current_index")) + animation_tree.get("parameters/Transition/current_index") # Alternative syntax (same result as above). animation_tree["parameters/Transition/current_index"] @@ -63,7 +63,7 @@ After setting the request and changing the animation playback, the transition no Tutorials --------- -- :doc:`AnimationTree <../tutorials/animation/animation_tree>` +- :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` - `3D Platformer Demo `__ @@ -142,7 +142,7 @@ If ``true``, allows transition to the self state. When the reset option is enabl - void **set_input_count** **(** :ref:`int` value **)** - :ref:`int` **get_input_count** **(** **)** -The number of enabled input ports for this node. +The number of enabled input ports for this animation node. .. rst-class:: classref-item-separator diff --git a/classes/class_animationplayer.rst b/classes/class_animationplayer.rst index 4631df46fef..57ac31c3745 100644 --- a/classes/class_animationplayer.rst +++ b/classes/class_animationplayer.rst @@ -12,20 +12,20 @@ AnimationPlayer **Inherits:** :ref:`Node` **<** :ref:`Object` -Player of :ref:`Animation` resources. +A node used for animation playback. .. rst-class:: classref-introduction-group Description ----------- -An animation player is used for general-purpose playback of :ref:`Animation` resources. It contains a dictionary of :ref:`AnimationLibrary` resources and custom blend times between animation transitions. +An animation player is used for general-purpose playback of animations. It contains a dictionary of :ref:`AnimationLibrary` resources and custom blend times between animation transitions. Some methods and properties use a single key to reference an animation directly. These keys are formatted as the key for the library, followed by a forward slash, then the key for the animation within the library, for example ``"movement/run"``. If the library's key is an empty string (known as the default library), the forward slash is omitted, being the same key used by the library. -\ **AnimationPlayer** is more suited than :ref:`Tween` for animations where you know the final values in advance. For example, fading a screen in and out is more easily done with an **AnimationPlayer** node thanks to the animation tools provided by the editor. That particular example can also be implemented with a :ref:`Tween`, but it requires doing everything by code. +\ **AnimationPlayer** is better-suited than :ref:`Tween` for more complex animations, for example ones with non-trivial timings. It can also be used over :ref:`Tween` if the animation track editor is more convenient than doing it in code. -Updating the target properties of animations occurs at process time. +Updating the target properties of animations occurs at the process frame. .. rst-class:: classref-introduction-group @@ -308,7 +308,7 @@ Property Descriptions - void **set_assigned_animation** **(** :ref:`String` value **)** - :ref:`String` **get_assigned_animation** **(** **)** -If playing, the the current animation's key, otherwise, the animation last played. When set, this changes the animation, but will not play it unless already playing. See also :ref:`current_animation`. +If playing, the current animation's key, otherwise, the animation last played. When set, this changes the animation, but will not play it unless already playing. See also :ref:`current_animation`. .. rst-class:: classref-item-separator @@ -676,6 +676,8 @@ Returns the :ref:`Animation` with the key ``name``. If the anim Returns the first :ref:`AnimationLibrary` with key ``name`` or ``null`` if not found. +To get the **AnimationPlayer**'s global animation library, use ``get_animation_library("")``. + .. rst-class:: classref-item-separator ---- @@ -798,7 +800,9 @@ See also :ref:`stop`. void **play** **(** :ref:`StringName` name="", :ref:`float` custom_blend=-1, :ref:`float` custom_speed=1.0, :ref:`bool` from_end=false **)** -Plays the animation with key ``name``. Custom blend times and speed can be set. 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``. 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 **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. diff --git a/classes/class_animationrootnode.rst b/classes/class_animationrootnode.rst index a38b11b1951..52a9089c52d 100644 --- a/classes/class_animationrootnode.rst +++ b/classes/class_animationrootnode.rst @@ -14,7 +14,23 @@ AnimationRootNode **Inherited By:** :ref:`AnimationNodeAnimation`, :ref:`AnimationNodeBlendSpace1D`, :ref:`AnimationNodeBlendSpace2D`, :ref:`AnimationNodeBlendTree`, :ref:`AnimationNodeStateMachine` -The :ref:`AnimationNode` which can be set as the root of an :ref:`AnimationTree`. +Base class for :ref:`AnimationNode`\ s that hold one or multiple composite animations. Usually used for :ref:`AnimationTree.tree_root`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +**AnimationRootNode** is a base class for :ref:`AnimationNode`\ s that hold a complete animation. A complete animation refers to the output of an :ref:`AnimationNodeOutput` in an :ref:`AnimationNodeBlendTree` or the output of another **AnimationRootNode**. Used for :ref:`AnimationTree.tree_root` or in other **AnimationRootNode**\ s. + +Examples of built-in root nodes include :ref:`AnimationNodeBlendTree` (allows blending nodes between each other using various modes), :ref:`AnimationNodeStateMachine` (allows to configure blending and transitions between nodes using a state machine pattern), :ref:`AnimationNodeBlendSpace2D` (allows linear blending between **three** :ref:`AnimationNode`\ s), :ref:`AnimationNodeBlendSpace1D` (allows linear blending only between **two** :ref:`AnimationNode`\ s). + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` .. |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_animationtree.rst b/classes/class_animationtree.rst index c819fb86558..edfce45383b 100644 --- a/classes/class_animationtree.rst +++ b/classes/class_animationtree.rst @@ -12,14 +12,14 @@ AnimationTree **Inherits:** :ref:`Node` **<** :ref:`Object` -A node to be used for advanced animation transitions in an :ref:`AnimationPlayer`. +A node used for advanced animation transitions in an :ref:`AnimationPlayer`. .. rst-class:: classref-introduction-group Description ----------- -A node to be used for advanced animation transitions in an :ref:`AnimationPlayer`. +A node used for advanced animation transitions in an :ref:`AnimationPlayer`. \ **Note:** When linked with an :ref:`AnimationPlayer`, several properties and methods of the corresponding :ref:`AnimationPlayer` will not function as expected. Playback and transitions should be handled using only the **AnimationTree** and its constituent :ref:`AnimationNode`\ (s). The :ref:`AnimationPlayer` node should be used solely for adding, deleting, and editing animations. diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst index c5408cd6e13..9cef9783d95 100644 --- a/classes/class_area2d.rst +++ b/classes/class_area2d.rst @@ -12,18 +12,16 @@ Area2D **Inherits:** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -2D area for detection, as well as physics and audio influence. +A region of 2D space that detects other :ref:`CollisionObject2D`\ s entering or exiting it. .. rst-class:: classref-introduction-group Description ----------- -2D area that detects :ref:`CollisionObject2D` nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping) and route audio to custom audio buses. +**Area2D** is a region of 2D space defined by one or multiple :ref:`CollisionShape2D` or :ref:`CollisionPolygon2D` child nodes. It detects when other :ref:`CollisionObject2D`\ s enter or exit it, and it also keeps track of which collision objects haven't exited it yet (i.e. which one are overlapping it). -To give the area its shape, add a :ref:`CollisionShape2D` or a :ref:`CollisionPolygon2D` node as a *direct* child (or add multiple such nodes as direct children) of the area. - -\ **Warning:** See :ref:`ConcavePolygonShape2D` for a warning about possibly unexpected behavior when using that shape for an area. +This node can also locally alter or override physics parameters (gravity, damping) and route audio to custom audio buses. .. rst-class:: classref-introduction-group @@ -75,7 +73,7 @@ Properties +-------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ | :ref:`bool` | :ref:`monitoring` | ``true`` | +-------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`priority` | ``0.0`` | + | :ref:`int` | :ref:`priority` | ``0`` | +-------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ .. rst-class:: classref-reftable-group @@ -551,14 +549,14 @@ If ``true``, the area detects bodies or areas entering and exiting it. .. rst-class:: classref-property -:ref:`float` **priority** = ``0.0`` +:ref:`int` **priority** = ``0`` .. rst-class:: classref-property-setget -- void **set_priority** **(** :ref:`float` value **)** -- :ref:`float` **get_priority** **(** **)** +- void **set_priority** **(** :ref:`int` value **)** +- :ref:`int` **get_priority** **(** **)** -The area's priority. Higher priority areas are processed first. +The area's priority. Higher priority areas are processed first. The :ref:`World2D`'s physics is always processed last, after all areas. .. rst-class:: classref-section-separator diff --git a/classes/class_area3d.rst b/classes/class_area3d.rst index 346dba0d953..05a46ecf674 100644 --- a/classes/class_area3d.rst +++ b/classes/class_area3d.rst @@ -12,26 +12,26 @@ Area3D **Inherits:** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -3D area for detection, as well as physics and audio influence. +A region of 3D space that detects other :ref:`CollisionObject3D`\ s entering or exiting it. .. rst-class:: classref-introduction-group Description ----------- -3D area that detects :ref:`CollisionObject3D` nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping) and route audio to custom audio buses. +**Area3D** is a region of 3D space defined by one or multiple :ref:`CollisionShape3D` or :ref:`CollisionPolygon3D` child nodes. It detects when other :ref:`CollisionObject3D`\ s enter or exit it, and it also keeps track of which collision objects haven't exited it yet (i.e. which one are overlapping it). -To give the area its shape, add a :ref:`CollisionShape3D` or a :ref:`CollisionPolygon3D` node as a *direct* child (or add multiple such nodes as direct children) of the area. +This node can also locally alter or override physics parameters (gravity, damping) and route audio to custom audio buses. -\ **Warning:** See :ref:`ConcavePolygonShape3D` (also called "trimesh") for a warning about possibly unexpected behavior when using that shape for an area. - -\ **Warning:** With a non-uniform scale this node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size(s) of its collision shape(s) instead. +\ **Warning:** Using a :ref:`ConcavePolygonShape3D` inside a :ref:`CollisionShape3D` child of this node (created e.g. by using the *Create Trimesh Collision Sibling* option in the *Mesh* menu that appears when selecting a :ref:`MeshInstance3D` node) may give unexpected results, since this collision shape is hollow. If this is not desired, it has to be split into multiple :ref:`ConvexPolygonShape3D`\ s or primitive shapes like :ref:`BoxShape3D`, or in some cases it may be replaceable by a :ref:`CollisionPolygon3D`. .. rst-class:: classref-introduction-group Tutorials --------- +- :doc:`Using Area2D <../tutorials/physics/using_area_2d>` + - `3D Platformer Demo `__ - `GUI in 3D Demo `__ @@ -73,7 +73,7 @@ Properties +-------------------------------------------------+---------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`monitoring` | ``true`` | +-------------------------------------------------+---------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`priority` | ``0.0`` | + | :ref:`int` | :ref:`priority` | ``0`` | +-------------------------------------------------+---------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`reverb_bus_amount` | ``0.0`` | +-------------------------------------------------+---------------------------------------------------------------------------------------+-----------------------+ @@ -563,14 +563,14 @@ If ``true``, the area detects bodies or areas entering and exiting it. .. rst-class:: classref-property -:ref:`float` **priority** = ``0.0`` +:ref:`int` **priority** = ``0`` .. rst-class:: classref-property-setget -- void **set_priority** **(** :ref:`float` value **)** -- :ref:`float` **get_priority** **(** **)** +- void **set_priority** **(** :ref:`int` value **)** +- :ref:`int` **get_priority** **(** **)** -The area's priority. Higher priority areas are processed first. +The area's priority. Higher priority areas are processed first. The :ref:`World3D`'s physics is always processed last, after all areas. .. rst-class:: classref-item-separator @@ -689,7 +689,7 @@ The magnitude of area-specific wind force. - void **set_wind_source_path** **(** :ref:`NodePath` value **)** - :ref:`NodePath` **get_wind_source_path** **(** **)** -The :ref:`Node3D` which is used to specify the the direction and origin of an area-specific wind force. The direction is opposite to the z-axis of the :ref:`Node3D`'s local transform, and its origin is the origin of the :ref:`Node3D`'s local transform. +The :ref:`Node3D` which is used to specify the direction and origin of an area-specific wind force. The direction is opposite to the z-axis of the :ref:`Node3D`'s local transform, and its origin is the origin of the :ref:`Node3D`'s local transform. .. rst-class:: classref-section-separator diff --git a/classes/class_array.rst b/classes/class_array.rst index 101ddf12895..9c16314554a 100644 --- a/classes/class_array.rst +++ b/classes/class_array.rst @@ -10,14 +10,14 @@ Array ===== -A generic array datatype. +A built-in data structure that holds a sequence of elements. .. rst-class:: classref-introduction-group Description ----------- -A generic array that can contain several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 is the second to last, etc.). +An array data structure that can contain a sequence of elements of any type. Elements are accessed by a numerical index starting at 0. Negative indices are used to count from the back (-1 is the last element, -2 is the second to last, etc.). \ **Example:**\ @@ -64,14 +64,10 @@ Arrays can be concatenated using the ``+`` operator: -\ **Note:** Concatenating with the ``+=`` operator will create a new array, which has a cost. If you want to append another array to an existing array, :ref:`append_array` is more efficient. - \ **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. -\ **Note:** When declaring an array with ``const``, the array itself can still be mutated by defining the values at individual indices or pushing/removing elements. Using ``const`` will only prevent assigning the constant with another value after it was initialized. - .. rst-class:: classref-reftable-group Constructors @@ -873,6 +869,18 @@ See also :ref:`filter`, :ref:`reduce`. In this example every array element is checked and the first maximum value is returned: + +:: + + func _ready(): + var arr = [Vector2(0, 1), Vector2(2, 0), Vector2(1, 1), Vector2(1, 0), Vector2(0, 2)] + # In this example we compare the lengths. + print(arr.reduce(func(max, val): return val if is_length_greater(val, max) else max)) + + func is_length_greater(a, b): + return a.length() > b.length() + .. rst-class:: classref-item-separator ---- @@ -885,6 +893,8 @@ Returns the maximum value contained in the array if all elements are of comparab Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, ``null`` is returned. +See also :ref:`max` for an example of using a custom comparator. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_arrayoccluder3d.rst b/classes/class_arrayoccluder3d.rst index 1d8f63c1a32..96707157921 100644 --- a/classes/class_arrayoccluder3d.rst +++ b/classes/class_arrayoccluder3d.rst @@ -69,9 +69,9 @@ Property Descriptions - void **set_indices** **(** :ref:`PackedInt32Array` value **)** - :ref:`PackedInt32Array` **get_indices** **(** **)** -.. container:: contribute +The occluder's index position. Indices determine which points from the :ref:`vertices` array should be drawn, and in which order. - There is currently no description for this property. Please help us by :ref:`contributing one `! +\ **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. .. rst-class:: classref-item-separator @@ -88,9 +88,9 @@ Property Descriptions - void **set_vertices** **(** :ref:`PackedVector3Array` value **)** - :ref:`PackedVector3Array` **get_vertices** **(** **)** -.. container:: contribute +The occluder's vertex positions in local 3D coordinates. - There is currently no description for this property. Please help us by :ref:`contributing one `! +\ **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. .. rst-class:: classref-section-separator @@ -107,9 +107,7 @@ Method Descriptions void **set_arrays** **(** :ref:`PackedVector3Array` vertices, :ref:`PackedInt32Array` indices **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets :ref:`indices` and :ref:`vertices`, while updating the final occluder only once after both values are 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_aspectratiocontainer.rst b/classes/class_aspectratiocontainer.rst index ea65e31d234..5600b7ffe43 100644 --- a/classes/class_aspectratiocontainer.rst +++ b/classes/class_aspectratiocontainer.rst @@ -12,21 +12,21 @@ AspectRatioContainer **Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Container that preserves its child controls' aspect ratio. +A container that preserves the proportions of its child controls. .. rst-class:: classref-introduction-group Description ----------- -Arranges child controls in a way to preserve their aspect ratio automatically whenever the container is resized. Solves the problem where the container size is dynamic and the contents' size needs to adjust accordingly without losing proportions. +A container type that arranges its child controls in a way that preserves their proportions automatically when the container is resized. Useful when a container has a dynamic size and the child nodes must adjust their sizes accordingly without losing their aspect ratios. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`GUI containers <../tutorials/ui/gui_containers>` +- :doc:`Using Containers <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group diff --git a/classes/class_astar2d.rst b/classes/class_astar2d.rst index d034edeebec..5a056c9259c 100644 --- a/classes/class_astar2d.rst +++ b/classes/class_astar2d.rst @@ -12,14 +12,16 @@ AStar2D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -AStar class representation that uses 2D vectors as edges. +An implementation of A\* for finding the shortest path between two vertices on a connected graph in 2D space. .. rst-class:: classref-introduction-group Description ----------- -This is a wrapper for the :ref:`AStar3D` class which uses 2D vectors instead of 3D vectors. +An implementation of the A\* algorithm, used to find the shortest path between two vertices on a connected graph in 2D space. + +See :ref:`AStar3D` for a more thorough explanation on how to use this class. **AStar2D** is a wrapper for :ref:`AStar3D` that enforces 2D coordinates. .. rst-class:: classref-reftable-group @@ -98,7 +100,7 @@ Method Descriptions Called when computing the cost between two connected points. -Note that this function is hidden in the default ``AStar2D`` class. +Note that this function is hidden in the default **AStar2D** class. .. rst-class:: classref-item-separator @@ -112,7 +114,7 @@ Note that this function is hidden in the default ``AStar2D`` class. Called when estimating the cost between a point and the path's ending point. -Note that this function is hidden in the default ``AStar2D`` class. +Note that this function is hidden in the default **AStar2D** class. .. rst-class:: classref-item-separator diff --git a/classes/class_astar3d.rst b/classes/class_astar3d.rst index eeb2a5cc4f1..2d21ffa47e3 100644 --- a/classes/class_astar3d.rst +++ b/classes/class_astar3d.rst @@ -12,16 +12,16 @@ AStar3D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -An implementation of A\* to find the shortest paths among connected points in space. +An implementation of A\* for finding the shortest path between two vertices on a connected graph in 3D space. .. rst-class:: classref-introduction-group Description ----------- -A\* (A star) is a computer algorithm that is widely used in pathfinding and graph traversal, the process of plotting short paths among vertices (points), passing through a given set of edges (segments). It enjoys widespread use due to its performance and accuracy. Godot's A\* implementation uses points in three-dimensional space and Euclidean distances by default. +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`. Then you can test if there is a path between two points with the :ref:`are_points_connected` function, get a path containing indices by :ref:`get_id_path`, or one containing actual coordinates with :ref:`get_point_path`. +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 class that extends ``AStar3D`` and override methods :ref:`_compute_cost` and :ref:`_estimate_cost`. Both take two indices and return a length, as is shown in the following example. diff --git a/classes/class_astargrid2d.rst b/classes/class_astargrid2d.rst index 59ae9183a9b..d65cc0f751a 100644 --- a/classes/class_astargrid2d.rst +++ b/classes/class_astargrid2d.rst @@ -12,16 +12,16 @@ AStarGrid2D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -A\* (or "A-Star") pathfinding tailored to find the shortest paths on 2D grids. +An implementation of A\* for finding the shortest path between two points on a partial 2D grid. .. rst-class:: classref-introduction-group Description ----------- -Compared to :ref:`AStar2D` you don't need to manually create points or connect them together. It also supports multiple type of heuristics and modes for diagonal movement. This class also provides a jumping mode which is faster to calculate than without it in the :ref:`AStar2D` class. +**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. -In contrast to :ref:`AStar2D`, you only need set the :ref:`size` 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:: @@ -29,7 +29,7 @@ In contrast to :ref:`AStar2D`, you only need set the :ref:`size`, you only need set the :ref:`size`. + .. rst-class:: classref-reftable-group Properties @@ -54,21 +56,23 @@ Properties .. table:: :widths: auto - +----------------------------------------------------+------------------------------------------------------------------------------------------+--------------------+ - | :ref:`Vector2` | :ref:`cell_size` | ``Vector2(1, 1)`` | - +----------------------------------------------------+------------------------------------------------------------------------------------------+--------------------+ - | :ref:`Heuristic` | :ref:`default_compute_heuristic` | ``0`` | - +----------------------------------------------------+------------------------------------------------------------------------------------------+--------------------+ - | :ref:`Heuristic` | :ref:`default_estimate_heuristic` | ``0`` | - +----------------------------------------------------+------------------------------------------------------------------------------------------+--------------------+ - | :ref:`DiagonalMode` | :ref:`diagonal_mode` | ``0`` | - +----------------------------------------------------+------------------------------------------------------------------------------------------+--------------------+ - | :ref:`bool` | :ref:`jumping_enabled` | ``false`` | - +----------------------------------------------------+------------------------------------------------------------------------------------------+--------------------+ - | :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | - +----------------------------------------------------+------------------------------------------------------------------------------------------+--------------------+ - | :ref:`Vector2i` | :ref:`size` | ``Vector2i(0, 0)`` | - +----------------------------------------------------+------------------------------------------------------------------------------------------+--------------------+ + +----------------------------------------------------+------------------------------------------------------------------------------------------+------------------------+ + | :ref:`Vector2` | :ref:`cell_size` | ``Vector2(1, 1)`` | + +----------------------------------------------------+------------------------------------------------------------------------------------------+------------------------+ + | :ref:`Heuristic` | :ref:`default_compute_heuristic` | ``0`` | + +----------------------------------------------------+------------------------------------------------------------------------------------------+------------------------+ + | :ref:`Heuristic` | :ref:`default_estimate_heuristic` | ``0`` | + +----------------------------------------------------+------------------------------------------------------------------------------------------+------------------------+ + | :ref:`DiagonalMode` | :ref:`diagonal_mode` | ``0`` | + +----------------------------------------------------+------------------------------------------------------------------------------------------+------------------------+ + | :ref:`bool` | :ref:`jumping_enabled` | ``false`` | + +----------------------------------------------------+------------------------------------------------------------------------------------------+------------------------+ + | :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | + +----------------------------------------------------+------------------------------------------------------------------------------------------+------------------------+ + | :ref:`Rect2i` | :ref:`region` | ``Rect2i(0, 0, 0, 0)`` | + +----------------------------------------------------+------------------------------------------------------------------------------------------+------------------------+ + | :ref:`Vector2i` | :ref:`size` | ``Vector2i(0, 0)`` | + +----------------------------------------------------+------------------------------------------------------------------------------------------+------------------------+ .. rst-class:: classref-reftable-group @@ -355,6 +359,23 @@ The offset of the grid which will be applied to calculate the resulting point po ---- +.. _class_AStarGrid2D_property_region: + +.. rst-class:: classref-property + +:ref:`Rect2i` **region** = ``Rect2i(0, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_region** **(** :ref:`Rect2i` value **)** +- :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. + +.. rst-class:: classref-item-separator + +---- + .. _class_AStarGrid2D_property_size: .. rst-class:: classref-property @@ -368,6 +389,8 @@ The offset of the grid which will be applied to calculate the resulting point po 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. +\ *Deprecated.* Use :ref:`region` instead. + .. rst-class:: classref-section-separator ---- @@ -411,7 +434,7 @@ Note that this function is hidden in the default ``AStarGrid2D`` class. void **clear** **(** **)** -Clears the grid and sets the :ref:`size` to :ref:`Vector2i.ZERO`. +Clears the grid and sets the :ref:`region` to ``Rect2i(0, 0, 0, 0)``. .. rst-class:: classref-item-separator @@ -549,7 +572,9 @@ Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scal void **update** **(** **)** -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:`size`, :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. .. |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_audiostreamgenerator.rst b/classes/class_audiostreamgenerator.rst index cfd9a9949f4..67e243f0632 100644 --- a/classes/class_audiostreamgenerator.rst +++ b/classes/class_audiostreamgenerator.rst @@ -12,14 +12,38 @@ AudioStreamGenerator **Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Audio stream that generates sounds procedurally. +An audio stream with utilities for procedural sound generation. .. rst-class:: classref-introduction-group Description ----------- -This audio stream does not play back sounds, but expects a script to generate audio data for it instead. See also :ref:`AudioStreamGeneratorPlayback`. +**AudioStreamGenerator** is a type of audio stream that does not play back sounds on its own; instead, it expects a script to generate audio data for it. See also :ref:`AudioStreamGeneratorPlayback`. + +Here's a sample on how to use it to generate a sine wave: + +:: + + var playback # Will hold the AudioStreamGeneratorPlayback. + @onready var sample_hz = $AudioStreamPlayer.stream.mix_rate + var pulse_hz = 440.0 # The frequency of the sound wave. + + func _ready(): + $AudioStreamPlayer.play() + playback = $AudioStreamPlayer.get_stream_playback() + fill_buffer() + + func fill_buffer(): + var phase = 0.0 + var increment = pulse_hz / sample_hz + var frames_available = playback.get_frames_available() + + for i in range(frames_available): + playback.push_frame(Vector2.ONE * sin(phase * TAU)) + phase = fmod(phase + increment, 1.0) + +In the example above, the "AudioStreamPlayer" node must use an **AudioStreamGenerator** as its stream. The ``fill_buffer`` function provides audio data for approximating a sine wave. See also :ref:`AudioEffectSpectrumAnalyzer` for performing real-time audio spectrum analysis. @@ -32,8 +56,6 @@ Tutorials - `Audio Generator Demo `__ -- `Godot 3.2 will get new audio features `__ - .. rst-class:: classref-reftable-group Properties diff --git a/classes/class_audiostreamplaybackpolyphonic.rst b/classes/class_audiostreamplaybackpolyphonic.rst index 4545835bc79..f343acd3133 100644 --- a/classes/class_audiostreamplaybackpolyphonic.rst +++ b/classes/class_audiostreamplaybackpolyphonic.rst @@ -87,7 +87,7 @@ Return true whether the stream associated with an integer ID is still playing. C Play an :ref:`AudioStream` at a given offset, volume and pitch scale. Playback starts immediately. -The return value is an unique integer ID that is associated to this playback stream and which can be used to control it. +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. diff --git a/classes/class_basebutton.rst b/classes/class_basebutton.rst index d08c024d86d..ec3b46dbd6f 100644 --- a/classes/class_basebutton.rst +++ b/classes/class_basebutton.rst @@ -14,14 +14,14 @@ BaseButton **Inherited By:** :ref:`Button`, :ref:`LinkButton`, :ref:`TextureButton` -Base class for different kinds of buttons. +Abstract base class for GUI buttons. .. rst-class:: classref-introduction-group Description ----------- -BaseButton is the abstract base class for buttons, so it shouldn't be used directly (it doesn't display anything). Other types of buttons inherit from it. +**BaseButton** is an abstract base class for GUI buttons. It doesn't display anything by itself. .. rst-class:: classref-reftable-group @@ -250,6 +250,8 @@ Determines when the button is considered clicked, one of the :ref:`ActionMode` associated with the button. Not to be confused with node groups. +\ **Note:** The button will be configured as a radio button if a :ref:`ButtonGroup` is assigned to it. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_basematerial3d.rst b/classes/class_basematerial3d.rst index 70f632b993c..e9223fd77ac 100644 --- a/classes/class_basematerial3d.rst +++ b/classes/class_basematerial3d.rst @@ -2945,7 +2945,7 @@ The method for rendering the specular blob. See :ref:`SpecularMode` feature, :ref:`bool` enable **)** - :ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| -If ``true``, subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. +If ``true``, subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. Subsurface scattering quality is controlled by :ref:`ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_quality`. .. rst-class:: classref-item-separator @@ -2979,7 +2979,7 @@ If ``true``, subsurface scattering will use a special mode optimized for the col - void **set_subsurface_scattering_strength** **(** :ref:`float` value **)** - :ref:`float` **get_subsurface_scattering_strength** **(** **)** -The strength of the subsurface scattering effect. +The strength of the subsurface scattering effect. The depth of the effect is also controlled by :ref:`ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_scale`, which is set globally. .. rst-class:: classref-item-separator @@ -3134,7 +3134,7 @@ Repeat flags for the texture. See :ref:`TextureFilter` value **)** - :ref:`Transparency` **get_transparency** **(** **)** -If ``true``, transparency is enabled on the body. Some transparency modes will disable shadow casting. Any transparency mode other than Disabled has a greater performance impact compared to opaque rendering. See also :ref:`blend_mode`. +The material's transparency mode. Some transparency modes will disable shadow casting. Any transparency mode other than :ref:`TRANSPARENCY_DISABLED` has a greater performance impact compared to opaque rendering. See also :ref:`blend_mode`. .. rst-class:: classref-item-separator diff --git a/classes/class_basis.rst b/classes/class_basis.rst index b244793e00d..1c48c14f38c 100644 --- a/classes/class_basis.rst +++ b/classes/class_basis.rst @@ -10,18 +10,18 @@ Basis ===== -3×3 matrix datatype. +A 3×3 matrix for representing 3D rotation and scale. .. rst-class:: classref-introduction-group Description ----------- -3×3 matrix used for 3D rotation and scale. Almost always used as an orthogonal basis for a :ref:`Transform3D`. +A 3×3 matrix used for representing 3D rotation and scale. Usually used as an orthogonal basis for a :ref:`Transform3D`. Contains 3 vector fields X, Y and Z as its columns, which are typically interpreted as the local basis vectors of a transformation. For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S). -Can also be accessed as array of 3D vectors. These vectors are normally orthogonal to each other, but are not necessarily normalized (due to scaling). +Basis can also be accessed as an array of 3D vectors. These vectors are usually orthogonal to each other, but are not necessarily normalized (due to scaling). For more information, read the "Matrices and transforms" documentation article. @@ -88,43 +88,43 @@ Methods .. table:: :widths: auto - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`determinant` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`from_euler` **(** :ref:`Vector3` euler, :ref:`int` order=2 **)** |static| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`from_scale` **(** :ref:`Vector3` scale **)** |static| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_euler` **(** :ref:`int` order=2 **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion` | :ref:`get_rotation_quaternion` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_scale` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`inverse` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Basis` b **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_finite` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`looking_at` **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** |static| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`orthonormalized` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`rotated` **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`scaled` **(** :ref:`Vector3` scale **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`slerp` **(** :ref:`Basis` to, :ref:`float` weight **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`tdotx` **(** :ref:`Vector3` with **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`tdoty` **(** :ref:`Vector3` with **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`tdotz` **(** :ref:`Vector3` with **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`transposed` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`determinant` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`from_euler` **(** :ref:`Vector3` euler, :ref:`int` order=2 **)** |static| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`from_scale` **(** :ref:`Vector3` scale **)** |static| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_euler` **(** :ref:`int` order=2 **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`get_rotation_quaternion` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_scale` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`inverse` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Basis` b **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_finite` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`looking_at` **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0), :ref:`bool` use_model_front=false **)** |static| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`orthonormalized` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`rotated` **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`scaled` **(** :ref:`Vector3` scale **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`slerp` **(** :ref:`Basis` to, :ref:`float` weight **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`tdotx` **(** :ref:`Vector3` with **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`tdoty` **(** :ref:`Vector3` with **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`tdotz` **(** :ref:`Vector3` with **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`transposed` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -394,7 +394,7 @@ Returns the inverse of the matrix. :ref:`bool` **is_equal_approx** **(** :ref:`Basis` b **)** |const| -Returns ``true`` if this basis and ``b`` are approximately equal, by calling ``is_equal_approx`` on each component. +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 @@ -406,7 +406,7 @@ Returns ``true`` if this basis and ``b`` are approximately equal, by calling ``i :ref:`bool` **is_finite** **(** **)** |const| -Returns ``true`` if this basis is finite, by calling :ref:`@GlobalScope.is_finite` on each component. +Returns ``true`` if this basis is finite, by calling :ref:`@GlobalScope.is_finite` on all vector components. .. rst-class:: classref-item-separator @@ -416,12 +416,14 @@ Returns ``true`` if this basis is finite, by calling :ref:`@GlobalScope.is_finit .. rst-class:: classref-method -:ref:`Basis` **looking_at** **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** |static| +:ref:`Basis` **looking_at** **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0), :ref:`bool` use_model_front=false **)** |static| Creates a Basis with a rotation such that the forward axis (-Z) points towards the ``target`` position. The up axis (+Y) points as close to the ``up`` vector as possible while staying perpendicular to the forward axis. The resulting Basis is orthonormalized. The ``target`` and ``up`` vectors cannot be zero, and cannot be parallel to each other. +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. By default, the -Z axis (camera forward) is treated as forward (implies +X is right). + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_bone2d.rst b/classes/class_bone2d.rst index 280e73f0221..9c37474a255 100644 --- a/classes/class_bone2d.rst +++ b/classes/class_bone2d.rst @@ -12,16 +12,16 @@ Bone2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Joint used with :ref:`Skeleton2D` to control and animate other nodes. +A joint used with :ref:`Skeleton2D` to control and animate other nodes. .. rst-class:: classref-introduction-group Description ----------- -Use a hierarchy of ``Bone2D`` bound to a :ref:`Skeleton2D` to control, and animate other :ref:`Node2D` nodes. +A hierarchy of **Bone2D**\ s can be bound to a :ref:`Skeleton2D` to control and animate other :ref:`Node2D` nodes. -You can use ``Bone2D`` and ``Skeleton2D`` nodes to animate 2D meshes created with the Polygon 2D UV editor. +You can use **Bone2D** and :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. @@ -116,7 +116,7 @@ Stores the node's current transforms in :ref:`rest`. :ref:`bool` **get_autocalculate_length_and_angle** **(** **)** |const| -Returns whether this ``Bone2D`` node is going to autocalculate its length and bone angle using its first ``Bone2D`` child node, if one exists. If there are no ``Bone2D`` children, then it cannot autocalculate these values and will print a warning. +Returns whether this **Bone2D** is going to autocalculate its length and bone angle using its first **Bone2D** child node, if one exists. If there are no **Bone2D** children, then it cannot autocalculate these values and will print a warning. .. rst-class:: classref-item-separator @@ -128,9 +128,9 @@ Returns whether this ``Bone2D`` node is going to autocalculate its length and bo :ref:`float` **get_bone_angle** **(** **)** |const| -Returns the angle of the bone in the ``Bone2D`` node. +Returns the angle of the bone in the **Bone2D**. -\ **Note:** This is different from the ``Bone2D``'s rotation. The bone angle is the rotation of the bone shown by the ``Bone2D`` gizmo, and because ``Bone2D`` bones are based on positions, this can vary from the actual rotation of the ``Bone2D`` node. +\ **Note:** This is different from the **Bone2D**'s rotation. The bone's angle is the rotation of the bone shown by the gizmo, which is unaffected by the **Bone2D**'s :ref:`Node2D.transform`. .. rst-class:: classref-item-separator @@ -154,7 +154,7 @@ Returns the node's index as part of the entire skeleton. See :ref:`Skeleton2D` **get_length** **(** **)** |const| -Returns the length of the bone in the ``Bone2D`` node. +Returns the length of the bone in the **Bone2D** node. .. rst-class:: classref-item-separator @@ -178,7 +178,7 @@ Returns the node's :ref:`rest` ``Transform2D`` if it void **set_autocalculate_length_and_angle** **(** :ref:`bool` auto_calculate **)** -When set to ``true``, the ``Bone2D`` node will attempt to automatically calculate the bone angle and length using the first child ``Bone2D`` node, if one exists. If none exist, the ``Bone2D`` cannot automatically calculate these values and will print a warning. +When set to ``true``, the **Bone2D** node will attempt to automatically calculate the bone angle and length using the first child **Bone2D** node, if one exists. If none exist, the **Bone2D** cannot automatically calculate these values and will print a warning. .. rst-class:: classref-item-separator @@ -190,9 +190,9 @@ When set to ``true``, the ``Bone2D`` node will attempt to automatically calculat void **set_bone_angle** **(** :ref:`float` angle **)** -Sets the bone angle for the ``Bone2D`` node. This is typically set to the rotation from the ``Bone2D`` node to a child ``Bone2D`` node. +Sets the bone angle for the **Bone2D**. This is typically set to the rotation from the **Bone2D** to a child **Bone2D** node. -\ **Note:** This is different from the ``Bone2D``'s rotation. The bone angle is the rotation of the bone shown by the ``Bone2D`` gizmo, and because ``Bone2D`` bones are based on positions, this can vary from the actual rotation of the ``Bone2D`` node. +\ **Note:** **Note:** This is different from the **Bone2D**'s rotation. The bone's angle is the rotation of the bone shown by the gizmo, which is unaffected by the **Bone2D**'s :ref:`Node2D.transform`. .. rst-class:: classref-item-separator @@ -204,7 +204,7 @@ Sets the bone angle for the ``Bone2D`` node. This is typically set to the rotati void **set_length** **(** :ref:`float` length **)** -Sets the length of the bone in the ``Bone2D`` node. +Sets the length of the bone in the **Bone2D**. .. |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_boneattachment3d.rst b/classes/class_boneattachment3d.rst index 0f14acef8f8..c237e1057c9 100644 --- a/classes/class_boneattachment3d.rst +++ b/classes/class_boneattachment3d.rst @@ -12,16 +12,14 @@ BoneAttachment3D **Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -A node that will attach to a bone. +А node that dynamically copies or overrides the 3D transform of a bone in its parent :ref:`Skeleton3D`. .. rst-class:: classref-introduction-group Description ----------- -This node will allow you to select a bone for this node to attach to. The BoneAttachment3D node can copy the transform of the select bone, or can override the transform of the selected bone. - -The BoneAttachment3D node must either be a child of a :ref:`Skeleton3D` node or be given an external :ref:`Skeleton3D` to use in order to function properly. +This node selects a bone in a :ref:`Skeleton3D` and attaches to it. This means that the **BoneAttachment3D** node will either dynamically copy or override the 3D transform of the selected bone. .. rst-class:: classref-reftable-group diff --git a/classes/class_bonemap.rst b/classes/class_bonemap.rst index f5d6fa20ad4..6f8902f7523 100644 --- a/classes/class_bonemap.rst +++ b/classes/class_bonemap.rst @@ -12,14 +12,14 @@ BoneMap **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Bone map for retargeting. +Describes a mapping of bone names for retargeting :ref:`Skeleton3D` into common names defined by a :ref:`SkeletonProfile`. .. rst-class:: classref-introduction-group Description ----------- -This class contains a hashmap that uses a list of bone names in :ref:`SkeletonProfile` as key names. +This class contains a dictionary that uses a list of bone names in :ref:`SkeletonProfile` as key names. By assigning the actual :ref:`Skeleton3D` bone name as the key value, it maps the :ref:`Skeleton3D` to the :ref:`SkeletonProfile`. diff --git a/classes/class_bool.rst b/classes/class_bool.rst index b892a09c038..3f28dfed530 100644 --- a/classes/class_bool.rst +++ b/classes/class_bool.rst @@ -10,113 +10,59 @@ bool ==== -Boolean built-in type. +A built-in boolean type. .. rst-class:: classref-introduction-group Description ----------- -Boolean is a built-in type. There are two boolean values: ``true`` and ``false``. You can think of it as a switch with on or off (1 or 0) setting. Booleans are used in programming for logic in condition statements, like ``if`` statements. +A **bool** is always one of two values: ``true`` or ``false``, similar to a switch that is either on or off. Booleans are used in programming for logic in condition statements. -Booleans can be directly used in ``if`` statements. The code below demonstrates this on the ``if can_shoot:`` line. You don't need to use ``== true``, you only need ``if can_shoot:``. Similarly, use ``if not can_shoot:`` rather than ``== false``. +Booleans can be directly used in ``if`` and ``elif`` statements. You don't need to add ``== true`` or ``== false``: .. tabs:: .. code-tab:: gdscript - var _can_shoot = true - - func shoot(): - if _can_shoot: - pass # Perform shooting actions here. + if can_shoot: + launch_bullet() .. code-tab:: csharp - private bool _canShoot = true; - - public void Shoot() + if (canShoot) { - if (_canShoot) - { - // Perform shooting actions here. - } + launchBullet(); } -The following code will only create a bullet if both conditions are met: action "shoot" is pressed and if ``can_shoot`` is ``true``. +Many common methods and operations return **bool**\ s, for example, ``shooting_cooldown <= 0.0`` may evaluate to ``true`` or ``false`` depending on the number's value. -\ **Note:** ``Input.is_action_pressed("shoot")`` is also a boolean that is ``true`` when "shoot" is pressed and ``false`` when "shoot" isn't pressed. +\ **bool**\ s are usually used with the logical operators ``and``, ``or``, and ``not`` to create complex conditions: .. tabs:: .. code-tab:: gdscript - var _can_shoot = true + if bullets > 0 and not is_reloading: + launch_bullet() - func shoot(): - if _can_shoot and Input.is_action_pressed("shoot"): - create_bullet() + if bullets == 0 or is_reloading: + play_clack_sound() .. code-tab:: csharp - private bool _canShoot = true; - - public void Shoot() - { - if (_canShoot && Input.IsActionPressed("shoot")) - { - CreateBullet(); - } - } - - - -The following code will set ``can_shoot`` to ``false`` and start a timer. This will prevent player from shooting until the timer runs out. Next ``can_shoot`` will be set to ``true`` again allowing player to shoot once again. - - -.. tabs:: - - .. code-tab:: gdscript - - var _can_shoot = true - @onready var _cool_down = $CoolDownTimer - - func shoot(): - if _can_shoot and Input.is_action_pressed("shoot"): - create_bullet() - _can_shoot = false - _cool_down.start() - - func _on_cool_down_timer_timeout(): - _can_shoot = true - - .. code-tab:: csharp - - private bool _canShoot = true; - private Timer _coolDown; - - public override void _Ready() - { - _coolDown = GetNode("CoolDownTimer"); - } - - public void Shoot() + if (bullets > 0 && !isReloading) { - if (_canShoot && Input.IsActionPressed("shoot")) - { - CreateBullet(); - _canShoot = false; - _coolDown.Start(); - } + launchBullet(); } - public void OnCoolDownTimerTimeout() + if (bullets == 0 || isReloading) { - _canShoot = true; + playClackSound(); } @@ -192,7 +138,7 @@ Constructs a **bool** as a copy of the given **bool**. :ref:`bool` **bool** **(** :ref:`float` from **)** -Cast a :ref:`float` value to a boolean value, this method will return ``false`` if ``0.0`` is passed in, and ``true`` for all other floats. +Cast a :ref:`float` value to a boolean value. This method will return ``false`` if ``0.0`` is passed in, and ``true`` for all other values. .. rst-class:: classref-item-separator @@ -202,7 +148,7 @@ Cast a :ref:`float` value to a boolean value, this method will retu :ref:`bool` **bool** **(** :ref:`int` from **)** -Cast an :ref:`int` value to a boolean value, this method will return ``false`` if ``0`` is passed in, and ``true`` for all other ints. +Cast an :ref:`int` value to a boolean value. This method will return ``false`` if ``0`` is passed in, and ``true`` for all other values. .. rst-class:: classref-section-separator diff --git a/classes/class_boxcontainer.rst b/classes/class_boxcontainer.rst index 50ecac93f14..ee43c27fe98 100644 --- a/classes/class_boxcontainer.rst +++ b/classes/class_boxcontainer.rst @@ -14,21 +14,21 @@ BoxContainer **Inherited By:** :ref:`HBoxContainer`, :ref:`VBoxContainer` -Base class for box containers. +A container that arranges its child controls horizontally or vertically. .. rst-class:: classref-introduction-group Description ----------- -Arranges child :ref:`Control` nodes vertically or horizontally, and rearranges them automatically when their minimum size changes. +A container that arranges its child controls horizontally or vertically, rearranging them automatically when their minimum size changes. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`GUI containers <../tutorials/ui/gui_containers>` +- :doc:`Using Containers <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group diff --git a/classes/class_boxshape3d.rst b/classes/class_boxshape3d.rst index 82884ba67ed..a34883af8b0 100644 --- a/classes/class_boxshape3d.rst +++ b/classes/class_boxshape3d.rst @@ -12,16 +12,16 @@ BoxShape3D **Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Box shape resource for 3D collisions. +A 3D box shape used for physics collision. .. rst-class:: classref-introduction-group Description ----------- -3D box shape to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. +A 3D box shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape3D`. -\ **Performance:** Being a primitive collision shape, **BoxShape3D** is fast to check collisions against (though not as fast as :ref:`SphereShape3D`). +\ **Performance:** **BoxShape3D** is fast to check collisions against. It is faster than :ref:`CapsuleShape3D` and :ref:`CylinderShape3D`, but slower than :ref:`SphereShape3D`. .. rst-class:: classref-introduction-group diff --git a/classes/class_button.rst b/classes/class_button.rst index 85f3a0b85fe..a0393dcb2a0 100644 --- a/classes/class_button.rst +++ b/classes/class_button.rst @@ -14,14 +14,14 @@ Button **Inherited By:** :ref:`CheckBox`, :ref:`CheckButton`, :ref:`ColorPickerButton`, :ref:`MenuButton`, :ref:`OptionButton` -Standard themed Button. +A themed button that can contain text and an icon. .. rst-class:: classref-introduction-group Description ----------- -Button is the standard themed button. It can contain text and an icon, and will display them according to the current :ref:`Theme`. +**Button** is the standard themed button. It can contain text and an icon, and it will display them according to the current :ref:`Theme`. \ **Example of creating a button and assigning an action when pressed by code:**\ @@ -56,11 +56,9 @@ Button is the standard themed button. It can contain text and an icon, and will -Buttons (like all Control nodes) can also be created in the editor, but some situations may require creating them from code. - See also :ref:`BaseButton` which contains common properties and methods associated with this node. -\ **Note:** Buttons do not interpret touch input and therefore don't support multitouch, since mouse emulation can only press one button at a given time. Use :ref:`TouchScreenButton` for buttons that trigger gameplay movement or actions, as :ref:`TouchScreenButton` supports multitouch. +\ **Note:** Buttons do not interpret touch input and therefore don't support multitouch, since mouse emulation can only press one button at a given time. Use :ref:`TouchScreenButton` for buttons that trigger gameplay movement or actions. .. rst-class:: classref-introduction-group @@ -79,27 +77,29 @@ Properties .. table:: :widths: auto - +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ - | :ref:`HorizontalAlignment` | :ref:`alignment` | ``1`` | - +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`clip_text` | ``false`` | - +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`expand_icon` | ``false`` | - +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`flat` | ``false`` | - +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ - | :ref:`Texture2D` | :ref:`icon` | | - +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ - | :ref:`HorizontalAlignment` | :ref:`icon_alignment` | ``0`` | - +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ - | :ref:`String` | :ref:`language` | ``""`` | - +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ - | :ref:`String` | :ref:`text` | ``""`` | - +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ - | :ref:`TextDirection` | :ref:`text_direction` | ``0`` | - +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ - | :ref:`OverrunBehavior` | :ref:`text_overrun_behavior` | ``0`` | - +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ + +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`HorizontalAlignment` | :ref:`alignment` | ``1`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`clip_text` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`expand_icon` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`flat` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`Texture2D` | :ref:`icon` | | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`HorizontalAlignment` | :ref:`icon_alignment` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`language` | ``""`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`text` | ``""`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`TextDirection` | :ref:`text_direction` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`OverrunBehavior` | :ref:`text_overrun_behavior` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`VerticalAlignment` | :ref:`vertical_icon_alignment` | ``1`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -138,6 +138,8 @@ Theme Properties +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`h_separation` | ``2`` | +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`icon_max_width` | ``0`` | + +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Font` | :ref:`font` | | @@ -209,7 +211,7 @@ When this property is enabled, text that is too large to fit the button is clipp - void **set_expand_icon** **(** :ref:`bool` value **)** - :ref:`bool` **is_expand_icon** **(** **)** -When enabled, the button's icon will expand/shrink to fit the button's size while keeping its aspect. +When enabled, the button's icon will expand/shrink to fit the button's size while keeping its aspect. See also :ref:`icon_max_width`. .. rst-class:: classref-item-separator @@ -262,7 +264,7 @@ To edit margin and spacing of the icon, use :ref:`h_separation` value **)** - :ref:`HorizontalAlignment` **get_icon_alignment** **(** **)** -Specifies if the icon should be aligned to the left, right, or center of a button. Uses the same :ref:`HorizontalAlignment` constants as the text alignment. If centered, text will draw on top of the icon. +Specifies if the icon should be aligned horizontally to the left, right, or center of a button. Uses the same :ref:`HorizontalAlignment` constants as the text alignment. If centered horizontally and vertically, text will draw on top of the icon. .. rst-class:: classref-item-separator @@ -332,6 +334,23 @@ Base text writing direction. Sets the clipping behavior when the text exceeds the node's bounding rectangle. See :ref:`OverrunBehavior` for a description of all modes. +.. rst-class:: classref-item-separator + +---- + +.. _class_Button_property_vertical_icon_alignment: + +.. rst-class:: classref-property + +:ref:`VerticalAlignment` **vertical_icon_alignment** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_vertical_icon_alignment** **(** :ref:`VerticalAlignment` value **)** +- :ref:`VerticalAlignment` **get_vertical_icon_alignment** **(** **)** + +Specifies if the icon should be aligned vertically to the top, bottom, or center of a button. Uses the same :ref:`VerticalAlignment` constants as the text alignment. If centered horizontally and vertically, text will draw on top of the icon. + .. rst-class:: classref-section-separator ---- @@ -509,6 +528,18 @@ The horizontal space between **Button**'s icon and text. Negative values will be ---- +.. _class_Button_theme_constant_icon_max_width: + +.. rst-class:: classref-themeproperty + +:ref:`int` **icon_max_width** = ``0`` + +The maximum allowed width of the **Button**'s icon. This limit is applied on top of the default size of the icon, or its expanded size if :ref:`expand_icon` is ``true``. The height is adjusted according to the icon's ratio. + +.. rst-class:: classref-item-separator + +---- + .. _class_Button_theme_constant_outline_size: .. rst-class:: classref-themeproperty diff --git a/classes/class_buttongroup.rst b/classes/class_buttongroup.rst index b0f2a550171..43d2ec067fc 100644 --- a/classes/class_buttongroup.rst +++ b/classes/class_buttongroup.rst @@ -12,16 +12,16 @@ ButtonGroup **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Group of Buttons. +A group of buttons that doesn't allow more than one button to be pressed at a time. .. rst-class:: classref-introduction-group Description ----------- -Group of :ref:`BaseButton`. The members of this group are treated like radio buttons in the sense that only one button can be pressed at the same time. +A group of :ref:`BaseButton`-derived buttons. The buttons in a **ButtonGroup** are treated like radio buttons: No more than one button can be pressed at a time. Some types of buttons (such as :ref:`CheckBox`) may have a special appearance in this state. -Every member of the ButtonGroup should have :ref:`BaseButton.toggle_mode` set to ``true``. +Every member of a **ButtonGroup** should have :ref:`BaseButton.toggle_mode` set to ``true``. .. rst-class:: classref-reftable-group @@ -31,9 +31,11 @@ Properties .. table:: :widths: auto - +-------------------------+-------------------------+---------------------------------------------------------------------------------------+ - | :ref:`bool` | resource_local_to_scene | ``true`` (overrides :ref:`Resource`) | - +-------------------------+-------------------------+---------------------------------------------------------------------------------------+ + +-------------------------+----------------------------------------------------------------+---------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`allow_unpress` | ``false`` | + +-------------------------+----------------------------------------------------------------+---------------------------------------------------------------------------------------+ + | :ref:`bool` | resource_local_to_scene | ``true`` (overrides :ref:`Resource`) | + +-------------------------+----------------------------------------------------------------+---------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -72,6 +74,28 @@ Emitted when one of the buttons of the group is pressed. .. rst-class:: classref-descriptions-group +Property Descriptions +--------------------- + +.. _class_ButtonGroup_property_allow_unpress: + +.. rst-class:: classref-property + +:ref:`bool` **allow_unpress** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_allow_unpress** **(** :ref:`bool` value **)** +- :ref:`bool` **is_allow_unpress** **(** **)** + +If ``true``, it is possible to unpress all buttons in this **ButtonGroup**. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- diff --git a/classes/class_callable.rst b/classes/class_callable.rst index 3465cdce834..e435574a69a 100644 --- a/classes/class_callable.rst +++ b/classes/class_callable.rst @@ -10,7 +10,7 @@ Callable ======== -Built-in type representing a method in an object instance or a standalone function. +A built-in type representing a method or a standalone function. .. rst-class:: classref-introduction-group @@ -196,7 +196,9 @@ Method Descriptions :ref:`Callable` **bind** **(** ... **)** |vararg| |const| -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`. +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. .. rst-class:: classref-item-separator @@ -208,7 +210,9 @@ Returns a copy of this **Callable** with one or more arguments bound. When calle :ref:`Callable` **bindv** **(** :ref:`Array` arguments **)** -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`. +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. .. rst-class:: classref-item-separator @@ -407,7 +411,15 @@ Perform an RPC (Remote Procedure Call) on a specific peer ID (see multiplayer do :ref:`Callable` **unbind** **(** :ref:`int` argcount **)** |const| -Returns a copy of this **Callable** with the arguments unbound, as defined by ``argcount``. Calling the returned **Callable** will call the method without the extra arguments that are supplied in the **Callable** on which you are calling this method. +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. + +:: + + func _ready(): + foo.unbind(1).call(1, 2) # Calls foo(1). + foo.bind(3, 4).unbind(1).call(1, 2) # Calls foo(1, 3, 4), note that it does not change the arguments from bind. .. rst-class:: classref-section-separator diff --git a/classes/class_camera3d.rst b/classes/class_camera3d.rst index 5b53b19ecd4..eedde2e4f5f 100644 --- a/classes/class_camera3d.rst +++ b/classes/class_camera3d.rst @@ -250,7 +250,13 @@ The :ref:`CameraAttributes` to use for this camera. - void **set_cull_mask** **(** :ref:`int` value **)** - :ref:`int` **get_cull_mask** **(** **)** -The culling mask that describes which 3D render layers are rendered by this camera. +The culling mask that describes which :ref:`VisualInstance3D.layers` are rendered by this camera. By default, all 20 user-visible layers are rendered. + +\ **Note:** Since the :ref:`cull_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:`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`. + +\ **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. .. rst-class:: classref-item-separator @@ -320,7 +326,7 @@ The :ref:`Environment` to use for this camera. - void **set_far** **(** :ref:`float` value **)** - :ref:`float` **get_far** **(** **)** -The distance to the far culling boundary for this camera relative to its local Z axis. +The distance to the far culling boundary for this camera relative to its local Z axis. Higher values allow the camera to see further away, while decreasing :ref:`far` can improve performance if it results in objects being partially or fully culled. .. rst-class:: classref-item-separator @@ -417,7 +423,7 @@ The axis to lock during :ref:`fov`/:ref:`size` value **)** - :ref:`float` **get_near** **(** **)** -The distance to the near culling boundary for this camera relative to its local Z axis. +The distance to the near culling boundary for this camera relative to its local Z axis. Lower values allow the camera to see objects more up close to its origin, at the cost of lower precision across the *entire* range. Values lower than the default can lead to increased Z-fighting. .. rst-class:: classref-item-separator diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index 1b1e75c68d0..ca646c126f3 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -14,24 +14,20 @@ CanvasItem **Inherited By:** :ref:`Control`, :ref:`Node2D` -Base class of anything 2D. +Abstract base class for everything in 2D space. .. rst-class:: classref-introduction-group Description ----------- -Base class of anything 2D. Canvas items are laid out in a tree; children inherit and extend their parent's transform. **CanvasItem** is extended by :ref:`Control` for anything GUI-related, and by :ref:`Node2D` for anything related to the 2D engine. +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 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. 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. +Canvas items are drawn in tree order. 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. -A **CanvasItem** can also be hidden, which will also hide its children. It provides many ways to change parameters such as modulation (for itself and its children) and self modulation (only for itself), as well as its blend mode. - -Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed. - -\ **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`. +A **CanvasItem** can be hidden, which will also hide its children. By adjusting various other properties of a **CanvasItem**, you can also modulate its color (via :ref:`modulate` or :ref:`self_modulate`), change its Z-index, blend mode, and more. .. rst-class:: classref-introduction-group @@ -92,121 +88,121 @@ Methods .. table:: :widths: auto - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_draw` **(** **)** |virtual| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_animation_slice` **(** :ref:`float` animation_length, :ref:`float` slice_begin, :ref:`float` slice_end, :ref:`float` offset=0.0 **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_arc` **(** :ref:`Vector2` center, :ref:`float` radius, :ref:`float` start_angle, :ref:`float` end_angle, :ref:`int` point_count, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_char` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` char, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_char_outline` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` char, :ref:`int` font_size=16, :ref:`int` size=-1, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_circle` **(** :ref:`Vector2` position, :ref:`float` radius, :ref:`Color` color **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_colored_polygon` **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`Texture2D` texture=null **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_dashed_line` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`float` dash=2.0, :ref:`bool` aligned=true **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_end_animation` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_lcd_texture_rect_region` **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_line` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_mesh` **(** :ref:`Mesh` mesh, :ref:`Texture2D` texture, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_msdf_texture_rect_region` **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`float` outline=0.0, :ref:`float` pixel_range=4.0, :ref:`float` scale=1.0 **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_multiline` **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`float` width=-1.0 **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_multiline_colors` **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=-1.0 **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_multiline_string` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_multiline_string_outline` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_multimesh` **(** :ref:`MultiMesh` multimesh, :ref:`Texture2D` texture **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_polygon` **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`Texture2D` texture=null **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_polyline` **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_polyline_colors` **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_primitive` **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs, :ref:`Texture2D` texture=null **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_rect` **(** :ref:`Rect2` rect, :ref:`Color` color, :ref:`bool` filled=true, :ref:`float` width=-1.0 **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_set_transform` **(** :ref:`Vector2` position, :ref:`float` rotation=0.0, :ref:`Vector2` scale=Vector2(1, 1) **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_set_transform_matrix` **(** :ref:`Transform2D` xform **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_string` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_string_outline` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_style_box` **(** :ref:`StyleBox` style_box, :ref:`Rect2` rect **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_texture` **(** :ref:`Texture2D` texture, :ref:`Vector2` position, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_texture_rect` **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_texture_rect_region` **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false, :ref:`bool` clip_uv=true **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`force_update_transform` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_canvas` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_canvas_item` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`get_canvas_transform` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_global_mouse_position` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`get_global_transform` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`get_global_transform_with_canvas` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_local_mouse_position` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`get_screen_transform` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`get_transform` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2` | :ref:`get_viewport_rect` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`get_viewport_transform` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_visibility_layer_bit` **(** :ref:`int` layer **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`World2D` | :ref:`get_world_2d` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`hide` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_local_transform_notification_enabled` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_transform_notification_enabled` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_visible_in_tree` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`make_canvas_position_local` **(** :ref:`Vector2` screen_point **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`InputEvent` | :ref:`make_input_local` **(** :ref:`InputEvent` event **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_to_front` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`queue_redraw` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_notify_local_transform` **(** :ref:`bool` enable **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_notify_transform` **(** :ref:`bool` enable **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_visibility_layer_bit` **(** :ref:`int` layer, :ref:`bool` enabled **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`show` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_draw` **(** **)** |virtual| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_animation_slice` **(** :ref:`float` animation_length, :ref:`float` slice_begin, :ref:`float` slice_end, :ref:`float` offset=0.0 **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_arc` **(** :ref:`Vector2` center, :ref:`float` radius, :ref:`float` start_angle, :ref:`float` end_angle, :ref:`int` point_count, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_char` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` char, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_char_outline` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` char, :ref:`int` font_size=16, :ref:`int` size=-1, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_circle` **(** :ref:`Vector2` position, :ref:`float` radius, :ref:`Color` color **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_colored_polygon` **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`Texture2D` texture=null **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_dashed_line` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`float` dash=2.0, :ref:`bool` aligned=true **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_end_animation` **(** **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_lcd_texture_rect_region` **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_line` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_mesh` **(** :ref:`Mesh` mesh, :ref:`Texture2D` texture, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_msdf_texture_rect_region` **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`float` outline=0.0, :ref:`float` pixel_range=4.0, :ref:`float` scale=1.0 **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_multiline` **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`float` width=-1.0 **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_multiline_colors` **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=-1.0 **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_multiline_string` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_multiline_string_outline` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_multimesh` **(** :ref:`MultiMesh` multimesh, :ref:`Texture2D` texture **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_polygon` **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`Texture2D` texture=null **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_polyline` **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_polyline_colors` **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_primitive` **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs, :ref:`Texture2D` texture=null **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_rect` **(** :ref:`Rect2` rect, :ref:`Color` color, :ref:`bool` filled=true, :ref:`float` width=-1.0 **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_set_transform` **(** :ref:`Vector2` position, :ref:`float` rotation=0.0, :ref:`Vector2` scale=Vector2(1, 1) **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_set_transform_matrix` **(** :ref:`Transform2D` xform **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_string` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_string_outline` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_style_box` **(** :ref:`StyleBox` style_box, :ref:`Rect2` rect **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_texture` **(** :ref:`Texture2D` texture, :ref:`Vector2` position, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_texture_rect` **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_texture_rect_region` **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false, :ref:`bool` clip_uv=true **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`force_update_transform` **(** **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_canvas` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_canvas_item` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_canvas_transform` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_global_mouse_position` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_global_transform` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_global_transform_with_canvas` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_local_mouse_position` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_screen_transform` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_transform` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_viewport_rect` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_viewport_transform` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_visibility_layer_bit` **(** :ref:`int` layer **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`World2D` | :ref:`get_world_2d` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`hide` **(** **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_local_transform_notification_enabled` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_transform_notification_enabled` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_visible_in_tree` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`make_canvas_position_local` **(** :ref:`Vector2` screen_point **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`InputEvent` | :ref:`make_input_local` **(** :ref:`InputEvent` event **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`move_to_front` **(** **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`queue_redraw` **(** **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_notify_local_transform` **(** :ref:`bool` enable **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_notify_transform` **(** :ref:`bool` enable **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_visibility_layer_bit` **(** :ref:`int` layer, :ref:`bool` enabled **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`show` **(** **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -495,6 +491,14 @@ The **CanvasItem** has entered the canvas. The **CanvasItem** has exited the canvas. +.. _class_CanvasItem_constant_NOTIFICATION_WORLD_2D_CHANGED: + +.. rst-class:: classref-constant + +**NOTIFICATION_WORLD_2D_CHANGED** = ``36`` + +The **CanvasItem**'s active :ref:`World2D` changed. + .. rst-class:: classref-section-separator ---- @@ -549,7 +553,7 @@ The rendering layers in which this **CanvasItem** responds to :ref:`Light2D` value **)** - :ref:`Material` **get_material** **(** **)** -The material applied to textures on this **CanvasItem**. +The material applied to this **CanvasItem**. .. rst-class:: classref-item-separator @@ -566,7 +570,7 @@ The material applied to textures on this **CanvasItem**. - void **set_modulate** **(** :ref:`Color` value **)** - :ref:`Color` **get_modulate** **(** **)** -The color applied to textures on this **CanvasItem**. +The color applied to this **CanvasItem**. This property does affect child **CanvasItem**\ s, unlike :ref:`self_modulate` which only affects the node itself. .. rst-class:: classref-item-separator @@ -583,7 +587,9 @@ The color applied to textures on this **CanvasItem**. - void **set_self_modulate** **(** :ref:`Color` value **)** - :ref:`Color` **get_self_modulate** **(** **)** -The color applied to textures on this **CanvasItem**. This is not inherited by children **CanvasItem**\ s. +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). .. rst-class:: classref-item-separator @@ -702,7 +708,7 @@ The rendering layer in which this **CanvasItem** is rendered by :ref:`Viewport` value **)** - :ref:`bool` **is_visible** **(** **)** -If ``true``, this **CanvasItem** is drawn. The node is only visible if all of its antecedents are visible as well (in other words, :ref:`is_visible_in_tree` must return ``true``). +If ``true``, this **CanvasItem** 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``). \ **Note:** For controls that inherit :ref:`Popup`, the correct way to make them visible is to call one of the multiple ``popup*()`` functions instead. @@ -955,7 +961,7 @@ Value of the ``pixel_range`` should the same that was used during distance field void **draw_multiline** **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`float` width=-1.0 **)** -Draws multiple disconnected lines with a uniform ``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` 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``. @@ -969,7 +975,7 @@ If ``width`` is negative, then two-point primitives will be drawn instead of a f void **draw_multiline_colors** **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=-1.0 **)** -Draws multiple disconnected lines with a uniform ``width`` and segment-by-segment coloring. Colors assigned to line segments match by index between ``points`` and ``colors``. 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``. @@ -981,7 +987,7 @@ If ``width`` is negative, then two-point primitives will be drawn instead of a f .. rst-class:: classref-method -void **draw_multiline_string** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +void **draw_multiline_string** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| Breaks ``text`` into lines and draws it using the specified ``font`` at the ``pos`` (top-left corner). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. @@ -993,7 +999,7 @@ Breaks ``text`` into lines and draws it using the specified ``font`` at the ``po .. rst-class:: classref-method -void **draw_multiline_string_outline** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +void **draw_multiline_string_outline** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| Breaks ``text`` to the lines and draws text outline using the specified ``font`` at the ``pos`` (top-left corner). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. @@ -1019,7 +1025,7 @@ Draws a :ref:`MultiMesh` in 2D with the provided texture. See : void **draw_polygon** **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`Texture2D` texture=null **)** -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`. +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. .. rst-class:: classref-item-separator @@ -1045,7 +1051,7 @@ If ``width`` is negative, the polyline is drawn using :ref:`RenderingServer.PRIM void **draw_polyline_colors** **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** -Draws interconnected line segments with a uniform ``width`` and segment-by-segment coloring, and optional antialiasing (supported only for positive ``width``). Colors assigned to line segments match by index between ``points`` and ``colors``. 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, then the polyline is 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``. @@ -1071,7 +1077,7 @@ Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for void **draw_rect** **(** :ref:`Rect2` rect, :ref:`Color` color, :ref:`bool` filled=true, :ref:`float` width=-1.0 **)** -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. +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``. @@ -1113,7 +1119,7 @@ Sets a custom transform for drawing via matrix. Anything drawn afterwards will b .. rst-class:: classref-method -void **draw_string** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +void **draw_string** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| Draws ``text`` using the specified ``font`` at the ``pos`` (bottom-left corner using the baseline of the font). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. @@ -1152,7 +1158,7 @@ See also :ref:`Font.draw_string`. .. rst-class:: classref-method -void **draw_string_outline** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +void **draw_string_outline** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| Draws ``text`` outline using the specified ``font`` at the ``pos`` (bottom-left corner using the baseline of the font). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. @@ -1190,7 +1196,7 @@ Draws a texture at a given position. void **draw_texture_rect** **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** -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. +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 @@ -1202,7 +1208,7 @@ Draws a textured rectangle at a given position, optionally modulated by a color. void **draw_texture_rect_region** **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false, :ref:`bool` clip_uv=true **)** -Draws a textured rectangle region at a given position, optionally modulated by a color. If ``transpose`` is ``true``, the texture will have its X and Y coordinates swapped. +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 @@ -1264,6 +1270,8 @@ 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`. + .. rst-class:: classref-item-separator ---- @@ -1420,7 +1428,7 @@ Returns ``true`` if global transform notifications are communicated to children. :ref:`bool` **is_visible_in_tree** **(** **)** |const| -Returns ``true`` if the node is present in the :ref:`SceneTree`, its :ref:`visible` property is ``true`` and all its antecedents are also visible. If any antecedent is hidden, this node will not be visible in the scene tree, and is consequently 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 consequently not drawn (see :ref:`_draw`). .. rst-class:: classref-item-separator diff --git a/classes/class_canvaslayer.rst b/classes/class_canvaslayer.rst index dacd4239ef2..3c7262ce264 100644 --- a/classes/class_canvaslayer.rst +++ b/classes/class_canvaslayer.rst @@ -14,16 +14,20 @@ CanvasLayer **Inherited By:** :ref:`ParallaxBackground` -Canvas drawing layer. +A node used for independent rendering of objects within a 2D scene. .. rst-class:: classref-introduction-group Description ----------- -Canvas drawing layer. :ref:`CanvasItem` nodes that are direct or indirect children of a **CanvasLayer** will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a **CanvasLayer** with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below). +:ref:`CanvasItem`-derived nodes that are direct or indirect children of a **CanvasLayer** will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index ``0``, so a **CanvasLayer** with index ``-1`` will be drawn below, and a **CanvasLayer** with index ``1`` will be drawn above. This order will hold regardless of the :ref:`CanvasItem.z_index` of the nodes within each layer. -Embedded :ref:`Window`\ s are placed in layer 1024. CanvasItems in layer 1025 or above appear in front of embedded windows, CanvasItems in layer 1023 or below appear behind embedded windows. +\ **CanvasLayer**\ s can be hidden and they can also optionally follow the viewport. This makes them useful for HUDs like health bar overlays (on layers ``1`` and higher) or backgrounds (on layers ``-1`` and lower). + +\ **Note:** Embedded :ref:`Window`\ s are placed on layer ``1024``. :ref:`CanvasItem`\ s on layers ``1025`` and higher appear in front of embedded windows. + +\ **Note:** Each **CanvasLayer** is drawn on one specific :ref:`Viewport` and cannot be shared between multiple :ref:`Viewport`\ s, see :ref:`custom_viewport`. When using multiple :ref:`Viewport`\ s, for example in a split-screen game, you need create an individual **CanvasLayer** for each :ref:`Viewport` you want it to be drawn on. .. rst-class:: classref-introduction-group diff --git a/classes/class_canvasmodulate.rst b/classes/class_canvasmodulate.rst index 7bfaa1d9aac..dc8deec85f8 100644 --- a/classes/class_canvasmodulate.rst +++ b/classes/class_canvasmodulate.rst @@ -12,14 +12,14 @@ CanvasModulate **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Tint the entire canvas. +A node that applies a color tint to a canvas. .. rst-class:: classref-introduction-group Description ----------- -**CanvasModulate** tints the canvas elements using its assigned :ref:`color`. +**CanvasModulate** applies a color tint to all nodes on a canvas. Only one can be used to tint a canvas, but :ref:`CanvasLayer`\ s can be used to render things independently. .. rst-class:: classref-reftable-group diff --git a/classes/class_capsuleshape2d.rst b/classes/class_capsuleshape2d.rst index e6da37198a9..50eecef30c1 100644 --- a/classes/class_capsuleshape2d.rst +++ b/classes/class_capsuleshape2d.rst @@ -12,16 +12,16 @@ CapsuleShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Capsule shape resource for 2D physics. +A 2D capsule shape used for physics collision. .. rst-class:: classref-introduction-group Description ----------- -2D capsule shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. In 2D, a capsule is a rectangle shape with half-circles at both ends. +A 2D capsule shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape2D`. -\ **Performance:** Being a primitive collision shape, **CapsuleShape2D** is fast to check collisions against (though not as fast as :ref:`CircleShape2D`). +\ **Performance:** **CapsuleShape2D** is fast to check collisions against, but it is slower than :ref:`RectangleShape2D` and :ref:`CircleShape2D`. .. rst-class:: classref-reftable-group diff --git a/classes/class_capsuleshape3d.rst b/classes/class_capsuleshape3d.rst index 18fe5c3d830..e0827225ccf 100644 --- a/classes/class_capsuleshape3d.rst +++ b/classes/class_capsuleshape3d.rst @@ -12,16 +12,16 @@ CapsuleShape3D **Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Capsule shape resource for 3D collisions. +A 3D capsule shape used for physics collision. .. rst-class:: classref-introduction-group Description ----------- -3D capsule shape to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. In 3D, a capsule is a cylinder shape with hemispheres at both ends. +A 3D capsule shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape3D`. -\ **Performance:** Being a primitive collision shape, **CapsuleShape3D** is fast to check collisions against (though not as fast as :ref:`SphereShape3D`). **CapsuleShape3D** is cheaper to check collisions against compared to :ref:`CylinderShape3D`. +\ **Performance:** **CapsuleShape3D** is fast to check collisions against. It is faster than :ref:`CylinderShape3D`, but slower than :ref:`SphereShape3D` and :ref:`BoxShape3D`. .. rst-class:: classref-introduction-group diff --git a/classes/class_centercontainer.rst b/classes/class_centercontainer.rst index a9d885315a0..667f8c4fdc9 100644 --- a/classes/class_centercontainer.rst +++ b/classes/class_centercontainer.rst @@ -12,21 +12,21 @@ CenterContainer **Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Keeps children controls centered. +A container that keeps child controls in its center. .. rst-class:: classref-introduction-group Description ----------- -CenterContainer keeps children controls centered. This container keeps all children to their minimum size, in the center. +**CenterContainer** is a container that keeps all of its child controls in its center at their minimum size. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`GUI containers <../tutorials/ui/gui_containers>` +- :doc:`Using Containers <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group diff --git a/classes/class_characterbody2d.rst b/classes/class_characterbody2d.rst index 95552413f60..11635f1e1a1 100644 --- a/classes/class_characterbody2d.rst +++ b/classes/class_characterbody2d.rst @@ -12,18 +12,16 @@ CharacterBody2D **Inherits:** :ref:`PhysicsBody2D` **<** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Specialized 2D physics body node for characters moved by script. +A 2D physics body specialized for characters moved by script. .. rst-class:: classref-introduction-group Description ----------- -Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a :ref:`AnimatableBody2D`. However, they have two main uses: +**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. -\ **Kinematic characters:** Character bodies have an API for moving objects with walls and slopes detection (:ref:`move_and_slide` method), in addition to collision detection (also done with :ref:`PhysicsBody2D.move_and_collide`). This makes them really useful to implement characters that move in specific ways and collide with the world, but don't require advanced physics. - -\ **Kinematic motion:** Character bodies can also be used for kinematic motion (same functionality as :ref:`AnimatableBody2D`), which allows them to be moved by code and push other bodies on their path. +For game objects that don't require complex movement or collision detection, such as moving platforms, :ref:`AnimatableBody2D` is simpler to configure. .. rst-class:: classref-introduction-group @@ -86,6 +84,8 @@ Methods .. table:: :widths: auto + +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_floor_snap` **(** **)** | +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_floor_angle` **(** :ref:`Vector2` up_direction=Vector2(0, -1) **)** |const| | +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -262,7 +262,7 @@ Maximum angle (in radians) where a slope is still considered a floor (or a ceili 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`, so it will be able to detach from the ground when jumping. +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 @@ -468,6 +468,18 @@ Minimum angle (in radians) where the body is allowed to slide when it encounters Method Descriptions ------------------- +.. _class_CharacterBody2D_method_apply_floor_snap: + +.. rst-class:: classref-method + +void **apply_floor_snap** **(** **)** + +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 + +---- + .. _class_CharacterBody2D_method_get_floor_angle: .. rst-class:: classref-method @@ -568,8 +580,8 @@ Returns a :ref:`KinematicCollision2D`, which contain .. code-tab:: gdscript for i in get_slide_collision_count(): - var collision = get_slide_collision(i) - print("Collided with: ", collision.collider.name) + var collision = get_slide_collision(i) + print("Collided with: ", collision.get_collider().name) .. code-tab:: csharp diff --git a/classes/class_characterbody3d.rst b/classes/class_characterbody3d.rst index 3407fa3d76a..2ca2a5b6ac0 100644 --- a/classes/class_characterbody3d.rst +++ b/classes/class_characterbody3d.rst @@ -12,20 +12,16 @@ CharacterBody3D **Inherits:** :ref:`PhysicsBody3D` **<** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -Specialized 3D physics body node for characters moved by script. +A 3D physics body specialized for characters moved by script. .. rst-class:: classref-introduction-group Description ----------- -Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a :ref:`AnimatableBody3D`. However, they have two main uses: +**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. -\ *Kinematic characters:* Character bodies have an API for moving objects with walls and slopes detection (:ref:`move_and_slide` method), in addition to collision detection (also done with :ref:`PhysicsBody3D.move_and_collide`). This makes them really useful to implement characters that move in specific ways and collide with the world, but don't require advanced physics. - -\ *Kinematic motion:* Character bodies can also be used for kinematic motion (same functionality as :ref:`AnimatableBody3D`), which allows them to be moved by code and push other bodies on their path. - -\ **Warning:** With a non-uniform scale this node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size(s) of its collision shape(s) instead. +For game objects that don't require complex movement or collision detection, such as moving platforms, :ref:`AnimatableBody3D` is simpler to configure. .. rst-class:: classref-introduction-group @@ -90,6 +86,8 @@ Methods .. table:: :widths: auto + +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_floor_snap` **(** **)** | +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_floor_angle` **(** :ref:`Vector3` up_direction=Vector3(0, 1, 0) **)** |const| | +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -268,7 +266,7 @@ Maximum angle (in radians) where a slope is still considered a floor (or a ceili 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`, so it will be able to detach from the ground when jumping. +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 @@ -474,6 +472,18 @@ Minimum angle (in radians) where the body is allowed to slide when it encounters Method Descriptions ------------------- +.. _class_CharacterBody3D_method_apply_floor_snap: + +.. rst-class:: classref-method + +void **apply_floor_snap** **(** **)** + +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 + +---- + .. _class_CharacterBody3D_method_get_floor_angle: .. rst-class:: classref-method diff --git a/classes/class_checkbox.rst b/classes/class_checkbox.rst index 684800b32bc..d6c64713d1b 100644 --- a/classes/class_checkbox.rst +++ b/classes/class_checkbox.rst @@ -12,17 +12,19 @@ CheckBox **Inherits:** :ref:`Button` **<** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Binary choice user interface widget. See also :ref:`CheckButton`. +A button that represents a binary choice. .. rst-class:: classref-introduction-group Description ----------- -A checkbox allows the user to make a binary choice (choosing only one of two possible options). It's similar to :ref:`CheckButton` in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use CheckBox when toggling it has **no** immediate effect on something. For example, it could be used when toggling it will only do something once a confirmation button is pressed. +**CheckBox** allows the user to choose one of only two possible options. It's similar to :ref:`CheckButton` in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use **CheckBox** when toggling it has **no** immediate effect on something. For example, it could be used when toggling it will only do something once a confirmation button is pressed. See also :ref:`BaseButton` which contains common properties and methods associated with this node. +When :ref:`BaseButton.button_group` specifies a :ref:`ButtonGroup`, **CheckBox** changes its appearance to that of a radio button and uses the various ``radio_*`` theme properties. + .. rst-class:: classref-reftable-group Properties diff --git a/classes/class_checkbutton.rst b/classes/class_checkbutton.rst index 1c89da3dd96..9feeee9442a 100644 --- a/classes/class_checkbutton.rst +++ b/classes/class_checkbutton.rst @@ -12,14 +12,14 @@ CheckButton **Inherits:** :ref:`Button` **<** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Checkable button. See also :ref:`CheckBox`. +A button that represents a binary choice. .. rst-class:: classref-introduction-group Description ----------- -CheckButton is a toggle button displayed as a check field. It's similar to :ref:`CheckBox` in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use CheckButton when toggling it has an **immediate** effect on something. For example, it could be used if toggling it enables/disables a setting without requiring the user to press a confirmation button. +**CheckButton** is a toggle button displayed as a check field. It's similar to :ref:`CheckBox` in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use **CheckButton** when toggling it has an **immediate** effect on something. For example, it can be used when pressing it shows or hides advanced settings, without asking the user to confirm this action. See also :ref:`BaseButton` which contains common properties and methods associated with this node. diff --git a/classes/class_circleshape2d.rst b/classes/class_circleshape2d.rst index dc453acbcac..a6e43ce21d3 100644 --- a/classes/class_circleshape2d.rst +++ b/classes/class_circleshape2d.rst @@ -12,16 +12,16 @@ CircleShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Circular shape resource for 2D physics. +A 2D circle shape used for physics collision. .. rst-class:: classref-introduction-group Description ----------- -2D circular shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. This shape is useful for modeling balls or small characters and its collision detection with everything else is very fast. +A 2D circle shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape2D`. -\ **Performance:** Being a primitive collision shape, **CircleShape2D** is the fastest collision shape to check collisions against, as it only requires a distance check with the shape's origin. +\ **Performance:** **CircleShape2D** is fast to check collisions against. It is faster than :ref:`RectangleShape2D` and :ref:`CapsuleShape2D`. .. rst-class:: classref-reftable-group diff --git a/classes/class_classdb.rst b/classes/class_classdb.rst index 57e0559819c..8483398b7c2 100644 --- a/classes/class_classdb.rst +++ b/classes/class_classdb.rst @@ -12,7 +12,7 @@ ClassDB **Inherits:** :ref:`Object` -Class information repository. +A class information repository. .. rst-class:: classref-introduction-group diff --git a/classes/class_codeedit.rst b/classes/class_codeedit.rst index a17c80cfaa3..6fcc1cdcd9b 100644 --- a/classes/class_codeedit.rst +++ b/classes/class_codeedit.rst @@ -12,16 +12,16 @@ CodeEdit **Inherits:** :ref:`TextEdit` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Multiline text control intended for editing code. +A multiline text editor designed for editing code. .. rst-class:: classref-introduction-group Description ----------- -CodeEdit is a specialized :ref:`TextEdit` designed for editing plain text code files. It contains a bunch of features commonly found in code editors such as line numbers, line folding, code completion, indent management and string / comment management. +CodeEdit is a specialized :ref:`TextEdit` designed for editing plain text code files. It has many features commonly found in code editors such as line numbers, line folding, code completion, indent management, and string/comment management. -\ **Note:** By default **CodeEdit** always use left-to-right text direction to correctly display source code. +\ **Note:** Regardless of locale, **CodeEdit** will by default always use left-to-right text direction to correctly display source code. .. rst-class:: classref-reftable-group @@ -85,123 +85,125 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_confirm_code_completion` **(** :ref:`bool` replace **)** |virtual| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`_filter_code_completion_candidates` **(** :ref:`Dictionary[]` candidates **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_request_code_completion` **(** :ref:`bool` force **)** |virtual| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_auto_brace_completion_pair` **(** :ref:`String` start_key, :ref:`String` end_key **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_code_completion_option` **(** :ref:`CodeCompletionKind` type, :ref:`String` display_text, :ref:`String` insert_text, :ref:`Color` text_color=Color(1, 1, 1, 1), :ref:`Resource` icon=null, :ref:`Variant` value=0 **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_comment_delimiter` **(** :ref:`String` start_key, :ref:`String` end_key, :ref:`bool` line_only=false **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_string_delimiter` **(** :ref:`String` start_key, :ref:`String` end_key, :ref:`bool` line_only=false **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`can_fold_line` **(** :ref:`int` line **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`cancel_code_completion` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_bookmarked_lines` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_breakpointed_lines` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_comment_delimiters` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_executing_lines` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_string_delimiters` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`confirm_code_completion` **(** :ref:`bool` replace=false **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`do_indent` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fold_all_lines` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fold_line` **(** :ref:`int` line **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_auto_brace_completion_close_key` **(** :ref:`String` open_key **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`get_bookmarked_lines` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`get_breakpointed_lines` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_code_completion_option` **(** :ref:`int` index **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`get_code_completion_options` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_code_completion_selected_index` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_delimiter_end_key` **(** :ref:`int` delimiter_index **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_delimiter_end_position` **(** :ref:`int` line, :ref:`int` column **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_delimiter_start_key` **(** :ref:`int` delimiter_index **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_delimiter_start_position` **(** :ref:`int` line, :ref:`int` column **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`get_executing_lines` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int[]` | :ref:`get_folded_lines` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_text_for_code_completion` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_text_for_symbol_lookup` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_auto_brace_completion_close_key` **(** :ref:`String` close_key **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_auto_brace_completion_open_key` **(** :ref:`String` open_key **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_comment_delimiter` **(** :ref:`String` start_key **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_string_delimiter` **(** :ref:`String` start_key **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`indent_lines` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`is_in_comment` **(** :ref:`int` line, :ref:`int` column=-1 **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`is_in_string` **(** :ref:`int` line, :ref:`int` column=-1 **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_line_bookmarked` **(** :ref:`int` line **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_line_breakpointed` **(** :ref:`int` line **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_line_executing` **(** :ref:`int` line **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_line_folded` **(** :ref:`int` line **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_comment_delimiter` **(** :ref:`String` start_key **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_string_delimiter` **(** :ref:`String` start_key **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`request_code_completion` **(** :ref:`bool` force=false **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_code_completion_selected_index` **(** :ref:`int` index **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_code_hint` **(** :ref:`String` code_hint **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_code_hint_draw_below` **(** :ref:`bool` draw_below **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_line_as_bookmarked` **(** :ref:`int` line, :ref:`bool` bookmarked **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_line_as_breakpoint` **(** :ref:`int` line, :ref:`bool` breakpointed **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_line_as_executing` **(** :ref:`int` line, :ref:`bool` executing **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_symbol_lookup_word_as_valid` **(** :ref:`bool` valid **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`toggle_foldable_line` **(** :ref:`int` line **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`unfold_all_lines` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`unfold_line` **(** :ref:`int` line **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`unindent_lines` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`update_code_completion_options` **(** :ref:`bool` force **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_confirm_code_completion` **(** :ref:`bool` replace **)** |virtual| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_filter_code_completion_candidates` **(** :ref:`Dictionary[]` candidates **)** |virtual| |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_request_code_completion` **(** :ref:`bool` force **)** |virtual| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_auto_brace_completion_pair` **(** :ref:`String` start_key, :ref:`String` end_key **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_code_completion_option` **(** :ref:`CodeCompletionKind` type, :ref:`String` display_text, :ref:`String` insert_text, :ref:`Color` text_color=Color(1, 1, 1, 1), :ref:`Resource` icon=null, :ref:`Variant` value=0, :ref:`int` location=1024 **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_comment_delimiter` **(** :ref:`String` start_key, :ref:`String` end_key, :ref:`bool` line_only=false **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_string_delimiter` **(** :ref:`String` start_key, :ref:`String` end_key, :ref:`bool` line_only=false **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`can_fold_line` **(** :ref:`int` line **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`cancel_code_completion` **(** **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_bookmarked_lines` **(** **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_breakpointed_lines` **(** **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_comment_delimiters` **(** **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_executing_lines` **(** **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_string_delimiters` **(** **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`confirm_code_completion` **(** :ref:`bool` replace=false **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`convert_indent` **(** :ref:`int` from_line=-1, :ref:`int` to_line=-1 **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`do_indent` **(** **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fold_all_lines` **(** **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fold_line` **(** :ref:`int` line **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_auto_brace_completion_close_key` **(** :ref:`String` open_key **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_bookmarked_lines` **(** **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_breakpointed_lines` **(** **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_code_completion_option` **(** :ref:`int` index **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`get_code_completion_options` **(** **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_code_completion_selected_index` **(** **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_delimiter_end_key` **(** :ref:`int` delimiter_index **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_delimiter_end_position` **(** :ref:`int` line, :ref:`int` column **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_delimiter_start_key` **(** :ref:`int` delimiter_index **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_delimiter_start_position` **(** :ref:`int` line, :ref:`int` column **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_executing_lines` **(** **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int[]` | :ref:`get_folded_lines` **(** **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_text_for_code_completion` **(** **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_text_for_symbol_lookup` **(** **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_auto_brace_completion_close_key` **(** :ref:`String` close_key **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_auto_brace_completion_open_key` **(** :ref:`String` open_key **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_comment_delimiter` **(** :ref:`String` start_key **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_string_delimiter` **(** :ref:`String` start_key **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`indent_lines` **(** **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`is_in_comment` **(** :ref:`int` line, :ref:`int` column=-1 **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`is_in_string` **(** :ref:`int` line, :ref:`int` column=-1 **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_line_bookmarked` **(** :ref:`int` line **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_line_breakpointed` **(** :ref:`int` line **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_line_executing` **(** :ref:`int` line **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_line_folded` **(** :ref:`int` line **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_comment_delimiter` **(** :ref:`String` start_key **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_string_delimiter` **(** :ref:`String` start_key **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`request_code_completion` **(** :ref:`bool` force=false **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_code_completion_selected_index` **(** :ref:`int` index **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_code_hint` **(** :ref:`String` code_hint **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_code_hint_draw_below` **(** :ref:`bool` draw_below **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_line_as_bookmarked` **(** :ref:`int` line, :ref:`bool` bookmarked **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_line_as_breakpoint` **(** :ref:`int` line, :ref:`bool` breakpointed **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_line_as_executing` **(** :ref:`int` line, :ref:`bool` executing **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_symbol_lookup_word_as_valid` **(** :ref:`bool` valid **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`toggle_foldable_line` **(** :ref:`int` line **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`unfold_all_lines` **(** **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`unfold_line` **(** :ref:`int` line **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`unindent_lines` **(** **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`update_code_completion_options` **(** :ref:`bool` force **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -417,7 +419,7 @@ Marks the option as a member. :ref:`CodeCompletionKind` **KIND_ENUM** = ``5`` -Marks the option as a enum entry. +Marks the option as an enum entry. .. _class_CodeEdit_constant_KIND_CONSTANT: @@ -451,6 +453,48 @@ Marks the option as a file path. Marks the option as unclassified or plain text. +.. rst-class:: classref-item-separator + +---- + +.. _enum_CodeEdit_CodeCompletionLocation: + +.. rst-class:: classref-enumeration + +enum **CodeCompletionLocation**: + +.. _class_CodeEdit_constant_LOCATION_LOCAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionLocation` **LOCATION_LOCAL** = ``0`` + +The option is local to the location of the code completion query - e.g. a local variable. Subsequent value of location represent options from the outer class, the exact value represent how far they are (in terms of inner classes). + +.. _class_CodeEdit_constant_LOCATION_PARENT_MASK: + +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionLocation` **LOCATION_PARENT_MASK** = ``256`` + +The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. 0 for the local class, 1 for the parent, 2 for the grandparent, etc) to store the depth of an option in the class or a parent class. + +.. _class_CodeEdit_constant_LOCATION_OTHER_USER_CODE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionLocation` **LOCATION_OTHER_USER_CODE** = ``512`` + +The option is from user code which is not local and not in a derived class (e.g. Autoload Singletons). + +.. _class_CodeEdit_constant_LOCATION_OTHER: + +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionLocation` **LOCATION_OTHER** = ``1024`` + +The option is from other engine code, not covered by the other enum constants - e.g. built-in classes. + .. rst-class:: classref-section-separator ---- @@ -861,10 +905,12 @@ Both the start and end keys must be symbols. Only the start key has to be unique .. rst-class:: classref-method -void **add_code_completion_option** **(** :ref:`CodeCompletionKind` type, :ref:`String` display_text, :ref:`String` insert_text, :ref:`Color` text_color=Color(1, 1, 1, 1), :ref:`Resource` icon=null, :ref:`Variant` value=0 **)** +void **add_code_completion_option** **(** :ref:`CodeCompletionKind` type, :ref:`String` display_text, :ref:`String` insert_text, :ref:`Color` text_color=Color(1, 1, 1, 1), :ref:`Resource` icon=null, :ref:`Variant` value=0, :ref:`int` location=1024 **)** 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. + \ **Note:** This list will replace all current candidates. .. rst-class:: classref-item-separator @@ -999,6 +1045,20 @@ Inserts the selected entry into the text. If ``replace`` is true, any existing t ---- +.. _class_CodeEdit_method_convert_indent: + +.. rst-class:: classref-method + +void **convert_indent** **(** :ref:`int` from_line=-1, :ref:`int` to_line=-1 **)** + +Converts the indents of lines between ``from_line`` and ``to_line`` to tabs or spaces as set by :ref:`indent_use_spaces`. + +Values of ``-1`` convert the entire text. + +.. rst-class:: classref-item-separator + +---- + .. _class_CodeEdit_method_do_indent: .. rst-class:: classref-method diff --git a/classes/class_codehighlighter.rst b/classes/class_codehighlighter.rst index 7e2d3e0387b..022185e42c6 100644 --- a/classes/class_codehighlighter.rst +++ b/classes/class_codehighlighter.rst @@ -12,14 +12,14 @@ CodeHighlighter **Inherits:** :ref:`SyntaxHighlighter` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A syntax highlighter for code. +A syntax highlighter intended for code. .. rst-class:: classref-introduction-group Description ----------- -A syntax highlighter for code. +By adjusting various properties of this resource, you can change the colors of strings, comments, numbers, and other text patterns inside a :ref:`TextEdit` control. .. rst-class:: classref-reftable-group diff --git a/classes/class_collisionobject2d.rst b/classes/class_collisionobject2d.rst index 123f4188713..5bcbf56944d 100644 --- a/classes/class_collisionobject2d.rst +++ b/classes/class_collisionobject2d.rst @@ -14,14 +14,14 @@ CollisionObject2D **Inherited By:** :ref:`Area2D`, :ref:`PhysicsBody2D` -Base node for 2D collision objects. +Abstract base class for 2D physics objects. .. rst-class:: classref-introduction-group Description ----------- -CollisionObject2D is the base class for 2D physics objects. It can hold any number of 2D collision :ref:`Shape2D`\ s. Each shape must be assigned to a *shape owner*. The CollisionObject2D can have any number of shape owners. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the ``shape_owner_*`` methods. +Abstract base class for 2D physics objects. **CollisionObject2D** can hold any number of :ref:`Shape2D`\ s for collision. Each shape must be assigned to a *shape owner*. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the ``shape_owner_*`` methods. \ **Note:** Only collisions between objects within the same canvas (:ref:`Viewport` canvas or :ref:`CanvasLayer`) are supported. The behavior of collisions between objects in different canvases is undefined. diff --git a/classes/class_collisionobject3d.rst b/classes/class_collisionobject3d.rst index 9766d82f93b..b31de7da96b 100644 --- a/classes/class_collisionobject3d.rst +++ b/classes/class_collisionobject3d.rst @@ -14,16 +14,16 @@ CollisionObject3D **Inherited By:** :ref:`Area3D`, :ref:`PhysicsBody3D` -Base node for collision objects. +Abstract base class for 3D physics objects. .. rst-class:: classref-introduction-group Description ----------- -CollisionObject3D is the base class for physics objects. It can hold any number of collision :ref:`Shape3D`\ s. Each shape must be assigned to a *shape owner*. The CollisionObject3D can have any number of shape owners. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the ``shape_owner_*`` methods. +Abstract base class for 3D physics objects. **CollisionObject3D** can hold any number of :ref:`Shape3D`\ s for collision. Each shape must be assigned to a *shape owner*. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the ``shape_owner_*`` methods. -\ **Warning:** With a non-uniform scale this node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size(s) of its collision shape(s) instead. +\ **Warning:** With a non-uniform scale, this node will likely not behave as expected. It is advised to keep its scale the same on all axes and adjust its collision shape(s) instead. .. rst-class:: classref-reftable-group diff --git a/classes/class_collisionpolygon2d.rst b/classes/class_collisionpolygon2d.rst index 7372223461c..059269aa9a5 100644 --- a/classes/class_collisionpolygon2d.rst +++ b/classes/class_collisionpolygon2d.rst @@ -12,16 +12,16 @@ CollisionPolygon2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Defines a 2D collision polygon. +A node that provides a polygon shape to a :ref:`CollisionObject2D` parent. .. rst-class:: classref-introduction-group Description ----------- -Provides a concave or convex 2D collision polygon to a :ref:`CollisionObject2D` parent. Polygons can be drawn in the editor or specified by a list of vertices. See also :ref:`ConvexPolygonShape2D`. +A node that provides a thickened polygon shape (a prism) to a :ref:`CollisionObject2D` parent and allows to edit it. The polygon can be concave or convex. This can give a detection shape to an :ref:`Area2D` or turn :ref:`PhysicsBody2D` into a solid object. -In the editor, a **CollisionPolygon2D** can be generated from a :ref:`Sprite2D`'s outline by selecting a :ref:`Sprite2D` node, going to the **Sprite2D** menu at the top of the 2D editor viewport then choosing **Create CollisionPolygon2D Sibling**. +\ **Warning:** A non-uniformly scaled :ref:`CollisionShape3D` will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its shape resource instead. .. rst-class:: classref-reftable-group @@ -64,7 +64,7 @@ enum **BuildMode**: :ref:`BuildMode` **BUILD_SOLIDS** = ``0`` -Collisions will include the polygon and its contained area. +Collisions will include the polygon and its contained area. In this mode the node has the same effect as several :ref:`ConvexPolygonShape2D` nodes, one for each convex shape in the convex decomposition of the polygon (but without the overhead of multiple nodes). .. _class_CollisionPolygon2D_constant_BUILD_SEGMENTS: @@ -72,7 +72,7 @@ Collisions will include the polygon and its contained area. :ref:`BuildMode` **BUILD_SEGMENTS** = ``1`` -Collisions will only include the polygon edges. +Collisions will only include the polygon edges. In this mode the node has the same effect as a single :ref:`ConcavePolygonShape2D` made of segments, with the restriction that each segment (after the first one) starts where the previous one ends, and the last one ends where the first one starts (forming a closed but hollow polygon). .. rst-class:: classref-section-separator @@ -164,7 +164,9 @@ The margin used for one-way collision (in pixels). Higher values will make the s - void **set_polygon** **(** :ref:`PackedVector2Array` value **)** - :ref:`PackedVector2Array` **get_polygon** **(** **)** -The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the :ref:`PackedVector2Array`, not a reference. +The polygon's list of vertices. Each point will be connected to the next, and the final point will be connected to the first. + +\ **Warning:** The returned value is a clone of the :ref:`PackedVector2Array`, not a reference. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_collisionpolygon3d.rst b/classes/class_collisionpolygon3d.rst index 80afbc92c5d..79dcc77bfb0 100644 --- a/classes/class_collisionpolygon3d.rst +++ b/classes/class_collisionpolygon3d.rst @@ -12,18 +12,16 @@ CollisionPolygon3D **Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -Editor-only node for defining a collision polygon in 3D space. +A node that provides a thickened polygon shape (a prism) to a :ref:`CollisionObject3D` parent. .. rst-class:: classref-introduction-group Description ----------- -Allows editing a concave or convex collision polygon's vertices on a selected plane. Can also set a depth perpendicular to that plane. This class is only available in the editor. It will not appear in the scene tree at run-time. Creates several :ref:`ConvexPolygonShape3D`\ s at run-time to represent the original polygon using convex decomposition. +A node that provides a thickened polygon shape (a prism) to a :ref:`CollisionObject3D` parent and allows to edit it. The polygon can be concave or convex. This can give a detection shape to an :ref:`Area3D` or turn :ref:`PhysicsBody3D` into a solid object. -\ **Note:** Since this is an editor-only helper, properties modified during gameplay will have no effect. - -\ **Warning:** A non-uniformly scaled CollisionPolygon3D node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change its :ref:`polygon`'s vertices instead. +\ **Warning:** A non-uniformly scaled :ref:`CollisionShape3D` will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its shape resource instead. .. rst-class:: classref-reftable-group @@ -63,7 +61,7 @@ Property Descriptions - void **set_depth** **(** :ref:`float` value **)** - :ref:`float` **get_depth** **(** **)** -Length that the resulting collision extends in either direction perpendicular to its polygon. +Length that the resulting collision extends in either direction perpendicular to its 2D polygon. .. rst-class:: classref-item-separator @@ -114,7 +112,7 @@ The collision margin for the generated :ref:`Shape3D`. See :ref:` - void **set_polygon** **(** :ref:`PackedVector2Array` value **)** - :ref:`PackedVector2Array` **get_polygon** **(** **)** -Array of vertices which define the polygon. +Array of vertices which define the 2D polygon in the local XY plane. \ **Note:** The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the ``polygon`` member. diff --git a/classes/class_collisionshape2d.rst b/classes/class_collisionshape2d.rst index 7a3edb78070..a4f216f3e49 100644 --- a/classes/class_collisionshape2d.rst +++ b/classes/class_collisionshape2d.rst @@ -12,16 +12,14 @@ CollisionShape2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Node that represents collision shape data in 2D space. +A node that provides a :ref:`Shape2D` to a :ref:`CollisionObject2D` parent. .. rst-class:: classref-introduction-group Description ----------- -Editor facility for creating and editing collision shapes in 2D space. Set the :ref:`shape` property to configure the shape. **IMPORTANT**: this is an Editor-only helper to create shapes, use :ref:`CollisionObject2D.shape_owner_get_shape` to get the actual shape. - -You can use this node to represent all sorts of collision shapes, for example, add this to an :ref:`Area2D` to give it a detection shape, or add it to a :ref:`PhysicsBody2D` to create a solid object. +A node that provides a :ref:`Shape2D` to a :ref:`CollisionObject2D` parent and allows to edit it. This can give a detection shape to an :ref:`Area2D` or turn a :ref:`PhysicsBody2D` into a solid object. .. rst-class:: classref-introduction-group diff --git a/classes/class_collisionshape3d.rst b/classes/class_collisionshape3d.rst index 19398fcaaba..2ecafb7a1f9 100644 --- a/classes/class_collisionshape3d.rst +++ b/classes/class_collisionshape3d.rst @@ -12,18 +12,16 @@ CollisionShape3D **Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -Node that represents collision shape data in 3D space. +A node that provides a :ref:`Shape3D` to a :ref:`CollisionObject3D` parent. .. rst-class:: classref-introduction-group Description ----------- -Editor facility for creating and editing collision shapes in 3D space. Set the :ref:`shape` property to configure the shape. **IMPORTANT**: this is an Editor-only helper to create shapes, use :ref:`CollisionObject3D.shape_owner_get_shape` to get the actual shape. +A node that provides a :ref:`Shape3D` to a :ref:`CollisionObject3D` parent and allows to edit it. This can give a detection shape to an :ref:`Area3D` or turn a :ref:`PhysicsBody3D` into a solid object. -You can use this node to represent all sorts of collision shapes, for example, add this to an :ref:`Area3D` to give it a detection shape, or add it to a :ref:`PhysicsBody3D` to create a solid object. - -\ **Warning:** A non-uniformly scaled CollisionShape3D node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size of its :ref:`shape` resource instead. +\ **Warning:** A non-uniformly scaled **CollisionShape3D** will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its :ref:`shape` resource instead. .. rst-class:: classref-introduction-group diff --git a/classes/class_color.rst b/classes/class_color.rst index 22f6485d4d2..b9264ceb3e7 100644 --- a/classes/class_color.rst +++ b/classes/class_color.rst @@ -10,18 +10,18 @@ Color ===== -Color built-in type, in RGBA format. +A color represented in RGBA format. .. rst-class:: classref-introduction-group Description ----------- -A color represented in RGBA format by red (:ref:`r`), green (:ref:`g`), blue (:ref:`b`), and alpha (:ref:`a`) components. Each component is a 16-bit floating-point value, usually ranging from 0 to 1. Some properties (such as :ref:`CanvasItem.modulate`) may support values greater than 1, for overbright or High Dynamic Range colors. If you want to supply values in a range of 0 to 255, you should use :ref:`@GDScript.Color8`. +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 16-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 also be created by name from a set of standardized colors, through the :ref:`String` constructor, :ref:`from_string`, or by directly fetching the color constants documented here. The standardized color set is based on the `X11 color names `__, with the addition of :ref:`TRANSPARENT`. +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's equal to ``Color(0, 0, 0, 1)`` (opaque black). Otherwise, a Color will always evaluate to ``true``. +\ **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``. \ `Color constants cheatsheet `__ @@ -1791,9 +1791,9 @@ Returns the light intensity of the color, as a value between 0.0 and 1.0 (inclus :ref:`Color` **hex** **(** :ref:`int` hex **)** |static| -Returns the **Color** associated with the provided ``hex`` integer in 32-bit RGBA format (8 bits per channel, alpha channel first). +Returns the **Color** associated with the provided ``hex`` integer in 32-bit RGBA format (8 bits per channel). -In GDScript and C#, the :ref:`int` is best visualized with hexadecimal notation (``"0x"`` prefix). +In GDScript and C#, the :ref:`int` is best visualized with hexadecimal notation (``"0x"`` prefix, making it ``"0xRRGGBBAA"``). .. tabs:: @@ -1822,9 +1822,9 @@ In GDScript and C#, the :ref:`int` is best visualized with hexadecima :ref:`Color` **hex64** **(** :ref:`int` hex **)** |static| -Returns the **Color** associated with the provided ``hex`` integer in 64-bit RGBA format (16 bits per channel, alpha channel first). +Returns the **Color** associated with the provided ``hex`` integer in 64-bit RGBA format (16 bits per channel). -In GDScript and C#, the :ref:`int` is best visualized with hexadecimal notation (``"0x"`` prefix). +In GDScript and C#, the :ref:`int` is best visualized with hexadecimal notation (``"0x"`` prefix, making it ``"0xRRRRGGGGBBBBAAAA"``). .. rst-class:: classref-item-separator diff --git a/classes/class_colorpicker.rst b/classes/class_colorpicker.rst index be5dd4fd07e..9fccb00575b 100644 --- a/classes/class_colorpicker.rst +++ b/classes/class_colorpicker.rst @@ -12,16 +12,16 @@ ColorPicker **Inherits:** :ref:`VBoxContainer` **<** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Color picker control. +A widget that provides an interface for selecting or modifying a color. .. rst-class:: classref-introduction-group Description ----------- -Displays a color picker widget. Useful for selecting a color from an RGB/RGBA colorspace. +A widget that provides an interface for selecting or modifying a color. It can optionally provide functionalities like a color sampler (eyedropper), color modes, and presets. -\ **Note:** This control is the color picker widget itself. You can use a :ref:`ColorPickerButton` instead if you need a button that brings up a **ColorPicker** in a pop-up. +\ **Note:** This control is the color picker widget itself. You can use a :ref:`ColorPickerButton` instead if you need a button that brings up a **ColorPicker** in a popup. .. rst-class:: classref-introduction-group @@ -92,43 +92,45 @@ Theme Properties .. table:: :widths: auto - +-----------------------------------+--------------------------------------------------------------------------------+---------+ - | :ref:`int` | :ref:`h_width` | ``30`` | - +-----------------------------------+--------------------------------------------------------------------------------+---------+ - | :ref:`int` | :ref:`label_width` | ``10`` | - +-----------------------------------+--------------------------------------------------------------------------------+---------+ - | :ref:`int` | :ref:`margin` | ``4`` | - +-----------------------------------+--------------------------------------------------------------------------------+---------+ - | :ref:`int` | :ref:`sv_height` | ``256`` | - +-----------------------------------+--------------------------------------------------------------------------------+---------+ - | :ref:`int` | :ref:`sv_width` | ``256`` | - +-----------------------------------+--------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`add_preset` | | - +-----------------------------------+--------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`bar_arrow` | | - +-----------------------------------+--------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`color_hue` | | - +-----------------------------------+--------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`color_okhsl_hue` | | - +-----------------------------------+--------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`expanded_arrow` | | - +-----------------------------------+--------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`folded_arrow` | | - +-----------------------------------+--------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`overbright_indicator` | | - +-----------------------------------+--------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`picker_cursor` | | - +-----------------------------------+--------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`sample_bg` | | - +-----------------------------------+--------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`screen_picker` | | - +-----------------------------------+--------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`shape_circle` | | - +-----------------------------------+--------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`shape_rect` | | - +-----------------------------------+--------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`shape_rect_wheel` | | - +-----------------------------------+--------------------------------------------------------------------------------+---------+ + +-----------------------------------+----------------------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`center_slider_grabbers` | ``1`` | + +-----------------------------------+----------------------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`h_width` | ``30`` | + +-----------------------------------+----------------------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`label_width` | ``10`` | + +-----------------------------------+----------------------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`margin` | ``4`` | + +-----------------------------------+----------------------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`sv_height` | ``256`` | + +-----------------------------------+----------------------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`sv_width` | ``256`` | + +-----------------------------------+----------------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`add_preset` | | + +-----------------------------------+----------------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`bar_arrow` | | + +-----------------------------------+----------------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`color_hue` | | + +-----------------------------------+----------------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`color_okhsl_hue` | | + +-----------------------------------+----------------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`expanded_arrow` | | + +-----------------------------------+----------------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`folded_arrow` | | + +-----------------------------------+----------------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`overbright_indicator` | | + +-----------------------------------+----------------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`picker_cursor` | | + +-----------------------------------+----------------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`sample_bg` | | + +-----------------------------------+----------------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`screen_picker` | | + +-----------------------------------+----------------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`shape_circle` | | + +-----------------------------------+----------------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`shape_rect` | | + +-----------------------------------+----------------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`shape_rect_wheel` | | + +-----------------------------------+----------------------------------------------------------------------------------------+---------+ .. rst-class:: classref-section-separator @@ -554,6 +556,18 @@ Returns the list of colors in the recent presets of the color picker. Theme Property Descriptions --------------------------- +.. _class_ColorPicker_theme_constant_center_slider_grabbers: + +.. rst-class:: classref-themeproperty + +:ref:`int` **center_slider_grabbers** = ``1`` + +Overrides the :ref:`HSlider.center_grabber` theme property of the sliders. + +.. rst-class:: classref-item-separator + +---- + .. _class_ColorPicker_theme_constant_h_width: .. rst-class:: classref-themeproperty diff --git a/classes/class_colorpickerbutton.rst b/classes/class_colorpickerbutton.rst index 7d706e611b6..86186be2b16 100644 --- a/classes/class_colorpickerbutton.rst +++ b/classes/class_colorpickerbutton.rst @@ -12,14 +12,14 @@ ColorPickerButton **Inherits:** :ref:`Button` **<** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Button that pops out a :ref:`ColorPicker`. +A button that brings up a :ref:`ColorPicker` when pressed. .. rst-class:: classref-introduction-group Description ----------- -Encapsulates a :ref:`ColorPicker` making it accessible by pressing a button. Pressing the button will toggle the :ref:`ColorPicker` visibility. +Encapsulates a :ref:`ColorPicker`, making it accessible by pressing a button. Pressing the button will toggle the :ref:`ColorPicker`'s visibility. See also :ref:`BaseButton` which contains common properties and methods associated with this node. diff --git a/classes/class_colorrect.rst b/classes/class_colorrect.rst index 532f8c328d5..8453cf5e70b 100644 --- a/classes/class_colorrect.rst +++ b/classes/class_colorrect.rst @@ -12,14 +12,14 @@ ColorRect **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Colored rectangle. +A control that displays a solid color rectangle. .. rst-class:: classref-introduction-group Description ----------- -Displays a rectangle filled with a solid :ref:`color`. If you need to display the border alone, consider using :ref:`ReferenceRect` instead. +Displays a rectangle filled with a solid :ref:`color`. If you need to display the border alone, consider using a :ref:`Panel` instead. .. rst-class:: classref-introduction-group @@ -60,20 +60,7 @@ Property Descriptions - void **set_color** **(** :ref:`Color` value **)** - :ref:`Color` **get_color** **(** **)** -The fill color. - - -.. tabs:: - - .. code-tab:: gdscript - - $ColorRect.color = Color(1, 0, 0, 1) # Set ColorRect's color to red. - - .. code-tab:: csharp - - GetNode("ColorRect").Color = new Color(1, 0, 0, 1); // Set ColorRect's color to red. - - +The fill color of the rectangle. .. |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_compressedcubemap.rst b/classes/class_compressedcubemap.rst index e69c8af1bcb..a213b43b73a 100644 --- a/classes/class_compressedcubemap.rst +++ b/classes/class_compressedcubemap.rst @@ -21,14 +21,16 @@ Description A cubemap that is loaded from a ``.ccube`` file. This file format is internal to Godot; it is created by importing other image formats with the import system. **CompressedCubemap** can use one of 4 compresson methods: -- Uncompressed (uncompressed on the GPU) - - Lossless (WebP or PNG, uncompressed on the GPU) - Lossy (WebP, uncompressed on the GPU) - VRAM Compressed (compressed on the GPU) +- VRAM Uncompressed (uncompressed on the GPU) + +- Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed) + Only **VRAM Compressed** actually reduces the memory usage on the GPU. The **Lossless** and **Lossy** compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed. Using **VRAM Compressed** also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. diff --git a/classes/class_compressedcubemaparray.rst b/classes/class_compressedcubemaparray.rst index fa085b54f33..80a1c51ca7b 100644 --- a/classes/class_compressedcubemaparray.rst +++ b/classes/class_compressedcubemaparray.rst @@ -21,14 +21,16 @@ Description A cubemap array that is loaded from a ``.ccubearray`` file. This file format is internal to Godot; it is created by importing other image formats with the import system. **CompressedCubemapArray** can use one of 4 compresson methods: -- Uncompressed (uncompressed on the GPU) - - Lossless (WebP or PNG, uncompressed on the GPU) - Lossy (WebP, uncompressed on the GPU) - VRAM Compressed (compressed on the GPU) +- VRAM Uncompressed (uncompressed on the GPU) + +- Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed) + Only **VRAM Compressed** actually reduces the memory usage on the GPU. The **Lossless** and **Lossy** compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed. Using **VRAM Compressed** also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. diff --git a/classes/class_compressedtexture2d.rst b/classes/class_compressedtexture2d.rst index dbbe5e594b0..9ef346709e1 100644 --- a/classes/class_compressedtexture2d.rst +++ b/classes/class_compressedtexture2d.rst @@ -21,14 +21,16 @@ Description A texture that is loaded from a ``.ctex`` file. This file format is internal to Godot; it is created by importing other image formats with the import system. **CompressedTexture2D** can use one of 4 compression methods (including a lack of any compression): -- Uncompressed (uncompressed on the GPU) - - Lossless (WebP or PNG, uncompressed on the GPU) - Lossy (WebP, uncompressed on the GPU) - VRAM Compressed (compressed on the GPU) +- VRAM Uncompressed (uncompressed on the GPU) + +- Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed) + Only **VRAM Compressed** actually reduces the memory usage on the GPU. The **Lossless** and **Lossy** compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed. Using **VRAM Compressed** also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. diff --git a/classes/class_compressedtexture2darray.rst b/classes/class_compressedtexture2darray.rst index d70e4e6b441..e4c372a3779 100644 --- a/classes/class_compressedtexture2darray.rst +++ b/classes/class_compressedtexture2darray.rst @@ -21,14 +21,16 @@ Description A texture array that is loaded from a ``.ctexarray`` file. This file format is internal to Godot; it is created by importing other image formats with the import system. **CompressedTexture2DArray** can use one of 4 compresson methods: -- Uncompressed (uncompressed on the GPU) - - Lossless (WebP or PNG, uncompressed on the GPU) - Lossy (WebP, uncompressed on the GPU) - VRAM Compressed (compressed on the GPU) +- VRAM Uncompressed (uncompressed on the GPU) + +- Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed) + Only **VRAM Compressed** actually reduces the memory usage on the GPU. The **Lossless** and **Lossy** compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed. Using **VRAM Compressed** also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. diff --git a/classes/class_compressedtexturelayered.rst b/classes/class_compressedtexturelayered.rst index f95e69fce74..8e4f4244583 100644 --- a/classes/class_compressedtexturelayered.rst +++ b/classes/class_compressedtexturelayered.rst @@ -21,19 +21,7 @@ Base class for texture arrays that can optionally be compressed. Description ----------- -A texture array that is loaded from a ``.ctexarray`` file. This file format is internal to Godot; it is created by importing other image formats with the import system. :ref:`CompressedTexture2D` can use one of 4 compresson methods: - -- Uncompressed (uncompressed on the GPU) - -- Lossless (WebP or PNG, uncompressed on the GPU) - -- Lossy (WebP, uncompressed on the GPU) - -- VRAM Compressed (compressed on the GPU) - -Only **VRAM Compressed** actually reduces the memory usage on the GPU. The **Lossless** and **Lossy** compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed. - -Using **VRAM Compressed** also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. +Base class for :ref:`CompressedTexture2DArray` and :ref:`CompressedTexture3D`. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. See also :ref:`TextureLayered`. .. rst-class:: classref-reftable-group diff --git a/classes/class_concavepolygonshape2d.rst b/classes/class_concavepolygonshape2d.rst index 04c3232dd09..43efacf3bce 100644 --- a/classes/class_concavepolygonshape2d.rst +++ b/classes/class_concavepolygonshape2d.rst @@ -12,20 +12,22 @@ ConcavePolygonShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Concave polygon shape resource for 2D physics. +A 2D polyline shape used for physics collision. .. rst-class:: classref-introduction-group Description ----------- -2D concave polygon shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. It is made out of segments and is optimal for complex polygonal concave collisions. However, it is not advised to use for :ref:`RigidBody2D` nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions. +A 2D polyline shape, intended for use in physics. Used internally in :ref:`CollisionPolygon2D` when it's in ``BUILD_SEGMENTS`` mode. -The main difference between a :ref:`ConvexPolygonShape2D` and a **ConcavePolygonShape2D** is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex to speed up collision detection. +Being just a collection of interconnected line segments, **ConcavePolygonShape2D** is the most freely configurable single 2D shape. It can be used to form polygons of any nature, or even shapes that don't enclose an area. However, :ref:`ConvexPolygonShape2D` is *hollow* even if the interconnected line segments do enclose an area, which often makes it unsuitable for physics or detection. -\ **Performance:** Due to its complexity, **ConcavePolygonShape2D** is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using :ref:`ConvexPolygonShape2D` will perform better. For dynamic physics bodies that need concave collision, several :ref:`ConvexPolygonShape2D`\ s can be used to represent its collision by using convex decomposition; see :ref:`ConvexPolygonShape2D`'s documentation for instructions. However, consider using primitive collision shapes such as :ref:`CircleShape2D` or :ref:`RectangleShape2D` first. +\ **Note:** When used for collision, **ConcavePolygonShape2D** is intended to work with static :ref:`CollisionShape2D` nodes like :ref:`StaticBody2D` and will likely not behave well for :ref:`CharacterBody2D`\ s or :ref:`RigidBody2D`\ s in a mode other than Static. -\ **Warning:** Using this shape for an :ref:`Area2D` (via a :ref:`CollisionShape2D` node) may give unexpected results: the area will only detect collisions with the segments in the **ConcavePolygonShape2D** (and not with any "inside" of the shape, for example). +\ **Warning:** Physics bodies that are small have a chance to clip through this shape when moving fast. This happens because on one frame, the physics body may be on the "outside" of the shape, and on the next frame it may be "inside" it. **ConcavePolygonShape2D** is hollow, so it won't detect a collision. + +\ **Performance:** Due to its complexity, **ConcavePolygonShape2D** is the slowest 2D collision shape to check collisions against. Its use should generally be limited to level geometry. If the polyline is closed, :ref:`CollisionPolygon2D`'s ``BUILD_SOLIDS`` mode can be used, which decomposes the polygon into convex ones; see :ref:`ConvexPolygonShape2D`'s documentation for instructions. .. rst-class:: classref-reftable-group @@ -59,7 +61,7 @@ Property Descriptions - void **set_segments** **(** :ref:`PackedVector2Array` value **)** - :ref:`PackedVector2Array` **get_segments** **(** **)** -The array of points that make up the **ConcavePolygonShape2D**'s line segments. +The array of points that make up the **ConcavePolygonShape2D**'s line segments. The array (of length divisible by two) is naturally divided into pairs (one pair for each segment); each pair consists of the starting point of a segment and the endpoint of a segment. .. |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_concavepolygonshape3d.rst b/classes/class_concavepolygonshape3d.rst index 3c603a2e33d..c2bcb29b111 100644 --- a/classes/class_concavepolygonshape3d.rst +++ b/classes/class_concavepolygonshape3d.rst @@ -12,20 +12,22 @@ ConcavePolygonShape3D **Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Concave polygon shape resource (also called "trimesh") for 3D physics. +A 3D trimesh shape used for physics collision. .. rst-class:: classref-introduction-group Description ----------- -3D concave polygon shape resource (also called "trimesh") to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. This shape is created by feeding a list of triangles. Despite its name, **ConcavePolygonShape3D** can also store convex polygon shapes. However, unlike :ref:`ConvexPolygonShape3D`, **ConcavePolygonShape3D** is *not* limited to storing convex shapes exclusively. +A 3D trimesh shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape3D`. -\ **Note:** When used for collision, **ConcavePolygonShape3D** is intended to work with static :ref:`PhysicsBody3D` nodes like :ref:`StaticBody3D` and will not work with :ref:`CharacterBody3D` or :ref:`RigidBody3D` with a mode other than Static. +Being just a collection of interconnected triangles, **ConcavePolygonShape3D** is the most freely configurable single 3D shape. It can be used to form polyhedra of any nature, or even shapes that don't enclose a volume. However, :ref:`ConvexPolygonShape3D` is *hollow* even if the interconnected triangles do enclose a volume, which often makes it unsuitable for physics or detection. -\ **Performance:** Due to its complexity, **ConcavePolygonShape3D** is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using :ref:`ConvexPolygonShape3D` will perform better. For dynamic physics bodies that need concave collision, several :ref:`ConvexPolygonShape3D`\ s can be used to represent its collision by using convex decomposition; see :ref:`ConvexPolygonShape3D`'s documentation for instructions. However, consider using primitive collision shapes such as :ref:`SphereShape3D` or :ref:`BoxShape3D` first. +\ **Note:** When used for collision, **ConcavePolygonShape3D** is intended to work with static :ref:`CollisionShape3D` nodes like :ref:`StaticBody3D` and will likely not behave well for :ref:`CharacterBody3D`\ s or :ref:`RigidBody3D`\ s in a mode other than Static. -\ **Warning:** Using this shape for an :ref:`Area3D` (via a :ref:`CollisionShape3D` node, created e.g. by using the *Create Trimesh Collision Sibling* option in the *Mesh* menu that appears when selecting a :ref:`MeshInstance3D` node) may give unexpected results: the area will only detect collisions with the triangle faces in the **ConcavePolygonShape3D** (and not with any "inside" of the shape, for example); moreover it will only detect all such collisions if :ref:`backface_collision` is ``true``. +\ **Warning:** Physics bodies that are small have a chance to clip through this shape when moving fast. This happens because on one frame, the physics body may be on the "outside" of the shape, and on the next frame it may be "inside" it. **ConcavePolygonShape3D** is hollow, so it won't detect a collision. + +\ **Performance:** Due to its complexity, **ConcavePolygonShape3D** is the slowest 3D collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, :ref:`ConvexPolygonShape3D` should be used. For dynamic physics bodies that need concave collision, several :ref:`ConvexPolygonShape3D`\ s can be used to represent its collision by using convex decomposition; see :ref:`ConvexPolygonShape3D`'s documentation for instructions. .. rst-class:: classref-introduction-group @@ -97,7 +99,7 @@ Method Descriptions :ref:`PackedVector3Array` **get_faces** **(** **)** |const| -Returns the faces (an array of triangles). +Returns the faces of the trimesh shape as an array of vertices. The array (of length divisible by three) is naturally divided into triples; each triple of vertices defines a triangle. .. rst-class:: classref-item-separator @@ -109,7 +111,7 @@ Returns the faces (an array of triangles). void **set_faces** **(** :ref:`PackedVector3Array` faces **)** -Sets the faces (an array of triangles). +Sets the faces of the trimesh shape from an array of vertices. The ``faces`` array should be composed of triples such that each triple of vertices defines a triangle. .. |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_conetwistjoint3d.rst b/classes/class_conetwistjoint3d.rst index 1d9cf6cd140..a59a8105781 100644 --- a/classes/class_conetwistjoint3d.rst +++ b/classes/class_conetwistjoint3d.rst @@ -12,18 +12,14 @@ ConeTwistJoint3D **Inherits:** :ref:`Joint3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -A twist joint between two 3D PhysicsBodies. +A physics joint that connects two 3D physics bodies in a way that simulates a ball-and-socket joint. .. rst-class:: classref-introduction-group Description ----------- -The joint can rotate the bodies across an axis defined by the local x-axes of the :ref:`Joint3D`. - -The twist axis is initiated as the X axis of the :ref:`Joint3D`. - -Once the Bodies swing, the twist axis is calculated as the middle of the x-axes of the Joint3D in the local space of the two Bodies. See also :ref:`Generic6DOFJoint3D`. +A physics joint that connects two 3D physics bodies in a way that simulates a ball-and-socket joint. The twist axis is initiated as the X axis of the **ConeTwistJoint3D**. Once the physics bodies swing, the twist axis is calculated as the middle of the X axes of the joint in the local space of the two physics bodies. Useful for limbs like shoulders and hips, lamps hanging off a ceiling, etc. .. rst-class:: classref-reftable-group @@ -247,9 +243,7 @@ Method Descriptions :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the value of the specified parameter. .. rst-class:: classref-item-separator @@ -261,9 +255,7 @@ Method Descriptions void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the value of the specified parameter. .. |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_confirmationdialog.rst b/classes/class_confirmationdialog.rst index 7ab479c1d9b..d1c61ba2fc0 100644 --- a/classes/class_confirmationdialog.rst +++ b/classes/class_confirmationdialog.rst @@ -14,14 +14,14 @@ ConfirmationDialog **Inherited By:** :ref:`EditorCommandPalette`, :ref:`EditorFileDialog`, :ref:`FileDialog`, :ref:`ScriptCreateDialog` -Dialog for confirmation of actions. +A dialog used for confirmation of actions. .. rst-class:: classref-introduction-group Description ----------- -Dialog for confirmation of actions. This dialog inherits from :ref:`AcceptDialog`, but has by default an OK and Cancel button (in host OS order). +A dialog used for confirmation of actions. This window is similar to :ref:`AcceptDialog`, but pressing its Cancel button can have a different outcome from pressing the OK button. The order of the two buttons varies depending on the host OS. To get cancel action, you can use: diff --git a/classes/class_container.rst b/classes/class_container.rst index 19b40f838d4..cdf194f5166 100644 --- a/classes/class_container.rst +++ b/classes/class_container.rst @@ -14,23 +14,21 @@ Container **Inherited By:** :ref:`AspectRatioContainer`, :ref:`BoxContainer`, :ref:`CenterContainer`, :ref:`EditorProperty`, :ref:`FlowContainer`, :ref:`GraphNode`, :ref:`GridContainer`, :ref:`MarginContainer`, :ref:`PanelContainer`, :ref:`ScrollContainer`, :ref:`SplitContainer`, :ref:`SubViewportContainer`, :ref:`TabContainer` -Base node for containers. +Base class for all GUI containers. .. rst-class:: classref-introduction-group Description ----------- -Base node for containers. A **Container** contains other controls and automatically arranges them in a certain way. - -A Control can inherit this to create custom container classes. +Base class for all GUI containers. A **Container** automatically arranges its child controls in a certain way. This class can be inherited to make custom container types. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`GUI containers <../tutorials/ui/gui_containers>` +- :doc:`Using Containers <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group diff --git a/classes/class_control.rst b/classes/class_control.rst index 3b193fe2854..88d4ded3a89 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -14,7 +14,7 @@ Control **Inherited By:** :ref:`BaseButton`, :ref:`ColorRect`, :ref:`Container`, :ref:`GraphEdit`, :ref:`ItemList`, :ref:`Label`, :ref:`LineEdit`, :ref:`MenuBar`, :ref:`NinePatchRect`, :ref:`Panel`, :ref:`Range`, :ref:`ReferenceRect`, :ref:`RichTextLabel`, :ref:`Separator`, :ref:`TabBar`, :ref:`TextEdit`, :ref:`TextureRect`, :ref:`Tree`, :ref:`VideoStreamPlayer` -All user interface nodes inherit from Control. A control's anchors and offsets adapt its position and size relative to its parent. +Base class for all GUI controls. Adapts its position and size based on its parent control. .. rst-class:: classref-introduction-group @@ -155,10 +155,12 @@ Methods +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_drop_data` **(** :ref:`Vector2` at_position, :ref:`Variant` data **)** |virtual| | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_get_drag_data` **(** :ref:`Vector2` at_position **)** |virtual| |const| | + | :ref:`Variant` | :ref:`_get_drag_data` **(** :ref:`Vector2` at_position **)** |virtual| | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`_get_minimum_size` **(** **)** |virtual| |const| | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_tooltip` **(** :ref:`Vector2` at_position **)** |virtual| |const| | + +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_gui_input` **(** :ref:`InputEvent` event **)** |virtual| | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_has_point` **(** :ref:`Vector2` point **)** |virtual| |const| | @@ -1223,7 +1225,7 @@ Anchors the top edge of the node to the origin, the center or the end of its par - void **set_auto_translate** **(** :ref:`bool` value **)** - :ref:`bool` **is_auto_translating** **(** **)** -Toggles if any text should automatically change to its translated version depending on the current locale. Note that this will not affect any internal nodes (e.g. the popup of a :ref:`MenuButton`). +Toggles if any text should automatically change to its translated version depending on the current locale. Also decides if the node's strings should be parsed for POT generation. @@ -1327,7 +1329,7 @@ Tells Godot which node it should give focus to if the user presses the left arro - void **set_focus_neighbor** **(** :ref:`Side` side, :ref:`NodePath` neighbor **)** - :ref:`NodePath` **get_focus_neighbor** **(** :ref:`Side` side **)** |const| -Tells Godot which node it should give focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the :ref:`ProjectSettings.input/ui_right` input action. The node must be a **Control**. If this property is not set, Godot will give focus to the closest **Control** to the bottom of this one. +Tells Godot which node it should give focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the :ref:`ProjectSettings.input/ui_right` input action. The node must be a **Control**. If this property is not set, Godot will give focus to the closest **Control** to the right of this one. .. rst-class:: classref-item-separator @@ -1344,7 +1346,7 @@ Tells Godot which node it should give focus to if the user presses the right arr - void **set_focus_neighbor** **(** :ref:`Side` side, :ref:`NodePath` neighbor **)** - :ref:`NodePath` **get_focus_neighbor** **(** :ref:`Side` side **)** |const| -Tells Godot which node it should give focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the :ref:`ProjectSettings.input/ui_up` input action. The node must be a **Control**. If this property is not set, Godot will give focus to the closest **Control** to the bottom of this one. +Tells Godot which node it should give focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the :ref:`ProjectSettings.input/ui_up` input action. The node must be a **Control**. If this property is not set, Godot will give focus to the closest **Control** to the top of this one. .. rst-class:: classref-item-separator @@ -1741,7 +1743,7 @@ The size of the node's bounding rectangle, in the node's coordinate system. :ref - void **set_h_size_flags** **(** :ref:`SizeFlags` value **)** - :ref:`SizeFlags` **get_h_size_flags** **(** **)** -Tells the parent :ref:`Container` nodes how they should resize and place the node on the X axis. Use one of the :ref:`SizeFlags` constants to change the flags. See the constants to learn what each does. +Tells the parent :ref:`Container` nodes how they should resize and place the node on the X axis. Use a combination of the :ref:`SizeFlags` constants to change the flags. See the constants to learn what each does. .. rst-class:: classref-item-separator @@ -1775,7 +1777,7 @@ If the node and at least one of its neighbors uses the :ref:`SIZE_EXPAND` value **)** - :ref:`SizeFlags` **get_v_size_flags** **(** **)** -Tells the parent :ref:`Container` nodes how they should resize and place the node on the Y axis. Use one of the :ref:`SizeFlags` constants to change the flags. See the constants to learn what each does. +Tells the parent :ref:`Container` nodes how they should resize and place the node on the Y axis. Use a combination of the :ref:`SizeFlags` constants to change the flags. See the constants to learn what each does. .. rst-class:: classref-item-separator @@ -1896,7 +1898,7 @@ This method should only be used to test the data. Process the data in :ref:`_dro { // Check position if it is relevant to you // Otherwise, just check data - return data.VariantType == Variant.Type.Dictionary && data.AsGodotDictionary().Contains("expected"); + return data.VariantType == Variant.Type.Dictionary && data.AsGodotDictionary().ContainsKey("expected"); } @@ -1928,7 +1930,7 @@ Godot calls this method to pass you the ``data`` from a control's :ref:`_get_dra public override bool _CanDropData(Vector2 atPosition, Variant data) { - return data.VariantType == Variant.Type.Dictionary && dict.AsGodotDictionary().Contains("color"); + return data.VariantType == Variant.Type.Dictionary && dict.AsGodotDictionary().ContainsKey("color"); } public override void _DropData(Vector2 atPosition, Variant data) @@ -1946,7 +1948,7 @@ Godot calls this method to pass you the ``data`` from a control's :ref:`_get_dra .. rst-class:: classref-method -:ref:`Variant` **_get_drag_data** **(** :ref:`Vector2` at_position **)** |virtual| |const| +:ref:`Variant` **_get_drag_data** **(** :ref:`Vector2` at_position **)** |virtual| 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`. @@ -1993,6 +1995,20 @@ If not overridden, defaults to :ref:`Vector2.ZERO`. ---- +.. _class_Control_method__get_tooltip: + +.. rst-class:: classref-method + +:ref:`String` **_get_tooltip** **(** :ref:`Vector2` at_position **)** |virtual| |const| + +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`, no tooltip is displayed. + +.. rst-class:: classref-item-separator + +---- + .. _class_Control_method__gui_input: .. rst-class:: classref-method @@ -2150,6 +2166,8 @@ void **accept_event** **(** **)** 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. + .. rst-class:: classref-item-separator ---- @@ -2462,7 +2480,7 @@ Returns the minimum size for this control. See :ref:`custom_minimum_size` **get_offset** **(** :ref:`Side` offset **)** |const| -Returns the anchor for the specified :ref:`Side`. A getter method for :ref:`offset_bottom`, :ref:`offset_left`, :ref:`offset_right` and :ref:`offset_top`. +Returns the offset for the specified :ref:`Side`. A getter method for :ref:`offset_bottom`, :ref:`offset_left`, :ref:`offset_right` and :ref:`offset_top`. .. rst-class:: classref-item-separator @@ -2685,9 +2703,11 @@ See :ref:`get_theme_color` for details. :ref:`String` **get_tooltip** **(** :ref:`Vector2` at_position=Vector2(0, 0) **)** |const| -Returns the tooltip text ``at_position`` in local coordinates, which will typically appear when the cursor is resting over this control. By default, it returns :ref:`tooltip_text`. +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`. -\ **Note:** This method can be overridden to customize its behavior. If this method returns an empty :ref:`String`, no tooltip is displayed. +\ **Note:** If this method returns an empty :ref:`String`, no tooltip is displayed. .. rst-class:: classref-item-separator @@ -3182,7 +3202,7 @@ Sets :ref:`offset_right` and :ref:`offset_b void **set_focus_neighbor** **(** :ref:`Side` side, :ref:`NodePath` neighbor **)** -Sets the anchor for the specified :ref:`Side` to the **Control** at ``neighbor`` node path. A setter method for :ref:`focus_neighbor_bottom`, :ref:`focus_neighbor_left`, :ref:`focus_neighbor_right` and :ref:`focus_neighbor_top`. +Sets the focus neighbor for the specified :ref:`Side` to the **Control** at ``neighbor`` node path. A setter method for :ref:`focus_neighbor_bottom`, :ref:`focus_neighbor_left`, :ref:`focus_neighbor_right` and :ref:`focus_neighbor_top`. .. rst-class:: classref-item-separator diff --git a/classes/class_convexpolygonshape2d.rst b/classes/class_convexpolygonshape2d.rst index 6177f19fe79..b9bac56eb57 100644 --- a/classes/class_convexpolygonshape2d.rst +++ b/classes/class_convexpolygonshape2d.rst @@ -12,18 +12,20 @@ ConvexPolygonShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Convex polygon shape resource for 2D physics. +A 2D convex polygon shape used for physics collision. .. rst-class:: classref-introduction-group Description ----------- -2D convex polygon shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check). See also :ref:`CollisionPolygon2D`. +A 2D convex polygon shape, intended for use in physics. Used internally in :ref:`CollisionPolygon2D` when it's in ``BUILD_SOLIDS`` mode. -The main difference between a **ConvexPolygonShape2D** and a :ref:`ConcavePolygonShape2D` is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex to speed up collision detection. +\ **ConvexPolygonShape2D** is *solid*, which means it detects collisions from objects that are fully inside it, unlike :ref:`ConcavePolygonShape2D` which is hollow. This makes it more suitable for both detection and physics. -\ **Performance:** **ConvexPolygonShape2D** is faster to check collisions against compared to :ref:`ConcavePolygonShape2D`, but it is slower than primitive collision shapes such as :ref:`CircleShape2D` or :ref:`RectangleShape2D`. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by a primitive shape. +\ **Convex decomposition:** A concave polygon can be split up into several convex polygons. This allows dynamic physics bodies to have complex concave collisions (at a performance cost) and can be achieved by using several :ref:`ConvexPolygonShape3D` nodes or by using the :ref:`CollisionPolygon2D` node in ``BUILD_SOLIDS`` mode. To generate a collision polygon from a sprite, select the :ref:`Sprite2D` node, go to the **Sprite2D** menu that appears above the viewport, and choose **Create Polygon2D Sibling**. + +\ **Performance:** **ConvexPolygonShape2D** is faster to check collisions against compared to :ref:`ConcavePolygonShape2D`, but it is slower than primitive collision shapes such as :ref:`CircleShape2D` and :ref:`RectangleShape2D`. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by primitive shapes. .. rst-class:: classref-reftable-group @@ -69,7 +71,9 @@ Property Descriptions - void **set_points** **(** :ref:`PackedVector2Array` value **)** - :ref:`PackedVector2Array` **get_points** **(** **)** -The polygon's list of vertices. Can be in either clockwise or counterclockwise order. Only set this property with convex hull points, use :ref:`set_point_cloud` to generate a convex hull shape from concave shape points. +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. .. rst-class:: classref-section-separator @@ -86,7 +90,7 @@ Method Descriptions void **set_point_cloud** **(** :ref:`PackedVector2Array` point_cloud **)** -Based on the set of points provided, this creates and 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 59e8b32a3f8..aeec2733152 100644 --- a/classes/class_convexpolygonshape3d.rst +++ b/classes/class_convexpolygonshape3d.rst @@ -12,18 +12,20 @@ ConvexPolygonShape3D **Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Convex polygon shape resource for 3D physics. +A 3D convex polyhedron shape used for physics collision. .. rst-class:: classref-introduction-group Description ----------- -3D convex polygon shape resource to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. Unlike :ref:`ConcavePolygonShape3D`, **ConvexPolygonShape3D** cannot store concave polygon shapes. **ConvexPolygonShape3D**\ s can be manually drawn in the editor using the :ref:`CollisionPolygon3D` node. +A 3D convex polyhedron shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape3D`. -\ **Convex decomposition:** Concave objects' collisions can be represented accurately using *several* **ConvexPolygonShape3D**\ s. This allows dynamic physics bodies to have complex concave collisions (at a performance cost). This is available in the editor by selecting the :ref:`MeshInstance3D`, going to the **Mesh** menu and choosing **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. +\ **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. -\ **Performance:** **ConvexPolygonShape3D** is faster to check collisions against compared to :ref:`ConcavePolygonShape3D`, but it is slower than primitive collision shapes such as :ref:`SphereShape3D` or :ref:`BoxShape3D`. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by a primitive shape. +\ **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. .. rst-class:: classref-introduction-group diff --git a/classes/class_cpuparticles3d.rst b/classes/class_cpuparticles3d.rst index f81a8d11d94..7d1fb40fc41 100644 --- a/classes/class_cpuparticles3d.rst +++ b/classes/class_cpuparticles3d.rst @@ -1662,7 +1662,7 @@ Particle system's running speed scaling ratio. A value of ``0`` can be used to p - void **set_split_scale** **(** :ref:`bool` value **)** - :ref:`bool` **get_split_scale** **(** **)** -If set to true, three different scale curves can be specified, one per scale axis. +If set to ``true``, three different scale curves can be specified, one per scale axis. .. rst-class:: classref-item-separator diff --git a/classes/class_crypto.rst b/classes/class_crypto.rst index d7c1f4baf24..30d78589c98 100644 --- a/classes/class_crypto.rst +++ b/classes/class_crypto.rst @@ -12,16 +12,16 @@ Crypto **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Access to advanced cryptographic functionalities. +Provides access to advanced cryptographic functionalities. .. rst-class:: classref-introduction-group Description ----------- -The Crypto class allows you to access some more advanced cryptographic functionalities in Godot. +The Crypto class provides access to advanced cryptographic functionalities. -For now, this includes generating cryptographically secure random bytes, RSA keys and self-signed X509 certificates generation, asymmetric key encryption/decryption, and signing/verification. +Currently, this includes asymmetric key encryption/decryption, signing/verification, and generating cryptographically secure random bytes, RSA keys, HMAC digests, and self-signed :ref:`X509Certificate`\ s. .. tabs:: @@ -44,7 +44,7 @@ For now, this includes generating cryptographically secure random bytes, RSA key cert.save("user://generated.crt") # Encryption var data = "Some data" - var encrypted = crypto.encrypt(key, data.to_utf8()) + var encrypted = crypto.encrypt(key, data.to_utf8_buffer()) # Decryption var decrypted = crypto.decrypt(key, encrypted) # Signing @@ -53,7 +53,7 @@ For now, this includes generating cryptographically secure random bytes, RSA key var verified = crypto.verify(HashingContext.HASH_SHA256, data.sha256_buffer(), signature, key) # Checks assert(verified) - assert(data.to_utf8() == decrypted) + assert(data.to_utf8_buffer() == decrypted) .. code-tab:: csharp @@ -77,7 +77,7 @@ For now, this includes generating cryptographically secure random bytes, RSA key _cert.Save("user://generated.crt"); // Encryption string data = "Some data"; - byte[] encrypted = _crypto.Encrypt(_key, data.ToUtf8()); + byte[] encrypted = _crypto.Encrypt(_key, data.ToUtf8Buffer()); // Decryption byte[] decrypted = _crypto.Decrypt(_key, encrypted); // Signing @@ -86,7 +86,7 @@ For now, this includes generating cryptographically secure random bytes, RSA key bool verified = _crypto.Verify(HashingContext.HashType.Sha256, Data.Sha256Buffer(), signature, _key); // Checks Debug.Assert(verified); - Debug.Assert(data.ToUtf8() == decrypted); + Debug.Assert(data.ToUtf8Buffer() == decrypted); } } diff --git a/classes/class_csgshape3d.rst b/classes/class_csgshape3d.rst index 3203e3c58eb..9bab0290183 100644 --- a/classes/class_csgshape3d.rst +++ b/classes/class_csgshape3d.rst @@ -226,7 +226,7 @@ The operation that is performed on this shape. This is ignored for the first CSG - void **set_snap** **(** :ref:`float` value **)** - :ref:`float` **get_snap** **(** **)** -Snap makes the mesh snap to a given distance so that the faces of two meshes can be perfectly aligned. A lower value results in greater precision but may be harder to adjust. +Snap makes the mesh vertices snap to a given distance so that the faces of two meshes can be perfectly aligned. A lower value results in greater precision but may be harder to adjust. .. rst-class:: classref-item-separator diff --git a/classes/class_curve3d.rst b/classes/class_curve3d.rst index 8ee2588b59b..389d7d33dfd 100644 --- a/classes/class_curve3d.rst +++ b/classes/class_curve3d.rst @@ -378,7 +378,7 @@ If the curve has no up vectors, the function sends an error to the console, and :ref:`Transform3D` **sample_baked_with_rotation** **(** :ref:`float` offset=0.0, :ref:`bool` cubic=false, :ref:`bool` apply_tilt=false **)** |const| -Similar with ``interpolate_baked()``. The the return value is ``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. +Similar with ``interpolate_baked()``. The return value is ``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. .. rst-class:: classref-item-separator diff --git a/classes/class_curvetexture.rst b/classes/class_curvetexture.rst index ea86e498ca1..586a8cc8199 100644 --- a/classes/class_curvetexture.rst +++ b/classes/class_curvetexture.rst @@ -109,7 +109,7 @@ The :ref:`Curve` that is rendered onto the texture. - void **set_texture_mode** **(** :ref:`TextureMode` value **)** - :ref:`TextureMode` **get_texture_mode** **(** **)** -The format the texture should be generated with. When passing a CurveTexture as a input to a :ref:`Shader`, this may need to be adjusted. +The format the texture should be generated with. When passing a CurveTexture as an input to a :ref:`Shader`, this may need to be adjusted. .. rst-class:: classref-item-separator diff --git a/classes/class_cylindershape3d.rst b/classes/class_cylindershape3d.rst index 7bb50c0dc2e..45a6a9fded0 100644 --- a/classes/class_cylindershape3d.rst +++ b/classes/class_cylindershape3d.rst @@ -12,18 +12,18 @@ CylinderShape3D **Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Cylinder shape for 3D collisions. +A 3D cylinder shape used for physics collision. .. rst-class:: classref-introduction-group Description ----------- -Cylinder shape for collisions. Like :ref:`CapsuleShape3D`, but without hemispheres at the cylinder's ends. +A 2D capsule shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape3D`. \ **Note:** There are several known bugs with cylinder collision shapes. Using :ref:`CapsuleShape3D` or :ref:`BoxShape3D` instead is recommended. -\ **Performance:** Being a primitive collision shape, **CylinderShape3D** is fast to check collisions against (though not as fast as :ref:`SphereShape3D`). **CylinderShape3D** is also more demanding compared to :ref:`CapsuleShape3D`. +\ **Performance:** **CylinderShape3D** is fast to check collisions against, but it is slower than :ref:`CapsuleShape3D`, :ref:`BoxShape3D`, and **CylinderShape3D**. .. rst-class:: classref-introduction-group diff --git a/classes/class_dampedspringjoint2d.rst b/classes/class_dampedspringjoint2d.rst index ef1a58c0c2f..86d9137161a 100644 --- a/classes/class_dampedspringjoint2d.rst +++ b/classes/class_dampedspringjoint2d.rst @@ -12,14 +12,14 @@ DampedSpringJoint2D **Inherits:** :ref:`Joint2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Damped spring constraint for 2D physics. +A physics joint that connects two 2D physics bodies with a spring-like force. .. rst-class:: classref-introduction-group Description ----------- -Damped spring constraint for 2D physics. This resembles a spring joint that always wants to go back to a given length. +A physics joint that connects two 2D physics bodies with a spring-like force. This resembles a spring that always wants to stretch to a given length. .. rst-class:: classref-reftable-group diff --git a/classes/class_decal.rst b/classes/class_decal.rst index 7421155359c..07a97e8aaad 100644 --- a/classes/class_decal.rst +++ b/classes/class_decal.rst @@ -397,7 +397,7 @@ Sets the size of the :ref:`AABB` used by the decal. All dimensions m \ **Note:** Unlike :ref:`BaseMaterial3D` whose filter mode can be adjusted on a per-material basis, the filter mode for **Decal** textures is set globally with :ref:`ProjectSettings.rendering/textures/decals/filter`. -\ **Note:** Setting this texture alone will not result in a visible decal, as :ref:`texture_albedo` must also be set. To create a ORM-only decal, load an albedo texture into :ref:`texture_albedo` and set :ref:`albedo_mix` to ``0.0``. The albedo texture's alpha channel will be used to determine where the underlying surface's ORM map should be overridden (and its intensity). +\ **Note:** Setting this texture alone will not result in a visible decal, as :ref:`texture_albedo` must also be set. To create an ORM-only decal, load an albedo texture into :ref:`texture_albedo` and set :ref:`albedo_mix` to ``0.0``. The albedo texture's alpha channel will be used to determine where the underlying surface's ORM map should be overridden (and its intensity). .. rst-class:: classref-item-separator diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index 244babf075a..fe6c63adf5f 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -10,18 +10,16 @@ Dictionary ========== -Dictionary type. +A built-in data structure that holds key-value pairs. .. rst-class:: classref-introduction-group Description ----------- -Dictionary type. Associative container, which contains values referenced by unique keys. Dictionaries are composed of pairs of keys (which must be unique) and values. Dictionaries will preserve the insertion order when adding new entries. In other programming languages, this data structure is sometimes referred to as a hash map or associative array. +Dictionaries are associative containers that contain values referenced by unique keys. Dictionaries will preserve the insertion order when adding new entries. In other programming languages, this data structure is often referred to as a hash map or an associative array. -You can define a dictionary by placing a comma-separated list of ``key: value`` pairs in curly braces ``{}``. - -\ **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`. +You can define a dictionary by placing a comma-separated list of ``key: value`` pairs inside curly braces ``{}``. Creating a dictionary: @@ -187,9 +185,9 @@ The keys of a dictionary can be iterated with the ``for`` keyword: -\ **Note:** Erasing elements while iterating over dictionaries is **not** supported and will result in unpredictable behavior. +\ **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:** When declaring a dictionary with ``const``, the dictionary becomes read-only. A read-only Dictionary's entries cannot be overridden at run-time. This does *not* affect nested :ref:`Array` and **Dictionary** values. +\ **Note:** Erasing elements while iterating over dictionaries is **not** supported and will result in unpredictable behavior. .. rst-class:: classref-introduction-group @@ -402,9 +400,9 @@ Returns ``true`` if the dictionary contains an entry with the given ``key``. { 210, default }, }; - GD.Print(myDict.Contains("Godot")); // Prints true - GD.Print(myDict.Contains(210)); // Prints true - GD.Print(myDict.Contains(4)); // Prints false + GD.Print(myDict.ContainsKey("Godot")); // Prints true + GD.Print(myDict.ContainsKey(210)); // Prints true + GD.Print(myDict.ContainsKey(4)); // Prints false diff --git a/classes/class_diraccess.rst b/classes/class_diraccess.rst index 3a48d33231a..a42aabc0158 100644 --- a/classes/class_diraccess.rst +++ b/classes/class_diraccess.rst @@ -12,14 +12,14 @@ DirAccess **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Type used to handle the filesystem. +Provides methods for managing directories and their content. .. rst-class:: classref-introduction-group Description ----------- -Directory type. It is used to manage directories and their content (not restricted to the project folder). +This class is used to manage directories and their content, even outside of the project folder. \ **DirAccess** can't be instantiated directly. Instead it is created with a static method that takes a path for which it will be opened. @@ -195,7 +195,7 @@ Property Descriptions - void **set_include_hidden** **(** :ref:`bool` value **)** - :ref:`bool` **get_include_hidden** **(** **)** -If ``true``, hidden files are included when the navigating directory. +If ``true``, hidden files are included when navigating the directory. Affects :ref:`list_dir_begin`, :ref:`get_directories` and :ref:`get_files`. @@ -417,6 +417,8 @@ Returns a :ref:`PackedStringArray` containing filenames Affected by :ref:`include_hidden`. +\ **Note:** When used on a ``res://`` path in an exported project, only the files actually 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 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 whether :ref:`ProjectSettings.editor/export/convert_text_resources_to_binary` is ``true``. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_displayserver.rst b/classes/class_displayserver.rst index d2076a05076..4551dcff910 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -12,14 +12,14 @@ DisplayServer **Inherits:** :ref:`Object` -Singleton for window management functions. +A server interface for low-level window management. .. rst-class:: classref-introduction-group Description ----------- -**DisplayServer** handles everything related to window management. This is separated from :ref:`OS` as a single operating system may support multiple display servers. +**DisplayServer** handles everything related to window management. It is separated from :ref:`OS` as a single operating system may support multiple display servers. \ **Headless mode:** Starting the engine with the ``--headless`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>` disables all rendering and window management functions. Most functions from **DisplayServer** will return dummy values in this case. @@ -62,6 +62,8 @@ Methods +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2i` | :ref:`get_display_safe_area` **(** **)** |const| | +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_keyboard_focus_screen` **(** **)** |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_name` **(** **)** |const| | +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_primary_screen` **(** **)** |const| | @@ -200,10 +202,14 @@ Methods +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`screen_get_dpi` **(** :ref:`int` screen=-1 **)** |const| | +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`screen_get_image` **(** :ref:`int` screen=-1 **)** |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`screen_get_max_scale` **(** **)** |const| | +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`ScreenOrientation` | :ref:`screen_get_orientation` **(** :ref:`int` screen=-1 **)** |const| | +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`screen_get_pixel` **(** :ref:`Vector2i` position **)** |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2i` | :ref:`screen_get_position` **(** :ref:`int` screen=-1 **)** |const| | +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`screen_get_refresh_rate` **(** :ref:`int` screen=-1 **)** |const| | @@ -518,6 +524,14 @@ Display server supports text-to-speech. See ``tts_*`` methods. **Windows, macOS, Display server supports expanding window content to the title. See :ref:`WINDOW_FLAG_EXTEND_TO_TITLE`. **macOS** +.. _class_DisplayServer_constant_FEATURE_SCREEN_CAPTURE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_SCREEN_CAPTURE** = ``21`` + +Display server supports reading screen pixels. See :ref:`screen_get_pixel`. + .. rst-class:: classref-item-separator ---- @@ -594,7 +608,7 @@ Default landscape orientation. :ref:`ScreenOrientation` **SCREEN_PORTRAIT** = ``1`` -Default portrait orienstation. +Default portrait orientation. .. _class_DisplayServer_constant_SCREEN_REVERSE_LANDSCAPE: @@ -744,7 +758,7 @@ I-beam cursor shape. This is used by default when hovering a control that accept :ref:`CursorShape` **CURSOR_POINTING_HAND** = ``2`` -Pointing hand cursor shape. This is used by default when hovering a :ref:`LinkButton` or an URL tag in a :ref:`RichTextLabel`. +Pointing hand cursor shape. This is used by default when hovering a :ref:`LinkButton` or a URL tag in a :ref:`RichTextLabel`. .. _class_DisplayServer_constant_CURSOR_CROSS: @@ -946,7 +960,7 @@ enum **WindowFlags**: :ref:`WindowFlags` **WINDOW_FLAG_RESIZE_DISABLED** = ``0`` -The window can't be resizing 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: @@ -990,7 +1004,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: @@ -1004,7 +1018,7 @@ Use :ref:`window_set_window_buttons_offset` to determine area under the title bar that is not covered by decorations. -\ **Note:** This flag is implemented on macOS. +\ **Note:** This flag is implemented only on macOS. .. _class_DisplayServer_constant_WINDOW_FLAG_MOUSE_PASSTHROUGH: @@ -1080,7 +1094,7 @@ Sent when the user has attempted to close the window (e.g. close button is press Sent when the device "Back" button is pressed, see :ref:`window_set_window_event_callback`. -\ **Note:** This event is implemented on Android. +\ **Note:** This event is implemented only on Android. .. _class_DisplayServer_constant_WINDOW_EVENT_DPI_CHANGE: @@ -1090,7 +1104,7 @@ Sent when the device "Back" button is pressed, see :ref:`window_set_window_event Sent when the window is moved to the display with different DPI, or display DPI is changed, see :ref:`window_set_window_event_callback`. -\ **Note:** This flag is implemented on macOS. +\ **Note:** This flag is implemented only on macOS. .. _class_DisplayServer_constant_WINDOW_EVENT_TITLEBAR_CHANGE: @@ -1100,7 +1114,7 @@ Sent when the window is moved to the display with different DPI, or display DPI Sent when the window title bar decoration is changed (e.g. :ref:`WINDOW_FLAG_EXTEND_TO_TITLE` is set or window entered/exited full screen mode), see :ref:`window_set_window_event_callback`. -\ **Note:** This flag is implemented on macOS. +\ **Note:** This flag is implemented only on macOS. .. rst-class:: classref-item-separator @@ -1212,7 +1226,7 @@ OpenGL context (only with the GL Compatibility renderer): - Linux: ``GLXContext*`` for the window. -- MacOS: ``NSOpenGLContext*`` for the window. +- macOS: ``NSOpenGLContext*`` for the window. - Android: ``EGLContext`` for the window. @@ -1267,6 +1281,22 @@ Utterance reached a word or sentence boundary. Constants --------- +.. _class_DisplayServer_constant_SCREEN_WITH_MOUSE_FOCUS: + +.. rst-class:: classref-constant + +**SCREEN_WITH_MOUSE_FOCUS** = ``-4`` + +Represents the screen containing the mouse pointer. + +.. _class_DisplayServer_constant_SCREEN_WITH_KEYBOARD_FOCUS: + +.. rst-class:: classref-constant + +**SCREEN_WITH_KEYBOARD_FOCUS** = ``-3`` + +Represents the screen containing the window with the keyboard focus. + .. _class_DisplayServer_constant_SCREEN_PRIMARY: .. rst-class:: classref-constant @@ -1416,7 +1446,7 @@ Sets the default mouse cursor shape. The cursor's appearance will vary depending Shows a text input dialog which uses the operating system's native look-and-feel. ``callback`` will be called with a :ref:`String` argument equal to the text field's contents when the dialog is closed for any reason. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -1430,7 +1460,7 @@ Shows a text input dialog which uses the operating system's native look-and-feel Shows a text dialog which uses the operating system's native look-and-feel. ``callback`` will be called when the dialog is closed for any reason. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -1444,7 +1474,7 @@ void **enable_for_stealing_focus** **(** :ref:`int` process_id **)** Allows the ``process_id`` PID to steal focus from this window. In other words, this disables the operating system's focus stealing protection for the specified PID. -\ **Note:** This method is implemented on Windows. +\ **Note:** This method is implemented only on Windows. .. rst-class:: classref-item-separator @@ -1504,6 +1534,18 @@ Returns the unobscured area of the display where interactive controls should be ---- +.. _class_DisplayServer_method_get_keyboard_focus_screen: + +.. rst-class:: classref-method + +:ref:`int` **get_keyboard_focus_screen** **(** **)** |const| + +Returns the index of the screen containing the window with the keyboard focus, or the primary screen if there's no focused window. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_get_name: .. rst-class:: classref-method @@ -1613,11 +1655,11 @@ Adds a new checkable item with text ``label`` to the global menu with ID ``menu_ Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. -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 boolean OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). +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:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. \ **Supported system menu IDs:**\ @@ -1640,11 +1682,11 @@ Adds a new checkable item with text ``label`` and icon ``icon`` to the global me Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. -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 boolean OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). +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:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. \ **Supported system menu IDs:**\ @@ -1667,11 +1709,11 @@ Adds a new item with text ``label`` and icon ``icon`` to the global menu with ID Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. -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 boolean OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). +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:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. \ **Supported system menu IDs:**\ @@ -1694,13 +1736,13 @@ Adds a new radio-checkable item with text ``label`` and icon ``icon`` to the glo Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. -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 boolean OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). +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:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. \ **Supported system menu IDs:**\ @@ -1723,11 +1765,11 @@ Adds a new item with text ``label`` to the global menu with ID ``menu_root``. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. -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 boolean OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). +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:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. \ **Supported system menu IDs:**\ @@ -1752,13 +1794,13 @@ Contrarily to normal binary items, multistate items can have more than two state Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. -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 boolean OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). +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:** By default, there's no indication of the current item state, it should be changed manually. \ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. \ **Supported system menu IDs:**\ @@ -1781,13 +1823,13 @@ Adds a new radio-checkable item with text ``label`` to the global menu with ID ` Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. -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 boolean OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). +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:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. \ **Supported system menu IDs:**\ @@ -1810,7 +1852,7 @@ Adds a separator between items to the global menu with ID ``menu_root``. Separat Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. \ **Supported system menu IDs:**\ @@ -1833,7 +1875,7 @@ Adds an item that will act as a submenu of the global menu ``menu_root``. The `` Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. \ **Supported system menu IDs:**\ @@ -1854,7 +1896,7 @@ void **global_menu_clear** **(** :ref:`String` menu_root **)** Removes all items from the global menu with ID ``menu_root``. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. \ **Supported system menu IDs:**\ @@ -1875,7 +1917,7 @@ Removes all items from the global menu with ID ``menu_root``. Returns the accelerator of the item at index ``idx``. Accelerators are special combinations of keys that activate the item, no matter which control is focused. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -1889,7 +1931,7 @@ Returns the accelerator of the item at index ``idx``. Accelerators are special c Returns the callback of the item at index ``idx``. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -1903,7 +1945,7 @@ Returns the callback of the item at index ``idx``. Returns number of items in the global menu with ID ``menu_root``. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -1917,7 +1959,7 @@ Returns number of items in the global menu with ID ``menu_root``. Returns the icon of the item at index ``idx``. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -1931,7 +1973,7 @@ Returns the icon of the item at index ``idx``. Returns the horizontal offset of the item at the given ``idx``. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -1945,7 +1987,7 @@ Returns the horizontal offset of the item at the given ``idx``. Returns the index of the item with the specified ``tag``. Index is automatically assigned to each item by the engine. Index can not be set manually. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -1959,7 +2001,7 @@ Returns the index of the item with the specified ``tag``. Index is automatically Returns the index of the item with the specified ``text``. Index is automatically assigned to each item by the engine. Index can not be set manually. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -1973,7 +2015,7 @@ Returns the index of the item with the specified ``text``. Index is automaticall Returns the callback of the item accelerator at index ``idx``. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -1985,9 +2027,9 @@ Returns the callback of the item accelerator at index ``idx``. :ref:`int` **global_menu_get_item_max_states** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| -Returns number of states of an 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 on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -1999,9 +2041,9 @@ Returns number of states of an multistate item. See :ref:`global_menu_add_multis :ref:`int` **global_menu_get_item_state** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| -Returns the state of an 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 on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2015,7 +2057,7 @@ Returns the state of an multistate item. See :ref:`global_menu_add_multistate_it 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 on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2029,7 +2071,7 @@ Returns the submenu ID of the item at index ``idx``. See :ref:`global_menu_add_s 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 on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2043,7 +2085,7 @@ Returns the metadata of the specified item, which might be of any type. You can Returns the text of the item at index ``idx``. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2055,9 +2097,9 @@ Returns the text of the item at index ``idx``. :ref:`String` **global_menu_get_item_tooltip** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| -Returns the tooltip associated with the specified index index ``idx``. +Returns the tooltip associated with the specified index ``idx``. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2071,7 +2113,7 @@ Returns the tooltip associated with the specified index index ``idx``. Returns ``true`` if the item at index ``idx`` is checkable in some way, i.e. if it has a checkbox or radio button. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2085,7 +2127,7 @@ Returns ``true`` if the item at index ``idx`` is checkable in some way, i.e. if Returns ``true`` if the item at index ``idx`` is checked. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2101,7 +2143,7 @@ Returns ``true`` if the item at index ``idx`` is disabled. When it is disabled i See :ref:`global_menu_set_item_disabled` for more info on how to disable an item. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2117,7 +2159,7 @@ Returns ``true`` if the item at index ``idx`` has radio button-style checkabilit \ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2133,7 +2175,7 @@ Removes the item at index ``idx`` from the global menu ``menu_root``. \ **Note:** The indices of items after the removed item will be shifted by one. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2145,9 +2187,9 @@ Removes the item at index ``idx`` from the global menu ``menu_root``. void **global_menu_set_item_accelerator** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Key` keycode **)** -Sets the accelerator of the item at index ``idx``. ``keycode`` can be a single :ref:`Key`, or a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using boolean OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). +Sets the accelerator of the item at index ``idx``. ``keycode`` can be a single :ref:`Key`, or a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2161,9 +2203,9 @@ void **global_menu_set_item_callback** **(** :ref:`String` menu_ro Sets the callback of the item at index ``idx``. Callback is emitted when an item is pressed. -\ **Note:** The ``callback`` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the tag parameter when the menu item was created. +\ **Note:** The ``callback`` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the ``tag`` parameter when the menu item was created. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2177,7 +2219,7 @@ void **global_menu_set_item_checkable** **(** :ref:`String` menu_r Sets whether the item at index ``idx`` has a checkbox. If ``false``, sets the type of the item to plain text. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2191,7 +2233,7 @@ void **global_menu_set_item_checked** **(** :ref:`String` menu_roo Sets the checkstate status of the item at index ``idx``. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2205,7 +2247,7 @@ void **global_menu_set_item_disabled** **(** :ref:`String` menu_ro Enables/disables the item at index ``idx``. When it is disabled, it can't be selected and its action can't be invoked. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2219,7 +2261,7 @@ void **global_menu_set_item_icon** **(** :ref:`String` menu_root, Replaces the :ref:`Texture2D` icon of the specified ``idx``. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. \ **Note:** This method is not supported by macOS "_dock" menu items. @@ -2235,7 +2277,7 @@ void **global_menu_set_item_indentation_level** **(** :ref:`String Sets the horizontal offset of the item at the given ``idx``. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2249,9 +2291,9 @@ void **global_menu_set_item_key_callback** **(** :ref:`String` men Sets the callback of the item at index ``idx``. Callback is emitted when its accelerator is activated. -\ **Note:** The ``key_callback`` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the tag parameter when the menu item was created. +\ **Note:** The ``key_callback`` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the ``tag`` parameter when the menu item was created. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2263,9 +2305,9 @@ Sets the callback of the item at index ``idx``. Callback is emitted when its acc void **global_menu_set_item_max_states** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` max_states **)** -Sets number of state of an 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 on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2281,7 +2323,7 @@ Sets the type of the item at the specified index ``idx`` to radio button. If ``f \ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2293,9 +2335,9 @@ Sets the type of the item at the specified index ``idx`` to radio button. If ``f void **global_menu_set_item_state** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` state **)** -Sets the state of an 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 on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2309,7 +2351,7 @@ void **global_menu_set_item_submenu** **(** :ref:`String` menu_roo Sets the submenu of the item at index ``idx``. The submenu is the ID of a global menu root that would be shown when the item is clicked. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2323,7 +2365,7 @@ void **global_menu_set_item_tag** **(** :ref:`String` menu_root, : 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 on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2337,7 +2379,7 @@ void **global_menu_set_item_text** **(** :ref:`String` menu_root, Sets the text of the item at index ``idx``. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2351,7 +2393,7 @@ void **global_menu_set_item_tooltip** **(** :ref:`String` menu_roo Sets the :ref:`String` tooltip of the item at the specified index ``idx``. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2377,7 +2419,7 @@ Returns ``true`` if the specified ``feature`` is supported by the current **Disp Returns the text selection in the `Input Method Editor `__ composition string, with the :ref:`Vector2i`'s ``x`` component being the caret position and ``y`` being the length of the selection. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2391,7 +2433,7 @@ Returns the text selection in the `Input Method Editor `__ window. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2551,7 +2593,7 @@ Returns the current mouse mode. See also :ref:`mouse_set_mode` **mouse_get_position** **(** **)** |const| -Returns the mouse cursor's current position. +Returns the mouse cursor's current position in screen coordinates. .. rst-class:: classref-item-separator @@ -2608,6 +2650,22 @@ Returns the dots per inch density of the specified screen. If ``screen`` is :ref ---- +.. _class_DisplayServer_method_screen_get_image: + +.. rst-class:: classref-method + +:ref:`Image` **screen_get_image** **(** :ref:`int` screen=-1 **)** |const| + +Returns screenshot of the ``screen``. + +\ **Note:** This method is implemented on Linux (X11), macOS, and Windows. + +\ **Note:** On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_screen_get_max_scale: .. rst-class:: classref-method @@ -2618,7 +2676,7 @@ Returns the greatest scale factor of all screens. \ **Note:** On macOS returned value is ``2.0`` if there is at least one hiDPI (Retina) screen in the system, and ``1.0`` in all other cases. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2638,6 +2696,22 @@ Returns the ``screen``'s current orientation. See also :ref:`screen_set_orientat ---- +.. _class_DisplayServer_method_screen_get_pixel: + +.. rst-class:: classref-method + +:ref:`Color` **screen_get_pixel** **(** :ref:`Vector2i` position **)** |const| + +Returns color of the display pixel at the ``position``. + +\ **Note:** This method is implemented on Linux (X11), macOS, and Windows. + +\ **Note:** On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_screen_get_position: .. rst-class:: classref-method @@ -2693,7 +2767,7 @@ Returns the scale factor of the specified screen by index. \ **Note:** On macOS returned value is ``2.0`` for hiDPI (Retina) screen, and ``1.0`` for all other cases. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -2765,7 +2839,7 @@ Sets the ``screen``'s ``orientation``. See also :ref:`screen_get_orientation` image **)** -Sets the window icon (usually displayed in the top-left corner) in the operating system's *native* format. 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. .. rst-class:: classref-item-separator @@ -2791,7 +2865,7 @@ Sets the window icon (usually displayed in the top-left corner) in the operating Returns current active tablet driver name. -\ **Note:** This method is implemented on Windows. +\ **Note:** This method is implemented only on Windows. .. rst-class:: classref-item-separator @@ -2805,7 +2879,7 @@ Returns current active tablet driver name. Returns the total number of available tablet drivers. -\ **Note:** This method is implemented on Windows. +\ **Note:** This method is implemented only on Windows. .. rst-class:: classref-item-separator @@ -2819,7 +2893,7 @@ Returns the total number of available tablet drivers. Returns the tablet driver name for the given index. -\ **Note:** This method is implemented on Windows. +\ **Note:** This method is implemented only on Windows. .. rst-class:: classref-item-separator @@ -2833,7 +2907,7 @@ void **tablet_set_current_driver** **(** :ref:`String` name **)** Set active tablet driver name. -\ **Note:** This method is implemented on Windows. +\ **Note:** This method is implemented only on Windows. .. rst-class:: classref-item-separator @@ -2855,10 +2929,12 @@ Each :ref:`Dictionary` contains two :ref:`String - ``language`` is language code in ``lang_Variant`` format. ``lang`` part is a 2 or 3-letter code based on the ISO-639 standard, in lowercase. And ``Variant`` part is an engine dependent string describing country, region or/and dialect. -Note that Godot depends on system libraries for text-to-speech functionality. These libraries are installed by default on Windows and MacOS, but not on all Linux distributions. If they are not present, this method will return an empty list. This applies to both Godot users on Linux, as well as end-users on Linux running Godot games that use text-to-speech. +Note that Godot depends on system libraries for text-to-speech functionality. These libraries are installed by default on Windows and macOS, but not on all Linux distributions. If they are not present, this method will return an empty list. This applies to both Godot users on Linux, as well as end-users on Linux running Godot games that use text-to-speech. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. + .. rst-class:: classref-item-separator ---- @@ -2873,6 +2949,8 @@ Returns an :ref:`PackedStringArray` of voice identifier \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. + .. rst-class:: classref-item-separator ---- @@ -2887,6 +2965,8 @@ Returns ``true`` if the synthesizer is in a paused state. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. + .. rst-class:: classref-item-separator ---- @@ -2901,6 +2981,8 @@ Returns ``true`` if the synthesizer is generating speech, or have utterance wait \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. + .. rst-class:: classref-item-separator ---- @@ -2915,6 +2997,8 @@ Puts the synthesizer into a paused state. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. + .. rst-class:: classref-item-separator ---- @@ -2929,6 +3013,8 @@ Resumes the synthesizer if it was paused. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. + .. rst-class:: classref-item-separator ---- @@ -2941,14 +3027,16 @@ void **tts_set_utterance_callback** **(** :ref:`TTSUtteranceEvent`, :ref:`TTS_UTTERANCE_ENDED`, and :ref:`TTS_UTTERANCE_CANCELED` callable's method should take one :ref:`int` parameter, the utterance id. +- :ref:`TTS_UTTERANCE_STARTED`, :ref:`TTS_UTTERANCE_ENDED`, and :ref:`TTS_UTTERANCE_CANCELED` callable's method should take one :ref:`int` parameter, the utterance ID. -- :ref:`TTS_UTTERANCE_BOUNDARY` callable's method should take two :ref:`int` parameters, the index of the character and the utterance id. +- :ref:`TTS_UTTERANCE_BOUNDARY` callable's method should take two :ref:`int` parameters, the index of the character and the utterance ID. \ **Note:** The granularity of the boundary callbacks is engine dependent. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. + .. rst-class:: classref-item-separator ---- @@ -2977,6 +3065,8 @@ Adds an utterance to the queue. If ``interrupt`` is ``true``, the queue is clear \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. + .. rst-class:: classref-item-separator ---- @@ -2991,6 +3081,8 @@ Stops synthesis in progress and removes all utterances from the queue. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. + .. rst-class:: classref-item-separator ---- @@ -3089,7 +3181,7 @@ Returns ID of the active popup window, or :ref:`INVALID_WINDOW_ID` **window_get_attached_instance_id** **(** :ref:`int` window_id=0 **)** |const| -Returns the :ref:`Object.get_instance_id` of the :ref:`Window` the ``window_id`` is attached to. also :ref:`window_get_attached_instance_id`. +Returns the :ref:`Object.get_instance_id` of the :ref:`Window` the ``window_id`` is attached to. .. rst-class:: classref-item-separator @@ -3273,7 +3365,7 @@ Returns ``true`` if the given window can be maximized (the maximize button is en Returns ``true``, if double-click on a window title should maximize it. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -3287,7 +3379,7 @@ Returns ``true``, if double-click on a window title should maximize it. Returns ``true``, if double-click on a window title should minimize it. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is implemented only on macOS. .. rst-class:: classref-item-separator @@ -3633,7 +3725,7 @@ void **window_set_window_buttons_offset** **(** :ref:`Vector2i` When :ref:`WINDOW_FLAG_EXTEND_TO_TITLE` flag is set, set offset to the center of the first titlebar button. -\ **Note:** This flag is implemented on macOS. +\ **Note:** This flag is implemented only on macOS. .. rst-class:: classref-item-separator diff --git a/classes/class_dtlsserver.rst b/classes/class_dtlsserver.rst index c888ec296f5..69da23ef98b 100644 --- a/classes/class_dtlsserver.rst +++ b/classes/class_dtlsserver.rst @@ -43,8 +43,8 @@ Below a small example of how to use it: func _process(delta): while server.is_connection_available(): - var peer : PacketPeerUDP = server.take_connection() - var dtls_peer : PacketPeerDTLS = dtls.take_connection(peer) + var peer: PacketPeerUDP = server.take_connection() + var dtls_peer: PacketPeerDTLS = dtls.take_connection(peer) if dtls_peer.get_status() != PacketPeerDTLS.STATUS_HANDSHAKING: continue # It is normal that 50% of the connections fails due to cookie exchange. print("Peer connected!") @@ -55,7 +55,7 @@ Below a small example of how to use it: if p.get_status() == PacketPeerDTLS.STATUS_CONNECTED: while p.get_available_packet_count() > 0: print("Received message from client: %s" % p.get_packet().get_string_from_utf8()) - p.put_packet("Hello DTLS client".to_utf8()) + p.put_packet("Hello DTLS client".to_utf8_buffer()) .. code-tab:: csharp @@ -98,7 +98,7 @@ Below a small example of how to use it: while (p.GetAvailablePacketCount() > 0) { GD.Print($"Received Message From Client: {p.GetPacket().GetStringFromUtf8()}"); - p.PutPacket("Hello DTLS Client".ToUtf8()); + p.PutPacket("Hello DTLS Client".ToUtf8Buffer()); } } } @@ -128,7 +128,7 @@ Below a small example of how to use it: if dtls.get_status() == PacketPeerDTLS.STATUS_CONNECTED: if !connected: # Try to contact server - dtls.put_packet("The answer is... 42!".to_utf8()) + dtls.put_packet("The answer is... 42!".to_utf8_buffer()) while dtls.get_available_packet_count() > 0: print("Connected: %s" % dtls.get_packet().get_string_from_utf8()) connected = true @@ -159,7 +159,7 @@ Below a small example of how to use it: if (!_connected) { // Try to contact server - _dtls.PutPacket("The Answer Is..42!".ToUtf8()); + _dtls.PutPacket("The Answer Is..42!".ToUtf8Buffer()); } while (_dtls.GetAvailablePacketCount() > 0) { diff --git a/classes/class_editorexportplatform.rst b/classes/class_editorexportplatform.rst index 3cabea5eb6d..3a1d5f211ca 100644 --- a/classes/class_editorexportplatform.rst +++ b/classes/class_editorexportplatform.rst @@ -12,6 +12,8 @@ EditorExportPlatform **Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**Inherited By:** :ref:`EditorExportPlatformAndroid`, :ref:`EditorExportPlatformIOS`, :ref:`EditorExportPlatformMacOS`, :ref:`EditorExportPlatformPC`, :ref:`EditorExportPlatformWeb` + Identifies a supported export platform, and internally provides the functionality of exporting to that platform. .. rst-class:: classref-introduction-group diff --git a/classes/class_editorexportplatformandroid.rst b/classes/class_editorexportplatformandroid.rst new file mode 100644 index 00000000000..15b3a9d478d --- /dev/null +++ b/classes/class_editorexportplatformandroid.rst @@ -0,0 +1,2726 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/platform/android/doc_classes/EditorExportPlatformAndroid.xml. + +.. _class_EditorExportPlatformAndroid: + +EditorExportPlatformAndroid +=========================== + +**Inherits:** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` + +Exporter for Android. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Exporting for Android <../tutorials/export/exporting_for_android>` + +- :doc:`Custom builds for Android <../tutorials/export/android_custom_build>` + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`apk_expansion/SALT` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`apk_expansion/enable` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`apk_expansion/public_key` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`architectures/arm64-v8a` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`architectures/armeabi-v7a` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`architectures/x86` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`architectures/x86_64` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`command_line/extra_args` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`custom_template/debug` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`custom_template/release` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`gradle_build/export_format` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`gradle_build/min_sdk` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`gradle_build/target_sdk` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`gradle_build/use_gradle_build` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`graphics/opengl_debug` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`keystore/debug` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`keystore/debug_password` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`keystore/debug_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`keystore/release` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`keystore/release_password` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`keystore/release_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`launcher_icons/adaptive_background_432x432` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`launcher_icons/adaptive_foreground_432x432` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`launcher_icons/main_192x192` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`package/app_category` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`package/exclude_from_recents` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`package/name` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`package/retain_data_on_uninstall` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`package/signed` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`package/unique_name` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/access_checkin_properties` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/access_coarse_location` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/access_fine_location` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/access_location_extra_commands` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/access_mock_location` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/access_network_state` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/access_surface_flinger` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/access_wifi_state` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/account_manager` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/add_voicemail` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/authenticate_accounts` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/battery_stats` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/bind_accessibility_service` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/bind_appwidget` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/bind_device_admin` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/bind_input_method` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/bind_nfc_service` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/bind_notification_listener_service` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/bind_print_service` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/bind_remoteviews` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/bind_text_service` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/bind_vpn_service` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/bind_wallpaper` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/bluetooth` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/bluetooth_admin` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/bluetooth_privileged` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/brick` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/broadcast_package_removed` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/broadcast_sms` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/broadcast_sticky` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/broadcast_wap_push` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/call_phone` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/call_privileged` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/camera` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/capture_audio_output` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/capture_secure_video_output` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/capture_video_output` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/change_component_enabled_state` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/change_configuration` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/change_network_state` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/change_wifi_multicast_state` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/change_wifi_state` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/clear_app_cache` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/clear_app_user_data` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/control_location_updates` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`permissions/custom_permissions` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/delete_cache_files` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/delete_packages` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/device_power` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/diagnostic` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/disable_keyguard` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/dump` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/expand_status_bar` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/factory_test` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/flashlight` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/force_back` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/get_accounts` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/get_package_size` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/get_tasks` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/get_top_activity_info` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/global_search` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/hardware_test` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/inject_events` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/install_location_provider` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/install_packages` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/install_shortcut` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/internal_system_window` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/internet` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/kill_background_processes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/location_hardware` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/manage_accounts` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/manage_app_tokens` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/manage_documents` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/manage_external_storage` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/master_clear` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/media_content_control` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/modify_audio_settings` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/modify_phone_state` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/mount_format_filesystems` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/mount_unmount_filesystems` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/nfc` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/persistent_activity` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/process_outgoing_calls` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/read_calendar` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/read_call_log` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/read_contacts` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/read_external_storage` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/read_frame_buffer` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/read_history_bookmarks` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/read_input_state` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/read_logs` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/read_phone_state` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/read_profile` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/read_sms` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/read_social_stream` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/read_sync_settings` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/read_sync_stats` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/read_user_dictionary` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/reboot` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/receive_boot_completed` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/receive_mms` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/receive_sms` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/receive_wap_push` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/record_audio` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/reorder_tasks` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/restart_packages` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/send_respond_via_message` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/send_sms` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/set_activity_watcher` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/set_alarm` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/set_always_finish` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/set_animation_scale` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/set_debug_app` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/set_orientation` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/set_pointer_speed` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/set_preferred_applications` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/set_process_limit` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/set_time` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/set_time_zone` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/set_wallpaper` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/set_wallpaper_hints` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/signal_persistent_processes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/status_bar` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/subscribed_feeds_read` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/subscribed_feeds_write` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/system_alert_window` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/transmit_ir` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/uninstall_shortcut` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/update_device_stats` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/use_credentials` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/use_sip` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/vibrate` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/wake_lock` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/write_apn_settings` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/write_calendar` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/write_call_log` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/write_contacts` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/write_external_storage` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/write_gservices` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/write_history_bookmarks` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/write_profile` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/write_secure_settings` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/write_settings` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/write_sms` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/write_social_stream` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/write_sync_settings` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/write_user_dictionary` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`screen/immersive_mode` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`screen/support_large` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`screen/support_normal` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`screen/support_small` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`screen/support_xlarge` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`user_data_backup/allow` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`version/code` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`version/name` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`xr_features/hand_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`xr_features/hand_tracking_frequency` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`xr_features/passthrough` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`xr_features/xr_mode` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_EditorExportPlatformAndroid_property_apk_expansion/SALT: + +.. rst-class:: classref-property + +:ref:`String` **apk_expansion/SALT** + +Array of random bytes that the licensing Policy uses to create an `Obfuscator `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_apk_expansion/enable: + +.. rst-class:: classref-property + +:ref:`bool` **apk_expansion/enable** + +If ``true``, project resources are stored in the separate APK expansion file, instead APK. + +\ **Note:** APK expansion should be enabled to use PCK encryption. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_apk_expansion/public_key: + +.. rst-class:: classref-property + +:ref:`String` **apk_expansion/public_key** + +Base64 encoded RSA public key for your publisher account, available from the profile page on the "Play Console". + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_architectures/arm64-v8a: + +.. rst-class:: classref-property + +:ref:`bool` **architectures/arm64-v8a** + +If ``true``, ``arm64`` binaries are included into exported project. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_architectures/armeabi-v7a: + +.. rst-class:: classref-property + +:ref:`bool` **architectures/armeabi-v7a** + +If ``true``, ``arm32`` binaries are included into exported project. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_architectures/x86: + +.. rst-class:: classref-property + +:ref:`bool` **architectures/x86** + +If ``true``, ``x86_32`` binaries are included into exported project. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_architectures/x86_64: + +.. rst-class:: classref-property + +:ref:`bool` **architectures/x86_64** + +If ``true``, ``x86_64`` binaries are included into exported project. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_command_line/extra_args: + +.. rst-class:: classref-property + +:ref:`String` **command_line/extra_args** + +A list of additional command line arguments, exported project will receive when started. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_custom_template/debug: + +.. rst-class:: classref-property + +:ref:`String` **custom_template/debug** + +Path to the custom export template. If left empty, default template is used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_custom_template/release: + +.. rst-class:: classref-property + +:ref:`String` **custom_template/release** + +Path to the custom export template. If left empty, default template is used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_gradle_build/export_format: + +.. rst-class:: classref-property + +:ref:`int` **gradle_build/export_format** + +Export format for Gradle build. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_gradle_build/min_sdk: + +.. rst-class:: classref-property + +:ref:`String` **gradle_build/min_sdk** + +Minimal Android SDK version for Gradle build. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_gradle_build/target_sdk: + +.. rst-class:: classref-property + +:ref:`String` **gradle_build/target_sdk** + +Target Android SDK version for Gradle build. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_gradle_build/use_gradle_build: + +.. rst-class:: classref-property + +:ref:`bool` **gradle_build/use_gradle_build** + +If ``true``, Gradle build is used instead of pre-built APK. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_graphics/opengl_debug: + +.. rst-class:: classref-property + +:ref:`bool` **graphics/opengl_debug** + +If ``true``, OpenGL ES debug context will be created (additional runtime checking, validation, and logging). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_keystore/debug: + +.. rst-class:: classref-property + +:ref:`String` **keystore/debug** + +Path of the debug keystore file. + +Can be overridden with the environment variable ``GODOT_ANDROID_KEYSTORE_DEBUG_PATH``. + +Fallbacks to ``EditorSettings.export/android/debug_keystore`` if empty. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_keystore/debug_password: + +.. rst-class:: classref-property + +:ref:`String` **keystore/debug_password** + +Password for the debug keystore file. + +Can be overridden with the environment variable ``GODOT_ANDROID_KEYSTORE_DEBUG_PASSWORD``. + +Fallbacks to ``EditorSettings.export/android/debug_keystore_pass`` if both it and :ref:`keystore/debug` are empty. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_keystore/debug_user: + +.. rst-class:: classref-property + +:ref:`String` **keystore/debug_user** + +User name for the debug keystore file. + +Can be overridden with the environment variable ``GODOT_ANDROID_KEYSTORE_DEBUG_USER``. + +Fallbacks to ``EditorSettings.export/android/debug_keystore_user`` if both it and :ref:`keystore/debug` are empty. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_keystore/release: + +.. rst-class:: classref-property + +:ref:`String` **keystore/release** + +Path of the release keystore file. + +Can be overridden with the environment variable ``GODOT_ANDROID_KEYSTORE_RELEASE_PATH``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_keystore/release_password: + +.. rst-class:: classref-property + +:ref:`String` **keystore/release_password** + +Password for the release keystore file. + +Can be overridden with the environment variable ``GODOT_ANDROID_KEYSTORE_RELEASE_PASSWORD``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_keystore/release_user: + +.. rst-class:: classref-property + +:ref:`String` **keystore/release_user** + +User name for the release keystore file. + +Can be overridden with the environment variable ``GODOT_ANDROID_KEYSTORE_RELEASE_USER``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_launcher_icons/adaptive_background_432x432: + +.. rst-class:: classref-property + +:ref:`String` **launcher_icons/adaptive_background_432x432** + +Background layer of the application adaptive icon file. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_launcher_icons/adaptive_foreground_432x432: + +.. rst-class:: classref-property + +:ref:`String` **launcher_icons/adaptive_foreground_432x432** + +Foreground layer of the application adaptive icon file. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_launcher_icons/main_192x192: + +.. rst-class:: classref-property + +:ref:`String` **launcher_icons/main_192x192** + +Application icon file. If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_package/app_category: + +.. rst-class:: classref-property + +:ref:`int` **package/app_category** + +Application category for the Play Store. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_package/exclude_from_recents: + +.. rst-class:: classref-property + +:ref:`bool` **package/exclude_from_recents** + +If ``true``, task initiated by main activity will be excluded from the list of recently used applications. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_package/name: + +.. rst-class:: classref-property + +:ref:`String` **package/name** + +Name of the application. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_package/retain_data_on_uninstall: + +.. rst-class:: classref-property + +:ref:`bool` **package/retain_data_on_uninstall** + +If ``true``, when the user uninstalls an app, a prompt to keep the app's data will be shown. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_package/signed: + +.. rst-class:: classref-property + +:ref:`bool` **package/signed** + +If ``true``, package signing is enabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_package/unique_name: + +.. rst-class:: classref-property + +:ref:`String` **package/unique_name** + +Unique application identifier in a reverse-DNS format, can only contain alphanumeric characters (``A-Z``, ``a-z``, and ``0-9``), hyphens (``-``), and periods (``.``). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/access_checkin_properties: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/access_checkin_properties** + +Allows read/write access to the "properties" table in the checkin database. See `ACCESS_CHECKIN_PROPERTIES `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/access_coarse_location: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/access_coarse_location** + +Allows access to the approximate location information. See `ACCESS_COARSE_LOCATION `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/access_fine_location: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/access_fine_location** + +Allows access to the precise location information. See `ACCESS_FINE_LOCATION `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/access_location_extra_commands: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/access_location_extra_commands** + +Allows access to the extra location provider commands. See `ACCESS_LOCATION_EXTRA_COMMANDS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/access_mock_location: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/access_mock_location** + +Allows an application to create mock location providers for testing. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/access_network_state: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/access_network_state** + +Allows access to the information about networks. See `ACCESS_NETWORK_STATE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/access_surface_flinger: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/access_surface_flinger** + +Allows an application to use SurfaceFlinger's low level features. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/access_wifi_state: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/access_wifi_state** + +Allows access to the information about Wi-Fi networks. See `ACCESS_WIFI_STATE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/account_manager: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/account_manager** + +Allows applications to call into AccountAuthenticators. See `ACCOUNT_MANAGER `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/add_voicemail: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/add_voicemail** + +Allows an application to add voicemails into the system. See `ADD_VOICEMAIL `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/authenticate_accounts: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/authenticate_accounts** + +Allows an application to act as an AccountAuthenticator for the AccountManager. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/battery_stats: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/battery_stats** + +Allows an application to collect battery statistics. Sett `BATTERY_STATS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/bind_accessibility_service: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/bind_accessibility_service** + +Must be required by an AccessibilityService, to ensure that only the system can bind to it. See `BIND_ACCESSIBILITY_SERVICE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/bind_appwidget: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/bind_appwidget** + +Allows an application to tell the AppWidget service which application can access AppWidget's data. See `BIND_APPWIDGET `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/bind_device_admin: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/bind_device_admin** + +Must be required by device administration receiver, to ensure that only the system can interact with it. See `BIND_DEVICE_ADMIN `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/bind_input_method: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/bind_input_method** + +Must be required by an InputMethodService, to ensure that only the system can bind to it. See `BIND_INPUT_METHOD `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/bind_nfc_service: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/bind_nfc_service** + +Must be required by a HostApduService or OffHostApduService to ensure that only the system can bind to it. See `BIND_NFC_SERVICE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/bind_notification_listener_service: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/bind_notification_listener_service** + +Must be required by a NotificationListenerService, to ensure that only the system can bind to it. See `BIND_NOTIFICATION_LISTENER_SERVICE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/bind_print_service: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/bind_print_service** + +Must be required by a PrintService, to ensure that only the system can bind to it. See `BIND_PRINT_SERVICE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/bind_remoteviews: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/bind_remoteviews** + +Must be required by a RemoteViewsService, to ensure that only the system can bind to it. See `BIND_REMOTEVIEWS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/bind_text_service: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/bind_text_service** + +Must be required by a TextService (e.g. SpellCheckerService) to ensure that only the system can bind to it. See `BIND_TEXT_SERVICE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/bind_vpn_service: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/bind_vpn_service** + +Must be required by a VpnService, to ensure that only the system can bind to it. See `BIND_VPN_SERVICE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/bind_wallpaper: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/bind_wallpaper** + +Must be required by a WallpaperService, to ensure that only the system can bind to it. See `BIND_WALLPAPER `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/bluetooth: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/bluetooth** + +Allows applications to connect to paired bluetooth devices. See `BLUETOOTH `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/bluetooth_admin: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/bluetooth_admin** + +Allows applications to discover and pair bluetooth devices. See `BLUETOOTH_ADMIN `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/bluetooth_privileged: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/bluetooth_privileged** + +Allows applications to pair bluetooth devices without user interaction, and to allow or disallow phonebook access or message access. See `BLUETOOTH_PRIVILEGED `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/brick: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/brick** + +Required to be able to disable the device (very dangerous!). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/broadcast_package_removed: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/broadcast_package_removed** + +Allows an application to broadcast a notification that an application package has been removed. See `BROADCAST_PACKAGE_REMOVED `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/broadcast_sms: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/broadcast_sms** + +Allows an application to broadcast an SMS receipt notification. See `BROADCAST_SMS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/broadcast_sticky: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/broadcast_sticky** + +Allows an application to broadcast sticky intents. See `BROADCAST_STICKY `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/broadcast_wap_push: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/broadcast_wap_push** + +Allows an application to broadcast a WAP PUSH receipt notification. See `BROADCAST_WAP_PUSH `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/call_phone: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/call_phone** + +Allows an application to initiate a phone call without going through the Dialer user interface. See `CALL_PHONE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/call_privileged: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/call_privileged** + +Allows an application to call any phone number, including emergency numbers, without going through the Dialer user interface. See `CALL_PRIVILEGED `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/camera: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/camera** + +Required to be able to access the camera device. See `CAMERA `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/capture_audio_output: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/capture_audio_output** + +Allows an application to capture audio output. See `CAPTURE_AUDIO_OUTPUT `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/capture_secure_video_output: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/capture_secure_video_output** + +Allows an application to capture secure video output. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/capture_video_output: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/capture_video_output** + +Allows an application to capture video output. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/change_component_enabled_state: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/change_component_enabled_state** + +Allows an application to change whether an application component (other than its own) is enabled or not. See `CHANGE_COMPONENT_ENABLED_STATE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/change_configuration: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/change_configuration** + +Allows an application to modify the current configuration, such as locale. See `CHANGE_CONFIGURATION `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/change_network_state: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/change_network_state** + +Allows applications to change network connectivity state. See `CHANGE_NETWORK_STATE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/change_wifi_multicast_state: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/change_wifi_multicast_state** + +Allows applications to enter Wi-Fi Multicast mode. See `CHANGE_WIFI_MULTICAST_STATE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/change_wifi_state: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/change_wifi_state** + +Allows applications to change Wi-Fi connectivity state. See `CHANGE_WIFI_STATE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/clear_app_cache: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/clear_app_cache** + +Allows an application to clear the caches of all installed applications on the device. See `CLEAR_APP_CACHE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/clear_app_user_data: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/clear_app_user_data** + +Allows an application to clear user data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/control_location_updates: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/control_location_updates** + +Allows enabling/disabling location update notifications from the radio. See `CONTROL_LOCATION_UPDATES `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/custom_permissions: + +.. rst-class:: classref-property + +:ref:`PackedStringArray` **permissions/custom_permissions** + +Array of custom permission strings. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/delete_cache_files: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/delete_cache_files** + +Deprecated. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/delete_packages: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/delete_packages** + +Allows an application to delete packages. See `DELETE_PACKAGES `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/device_power: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/device_power** + +Allows low-level access to power management. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/diagnostic: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/diagnostic** + +Allows applications to RW to diagnostic resources. See `DIAGNOSTIC `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/disable_keyguard: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/disable_keyguard** + +Allows applications to disable the keyguard if it is not secure. See `DISABLE_KEYGUARD `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/dump: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/dump** + +Allows an application to retrieve state dump information from system services. See `DUMP `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/expand_status_bar: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/expand_status_bar** + +Allows an application to expand or collapse the status bar. See `EXPAND_STATUS_BAR `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/factory_test: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/factory_test** + +Run as a manufacturer test application, running as the root user. See `FACTORY_TEST `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/flashlight: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/flashlight** + +Allows access to the flashlight. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/force_back: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/force_back** + +Allows an application to force a BACK operation on whatever is the top activity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/get_accounts: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/get_accounts** + +Allows access to the list of accounts in the Accounts Service. See `GET_ACCOUNTS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/get_package_size: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/get_package_size** + +Allows an application to find out the space used by any package. See `GET_PACKAGE_SIZE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/get_tasks: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/get_tasks** + +Deprecated in API level 21. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/get_top_activity_info: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/get_top_activity_info** + +Allows an application to retrieve private information about the current top activity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/global_search: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/global_search** + +Used on content providers to allow the global search system to access their data. See `GLOBAL_SEARCH `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/hardware_test: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/hardware_test** + +Allows access to hardware peripherals. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/inject_events: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/inject_events** + +Allows an application to inject user events (keys, touch, trackball) into the event stream and deliver them to ANY window. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/install_location_provider: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/install_location_provider** + +Allows an application to install a location provider into the Location Manager. See `INSTALL_LOCATION_PROVIDER `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/install_packages: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/install_packages** + +Allows an application to install packages. See `INSTALL_PACKAGES `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/install_shortcut: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/install_shortcut** + +Allows an application to install a shortcut in Launcher. See `INSTALL_SHORTCUT `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/internal_system_window: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/internal_system_window** + +Allows an application to open windows that are for use by parts of the system user interface. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/internet: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/internet** + +Allows applications to open network sockets. See `INTERNET `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/kill_background_processes: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/kill_background_processes** + +Allows an application to call ActivityManager.killBackgroundProcesses(String). See `KILL_BACKGROUND_PROCESSES `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/location_hardware: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/location_hardware** + +Allows an application to use location features in hardware, such as the geofencing api. See `LOCATION_HARDWARE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/manage_accounts: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/manage_accounts** + +Allows an application to manage the list of accounts in the AccountManager. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/manage_app_tokens: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/manage_app_tokens** + +Allows an application to manage (create, destroy, Z-order) application tokens in the window manager. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/manage_documents: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/manage_documents** + +Allows an application to manage access to documents, usually as part of a document picker. See `MANAGE_DOCUMENTS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/manage_external_storage: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/manage_external_storage** + +Allows an application a broad access to external storage in scoped storage. See `MANAGE_EXTERNAL_STORAGE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/master_clear: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/master_clear** + +See `MASTER_CLEAR `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/media_content_control: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/media_content_control** + +Allows an application to know what content is playing and control its playback. See `MEDIA_CONTENT_CONTROL `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/modify_audio_settings: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/modify_audio_settings** + +Allows an application to modify global audio settings. See `MODIFY_AUDIO_SETTINGS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/modify_phone_state: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/modify_phone_state** + +Allows modification of the telephony state - power on, mmi, etc. Does not include placing calls. See `MODIFY_PHONE_STATE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/mount_format_filesystems: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/mount_format_filesystems** + +Allows formatting file systems for removable storage. See `MOUNT_FORMAT_FILESYSTEMS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/mount_unmount_filesystems: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/mount_unmount_filesystems** + +Allows mounting and unmounting file systems for removable storage. See `MOUNT_UNMOUNT_FILESYSTEMS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/nfc: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/nfc** + +Allows applications to perform I/O operations over NFC. See `NFC `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/persistent_activity: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/persistent_activity** + +Allow an application to make its activities persistent. + +Deprecated in API level 15. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/process_outgoing_calls: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/process_outgoing_calls** + +Allows an application to see the number being dialed during an outgoing call with the option to redirect the call to a different number or abort the call altogether. See `PROCESS_OUTGOING_CALLS `__. + +Deprecated in API level 29. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/read_calendar: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/read_calendar** + +Allows an application to read the user's calendar data. See `READ_CALENDAR `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/read_call_log: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/read_call_log** + +Allows an application to read the user's call log. See `READ_CALL_LOG `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/read_contacts: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/read_contacts** + +Allows an application to read the user's contacts data. See `READ_CONTACTS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/read_external_storage: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/read_external_storage** + +Allows an application to read from external storage. See `READ_EXTERNAL_STORAGE `__. + +Deprecated in API level 33. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/read_frame_buffer: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/read_frame_buffer** + +Allows an application to take screen shots and more generally get access to the frame buffer data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/read_history_bookmarks: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/read_history_bookmarks** + +Allows an application to read (but not write) the user's browsing history and bookmarks. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/read_input_state: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/read_input_state** + +Deprecated in API level 16. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/read_logs: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/read_logs** + +Allows an application to read the low-level system log files. See `READ_LOGS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/read_phone_state: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/read_phone_state** + +Allows read only access to phone state. See `READ_PHONE_STATE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/read_profile: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/read_profile** + +Allows an application to read the user's personal profile data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/read_sms: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/read_sms** + +Allows an application to read SMS messages. See `READ_SMS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/read_social_stream: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/read_social_stream** + +Allows an application to read from the user's social stream. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/read_sync_settings: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/read_sync_settings** + +Allows applications to read the sync settings. See `READ_SYNC_SETTINGS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/read_sync_stats: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/read_sync_stats** + +Allows applications to read the sync stats. See `READ_SYNC_STATS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/read_user_dictionary: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/read_user_dictionary** + +Allows an application to read the user dictionary. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/reboot: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/reboot** + +Required to be able to reboot the device. See `REBOOT `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/receive_boot_completed: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/receive_boot_completed** + +Allows an application to receive the Intent.ACTION_BOOT_COMPLETED that is broadcast after the system finishes booting. See `RECEIVE_BOOT_COMPLETED `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/receive_mms: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/receive_mms** + +Allows an application to monitor incoming MMS messages. See `RECEIVE_MMS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/receive_sms: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/receive_sms** + +Allows an application to receive SMS messages. See `RECEIVE_SMS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/receive_wap_push: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/receive_wap_push** + +Allows an application to receive WAP push messages. See `RECEIVE_WAP_PUSH `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/record_audio: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/record_audio** + +Allows an application to record audio. See `RECORD_AUDIO `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/reorder_tasks: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/reorder_tasks** + +Allows an application to change the Z-order of tasks. See `REORDER_TASKS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/restart_packages: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/restart_packages** + +Deprecated in API level 15. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/send_respond_via_message: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/send_respond_via_message** + +Allows an application (Phone) to send a request to other applications to handle the respond-via-message action during incoming calls. See `SEND_RESPOND_VIA_MESSAGE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/send_sms: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/send_sms** + +Allows an application to send SMS messages. See `SEND_SMS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/set_activity_watcher: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/set_activity_watcher** + +Allows an application to watch and control how activities are started globally in the system. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/set_alarm: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/set_alarm** + +Allows an application to broadcast an Intent to set an alarm for the user. See `SET_ALARM `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/set_always_finish: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/set_always_finish** + +Allows an application to control whether activities are immediately finished when put in the background. See `SET_ALWAYS_FINISH `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/set_animation_scale: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/set_animation_scale** + +Allows to modify the global animation scaling factor. See `SET_ANIMATION_SCALE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/set_debug_app: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/set_debug_app** + +Configure an application for debugging. See `SET_DEBUG_APP `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/set_orientation: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/set_orientation** + +Allows low-level access to setting the orientation (actually rotation) of the screen. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/set_pointer_speed: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/set_pointer_speed** + +Allows low-level access to setting the pointer speed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/set_preferred_applications: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/set_preferred_applications** + +Deprecated in API level 15. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/set_process_limit: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/set_process_limit** + +Allows an application to set the maximum number of (not needed) application processes that can be running. See `SET_PROCESS_LIMIT `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/set_time: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/set_time** + +Allows applications to set the system time directly. See `SET_TIME `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/set_time_zone: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/set_time_zone** + +Allows applications to set the system time zone directly. See `SET_TIME_ZONE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/set_wallpaper: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/set_wallpaper** + +Allows applications to set the wallpaper. See `SET_WALLPAPER `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/set_wallpaper_hints: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/set_wallpaper_hints** + +Allows applications to set the wallpaper hints. See `SET_WALLPAPER_HINTS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/signal_persistent_processes: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/signal_persistent_processes** + +Allow an application to request that a signal be sent to all persistent processes. See `SIGNAL_PERSISTENT_PROCESSES `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/status_bar: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/status_bar** + +Allows an application to open, close, or disable the status bar and its icons. See `STATUS_BAR `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/subscribed_feeds_read: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/subscribed_feeds_read** + +Allows an application to allow access the subscribed feeds ContentProvider. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/subscribed_feeds_write: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/subscribed_feeds_write** + +Deprecated. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/system_alert_window: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/system_alert_window** + +Allows an app to create windows using the type WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY, shown on top of all other apps. See `SYSTEM_ALERT_WINDOW `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/transmit_ir: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/transmit_ir** + +Allows using the device's IR transmitter, if available. See `TRANSMIT_IR `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/uninstall_shortcut: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/uninstall_shortcut** + +Deprecated. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/update_device_stats: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/update_device_stats** + +Allows an application to update device statistics. See `UPDATE_DEVICE_STATS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/use_credentials: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/use_credentials** + +Allows an application to request authtokens from the AccountManager. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/use_sip: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/use_sip** + +Allows an application to use SIP service. See `USE_SIP `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/vibrate: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/vibrate** + +Allows access to the vibrator. See `VIBRATE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/wake_lock: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/wake_lock** + +Allows using PowerManager WakeLocks to keep processor from sleeping or screen from dimming. See `WAKE_LOCK `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/write_apn_settings: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/write_apn_settings** + +Allows applications to write the apn settings and read sensitive fields of an existing apn settings like user and password. See `WRITE_APN_SETTINGS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/write_calendar: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/write_calendar** + +Allows an application to write the user's calendar data. See `WRITE_CALENDAR `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/write_call_log: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/write_call_log** + +Allows an application to write (but not read) the user's call log data. See `WRITE_CALL_LOG `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/write_contacts: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/write_contacts** + +Allows an application to write the user's contacts data. See `WRITE_CONTACTS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/write_external_storage: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/write_external_storage** + +Allows an application to write to external storage. See `WRITE_EXTERNAL_STORAGE `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/write_gservices: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/write_gservices** + +Allows an application to modify the Google service map. See `WRITE_GSERVICES `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/write_history_bookmarks: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/write_history_bookmarks** + +Allows an application to write (but not read) the user's browsing history and bookmarks. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/write_profile: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/write_profile** + +Allows an application to write (but not read) the user's personal profile data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/write_secure_settings: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/write_secure_settings** + +Allows an application to read or write the secure system settings. See `WRITE_SECURE_SETTINGS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/write_settings: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/write_settings** + +Allows an application to read or write the system settings. See `WRITE_SETTINGS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/write_sms: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/write_sms** + +Allows an application to write SMS messages. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/write_social_stream: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/write_social_stream** + +Allows an application to write (but not read) the user's social stream data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/write_sync_settings: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/write_sync_settings** + +Allows applications to write the sync settings. See `WRITE_SYNC_SETTINGS `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/write_user_dictionary: + +.. rst-class:: classref-property + +:ref:`bool` **permissions/write_user_dictionary** + +Allows an application to write to the user dictionary. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_screen/immersive_mode: + +.. rst-class:: classref-property + +:ref:`bool` **screen/immersive_mode** + +If ``true``, hides navigation and status bar. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_screen/support_large: + +.. rst-class:: classref-property + +:ref:`bool` **screen/support_large** + +Indicates whether the application supports larger screen form-factors. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_screen/support_normal: + +.. rst-class:: classref-property + +:ref:`bool` **screen/support_normal** + +Indicates whether an application supports the "normal" screen form-factors. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_screen/support_small: + +.. rst-class:: classref-property + +:ref:`bool` **screen/support_small** + +Indicates whether the application supports smaller screen form-factors. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_screen/support_xlarge: + +.. rst-class:: classref-property + +:ref:`bool` **screen/support_xlarge** + +Indicates whether the application supports extra large screen form-factors. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_user_data_backup/allow: + +.. rst-class:: classref-property + +:ref:`bool` **user_data_backup/allow** + +If ``true``, allows the application to participate in the backup and restore infrastructure. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_version/code: + +.. rst-class:: classref-property + +:ref:`int` **version/code** + +Machine-readable application version. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_version/name: + +.. rst-class:: classref-property + +:ref:`String` **version/name** + +Application version visible to the user. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_xr_features/hand_tracking: + +.. rst-class:: classref-property + +:ref:`int` **xr_features/hand_tracking** + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_xr_features/hand_tracking_frequency: + +.. rst-class:: classref-property + +:ref:`int` **xr_features/hand_tracking_frequency** + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_xr_features/passthrough: + +.. rst-class:: classref-property + +:ref:`int` **xr_features/passthrough** + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_xr_features/xr_mode: + +.. rst-class:: classref-property + +:ref:`int` **xr_features/xr_mode** + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_editorexportplatformios.rst b/classes/class_editorexportplatformios.rst new file mode 100644 index 00000000000..a018301797e --- /dev/null +++ b/classes/class_editorexportplatformios.rst @@ -0,0 +1,832 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/platform/ios/doc_classes/EditorExportPlatformIOS.xml. + +.. _class_EditorExportPlatformIOS: + +EditorExportPlatformIOS +======================= + +**Inherits:** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` + +Exporter for iOS. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Exporting for iOS <../tutorials/export/exporting_for_ios>` + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/app_store_team_id` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/bundle_identifier` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/code_sign_identity_debug` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/code_sign_identity_release` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`application/export_method_debug` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`application/export_method_release` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`application/icon_interpolation` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`application/launch_screens_interpolation` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/provisioning_profile_uuid_debug` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/provisioning_profile_uuid_release` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/short_version` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/signature` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`application/targeted_device_family` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/version` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`architectures/arm64` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`capabilities/access_wifi` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`capabilities/push_notifications` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`custom_template/debug` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`custom_template/release` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/app_store_1024x1024` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/ipad_76x76` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/ipad_152x152` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/ipad_167x167` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/iphone_120x120` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/iphone_180x180` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/notification_40x40` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/notification_60x60` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/settings_58x58` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/settings_87x87` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/spotlight_40x40` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/spotlight_80x80` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`landscape_launch_screens/ipad_1024x768` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`landscape_launch_screens/ipad_2048x1536` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`landscape_launch_screens/iphone_2208x1242` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`landscape_launch_screens/iphone_2436x1125` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`portrait_launch_screens/ipad_768x1024` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`portrait_launch_screens/ipad_1536x2048` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`portrait_launch_screens/iphone_640x960` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`portrait_launch_screens/iphone_640x1136` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`portrait_launch_screens/iphone_750x1334` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`portrait_launch_screens/iphone_1125x2436` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`portrait_launch_screens/iphone_1242x2208` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/camera_usage_description` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/camera_usage_description_localized` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/microphone_usage_description` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/microphone_usage_description_localized` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/photolibrary_usage_description` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/photolibrary_usage_description_localized` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`storyboard/custom_bg_color` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`storyboard/custom_image@2x` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`storyboard/custom_image@3x` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`storyboard/image_scale_mode` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`storyboard/use_custom_bg_color` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`storyboard/use_launch_screen_storyboard` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`user_data/accessible_from_files_app` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`user_data/accessible_from_itunes_sharing` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_EditorExportPlatformIOS_property_application/app_store_team_id: + +.. rst-class:: classref-property + +:ref:`String` **application/app_store_team_id** + +Apple Team ID, unique 10-character string. To locate your Team ID check "Membership details" section in your Apple developer account dashboard, or "Organizational Unit" of your code signing certificate. See `Locate your Team ID `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_application/bundle_identifier: + +.. rst-class:: classref-property + +:ref:`String` **application/bundle_identifier** + +Unique application identifier in a reverse-DNS format, can only contain alphanumeric characters (``A-Z``, ``a-z``, and ``0-9``), hyphens (``-``), and periods (``.``). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_application/code_sign_identity_debug: + +.. rst-class:: classref-property + +:ref:`String` **application/code_sign_identity_debug** + +The "Full Name", "Common Name" or SHA-1 hash of the signing identity used for debug export. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_application/code_sign_identity_release: + +.. rst-class:: classref-property + +:ref:`String` **application/code_sign_identity_release** + +The "Full Name", "Common Name" or SHA-1 hash of the signing identity used for release export. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_application/export_method_debug: + +.. rst-class:: classref-property + +:ref:`int` **application/export_method_debug** + +Application distribution target (debug export). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_application/export_method_release: + +.. rst-class:: classref-property + +:ref:`int` **application/export_method_release** + +Application distribution target (release export). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_application/icon_interpolation: + +.. rst-class:: classref-property + +:ref:`int` **application/icon_interpolation** + +Interpolation method used to resize application icon. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_application/launch_screens_interpolation: + +.. rst-class:: classref-property + +:ref:`int` **application/launch_screens_interpolation** + +Interpolation method used to resize launch screen images. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_application/provisioning_profile_uuid_debug: + +.. rst-class:: classref-property + +:ref:`String` **application/provisioning_profile_uuid_debug** + +UUID of the provisioning profile. If left empty, Xcode will download or create a provisioning profile automatically. See `Edit, download, or delete provisioning profiles `__. + +Can be overridden with the environment variable ``GODOT_IOS_PROVISIONING_PROFILE_UUID_DEBUG``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_application/provisioning_profile_uuid_release: + +.. rst-class:: classref-property + +:ref:`String` **application/provisioning_profile_uuid_release** + +UUID of the provisioning profile. If left empty, Xcode will download or create a provisioning profile automatically. See `Edit, download, or delete provisioning profiles `__. + +Can be overridden with the environment variable ``GODOT_IOS_PROVISIONING_PROFILE_UUID_RELEASE``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_application/short_version: + +.. rst-class:: classref-property + +:ref:`String` **application/short_version** + +Application version visible to the user, can only contain numeric characters (``0-9``) and periods (``.``). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_application/signature: + +.. rst-class:: classref-property + +:ref:`String` **application/signature** + +A four-character creator code that is specific to the bundle. Optional. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_application/targeted_device_family: + +.. rst-class:: classref-property + +:ref:`int` **application/targeted_device_family** + +Supported device family. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_application/version: + +.. rst-class:: classref-property + +:ref:`String` **application/version** + +Machine-readable application version, in the ``major.minor.patch`` format, can only contain numeric characters (``0-9``) and periods (``.``). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_architectures/arm64: + +.. rst-class:: classref-property + +:ref:`bool` **architectures/arm64** + +If ``true``, ``arm64`` binaries are included into exported project. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_capabilities/access_wifi: + +.. rst-class:: classref-property + +:ref:`bool` **capabilities/access_wifi** + +If ``true``, networking features related to Wi-Fi access are enabled. See `Required Device Capabilities `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_capabilities/push_notifications: + +.. rst-class:: classref-property + +:ref:`bool` **capabilities/push_notifications** + +If ``true``, push notifications are enabled. See `Required Device Capabilities `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_custom_template/debug: + +.. rst-class:: classref-property + +:ref:`String` **custom_template/debug** + +Path to the custom export template. If left empty, default template is used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_custom_template/release: + +.. rst-class:: classref-property + +:ref:`String` **custom_template/release** + +Path to the custom export template. If left empty, default template is used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/app_store_1024x1024: + +.. rst-class:: classref-property + +:ref:`String` **icons/app_store_1024x1024** + +App Store application icon file. If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/ipad_76x76: + +.. rst-class:: classref-property + +:ref:`String` **icons/ipad_76x76** + +Home screen application icon file on iPad (1x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/ipad_152x152: + +.. rst-class:: classref-property + +:ref:`String` **icons/ipad_152x152** + +Home screen application icon file on iPad (2x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/ipad_167x167: + +.. rst-class:: classref-property + +:ref:`String` **icons/ipad_167x167** + +Home screen application icon file on iPad (3x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/iphone_120x120: + +.. rst-class:: classref-property + +:ref:`String` **icons/iphone_120x120** + +Home screen application icon file on iPhone (2x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/iphone_180x180: + +.. rst-class:: classref-property + +:ref:`String` **icons/iphone_180x180** + +Home screen application icon file on iPhone (3x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/notification_40x40: + +.. rst-class:: classref-property + +:ref:`String` **icons/notification_40x40** + +Notification icon file on iPad and iPhone (2x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/notification_60x60: + +.. rst-class:: classref-property + +:ref:`String` **icons/notification_60x60** + +Notification icon file on iPhone (3x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/settings_58x58: + +.. rst-class:: classref-property + +:ref:`String` **icons/settings_58x58** + +Application settings icon file on iPad and iPhone (2x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/settings_87x87: + +.. rst-class:: classref-property + +:ref:`String` **icons/settings_87x87** + +Application settings icon file on iPhone (3x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/spotlight_40x40: + +.. rst-class:: classref-property + +:ref:`String` **icons/spotlight_40x40** + +Spotlight icon file on iPad (1x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/spotlight_80x80: + +.. rst-class:: classref-property + +:ref:`String` **icons/spotlight_80x80** + +Spotlight icon file on iPad and iPhone (2x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_landscape_launch_screens/ipad_1024x768: + +.. rst-class:: classref-property + +:ref:`String` **landscape_launch_screens/ipad_1024x768** + +Application launch screen image file. If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_landscape_launch_screens/ipad_2048x1536: + +.. rst-class:: classref-property + +:ref:`String` **landscape_launch_screens/ipad_2048x1536** + +Application launch screen image file. If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_landscape_launch_screens/iphone_2208x1242: + +.. rst-class:: classref-property + +:ref:`String` **landscape_launch_screens/iphone_2208x1242** + +Application launch screen image file. If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_landscape_launch_screens/iphone_2436x1125: + +.. rst-class:: classref-property + +:ref:`String` **landscape_launch_screens/iphone_2436x1125** + +Application launch screen image file. If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_portrait_launch_screens/ipad_768x1024: + +.. rst-class:: classref-property + +:ref:`String` **portrait_launch_screens/ipad_768x1024** + +Application launch screen image file. If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_portrait_launch_screens/ipad_1536x2048: + +.. rst-class:: classref-property + +:ref:`String` **portrait_launch_screens/ipad_1536x2048** + +Application launch screen image file. If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_portrait_launch_screens/iphone_640x960: + +.. rst-class:: classref-property + +:ref:`String` **portrait_launch_screens/iphone_640x960** + +Application launch screen image file. If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_portrait_launch_screens/iphone_640x1136: + +.. rst-class:: classref-property + +:ref:`String` **portrait_launch_screens/iphone_640x1136** + +Application launch screen image file. If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_portrait_launch_screens/iphone_750x1334: + +.. rst-class:: classref-property + +:ref:`String` **portrait_launch_screens/iphone_750x1334** + +Application launch screen image file. If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_portrait_launch_screens/iphone_1125x2436: + +.. rst-class:: classref-property + +:ref:`String` **portrait_launch_screens/iphone_1125x2436** + +Application launch screen image file. If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_portrait_launch_screens/iphone_1242x2208: + +.. rst-class:: classref-property + +:ref:`String` **portrait_launch_screens/iphone_1242x2208** + +Application launch screen image file. If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/camera_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/camera_usage_description** + +A message displayed when requesting access to the device's camera (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/camera_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/camera_usage_description_localized** + +A message displayed when requesting access to the device's camera (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/microphone_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/microphone_usage_description** + +A message displayed when requesting access to the device's microphone (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/microphone_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/microphone_usage_description_localized** + +A message displayed when requesting access to the device's microphone (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/photolibrary_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/photolibrary_usage_description** + +A message displayed when requesting access to the user's photo library (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/photolibrary_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/photolibrary_usage_description_localized** + +A message displayed when requesting access to the user's photo library (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_storyboard/custom_bg_color: + +.. rst-class:: classref-property + +:ref:`Color` **storyboard/custom_bg_color** + +A custom background color of the storyboard launch screen. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_storyboard/custom_image@2x: + +.. rst-class:: classref-property + +:ref:`String` **storyboard/custom_image@2x** + +Application launch screen image file (2x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_storyboard/custom_image@3x: + +.. rst-class:: classref-property + +:ref:`String` **storyboard/custom_image@3x** + +Application launch screen image file (3x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_storyboard/image_scale_mode: + +.. rst-class:: classref-property + +:ref:`int` **storyboard/image_scale_mode** + +Launch screen image scaling mode. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_storyboard/use_custom_bg_color: + +.. rst-class:: classref-property + +:ref:`bool` **storyboard/use_custom_bg_color** + +If ``true``, :ref:`storyboard/custom_bg_color` is used as a launch screen background color, otherwise ``application/boot_splash/bg_color`` project setting is used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_storyboard/use_launch_screen_storyboard: + +.. rst-class:: classref-property + +:ref:`bool` **storyboard/use_launch_screen_storyboard** + +If ``true``, storyboard launch screen is used instead of launch screen images. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_user_data/accessible_from_files_app: + +.. rst-class:: classref-property + +:ref:`bool` **user_data/accessible_from_files_app** + +If ``true``, the app "Documents" folder can be accessed via "Files" app. See `LSSupportsOpeningDocumentsInPlace `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_user_data/accessible_from_itunes_sharing: + +.. rst-class:: classref-property + +:ref:`bool` **user_data/accessible_from_itunes_sharing** + +If ``true``, the app "Documents" folder can be accessed via iTunes file sharing. See `UIFileSharingEnabled `__. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_editorexportplatformlinuxbsd.rst b/classes/class_editorexportplatformlinuxbsd.rst new file mode 100644 index 00000000000..e83d1c26ac7 --- /dev/null +++ b/classes/class_editorexportplatformlinuxbsd.rst @@ -0,0 +1,292 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/platform/linuxbsd/doc_classes/EditorExportPlatformLinuxBSD.xml. + +.. _class_EditorExportPlatformLinuxBSD: + +EditorExportPlatformLinuxBSD +============================ + +**Inherits:** :ref:`EditorExportPlatformPC` **<** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` + +Exporter for Linux/BSD. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Exporting for Linux <../tutorials/export/exporting_for_linux>` + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`binary_format/architecture` | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`binary_format/embed_pck` | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`custom_template/debug` | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`custom_template/release` | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/export_console_script` | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/cleanup_script` | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`ssh_remote_deploy/enabled` | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/extra_args_scp` | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/extra_args_ssh` | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/host` | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/port` | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/run_script` | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`texture_format/bptc` | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`texture_format/etc` | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`texture_format/etc2` | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`texture_format/s3tc` | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_EditorExportPlatformLinuxBSD_property_binary_format/architecture: + +.. rst-class:: classref-property + +:ref:`String` **binary_format/architecture** + +Application executable architecture. + +Supported architectures: ``x86_32``, ``x86_64``, ``arm64``, ``arm32``, ``rv64``, ``ppc64``, and ``ppc32``. + +Official export templates include ``x86_32`` and ``x86_64`` binaries only. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformLinuxBSD_property_binary_format/embed_pck: + +.. rst-class:: classref-property + +:ref:`bool` **binary_format/embed_pck** + +If ``true``, project resources are embedded into the executable. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformLinuxBSD_property_custom_template/debug: + +.. rst-class:: classref-property + +:ref:`String` **custom_template/debug** + +Path to the custom export template. If left empty, default template is used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformLinuxBSD_property_custom_template/release: + +.. rst-class:: classref-property + +:ref:`String` **custom_template/release** + +Path to the custom export template. If left empty, default template is used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformLinuxBSD_property_debug/export_console_script: + +.. rst-class:: classref-property + +:ref:`int` **debug/export_console_script** + +If ``true``, a console wrapper script is exported alongside the main executable, which allows running the project with enabled console output. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformLinuxBSD_property_ssh_remote_deploy/cleanup_script: + +.. rst-class:: classref-property + +:ref:`String` **ssh_remote_deploy/cleanup_script** + +Script code to execute on the remote host when app is finished. + +The following variables can be used in the script: + +- ``{temp_dir}`` - Path of temporary folder on the remote, used to upload app and scripts to. + +- ``{archive_name}`` - Name of the ZIP containing uploaded application. + +- ``{exe_name}`` - Name of application executable. + +- ``{cmd_args}`` - Array of the command line argument for the application. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformLinuxBSD_property_ssh_remote_deploy/enabled: + +.. rst-class:: classref-property + +:ref:`bool` **ssh_remote_deploy/enabled** + +Enables remote deploy using SSH/SCP. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformLinuxBSD_property_ssh_remote_deploy/extra_args_scp: + +.. rst-class:: classref-property + +:ref:`String` **ssh_remote_deploy/extra_args_scp** + +Array of the additional command line arguments passed to the SCP. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformLinuxBSD_property_ssh_remote_deploy/extra_args_ssh: + +.. rst-class:: classref-property + +:ref:`String` **ssh_remote_deploy/extra_args_ssh** + +Array of the additional command line arguments passed to the SSH. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformLinuxBSD_property_ssh_remote_deploy/host: + +.. rst-class:: classref-property + +:ref:`String` **ssh_remote_deploy/host** + +Remote host SSH user name and address, in ``user@address`` format. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformLinuxBSD_property_ssh_remote_deploy/port: + +.. rst-class:: classref-property + +:ref:`String` **ssh_remote_deploy/port** + +Remote host SSH port number. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformLinuxBSD_property_ssh_remote_deploy/run_script: + +.. rst-class:: classref-property + +:ref:`String` **ssh_remote_deploy/run_script** + +Script code to execute on the remote host when running the app. + +The following variables can be used in the script: + +- ``{temp_dir}`` - Path of temporary folder on the remote, used to upload app and scripts to. + +- ``{archive_name}`` - Name of the ZIP containing uploaded application. + +- ``{exe_name}`` - Name of application executable. + +- ``{cmd_args}`` - Array of the command line argument for the application. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformLinuxBSD_property_texture_format/bptc: + +.. rst-class:: classref-property + +:ref:`bool` **texture_format/bptc** + +If ``true``, project textures are exported in the BPTC format. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformLinuxBSD_property_texture_format/etc: + +.. rst-class:: classref-property + +:ref:`bool` **texture_format/etc** + +If ``true``, project textures are exported in the ETC format. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformLinuxBSD_property_texture_format/etc2: + +.. rst-class:: classref-property + +:ref:`bool` **texture_format/etc2** + +If ``true``, project textures are exported in the ETC2 format. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformLinuxBSD_property_texture_format/s3tc: + +.. rst-class:: classref-property + +:ref:`bool` **texture_format/s3tc** + +If ``true``, project textures are exported in the S3TC format. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_editorexportplatformmacos.rst b/classes/class_editorexportplatformmacos.rst new file mode 100644 index 00000000000..05399fb5958 --- /dev/null +++ b/classes/class_editorexportplatformmacos.rst @@ -0,0 +1,1320 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/platform/macos/doc_classes/EditorExportPlatformMacOS.xml. + +.. _class_EditorExportPlatformMacOS: + +EditorExportPlatformMacOS +========================= + +**Inherits:** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` + +Exporter for macOS. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Exporting for macOS <../tutorials/export/exporting_for_macos>` + +- :doc:`Running Godot apps on macOS <../tutorials//export/running_on_macos>` + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/app_category` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/bundle_identifier` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/copyright` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`application/copyright_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/icon` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`application/icon_interpolation` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/min_macos_version` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/short_version` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/signature` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/version` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`binary_format/architecture` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`codesign/apple_team_id` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`codesign/certificate_file` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`codesign/certificate_password` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`codesign/codesign` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`codesign/custom_options` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/address_book` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/allow_dyld_environment_variables` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/allow_jit_code_execution` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/allow_unsigned_executable_memory` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/app_sandbox/device_bluetooth` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/app_sandbox/device_usb` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/app_sandbox/enabled` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`codesign/entitlements/app_sandbox/files_downloads` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`codesign/entitlements/app_sandbox/files_movies` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`codesign/entitlements/app_sandbox/files_music` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`codesign/entitlements/app_sandbox/files_pictures` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`codesign/entitlements/app_sandbox/helper_executables` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/app_sandbox/network_client` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/app_sandbox/network_server` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/apple_events` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/audio_input` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/calendars` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/camera` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`codesign/entitlements/custom_file` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/debugging` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/disable_library_validation` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/location` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/photos_library` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`codesign/identity` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`codesign/installer_identity` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`codesign/provisioning_profile` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`custom_template/debug` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`custom_template/release` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/export_console_script` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`display/high_res` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`export/distribution_type` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`notarization/api_key` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`notarization/api_key_id` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`notarization/api_uuid` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`notarization/apple_id_name` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`notarization/apple_id_password` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`notarization/notarization` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/address_book_usage_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/address_book_usage_description_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/calendar_usage_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/calendar_usage_description_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/camera_usage_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/camera_usage_description_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/desktop_folder_usage_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/desktop_folder_usage_description_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/documents_folder_usage_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/documents_folder_usage_description_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/downloads_folder_usage_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/downloads_folder_usage_description_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/location_usage_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/location_usage_description_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/microphone_usage_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/microphone_usage_description_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/network_volumes_usage_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/network_volumes_usage_description_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/photos_library_usage_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/photos_library_usage_description_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/removable_volumes_usage_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/removable_volumes_usage_description_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/cleanup_script` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`ssh_remote_deploy/enabled` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/extra_args_scp` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/extra_args_ssh` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/host` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/port` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/run_script` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`xcode/platform_build` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`xcode/sdk_build` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`xcode/sdk_name` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`xcode/sdk_version` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`xcode/xcode_build` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`xcode/xcode_version` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_EditorExportPlatformMacOS_property_application/app_category: + +.. rst-class:: classref-property + +:ref:`String` **application/app_category** + +Application category for the App Store. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_application/bundle_identifier: + +.. rst-class:: classref-property + +:ref:`String` **application/bundle_identifier** + +Unique application identifier in a reverse-DNS format, can only contain alphanumeric characters (``A-Z``, ``a-z``, and ``0-9``), hyphens (``-``), and periods (``.``). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_application/copyright: + +.. rst-class:: classref-property + +:ref:`String` **application/copyright** + +Copyright notice for the bundle visible to the user (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_application/copyright_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **application/copyright_localized** + +Copyright notice for the bundle visible to the user (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_application/icon: + +.. rst-class:: classref-property + +:ref:`String` **application/icon** + +Application icon file. If left empty, it will fallback to :ref:`ProjectSettings.application/config/macos_native_icon`, and then to :ref:`ProjectSettings.application/config/icon`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_application/icon_interpolation: + +.. rst-class:: classref-property + +:ref:`int` **application/icon_interpolation** + +Interpolation method used to resize application icon. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_application/min_macos_version: + +.. rst-class:: classref-property + +:ref:`String` **application/min_macos_version** + +Minimum version of macOS required for this application to run in the ``major.minor.patch`` or ``major.minor`` format, can only contain numeric characters (``0-9``) and periods (``.``). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_application/short_version: + +.. rst-class:: classref-property + +:ref:`String` **application/short_version** + +Application version visible to the user, can only contain numeric characters (``0-9``) and periods (``.``). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_application/signature: + +.. rst-class:: classref-property + +:ref:`String` **application/signature** + +A four-character creator code that is specific to the bundle. Optional. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_application/version: + +.. rst-class:: classref-property + +:ref:`String` **application/version** + +Machine-readable application version, in the ``major.minor.patch`` format, can only contain numeric characters (``0-9``) and periods (``.``). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_binary_format/architecture: + +.. rst-class:: classref-property + +:ref:`String` **binary_format/architecture** + +Application executable architecture. + +Supported architectures: ``x86_64``, ``arm64``, and ``universal`` (``x86_64 + arm64``). + +Official export templates include ``universal`` binaries only. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/apple_team_id: + +.. rst-class:: classref-property + +:ref:`String` **codesign/apple_team_id** + +Apple Team ID, unique 10-character string. To locate your Team ID check "Membership details" section in your Apple developer account dashboard, or "Organizational Unit" of your code signing certificate. See `Locate your Team ID `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/certificate_file: + +.. rst-class:: classref-property + +:ref:`String` **codesign/certificate_file** + +PKCS #12 certificate file used to sign ``.app`` bundle. + +Can be overridden with the environment variable ``GODOT_MACOS_CODESIGN_CERTIFICATE_FILE``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/certificate_password: + +.. rst-class:: classref-property + +:ref:`String` **codesign/certificate_password** + +Password for the certificate file used to sign ``.app`` bundle. + +Can be overridden with the environment variable ``GODOT_MACOS_CODESIGN_CERTIFICATE_PASSWORD``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/codesign: + +.. rst-class:: classref-property + +:ref:`int` **codesign/codesign** + +Tool to use for code signing. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/custom_options: + +.. rst-class:: classref-property + +:ref:`PackedStringArray` **codesign/custom_options** + +Array of the additional command line arguments passed to the code signing tool. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/address_book: + +.. rst-class:: classref-property + +:ref:`bool` **codesign/entitlements/address_book** + +Enable to allow access to contacts in the user's address book, if it's enabled you should also provide usage message in the ``privacy/address_book_usage_description`` option. See `com.apple.security.personal-information.addressbook `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/allow_dyld_environment_variables: + +.. rst-class:: classref-property + +:ref:`bool` **codesign/entitlements/allow_dyld_environment_variables** + +Allows app to use dynamic linker environment variables to inject code. If you are using add-ons with dynamic or self-modifying native code, enable them according to the add-on documentation. See `com.apple.security.cs.allow-dyld-environment-variables `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/allow_jit_code_execution: + +.. rst-class:: classref-property + +:ref:`bool` **codesign/entitlements/allow_jit_code_execution** + +Allows creating writable and executable memory for JIT code. If you are using add-ons with dynamic or self-modifying native code, enable them according to the add-on documentation. See `com.apple.security.cs.allow-jit `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/allow_unsigned_executable_memory: + +.. rst-class:: classref-property + +:ref:`bool` **codesign/entitlements/allow_unsigned_executable_memory** + +Allows creating writable and executable memory without JIT restrictions. If you are using add-ons with dynamic or self-modifying native code, enable them according to the add-on documentation. See `com.apple.security.cs.allow-unsigned-executable-memory `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/app_sandbox/device_bluetooth: + +.. rst-class:: classref-property + +:ref:`bool` **codesign/entitlements/app_sandbox/device_bluetooth** + +Enable to allow app to interact with Bluetooth devices. This entitlement is required to use wireless controllers. See `com.apple.security.device.bluetooth `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/app_sandbox/device_usb: + +.. rst-class:: classref-property + +:ref:`bool` **codesign/entitlements/app_sandbox/device_usb** + +Enable to allow app to interact with USB devices. This entitlement is required to use wired controllers. See `com.apple.security.device.usb `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/app_sandbox/enabled: + +.. rst-class:: classref-property + +:ref:`bool` **codesign/entitlements/app_sandbox/enabled** + +Enables App Sandbox. The App Sandbox restricts access to user data, networking, and devices. Sandboxed apps can't access most of the file system, can't use custom file dialogs and execute binaries outside the .app bundle. See `App Sandbox `__. + +\ **Note:** To distribute an app through the App Store, you must enable the App Sandbox. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/app_sandbox/files_downloads: + +.. rst-class:: classref-property + +:ref:`int` **codesign/entitlements/app_sandbox/files_downloads** + +Allows read or write access to the user's "Downloads" folder. See `com.apple.security.files.downloads.read-write `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/app_sandbox/files_movies: + +.. rst-class:: classref-property + +:ref:`int` **codesign/entitlements/app_sandbox/files_movies** + +Allows read or write access to the user's "Movies" folder. See `com.apple.security.files.movies.read-write `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/app_sandbox/files_music: + +.. rst-class:: classref-property + +:ref:`int` **codesign/entitlements/app_sandbox/files_music** + +Allows read or write access to the user's "Music" folder. See `com.apple.security.files.music.read-write `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/app_sandbox/files_pictures: + +.. rst-class:: classref-property + +:ref:`int` **codesign/entitlements/app_sandbox/files_pictures** + +Allows read or write access to the user's "Pictures" folder. See `com.apple.security.files.pictures.read-write `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/app_sandbox/helper_executables: + +.. rst-class:: classref-property + +:ref:`Array` **codesign/entitlements/app_sandbox/helper_executables** + +List of helper executables to embedded to the app bundle. Sandboxed app are limited to execute only these executable. See `Embedding a command-line tool in a sandboxed app `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/app_sandbox/network_client: + +.. rst-class:: classref-property + +:ref:`bool` **codesign/entitlements/app_sandbox/network_client** + +Enable to allow app to establish outgoing network connections. See `com.apple.security.network.client `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/app_sandbox/network_server: + +.. rst-class:: classref-property + +:ref:`bool` **codesign/entitlements/app_sandbox/network_server** + +Enable to allow app to listen for incoming network connections. See `com.apple.security.network.server `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/apple_events: + +.. rst-class:: classref-property + +:ref:`bool` **codesign/entitlements/apple_events** + +Enable to allow app to send Apple events to other apps. See `com.apple.security.automation.apple-events `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/audio_input: + +.. rst-class:: classref-property + +:ref:`bool` **codesign/entitlements/audio_input** + +Enable if you need to use the microphone or other audio input sources, if it's enabled you should also provide usage message in the ``privacy/microphone_usage_description`` option. See `com.apple.security.device.audio-input `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/calendars: + +.. rst-class:: classref-property + +:ref:`bool` **codesign/entitlements/calendars** + +Enable to allow access to the user's calendar, if it's enabled you should also provide usage message in the ``privacy/calendar_usage_description`` option. See `com.apple.security.personal-information.calendars `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/camera: + +.. rst-class:: classref-property + +:ref:`bool` **codesign/entitlements/camera** + +Enable if you need to use the camera, if it's enabled you should also provide usage message in the ``privacy/camera_usage_description`` option. See `com.apple.security.device.camera `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/custom_file: + +.. rst-class:: classref-property + +:ref:`String` **codesign/entitlements/custom_file** + +Custom entitlements ``.plist`` file, if specified the rest of entitlements in the export config are ignored. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/debugging: + +.. rst-class:: classref-property + +:ref:`bool` **codesign/entitlements/debugging** + +You can temporarily enable this entitlement to use native debugger (GDB, LLDB) with the exported app. This entitlement should be disabled for production export. See `Embedding a command-line tool in a sandboxed app `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/disable_library_validation: + +.. rst-class:: classref-property + +:ref:`bool` **codesign/entitlements/disable_library_validation** + +Allows app to load arbitrary libraries and frameworks (not signed with the same Team ID as the main executable or by Apple). Enable it if you are using GDExtension add-ons or ad-hoc signing, or want to support user-provided external add-ons. See `com.apple.security.cs.disable-library-validation `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/location: + +.. rst-class:: classref-property + +:ref:`bool` **codesign/entitlements/location** + +Enable if you need to use location information from Location Services, if it's enabled you should also provide usage message in the ``privacy/location_usage_description`` option. See `com.apple.security.personal-information.location `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/photos_library: + +.. rst-class:: classref-property + +:ref:`bool` **codesign/entitlements/photos_library** + +Enable to allow access to the user's Photos library, if it's enabled you should also provide usage message in the ``privacy/photos_library_usage_description`` option. See `com.apple.security.personal-information.photos-library `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/identity: + +.. rst-class:: classref-property + +:ref:`String` **codesign/identity** + +The "Full Name", "Common Name" or SHA-1 hash of the signing identity used to sign ``.app`` bundle. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/installer_identity: + +.. rst-class:: classref-property + +:ref:`String` **codesign/installer_identity** + +The "Full Name", "Common Name" or SHA-1 hash of the signing identity used to sign ``.pkg`` installer package for App Store distribution, use ``3rd Party Mac Developer Installer: Name.`` identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_codesign/provisioning_profile: + +.. rst-class:: classref-property + +:ref:`String` **codesign/provisioning_profile** + +Provisioning profile file downloaded from Apple developer account dashboard. See `Edit, download, or delete provisioning profiles `__. + +Can be overridden with the environment variable ``GODOT_MACOS_CODESIGN_PROVISIONING_PROFILE``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_custom_template/debug: + +.. rst-class:: classref-property + +:ref:`String` **custom_template/debug** + +Path to the custom export template. If left empty, default template is used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_custom_template/release: + +.. rst-class:: classref-property + +:ref:`String` **custom_template/release** + +Path to the custom export template. If left empty, default template is used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_debug/export_console_script: + +.. rst-class:: classref-property + +:ref:`int` **debug/export_console_script** + +If enabled, a script file that can be used to run the application with console output is created alongside the exported application. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_display/high_res: + +.. rst-class:: classref-property + +:ref:`bool` **display/high_res** + +If ``true``, the application is rendered at native display resolution, otherwise it is always rendered at loHPI resolution and upscaled by OS when required. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_export/distribution_type: + +.. rst-class:: classref-property + +:ref:`int` **export/distribution_type** + +Application distribution target. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_notarization/api_key: + +.. rst-class:: classref-property + +:ref:`String` **notarization/api_key** + +Apple App Store Connect API issuer key file. + +Can be overridden with the environment variable ``GODOT_MACOS_NOTARIZATION_API_KEY``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_notarization/api_key_id: + +.. rst-class:: classref-property + +:ref:`String` **notarization/api_key_id** + +Apple App Store Connect API issuer key ID. + +Can be overridden with the environment variable ``GODOT_MACOS_NOTARIZATION_API_KEY_ID``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_notarization/api_uuid: + +.. rst-class:: classref-property + +:ref:`String` **notarization/api_uuid** + +Apple App Store Connect API issuer UUID. + +Can be overridden with the environment variable ``GODOT_MACOS_NOTARIZATION_API_UUID``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_notarization/apple_id_name: + +.. rst-class:: classref-property + +:ref:`String` **notarization/apple_id_name** + +Apple ID account name (email address). + +Can be overridden with the environment variable ``GODOT_MACOS_NOTARIZATION_APPLE_ID_NAME``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_notarization/apple_id_password: + +.. rst-class:: classref-property + +:ref:`String` **notarization/apple_id_password** + +Apple ID app-specific password. + +Can be overridden with the environment variable ``GODOT_MACOS_NOTARIZATION_APPLE_ID_PASSWORD``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_notarization/notarization: + +.. rst-class:: classref-property + +:ref:`int` **notarization/notarization** + +Tool to use for notarization. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/address_book_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/address_book_usage_description** + +A message displayed when requesting access to the user's contacts (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/address_book_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/address_book_usage_description_localized** + +A message displayed when requesting access to the user's contacts (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/calendar_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/calendar_usage_description** + +A message displayed when requesting access to the user's calendar data (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/calendar_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/calendar_usage_description_localized** + +A message displayed when requesting access to the user's calendar data (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/camera_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/camera_usage_description** + +A message displayed when requesting access to the device's camera (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/camera_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/camera_usage_description_localized** + +A message displayed when requesting access to the device's camera (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/desktop_folder_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/desktop_folder_usage_description** + +A message displayed when requesting access to the user's "Desktop" folder (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/desktop_folder_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/desktop_folder_usage_description_localized** + +A message displayed when requesting access to the user's "Desktop" folder (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/documents_folder_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/documents_folder_usage_description** + +A message displayed when requesting access to the user's "Documents" folder (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/documents_folder_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/documents_folder_usage_description_localized** + +A message displayed when requesting access to the user's "Documents" folder (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/downloads_folder_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/downloads_folder_usage_description** + +A message displayed when requesting access to the user's "Downloads" folder (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/downloads_folder_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/downloads_folder_usage_description_localized** + +A message displayed when requesting access to the user's "Downloads" folder (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/location_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/location_usage_description** + +A message displayed when requesting access to the user's location information (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/location_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/location_usage_description_localized** + +A message displayed when requesting access to the user's location information (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/microphone_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/microphone_usage_description** + +A message displayed when requesting access to the device's microphone (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/microphone_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/microphone_usage_description_localized** + +A message displayed when requesting access to the device's microphone (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/network_volumes_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/network_volumes_usage_description** + +A message displayed when requesting access to the user's network drives (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/network_volumes_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/network_volumes_usage_description_localized** + +A message displayed when requesting access to the user's network drives (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/photos_library_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/photos_library_usage_description** + +A message displayed when requesting access to the user's photo library (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/photos_library_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/photos_library_usage_description_localized** + +A message displayed when requesting access to the user's photo library (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/removable_volumes_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/removable_volumes_usage_description** + +A message displayed when requesting access to the user's removable drives (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/removable_volumes_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/removable_volumes_usage_description_localized** + +A message displayed when requesting access to the user's removable drives (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_ssh_remote_deploy/cleanup_script: + +.. rst-class:: classref-property + +:ref:`String` **ssh_remote_deploy/cleanup_script** + +Script code to execute on the remote host when app is finished. + +The following variables can be used in the script: + +- ``{temp_dir}`` - Path of temporary folder on the remote, used to upload app and scripts to. + +- ``{archive_name}`` - Name of the ZIP containing uploaded application. + +- ``{exe_name}`` - Name of application executable. + +- ``{cmd_args}`` - Array of the command line argument for the application. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_ssh_remote_deploy/enabled: + +.. rst-class:: classref-property + +:ref:`bool` **ssh_remote_deploy/enabled** + +Enables remote deploy using SSH/SCP. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_ssh_remote_deploy/extra_args_scp: + +.. rst-class:: classref-property + +:ref:`String` **ssh_remote_deploy/extra_args_scp** + +Array of the additional command line arguments passed to the SCP. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_ssh_remote_deploy/extra_args_ssh: + +.. rst-class:: classref-property + +:ref:`String` **ssh_remote_deploy/extra_args_ssh** + +Array of the additional command line arguments passed to the SSH. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_ssh_remote_deploy/host: + +.. rst-class:: classref-property + +:ref:`String` **ssh_remote_deploy/host** + +Remote host SSH user name and address, in ``user@address`` format. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_ssh_remote_deploy/port: + +.. rst-class:: classref-property + +:ref:`String` **ssh_remote_deploy/port** + +Remote host SSH port number. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_ssh_remote_deploy/run_script: + +.. rst-class:: classref-property + +:ref:`String` **ssh_remote_deploy/run_script** + +Script code to execute on the remote host when running the app. + +The following variables can be used in the script: + +- ``{temp_dir}`` - Path of temporary folder on the remote, used to upload app and scripts to. + +- ``{archive_name}`` - Name of the ZIP containing uploaded application. + +- ``{exe_name}`` - Name of application executable. + +- ``{cmd_args}`` - Array of the command line argument for the application. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_xcode/platform_build: + +.. rst-class:: classref-property + +:ref:`String` **xcode/platform_build** + +macOS build number used to build application executable. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_xcode/sdk_build: + +.. rst-class:: classref-property + +:ref:`String` **xcode/sdk_build** + +macOS SDK build number used to build application executable. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_xcode/sdk_name: + +.. rst-class:: classref-property + +:ref:`String` **xcode/sdk_name** + +macOS SDK name used to build application executable. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_xcode/sdk_version: + +.. rst-class:: classref-property + +:ref:`String` **xcode/sdk_version** + +macOS SDK version used to build application executable in the ``major.minor`` format. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_xcode/xcode_build: + +.. rst-class:: classref-property + +:ref:`String` **xcode/xcode_build** + +Xcode build number used to build application executable. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_xcode/xcode_version: + +.. rst-class:: classref-property + +:ref:`String` **xcode/xcode_version** + +Xcode version used to build application executable. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_animationtrackeditplugin.rst b/classes/class_editorexportplatformpc.rst similarity index 66% rename from classes/class_animationtrackeditplugin.rst rename to classes/class_editorexportplatformpc.rst index 591ceec66e3..1e5bbfb0ec0 100644 --- a/classes/class_animationtrackeditplugin.rst +++ b/classes/class_editorexportplatformpc.rst @@ -3,18 +3,18 @@ .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. -.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AnimationTrackEditPlugin.xml. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/EditorExportPlatformPC.xml. -.. _class_AnimationTrackEditPlugin: +.. _class_EditorExportPlatformPC: -AnimationTrackEditPlugin -======================== +EditorExportPlatformPC +====================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**Inherits:** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +**Inherited By:** :ref:`EditorExportPlatformLinuxBSD`, :ref:`EditorExportPlatformWindows` - There is currently no description for this class. Please help us by :ref:`contributing one `! +Base class for the desktop platform exporter (Windows and Linux/BSD). .. |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_editorexportplatformweb.rst b/classes/class_editorexportplatformweb.rst new file mode 100644 index 00000000000..a9833091c66 --- /dev/null +++ b/classes/class_editorexportplatformweb.rst @@ -0,0 +1,342 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/platform/web/doc_classes/EditorExportPlatformWeb.xml. + +.. _class_EditorExportPlatformWeb: + +EditorExportPlatformWeb +======================= + +**Inherits:** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` + +Exporter for the Web. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Exporting for the Web <../tutorials/export/exporting_for_web>` + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`custom_template/debug` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`custom_template/release` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`html/canvas_resize_policy` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`html/custom_html_shell` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`html/experimental_virtual_keyboard` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`html/export_icon` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`html/focus_canvas_on_start` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`html/head_include` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`progressive_web_app/background_color` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`progressive_web_app/display` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`progressive_web_app/enabled` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`progressive_web_app/icon_144x144` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`progressive_web_app/icon_180x180` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`progressive_web_app/icon_512x512` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`progressive_web_app/offline_page` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`progressive_web_app/orientation` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`variant/extensions_support` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`vram_texture_compression/for_desktop` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`vram_texture_compression/for_mobile` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_EditorExportPlatformWeb_property_custom_template/debug: + +.. rst-class:: classref-property + +:ref:`String` **custom_template/debug** + +Path to the custom export template. If left empty, default template is used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWeb_property_custom_template/release: + +.. rst-class:: classref-property + +:ref:`String` **custom_template/release** + +Path to the custom export template. If left empty, default template is used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWeb_property_html/canvas_resize_policy: + +.. rst-class:: classref-property + +:ref:`int` **html/canvas_resize_policy** + +The canvas resize policy determines how the canvas should be resized by Godot. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWeb_property_html/custom_html_shell: + +.. rst-class:: classref-property + +:ref:`String` **html/custom_html_shell** + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWeb_property_html/experimental_virtual_keyboard: + +.. rst-class:: classref-property + +:ref:`bool` **html/experimental_virtual_keyboard** + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWeb_property_html/export_icon: + +.. rst-class:: classref-property + +:ref:`bool` **html/export_icon** + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWeb_property_html/focus_canvas_on_start: + +.. rst-class:: classref-property + +:ref:`bool` **html/focus_canvas_on_start** + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWeb_property_html/head_include: + +.. rst-class:: classref-property + +:ref:`String` **html/head_include** + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWeb_property_progressive_web_app/background_color: + +.. rst-class:: classref-property + +:ref:`Color` **progressive_web_app/background_color** + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWeb_property_progressive_web_app/display: + +.. rst-class:: classref-property + +:ref:`int` **progressive_web_app/display** + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWeb_property_progressive_web_app/enabled: + +.. rst-class:: classref-property + +:ref:`bool` **progressive_web_app/enabled** + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWeb_property_progressive_web_app/icon_144x144: + +.. rst-class:: classref-property + +:ref:`String` **progressive_web_app/icon_144x144** + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWeb_property_progressive_web_app/icon_180x180: + +.. rst-class:: classref-property + +:ref:`String` **progressive_web_app/icon_180x180** + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWeb_property_progressive_web_app/icon_512x512: + +.. rst-class:: classref-property + +:ref:`String` **progressive_web_app/icon_512x512** + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWeb_property_progressive_web_app/offline_page: + +.. rst-class:: classref-property + +:ref:`String` **progressive_web_app/offline_page** + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWeb_property_progressive_web_app/orientation: + +.. rst-class:: classref-property + +:ref:`int` **progressive_web_app/orientation** + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWeb_property_variant/extensions_support: + +.. rst-class:: classref-property + +:ref:`bool` **variant/extensions_support** + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWeb_property_vram_texture_compression/for_desktop: + +.. rst-class:: classref-property + +:ref:`bool` **vram_texture_compression/for_desktop** + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWeb_property_vram_texture_compression/for_mobile: + +.. rst-class:: classref-property + +:ref:`bool` **vram_texture_compression/for_mobile** + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_editorexportplatformwindows.rst b/classes/class_editorexportplatformwindows.rst new file mode 100644 index 00000000000..85972493f45 --- /dev/null +++ b/classes/class_editorexportplatformwindows.rst @@ -0,0 +1,578 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/platform/windows/doc_classes/EditorExportPlatformWindows.xml. + +.. _class_EditorExportPlatformWindows: + +EditorExportPlatformWindows +=========================== + +**Inherits:** :ref:`EditorExportPlatformPC` **<** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` + +Exporter for Windows. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Exporting for Windows <../tutorials/export/exporting_for_windows>` + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/company_name` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/console_wrapper_icon` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/copyright` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/file_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/file_version` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/icon` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`application/icon_interpolation` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/modify_resources` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/product_name` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/product_version` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/trademarks` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`binary_format/architecture` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`binary_format/embed_pck` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`codesign/custom_options` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`codesign/description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`codesign/digest_algorithm` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/enable` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`codesign/identity` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`codesign/identity_type` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`codesign/password` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/timestamp` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`codesign/timestamp_server_url` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`custom_template/debug` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`custom_template/release` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/export_console_script` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/cleanup_script` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`ssh_remote_deploy/enabled` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/extra_args_scp` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/extra_args_ssh` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/host` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/port` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/run_script` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`texture_format/bptc` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`texture_format/etc` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`texture_format/etc2` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`texture_format/s3tc` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_EditorExportPlatformWindows_property_application/company_name: + +.. rst-class:: classref-property + +:ref:`String` **application/company_name** + +Company that produced the application. Required. See `StringFileInfo `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_application/console_wrapper_icon: + +.. rst-class:: classref-property + +:ref:`String` **application/console_wrapper_icon** + +Console wrapper icon file. If left empty, it will fallback to :ref:`application/icon`, then to :ref:`ProjectSettings.application/config/windows_native_icon`, and lastly, :ref:`ProjectSettings.application/config/icon`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_application/copyright: + +.. rst-class:: classref-property + +:ref:`String` **application/copyright** + +Copyright notice for the bundle visible to the user. Optional. See `StringFileInfo `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_application/file_description: + +.. rst-class:: classref-property + +:ref:`String` **application/file_description** + +File description to be presented to users. Required. See `StringFileInfo `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_application/file_version: + +.. rst-class:: classref-property + +:ref:`String` **application/file_version** + +Version number of the file. Required. See `StringFileInfo `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_application/icon: + +.. rst-class:: classref-property + +:ref:`String` **application/icon** + +Application icon file. If left empty, it will fallback to :ref:`ProjectSettings.application/config/windows_native_icon`, and then to :ref:`ProjectSettings.application/config/icon`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_application/icon_interpolation: + +.. rst-class:: classref-property + +:ref:`int` **application/icon_interpolation** + +Interpolation method used to resize application icon. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_application/modify_resources: + +.. rst-class:: classref-property + +:ref:`bool` **application/modify_resources** + +If enabled, icon and metadata of the exported executable is set according to the other ``application/*`` values. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_application/product_name: + +.. rst-class:: classref-property + +:ref:`String` **application/product_name** + +Name of the application. Required. See `StringFileInfo `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_application/product_version: + +.. rst-class:: classref-property + +:ref:`String` **application/product_version** + +Application version visible to the user. Required. See `StringFileInfo `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_application/trademarks: + +.. rst-class:: classref-property + +:ref:`String` **application/trademarks** + +Trademarks and registered trademarks that apply to the file. Optional. See `StringFileInfo `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_binary_format/architecture: + +.. rst-class:: classref-property + +:ref:`String` **binary_format/architecture** + +Application executable architecture. + +Supported architectures: ``x86_32``, ``x86_64``, and ``arm64``. + +Official export templates include ``x86_32`` and ``x86_64`` binaries only. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_binary_format/embed_pck: + +.. rst-class:: classref-property + +:ref:`bool` **binary_format/embed_pck** + +If ``true``, project resources are embedded into the executable. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_codesign/custom_options: + +.. rst-class:: classref-property + +:ref:`PackedStringArray` **codesign/custom_options** + +Array of the additional command line arguments passed to the code signing tool. See `Sign Tool `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_codesign/description: + +.. rst-class:: classref-property + +:ref:`String` **codesign/description** + +Description of the signed content. See `Sign Tool `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_codesign/digest_algorithm: + +.. rst-class:: classref-property + +:ref:`int` **codesign/digest_algorithm** + +Digest algorithm to use for creating signature. See `Sign Tool `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_codesign/enable: + +.. rst-class:: classref-property + +:ref:`bool` **codesign/enable** + +If ``true``, executable signing is enabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_codesign/identity: + +.. rst-class:: classref-property + +:ref:`String` **codesign/identity** + +PKCS #12 certificate file used to sign executable or certificate SHA-1 hash (if :ref:`codesign/identity_type` is set to "Use certificate store"). See `Sign Tool `__. + +Can be overridden with the environment variable ``GODOT_WINDOWS_CODESIGN_IDENTITY``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_codesign/identity_type: + +.. rst-class:: classref-property + +:ref:`int` **codesign/identity_type** + +Type of identity to use. See `Sign Tool `__. + +Can be overridden with the environment variable ``GODOT_WINDOWS_CODESIGN_IDENTITY_TYPE``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_codesign/password: + +.. rst-class:: classref-property + +:ref:`String` **codesign/password** + +Password for the certificate file used to sign executable. See `Sign Tool `__. + +Can be overridden with the environment variable ``GODOT_WINDOWS_CODESIGN_PASSWORD``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_codesign/timestamp: + +.. rst-class:: classref-property + +:ref:`bool` **codesign/timestamp** + +If ``true``, time-stamp is added to the signature. See `Sign Tool `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_codesign/timestamp_server_url: + +.. rst-class:: classref-property + +:ref:`String` **codesign/timestamp_server_url** + +URL of the time stamp server. If left empty, the default server is used. See `Sign Tool `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_custom_template/debug: + +.. rst-class:: classref-property + +:ref:`String` **custom_template/debug** + +Path to the custom export template. If left empty, default template is used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_custom_template/release: + +.. rst-class:: classref-property + +:ref:`String` **custom_template/release** + +Path to the custom export template. If left empty, default template is used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_debug/export_console_script: + +.. rst-class:: classref-property + +:ref:`int` **debug/export_console_script** + +If ``true``, a console wrapper executable is exported alongside the main executable, which allows running the project with enabled console output. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_ssh_remote_deploy/cleanup_script: + +.. rst-class:: classref-property + +:ref:`String` **ssh_remote_deploy/cleanup_script** + +Script code to execute on the remote host when app is finished. + +The following variables can be used in the script: + +- ``{temp_dir}`` - Path of temporary folder on the remote, used to upload app and scripts to. + +- ``{archive_name}`` - Name of the ZIP containing uploaded application. + +- ``{exe_name}`` - Name of application executable. + +- ``{cmd_args}`` - Array of the command line argument for the application. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_ssh_remote_deploy/enabled: + +.. rst-class:: classref-property + +:ref:`bool` **ssh_remote_deploy/enabled** + +Enables remote deploy using SSH/SCP. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_ssh_remote_deploy/extra_args_scp: + +.. rst-class:: classref-property + +:ref:`String` **ssh_remote_deploy/extra_args_scp** + +Array of the additional command line arguments passed to the SCP. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_ssh_remote_deploy/extra_args_ssh: + +.. rst-class:: classref-property + +:ref:`String` **ssh_remote_deploy/extra_args_ssh** + +Array of the additional command line arguments passed to the SSH. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_ssh_remote_deploy/host: + +.. rst-class:: classref-property + +:ref:`String` **ssh_remote_deploy/host** + +Remote host SSH user name and address, in ``user@address`` format. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_ssh_remote_deploy/port: + +.. rst-class:: classref-property + +:ref:`String` **ssh_remote_deploy/port** + +Remote host SSH port number. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_ssh_remote_deploy/run_script: + +.. rst-class:: classref-property + +:ref:`String` **ssh_remote_deploy/run_script** + +Script code to execute on the remote host when running the app. + +The following variables can be used in the script: + +- ``{temp_dir}`` - Path of temporary folder on the remote, used to upload app and scripts to. + +- ``{archive_name}`` - Name of the ZIP containing uploaded application. + +- ``{exe_name}`` - Name of application executable. + +- ``{cmd_args}`` - Array of the command line argument for the application. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_texture_format/bptc: + +.. rst-class:: classref-property + +:ref:`bool` **texture_format/bptc** + +If ``true``, project textures are exported in the BPTC format. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_texture_format/etc: + +.. rst-class:: classref-property + +:ref:`bool` **texture_format/etc** + +If ``true``, project textures are exported in the ETC format. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_texture_format/etc2: + +.. rst-class:: classref-property + +:ref:`bool` **texture_format/etc2** + +If ``true``, project textures are exported in the ETC2 format. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_texture_format/s3tc: + +.. rst-class:: classref-property + +:ref:`bool` **texture_format/s3tc** + +If ``true``, project textures are exported in the S3TC format. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_editorexportplugin.rst b/classes/class_editorexportplugin.rst index 8cdf4241c0e..dee7f58d46f 100644 --- a/classes/class_editorexportplugin.rst +++ b/classes/class_editorexportplugin.rst @@ -54,8 +54,12 @@ Methods +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`_get_export_features` **(** :ref:`EditorExportPlatform` platform, :ref:`bool` debug **)** |virtual| |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_export_options` **(** :ref:`EditorExportPlatform` platform **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_should_update_export_options` **(** :ref:`EditorExportPlatform` platform **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_file` **(** :ref:`String` path, :ref:`PackedByteArray` file, :ref:`bool` remap **)** | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_ios_bundle_file` **(** :ref:`String` path **)** | @@ -76,6 +80,8 @@ Methods +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_shared_object` **(** :ref:`String` path, :ref:`PackedStringArray` tags, :ref:`String` target **)** | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_option` **(** :ref:`StringName` name **)** |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`skip` **(** **)** | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -232,6 +238,26 @@ Return a :ref:`PackedStringArray` of additional feature ---- +.. _class_EditorExportPlugin_method__get_export_options: + +.. rst-class:: classref-method + +:ref:`Dictionary[]` **_get_export_options** **(** :ref:`EditorExportPlatform` platform **)** |virtual| |const| + +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. + +- ``default_value``: The default value for this option. + +- ``update_visibility``: An optional boolean value. If set to ``true``, the preset will emit :ref:`Object.property_list_changed` when the option is changed. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlugin_method__get_name: .. rst-class:: classref-method @@ -246,6 +272,18 @@ Implementing this method is required. ---- +.. _class_EditorExportPlugin_method__should_update_export_options: + +.. rst-class:: classref-method + +:ref:`bool` **_should_update_export_options** **(** :ref:`EditorExportPlatform` platform **)** |virtual| |const| + +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 + +---- + .. _class_EditorExportPlugin_method_add_file: .. rst-class:: classref-method @@ -376,6 +414,18 @@ In case of a directory code-sign will error if you place non code object in dire ---- +.. _class_EditorExportPlugin_method_get_option: + +.. rst-class:: classref-method + +:ref:`Variant` **get_option** **(** :ref:`StringName` name **)** |const| + +Returns the current value of an export option supplied by :ref:`_get_export_options`. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlugin_method_skip: .. rst-class:: classref-method diff --git a/classes/class_editorfiledialog.rst b/classes/class_editorfiledialog.rst index cfbc942f81f..34cecd55025 100644 --- a/classes/class_editorfiledialog.rst +++ b/classes/class_editorfiledialog.rst @@ -19,7 +19,7 @@ A modified version of :ref:`FileDialog` used by the editor. Description ----------- -**EditorFileDialog** is an enhanced version of :ref:`FileDialog` available only to editor plugins. Additional features include list of favorited/recent files and ability to see files as thumbnails grid instead of list. +**EditorFileDialog** is an enhanced version of :ref:`FileDialog` available only to editor plugins. Additional features include list of favorited/recent files and the ability to see files as thumbnails grid instead of list. .. rst-class:: classref-reftable-group @@ -351,7 +351,7 @@ The view format in which the **EditorFileDialog** displays resources to the user - void **set_file_mode** **(** :ref:`FileMode` value **)** - :ref:`FileMode` **get_file_mode** **(** **)** -The dialog's open or save mode, which affects the selection behavior. See :ref:`FileMode` +The dialog's open or save mode, which affects the selection behavior. See :ref:`FileMode`. .. rst-class:: classref-item-separator diff --git a/classes/class_editorimportplugin.rst b/classes/class_editorimportplugin.rst index babd4362e32..4dbc9ade898 100644 --- a/classes/class_editorimportplugin.rst +++ b/classes/class_editorimportplugin.rst @@ -115,7 +115,7 @@ Below is an example EditorImportPlugin that imports a :ref:`Mesh` fr new Godot.Collections.Dictionary { { "name", "myOption" }, - { "defaultValue", false }, + { "default_value", false }, } }; } @@ -249,12 +249,12 @@ This method can be overridden to hide specific import options if conditions are .. code-tab:: csharp - public void GetOptionVisibility(string option, Godot.Collections.Dictionary options) + public void _GetOptionVisibility(string option, Godot.Collections.Dictionary options) { // Only show the lossy quality setting if the compression mode is set to "Lossy". - if (option == "compress/lossyQuality" && options.Contains("compress/mode")) + if (option == "compress/lossy_quality" && options.ContainsKey("compress/mode")) { - return (int)options["compress/mode"] == COMPRESS_LOSSY; // This is a constant you set + return (int)options["compress/mode"] == CompressLossy; // This is a constant you set } return true; diff --git a/classes/class_editorinterface.rst b/classes/class_editorinterface.rst index 60cef634d96..0a68c6d0843 100644 --- a/classes/class_editorinterface.rst +++ b/classes/class_editorinterface.rst @@ -10,7 +10,7 @@ EditorInterface =============== -**Inherits:** :ref:`Node` **<** :ref:`Object` +**Inherits:** :ref:`Object` Godot editor's interface. @@ -19,7 +19,7 @@ Godot editor's interface. Description ----------- -EditorInterface gives you control over Godot editor's window. It allows customizing the window, saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects, and provides access to :ref:`EditorSettings`, :ref:`EditorFileSystem`, :ref:`EditorResourcePreview`, :ref:`ScriptEditor`, the editor viewport, and information about scenes. +**EditorInterface** gives you control over Godot editor's window. It allows customizing the window, saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects, and provides access to :ref:`EditorSettings`, :ref:`EditorFileSystem`, :ref:`EditorResourcePreview`, :ref:`ScriptEditor`, the editor viewport, and information about scenes. \ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorPlugin.get_editor_interface`. @@ -34,6 +34,8 @@ Properties +-------------------------+------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`distraction_free_mode` | +-------------------------+------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`movie_maker_enabled` | + +-------------------------+------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -43,85 +45,89 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`edit_node` **(** :ref:`Node` node **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`edit_resource` **(** :ref:`Resource` resource **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`edit_script` **(** :ref:`Script` script, :ref:`int` line=-1, :ref:`int` column=0, :ref:`bool` grab_focus=true **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Control` | :ref:`get_base_control` **(** **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorCommandPalette` | :ref:`get_command_palette` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_current_directory` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_current_path` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node` | :ref:`get_edited_scene_root` **(** **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`VBoxContainer` | :ref:`get_editor_main_screen` **(** **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorPaths` | :ref:`get_editor_paths` **(** **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_editor_scale` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorSettings` | :ref:`get_editor_settings` **(** **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`FileSystemDock` | :ref:`get_file_system_dock` **(** **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorInspector` | :ref:`get_inspector` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_open_scenes` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_playing_scene` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorFileSystem` | :ref:`get_resource_filesystem` **(** **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorResourcePreview` | :ref:`get_resource_previewer` **(** **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ScriptEditor` | :ref:`get_script_editor` **(** **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_selected_paths` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorSelection` | :ref:`get_selection` **(** **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`inspect_object` **(** :ref:`Object` object, :ref:`String` for_property="", :ref:`bool` inspector_only=false **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_movie_maker_enabled` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_playing_scene` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_plugin_enabled` **(** :ref:`String` plugin **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D[]` | :ref:`make_mesh_previews` **(** :ref:`Mesh[]` meshes, :ref:`int` preview_size **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`open_scene_from_path` **(** :ref:`String` scene_filepath **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`play_current_scene` **(** **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`play_custom_scene` **(** :ref:`String` scene_filepath **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`play_main_scene` **(** **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reload_scene_from_path` **(** :ref:`String` scene_filepath **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`restart_editor` **(** :ref:`bool` save=true **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`save_scene` **(** **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`save_scene_as` **(** :ref:`String` path, :ref:`bool` with_preview=true **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`select_file` **(** :ref:`String` file **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_main_screen_editor` **(** :ref:`String` name **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_movie_maker_enabled` **(** :ref:`bool` enabled **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_plugin_enabled` **(** :ref:`String` plugin, :ref:`bool` enabled **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`stop_playing_scene` **(** **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`edit_node` **(** :ref:`Node` node **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`edit_resource` **(** :ref:`Resource` resource **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`edit_script` **(** :ref:`Script` script, :ref:`int` line=-1, :ref:`int` column=0, :ref:`bool` grab_focus=true **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control` | :ref:`get_base_control` **(** **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorCommandPalette` | :ref:`get_command_palette` **(** **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_current_directory` **(** **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_current_path` **(** **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`get_edited_scene_root` **(** **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VBoxContainer` | :ref:`get_editor_main_screen` **(** **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorPaths` | :ref:`get_editor_paths` **(** **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_editor_scale` **(** **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorSettings` | :ref:`get_editor_settings` **(** **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FileSystemDock` | :ref:`get_file_system_dock` **(** **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorInspector` | :ref:`get_inspector` **(** **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_open_scenes` **(** **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_playing_scene` **(** **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorFileSystem` | :ref:`get_resource_filesystem` **(** **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorResourcePreview` | :ref:`get_resource_previewer` **(** **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ScriptEditor` | :ref:`get_script_editor` **(** **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_selected_paths` **(** **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorSelection` | :ref:`get_selection` **(** **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`inspect_object` **(** :ref:`Object` object, :ref:`String` for_property="", :ref:`bool` inspector_only=false **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_playing_scene` **(** **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_plugin_enabled` **(** :ref:`String` plugin **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D[]` | :ref:`make_mesh_previews` **(** :ref:`Mesh[]` meshes, :ref:`int` preview_size **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`open_scene_from_path` **(** :ref:`String` scene_filepath **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`play_current_scene` **(** **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`play_custom_scene` **(** :ref:`String` scene_filepath **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`play_main_scene` **(** **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_dialog` **(** :ref:`Window` dialog, :ref:`Rect2i` rect=Rect2i(0, 0, 0, 0) **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_dialog_centered` **(** :ref:`Window` dialog, :ref:`Vector2i` minsize=Vector2i(0, 0) **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_dialog_centered_clamped` **(** :ref:`Window` dialog, :ref:`Vector2i` minsize=Vector2i(0, 0), :ref:`float` fallback_ratio=0.75 **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_dialog_centered_ratio` **(** :ref:`Window` dialog, :ref:`float` ratio=0.8 **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reload_scene_from_path` **(** :ref:`String` scene_filepath **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`restart_editor` **(** :ref:`bool` save=true **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save_scene` **(** **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`save_scene_as` **(** :ref:`String` path, :ref:`bool` with_preview=true **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`select_file` **(** :ref:`String` file **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_main_screen_editor` **(** :ref:`String` name **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_plugin_enabled` **(** :ref:`String` plugin, :ref:`bool` enabled **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`stop_playing_scene` **(** **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -145,6 +151,23 @@ Property Descriptions If ``true``, enables distraction-free mode which hides side docks to increase the space available for the main view. +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorInterface_property_movie_maker_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **movie_maker_enabled** + +.. rst-class:: classref-property-setget + +- void **set_movie_maker_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_movie_maker_enabled** **(** **)** + +If ``true``, the Movie Maker mode is enabled in the editor. See :ref:`MovieWriter` for more information. + .. rst-class:: classref-section-separator ---- @@ -194,7 +217,7 @@ Edits the given :ref:`Script`. The line and column on which to ope .. rst-class:: classref-method -:ref:`Control` **get_base_control** **(** **)** +:ref:`Control` **get_base_control** **(** **)** |const| Returns the main container of Godot editor's window. For example, you can use it to retrieve the size of the container and place your controls accordingly. @@ -246,7 +269,7 @@ Returns the current path being viewed in the :ref:`FileSystemDock` **get_edited_scene_root** **(** **)** +:ref:`Node` **get_edited_scene_root** **(** **)** |const| Returns the edited (current) scene's root :ref:`Node`. @@ -258,7 +281,7 @@ Returns the edited (current) scene's root :ref:`Node`. .. rst-class:: classref-method -:ref:`VBoxContainer` **get_editor_main_screen** **(** **)** +:ref:`VBoxContainer` **get_editor_main_screen** **(** **)** |const| Returns the editor control responsible for main screen plugins and tools. Use it with plugins that implement :ref:`EditorPlugin._has_main_screen`. @@ -272,7 +295,7 @@ Returns the editor control responsible for main screen plugins and tools. Use it .. rst-class:: classref-method -:ref:`EditorPaths` **get_editor_paths** **(** **)** +:ref:`EditorPaths` **get_editor_paths** **(** **)** |const| Returns the :ref:`EditorPaths` singleton. @@ -298,7 +321,7 @@ Returns the actual scale of the editor UI (``1.0`` being 100% scale). This can b .. rst-class:: classref-method -:ref:`EditorSettings` **get_editor_settings** **(** **)** +:ref:`EditorSettings` **get_editor_settings** **(** **)** |const| Returns the editor's :ref:`EditorSettings` instance. @@ -310,7 +333,7 @@ Returns the editor's :ref:`EditorSettings` instance. .. rst-class:: classref-method -:ref:`FileSystemDock` **get_file_system_dock** **(** **)** +:ref:`FileSystemDock` **get_file_system_dock** **(** **)** |const| Returns the editor's :ref:`FileSystemDock` instance. @@ -362,7 +385,7 @@ Returns the name of the scene that is being played. If no scene is currently bei .. rst-class:: classref-method -:ref:`EditorFileSystem` **get_resource_filesystem** **(** **)** +:ref:`EditorFileSystem` **get_resource_filesystem** **(** **)** |const| Returns the editor's :ref:`EditorFileSystem` instance. @@ -374,7 +397,7 @@ Returns the editor's :ref:`EditorFileSystem` instance. .. rst-class:: classref-method -:ref:`EditorResourcePreview` **get_resource_previewer** **(** **)** +:ref:`EditorResourcePreview` **get_resource_previewer** **(** **)** |const| Returns the editor's :ref:`EditorResourcePreview` instance. @@ -386,7 +409,7 @@ Returns the editor's :ref:`EditorResourcePreview` i .. rst-class:: classref-method -:ref:`ScriptEditor` **get_script_editor** **(** **)** +:ref:`ScriptEditor` **get_script_editor** **(** **)** |const| Returns the editor's :ref:`ScriptEditor` instance. @@ -412,7 +435,7 @@ Returns an array containing the paths of the currently selected files (and direc .. rst-class:: classref-method -:ref:`EditorSelection` **get_selection** **(** **)** +:ref:`EditorSelection` **get_selection** **(** **)** |const| Returns the editor's :ref:`EditorSelection` instance. @@ -432,18 +455,6 @@ Shows the given property on the given ``object`` in the editor's Inspector dock. ---- -.. _class_EditorInterface_method_is_movie_maker_enabled: - -.. rst-class:: classref-method - -:ref:`bool` **is_movie_maker_enabled** **(** **)** |const| - -Returns ``true`` if Movie Maker mode is enabled in the editor. See also :ref:`set_movie_maker_enabled`. See :ref:`MovieWriter` for more information. - -.. rst-class:: classref-item-separator - ----- - .. _class_EditorInterface_method_is_playing_scene: .. rst-class:: classref-method @@ -528,6 +539,62 @@ Plays the main scene. ---- +.. _class_EditorInterface_method_popup_dialog: + +.. rst-class:: classref-method + +void **popup_dialog** **(** :ref:`Window` dialog, :ref:`Rect2i` rect=Rect2i(0, 0, 0, 0) **)** + +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`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorInterface_method_popup_dialog_centered: + +.. rst-class:: classref-method + +void **popup_dialog_centered** **(** :ref:`Window` dialog, :ref:`Vector2i` minsize=Vector2i(0, 0) **)** + +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`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorInterface_method_popup_dialog_centered_clamped: + +.. rst-class:: classref-method + +void **popup_dialog_centered_clamped** **(** :ref:`Window` dialog, :ref:`Vector2i` minsize=Vector2i(0, 0), :ref:`float` fallback_ratio=0.75 **)** + +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`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorInterface_method_popup_dialog_centered_ratio: + +.. rst-class:: classref-method + +void **popup_dialog_centered_ratio** **(** :ref:`Window` dialog, :ref:`float` ratio=0.8 **)** + +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`. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorInterface_method_reload_scene_from_path: .. rst-class:: classref-method @@ -600,18 +667,6 @@ Sets the editor's current main screen to the one specified in ``name``. ``name`` ---- -.. _class_EditorInterface_method_set_movie_maker_enabled: - -.. rst-class:: classref-method - -void **set_movie_maker_enabled** **(** :ref:`bool` enabled **)** - -Sets whether Movie Maker mode is enabled in the editor. See also :ref:`is_movie_maker_enabled`. See :ref:`MovieWriter` for more information. - -.. rst-class:: classref-item-separator - ----- - .. _class_EditorInterface_method_set_plugin_enabled: .. rst-class:: classref-method diff --git a/classes/class_editornode3dgizmoplugin.rst b/classes/class_editornode3dgizmoplugin.rst index c75964bdb9c..786f2010410 100644 --- a/classes/class_editornode3dgizmoplugin.rst +++ b/classes/class_editornode3dgizmoplugin.rst @@ -12,7 +12,7 @@ EditorNode3DGizmoPlugin **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Used by the editor to define Node3D gizmo types. +A class used by the editor to define Node3D gizmo types. .. rst-class:: classref-introduction-group diff --git a/classes/class_editorpaths.rst b/classes/class_editorpaths.rst index 49406fec22e..fba3d127bf8 100644 --- a/classes/class_editorpaths.rst +++ b/classes/class_editorpaths.rst @@ -155,7 +155,11 @@ 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 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 `__. + +\ **Note:** On macOS, placing ``_sc_`` or any other file inside .app bundle will break digital signature and make it non-portable, consider placing it in the same folder as the .app bundle instead. \ **Note:** The Steam release of Godot uses self-contained mode by default. diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index 1f857e161b1..91a9eb00175 100644 --- a/classes/class_editorplugin.rst +++ b/classes/class_editorplugin.rst @@ -1279,7 +1279,7 @@ The callback should have 4 arguments: :ref:`Object` ``undo_redo``, :ref:`EditorInterface` **get_editor_interface** **(** **)** -Returns the :ref:`EditorInterface` object that gives you control over Godot editor's window and its functionalities. +Returns the :ref:`EditorInterface` singleton. It provides access to some parts of the editor GUI as well as various inner states and tools. .. rst-class:: classref-item-separator diff --git a/classes/class_editorproperty.rst b/classes/class_editorproperty.rst index 8cb02a9f0a2..a5ff52a2098 100644 --- a/classes/class_editorproperty.rst +++ b/classes/class_editorproperty.rst @@ -12,14 +12,14 @@ EditorProperty **Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Custom control to edit properties for adding into the inspector. +Custom control for editing properties that can be added to the :ref:`EditorInspector`. .. rst-class:: classref-introduction-group Description ----------- -This control allows property editing for one or multiple properties into :ref:`EditorInspector`. It is added via :ref:`EditorInspectorPlugin`. +A custom control for editing properties that can be added to the :ref:`EditorInspector`. It is added via :ref:`EditorInspectorPlugin`. .. rst-class:: classref-reftable-group diff --git a/classes/class_editorresourceconversionplugin.rst b/classes/class_editorresourceconversionplugin.rst index f42ea520504..6cb08d14339 100644 --- a/classes/class_editorresourceconversionplugin.rst +++ b/classes/class_editorresourceconversionplugin.rst @@ -30,13 +30,13 @@ Below shows an example of a basic plugin that will convert an :ref:`ImageTexture extends EditorResourceConversionPlugin - func _handles(resource : Resource): + func _handles(resource: Resource): return resource is ImageTexture func _converts_to(): return "PortableCompressedTexture2D" - func _convert(itex : Resource): + func _convert(itex: Resource): var ptex = PortableCompressedTexture2D.new() ptex.create_from_image(itex.get_image(), PortableCompressedTexture2D.COMPRESSION_MODE_LOSSLESS) return ptex diff --git a/classes/class_editorresourcepreview.rst b/classes/class_editorresourcepreview.rst index 249921c4f9c..d7f89c79b6b 100644 --- a/classes/class_editorresourcepreview.rst +++ b/classes/class_editorresourcepreview.rst @@ -12,14 +12,14 @@ EditorResourcePreview **Inherits:** :ref:`Node` **<** :ref:`Object` -Helper to generate previews of resources or files. +A node used to generate previews of resources or files. .. rst-class:: classref-introduction-group Description ----------- -This object is used to generate previews for resources of files. +This node is used to generate previews for resources of files. \ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_resource_previewer`. diff --git a/classes/class_editorresourcepreviewgenerator.rst b/classes/class_editorresourcepreviewgenerator.rst index 2df3b2d8ad5..f2c3d300ac1 100644 --- a/classes/class_editorresourcepreviewgenerator.rst +++ b/classes/class_editorresourcepreviewgenerator.rst @@ -29,17 +29,17 @@ Methods .. table:: :widths: auto - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_can_generate_small_preview` **(** **)** |virtual| |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`_generate` **(** :ref:`Resource` resource, :ref:`Vector2i` size **)** |virtual| |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`_generate_from_path` **(** :ref:`String` path, :ref:`Vector2i` size **)** |virtual| |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_generate_small_preview_automatically` **(** **)** |virtual| |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_handles` **(** :ref:`String` type **)** |virtual| |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_can_generate_small_preview` **(** **)** |virtual| |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`_generate` **(** :ref:`Resource` resource, :ref:`Vector2i` size, :ref:`Dictionary` metadata **)** |virtual| |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`_generate_from_path` **(** :ref:`String` path, :ref:`Vector2i` size, :ref:`Dictionary` metadata **)** |virtual| |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_generate_small_preview_automatically` **(** **)** |virtual| |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_handles` **(** :ref:`String` type **)** |virtual| |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -68,7 +68,7 @@ By default, it returns ``false``. .. rst-class:: classref-method -:ref:`Texture2D` **_generate** **(** :ref:`Resource` resource, :ref:`Vector2i` size **)** |virtual| |const| +:ref:`Texture2D` **_generate** **(** :ref:`Resource` resource, :ref:`Vector2i` size, :ref:`Dictionary` metadata **)** |virtual| |const| Generate a preview from a given resource with the specified size. This must always be implemented. @@ -76,6 +76,8 @@ Returning an empty texture is an OK way to fail and let another generator take c Care must be taken because this function is always called from a thread (not the main thread). +\ ``metadata`` dictionary can 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 ---- @@ -84,7 +86,7 @@ Care must be taken because this function is always called from a thread (not the .. rst-class:: classref-method -:ref:`Texture2D` **_generate_from_path** **(** :ref:`String` path, :ref:`Vector2i` size **)** |virtual| |const| +:ref:`Texture2D` **_generate_from_path** **(** :ref:`String` path, :ref:`Vector2i` size, :ref:`Dictionary` metadata **)** |virtual| |const| Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call :ref:`_generate`. @@ -92,6 +94,8 @@ Returning an empty texture is an OK way to fail and let another generator take c Care must be taken because this function is always called from a thread (not the main thread). +\ ``metadata`` dictionary can 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 ---- diff --git a/classes/class_editorresourcetooltipplugin.rst b/classes/class_editorresourcetooltipplugin.rst new file mode 100644 index 00000000000..d4a7ad3cd52 --- /dev/null +++ b/classes/class_editorresourcetooltipplugin.rst @@ -0,0 +1,104 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/EditorResourceTooltipPlugin.xml. + +.. _class_EditorResourceTooltipPlugin: + +EditorResourceTooltipPlugin +=========================== + +**Inherits:** :ref:`RefCounted` **<** :ref:`Object` + +A plugin that advanced tooltip for its handled resource type. + +.. rst-class:: classref-introduction-group + +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`. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_handles` **(** :ref:`String` type **)** |virtual| |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control` | :ref:`_make_tooltip_for_path` **(** :ref:`String` path, :ref:`Dictionary` metadata, :ref:`Control` base **)** |virtual| |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`request_thumbnail` **(** :ref:`String` path, :ref:`TextureRect` control **)** |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_EditorResourceTooltipPlugin_method__handles: + +.. rst-class:: classref-method + +:ref:`bool` **_handles** **(** :ref:`String` type **)** |virtual| |const| + +Return ``true`` if the plugin is going to handle the given :ref:`Resource` ``type``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorResourceTooltipPlugin_method__make_tooltip_for_path: + +.. rst-class:: classref-method + +:ref:`Control` **_make_tooltip_for_path** **(** :ref:`String` path, :ref:`Dictionary` metadata, :ref:`Control` base **)** |virtual| |const| + +Create and return a tooltip that will be displayed when the user hovers a resource under the given ``path`` in filesystem dock. + +The ``metadata`` dictionary is provided by preview generator (see method 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:** If you decide to discard the ``base``, make sure to call :ref:`Node.queue_free`, because it's not freed automatically. + +:: + + func _make_tooltip_for_path(path, metadata, base): + var t_rect = TextureRect.new() + request_thumbnail(path, t_rect) + base.add_child(t_rect) # The TextureRect will appear at the bottom of the tooltip. + return base + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorResourceTooltipPlugin_method_request_thumbnail: + +.. rst-class:: classref-method + +void **request_thumbnail** **(** :ref:`String` path, :ref:`TextureRect` control **)** |const| + +Requests a thumbnail for the given :ref:`TextureRect`. The thumbnail is created asynchronously by :ref:`EditorResourcePreview` and automatically set when available. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_editorscript.rst b/classes/class_editorscript.rst index 2d83b93948a..2883c4987b2 100644 --- a/classes/class_editorscript.rst +++ b/classes/class_editorscript.rst @@ -68,9 +68,9 @@ Methods +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ | void | :ref:`add_root_node` **(** :ref:`Node` node **)** | +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ - | :ref:`EditorInterface` | :ref:`get_editor_interface` **(** **)** | + | :ref:`EditorInterface` | :ref:`get_editor_interface` **(** **)** |const| | +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ - | :ref:`Node` | :ref:`get_scene` **(** **)** | + | :ref:`Node` | :ref:`get_scene` **(** **)** |const| | +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -112,7 +112,7 @@ Adds ``node`` as a child of the root node in the editor context. .. rst-class:: classref-method -:ref:`EditorInterface` **get_editor_interface** **(** **)** +:ref:`EditorInterface` **get_editor_interface** **(** **)** |const| Returns the :ref:`EditorInterface` singleton instance. @@ -124,7 +124,7 @@ Returns the :ref:`EditorInterface` singleton instance. .. rst-class:: classref-method -:ref:`Node` **get_scene** **(** **)** +:ref:`Node` **get_scene** **(** **)** |const| Returns the Editor's currently active scene. diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index 0d595ebc72c..7b7e8cc0d02 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -30,7 +30,7 @@ Accessing the settings can be done using the following methods, such as: .. code-tab:: gdscript - var settings = EditorInterface.get_editor_settings() + var settings = get_editor_interface().get_editor_settings() # `settings.set("some/property", 10)` also works as this class overrides `_set()` internally. settings.set_setting("some/property", 10) # `settings.get("some/property")` also works as this class overrides `_get()` internally. @@ -89,8 +89,6 @@ Properties +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`editors/2d/bone_width` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`editors/2d/constrain_editor_view` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/2d/grid_color` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/2d/guides_color` | @@ -203,6 +201,8 @@ Properties +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`editors/polygon_editor/show_previous_outline` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/shader_editor/behavior/files/restore_shaders_on_load` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`editors/tiles_editor/display_grid` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/tiles_editor/grid_color` | @@ -257,6 +257,8 @@ Properties +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`interface/editor/editor_language` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/editor_screen` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/editor/expand_to_title` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`interface/editor/font_antialiasing` | @@ -275,6 +277,8 @@ Properties +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/editor/mouse_extra_buttons_navigate_history` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/project_manager_screen` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/editor/save_each_scene_on_quit` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/editor/separate_distraction_mode` | @@ -287,10 +291,18 @@ Properties +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/editor/use_embedded_menu` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`interface/inspector/float_drag_speed` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`interface/inspector/max_array_dictionary_items_per_page` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/inspector/show_low_level_opentype_features` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/multi_window/enable` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/multi_window/maximize_window` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/multi_window/restore_windows_on_load` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`interface/scene_tabs/display_close_button` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`interface/scene_tabs/maximum_width` | @@ -329,6 +341,8 @@ Properties +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/touchscreen/increase_scrollbar_touch_area` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`interface/touchscreen/scale_gizmo_handles` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`network/debug/remote_host` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`network/debug/remote_port` | @@ -353,6 +367,8 @@ Properties +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`run/output/font_size` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`run/window_placement/android_window` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`run/window_placement/rect` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`run/window_placement/rect_custom_position` | @@ -379,8 +395,6 @@ Properties +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/appearance/gutters/line_numbers_zero_padded` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`text_editor/appearance/gutters/show_bookmark_gutter` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/appearance/gutters/show_info_gutter` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/appearance/gutters/show_line_numbers` | @@ -797,18 +811,6 @@ The bone width in the 2D skeleton editor (in pixels). See also :ref:`editors/2d/ ---- -.. _class_EditorSettings_property_editors/2d/constrain_editor_view: - -.. rst-class:: classref-property - -:ref:`bool` **editors/2d/constrain_editor_view** - -If ``true``, prevents the 2D editor viewport from leaving the scene. Limits are calculated dynamically based on nodes present in the current scene. If ``false``, the 2D editor viewport will be able to move freely, but you risk getting lost when zooming out too far. You can refocus on the scene by selecting a node then pressing :kbd:`F`. - -.. rst-class:: classref-item-separator - ----- - .. _class_EditorSettings_property_editors/2d/grid_color: .. rst-class:: classref-property @@ -1055,7 +1057,7 @@ If ``true``, render the grid on an XZ plane. :ref:`bool` **editors/3d/grid_yz_plane** -If ``true``, render the grid on an YZ plane. This can be useful for 3D side-scrolling games. +If ``true``, render the grid on a YZ plane. This can be useful for 3D side-scrolling games. .. rst-class:: classref-item-separator @@ -1171,7 +1173,7 @@ The modifier key that must be held to pan in the 3D editor. :ref:`bool` **editors/3d/navigation/warped_mouse_panning** -If ``true``, warps the mouse around the 3D viewport while panning in the 3D editor. This makes it possible to pan over a large area without having to exit panning then mouse the mouse back constantly. +If ``true``, warps the mouse around the 3D viewport while panning in the 3D editor. This makes it possible to pan over a large area without having to exit panning and adjust the mouse cursor. .. rst-class:: classref-item-separator @@ -1485,7 +1487,7 @@ Controls whether the mouse wheel scroll zooms or pans in subeditors. The list of :ref:`bool` **editors/panning/warped_mouse_panning** -If ``true``, warps the mouse around the 2D viewport while panning in the 2D editor. This makes it possible to pan over a large area without having to exit panning then mouse the mouse back constantly. +If ``true``, warps the mouse around the 2D viewport while panning in the 2D editor. This makes it possible to pan over a large area without having to exit panning and adjust the mouse cursor. .. rst-class:: classref-item-separator @@ -1515,6 +1517,18 @@ If ``true``, displays the polygon's previous shape in the 2D polygon editors wit ---- +.. _class_EditorSettings_property_editors/shader_editor/behavior/files/restore_shaders_on_load: + +.. rst-class:: classref-property + +:ref:`bool` **editors/shader_editor/behavior/files/restore_shaders_on_load** + +If ``true``, reopens shader files that were open in the shader editor when the project was last closed. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_editors/tiles_editor/display_grid: .. rst-class:: classref-property @@ -1871,6 +1885,18 @@ Translations are provided by the community. If you spot a mistake, :doc:`contrib ---- +.. _class_EditorSettings_property_interface/editor/editor_screen: + +.. rst-class:: classref-property + +:ref:`int` **interface/editor/editor_screen** + +The preferred monitor to display the editor. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_interface/editor/expand_to_title: .. rst-class:: classref-property @@ -1989,13 +2015,25 @@ If ``true``, the mouse's additional side buttons will be usable to navigate in t ---- +.. _class_EditorSettings_property_interface/editor/project_manager_screen: + +.. rst-class:: classref-property + +:ref:`int` **interface/editor/project_manager_screen** + +The preferred monitor to display the project manager. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_interface/editor/save_each_scene_on_quit: .. rst-class:: classref-property :ref:`bool` **interface/editor/save_each_scene_on_quit** -If ``true``, the editor will save all scenes when confirming the **Save** action when quitting the editor or quitting to the project list. If ``false``, the editor will ask to save each scene individually. +If ``false``, the editor will save all scenes when confirming the **Save** action when quitting the editor or quitting to the project list. If ``true``, the editor will ask to save each scene individually. .. rst-class:: classref-item-separator @@ -2065,6 +2103,18 @@ Specific to the macOS platform. ---- +.. _class_EditorSettings_property_interface/inspector/float_drag_speed: + +.. rst-class:: classref-property + +:ref:`float` **interface/inspector/float_drag_speed** + +Base speed for increasing/decreasing float values by dragging them in the inspector. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_interface/inspector/max_array_dictionary_items_per_page: .. rst-class:: classref-property @@ -2089,6 +2139,46 @@ If ``true``, display OpenType features marked as ``hidden`` by the font file in ---- +.. _class_EditorSettings_property_interface/multi_window/enable: + +.. rst-class:: classref-property + +:ref:`bool` **interface/multi_window/enable** + +If ``true``, the multi window support in editor is enabled. The following panels can become dedicated windows (made floating): Docks, Script editor, and Shader editor. + +\ **Note:** When :ref:`interface/editor/single_window_mode` is ``true``, the multi window support is always disabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/multi_window/maximize_window: + +.. rst-class:: classref-property + +:ref:`bool` **interface/multi_window/maximize_window** + +If ``true``, when panels are made floating they will be maximized. + +If ``false``, when panels are made floating their position and size will match the ones when they are attached (excluding window border) to the editor window. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/multi_window/restore_windows_on_load: + +.. rst-class:: classref-property + +:ref:`bool` **interface/multi_window/restore_windows_on_load** + +If ``true``, the floating panel position, size, and screen will be saved on editor exit. On next launch the panels that were floating will be made floating in the saved positions, sizes and screens, if possible. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_interface/scene_tabs/display_close_button: .. rst-class:: classref-property @@ -2331,6 +2421,20 @@ If ``true``, increases the scrollbar touch area to improve usability on touchscr ---- +.. _class_EditorSettings_property_interface/touchscreen/scale_gizmo_handles: + +.. rst-class:: classref-property + +:ref:`float` **interface/touchscreen/scale_gizmo_handles** + +Specify the multiplier to apply to the scale for the editor gizmo handles to improve usability on touchscreen devices. + +\ **Note:** Defaults to ``1`` on non-touchscreen devices. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_network/debug/remote_host: .. rst-class:: classref-property @@ -2479,6 +2583,20 @@ The size of the font in the **Output** panel at the bottom of the editor. This s ---- +.. _class_EditorSettings_property_run/window_placement/android_window: + +.. rst-class:: classref-property + +:ref:`int` **run/window_placement/android_window** + +The Android window to display the project on when starting the project from the editor. + +\ **Note:** Only available in the Android editor. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_run/window_placement/rect: .. rst-class:: classref-property @@ -2533,7 +2651,7 @@ If ``true``, makes the caret blink according to :ref:`text_editor/appearance/car :ref:`float` **text_editor/appearance/caret/caret_blink_interval** -The interval at which to blink the caret (in seconds). See also :ref:`text_editor/appearance/caret/caret_blink`. +The interval at which the caret will blink (in seconds). See also :ref:`text_editor/appearance/caret/caret_blink`. .. rst-class:: classref-item-separator @@ -2569,7 +2687,7 @@ If ``true``, colors the background of the line the caret is currently on with :r :ref:`int` **text_editor/appearance/caret/type** -The shape of the caret to use in the script editor. **Line** displays a vertical line to the left of the current character, whereas **Block** displays a outline over the current character. +The shape of the caret to use in the script editor. **Line** displays a vertical line to the left of the current character, whereas **Block** displays an outline over the current character. .. rst-class:: classref-item-separator @@ -2635,25 +2753,13 @@ If ``true``, displays line numbers with zero padding (e.g. ``007`` instead of `` ---- -.. _class_EditorSettings_property_text_editor/appearance/gutters/show_bookmark_gutter: - -.. rst-class:: classref-property - -:ref:`bool` **text_editor/appearance/gutters/show_bookmark_gutter** - -If ``true``, displays icons for bookmarks in a gutter at the left. Bookmarks remain functional when this setting is disabled. - -.. rst-class:: classref-item-separator - ----- - .. _class_EditorSettings_property_text_editor/appearance/gutters/show_info_gutter: .. rst-class:: classref-property :ref:`bool` **text_editor/appearance/gutters/show_info_gutter** -If ``true``, displays a gutter at the left containing icons for methods with signal connections. +If ``true``, displays a gutter at the left containing icons for methods with signal connections and for overridden methods. .. rst-class:: classref-item-separator @@ -3646,7 +3752,7 @@ Erases the setting whose name is specified by ``property``. :ref:`PackedStringArray` **get_changed_settings** **(** **)** |const| -Gets an array of the settings which have been changed since the last save. Note that internally ``changed_settings`` is cleared after a successful save, so generally the most appropriate place to use this method is when processing :ref:`NOTIFICATION_EDITOR_SETTINGS_CHANGED` +Gets an array of the settings which have been changed since the last save. Note that internally ``changed_settings`` is cleared after a successful save, so generally the most appropriate place to use this method is when processing :ref:`NOTIFICATION_EDITOR_SETTINGS_CHANGED`. .. rst-class:: classref-item-separator diff --git a/classes/class_editorsyntaxhighlighter.rst b/classes/class_editorsyntaxhighlighter.rst index 17b9f482ca9..6357b895f19 100644 --- a/classes/class_editorsyntaxhighlighter.rst +++ b/classes/class_editorsyntaxhighlighter.rst @@ -12,14 +12,14 @@ EditorSyntaxHighlighter **Inherits:** :ref:`SyntaxHighlighter` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Base Syntax highlighter resource for the :ref:`ScriptEditor`. +Base class for :ref:`SyntaxHighlighter` used by the :ref:`ScriptEditor`. .. rst-class:: classref-introduction-group Description ----------- -Base syntax highlighter resource all editor syntax highlighters extend from, it is used in the :ref:`ScriptEditor`. +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` diff --git a/classes/class_editorundoredomanager.rst b/classes/class_editorundoredomanager.rst index 65b8769748c..02305cd2512 100644 --- a/classes/class_editorundoredomanager.rst +++ b/classes/class_editorundoredomanager.rst @@ -31,6 +31,10 @@ 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. + +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`. + .. rst-class:: classref-reftable-group Methods diff --git a/classes/class_editorvcsinterface.rst b/classes/class_editorvcsinterface.rst index bd9c61f46fa..800821fc555 100644 --- a/classes/class_editorvcsinterface.rst +++ b/classes/class_editorvcsinterface.rst @@ -265,7 +265,7 @@ Discards the changes made in a file present at ``file_path``. void **_fetch** **(** :ref:`String` remote **)** |virtual| -Fetches new changes from the remote, but doesn't write changes to the current working directory. Equivalent to ``git fetch``. +Fetches new changes from the ``remote``, but doesn't write changes to the current working directory. Equivalent to ``git fetch``. .. rst-class:: classref-item-separator @@ -397,7 +397,7 @@ Pulls changes from the remote. This can give rise to merge conflicts. void **_push** **(** :ref:`String` remote, :ref:`bool` force **)** |virtual| -Pushes changes to the ``remote``. Optionally, if ``force`` is set to true, a force push will override the change history already present on the remote. +Pushes changes to the ``remote``. If ``force`` is ``true``, a force push will override the change history already present on the remote. .. rst-class:: classref-item-separator @@ -517,7 +517,7 @@ Helper function to create a commit :ref:`Dictionary` item. ``m :ref:`Dictionary` **create_diff_file** **(** :ref:`String` new_file, :ref:`String` old_file **)** -Helper function to create a ``Dictionary`` for storing old and new diff file paths. +Helper function to create a :ref:`Dictionary` for storing old and new diff file paths. .. rst-class:: classref-item-separator @@ -529,7 +529,7 @@ Helper function to create a ``Dictionary`` for storing old and new diff file pat :ref:`Dictionary` **create_diff_hunk** **(** :ref:`int` old_start, :ref:`int` new_start, :ref:`int` old_lines, :ref:`int` new_lines **)** -Helper function to create a ``Dictionary`` for storing diff hunk data. ``old_start`` is the starting line number in old file. ``new_start`` is the starting line number in new file. ``old_lines`` is the number of lines in the old file. ``new_lines`` is the number of lines in the new file. +Helper function to create a :ref:`Dictionary` for storing diff hunk data. ``old_start`` is the starting line number in old file. ``new_start`` is the starting line number in new file. ``old_lines`` is the number of lines in the old file. ``new_lines`` is the number of lines in the new file. .. rst-class:: classref-item-separator @@ -541,7 +541,7 @@ Helper function to create a ``Dictionary`` for storing diff hunk data. ``old_sta :ref:`Dictionary` **create_diff_line** **(** :ref:`int` new_line_no, :ref:`int` old_line_no, :ref:`String` content, :ref:`String` status **)** -Helper function to create a ``Dictionary`` for storing a line diff. ``new_line_no`` is the line number in the new file (can be ``-1`` if the line is deleted). ``old_line_no`` is the line number in the old file (can be ``-1`` if the line is added). ``content`` is the diff text. ``status`` is a single character string which stores the line origin. +Helper function to create a :ref:`Dictionary` for storing a line diff. ``new_line_no`` is the line number in the new file (can be ``-1`` if the line is deleted). ``old_line_no`` is the line number in the old file (can be ``-1`` if the line is added). ``content`` is the diff text. ``status`` is a single character string which stores the line origin. .. rst-class:: classref-item-separator @@ -553,7 +553,7 @@ Helper function to create a ``Dictionary`` for storing a line diff. ``new_line_n :ref:`Dictionary` **create_status_file** **(** :ref:`String` file_path, :ref:`ChangeType` change_type, :ref:`TreeArea` area **)** -Helper function to create a ``Dictionary`` used by editor to read the status of a file. +Helper function to create a :ref:`Dictionary` used by editor to read the status of a file. .. rst-class:: classref-item-separator diff --git a/classes/class_enetpacketpeer.rst b/classes/class_enetpacketpeer.rst index 7ec0f53f922..250974a1441 100644 --- a/classes/class_enetpacketpeer.rst +++ b/classes/class_enetpacketpeer.rst @@ -511,7 +511,7 @@ void **set_timeout** **(** :ref:`int` timeout, :ref:`int` Sets the timeout parameters for a peer. The timeout parameters control how and when a peer will timeout from a failure to acknowledge reliable traffic. Timeout values are expressed in milliseconds. -The ``timeout_limit`` is a factor that, multiplied by a value based on the average round trip time, will determine the timeout limit for a reliable packet. When that limit is reached, the timeout will be doubled, and the peer will be disconnected if that limit has reached ``timeout_min``. The ``timeout_max`` parameter, on the other hand, defines a fixed timeout for which any packet must be acknowledged or the peer will be dropped. +The ``timeout`` is a factor that, multiplied by a value based on the average round trip time, will determine the timeout limit for a reliable packet. When that limit is reached, the timeout will be doubled, and the peer will be disconnected if that limit has reached ``timeout_min``. The ``timeout_max`` parameter, on the other hand, defines a fixed timeout for which any packet must be acknowledged or the peer will be dropped. .. rst-class:: classref-item-separator diff --git a/classes/class_engine.rst b/classes/class_engine.rst index b4c1b120914..ce6b666ea91 100644 --- a/classes/class_engine.rst +++ b/classes/class_engine.rst @@ -12,7 +12,7 @@ Engine **Inherits:** :ref:`Object` -Access to engine properties. +Provides access to engine properties. .. rst-class:: classref-introduction-group @@ -226,7 +226,7 @@ If ``false``, stops printing error and warning messages to the console and edito - void **set_time_scale** **(** :ref:`float` value **)** - :ref:`float` **get_time_scale** **(** **)** -Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed. +Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed. This also affects :ref:`Timer` and :ref:`SceneTreeTimer` (see :ref:`SceneTree.create_timer` for how to control this). .. rst-class:: classref-section-separator diff --git a/classes/class_environment.rst b/classes/class_environment.rst index 17744e72589..a64b0b09c1a 100644 --- a/classes/class_environment.rst +++ b/classes/class_environment.rst @@ -1858,7 +1858,7 @@ If ``true``, screen-space reflections are enabled. Screen-space reflections are - void **set_ssr_fade_in** **(** :ref:`float` value **)** - :ref:`float` **get_ssr_fade_in** **(** **)** -The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection). Only positive values are valid (negative values will be clamped to ``0.0``). +The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection. Only positive values are valid (negative values will be clamped to ``0.0``). .. rst-class:: classref-item-separator diff --git a/classes/class_expression.rst b/classes/class_expression.rst index 8336ab8b7cf..a6f282605d2 100644 --- a/classes/class_expression.rst +++ b/classes/class_expression.rst @@ -70,6 +70,13 @@ In the following example we use a :ref:`LineEdit` node to write +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Evaluating Expressions <../tutorials/scripting/evaluating_expressions>` + .. rst-class:: classref-reftable-group Methods diff --git a/classes/class_fileaccess.rst b/classes/class_fileaccess.rst index 9e4645e80bd..4cf9c3c4e26 100644 --- a/classes/class_fileaccess.rst +++ b/classes/class_fileaccess.rst @@ -12,14 +12,14 @@ FileAccess **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Type to handle file reading and writing operations. +Provides methods for file reading and writing operations. .. rst-class:: classref-introduction-group Description ----------- -File type. This is used to permanently store data into the user device's file system and to read from it. This can be used to store game save data or player configuration files, for example. +This class can be used to permanently store data in the user device's file system and to read from it. This is useful for store game save data or player configuration files. Here's a sample on how to write and read from a file: @@ -56,24 +56,9 @@ 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``. 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. +\ **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. - -.. tabs:: - - .. code-tab:: gdscript - - var file = FileAccess.open("res://something") # File is opened and locked for use. - file = null # File is closed. - - .. code-tab:: csharp - - using var file = FileAccess.Open("res://something"); // File is opened and locked for use. - // The using statement calls Dispose when going out of scope. - - - -\ **Note:** To access project resources once exported, it is recommended to use :ref:`ResourceLoader` instead of the **FileAccess** API, as some files are converted to engine-specific formats and their original source files might not be present in the exported PCK package. +\ **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. \ **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. @@ -115,14 +100,14 @@ Methods +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`flush` **(** **)** | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_8` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_16` **(** **)** |const| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_32` **(** **)** |const| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_64` **(** **)** |const| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_8` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_as_text` **(** :ref:`bool` skip_cr=false **)** |const| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`get_buffer` **(** :ref:`int` length **)** |const| | @@ -177,14 +162,14 @@ Methods +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`seek_end` **(** :ref:`int` position=0 **)** | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_8` **(** :ref:`int` value **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`store_16` **(** :ref:`int` value **)** | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`store_32` **(** :ref:`int` value **)** | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`store_64` **(** :ref:`int` value **)** | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_8` **(** :ref:`int` value **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`store_buffer` **(** :ref:`PackedByteArray` buffer **)** | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`store_csv_line` **(** :ref:`PackedStringArray` values, :ref:`String` delim="," **)** | @@ -293,6 +278,14 @@ Uses the `Zstandard `__ compression method. Uses the `gzip `__ compression method. +.. _class_FileAccess_constant_COMPRESSION_BROTLI: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompressionMode` **COMPRESSION_BROTLI** = ``4`` + +Uses the `brotli `__ compression method (only decompression is supported). + .. rst-class:: classref-section-separator ---- @@ -403,49 +396,49 @@ Writes the file's buffer to disk. Flushing is automatically performed when the f ---- -.. _class_FileAccess_method_get_16: +.. _class_FileAccess_method_get_8: .. rst-class:: classref-method -:ref:`int` **get_16** **(** **)** |const| +:ref:`int` **get_8** **(** **)** |const| -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 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 ---- -.. _class_FileAccess_method_get_32: +.. _class_FileAccess_method_get_16: .. rst-class:: classref-method -:ref:`int` **get_32** **(** **)** |const| +:ref:`int` **get_16** **(** **)** |const| -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 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 ---- -.. _class_FileAccess_method_get_64: +.. _class_FileAccess_method_get_32: .. rst-class:: classref-method -:ref:`int` **get_64** **(** **)** |const| +:ref:`int` **get_32** **(** **)** |const| -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 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 ---- -.. _class_FileAccess_method_get_8: +.. _class_FileAccess_method_get_64: .. rst-class:: classref-method -:ref:`int` **get_8** **(** **)** |const| +:ref:`int` **get_64** **(** **)** |const| -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 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 @@ -811,6 +804,22 @@ Changes the file reading/writing cursor to the specified position (in bytes from ---- +.. _class_FileAccess_method_store_8: + +.. rst-class:: classref-method + +void **store_8** **(** :ref:`int` value **)** + +Stores an integer as 8 bits in the file. + +\ **Note:** The ``value`` should lie in the interval ``[0, 255]``. Any other value will overflow and wrap around. + +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 + +---- + .. _class_FileAccess_method_store_16: .. rst-class:: classref-method @@ -894,22 +903,6 @@ Stores an integer as 64 bits in the file. ---- -.. _class_FileAccess_method_store_8: - -.. rst-class:: classref-method - -void **store_8** **(** :ref:`int` value **)** - -Stores an integer as 8 bits in the file. - -\ **Note:** The ``value`` should lie in the interval ``[0, 255]``. Any other value will overflow and wrap around. - -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 - ----- - .. _class_FileAccess_method_store_buffer: .. rst-class:: classref-method diff --git a/classes/class_filedialog.rst b/classes/class_filedialog.rst index eeb04d811c5..1b0dd2ecdc0 100644 --- a/classes/class_filedialog.rst +++ b/classes/class_filedialog.rst @@ -12,14 +12,14 @@ FileDialog **Inherits:** :ref:`ConfirmationDialog` **<** :ref:`AcceptDialog` **<** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` -Dialog for selecting files or directories in the filesystem. +A dialog for selecting files or directories in the filesystem. .. rst-class:: classref-introduction-group Description ----------- -FileDialog is a preset dialog used to choose files and directories in the filesystem. It supports filter masks. The FileDialog automatically sets its window title according to the :ref:`file_mode`. If you want to use a custom title, disable this by setting :ref:`mode_overrides_title` to ``false``. +**FileDialog** is a preset dialog used to choose files and directories in the filesystem. It supports filter masks. **FileDialog** automatically sets its window title according to the :ref:`file_mode`. If you want to use a custom title, disable this by setting :ref:`mode_overrides_title` to ``false``. .. rst-class:: classref-reftable-group @@ -255,7 +255,7 @@ Property Descriptions - void **set_access** **(** :ref:`Access` value **)** - :ref:`Access` **get_access** **(** **)** -The file system access scope. See enum ``Access`` constants. +The file system access scope. See :ref:`Access` constants. \ **Warning:** Currently, in sandboxed environments such as Web builds or sandboxed macOS apps, FileDialog cannot access the host file system. See `godot-proposals#1123 `__. @@ -359,7 +359,7 @@ The available file type filters. For example, this shows only ``.png`` and ``.gd - void **set_mode_overrides_title** **(** :ref:`bool` value **)** - :ref:`bool` **is_mode_overriding_title** **(** **)** -If ``true``, changing the ``Mode`` property will set the window title accordingly (e.g. setting mode to :ref:`FILE_MODE_OPEN_FILE` will change the window title to "Open a File"). +If ``true``, changing the :ref:`file_mode` property will set the window title accordingly (e.g. setting :ref:`file_mode` to :ref:`FILE_MODE_OPEN_FILE` will change the window title to "Open a File"). .. rst-class:: classref-item-separator diff --git a/classes/class_filesystemdock.rst b/classes/class_filesystemdock.rst index 32bcd0c19c5..b98c8de8a87 100644 --- a/classes/class_filesystemdock.rst +++ b/classes/class_filesystemdock.rst @@ -12,9 +12,16 @@ FileSystemDock **Inherits:** :ref:`VBoxContainer` **<** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -.. container:: contribute +Godot editor's dock for managing files in the project. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +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`. + +While **FileSystemDock** doesn't expose any methods for file manipulation, it can listen for various file-related signals. .. rst-class:: classref-reftable-group @@ -24,9 +31,13 @@ Methods .. table:: :widths: auto - +------+--------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`navigate_to_path` **(** :ref:`String` path **)** | - +------+--------------------------------------------------------------------------------------------------------------------+ + +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_resource_tooltip_plugin` **(** :ref:`EditorResourceTooltipPlugin` plugin **)** | + +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`navigate_to_path` **(** :ref:`String` path **)** | + +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_resource_tooltip_plugin` **(** :ref:`EditorResourceTooltipPlugin` plugin **)** | + +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -43,9 +54,7 @@ Signals **display_mode_changed** **(** **)** -.. container:: contribute - - There is currently no description for this signal. Please help us by :ref:`contributing one `! +Emitted when the user switches file display mode or split mode. .. rst-class:: classref-item-separator @@ -57,9 +66,7 @@ Signals **file_removed** **(** :ref:`String` file **)** -.. container:: contribute - - There is currently no description for this signal. Please help us by :ref:`contributing one `! +Emitted when the given ``file`` was removed. .. rst-class:: classref-item-separator @@ -71,9 +78,7 @@ Signals **files_moved** **(** :ref:`String` old_file, :ref:`String` new_file **)** -.. container:: contribute - - There is currently no description for this signal. Please help us by :ref:`contributing one `! +Emitted when a file is moved from ``old_file`` path to ``new_file`` path. .. rst-class:: classref-item-separator @@ -85,9 +90,7 @@ Signals **folder_moved** **(** :ref:`String` old_folder, :ref:`String` new_folder **)** -.. container:: contribute - - There is currently no description for this signal. Please help us by :ref:`contributing one `! +Emitted when a folder is moved from ``old_folder`` path to ``new_folder`` path. .. rst-class:: classref-item-separator @@ -99,9 +102,7 @@ Signals **folder_removed** **(** :ref:`String` folder **)** -.. container:: contribute - - There is currently no description for this signal. Please help us by :ref:`contributing one `! +Emitted when the given ``folder`` was removed. .. rst-class:: classref-item-separator @@ -113,9 +114,7 @@ Signals **inherit** **(** :ref:`String` file **)** -.. container:: contribute - - There is currently no description for this signal. Please help us by :ref:`contributing one `! +Emitted when a new scene is created that inherits the scene at ``file`` path. .. rst-class:: classref-item-separator @@ -127,9 +126,7 @@ Signals **instantiate** **(** :ref:`PackedStringArray` files **)** -.. container:: contribute - - There is currently no description for this signal. Please help us by :ref:`contributing one `! +Emitted when the given scenes are being instantiated in the editor. .. rst-class:: classref-item-separator @@ -141,9 +138,7 @@ Signals **resource_removed** **(** :ref:`Resource` resource **)** -.. container:: contribute - - There is currently no description for this signal. Please help us by :ref:`contributing one `! +Emitted when an external ``resource`` had its file removed. .. rst-class:: classref-section-separator @@ -154,15 +149,37 @@ Signals Method Descriptions ------------------- +.. _class_FileSystemDock_method_add_resource_tooltip_plugin: + +.. rst-class:: classref-method + +void **add_resource_tooltip_plugin** **(** :ref:`EditorResourceTooltipPlugin` plugin **)** + +Registers a new :ref:`EditorResourceTooltipPlugin`. + +.. rst-class:: classref-item-separator + +---- + .. _class_FileSystemDock_method_navigate_to_path: .. rst-class:: classref-method void **navigate_to_path** **(** :ref:`String` path **)** -.. container:: contribute +Sets the given ``path`` as currently selected, ensuring that the selected file/directory is visible. + +.. rst-class:: classref-item-separator + +---- + +.. _class_FileSystemDock_method_remove_resource_tooltip_plugin: + +.. rst-class:: classref-method + +void **remove_resource_tooltip_plugin** **(** :ref:`EditorResourceTooltipPlugin` plugin **)** - There is currently no description for this method. Please help us by :ref:`contributing one `! +Removes an :ref:`EditorResourceTooltipPlugin`. Fails if the plugin wasn't previously added. .. |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_float.rst b/classes/class_float.rst index d7e59a9a1f6..b8bc8076a98 100644 --- a/classes/class_float.rst +++ b/classes/class_float.rst @@ -10,18 +10,18 @@ float ===== -Float built-in type. +A built-in type for floating point numbers. .. rst-class:: classref-introduction-group Description ----------- -The **float** built-in type is a 64-bit double-precision floating-point number, equivalent to ``double`` in C++. This type has 14 reliable decimal digits of precision. The **float** type can be stored in :ref:`Variant`, which is the generic type used by the engine. The maximum value of **float** is approximately ``1.79769e308``, and the minimum is approximately ``-1.79769e308``. +The **float** built-in type is a 64-bit double-precision floating-point number, equivalent to ``double`` in C++. This type has 14 reliable decimal digits of precision. The maximum value of **float** is approximately ``1.79769e308``, and the minimum is approximately ``-1.79769e308``. 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 or deterministic, 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 @@ -200,6 +200,8 @@ Operator Descriptions Returns ``true`` if two floats are different from each other. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -222,7 +224,7 @@ Returns ``true`` if the integer has different value than the float. :ref:`Color` **operator *** **(** :ref:`Color` right **)** -Multiplies each component of the :ref:`Color` by the given **float**. +Multiplies each component of the :ref:`Color`, including the alpha, by the given **float**. :: @@ -468,6 +470,8 @@ Divides a **float** by an :ref:`int`. The result is a **float**. Returns ``true`` if the left float is less than the right one. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -492,6 +496,8 @@ Returns ``true`` if this **float** is less than the given :ref:`int`. Returns ``true`` if the left float is less than or equal to the right one. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -518,6 +524,8 @@ 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:** :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. + .. rst-class:: classref-item-separator ---- @@ -542,6 +550,8 @@ Returns ``true`` if the **float** and the given :ref:`int` are equal. Returns ``true`` if the left float is greater than the right one. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -566,6 +576,8 @@ Returns ``true`` if this **float** is greater than the given :ref:`int` doesn't behave the same as other numbers. Therefore, the results from this operator may not be accurate if NaNs are included. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_flowcontainer.rst b/classes/class_flowcontainer.rst index 943a33194e5..862e9d7b5d5 100644 --- a/classes/class_flowcontainer.rst +++ b/classes/class_flowcontainer.rst @@ -14,16 +14,21 @@ FlowContainer **Inherited By:** :ref:`HFlowContainer`, :ref:`VFlowContainer` -Base class for flow containers. +A container that arranges its child controls horizontally or vertically and wraps them around at the borders. .. rst-class:: classref-introduction-group Description ----------- -Arranges child :ref:`Control` nodes vertically or horizontally in a left-to-right or top-to-bottom flow. +A container that arranges its child controls horizontally or vertically and wraps them around at the borders. This is similar to how text in a book wraps around when no more words can fit on a line. -A line is filled with :ref:`Control` nodes until no more fit on the same line, similar to text in an autowrapped label. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Using Containers <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group diff --git a/classes/class_font.rst b/classes/class_font.rst index 54a2f5069e8..7cf794d10e1 100644 --- a/classes/class_font.rst +++ b/classes/class_font.rst @@ -14,14 +14,14 @@ Font **Inherited By:** :ref:`FontFile`, :ref:`FontVariation`, :ref:`SystemFont` -Base class for fonts and font variations. +Abstract base class for fonts and font variations. .. rst-class:: classref-introduction-group Description ----------- -Font is the abstract base class for font, so it shouldn't be used directly. Other types of fonts inherit from it. +Abstract base class for different font types. It has methods for drawing text and font character introspection. .. rst-class:: classref-reftable-group @@ -31,73 +31,75 @@ Methods .. table:: :widths: auto - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`draw_char` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`int` char, :ref:`int` font_size, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`draw_char_outline` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`int` char, :ref:`int` font_size, :ref:`int` size=-1, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_multiline_string` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_multiline_string_outline` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_string` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_string_outline` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`find_variation` **(** :ref:`Dictionary` variation_coordinates, :ref:`int` face_index=0, :ref:`float` strength=0.0, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0) **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_ascent` **(** :ref:`int` font_size=16 **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_char_size` **(** :ref:`int` char, :ref:`int` font_size **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_descent` **(** :ref:`int` font_size=16 **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_face_count` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Font[]` | :ref:`get_fallbacks` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_font_name` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_font_stretch` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`FontStyle` | :ref:`get_font_style` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_font_style_name` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_font_weight` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_height` **(** :ref:`int` font_size=16 **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_multiline_string_size` **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_opentype_features` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]` | :ref:`get_rids` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_spacing` **(** :ref:`SpacingType` spacing **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_string_size` **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_supported_chars` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_supported_feature_list` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_supported_variation_list` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_underline_position` **(** :ref:`int` font_size=16 **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_underline_thickness` **(** :ref:`int` font_size=16 **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_char` **(** :ref:`int` char **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_language_supported` **(** :ref:`String` language **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_script_supported` **(** :ref:`String` script **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cache_capacity` **(** :ref:`int` single_line, :ref:`int` multi_line **)** | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_fallbacks` **(** :ref:`Font[]` fallbacks **)** | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`draw_char` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`int` char, :ref:`int` font_size, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`draw_char_outline` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`int` char, :ref:`int` font_size, :ref:`int` size=-1, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_multiline_string` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_multiline_string_outline` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_string` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_string_outline` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`find_variation` **(** :ref:`Dictionary` variation_coordinates, :ref:`int` face_index=0, :ref:`float` strength=0.0, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0) **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_ascent` **(** :ref:`int` font_size=16 **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_char_size` **(** :ref:`int` char, :ref:`int` font_size **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_descent` **(** :ref:`int` font_size=16 **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_face_count` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Font[]` | :ref:`get_fallbacks` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_font_name` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_font_stretch` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FontStyle` | :ref:`get_font_style` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_font_style_name` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_font_weight` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_height` **(** :ref:`int` font_size=16 **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_multiline_string_size` **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_opentype_features` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_ot_name_strings` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`get_rids` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_spacing` **(** :ref:`SpacingType` spacing **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_string_size` **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_supported_chars` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_supported_feature_list` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_supported_variation_list` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_underline_position` **(** :ref:`int` font_size=16 **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_underline_thickness` **(** :ref:`int` font_size=16 **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_char` **(** :ref:`int` char **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_language_supported` **(** :ref:`String` language **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_script_supported` **(** :ref:`String` script **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cache_capacity` **(** :ref:`int` single_line, :ref:`int` multi_line **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_fallbacks` **(** :ref:`Font[]` fallbacks **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -140,7 +142,7 @@ Draw a single Unicode character ``char`` outline into a canvas item using the fo .. rst-class:: classref-method -void **draw_multiline_string** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +void **draw_multiline_string** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| 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. @@ -154,7 +156,7 @@ See also :ref:`CanvasItem.draw_multiline_string` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +void **draw_multiline_string_outline** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| Breaks ``text`` to the lines using rules specified by ``brk_flags`` and draws 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 of the first line, not the top. To draw from the top, *ascent* must be added to the Y axis. @@ -168,7 +170,7 @@ See also :ref:`CanvasItem.draw_multiline_string_outline` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +void **draw_string** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| Draw ``text`` 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, not the top. To draw from the top, *ascent* must be added to the Y axis. @@ -182,7 +184,7 @@ See also :ref:`CanvasItem.draw_string`. .. rst-class:: classref-method -void **draw_string_outline** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +void **draw_string_outline** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| 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. @@ -348,7 +350,7 @@ Returns the total average font height (ascent plus descent) in pixels. .. rst-class:: classref-method -:ref:`Vector2` **get_multiline_string_size** **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +:ref:`Vector2` **get_multiline_string_size** **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| Returns the size of a bounding box of a string broken into the lines, taking kerning and advance into account. @@ -370,6 +372,18 @@ Returns a set of OpenType feature tags. More info: `OpenType feature tags ` **get_ot_name_strings** **(** **)** |const| + +Returns :ref:`Dictionary` with OpenType font name strings (localized font names, version, description, license information, sample text, etc.). + +.. rst-class:: classref-item-separator + +---- + .. _class_Font_method_get_rids: .. rst-class:: classref-method @@ -398,7 +412,7 @@ Returns the spacing for the given ``type`` (see :ref:`SpacingType` **get_string_size** **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +:ref:`Vector2` **get_string_size** **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| 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`. @@ -462,6 +476,20 @@ Returns list of supported `variation coordinates `, use :ref:`FontVariation.variation_opentype`. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_fontfile.rst b/classes/class_fontfile.rst index 97f5c0b27a0..902e05dd6e1 100644 --- a/classes/class_fontfile.rst +++ b/classes/class_fontfile.rst @@ -12,7 +12,7 @@ FontFile **Inherits:** :ref:`Font` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Font source data and prerendered glyph cache, imported from dynamic or bitmap font. +Holds font source data and prerendered glyph cache, imported from a dynamic or a bitmap font. .. rst-class:: classref-introduction-group @@ -35,9 +35,9 @@ Supported font formats: \ **Note:** A character is a symbol that represents an item (letter, digit etc.) in an abstract way. -\ **Note:** A glyph is a bitmap or shape used to draw a one or more characters in a context-dependent manner. Glyph indices are bound to the specific font data source. +\ **Note:** A glyph is a bitmap or a shape used to draw one or more characters in a context-dependent manner. Glyph indices are bound to the specific font data source. -\ **Note:** If a none of the font data sources contain glyphs for a character used in a string, the character in question will be replaced with a box displaying its hexadecimal code. +\ **Note:** If none of the font data sources contain glyphs for a character used in a string, the character in question will be replaced with a box displaying its hexadecimal code. .. tabs:: @@ -135,6 +135,8 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_cache_underline_thickness` **(** :ref:`int` cache_index, :ref:`int` size **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_char_from_glyph_index` **(** :ref:`int` size, :ref:`int` glyph_index **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_embolden` **(** :ref:`int` cache_index **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_face_index` **(** :ref:`int` cache_index **)** |const| | @@ -715,6 +717,18 @@ Returns thickness of the underline in pixels. ---- +.. _class_FontFile_method_get_char_from_glyph_index: + +.. rst-class:: classref-method + +:ref:`int` **get_char_from_glyph_index** **(** :ref:`int` size, :ref:`int` glyph_index **)** |const| + +Returns character code associated with ``glyph_index``, or ``0`` if ``glyph_index`` is invalid. See :ref:`get_glyph_index`. + +.. rst-class:: classref-item-separator + +---- + .. _class_FontFile_method_get_embolden: .. rst-class:: classref-method diff --git a/classes/class_fontvariation.rst b/classes/class_fontvariation.rst index 5e3c66edd5f..3d5ba494c41 100644 --- a/classes/class_fontvariation.rst +++ b/classes/class_fontvariation.rst @@ -12,14 +12,14 @@ FontVariation **Inherits:** :ref:`Font` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Variation of the :ref:`Font`. +A variation of a font with additional settings. .. rst-class:: classref-introduction-group Description ----------- -OpenType variations, simulated bold / slant, and additional font settings like OpenType features and extra spacing. +Provides OpenType variations, simulated bold / slant, and additional font settings like OpenType features and extra spacing. To use simulated bold font variant: @@ -44,6 +44,15 @@ To use simulated bold font variant: +To set the coordinate of multiple variation axes: + +:: + + var fv = FontVariation.new(); + var ts = TextServerManager.get_primary_interface() + fv.base_font = load("res://BarlowCondensed-Regular.ttf") + fv.variation_opentype = { ts.name_to_tag("wght"): 900, ts.name_to_tag("custom_hght"): 900 } + .. rst-class:: classref-reftable-group Properties @@ -125,7 +134,7 @@ Base font used to create a variation. If not set, default :ref:`Theme` value **)** - :ref:`Font[]` **get_fallbacks** **(** **)** -Array of fallback :ref:`Font`\ s. If not set :ref:`base_font` fallback are ussed. +Array of fallback :ref:`Font`\ s to use as a substitute if a glyph is not found in this **FontVariation**. If not set, :ref:`base_font`'s fallbacks are used instead. .. rst-class:: classref-item-separator @@ -265,6 +274,10 @@ 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(``int``) and names (``string``). 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`. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_gdscript.rst b/classes/class_gdscript.rst index e3f6f2a88a2..112f7f72bbf 100644 --- a/classes/class_gdscript.rst +++ b/classes/class_gdscript.rst @@ -21,7 +21,9 @@ Description A script implemented in the GDScript programming language. The script extends the functionality of all objects that instantiate it. -\ :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. .. rst-class:: classref-introduction-group diff --git a/classes/class_generic6dofjoint3d.rst b/classes/class_generic6dofjoint3d.rst index a154d1572a9..f00d0bbb4b8 100644 --- a/classes/class_generic6dofjoint3d.rst +++ b/classes/class_generic6dofjoint3d.rst @@ -12,14 +12,16 @@ Generic6DOFJoint3D **Inherits:** :ref:`Joint3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -The generic 6-degrees-of-freedom joint can implement a variety of joint types by locking certain axes' rotation or translation. +A physics joint that allows for complex movement and rotation between two 3D physics bodies. .. rst-class:: classref-introduction-group Description ----------- -The first 3 DOF axes are linear axes, which represent translation of Bodies, and the latter 3 DOF axes represent the angular motion. Each axis can be either locked, or limited. +The **Generic6DOFJoint3D** (6 Degrees Of Freedom) joint allows for implementing custom types of joints by locking the rotation and translation of certain axes. + +The first 3 DOF represent the linear motion of the physics bodies and the last 3 DOF represent the angular motion of the physics bodies. Each axis can be either locked, or limited. .. rst-class:: classref-reftable-group diff --git a/classes/class_geometry2d.rst b/classes/class_geometry2d.rst index f97703f6049..168c23f0481 100644 --- a/classes/class_geometry2d.rst +++ b/classes/class_geometry2d.rst @@ -12,14 +12,14 @@ Geometry2D **Inherits:** :ref:`Object` -Helper node to calculate generic geometry operations in 2D space. +Provides methods for some common 2D geometric operations. .. rst-class:: classref-introduction-group Description ----------- -Geometry2D provides users with a set of helper functions to create geometric shapes, compute intersections between shapes, and process various other geometric operations. +Provides a set of helper functions to create geometric shapes, compute intersections between shapes, and process various other geometric operations in 2D. .. rst-class:: classref-reftable-group diff --git a/classes/class_geometry3d.rst b/classes/class_geometry3d.rst index 3208ed56dbd..af0b8a0352a 100644 --- a/classes/class_geometry3d.rst +++ b/classes/class_geometry3d.rst @@ -12,14 +12,14 @@ Geometry3D **Inherits:** :ref:`Object` -Helper node to calculate generic geometry operations in 3D space. +Provides methods for some common 3D geometric operations. .. rst-class:: classref-introduction-group Description ----------- -Geometry3D provides users with a set of helper functions to create geometric shapes, compute intersections between shapes, and process various other geometric operations. +Provides a set of helper functions to create geometric shapes, compute intersections between shapes, and process various other geometric operations in 3D. .. rst-class:: classref-reftable-group @@ -46,7 +46,7 @@ Methods +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`ray_intersects_triangle` **(** :ref:`Vector3` from, :ref:`Vector3` dir, :ref:`Vector3` a, :ref:`Vector3` b, :ref:`Vector3` c **)** | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array` | :ref:`segment_intersects_convex` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Array` planes **)** | + | :ref:`PackedVector3Array` | :ref:`segment_intersects_convex` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Plane[]` planes **)** | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector3Array` | :ref:`segment_intersects_cylinder` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`float` height, :ref:`float` radius **)** | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -164,7 +164,7 @@ Tests if the 3D ray starting at ``from`` with the direction of ``dir`` intersect .. rst-class:: classref-method -:ref:`PackedVector3Array` **segment_intersects_convex** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Array` planes **)** +:ref:`PackedVector3Array` **segment_intersects_convex** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Plane[]` planes **)** Given a convex hull defined though the :ref:`Plane`\ s in the array ``planes``, tests if the segment (``from``, ``to``) intersects with that hull. If an intersection is found, returns a :ref:`PackedVector3Array` containing the point the intersection and the hull's normal. Otherwise, returns an empty array. diff --git a/classes/class_geometryinstance3d.rst b/classes/class_geometryinstance3d.rst index 3fa2d00dbcd..28f893fb6dd 100644 --- a/classes/class_geometryinstance3d.rst +++ b/classes/class_geometryinstance3d.rst @@ -285,7 +285,7 @@ The selected shadow casting flag. See :ref:`ShadowCastingSetting` value **)** - :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 fine control over the :ref:`MeshInstance3D`'s bounding box. To remove this, set value to an :ref:`AABB` with all fields set to zero. +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 fine 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 @@ -357,6 +357,8 @@ The global illumination mode to use for the whole geometry. To avoid inconsisten If ``true``, disables occlusion culling for this instance. Useful for gizmos that must be rendered even when occlusion culling is in use. +\ **Note:** :ref:`ignore_occlusion_culling` does not affect frustum culling (which is what happens when an object is not visible given the camera's angle). 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)``. + .. rst-class:: classref-item-separator ---- @@ -469,7 +471,7 @@ Starting distance from which the GeometryInstance3D will be visible, taking :ref Margin for the :ref:`visibility_range_begin` threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the :ref:`visibility_range_begin` threshold by this amount. -If :ref:`visibility_range_fade_mode` is :ref:`VISIBILITY_RANGE_FADE_DISABLED`, this acts as an hysteresis distance. If :ref:`visibility_range_fade_mode` is :ref:`VISIBILITY_RANGE_FADE_SELF` or :ref:`VISIBILITY_RANGE_FADE_DEPENDENCIES`, this acts as a fade transition distance and must be set to a value greater than ``0.0`` for the effect to be noticeable. +If :ref:`visibility_range_fade_mode` is :ref:`VISIBILITY_RANGE_FADE_DISABLED`, this acts as a hysteresis distance. If :ref:`visibility_range_fade_mode` is :ref:`VISIBILITY_RANGE_FADE_SELF` or :ref:`VISIBILITY_RANGE_FADE_DEPENDENCIES`, this acts as a fade transition distance and must be set to a value greater than ``0.0`` for the effect to be noticeable. .. rst-class:: classref-item-separator @@ -505,7 +507,7 @@ Distance from which the GeometryInstance3D will be hidden, taking :ref:`visibili Margin for the :ref:`visibility_range_end` threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the :ref:`visibility_range_end` threshold by this amount. -If :ref:`visibility_range_fade_mode` is :ref:`VISIBILITY_RANGE_FADE_DISABLED`, this acts as an hysteresis distance. If :ref:`visibility_range_fade_mode` is :ref:`VISIBILITY_RANGE_FADE_SELF` or :ref:`VISIBILITY_RANGE_FADE_DEPENDENCIES`, this acts as a fade transition distance and must be set to a value greater than ``0.0`` for the effect to be noticeable. +If :ref:`visibility_range_fade_mode` is :ref:`VISIBILITY_RANGE_FADE_DISABLED`, this acts as a hysteresis distance. If :ref:`visibility_range_fade_mode` is :ref:`VISIBILITY_RANGE_FADE_SELF` or :ref:`VISIBILITY_RANGE_FADE_DEPENDENCIES`, this acts as a fade transition distance and must be set to a value greater than ``0.0`` for the effect to be noticeable. .. rst-class:: classref-item-separator diff --git a/classes/class_gltfaccessor.rst b/classes/class_gltfaccessor.rst index 94d66d9e13b..e106825a80e 100644 --- a/classes/class_gltfaccessor.rst +++ b/classes/class_gltfaccessor.rst @@ -25,7 +25,7 @@ Properties :widths: auto +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`int` | :ref:`buffer_view` | ``0`` | + | :ref:`int` | :ref:`buffer_view` | ``-1`` | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ | :ref:`int` | :ref:`byte_offset` | ``0`` | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ @@ -67,7 +67,7 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int` **buffer_view** = ``0`` +:ref:`int` **buffer_view** = ``-1`` .. rst-class:: classref-property-setget diff --git a/classes/class_gltfcollider.rst b/classes/class_gltfcollider.rst new file mode 100644 index 00000000000..a88b254a0e1 --- /dev/null +++ b/classes/class_gltfcollider.rst @@ -0,0 +1,257 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/gltf/doc_classes/GLTFCollider.xml. + +.. _class_GLTFCollider: + +GLTFCollider +============ + +**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +Represents a GLTF collider. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Represents a collider as defined by the ``OMI_collider`` GLTF extension. This class is an intermediary between the GLTF data and Godot's nodes, and it's abstracted in a way that allows adding support for different GLTF physics extensions in the future. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `OMI_collider GLTF extension `__ + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------------------+-----------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`height` | ``2.0`` | + +-----------------------------------------+-----------------------------------------------------------------+----------------------+ + | :ref:`ImporterMesh` | :ref:`importer_mesh` | | + +-----------------------------------------+-----------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`is_trigger` | ``false`` | + +-----------------------------------------+-----------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`mesh_index` | ``-1`` | + +-----------------------------------------+-----------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`radius` | ``0.5`` | + +-----------------------------------------+-----------------------------------------------------------------+----------------------+ + | :ref:`String` | :ref:`shape_type` | ``""`` | + +-----------------------------------------+-----------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`size` | ``Vector3(1, 1, 1)`` | + +-----------------------------------------+-----------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFCollider` | :ref:`from_dictionary` **(** :ref:`Dictionary` dictionary **)** |static| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFCollider` | :ref:`from_node` **(** :ref:`CollisionShape3D` collider_node **)** |static| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`to_dictionary` **(** **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CollisionShape3D` | :ref:`to_node` **(** :ref:`bool` cache_shapes=false **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_GLTFCollider_property_height: + +.. rst-class:: classref-property + +:ref:`float` **height** = ``2.0`` + +.. rst-class:: classref-property-setget + +- void **set_height** **(** :ref:`float` value **)** +- :ref:`float` **get_height** **(** **)** + +The height of the collider, in meters. This is only used when the collider type is "capsule" or "cylinder". This value should not be negative, and for "capsule" it should be at least twice the radius. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFCollider_property_importer_mesh: + +.. rst-class:: classref-property + +:ref:`ImporterMesh` **importer_mesh** + +.. rst-class:: classref-property-setget + +- void **set_importer_mesh** **(** :ref:`ImporterMesh` value **)** +- :ref:`ImporterMesh` **get_importer_mesh** **(** **)** + +The :ref:`ImporterMesh` resource of the collider. This is only used when the collider type is "hull" (convex hull) or "trimesh" (concave trimesh). + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFCollider_property_is_trigger: + +.. rst-class:: classref-property + +:ref:`bool` **is_trigger** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_is_trigger** **(** :ref:`bool` value **)** +- :ref:`bool` **get_is_trigger** **(** **)** + +If ``true``, indicates that this collider is a trigger. For Godot, this means that the collider 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. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFCollider_property_mesh_index: + +.. rst-class:: classref-property + +:ref:`int` **mesh_index** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_mesh_index** **(** :ref:`int` value **)** +- :ref:`int` **get_mesh_index** **(** **)** + +The index of the collider's mesh in the GLTF file. This is only used when the collider type is "hull" (convex hull) or "trimesh" (concave trimesh). + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFCollider_property_radius: + +.. rst-class:: classref-property + +:ref:`float` **radius** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_radius** **(** **)** + +The radius of the collider, in meters. This is only used when the collider type is "capsule", "cylinder", or "sphere". This value should not be negative. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFCollider_property_shape_type: + +.. rst-class:: classref-property + +:ref:`String` **shape_type** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_shape_type** **(** :ref:`String` value **)** +- :ref:`String` **get_shape_type** **(** **)** + +The type of shape this collider represents. Valid values are "box", "capsule", "cylinder", "sphere", "hull", and "trimesh". + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFCollider_property_size: + +.. rst-class:: classref-property + +:ref:`Vector3` **size** = ``Vector3(1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_size** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_size** **(** **)** + +The size of the collider, in meters. This is only used when the collider type is "box", and it represents the "diameter" of the box. This value should not be negative. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_GLTFCollider_method_from_dictionary: + +.. rst-class:: classref-method + +:ref:`GLTFCollider` **from_dictionary** **(** :ref:`Dictionary` dictionary **)** |static| + +Creates a new GLTFCollider instance by parsing the given :ref:`Dictionary`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFCollider_method_from_node: + +.. rst-class:: classref-method + +:ref:`GLTFCollider` **from_node** **(** :ref:`CollisionShape3D` collider_node **)** |static| + +Create a new GLTFCollider instance from the given Godot :ref:`CollisionShape3D` node. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFCollider_method_to_dictionary: + +.. rst-class:: classref-method + +:ref:`Dictionary` **to_dictionary** **(** **)** |const| + +Serializes this GLTFCollider instance into a :ref:`Dictionary`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFCollider_method_to_node: + +.. rst-class:: classref-method + +:ref:`CollisionShape3D` **to_node** **(** :ref:`bool` cache_shapes=false **)** + +Converts this GLTFCollider instance into a Godot :ref:`CollisionShape3D` node. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_gltfdocumentextension.rst b/classes/class_gltfdocumentextension.rst index 98ea59caec2..d5d8b87fdbb 100644 --- a/classes/class_gltfdocumentextension.rst +++ b/classes/class_gltfdocumentextension.rst @@ -35,29 +35,33 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_convert_scene_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Node` scene_node **)** |virtual| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_export_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_export_post` **(** :ref:`GLTFState` state **)** |virtual| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_export_preflight` **(** :ref:`GLTFState` state, :ref:`Node` root **)** |virtual| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node3D` | :ref:`_generate_scene_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Node` scene_parent **)** |virtual| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_supported_extensions` **(** **)** |virtual| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_import_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_import_post` **(** :ref:`GLTFState` state, :ref:`Node` root **)** |virtual| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_import_post_parse` **(** :ref:`GLTFState` state **)** |virtual| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_import_preflight` **(** :ref:`GLTFState` state, :ref:`PackedStringArray` extensions **)** |virtual| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_parse_node_extensions` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` extensions **)** |virtual| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_convert_scene_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Node` scene_node **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_post` **(** :ref:`GLTFState` state **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_preflight` **(** :ref:`GLTFState` state, :ref:`Node` root **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node3D` | :ref:`_generate_scene_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Node` scene_parent **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_supported_extensions` **(** **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_import_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_import_post` **(** :ref:`GLTFState` state, :ref:`Node` root **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_import_post_parse` **(** :ref:`GLTFState` state **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_import_preflight` **(** :ref:`GLTFState` state, :ref:`PackedStringArray` extensions **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_parse_image_data` **(** :ref:`GLTFState` state, :ref:`PackedByteArray` image_data, :ref:`String` mime_type, :ref:`Image` ret_image **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_parse_node_extensions` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` extensions **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_parse_texture_json` **(** :ref:`GLTFState` state, :ref:`Dictionary` texture_json, :ref:`GLTFTexture` ret_gltf_texture **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -208,6 +212,20 @@ The return value is used to determine if this **GLTFDocumentExtension** instance ---- +.. _class_GLTFDocumentExtension_method__parse_image_data: + +.. rst-class:: classref-method + +:ref:`Error` **_parse_image_data** **(** :ref:`GLTFState` state, :ref:`PackedByteArray` image_data, :ref:`String` mime_type, :ref:`Image` ret_image **)** |virtual| + +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. + +.. rst-class:: classref-item-separator + +---- + .. _class_GLTFDocumentExtension_method__parse_node_extensions: .. rst-class:: classref-method @@ -218,6 +236,20 @@ Part of the import process. This method is run after :ref:`_get_supported_extens 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 + +---- + +.. _class_GLTFDocumentExtension_method__parse_texture_json: + +.. rst-class:: classref-method + +:ref:`Error` **_parse_texture_json** **(** :ref:`GLTFState` state, :ref:`Dictionary` texture_json, :ref:`GLTFTexture` ret_gltf_texture **)** |virtual| + +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. + .. |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_gltfnode.rst b/classes/class_gltfnode.rst index dd743c718b2..342468c5233 100644 --- a/classes/class_gltfnode.rst +++ b/classes/class_gltfnode.rst @@ -21,6 +21,8 @@ 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`. + .. rst-class:: classref-introduction-group Tutorials @@ -96,9 +98,7 @@ Property Descriptions - void **set_camera** **(** :ref:`int` value **)** - :ref:`int` **get_camera** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If this GLTF node is a camera, the index of the :ref:`GLTFCamera` in the :ref:`GLTFState` that describes the camera's properties. If -1, this node is not a camera. .. rst-class:: classref-item-separator @@ -115,9 +115,7 @@ Property Descriptions - void **set_children** **(** :ref:`PackedInt32Array` value **)** - :ref:`PackedInt32Array` **get_children** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The indices of the children nodes in the :ref:`GLTFState`. If this GLTF node has no children, this will be an empty array. .. rst-class:: classref-item-separator @@ -134,9 +132,7 @@ Property Descriptions - void **set_height** **(** :ref:`int` value **)** - :ref:`int` **get_height** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +How deep into the node hierarchy this node is. A root node will have a height of 0, its children will have a height of 1, and so on. If -1, the height has not been calculated. .. rst-class:: classref-item-separator @@ -153,9 +149,7 @@ Property Descriptions - void **set_light** **(** :ref:`int` value **)** - :ref:`int` **get_light** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If this GLTF node is a light, the index of the :ref:`GLTFLight` in the :ref:`GLTFState` that describes the light's properties. If -1, this node is not a light. .. rst-class:: classref-item-separator @@ -172,9 +166,7 @@ Property Descriptions - void **set_mesh** **(** :ref:`int` value **)** - :ref:`int` **get_mesh** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If this GLTF node is a mesh, the index of the :ref:`GLTFMesh` in the :ref:`GLTFState` that describes the mesh's properties. If -1, this node is not a mesh. .. rst-class:: classref-item-separator @@ -191,9 +183,7 @@ Property Descriptions - void **set_parent** **(** :ref:`int` value **)** - :ref:`int` **get_parent** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The index of the parent node in the :ref:`GLTFState`. If -1, this node is a root node. .. rst-class:: classref-item-separator @@ -210,9 +200,7 @@ Property Descriptions - void **set_position** **(** :ref:`Vector3` value **)** - :ref:`Vector3` **get_position** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The position of the GLTF node relative to its parent. .. rst-class:: classref-item-separator @@ -229,9 +217,7 @@ Property Descriptions - void **set_rotation** **(** :ref:`Quaternion` value **)** - :ref:`Quaternion` **get_rotation** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The rotation of the GLTF node relative to its parent. .. rst-class:: classref-item-separator @@ -248,9 +234,7 @@ Property Descriptions - void **set_scale** **(** :ref:`Vector3` value **)** - :ref:`Vector3` **get_scale** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The scale of the GLTF node relative to its parent. .. rst-class:: classref-item-separator @@ -267,9 +251,7 @@ Property Descriptions - void **set_skeleton** **(** :ref:`int` value **)** - :ref:`int` **get_skeleton** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If this GLTF node has a skeleton, the index of the :ref:`GLTFSkeleton` in the :ref:`GLTFState` that describes the skeleton's properties. If -1, this node does not have a skeleton. .. rst-class:: classref-item-separator @@ -286,9 +268,7 @@ Property Descriptions - void **set_skin** **(** :ref:`int` value **)** - :ref:`int` **get_skin** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If this GLTF node has a skin, the index of the :ref:`GLTFSkin` in the :ref:`GLTFState` that describes the skin's properties. If -1, this node does not have a skin. .. rst-class:: classref-item-separator @@ -305,9 +285,7 @@ Property Descriptions - void **set_xform** **(** :ref:`Transform3D` value **)** - :ref:`Transform3D` **get_xform** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The transform of the GLTF node relative to its parent. This property is usually unused since the position, rotation, and scale properties are preferred. .. rst-class:: classref-section-separator diff --git a/classes/class_gltfphysicsbody.rst b/classes/class_gltfphysicsbody.rst new file mode 100644 index 00000000000..c5c26c52531 --- /dev/null +++ b/classes/class_gltfphysicsbody.rst @@ -0,0 +1,219 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/gltf/doc_classes/GLTFPhysicsBody.xml. + +.. _class_GLTFPhysicsBody: + +GLTFPhysicsBody +=============== + +**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +Represents a GLTF physics body. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Represents a physics body as defined by the ``OMI_physics_body`` GLTF extension. This class is an intermediary between the GLTF data and Godot's nodes, and it's abstracted in a way that allows adding support for different GLTF physics extensions in the future. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `OMI_physics_body GLTF extension `__ + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------------+--------------------------------------------------------------------------+--------------------------------------+ + | :ref:`Vector3` | :ref:`angular_velocity` | ``Vector3(0, 0, 0)`` | + +-------------------------------+--------------------------------------------------------------------------+--------------------------------------+ + | :ref:`String` | :ref:`body_type` | ``"static"`` | + +-------------------------------+--------------------------------------------------------------------------+--------------------------------------+ + | :ref:`Basis` | :ref:`inertia_tensor` | ``Basis(0, 0, 0, 0, 0, 0, 0, 0, 0)`` | + +-------------------------------+--------------------------------------------------------------------------+--------------------------------------+ + | :ref:`Vector3` | :ref:`linear_velocity` | ``Vector3(0, 0, 0)`` | + +-------------------------------+--------------------------------------------------------------------------+--------------------------------------+ + | :ref:`float` | :ref:`mass` | ``1.0`` | + +-------------------------------+--------------------------------------------------------------------------+--------------------------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFPhysicsBody` | :ref:`from_dictionary` **(** :ref:`Dictionary` dictionary **)** |static| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFPhysicsBody` | :ref:`from_node` **(** :ref:`CollisionObject3D` body_node **)** |static| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`to_dictionary` **(** **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CollisionObject3D` | :ref:`to_node` **(** **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_GLTFPhysicsBody_property_angular_velocity: + +.. rst-class:: classref-property + +:ref:`Vector3` **angular_velocity** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_angular_velocity** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_angular_velocity** **(** **)** + +The angular velocity of the physics body, in radians per second. This is only used when the body type is "rigid" or "vehicle". + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFPhysicsBody_property_body_type: + +.. rst-class:: classref-property + +:ref:`String` **body_type** = ``"static"`` + +.. rst-class:: classref-property-setget + +- void **set_body_type** **(** :ref:`String` value **)** +- :ref:`String` **get_body_type** **(** **)** + +The type of the body. Valid values are "static", "kinematic", "character", "rigid", "vehicle", and "trigger". + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFPhysicsBody_property_inertia_tensor: + +.. rst-class:: classref-property + +:ref:`Basis` **inertia_tensor** = ``Basis(0, 0, 0, 0, 0, 0, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_inertia_tensor** **(** :ref:`Basis` value **)** +- :ref:`Basis` **get_inertia_tensor** **(** **)** + +The inertia tensor of the physics body, in kilogram meter squared (kg⋅m²). This is only used when the body type is "rigid" or "vehicle". + +When converted to a Godot :ref:`RigidBody3D` node, if this value is zero, then the inertia will be calculated automatically. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFPhysicsBody_property_linear_velocity: + +.. rst-class:: classref-property + +:ref:`Vector3` **linear_velocity** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_linear_velocity** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_linear_velocity** **(** **)** + +The linear velocity of the physics body, in meters per second. This is only used when the body type is "rigid" or "vehicle". + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFPhysicsBody_property_mass: + +.. rst-class:: classref-property + +:ref:`float` **mass** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_mass** **(** :ref:`float` value **)** +- :ref:`float` **get_mass** **(** **)** + +The mass of the physics body, in kilograms. This is only used when the body type is "rigid" or "vehicle". + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_GLTFPhysicsBody_method_from_dictionary: + +.. rst-class:: classref-method + +:ref:`GLTFPhysicsBody` **from_dictionary** **(** :ref:`Dictionary` dictionary **)** |static| + +Creates a new GLTFPhysicsBody instance by parsing the given :ref:`Dictionary`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFPhysicsBody_method_from_node: + +.. rst-class:: classref-method + +:ref:`GLTFPhysicsBody` **from_node** **(** :ref:`CollisionObject3D` body_node **)** |static| + +Create a new GLTFPhysicsBody instance from the given Godot :ref:`CollisionObject3D` node. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFPhysicsBody_method_to_dictionary: + +.. rst-class:: classref-method + +:ref:`Dictionary` **to_dictionary** **(** **)** |const| + +Serializes this GLTFPhysicsBody instance into a :ref:`Dictionary`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFPhysicsBody_method_to_node: + +.. rst-class:: classref-method + +:ref:`CollisionObject3D` **to_node** **(** **)** |const| + +Converts this GLTFPhysicsBody instance into a Godot :ref:`CollisionObject3D` node. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_gltfskeleton.rst b/classes/class_gltfskeleton.rst index 7bd01c24232..51359d52df5 100644 --- a/classes/class_gltfskeleton.rst +++ b/classes/class_gltfskeleton.rst @@ -140,9 +140,7 @@ Method Descriptions :ref:`Dictionary` **get_godot_bone_node** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns a :ref:`Dictionary` that maps skeleton bone indices to the indices of GLTF nodes. This property is unused during import, and only set during export. In a GLTF file, a bone is a node, so Godot converts skeleton bones to GLTF nodes. .. rst-class:: classref-item-separator @@ -182,9 +180,7 @@ Method Descriptions void **set_godot_bone_node** **(** :ref:`Dictionary` godot_bone_node **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets a :ref:`Dictionary` that maps skeleton bone indices to the indices of GLTF nodes. This property is unused during import, and only set during export. In a GLTF file, a bone is a node, so Godot converts skeleton bones to GLTF nodes. .. rst-class:: classref-item-separator diff --git a/classes/class_gltfstate.rst b/classes/class_gltfstate.rst index f30b1953530..f190555ff6c 100644 --- a/classes/class_gltfstate.rst +++ b/classes/class_gltfstate.rst @@ -12,9 +12,16 @@ GLTFState **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Represents all data of a GLTF file. + +.. rst-class:: classref-introduction-group + +Description +----------- - There is currently no description for this class. Please help us by :ref:`contributing one `! +Contains all nodes and resources of a GLTF file. This is used by :ref:`GLTFDocument` as data storage, which allows :ref:`GLTFDocument` and all :ref:`GLTFDocumentExtension` classes to remain stateless. + +GLTFState can be populated by :ref:`GLTFDocument` reading a file or by converting a Godot scene. Then the data can either be used to create a Godot scene or save to a GLTF file. The code that converts to/from a Godot scene can be intercepted at arbitrary points by :ref:`GLTFDocumentExtension` classes. This allows for custom data to be stored in the GLTF file or for custom data to be converted to/from Godot nodes. .. rst-class:: classref-reftable-group @@ -81,6 +88,8 @@ Methods +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`GLTFMesh[]` | :ref:`get_meshes` **(** **)** | +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_node_index` **(** :ref:`Node` scene_node **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`GLTFNode[]` | :ref:`get_nodes` **(** **)** | +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Node` | :ref:`get_scene_node` **(** :ref:`int` idx **)** | @@ -326,9 +335,7 @@ Property Descriptions - void **set_root_nodes** **(** :ref:`PackedInt32Array` value **)** - :ref:`PackedInt32Array` **get_root_nodes** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The root nodes of the GLTF file. Typically, a GLTF file will only have one scene, and therefore one root node. However, a GLTF file may have multiple scenes and therefore multiple root nodes, which will be generated as siblings of each other and as children of the root node of the generated Godot scene. .. rst-class:: classref-item-separator @@ -345,9 +352,7 @@ Property Descriptions - void **set_scene_name** **(** :ref:`String` value **)** - :ref:`String` **get_scene_name** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The name of the scene. When importing, if not specified, this will be the file name. When exporting, if specified, the scene name will be saved to the GLTF file. .. rst-class:: classref-item-separator @@ -423,9 +428,7 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_animation_player** **(** :ref:`int` idx **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the :ref:`AnimationPlayer` node with the given index. These nodes are only used during the export process when converting Godot :ref:`AnimationPlayer` nodes to GLTF animations. .. rst-class:: classref-item-separator @@ -437,9 +440,7 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_animation_players_count** **(** :ref:`int` idx **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the number of :ref:`AnimationPlayer` nodes in this **GLTFState**. These nodes are only used during the export process when converting Godot :ref:`AnimationPlayer` nodes to GLTF animations. .. rst-class:: classref-item-separator @@ -451,9 +452,7 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_animations** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns an array of all :ref:`GLTFAnimation`\ s in the GLTF file. When importing, these will be generated as animations in an :ref:`AnimationPlayer` node. When exporting, these will be generated from Godot :ref:`AnimationPlayer` nodes. .. rst-class:: classref-item-separator @@ -479,9 +478,7 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_cameras** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns an array of all :ref:`GLTFCamera`\ s in the GLTF file. These are the cameras that the :ref:`GLTFNode.camera` index refers to. .. rst-class:: classref-item-separator @@ -507,9 +504,7 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_images** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Gets the images of the GLTF file as an array of :ref:`Texture2D`\ s. These are the images that the :ref:`GLTFTexture.src_image` index refers to. .. rst-class:: classref-item-separator @@ -521,9 +516,7 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_lights** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns an array of all :ref:`GLTFLight`\ s in the GLTF file. These are the lights that the :ref:`GLTFNode.light` index refers to. .. rst-class:: classref-item-separator @@ -549,9 +542,21 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_meshes** **(** **)** -.. container:: contribute +Returns an array of all :ref:`GLTFMesh`\ es in the GLTF file. These are the meshes that the :ref:`GLTFNode.mesh` index refers to. - There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFState_method_get_node_index: + +.. rst-class:: classref-method + +:ref:`int` **get_node_index** **(** :ref:`Node` scene_node **)** + +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. .. rst-class:: classref-item-separator @@ -563,9 +568,7 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_nodes** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns an array of all :ref:`GLTFNode`\ s in the GLTF file. These are the nodes that :ref:`GLTFNode.children` and :ref:`root_nodes` refer to. This includes nodes that may not be generated in the Godot scene, or nodes that may generate multiple Godot scene nodes. .. rst-class:: classref-item-separator @@ -577,9 +580,9 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_scene_node** **(** :ref:`int` idx **)** -.. container:: contribute +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. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **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. .. rst-class:: classref-item-separator @@ -591,9 +594,7 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_skeletons** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns an array of all :ref:`GLTFSkeleton`\ s in the GLTF file. These are the skeletons that the :ref:`GLTFNode.skeleton` index refers to. .. rst-class:: classref-item-separator @@ -605,9 +606,7 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_skins** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns an array of all :ref:`GLTFSkin`\ s in the GLTF file. These are the skins that the :ref:`GLTFNode.skin` index refers to. .. rst-class:: classref-item-separator @@ -645,9 +644,7 @@ Retrieves the array of texture samplers that are used by the textures contained :ref:`String[]` **get_unique_animation_names** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns an array of unique animation names. This is only used during the import process. .. rst-class:: classref-item-separator @@ -659,9 +656,7 @@ Retrieves the array of texture samplers that are used by the textures contained :ref:`String[]` **get_unique_names** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns an array of unique node names. This is used in both the import process and export process. .. rst-class:: classref-item-separator @@ -701,9 +696,7 @@ The first argument should be the :ref:`GLTFDocumentExtension` animations **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`GLTFAnimation`\ s in the state. When importing, these will be generated as animations in an :ref:`AnimationPlayer` node. When exporting, these will be generated from Godot :ref:`AnimationPlayer` nodes. .. rst-class:: classref-item-separator @@ -729,9 +722,7 @@ void **set_buffer_views** **(** :ref:`GLTFBufferView[]` bu void **set_cameras** **(** :ref:`GLTFCamera[]` cameras **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`GLTFCamera`\ s in the state. These are the cameras that the :ref:`GLTFNode.camera` index refers to. .. rst-class:: classref-item-separator @@ -757,9 +748,7 @@ void **set_handle_binary_image** **(** :ref:`int` method **)** void **set_images** **(** :ref:`Texture2D[]` images **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the images in the state stored as an array of :ref:`Texture2D`\ s. This can be used during export. These are the images that the :ref:`GLTFTexture.src_image` index refers to. .. rst-class:: classref-item-separator @@ -771,9 +760,7 @@ void **set_images** **(** :ref:`Texture2D[]` images **)** void **set_lights** **(** :ref:`GLTFLight[]` lights **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`GLTFLight`\ s in the state. These are the lights that the :ref:`GLTFNode.light` index refers to. .. rst-class:: classref-item-separator @@ -799,9 +786,7 @@ void **set_materials** **(** :ref:`Material[]` materials **)** void **set_meshes** **(** :ref:`GLTFMesh[]` meshes **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`GLTFMesh`\ es in the state. These are the meshes that the :ref:`GLTFNode.mesh` index refers to. .. rst-class:: classref-item-separator @@ -813,9 +798,7 @@ void **set_meshes** **(** :ref:`GLTFMesh[]` meshes **)** void **set_nodes** **(** :ref:`GLTFNode[]` nodes **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`GLTFNode`\ s in the state. These are the nodes that :ref:`GLTFNode.children` and :ref:`root_nodes` refer to. Some of the nodes set here may not be generated in the Godot scene, or may generate multiple Godot scene nodes. .. rst-class:: classref-item-separator @@ -827,9 +810,7 @@ void **set_nodes** **(** :ref:`GLTFNode[]` nodes **)** void **set_skeletons** **(** :ref:`GLTFSkeleton[]` skeletons **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`GLTFSkeleton`\ s in the state. These are the skeletons that the :ref:`GLTFNode.skeleton` index refers to. .. rst-class:: classref-item-separator @@ -841,9 +822,7 @@ void **set_skeletons** **(** :ref:`GLTFSkeleton[]` skeletons void **set_skins** **(** :ref:`GLTFSkin[]` skins **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`GLTFSkin`\ s in the state. These are the skins that the :ref:`GLTFNode.skin` index refers to. .. rst-class:: classref-item-separator @@ -881,9 +860,7 @@ void **set_textures** **(** :ref:`GLTFTexture[]` textures **) void **set_unique_animation_names** **(** :ref:`String[]` unique_animation_names **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the unique animation names in the state. This is only used during the import process. .. rst-class:: classref-item-separator @@ -895,9 +872,7 @@ void **set_unique_animation_names** **(** :ref:`String[]` unique_a void **set_unique_names** **(** :ref:`String[]` unique_names **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the unique node names in the state. This is used in both the import process and export process. .. |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_gltftexture.rst b/classes/class_gltftexture.rst index 934b0361456..87821a8d0b8 100644 --- a/classes/class_gltftexture.rst +++ b/classes/class_gltftexture.rst @@ -27,7 +27,7 @@ Properties +-----------------------+--------------------------------------------------------+--------+ | :ref:`int` | :ref:`sampler` | ``-1`` | +-----------------------+--------------------------------------------------------+--------+ - | :ref:`int` | :ref:`src_image` | ``0`` | + | :ref:`int` | :ref:`src_image` | ``-1`` | +-----------------------+--------------------------------------------------------+--------+ .. rst-class:: classref-section-separator @@ -60,16 +60,14 @@ ID of the texture sampler to use when sampling the image. If -1, then the defaul .. rst-class:: classref-property -:ref:`int` **src_image** = ``0`` +:ref:`int` **src_image** = ``-1`` .. rst-class:: classref-property-setget - void **set_src_image** **(** :ref:`int` value **)** - :ref:`int` **get_src_image** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +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_gpuparticlescollisionheightfield3d.rst b/classes/class_gpuparticlescollisionheightfield3d.rst index 1babcdb91cc..3bdc1b71617 100644 --- a/classes/class_gpuparticlescollisionheightfield3d.rst +++ b/classes/class_gpuparticlescollisionheightfield3d.rst @@ -134,7 +134,7 @@ enum **UpdateMode**: :ref:`UpdateMode` **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. +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: diff --git a/classes/class_gradient.rst b/classes/class_gradient.rst index 41059a37fc4..8fdeb2b646e 100644 --- a/classes/class_gradient.rst +++ b/classes/class_gradient.rst @@ -31,13 +31,15 @@ Properties .. table:: :widths: auto - +-----------------------------------------------------------+-----------------------------------------------------------------------+----------------------------------------------+ - | :ref:`PackedColorArray` | :ref:`colors` | ``PackedColorArray(0, 0, 0, 1, 1, 1, 1, 1)`` | - +-----------------------------------------------------------+-----------------------------------------------------------------------+----------------------------------------------+ - | :ref:`InterpolationMode` | :ref:`interpolation_mode` | ``0`` | - +-----------------------------------------------------------+-----------------------------------------------------------------------+----------------------------------------------+ - | :ref:`PackedFloat32Array` | :ref:`offsets` | ``PackedFloat32Array(0, 1)`` | - +-----------------------------------------------------------+-----------------------------------------------------------------------+----------------------------------------------+ + +-----------------------------------------------------------+-------------------------------------------------------------------------------------+----------------------------------------------+ + | :ref:`PackedColorArray` | :ref:`colors` | ``PackedColorArray(0, 0, 0, 1, 1, 1, 1, 1)`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------+----------------------------------------------+ + | :ref:`ColorSpace` | :ref:`interpolation_color_space` | ``0`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------+----------------------------------------------+ + | :ref:`InterpolationMode` | :ref:`interpolation_mode` | ``0`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------+----------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`offsets` | ``PackedFloat32Array(0, 1)`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------+----------------------------------------------+ .. rst-class:: classref-reftable-group @@ -106,6 +108,40 @@ Constant interpolation, color changes abruptly at each point and stays uniform b Cubic interpolation. +.. rst-class:: classref-item-separator + +---- + +.. _enum_Gradient_ColorSpace: + +.. rst-class:: classref-enumeration + +enum **ColorSpace**: + +.. _class_Gradient_constant_GRADIENT_COLOR_SPACE_SRGB: + +.. rst-class:: classref-enumeration-constant + +:ref:`ColorSpace` **GRADIENT_COLOR_SPACE_SRGB** = ``0`` + +sRGB color space. + +.. _class_Gradient_constant_GRADIENT_COLOR_SPACE_LINEAR_SRGB: + +.. rst-class:: classref-enumeration-constant + +:ref:`ColorSpace` **GRADIENT_COLOR_SPACE_LINEAR_SRGB** = ``1`` + +Linear sRGB color space. + +.. _class_Gradient_constant_GRADIENT_COLOR_SPACE_OKLAB: + +.. rst-class:: classref-enumeration-constant + +:ref:`ColorSpace` **GRADIENT_COLOR_SPACE_OKLAB** = ``2`` + +`Oklab `__ color space. This color space provides a smooth and uniform-looking transition between colors. + .. rst-class:: classref-section-separator ---- @@ -132,6 +168,25 @@ Gradient's colors returned as a :ref:`PackedColorArray`. ---- +.. _class_Gradient_property_interpolation_color_space: + +.. rst-class:: classref-property + +:ref:`ColorSpace` **interpolation_color_space** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_interpolation_color_space** **(** :ref:`ColorSpace` value **)** +- :ref:`ColorSpace` **get_interpolation_color_space** **(** **)** + +The color space used to interpolate between points of the gradient. It does not affect the returned colors, which will always be in sRGB space. See :ref:`ColorSpace` for available modes. + +\ **Note:** This setting has no effect when :ref:`interpolation_mode` is set to :ref:`GRADIENT_INTERPOLATE_CONSTANT`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Gradient_property_interpolation_mode: .. rst-class:: classref-property @@ -143,7 +198,7 @@ Gradient's colors returned as a :ref:`PackedColorArray`. - void **set_interpolation_mode** **(** :ref:`InterpolationMode` value **)** - :ref:`InterpolationMode` **get_interpolation_mode** **(** **)** -Defines how the colors between points of the gradient are interpolated. See :ref:`InterpolationMode` for available modes. +The algorithm used to interpolate between points of the gradient. See :ref:`InterpolationMode` for available modes. .. rst-class:: classref-item-separator @@ -239,6 +294,8 @@ void **reverse** **(** **)** Reverses/mirrors the gradient. +\ **Note:** This method mirrors all points around the middle of the gradient, which may produce unexpected results when :ref:`interpolation_mode` is set to :ref:`GRADIENT_INTERPOLATE_CONSTANT`. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_gradienttexture2d.rst b/classes/class_gradienttexture2d.rst index d9913c3af51..11f191c422e 100644 --- a/classes/class_gradienttexture2d.rst +++ b/classes/class_gradienttexture2d.rst @@ -80,6 +80,14 @@ The colors are linearly interpolated in a straight line. The colors are linearly interpolated in a circular pattern. +.. _class_GradientTexture2D_constant_FILL_SQUARE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Fill` **FILL_SQUARE** = ``2`` + +The colors are linearly interpolated in a square pattern. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_graphedit.rst b/classes/class_graphedit.rst index 0940b2e4656..37b1e1207a9 100644 --- a/classes/class_graphedit.rst +++ b/classes/class_graphedit.rst @@ -12,18 +12,16 @@ GraphEdit **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -GraphEdit is a control responsible for displaying and manipulating graph-like data using :ref:`GraphNode`\ s. It provides access to creation, removal, connection, and disconnection of nodes. +An editor for graph-like structures, using :ref:`GraphNode`\ s. .. rst-class:: classref-introduction-group Description ----------- -**Note:** Please be aware that this node will undergo extensive refactoring in a future 4.x version involving compatibility-breaking API changes. +**GraphEdit** provides tools for creation, manipulation, and display of various graphs. Its main purpose in the engine is to power the visual programming systems, such as visual shaders, but it is also available for use in user projects. -GraphEdit provides tools for creation, manipulation, and display of various graphs. Its main purpose in the engine is to power the visual programming systems, such as visual shaders, but it is also available for use in user projects. - -GraphEdit by itself is only an empty container, representing an infinite grid where :ref:`GraphNode`\ s can be placed. Each :ref:`GraphNode` represent a node in the graph, a single unit of data in the connected scheme. GraphEdit, in turn, helps to control various interactions with nodes and between nodes. When the user attempts to connect, disconnect, or close a :ref:`GraphNode`, a signal is emitted in the GraphEdit, but no action is taken by default. It is the responsibility of the programmer utilizing this control to implement the necessary logic to determine how each request should be handled. +\ **GraphEdit** by itself is only an empty container, representing an infinite grid where :ref:`GraphNode`\ s can be placed. Each :ref:`GraphNode` represents a node in the graph, a single unit of data in the connected scheme. **GraphEdit**, in turn, helps to control various interactions with nodes and between nodes. When the user attempts to connect, disconnect, or close a :ref:`GraphNode`, a signal is emitted in the **GraphEdit**, but no action is taken by default. It is the responsibility of the programmer utilizing this control to implement the necessary logic to determine how each request should be handled. \ **Performance:** It is greatly advised to enable low-processor usage mode (see :ref:`OS.low_processor_usage_mode`) when using GraphEdits. @@ -727,8 +725,8 @@ Below is a sample code to help get started: :: func _is_in_input_hotzone(in_node, in_port, mouse_position): - var port_size : Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical")) - var port_pos : Vector2 = in_node.get_position() + in_node.get_connection_input_position(in_port) - port_size / 2 + var port_size: Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical")) + var port_pos: Vector2 = in_node.get_position() + in_node.get_connection_input_position(in_port) - port_size / 2 var rect = Rect2(port_pos, port_size) return rect.has_point(mouse_position) @@ -750,8 +748,8 @@ Below is a sample code to help get started: :: func _is_in_output_hotzone(in_node, in_port, mouse_position): - var port_size : Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical")) - var port_pos : Vector2 = in_node.get_position() + in_node.get_connection_output_position(in_port) - port_size / 2 + var port_size: Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical")) + var port_pos: Vector2 = in_node.get_position() + in_node.get_connection_output_position(in_port) - port_size / 2 var rect = Rect2(port_pos, port_size) return rect.has_point(mouse_position) diff --git a/classes/class_graphnode.rst b/classes/class_graphnode.rst index 784a50a297f..11bba183c16 100644 --- a/classes/class_graphnode.rst +++ b/classes/class_graphnode.rst @@ -12,22 +12,20 @@ GraphNode **Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -GraphNode is a :ref:`Container` control that represents a single data unit in a :ref:`GraphEdit` graph. You can customize the number, type, and color of left- and right-side connection ports. +A container with connection ports, representing a node in a :ref:`GraphEdit`. .. rst-class:: classref-introduction-group Description ----------- -**Note:** Please be aware that this node will undergo extensive refactoring in a future 4.x version involving compatibility-breaking API changes. +**GraphNode** allows to create nodes for a :ref:`GraphEdit` graph with customizable content based on its child controls. **GraphNode** is derived from :ref:`Container` and it is responsible for placing its children on screen. This works similar to :ref:`VBoxContainer`. Children, in turn, provide **GraphNode** with so-called slots, each of which can have a connection port on either side. -GraphNode allows to create nodes for a :ref:`GraphEdit` graph with customizable content based on its child :ref:`Control`\ s. GraphNode is a :ref:`Container` and is responsible for placing its children on screen. This works similar to :ref:`VBoxContainer`. Children, in turn, provide GraphNode with so-called slots, each of which can have a connection port on either side. This is similar to how :ref:`TabContainer` uses children to create the tabs. - -Each GraphNode slot is defined by its index and can provide the node with up to two ports: one on the left, and one on the right. By convention the left port is also referred to as the input port and the right port is referred to as the output port. Each port can be enabled and configured individually, using different type and color. The type is an arbitrary value that you can define using your own considerations. The parent :ref:`GraphEdit` will receive this information on each connect and disconnect request. +Each **GraphNode** slot is defined by its index and can provide the node with up to two ports: one on the left, and one on the right. By convention the left port is also referred to as the **input port** and the right port is referred to as the **output port**. Each port can be enabled and configured individually, using different type and color. The type is an arbitrary value that you can define using your own considerations. The parent :ref:`GraphEdit` will receive this information on each connect and disconnect request. 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 port's index and not slot's index. You can use :ref:`get_connection_input_slot` and :ref:`get_connection_output_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_connection_input_slot` and :ref:`get_connection_output_slot` to get the slot index from the port index. .. rst-class:: classref-reftable-group @@ -146,7 +144,7 @@ Theme Properties +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ | :ref:`Color` | :ref:`title_color` | ``Color(0.875, 0.875, 0.875, 1)`` | +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`close_h_offset` | ``22`` | + | :ref:`int` | :ref:`close_h_offset` | ``12`` | +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`close_offset` | ``22`` | +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ @@ -933,7 +931,7 @@ Color of the title text. .. rst-class:: classref-themeproperty -:ref:`int` **close_h_offset** = ``22`` +:ref:`int` **close_h_offset** = ``12`` .. container:: contribute diff --git a/classes/class_gridcontainer.rst b/classes/class_gridcontainer.rst index 00019f4451c..09701b1b18d 100644 --- a/classes/class_gridcontainer.rst +++ b/classes/class_gridcontainer.rst @@ -12,25 +12,23 @@ GridContainer **Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Grid container used to arrange Control-derived children in a grid like layout. +A container that arranges its child controls in a grid layout. .. rst-class:: classref-introduction-group Description ----------- -GridContainer will arrange its Control-derived children in a grid like structure, the grid columns are specified using the :ref:`columns` property and the number of rows will be equal to the number of children in the container divided by the number of columns. For example, if the container has 5 children, and 2 columns, there will be 3 rows in the container. +**GridContainer** arranges its child controls in a grid layout. The number of columns is specified by the :ref:`columns` property, whereas the number of rows depends on how many are needed for the child controls. The number of rows and columns is preserved for every size of the container. -Notice that grid layout will preserve the columns and rows for every size of the container, and that empty columns will be expanded automatically. - -\ **Note:** GridContainer only works with child nodes inheriting from Control. It won't rearrange child nodes inheriting from Node2D. +\ **Note:** **GridContainer** only works with child nodes inheriting from :ref:`Control`. It won't rearrange child nodes inheriting from :ref:`Node2D`. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`GUI containers <../tutorials/ui/gui_containers>` +- :doc:`Using Containers <../tutorials/ui/gui_containers>` - `OS Test Demo `__ diff --git a/classes/class_groovejoint2d.rst b/classes/class_groovejoint2d.rst index f150e0a0a76..770d6c199ab 100644 --- a/classes/class_groovejoint2d.rst +++ b/classes/class_groovejoint2d.rst @@ -12,14 +12,14 @@ GrooveJoint2D **Inherits:** :ref:`Joint2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Groove constraint for 2D physics. +A physics joint that restricts the movement of two 2D physics bodies to a fixed axis. .. rst-class:: classref-introduction-group Description ----------- -Groove constraint for 2D physics. This is useful for making a body "slide" through a segment placed in another. +A physics joint that restricts the movement of two 2D physics bodies to a fixed axis. For example, a :ref:`StaticBody2D` representing a piston base can be attached to a :ref:`RigidBody2D` representing the piston head, moving up and down. .. rst-class:: classref-reftable-group diff --git a/classes/class_hashingcontext.rst b/classes/class_hashingcontext.rst index 0f8934568ba..879d0ad0722 100644 --- a/classes/class_hashingcontext.rst +++ b/classes/class_hashingcontext.rst @@ -12,14 +12,14 @@ HashingContext **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Context to compute cryptographic hashes over multiple iterations. +Provides functionality for computing cryptographic hashes chunk by chunk. .. rst-class:: classref-introduction-group Description ----------- -The HashingContext class provides an interface for computing cryptographic hashes over multiple iterations. This is useful for example when computing hashes of big files (so you don't have to load them all in memory), network streams, and data streams in general (so you don't have to hold buffers). +The HashingContext class provides an interface for computing cryptographic hashes over multiple iterations. Useful for computing hashes of big files (so you don't have to load them all in memory), network streams, and data streams in general (so you don't have to hold buffers). The :ref:`HashType` enum shows the supported hashing algorithms. diff --git a/classes/class_hboxcontainer.rst b/classes/class_hboxcontainer.rst index 33859f18cbb..d304213d540 100644 --- a/classes/class_hboxcontainer.rst +++ b/classes/class_hboxcontainer.rst @@ -14,21 +14,21 @@ HBoxContainer **Inherited By:** :ref:`EditorResourcePicker` -Horizontal box container. +A container that arranges its child controls horizontally. .. rst-class:: classref-introduction-group Description ----------- -Horizontal box container. See :ref:`BoxContainer`. +A variant of :ref:`BoxContainer` that can only arrange its child controls horizontally. Child controls are rearranged automatically when their minimum size changes. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`GUI containers <../tutorials/ui/gui_containers>` +- :doc:`Using Containers <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group diff --git a/classes/class_heightmapshape3d.rst b/classes/class_heightmapshape3d.rst index 46f8074b964..8603b283b1f 100644 --- a/classes/class_heightmapshape3d.rst +++ b/classes/class_heightmapshape3d.rst @@ -12,16 +12,16 @@ HeightMapShape3D **Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Height map shape resource for 3D physics. +A 3D height map shape used for physics collision. .. rst-class:: classref-introduction-group Description ----------- -Height map shape resource, which can be added to a :ref:`PhysicsBody3D` or :ref:`Area3D`. Heightmap collision is typically used for colliding with terrains. However, since heightmaps cannot store overhangs, collisions with other structures (such as buildings) must be done with other collision shapes such as :ref:`ConcavePolygonShape3D`. If needed, "holes" can be created in an **HeightMapShape3D** by assigning very low points (like ``-100000``) in the desired area. +A 3D heightmap shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape3D`. This is useful for terrain, but it is limited as overhangs (such as caves) cannot be stored. Holes in a **HeightMapShape3D** are created by assigning very low values to points in the desired area. -\ **Performance:** **HeightMapShape3D** is faster to check collisions against compared to :ref:`ConcavePolygonShape3D`, but it is slower than primitive collision shapes such as :ref:`SphereShape3D` or :ref:`BoxShape3D`. +\ **Performance:** **HeightMapShape3D** is faster to check collisions against than :ref:`ConcavePolygonShape3D`, but it is significantly slower than primitive shapes like :ref:`BoxShape3D`. .. rst-class:: classref-reftable-group diff --git a/classes/class_hflowcontainer.rst b/classes/class_hflowcontainer.rst index 580a1fe892c..00ab895c355 100644 --- a/classes/class_hflowcontainer.rst +++ b/classes/class_hflowcontainer.rst @@ -12,14 +12,21 @@ HFlowContainer **Inherits:** :ref:`FlowContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Horizontal flow container. +A container that arranges its child controls horizontally and wraps them around at the borders. .. rst-class:: classref-introduction-group Description ----------- -Horizontal version of :ref:`FlowContainer`. +A variant of :ref:`FlowContainer` that can only arrange its child controls horizontally, wrapping them around at the borders. This is similar to how text in a book wraps around when no more words can fit on a line. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Using Containers <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group diff --git a/classes/class_hingejoint3d.rst b/classes/class_hingejoint3d.rst index 1c852c33770..47e56490aff 100644 --- a/classes/class_hingejoint3d.rst +++ b/classes/class_hingejoint3d.rst @@ -12,14 +12,14 @@ HingeJoint3D **Inherits:** :ref:`Joint3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -A hinge between two 3D PhysicsBodies. +A physics joint that restricts the rotation of a 3D physics body around an axis relative to another physics body. .. rst-class:: classref-introduction-group Description ----------- -A HingeJoint3D normally uses the Z axis of body A as the hinge axis, another axis can be specified when adding it manually though. See also :ref:`Generic6DOFJoint3D`. +A physics joint that restricts the rotation of a 3D physics body around an axis relative to another physics body. For example, Body A can be a :ref:`StaticBody3D` representing a door hinge that a :ref:`RigidBody3D` rotates around. .. rst-class:: classref-reftable-group diff --git a/classes/class_hmaccontext.rst b/classes/class_hmaccontext.rst index 0c33cf745b4..045fa308d6c 100644 --- a/classes/class_hmaccontext.rst +++ b/classes/class_hmaccontext.rst @@ -30,11 +30,11 @@ The HMACContext class is useful for advanced HMAC use cases, such as streaming t var ctx = HMACContext.new() func _ready(): - var key = "supersecret".to_utf8() + var key = "supersecret".to_utf8_buffer() var err = ctx.start(HashingContext.HASH_SHA256, key) assert(err == OK) - var msg1 = "this is ".to_utf8() - var msg2 = "super duper secret".to_utf8() + var msg1 = "this is ".to_utf8_buffer() + var msg2 = "super duper secret".to_utf8_buffer() err = ctx.update(msg1) assert(err == OK) err = ctx.update(msg2) @@ -54,11 +54,11 @@ The HMACContext class is useful for advanced HMAC use cases, such as streaming t public override void _Ready() { - byte[] key = "supersecret".ToUtf8(); + byte[] key = "supersecret".ToUtf8Buffer(); Error err = _ctx.Start(HashingContext.HashType.Sha256, key); Debug.Assert(err == Error.Ok); - byte[] msg1 = "this is ".ToUtf8(); - byte[] msg2 = "super duper secret".ToUtf8(); + byte[] msg1 = "this is ".ToUtf8Buffer(); + byte[] msg2 = "super duper secret".ToUtf8Buffer(); err = _ctx.Update(msg1); Debug.Assert(err == Error.Ok); err = _ctx.Update(msg2); diff --git a/classes/class_hscrollbar.rst b/classes/class_hscrollbar.rst index fc55875a1f1..6017dd3c86c 100644 --- a/classes/class_hscrollbar.rst +++ b/classes/class_hscrollbar.rst @@ -12,14 +12,14 @@ HScrollBar **Inherits:** :ref:`ScrollBar` **<** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Horizontal scroll bar. +A horizontal scrollbar that goes from left (min) to right (max). .. rst-class:: classref-introduction-group Description ----------- -Horizontal version of :ref:`ScrollBar`, which goes from left (min) to right (max). +A horizontal scrollbar, typically used to navigate through content that extends beyond the visible width of a control. It is a :ref:`Range`-based control and goes from left (min) to right (max). .. rst-class:: classref-reftable-group diff --git a/classes/class_hseparator.rst b/classes/class_hseparator.rst index 06f01ed7ec1..150e0f99fb7 100644 --- a/classes/class_hseparator.rst +++ b/classes/class_hseparator.rst @@ -12,14 +12,14 @@ HSeparator **Inherits:** :ref:`Separator` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Horizontal separator. +A horizontal line used for separating other controls. .. rst-class:: classref-introduction-group Description ----------- -Horizontal separator. See :ref:`Separator`. Even though it looks horizontal, it is used to separate objects vertically. +A horizontal separator used for separating other controls that are arranged **vertically**. **HSeparator** is purely visual and normally drawn as a :ref:`StyleBoxLine`. .. rst-class:: classref-reftable-group diff --git a/classes/class_hslider.rst b/classes/class_hslider.rst index b1aa0be0236..800f756f39d 100644 --- a/classes/class_hslider.rst +++ b/classes/class_hslider.rst @@ -12,16 +12,14 @@ HSlider **Inherits:** :ref:`Slider` **<** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Horizontal slider. +A horizontal slider that goes from left (min) to right (max). .. rst-class:: classref-introduction-group Description ----------- -Horizontal slider. See :ref:`Slider`. This one goes from left (min) to right (max). - -\ **Note:** The :ref:`Range.changed` and :ref:`Range.value_changed` signals are part of the :ref:`Range` class which this class inherits from. +A horizontal slider, used to adjust a value by moving a grabber along a horizontal axis. It is a :ref:`Range`-based control and goes from left (min) to right (max). .. rst-class:: classref-reftable-group @@ -31,6 +29,8 @@ Theme Properties .. table:: :widths: auto + +-----------------------------------+---------------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`center_grabber` | ``0`` | +-----------------------------------+---------------------------------------------------------------------------------+-------+ | :ref:`int` | :ref:`grabber_offset` | ``0`` | +-----------------------------------+---------------------------------------------------------------------------------+-------+ @@ -58,6 +58,18 @@ Theme Properties Theme Property Descriptions --------------------------- +.. _class_HSlider_theme_constant_center_grabber: + +.. rst-class:: classref-themeproperty + +:ref:`int` **center_grabber** = ``0`` + +Boolean constant. If ``1``, the grabber texture size will be ignored and it will fit within slider's bounds based only on its center position. + +.. rst-class:: classref-item-separator + +---- + .. _class_HSlider_theme_constant_grabber_offset: .. rst-class:: classref-themeproperty diff --git a/classes/class_hsplitcontainer.rst b/classes/class_hsplitcontainer.rst index 0f1dc3bd827..334c110e602 100644 --- a/classes/class_hsplitcontainer.rst +++ b/classes/class_hsplitcontainer.rst @@ -12,21 +12,21 @@ HSplitContainer **Inherits:** :ref:`SplitContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Horizontal split container. +A container that splits two child controls horizontally and provides a grabber for adjusting the split ratio. .. rst-class:: classref-introduction-group Description ----------- -Horizontal split container. See :ref:`SplitContainer`. This goes from left to right. +A container that accepts only two child controls, then arranges them horizontally and creates a divisor between them. The divisor can be dragged around to change the size relation between the child controls. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`GUI containers <../tutorials/ui/gui_containers>` +- :doc:`Using Containers <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group diff --git a/classes/class_httpclient.rst b/classes/class_httpclient.rst index 55bac119dce..1fb191ebbc3 100644 --- a/classes/class_httpclient.rst +++ b/classes/class_httpclient.rst @@ -27,7 +27,7 @@ See the :ref:`HTTPRequest` node for a higher-level alternativ 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. -For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/HTTP (or read RFC 2616 to get it straight from the source: https://tools.ietf.org/html/rfc2616). +For more information on HTTP, see `MDN's documentation on HTTP `__ (or read `RFC 2616 `__ to get it straight from the source). \ **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. @@ -451,7 +451,7 @@ HTTP status code ``304 Not Modified``. A conditional GET or HEAD request has bee :ref:`ResponseCode` **RESPONSE_USE_PROXY** = ``305`` -HTTP status code ``305 Use Proxy``. *Deprecated. Do not use.* +*Deprecated.* HTTP status code ``305 Use Proxy``. .. _class_HTTPClient_constant_RESPONSE_SWITCH_PROXY: @@ -459,7 +459,7 @@ HTTP status code ``305 Use Proxy``. *Deprecated. Do not use.* :ref:`ResponseCode` **RESPONSE_SWITCH_PROXY** = ``306`` -HTTP status code ``306 Switch Proxy``. *Deprecated. Do not use.* +*Deprecated.* HTTP status code ``306 Switch Proxy``. .. _class_HTTPClient_constant_RESPONSE_TEMPORARY_REDIRECT: diff --git a/classes/class_httprequest.rst b/classes/class_httprequest.rst index 4972f8174e3..94172fe96f7 100644 --- a/classes/class_httprequest.rst +++ b/classes/class_httprequest.rst @@ -49,7 +49,7 @@ Can be used to make HTTP requests, i.e. download or upload files or web content # Note: Don't make simultaneous requests using a single HTTPRequest node. # The snippet below is provided for reference only. var body = JSON.new().stringify({"name": "Godette"}) - error = http_request.request("https://httpbin.org/post", [], true, HTTPClient.METHOD_POST, body) + error = http_request.request("https://httpbin.org/post", [], HTTPClient.METHOD_POST, body) if error != OK: push_error("An error occurred in the HTTP request.") @@ -85,7 +85,7 @@ Can be used to make HTTP requests, i.e. download or upload files or web content { { "name", "Godette" } }); - error = httpRequest.Request("https://httpbin.org/post", null, true, HTTPClient.Method.Post, body); + error = httpRequest.Request("https://httpbin.org/post", null, HTTPClient.Method.Post, body); if (error != Error.Ok) { GD.PushError("An error occurred in the HTTP request."); @@ -386,7 +386,7 @@ Request reached its maximum redirect limit, see :ref:`max_redirects` **RESULT_TIMEOUT** = ``13`` - +Request failed due to a timeout. If you expect requests to take a long time, try increasing the value of :ref:`timeout` or setting it to ``0.0`` to remove the timeout completely. .. rst-class:: classref-section-separator @@ -501,7 +501,7 @@ Maximum number of allowed redirects. - void **set_timeout** **(** :ref:`float` value **)** - :ref:`float` **get_timeout** **(** **)** -If set to a value greater than ``0.0`` before the request starts, the HTTP request will time out after ``timeout`` seconds have passed and the request is not *completed* yet. For small HTTP requests such as REST API usage, set :ref:`timeout` to a value between ``10.0`` and ``30.0`` to prevent the application from getting stuck if the request fails to get a response in a timely manner. For file downloads, leave this to ``0.0`` to prevent the download from failing if it takes too much time. +The duration to wait in seconds before a request times out. If :ref:`timeout` is set to ``0.0`` then the request will never time out. For simple requests, such as communication with a REST API, it is recommended that :ref:`timeout` is set to a value suitable for the server response time (e.g. between ``1.0`` and ``10.0``). This will help prevent unwanted timeouts caused by variation in server response times while still allowing the application to detect when a request has timed out. For larger requests such as file downloads it is suggested the :ref:`timeout` be set to ``0.0``, disabling the timeout functionality. This will help to prevent large transfers from failing due to exceeding the timeout value. .. rst-class:: classref-item-separator diff --git a/classes/class_image.rst b/classes/class_image.rst index bb85bd15085..d5423560979 100644 --- a/classes/class_image.rst +++ b/classes/class_image.rst @@ -153,10 +153,10 @@ Methods +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Image` | :ref:`rgbe_to_srgb` **(** **)** | +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rotate_180` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`rotate_90` **(** :ref:`ClockDirection` direction **)** | +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rotate_180` **(** **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`save_exr` **(** :ref:`String` path, :ref:`bool` grayscale=false **)** |const| | +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`save_exr_to_buffer` **(** :ref:`bool` grayscale=false **)** |const| | @@ -671,6 +671,22 @@ Use ETC2 compression. Use BPTC compression. +.. _class_Image_constant_COMPRESS_ASTC: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompressMode` **COMPRESS_ASTC** = ``4`` + +Use ASTC compression. + +.. _class_Image_constant_COMPRESS_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompressMode` **COMPRESS_MAX** = ``5`` + +Represents the size of the :ref:`CompressMode` enum. + .. rst-class:: classref-item-separator ---- @@ -934,7 +950,7 @@ Removes the image's mipmaps. 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. -The ``mode`` parameter helps to pick the best compression method for DXT and ETC2 formats. It is ignored for ASTC compression. +The ``source`` parameter helps to pick the best compression method for DXT and ETC2 formats. It is ignored for ASTC compression. For ASTC compression, the ``astc_format`` parameter must be supplied. @@ -1466,25 +1482,25 @@ Converts a standard RGBE (Red Green Blue Exponent) image to an sRGB image. ---- -.. _class_Image_method_rotate_180: +.. _class_Image_method_rotate_90: .. rst-class:: classref-method -void **rotate_180** **(** **)** +void **rotate_90** **(** :ref:`ClockDirection` direction **)** -Rotates the image by ``180`` degrees. The width and height of the image must be greater than ``1``. +Rotates the image in the specified ``direction`` by ``90`` degrees. The width and height of the image must be greater than ``1``. If the width and height are not equal, the image will be resized. .. rst-class:: classref-item-separator ---- -.. _class_Image_method_rotate_90: +.. _class_Image_method_rotate_180: .. rst-class:: classref-method -void **rotate_90** **(** :ref:`ClockDirection` direction **)** +void **rotate_180** **(** **)** -Rotates the image in the specified ``direction`` by ``90`` degrees. The width and height of the image must be greater than ``1``. If the width and height are not equal, the image will be resized. +Rotates the image by ``180`` degrees. The width and height of the image must be greater than ``1``. .. rst-class:: classref-item-separator diff --git a/classes/class_imagetexture.rst b/classes/class_imagetexture.rst index 9b29941d1ab..98a191b19d4 100644 --- a/classes/class_imagetexture.rst +++ b/classes/class_imagetexture.rst @@ -43,7 +43,7 @@ This is because images have to be imported as a :ref:`CompressedTexture2D`. diff --git a/classes/class_immediatemesh.rst b/classes/class_immediatemesh.rst index 257eb286d7c..472fb0ac0b1 100644 --- a/classes/class_immediatemesh.rst +++ b/classes/class_immediatemesh.rst @@ -19,7 +19,32 @@ Mesh optimized for creating geometry manually. Description ----------- -Mesh optimized for creating geometry manually, similar to OpenGL1.x immediate mode. +A mesh type optimized for creating geometry manually, similar to OpenGL 1.x immediate mode. + +Here's a sample on how to generate a triangular face: + + +.. tabs:: + + .. code-tab:: gdscript + + var mesh = ImmediateMesh.new() + mesh.surface_begin(Mesh.PRIMITIVE_TRIANGLES) + mesh.surface_add_vertex(Vector3.LEFT) + mesh.surface_add_vertex(Vector3.FORWARD) + mesh.surface_add_vertex(Vector3.ZERO) + mesh.surface_end() + + + +\ **Note:** Generating complex geometries with **ImmediateMesh** is highly inefficient. Instead, it is designed to generate simple geometry that changes often. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Using ImmediateMesh <../tutorials/3d/procedural_geometry/immediatemesh>` .. rst-class:: classref-reftable-group diff --git a/classes/class_input.rst b/classes/class_input.rst index 64a5bac9052..e7adb7b5733 100644 --- a/classes/class_input.rst +++ b/classes/class_input.rst @@ -12,14 +12,16 @@ Input **Inherits:** :ref:`Object` -A singleton that deals with inputs. +A singleton for handling inputs. .. rst-class:: classref-introduction-group Description ----------- -A singleton that deals with inputs. This includes key presses, mouse buttons and movement, joypads, and input actions. Actions and their events can be set in the **Input Map** tab in the **Project > Project Settings**, or with the :ref:`InputMap` class. +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`. .. rst-class:: classref-introduction-group @@ -598,7 +600,7 @@ Returns the current value of the joypad axis at given index (see :ref:`JoyAxis` **get_joy_guid** **(** :ref:`int` device **)** |const| -Returns a SDL2-compatible device GUID on platforms that use gamepad remapping. Returns ``"Default Gamepad"`` otherwise. +Returns a SDL2-compatible device GUID on platforms that use gamepad remapping, e.g. ``030000004c050000c405000000010000``. Returns ``"Default Gamepad"`` otherwise. Godot uses the `SDL2 game controller database `__ to determine gamepad names and mappings based on this GUID. .. rst-class:: classref-item-separator @@ -610,7 +612,7 @@ Returns a SDL2-compatible device GUID on platforms that use gamepad remapping. R :ref:`String` **get_joy_name** **(** :ref:`int` device **)** -Returns the name of the joypad at the specified device index. +Returns the name of the joypad at the specified device index, e.g. ``PS4 Controller``. Godot uses the `SDL2 game controller database `__ to determine gamepad names. .. rst-class:: classref-item-separator @@ -901,13 +903,13 @@ void **set_custom_mouse_cursor** **(** :ref:`Resource` image, :r Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing ``null`` to the image parameter resets to the system cursor. See :ref:`CursorShape` for the list of shapes. -\ ``image``'s size must be lower than 256×256. +\ ``image``'s size must be lower than or equal to 256×256. To avoid rendering issues, sizes lower than or equal to 128×128 are recommended. \ ``hotspot`` must be within ``image``'s size. \ **Note:** :ref:`AnimatedTexture`\ s aren't supported as custom mouse cursors. If using an :ref:`AnimatedTexture`, only the first frame will be displayed. -\ **Note:** Only images imported with the **Lossless**, **Lossy** or **Uncompressed** compression modes are supported. The **Video RAM** compression mode can't be used for custom cursors. +\ **Note:** The **Lossless**, **Lossy** or **Uncompressed** compression modes are recommended. The **Video RAM** compression mode can be used, but it will be decompressed on the CPU, which means loading times are slowed down and no memory is saved compared to lossless modes. \ **Note:** On the web platform, the maximum allowed cursor image size is 128×128. Cursor images larger than 32×32 will also only be displayed if the mouse cursor image is entirely located within the page for `security reasons `__. diff --git a/classes/class_inputevent.rst b/classes/class_inputevent.rst index 3e6b8fba274..cf935daba16 100644 --- a/classes/class_inputevent.rst +++ b/classes/class_inputevent.rst @@ -14,21 +14,21 @@ InputEvent **Inherited By:** :ref:`InputEventAction`, :ref:`InputEventFromWindow`, :ref:`InputEventJoypadButton`, :ref:`InputEventJoypadMotion`, :ref:`InputEventMIDI`, :ref:`InputEventShortcut` -Generic input event. +Abstract base class for input events. .. rst-class:: classref-introduction-group Description ----------- -Base class of all sort of input event. See :ref:`Node._input`. +Abstract base class of all types of input events. See :ref:`Node._input`. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`InputEvent <../tutorials/inputs/inputevent>` +- :doc:`Using InputEvent <../tutorials/inputs/inputevent>` - :doc:`Viewport and canvas transforms <../tutorials/2d/2d_transforms>` @@ -71,12 +71,16 @@ Methods +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_action_type` **(** **)** |const| | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_canceled` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_echo` **(** **)** |const| | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_match` **(** :ref:`InputEvent` event, :ref:`bool` exact_match=true **)** |const| | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_pressed` **(** **)** |const| | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_released` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`InputEvent` | :ref:`xformed_by` **(** :ref:`Transform2D` xform, :ref:`Vector2` local_ofs=Vector2(0, 0) **)** |const| | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -209,6 +213,18 @@ Returns ``true`` if this input event's type is one that can be assigned to an in ---- +.. _class_InputEvent_method_is_canceled: + +.. rst-class:: classref-method + +:ref:`bool` **is_canceled** **(** **)** |const| + +Returns ``true`` if this input event has been canceled. + +.. rst-class:: classref-item-separator + +---- + .. _class_InputEvent_method_is_echo: .. rst-class:: classref-method @@ -249,6 +265,18 @@ Returns ``true`` if this input event is pressed. Not relevant for events of type ---- +.. _class_InputEvent_method_is_released: + +.. rst-class:: classref-method + +:ref:`bool` **is_released** **(** **)** |const| + +Returns ``true`` if this input event is released. Not relevant for events of type :ref:`InputEventMouseMotion` or :ref:`InputEventScreenDrag`. + +.. rst-class:: classref-item-separator + +---- + .. _class_InputEvent_method_xformed_by: .. rst-class:: classref-method diff --git a/classes/class_inputeventaction.rst b/classes/class_inputeventaction.rst index 840586210db..c5bf81377eb 100644 --- a/classes/class_inputeventaction.rst +++ b/classes/class_inputeventaction.rst @@ -12,14 +12,14 @@ InputEventAction **Inherits:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Input event type for actions. +An input event type for actions. .. rst-class:: classref-introduction-group Description ----------- -Contains a generic action which can be targeted from several types of inputs. Actions can be created from the **Input Map** tab in the **Project > Project Settings** menu. See :ref:`Node._input`. +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`. @@ -28,7 +28,7 @@ Contains a generic action which can be targeted from several types of inputs. Ac Tutorials --------- -- `InputEvent: Actions <../tutorials/inputs/inputevent.html#actions>`__ +- `Using InputEvent: Actions <../tutorials/inputs/inputevent.html#actions>`__ - `2D Dodge The Creeps Demo `__ diff --git a/classes/class_inputeventfromwindow.rst b/classes/class_inputeventfromwindow.rst index 9ae4dd5fc39..a4d52d695bb 100644 --- a/classes/class_inputeventfromwindow.rst +++ b/classes/class_inputeventfromwindow.rst @@ -14,9 +14,14 @@ InputEventFromWindow **Inherited By:** :ref:`InputEventScreenDrag`, :ref:`InputEventScreenTouch`, :ref:`InputEventWithModifiers` -.. container:: contribute +Abstract base class for :ref:`Viewport`-based input events. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +InputEventFromWindow represents events specifically received by windows. This includes mouse events, keyboard events in focused windows or touch screen actions. .. rst-class:: classref-reftable-group @@ -50,9 +55,7 @@ Property Descriptions - void **set_window_id** **(** :ref:`int` value **)** - :ref:`int` **get_window_id** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The ID of a :ref:`Window` that received 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_inputeventgesture.rst b/classes/class_inputeventgesture.rst index d66d668f6e0..111e1f7fe2d 100644 --- a/classes/class_inputeventgesture.rst +++ b/classes/class_inputeventgesture.rst @@ -14,7 +14,21 @@ InputEventGesture **Inherited By:** :ref:`InputEventMagnifyGesture`, :ref:`InputEventPanGesture` -Base class for touch control gestures. +Abstract base class for touch gestures. + +.. rst-class:: classref-introduction-group + +Description +----------- + +InputEventGestures are sent when a user performs a supported gesture on a touch screen. Gestures can't be emulated using mouse, because they typically require multi-touch. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Using InputEvent <../tutorials/inputs/inputevent>` .. rst-class:: classref-reftable-group diff --git a/classes/class_inputeventjoypadbutton.rst b/classes/class_inputeventjoypadbutton.rst index 18cfadc24a9..ab5300b2e52 100644 --- a/classes/class_inputeventjoypadbutton.rst +++ b/classes/class_inputeventjoypadbutton.rst @@ -12,7 +12,7 @@ InputEventJoypadButton **Inherits:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Input event for gamepad buttons. +Represents a gamepad button being pressed or released. .. rst-class:: classref-introduction-group @@ -26,7 +26,7 @@ Input event type for gamepad buttons. For gamepad analog sticks and joysticks, s Tutorials --------- -- :doc:`InputEvent <../tutorials/inputs/inputevent>` +- :doc:`Using InputEvent <../tutorials/inputs/inputevent>` .. rst-class:: classref-reftable-group diff --git a/classes/class_inputeventjoypadmotion.rst b/classes/class_inputeventjoypadmotion.rst index 129a0303f3f..6ef2c21a6fd 100644 --- a/classes/class_inputeventjoypadmotion.rst +++ b/classes/class_inputeventjoypadmotion.rst @@ -12,21 +12,21 @@ InputEventJoypadMotion **Inherits:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Input event type for gamepad joysticks and other motions. For buttons, see ``InputEventJoypadButton``. +Represents axis motions (such as joystick or analog triggers) from a gamepad. .. rst-class:: classref-introduction-group Description ----------- -Stores information about joystick motions. One **InputEventJoypadMotion** represents one axis at a time. +Stores information about joystick motions. One **InputEventJoypadMotion** represents one axis at a time. For gamepad buttons, see :ref:`InputEventJoypadButton`. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`InputEvent <../tutorials/inputs/inputevent>` +- :doc:`Using InputEvent <../tutorials/inputs/inputevent>` .. rst-class:: classref-reftable-group diff --git a/classes/class_inputeventkey.rst b/classes/class_inputeventkey.rst index 988b208deae..e2b2c46dc7b 100644 --- a/classes/class_inputeventkey.rst +++ b/classes/class_inputeventkey.rst @@ -12,25 +12,25 @@ InputEventKey **Inherits:** :ref:`InputEventWithModifiers` **<** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Input event type for keyboard events. +Represents a key on a keyboard being pressed or released. .. rst-class:: classref-introduction-group Description ----------- -Stores key presses on the keyboard. Supports key presses, key releases and :ref:`echo` events. +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. -When events are compared, properties are checked in the following priority - :ref:`keycode`, :ref:`physical_keycode` and :ref:`unicode`, events with the first matching value will be considered equal. +When events are compared, properties are checked in the following priority - :ref:`keycode`, :ref:`physical_keycode` and :ref:`unicode`. Events with the first matching value will be considered equal. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`InputEvent <../tutorials/inputs/inputevent>` +- :doc:`Using InputEvent <../tutorials/inputs/inputevent>` .. rst-class:: classref-reftable-group diff --git a/classes/class_inputeventmagnifygesture.rst b/classes/class_inputeventmagnifygesture.rst index 95d092cb125..7f3f2659d4c 100644 --- a/classes/class_inputeventmagnifygesture.rst +++ b/classes/class_inputeventmagnifygesture.rst @@ -12,9 +12,21 @@ InputEventMagnifyGesture **Inherits:** :ref:`InputEventGesture` **<** :ref:`InputEventWithModifiers` **<** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Represents a magnifying touch gesture. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +Stores the factor of a magnifying touch gesture. This is usually performed when the user pinches the touch screen and used for zooming in/out. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Using InputEvent <../tutorials/inputs/inputevent>` .. rst-class:: classref-reftable-group @@ -48,9 +60,7 @@ Property Descriptions - void **set_factor** **(** :ref:`float` value **)** - :ref:`float` **get_factor** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The amount (or delta) of the event. This value is closer to ``1.0`` the slower the gesture is performed. .. |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_inputeventmidi.rst b/classes/class_inputeventmidi.rst index 54d3c61116a..02c671c28ce 100644 --- a/classes/class_inputeventmidi.rst +++ b/classes/class_inputeventmidi.rst @@ -12,14 +12,14 @@ InputEventMIDI **Inherits:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Input event for MIDI inputs. +Represents an input event from a MIDI device, such as a piano. .. rst-class:: classref-introduction-group Description ----------- -InputEventMIDI allows receiving input events from MIDI devices such as a piano. MIDI stands for Musical Instrument Digital Interface. +InputEventMIDI allows receiving input events from MIDI (Musical Instrument Digital Interface) devices such as a piano. MIDI signals can be sent over a 5-pin MIDI connector or over USB, if your device supports both be sure to check the settings in the device to see which output it's using. @@ -213,7 +213,9 @@ For MIDI messages between 0x80 and 0xEF, only the left half of the bits are retu Notes will return :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_ON` when activated, but they might not always return :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_OFF` when deactivated, therefore your code should treat the input as stopped if some period of time has passed. -For more information, see the MIDI message status byte list chart linked above. +Some MIDI devices may send :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_ON` with zero velocity instead of :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_OFF`. + +For more information, see the note in :ref:`velocity` and the MIDI message status byte list chart linked above. .. rst-class:: classref-item-separator @@ -264,7 +266,9 @@ The pressure of the MIDI signal. This value ranges from 0 to 127. For many devic - void **set_velocity** **(** :ref:`int` value **)** - :ref:`int` **get_velocity** **(** **)** -The velocity of the MIDI signal. This value ranges from 0 to 127. For a piano, this corresponds to how quickly the key was pressed, and is rarely above about 110 in practice. Note that some MIDI devices may send a :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_ON` message with zero velocity and expect this to be treated the same as a :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_OFF` message, but device implementations vary so Godot reports event data exactly as received. +The velocity of the MIDI signal. This value ranges from 0 to 127. For a piano, this corresponds to how quickly the key was pressed, and is rarely above about 110 in practice. + +\ **Note:** Some MIDI devices may send a :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_ON` message with zero velocity and expect this to be treated the same as a :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_OFF` message, but device implementations vary so Godot reports event data exactly as received. Depending on the hardware and the needs of the game/app, this MIDI quirk can be handled robustly with a couple lines of script (check for :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_ON` with velocity zero). .. |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_inputeventmouse.rst b/classes/class_inputeventmouse.rst index a9f62fed2a9..cfe1e28cc9e 100644 --- a/classes/class_inputeventmouse.rst +++ b/classes/class_inputeventmouse.rst @@ -21,14 +21,14 @@ Base input event type for mouse events. Description ----------- -Stores general mouse events information. +Stores general information about mouse events. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`InputEvent <../tutorials/inputs/inputevent>` +- :doc:`Using InputEvent <../tutorials/inputs/inputevent>` .. rst-class:: classref-reftable-group diff --git a/classes/class_inputeventmousebutton.rst b/classes/class_inputeventmousebutton.rst index e309097a510..ddd0465e8af 100644 --- a/classes/class_inputeventmousebutton.rst +++ b/classes/class_inputeventmousebutton.rst @@ -12,20 +12,22 @@ InputEventMouseButton **Inherits:** :ref:`InputEventMouse` **<** :ref:`InputEventWithModifiers` **<** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Input event type for mouse button events. +Represents a mouse button being pressed or released. .. rst-class:: classref-introduction-group Description ----------- -Contains mouse click information. See :ref:`Node._input`. +Stores information about mouse click events. See :ref:`Node._input`. .. rst-class:: classref-introduction-group Tutorials --------- +- :doc:`Using InputEvent <../tutorials/inputs/inputevent>` + - :doc:`Mouse and input coordinates <../tutorials/inputs/mouse_and_input_coordinates>` .. rst-class:: classref-reftable-group @@ -39,6 +41,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------+-----------+ | :ref:`MouseButton` | :ref:`button_index` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`canceled` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`double_click` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`factor` | ``1.0`` | @@ -72,6 +76,23 @@ The mouse button identifier, one of the :ref:`MouseButton` **canceled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_canceled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_canceled** **(** **)** + +If ``true``, the mouse button event has been canceled. + +.. rst-class:: classref-item-separator + +---- + .. _class_InputEventMouseButton_property_double_click: .. rst-class:: classref-property diff --git a/classes/class_inputeventmousemotion.rst b/classes/class_inputeventmousemotion.rst index 2c7aad2c565..fc84c79fd7a 100644 --- a/classes/class_inputeventmousemotion.rst +++ b/classes/class_inputeventmousemotion.rst @@ -12,14 +12,14 @@ InputEventMouseMotion **Inherits:** :ref:`InputEventMouse` **<** :ref:`InputEventWithModifiers` **<** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Input event type for mouse motion events. +Represents a mouse or a pen movement. .. rst-class:: classref-introduction-group Description ----------- -Contains mouse and pen motion information. Supports relative, absolute positions 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 implementing `Bresenham's line algorithm `__ as well to avoid visible gaps in lines if the user is moving the mouse quickly. @@ -28,6 +28,8 @@ Contains mouse and pen motion information. Supports relative, absolute positions Tutorials --------- +- :doc:`Using InputEvent <../tutorials/inputs/inputevent>` + - :doc:`Mouse and input coordinates <../tutorials/inputs/mouse_and_input_coordinates>` - `3D Voxel Demo `__ diff --git a/classes/class_inputeventpangesture.rst b/classes/class_inputeventpangesture.rst index 2b87cdc7b42..9c1ade7e2e2 100644 --- a/classes/class_inputeventpangesture.rst +++ b/classes/class_inputeventpangesture.rst @@ -12,9 +12,21 @@ InputEventPanGesture **Inherits:** :ref:`InputEventGesture` **<** :ref:`InputEventWithModifiers` **<** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Represents a panning touch gesture. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +Stores information about pan gestures. A pan gesture is performed when the user swipes the touch screen with two fingers. It's typically used for panning/scrolling. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Using InputEvent <../tutorials/inputs/inputevent>` .. rst-class:: classref-reftable-group @@ -48,9 +60,7 @@ Property Descriptions - void **set_delta** **(** :ref:`Vector2` value **)** - :ref:`Vector2` **get_delta** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Panning amount since last pan 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_inputeventscreendrag.rst b/classes/class_inputeventscreendrag.rst index 0b5177879ee..c1d47f63da1 100644 --- a/classes/class_inputeventscreendrag.rst +++ b/classes/class_inputeventscreendrag.rst @@ -12,21 +12,21 @@ InputEventScreenDrag **Inherits:** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Input event type for screen drag events. Only available on mobile devices. +Represents a screen drag event. .. rst-class:: classref-introduction-group Description ----------- -Contains screen drag information. See :ref:`Node._input`. +Stores information about screen drag events. See :ref:`Node._input`. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`InputEvent <../tutorials/inputs/inputevent>` +- :doc:`Using InputEvent <../tutorials/inputs/inputevent>` .. rst-class:: classref-reftable-group diff --git a/classes/class_inputeventscreentouch.rst b/classes/class_inputeventscreentouch.rst index 3660fb1f466..1d5f6cd8546 100644 --- a/classes/class_inputeventscreentouch.rst +++ b/classes/class_inputeventscreentouch.rst @@ -12,23 +12,21 @@ InputEventScreenTouch **Inherits:** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Input event type for screen touch events. - -(only available on mobile devices) +Represents a screen touch event. .. rst-class:: classref-introduction-group Description ----------- -Stores multi-touch press/release information. Supports touch press, touch release and :ref:`index` for multi-touch count and order. +Stores information about multi-touch press/release input events. Supports touch press, touch release and :ref:`index` for multi-touch count and order. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`InputEvent <../tutorials/inputs/inputevent>` +- :doc:`Using InputEvent <../tutorials/inputs/inputevent>` .. rst-class:: classref-reftable-group @@ -38,6 +36,8 @@ Properties .. table:: :widths: auto + +-------------------------------+--------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`canceled` | ``false`` | +-------------------------------+--------------------------------------------------------------------+-------------------+ | :ref:`bool` | :ref:`double_tap` | ``false`` | +-------------------------------+--------------------------------------------------------------------+-------------------+ @@ -57,6 +57,23 @@ Properties Property Descriptions --------------------- +.. _class_InputEventScreenTouch_property_canceled: + +.. rst-class:: classref-property + +:ref:`bool` **canceled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_canceled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_canceled** **(** **)** + +If ``true``, the touch event has been canceled. + +.. rst-class:: classref-item-separator + +---- + .. _class_InputEventScreenTouch_property_double_tap: .. rst-class:: classref-property diff --git a/classes/class_inputeventshortcut.rst b/classes/class_inputeventshortcut.rst index cd043aa6afd..12c6aaf760a 100644 --- a/classes/class_inputeventshortcut.rst +++ b/classes/class_inputeventshortcut.rst @@ -12,9 +12,14 @@ InputEventShortcut **Inherits:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Represents a triggered keyboard :ref:`Shortcut`. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +InputEventShortcut is a special event that can be received in :ref:`Node._unhandled_key_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 @@ -48,9 +53,7 @@ Property Descriptions - void **set_shortcut** **(** :ref:`Shortcut` value **)** - :ref:`Shortcut` **get_shortcut** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +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 e3e1f0488c1..5b8eab0acec 100644 --- a/classes/class_inputeventwithmodifiers.rst +++ b/classes/class_inputeventwithmodifiers.rst @@ -14,21 +14,21 @@ InputEventWithModifiers **Inherited By:** :ref:`InputEventGesture`, :ref:`InputEventKey`, :ref:`InputEventMouse` -Base class for keys events with modifiers. +Abstract base class for input events affected by modifier keys like :kbd:`Shift` and :kbd:`Alt`. .. rst-class:: classref-introduction-group Description ----------- -Contains keys events information with modifiers support like :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`. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`InputEvent <../tutorials/inputs/inputevent>` +- :doc:`Using InputEvent <../tutorials/inputs/inputevent>` .. rst-class:: classref-reftable-group diff --git a/classes/class_inputmap.rst b/classes/class_inputmap.rst index efe9d5373d7..2902bd71cc9 100644 --- a/classes/class_inputmap.rst +++ b/classes/class_inputmap.rst @@ -12,7 +12,7 @@ InputMap **Inherits:** :ref:`Object` -Singleton that manages :ref:`InputEventAction`. +A singleton that manages all :ref:`InputEventAction`\ s. .. rst-class:: classref-introduction-group @@ -26,7 +26,7 @@ Manages all :ref:`InputEventAction` which can be created Tutorials --------- -- `InputEvent: InputMap <../tutorials/inputs/inputevent.html#inputmap>`__ +- `Using InputEvent: InputMap <../tutorials/inputs/inputevent.html#inputmap>`__ .. rst-class:: classref-reftable-group diff --git a/classes/class_int.rst b/classes/class_int.rst index b930c7f14c7..3b3cf8ad25a 100644 --- a/classes/class_int.rst +++ b/classes/class_int.rst @@ -10,51 +10,52 @@ int === -Integer built-in type. +A built-in type for integers. .. rst-class:: classref-introduction-group Description ----------- -Signed 64-bit integer type. +Signed 64-bit integer type. This means that it can take values from ``-2^63`` to ``2^63 - 1``, i.e. from ``-9223372036854775808`` to ``9223372036854775807``. When it exceeds these bounds, it will wrap around. -It can take values in the interval ``[-2^63, 2^63 - 1]``, i.e. ``[-9223372036854775808, 9223372036854775807]``. Exceeding those bounds will wrap around. +\ **int**\ s can be automatically converted to :ref:`float`\ s when necessary, for example when passing them as arguments in functions. The :ref:`float` will be as close to the original integer as possible. -\ **int** is a :ref:`Variant` type, and will thus be used when assigning an integer value to a :ref:`Variant`. It can also be enforced with the ``: int`` type hint. +Likewise, :ref:`float`\ s can be automatically converted into **int**\ s. This will truncate the :ref:`float`, discarding anything after the floating point. + +\ **Note:** In a boolean context, an **int** will evaluate to ``false`` if it equals ``0``, and to ``true`` otherwise. .. tabs:: .. code-tab:: gdscript - var my_variant = 0 # int, value 0. - my_variant += 4.2 # float, value 4.2. - var my_int: int = 1 # int, value 1. - my_int = 4.2 # int, value 4, the right value is implicitly cast to int. - my_int = int("6.7") # int, value 6, the String is explicitly cast with int. - var max_int = 9223372036854775807 - print(max_int) # 9223372036854775807, OK. - max_int += 1 - print(max_int) # -9223372036854775808, we overflowed and wrapped around. + var x: int = 1 # x is 1 + x = 4.2 # x is 4, because 4.2 gets truncated + var max_int = 9223372036854775807 # Biggest value an int can store + max_int += 1 # max_int is -9223372036854775808, because it wrapped around .. code-tab:: csharp - int myInt = (int)"6.7".ToFloat(); // int, value 6, the String is explicitly cast with int. - // We have to use `long` here, because GDSript's `int` - // is 64 bits long while C#'s `int` is only 32 bits. - long maxInt = 9223372036854775807; - GD.Print(maxInt); // 9223372036854775807, OK. - maxInt++; - GD.Print(maxInt); // -9223372036854775808, we overflowed and wrapped around. + int x = 1; // x is 1 + x = 4.2; // x is 4, because 4.2 gets truncated + // We use long below, because GDScript's int is 64-bit while C#'s int is 32-bit. + long maxLong = 9223372036854775807; // Biggest value a long can store + maxLong++; // maxLong is now -9223372036854775808, because it wrapped around. - // Alternatively, if we used C#'s 32-bit `int` type, the maximum value is much smaller: - int halfInt = 2147483647; - GD.Print(halfInt); // 2147483647, OK. - halfInt++; - GD.Print(halfInt); // -2147483648, we overflowed and wrapped around. + // Alternatively with C#'s 32-bit int type, which has a smaller maximum value. + int maxInt = 2147483647; // Biggest value an int can store + maxInt++; // maxInt is now -2147483648, because it wrapped around + + +In GDScript, you can use the ``0b`` literal for binary representation, the ``0x`` literal for hexadecimal representation, and the ``_`` symbol to separate long numbers and improve readability. + +:: + var x = 0b1001 # x is 9 + var y = 0xF5 # y is 245 + var z = 10_000_000 # z is 10000000 .. rst-class:: classref-reftable-group @@ -179,7 +180,7 @@ Constructor Descriptions :ref:`int` **int** **(** **)** -Constructs a default-initialized **int** set to ``0``. +Constructs an **int** set to ``0``. .. rst-class:: classref-item-separator @@ -199,7 +200,7 @@ Constructs an **int** as a copy of the given **int**. :ref:`int` **int** **(** :ref:`String` from **)** -Converts a :ref:`String` to an **int**, 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 @@ -209,7 +210,7 @@ Converts a :ref:`String` to an **int**, following the same rules a :ref:`int` **int** **(** :ref:`bool` from **)** -Cast a :ref:`bool` value to an integer value, ``int(true)`` will be equals to 1 and ``int(false)`` will be equals to 0. +Constructs a new **int** from a :ref:`bool`. ``true`` is converted to ``1`` and ``false`` is converted to ``0``. .. rst-class:: classref-item-separator @@ -219,7 +220,7 @@ Cast a :ref:`bool` value to an integer value, ``int(true)`` will be :ref:`int` **int** **(** :ref:`float` from **)** -Cast a float value to an integer value, this method simply removes the number fractions (i.e. rounds ``from`` towards zero), so for example ``int(2.7)`` will be equals to 2, ``int(0.1)`` will be equals to 0 and ``int(-2.7)`` will be equals to -2. This operation is also called truncation. +Constructs a new **int** from a :ref:`float`. This will truncate the :ref:`float`, discarding anything after the floating point. .. rst-class:: classref-section-separator @@ -236,7 +237,7 @@ Operator Descriptions :ref:`bool` **operator !=** **(** :ref:`float` right **)** -Returns ``true`` if this **int** is not equivalent to the given :ref:`float`. +Returns ``true`` if the **int** is not equivalent to the :ref:`float`. .. rst-class:: classref-item-separator @@ -248,7 +249,7 @@ Returns ``true`` if this **int** is not equivalent to the given :ref:`float` **operator !=** **(** :ref:`int` right **)** -Returns ``true`` if the integers are not equal. +Returns ``true`` if the **int**\ s are not equal. .. rst-class:: classref-item-separator @@ -260,13 +261,13 @@ Returns ``true`` if the integers are not equal. :ref:`int` **operator %** **(** :ref:`int` right **)** -Returns the remainder after dividing two integers. 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. +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`. :: - print(5 % 2) # 1 - print(12 % 4) # 0 - print(-5 % 3) # -2 + print(6 % 2) # Prints 0 + print(11 % 4) # Prints 3 + print(-5 % 3) # Prints -2 .. rst-class:: classref-item-separator @@ -278,21 +279,20 @@ Returns the remainder after dividing two integers. This operation uses truncated :ref:`int` **operator &** **(** :ref:`int` right **)** -Returns the result of bitwise ``AND`` operation for two integers. +Performs the bitwise ``AND`` operation. :: - print(3 & 1) # 1 - print(11 & 3) # 3 + print(0b1100 & 0b1010) # Prints 8 (binary 1000) -It's useful to retrieve binary flags from a variable. +This is useful for retrieving binary flags from a variable. :: - var flags = 5 - # Do something if the first bit is enabled. - if flags & 1: - do_stuff() + var flags = 0b101 + # Check if the first or second bit are enabled. + if flags & 0b011: + do_stuff() # This line will run. .. rst-class:: classref-item-separator @@ -304,7 +304,7 @@ It's useful to retrieve binary flags from a variable. :ref:`Color` **operator *** **(** :ref:`Color` right **)** -Multiplies each component of the :ref:`Color` by the given **int**. +Multiplies each component of the :ref:`Color` by the **int**. .. rst-class:: classref-item-separator @@ -316,7 +316,7 @@ Multiplies each component of the :ref:`Color` by the given **int**. :ref:`Quaternion` **operator *** **(** :ref:`Quaternion` right **)** -Multiplies each component of the :ref:`Quaternion` by the given **int**. This operation is not meaningful on its own, but it can be used as a part of a larger expression. +Multiplies each component of the :ref:`Quaternion` by the **int**. This operation is not meaningful on its own, but it can be used as a part of a larger expression. .. rst-class:: classref-item-separator @@ -328,11 +328,11 @@ Multiplies each component of the :ref:`Quaternion` by the give :ref:`Vector2` **operator *** **(** :ref:`Vector2` right **)** -Multiplies each component of the :ref:`Vector2` by the given **int**. +Multiplies each component of the :ref:`Vector2` by the **int**. :: - print(2 * Vector2(1, 1)) # Vector2(2, 2) + print(2 * Vector2(1, 4)) # Prints (2, 8) .. rst-class:: classref-item-separator @@ -344,7 +344,7 @@ Multiplies each component of the :ref:`Vector2` by the given **in :ref:`Vector2i` **operator *** **(** :ref:`Vector2i` right **)** -Multiplies each component of the :ref:`Vector2i` by the given **int**. +Multiplies each component of the :ref:`Vector2i` by the **int**. .. rst-class:: classref-item-separator @@ -356,7 +356,7 @@ Multiplies each component of the :ref:`Vector2i` by the given ** :ref:`Vector3` **operator *** **(** :ref:`Vector3` right **)** -Multiplies each component of the :ref:`Vector3` by the given **int**. +Multiplies each component of the :ref:`Vector3` by the **int**. .. rst-class:: classref-item-separator @@ -368,7 +368,7 @@ Multiplies each component of the :ref:`Vector3` by the given **in :ref:`Vector3i` **operator *** **(** :ref:`Vector3i` right **)** -Multiplies each component of the :ref:`Vector3i` by the given **int**. +Multiplies each component of the :ref:`Vector3i` by the **int**. .. rst-class:: classref-item-separator @@ -380,7 +380,7 @@ Multiplies each component of the :ref:`Vector3i` by the given ** :ref:`Vector4` **operator *** **(** :ref:`Vector4` right **)** -Multiplies each component of the :ref:`Vector4` by the given **int**. +Multiplies each component of the :ref:`Vector4` by the **int**. .. rst-class:: classref-item-separator @@ -392,7 +392,7 @@ Multiplies each component of the :ref:`Vector4` by the given **in :ref:`Vector4i` **operator *** **(** :ref:`Vector4i` right **)** -Multiplies each component of the :ref:`Vector4i` by the given **int**. +Multiplies each component of the :ref:`Vector4i` by the **int**. .. rst-class:: classref-item-separator @@ -404,7 +404,7 @@ Multiplies each component of the :ref:`Vector4i` by the given ** :ref:`float` **operator *** **(** :ref:`float` right **)** -Multiplies an **int** and a :ref:`float`. The result is a :ref:`float`. +Multiplies the :ref:`float` by the **int**. The result is a :ref:`float`. .. rst-class:: classref-item-separator @@ -416,7 +416,7 @@ Multiplies an **int** and a :ref:`float`. The result is a :ref:`flo :ref:`int` **operator *** **(** :ref:`int` right **)** -Multiplies two **int**\ s. +Multiplies the two **int**\ s. .. rst-class:: classref-item-separator @@ -432,7 +432,7 @@ Raises an **int** to a power of a :ref:`float`. The result is a :re :: - print(8**0.25) # 1.68179283050743 + print(2 ** 0.5) # Prints 1.4142135623731 .. rst-class:: classref-item-separator @@ -444,11 +444,11 @@ Raises an **int** to a power of a :ref:`float`. The result is a :re :ref:`int` **operator **** **(** :ref:`int` right **)** -Raises an **int** to a power of a **int**. +Raises the left **int** to a power of the right **int**. :: - print(5**5) # 3125 + print(3 ** 4) # Prints 81 .. rst-class:: classref-item-separator @@ -460,7 +460,7 @@ Raises an **int** to a power of a **int**. :ref:`float` **operator +** **(** :ref:`float` right **)** -Adds an **int** and a :ref:`float`. The result is a :ref:`float`. +Adds the **int** and the :ref:`float`. The result is a :ref:`float`. .. rst-class:: classref-item-separator @@ -472,7 +472,7 @@ Adds an **int** and a :ref:`float`. The result is a :ref:`float` **operator +** **(** :ref:`int` right **)** -Adds two integers. +Adds the two **int**\ s. .. rst-class:: classref-item-separator @@ -484,7 +484,7 @@ Adds two integers. :ref:`float` **operator -** **(** :ref:`float` right **)** -Subtracts a :ref:`float` from an **int**. The result is a :ref:`float`. +Subtracts the :ref:`float` from the **int**. The result is a :ref:`float`. .. rst-class:: classref-item-separator @@ -496,7 +496,7 @@ Subtracts a :ref:`float` from an **int**. The result is a :ref:`flo :ref:`int` **operator -** **(** :ref:`int` right **)** -Subtracts two integers. +Subtracts the two **int**\ s. .. rst-class:: classref-item-separator @@ -508,11 +508,11 @@ Subtracts two integers. :ref:`float` **operator /** **(** :ref:`float` right **)** -Divides an **int** by a :ref:`float`. The result is a :ref:`float`. +Divides the **int** by the :ref:`float`. The result is a :ref:`float`. :: - print(10 / 3.0) # 3.333... + print(10 / 3.0) # Prints 3.33333333333333 .. rst-class:: classref-item-separator @@ -524,12 +524,12 @@ Divides an **int** by a :ref:`float`. The result is a :ref:`float` **operator /** **(** :ref:`int` right **)** -Divides two integers. The decimal part of the result is discarded (truncated). +Divides the two **int**\ s. The result is an **int**. This will truncate the :ref:`float`, discarding anything after the floating point. :: - print(10 / 2) # 5 - print(10 / 3) # 3 + print(6 / 2) # Prints 3 + print(5 / 3) # Prints 1 .. rst-class:: classref-item-separator @@ -541,7 +541,7 @@ Divides two integers. The decimal part of the result is discarded (truncated). :ref:`bool` **operator <** **(** :ref:`float` right **)** -Returns ``true`` if this **int** is less than the given :ref:`float`. +Returns ``true`` if the **int** is less than the :ref:`float`. .. rst-class:: classref-item-separator @@ -553,7 +553,7 @@ Returns ``true`` if this **int** is less than the given :ref:`float :ref:`bool` **operator <** **(** :ref:`int` right **)** -Returns ``true`` if the left integer is less than the right one. +Returns ``true`` if the left **int** is less than the right **int**. .. rst-class:: classref-item-separator @@ -565,12 +565,12 @@ Returns ``true`` if the left integer is less than the right one. :ref:`int` **operator <<** **(** :ref:`int` right **)** -Performs bitwise shift left operation on the integer. Effectively the same as multiplying by a power of 2. +Performs the bitwise shift left operation. Effectively the same as multiplying by a power of 2. :: - print(10 << 1) # 20 - print(10 << 4) # 160 + print(0b1010 << 1) # Prints 20 (binary 10100) + print(0b1010 << 3) # Prints 80 (binary 1010000) .. rst-class:: classref-item-separator @@ -582,7 +582,7 @@ Performs bitwise shift left operation on the integer. Effectively the same as mu :ref:`bool` **operator <=** **(** :ref:`float` right **)** -Returns ``true`` if this **int** is less than or equal to the given :ref:`float`. +Returns ``true`` if the **int** is less than or equal to the :ref:`float`. .. rst-class:: classref-item-separator @@ -594,7 +594,7 @@ Returns ``true`` if this **int** is less than or equal to the given :ref:`float< :ref:`bool` **operator <=** **(** :ref:`int` right **)** -Returns ``true`` if the left integer is less than or equal to the right one. +Returns ``true`` if the left **int** is less than or equal to the right **int**. .. rst-class:: classref-item-separator @@ -606,7 +606,7 @@ Returns ``true`` if the left integer is less than or equal to the right one. :ref:`bool` **operator ==** **(** :ref:`float` right **)** -Returns ``true`` if the integer is equal to the given :ref:`float`. +Returns ``true`` if the **int** is equal to the :ref:`float`. .. rst-class:: classref-item-separator @@ -618,7 +618,7 @@ Returns ``true`` if the integer is equal to the given :ref:`float`. :ref:`bool` **operator ==** **(** :ref:`int` right **)** -Returns ``true`` if both integers are equal. +Returns ``true`` if the two **int**\ s are equal. .. rst-class:: classref-item-separator @@ -630,7 +630,7 @@ Returns ``true`` if both integers are equal. :ref:`bool` **operator >** **(** :ref:`float` right **)** -Returns ``true`` if this **int** is greater than the given :ref:`float`. +Returns ``true`` if the **int** is greater than the :ref:`float`. .. rst-class:: classref-item-separator @@ -642,7 +642,7 @@ Returns ``true`` if this **int** is greater than the given :ref:`float` **operator >** **(** :ref:`int` right **)** -Returns ``true`` if the left integer is greater than the right one. +Returns ``true`` if the left **int** is greater than the right **int**. .. rst-class:: classref-item-separator @@ -654,7 +654,7 @@ Returns ``true`` if the left integer is greater than the right one. :ref:`bool` **operator >=** **(** :ref:`float` right **)** -Returns ``true`` if this **int** is greater than or equal to the given :ref:`float`. +Returns ``true`` if the **int** is greater than or equal to the :ref:`float`. .. rst-class:: classref-item-separator @@ -666,7 +666,7 @@ Returns ``true`` if this **int** is greater than or equal to the given :ref:`flo :ref:`bool` **operator >=** **(** :ref:`int` right **)** -Returns ``true`` if the left integer is greater than or equal to the right one. +Returns ``true`` if the left **int** is greater than or equal to the right **int**. .. rst-class:: classref-item-separator @@ -678,12 +678,12 @@ Returns ``true`` if the left integer is greater than or equal to the right one. :ref:`int` **operator >>** **(** :ref:`int` right **)** -Performs bitwise shift right operation on the integer. Effectively the same as dividing by a power of 2. +Performs the bitwise shift right operation. Effectively the same as dividing by a power of 2. :: - print(10 >> 1) # 5 - print(10 >> 2) # 2 + print(0b1010 >> 1) # Prints 5 (binary 101) + print(0b1010 >> 2) # Prints 2 (binary 10) .. rst-class:: classref-item-separator @@ -695,12 +695,11 @@ Performs bitwise shift right operation on the integer. Effectively the same as d :ref:`int` **operator ^** **(** :ref:`int` right **)** -Returns the result of bitwise ``XOR`` operation for two integers. +Performs the bitwise ``XOR`` operation. :: - print(5 ^ 1) # 4 - print(4 ^ 7) # 3 + print(0b1100 ^ 0b1010) # Prints 6 (binary 110) .. rst-class:: classref-item-separator @@ -736,21 +735,18 @@ Returns the negated value of the **int**. If positive, turns the number negative :ref:`int` **operator |** **(** :ref:`int` right **)** -Returns the result of bitwise ``OR`` operation for two integers. +Performs the bitwise ``OR`` operation. :: - print(2 | 4) # 6 - print(1 | 3) # 3 + print(0b1100 | 0b1010) # Prints 14 (binary 1110) -It's useful to store binary flags in a variable. +This is useful for storing binary flags in a variable. :: var flags = 0 - # Turn first and third bit on. - flags |= 1 - flags |= 4 + flags |= 0b101 # Turn the first and third bits on. .. rst-class:: classref-item-separator @@ -762,12 +758,12 @@ It's useful to store binary flags in a variable. :ref:`int` **operator ~** **(** **)** -Returns the result of bitwise ``NOT`` operation for the integer. It's effectively equal to ``-int + 1``. +Performs the bitwise ``NOT`` operation on the **int**. Due to `2's complement `__, it's effectively equal to ``-(int + 1)``. :: - print(~4) # -3 - print(~7) # -6 + print(~4) # Prints -5 + print(~(-7)) # Prints 6 .. |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_itemlist.rst b/classes/class_itemlist.rst index 0d5263dc8ed..23b687fd9ee 100644 --- a/classes/class_itemlist.rst +++ b/classes/class_itemlist.rst @@ -12,20 +12,20 @@ ItemList **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Control that provides a list of selectable items (and/or icons) in a single column, or optionally in multiple columns. +A vertical list of selectable items with one or multiple columns. .. rst-class:: classref-introduction-group Description ----------- -This control provides a selectable list of items that may be in a single (or multiple columns) with option of text, icons, or both text and icon. Tooltips are supported and may be different for every item in the list. +This control provides a vertical list of selectable items that may be in a single or in multiple columns, with each item having options for text and an icon. Tooltips are supported and may be different for every item in the list. Selectable items in the list may be selected or deselected and multiple selection may be enabled. Selection with right mouse button may also be enabled to allow use of popup context menus. Items may also be "activated" by double-clicking them or by pressing :kbd:`Enter`. -Item text only supports single-line strings, newline characters (e.g. ``\n``) in the string won't produce a newline. Text wrapping is enabled in :ref:`ICON_MODE_TOP` mode, but column's width is adjusted to fully fit its content by default. You need to set :ref:`fixed_column_width` greater than zero to wrap the text. +Item text only supports single-line strings. Newline characters (e.g. ``\n``) in the string won't produce a newline. Text wrapping is enabled in :ref:`ICON_MODE_TOP` mode, but the column's width is adjusted to fully fit its content by default. You need to set :ref:`fixed_column_width` greater than zero to wrap the text. -All ``set_*`` methods allow negative item index, which makes the item accessed from the last one. +All ``set_*`` methods allow negative item indices, i.e. ``-1`` to access the last item, ``-2`` to select the second-to-last item, and so on. \ **Incremental search:** Like :ref:`PopupMenu` and :ref:`Tree`, **ItemList** 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`. @@ -42,6 +42,8 @@ Properties +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`allow_rmb_select` | ``false`` | +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`allow_search` | ``true`` | + +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`auto_height` | ``false`` | +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | @@ -106,6 +108,8 @@ Methods +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`get_item_metadata` **(** :ref:`int` idx **)** |const| | +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_item_rect` **(** :ref:`int` idx, :ref:`bool` expand=true **)** |const| | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_item_text` **(** :ref:`int` idx **)** |const| | +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`TextDirection` | :ref:`get_item_text_direction` **(** :ref:`int` idx **)** |const| | @@ -176,6 +180,8 @@ Theme Properties +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ | :ref:`Color` | :ref:`font_color` | ``Color(0.65, 0.65, 0.65, 1)`` | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + | :ref:`Color` | :ref:`font_hovered_color` | ``Color(0.95, 0.95, 0.95, 1)`` | + +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ | :ref:`Color` | :ref:`font_selected_color` | ``Color(1, 1, 1, 1)`` | @@ -202,6 +208,8 @@ Theme Properties +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ | :ref:`StyleBox` | :ref:`focus` | | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + | :ref:`StyleBox` | :ref:`hovered` | | + +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ | :ref:`StyleBox` | :ref:`panel` | | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ | :ref:`StyleBox` | :ref:`selected` | | @@ -378,6 +386,23 @@ If ``true``, right mouse button click can select items. ---- +.. _class_ItemList_property_allow_search: + +.. rst-class:: classref-property + +:ref:`bool` **allow_search** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_allow_search** **(** :ref:`bool` value **)** +- :ref:`bool` **get_allow_search** **(** **)** + +If ``true``, allows navigating the **ItemList** with letter keys through incremental search. + +.. rst-class:: classref-item-separator + +---- + .. _class_ItemList_property_auto_height: .. rst-class:: classref-property @@ -668,6 +693,8 @@ Returns the item index at the given ``position``. When there is no item at that point, -1 will be returned if ``exact`` is ``true``, and the closest item index will be returned otherwise. +\ **Note:** The returned value is unreliable if called right after modifying the **ItemList**, before it redraws in the next frame. + .. rst-class:: classref-item-separator ---- @@ -756,6 +783,20 @@ Returns the metadata value of the specified index. ---- +.. _class_ItemList_method_get_item_rect: + +.. rst-class:: classref-method + +:ref:`Rect2` **get_item_rect** **(** :ref:`int` idx, :ref:`bool` expand=true **)** |const| + +Returns the position and size of the item with the specified index, in the coordinate system of the **ItemList** node. If ``expand`` is ``true`` the last column expands to fill the rest of the row. + +\ **Note:** The returned value is unreliable if called right after modifying the **ItemList**, before it redraws in the next frame. + +.. rst-class:: classref-item-separator + +---- + .. _class_ItemList_method_get_item_text: .. rst-class:: classref-method @@ -1127,6 +1168,18 @@ Default text :ref:`Color` of the item. ---- +.. _class_ItemList_theme_color_font_hovered_color: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **font_hovered_color** = ``Color(0.95, 0.95, 0.95, 1)`` + +Text :ref:`Color` used when the item is hovered and not selected yet. + +.. rst-class:: classref-item-separator + +---- + .. _class_ItemList_theme_color_font_outline_color: .. rst-class:: classref-themeproperty @@ -1285,6 +1338,18 @@ The focused style for the **ItemList**, drawn on top of the background, but belo ---- +.. _class_ItemList_theme_style_hovered: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **hovered** + +:ref:`StyleBox` for the hovered, but not selected items. + +.. rst-class:: classref-item-separator + +---- + .. _class_ItemList_theme_style_panel: .. rst-class:: classref-themeproperty diff --git a/classes/class_javascriptobject.rst b/classes/class_javascriptobject.rst index ec7c6688e00..65dafaadaf8 100644 --- a/classes/class_javascriptobject.rst +++ b/classes/class_javascriptobject.rst @@ -27,7 +27,7 @@ JavaScriptObject is used to interact with JavaScript objects retrieved or create extends Node - var _my_js_callback = JavaScriptBridge.create_callback(self, "myCallback") # This reference must be kept + var _my_js_callback = JavaScriptBridge.create_callback(myCallback) # This reference must be kept var console = JavaScriptBridge.get_interface("console") func _init(): diff --git a/classes/class_joint2d.rst b/classes/class_joint2d.rst index 92a1a40c39b..e08e3521df0 100644 --- a/classes/class_joint2d.rst +++ b/classes/class_joint2d.rst @@ -14,14 +14,14 @@ Joint2D **Inherited By:** :ref:`DampedSpringJoint2D`, :ref:`GrooveJoint2D`, :ref:`PinJoint2D` -Base node for all joint constraints in 2D physics. +Abstract base class for all 2D physics joints. .. rst-class:: classref-introduction-group Description ----------- -Base node for all joint constraints in 2D physics. Joints take 2 bodies and apply a custom constraint. +Abstract base class for all joints in 2D physics. 2D joints bind together two physics bodies and apply a constraint. .. rst-class:: classref-reftable-group diff --git a/classes/class_joint3d.rst b/classes/class_joint3d.rst index 716b348686d..487f13cc9b7 100644 --- a/classes/class_joint3d.rst +++ b/classes/class_joint3d.rst @@ -14,14 +14,14 @@ Joint3D **Inherited By:** :ref:`ConeTwistJoint3D`, :ref:`Generic6DOFJoint3D`, :ref:`HingeJoint3D`, :ref:`PinJoint3D`, :ref:`SliderJoint3D` -Base class for all 3D joints. +Abstract base class for all 3D physics joints. .. rst-class:: classref-introduction-group Description ----------- -Joints are used to bind together two physics bodies. They have a solver priority and can define if the bodies of the two attached nodes should be able to collide with each other. See also :ref:`Generic6DOFJoint3D`. +Abstract base class for all joints in 3D physics. 3D joints bind together two physics bodies and apply a constraint. .. rst-class:: classref-introduction-group diff --git a/classes/class_kinematiccollision2d.rst b/classes/class_kinematiccollision2d.rst index ed9b00d88d3..ced69cc9629 100644 --- a/classes/class_kinematiccollision2d.rst +++ b/classes/class_kinematiccollision2d.rst @@ -12,16 +12,16 @@ KinematicCollision2D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Collision data for :ref:`PhysicsBody2D.move_and_collide` collisions. +Holds collision data from the movement of a :ref:`PhysicsBody2D`. .. rst-class:: classref-introduction-group Description ----------- -Contains collision data for :ref:`PhysicsBody2D.move_and_collide` collisions. When a :ref:`PhysicsBody2D` is moved using :ref:`PhysicsBody2D.move_and_collide`, 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. -This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response. +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. .. rst-class:: classref-reftable-group diff --git a/classes/class_kinematiccollision3d.rst b/classes/class_kinematiccollision3d.rst index 9faace40d05..1ddd6c170a5 100644 --- a/classes/class_kinematiccollision3d.rst +++ b/classes/class_kinematiccollision3d.rst @@ -12,16 +12,16 @@ KinematicCollision3D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Collision data for :ref:`PhysicsBody3D.move_and_collide` collisions. +Holds collision data from the movement of a :ref:`PhysicsBody3D`. .. rst-class:: classref-introduction-group Description ----------- -Contains collision data for :ref:`PhysicsBody3D.move_and_collide` collisions. When a :ref:`PhysicsBody3D` is moved using :ref:`PhysicsBody3D.move_and_collide`, 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. -This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response. +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. .. rst-class:: classref-reftable-group diff --git a/classes/class_label.rst b/classes/class_label.rst index 45566598503..fd6eb7d68dd 100644 --- a/classes/class_label.rst +++ b/classes/class_label.rst @@ -12,16 +12,14 @@ Label **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Displays plain text in a line or wrapped inside a rectangle. For formatted text, use :ref:`RichTextLabel`. +A control for displaying plain text. .. rst-class:: classref-introduction-group Description ----------- -Label displays plain text on the screen. It gives you control over the horizontal and vertical alignment and can wrap the text inside the node's bounding rectangle. It doesn't support bold, italics, or other formatting. For that, use :ref:`RichTextLabel` instead. - -\ **Note:** Contrarily to most other :ref:`Control`\ s, Label's :ref:`Control.mouse_filter` defaults to :ref:`Control.MOUSE_FILTER_IGNORE` (i.e. it doesn't react to mouse input events). This implies that a label won't display any configured :ref:`Control.tooltip_text`, unless you change its mouse filter. +A control for displaying plain text. It gives you control over the horizontal and vertical alignment and can wrap the text inside the node's bounding rectangle. It doesn't support bold, italics, or other rich text formatting. For that, use :ref:`RichTextLabel` instead. .. rst-class:: classref-introduction-group @@ -45,6 +43,8 @@ Properties +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`HorizontalAlignment` | :ref:`horizontal_alignment` | ``0`` | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`JustificationFlag` | :ref:`justification_flags` | ``163`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`LabelSettings` | :ref:`label_settings` | | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`String` | :ref:`language` | ``""`` | @@ -61,6 +61,8 @@ Properties +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`tab_stops` | ``PackedFloat32Array()`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`String` | :ref:`text` | ``""`` | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`TextDirection` | :ref:`text_direction` | ``0`` | @@ -188,6 +190,23 @@ Controls the text's horizontal alignment. Supports left, center, right, and fill ---- +.. _class_Label_property_justification_flags: + +.. rst-class:: classref-property + +:ref:`JustificationFlag` **justification_flags** = ``163`` + +.. rst-class:: classref-property-setget + +- void **set_justification_flags** **(** :ref:`JustificationFlag` value **)** +- :ref:`JustificationFlag` **get_justification_flags** **(** **)** + +Line fill alignment rules. For more info see :ref:`JustificationFlag`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Label_property_label_settings: .. rst-class:: classref-property @@ -290,6 +309,23 @@ Set additional options for BiDi override. ---- +.. _class_Label_property_tab_stops: + +.. rst-class:: classref-property + +:ref:`PackedFloat32Array` **tab_stops** = ``PackedFloat32Array()`` + +.. rst-class:: classref-property-setget + +- void **set_tab_stops** **(** :ref:`PackedFloat32Array` value **)** +- :ref:`PackedFloat32Array` **get_tab_stops** **(** **)** + +Aligns text to the given tab-stops. + +.. rst-class:: classref-item-separator + +---- + .. _class_Label_property_text: .. rst-class:: classref-property diff --git a/classes/class_label3d.rst b/classes/class_label3d.rst index 9328f147e3e..9e3e0635a96 100644 --- a/classes/class_label3d.rst +++ b/classes/class_label3d.rst @@ -12,14 +12,14 @@ Label3D **Inherits:** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -Displays plain text in a 3D world. +A node for displaying plain text in 3D space. .. rst-class:: classref-introduction-group Description ----------- -Label3D displays plain text in a 3D world. It gives you control over the horizontal and vertical alignment. +A node for displaying plain text in 3D space. By adjusting various properties of this node, you can configure things such as the text's appearance and whether it always faces the camera. .. rst-class:: classref-reftable-group @@ -58,6 +58,8 @@ Properties +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :ref:`HorizontalAlignment` | :ref:`horizontal_alignment` | ``1`` | +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`JustificationFlag` | :ref:`justification_flags` | ``163`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`language` | ``""`` | +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`line_spacing` | ``0.0`` | @@ -431,6 +433,23 @@ Controls the text's horizontal alignment. Supports left, center, right, and fill ---- +.. _class_Label3D_property_justification_flags: + +.. rst-class:: classref-property + +:ref:`JustificationFlag` **justification_flags** = ``163`` + +.. rst-class:: classref-property-setget + +- void **set_justification_flags** **(** :ref:`JustificationFlag` value **)** +- :ref:`JustificationFlag` **get_justification_flags** **(** **)** + +Line fill alignment rules. For more info see :ref:`JustificationFlag`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Label3D_property_language: .. rst-class:: classref-property diff --git a/classes/class_labelsettings.rst b/classes/class_labelsettings.rst index 69544c2b94f..c7e784e8bf9 100644 --- a/classes/class_labelsettings.rst +++ b/classes/class_labelsettings.rst @@ -12,14 +12,14 @@ LabelSettings **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Collection of common settings to customize label text. +Provides common settings to customize the text in a :ref:`Label`. .. rst-class:: classref-introduction-group Description ----------- -**LabelSettings** is a resource that can be assigned to a :ref:`Label` node to customize it. It will take priority over the properties defined in theme. The resource can be shared between multiple labels and swapped on the fly, so it's convenient and flexible way to setup text style. +**LabelSettings** is a resource that provides common settings to customize the text in a :ref:`Label`. It will take priority over the properties defined in :ref:`Control.theme`. The resource can be shared between multiple labels and changed on the fly, so it's convenient and flexible way to setup text style. .. rst-class:: classref-reftable-group diff --git a/classes/class_light3d.rst b/classes/class_light3d.rst index e8c388b0057..db84c05d4db 100644 --- a/classes/class_light3d.rst +++ b/classes/class_light3d.rst @@ -335,7 +335,7 @@ Light is taken into account in static baking (:ref:`VoxelGI`, :re :ref:`BakeMode` **BAKE_DYNAMIC** = ``2`` -Light is taken into account in dynamic baking (:ref:`VoxelGI` and SDFGI (:ref:`Environment.sdfgi_enabled`) only). The light can be moved around or modified with global illumination updating in real-time. The light's global illumination appearance will be slightly different compared to :ref:`BAKE_STATIC`. This has a greater performance cost compared to :ref:`BAKE_STATIC`. +Light is taken into account in dynamic baking (:ref:`VoxelGI` and SDFGI (:ref:`Environment.sdfgi_enabled`) only). The light can be moved around or modified with global illumination updating in real-time. The light's global illumination appearance will be slightly different compared to :ref:`BAKE_STATIC`. This has a greater performance cost compared to :ref:`BAKE_STATIC`. When using SDFGI, the update speed of dynamic lights is affected by :ref:`ProjectSettings.rendering/global_illumination/sdfgi/frames_to_update_lights`. .. rst-class:: classref-section-separator diff --git a/classes/class_lineedit.rst b/classes/class_lineedit.rst index 2691cedd5bc..77f59193054 100644 --- a/classes/class_lineedit.rst +++ b/classes/class_lineedit.rst @@ -12,16 +12,14 @@ LineEdit **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Control that provides single-line string editing. +An input field for single-line text. .. rst-class:: classref-introduction-group Description ----------- -LineEdit provides a single-line string editor, used for text fields. - -It features many built-in shortcuts which will always be available (:kbd:`Ctrl` here maps to :kbd:`Cmd` on macOS): +**LineEdit** provides an input field for editing a single line of text. It features many built-in shortcuts that are always available (:kbd:`Ctrl` here maps to :kbd:`Cmd` on macOS): - :kbd:`Ctrl + C`: Copy @@ -45,21 +43,21 @@ It features many built-in shortcuts which will always be available (:kbd:`Ctrl` On macOS, some extra keyboard shortcuts are available: -- :kbd:`Ctrl + F`: Same as :kbd:`Right Arrow`, move the caret one character right +- :kbd:`Cmd + F`: Same as :kbd:`Right Arrow`, move the caret one character right -- :kbd:`Ctrl + B`: Same as :kbd:`Left Arrow`, move the caret one character left +- :kbd:`Cmd + B`: Same as :kbd:`Left Arrow`, move the caret one character left -- :kbd:`Ctrl + P`: Same as :kbd:`Up Arrow`, move the caret to the previous line +- :kbd:`Cmd + P`: Same as :kbd:`Up Arrow`, move the caret to the previous line -- :kbd:`Ctrl + N`: Same as :kbd:`Down Arrow`, move the caret to the next line +- :kbd:`Cmd + N`: Same as :kbd:`Down Arrow`, move the caret to the next line -- :kbd:`Ctrl + D`: Same as :kbd:`Delete`, delete the character on the right side of caret +- :kbd:`Cmd + D`: Same as :kbd:`Delete`, delete the character on the right side of caret -- :kbd:`Ctrl + H`: Same as :kbd:`Backspace`, delete the character on the left side of the caret +- :kbd:`Cmd + H`: Same as :kbd:`Backspace`, delete the character on the left side of the caret -- :kbd:`Ctrl + A`: Same as :kbd:`Home`, move the caret to the beginning of the line +- :kbd:`Cmd + A`: Same as :kbd:`Home`, move the caret to the beginning of the line -- :kbd:`Ctrl + E`: Same as :kbd:`End`, move the caret to the end of the line +- :kbd:`Cmd + E`: Same as :kbd:`End`, move the caret to the end of the line - :kbd:`Cmd + Left Arrow`: Same as :kbd:`Home`, move the caret to the beginning of the line @@ -158,6 +156,8 @@ Methods +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_scroll_offset` **(** **)** |const| | +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_selected_text` **(** **)** | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_selection_from_column` **(** **)** |const| | +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_selection_to_column` **(** **)** |const| | @@ -640,7 +640,7 @@ Text alignment as defined in the :ref:`HorizontalAlignment` value **)** - :ref:`bool` **is_caret_blink_enabled** **(** **)** -If ``true``, the caret (text cursor) blinks. +If ``true``, makes the caret blink. .. rst-class:: classref-item-separator @@ -657,7 +657,7 @@ If ``true``, the caret (text cursor) blinks. - void **set_caret_blink_interval** **(** :ref:`float` value **)** - :ref:`float` **get_caret_blink_interval** **(** **)** -Duration (in seconds) of a caret's blinking cycle. +The interval at which the caret blinks (in seconds). .. rst-class:: classref-item-separator @@ -727,7 +727,7 @@ Allow moving caret, selecting and removing the individual composite character co - void **set_clear_button_enabled** **(** :ref:`bool` value **)** - :ref:`bool` **is_clear_button_enabled** **(** **)** -If ``true``, the **LineEdit** will show a clear button if ``text`` is not empty, which can be used to clear the text quickly. +If ``true``, the **LineEdit** will show a clear button if :ref:`text` is not empty, which can be used to clear the text quickly. .. rst-class:: classref-item-separator @@ -1264,6 +1264,18 @@ Returns the scroll offset due to :ref:`caret_column` **get_selected_text** **(** **)** + +Returns the text inside the selection. + +.. rst-class:: classref-item-separator + +---- + .. _class_LineEdit_method_get_selection_from_column: .. rst-class:: classref-method @@ -1572,7 +1584,7 @@ Texture for the clear button. See :ref:`clear_button_enabled` **focus** -Background used when **LineEdit** has GUI focus. The ``focus`` :ref:`StyleBox` is displayed *over* the base :ref:`StyleBox`, so a partially transparent :ref:`StyleBox` should be used to ensure the base :ref:`StyleBox` remains visible. A :ref:`StyleBox` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. +Background used when **LineEdit** has GUI focus. The :ref:`focus` :ref:`StyleBox` is displayed *over* the base :ref:`StyleBox`, so a partially transparent :ref:`StyleBox` should be used to ensure the base :ref:`StyleBox` remains visible. A :ref:`StyleBox` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. .. rst-class:: classref-item-separator diff --git a/classes/class_linkbutton.rst b/classes/class_linkbutton.rst index 7457312514d..aad5d7b8a0d 100644 --- a/classes/class_linkbutton.rst +++ b/classes/class_linkbutton.rst @@ -12,14 +12,14 @@ LinkButton **Inherits:** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Simple button used to represent a link to some resource. +A button that represents a link. .. rst-class:: classref-introduction-group Description ----------- -This kind of button is primarily used when the interaction with the button causes a context change (like linking to a web page). +A button that represents a link. This type of button is primarily used for interactions that cause a context change (like linking to a web page). See also :ref:`BaseButton` which contains common properties and methods associated with this node. diff --git a/classes/class_margincontainer.rst b/classes/class_margincontainer.rst index 6aa202fefce..4678c955817 100644 --- a/classes/class_margincontainer.rst +++ b/classes/class_margincontainer.rst @@ -12,16 +12,16 @@ MarginContainer **Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Simple margin container. +A container that keeps a margin around its child controls. .. rst-class:: classref-introduction-group Description ----------- -Adds a top, left, bottom, and right margin to all :ref:`Control` nodes that are direct children of the container. To control the **MarginContainer**'s margin, use the ``margin_*`` theme properties listed below. +**MarginContainer** adds an adjustable margin on each side of its child controls. The margins are added around all children, not around each individual one. To control the **MarginContainer**'s margins, use the ``margin_*`` theme properties listed below. -\ **Note:** Be careful, :ref:`Control` margin values are different from the constant margin values. If you want to change the custom margin values of the **MarginContainer** by code, you should use the following examples: +\ **Note:** The margin sizes are theme overrides, not normal properties. This is an example of how to change them in code: .. tabs:: @@ -51,7 +51,7 @@ Adds a top, left, bottom, and right margin to all :ref:`Control` Tutorials --------- -- :doc:`GUI containers <../tutorials/ui/gui_containers>` +- :doc:`Using Containers <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group diff --git a/classes/class_marker2d.rst b/classes/class_marker2d.rst index 5493212261d..035a24258f9 100644 --- a/classes/class_marker2d.rst +++ b/classes/class_marker2d.rst @@ -19,7 +19,7 @@ Generic 2D position hint for editing. Description ----------- -Generic 2D position hint for editing. It's just like a plain :ref:`Node2D`, but it displays as a cross in the 2D editor at all times. You can set cross' visual size by using the gizmo in the 2D editor while the node is selected. +Generic 2D position hint for editing. It's just like a plain :ref:`Node2D`, but it displays as a cross in the 2D editor at all times. You can set the cross' visual size by using the gizmo in the 2D editor while the node is selected. .. rst-class:: classref-reftable-group diff --git a/classes/class_menubar.rst b/classes/class_menubar.rst index cbf890b18bf..984facc726f 100644 --- a/classes/class_menubar.rst +++ b/classes/class_menubar.rst @@ -12,14 +12,14 @@ MenuBar **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -A horizontal menu bar, which displays :ref:`PopupMenu`\ s or system global menu. +A horizontal menu bar that creates a :ref:`MenuButton` for each :ref:`PopupMenu` child. .. rst-class:: classref-introduction-group Description ----------- -New items can be created by adding :ref:`PopupMenu` nodes to this node. +A horizontal menu bar that creates a :ref:`MenuButton` for each :ref:`PopupMenu` child. New items are created by adding :ref:`PopupMenu`\ s to this node. .. rst-class:: classref-reftable-group diff --git a/classes/class_menubutton.rst b/classes/class_menubutton.rst index 3421950e124..8d09a3f1687 100644 --- a/classes/class_menubutton.rst +++ b/classes/class_menubutton.rst @@ -12,16 +12,14 @@ MenuButton **Inherits:** :ref:`Button` **<** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Special button that brings up a :ref:`PopupMenu` when clicked. +A button that brings up a :ref:`PopupMenu` when clicked. .. rst-class:: classref-introduction-group Description ----------- -Special button that brings up a :ref:`PopupMenu` when clicked. - -New items can be created inside this :ref:`PopupMenu` using ``get_popup().add_item("My Item Name")``. You can also create them directly from the editor. To do so, select the **MenuButton** node, then in the toolbar at the top of the 2D editor, click **Items** then click **Add** in the popup. You will be able to give each item new properties. +A button that brings up a :ref:`PopupMenu` when clicked. To create new items inside this :ref:`PopupMenu`, use ``get_popup().add_item("My Item Name")``. You can also create them directly from Godot editor's inspector. See also :ref:`BaseButton` which contains common properties and methods associated with this node. diff --git a/classes/class_mesh.rst b/classes/class_mesh.rst index 0385cf53c03..f99358c3b04 100644 --- a/classes/class_mesh.rst +++ b/classes/class_mesh.rst @@ -229,7 +229,7 @@ enum **ArrayType**: :ref:`ArrayType` **ARRAY_CUSTOM0** = ``6`` -Contains custom color channel 0. :ref:`PackedByteArray` if ``(format >> [constant ARRAY_FORMAT_CUSTOM0_SHIFT]) & [constant ARRAY_FORMAT_CUSTOM_MASK])`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RG_HALF` or :ref:`ARRAY_CUSTOM_RGBA_HALF`. :ref:`PackedFloat32Array` otherwise. +Contains custom color channel 0. :ref:`PackedByteArray` if ``(format >> Mesh.ARRAY_FORMAT_CUSTOM0_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RG_HALF` or :ref:`ARRAY_CUSTOM_RGBA_HALF`. :ref:`PackedFloat32Array` otherwise. .. _class_Mesh_constant_ARRAY_CUSTOM1: @@ -237,7 +237,7 @@ Contains custom color channel 0. :ref:`PackedByteArray` i :ref:`ArrayType` **ARRAY_CUSTOM1** = ``7`` -Contains custom color channel 1. :ref:`PackedByteArray` if ``(format >> [constant ARRAY_FORMAT_CUSTOM1_SHIFT]) & [constant ARRAY_FORMAT_CUSTOM_MASK])`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RG_HALF` or :ref:`ARRAY_CUSTOM_RGBA_HALF`. :ref:`PackedFloat32Array` otherwise. +Contains custom color channel 1. :ref:`PackedByteArray` if ``(format >> Mesh.ARRAY_FORMAT_CUSTOM1_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RG_HALF` or :ref:`ARRAY_CUSTOM_RGBA_HALF`. :ref:`PackedFloat32Array` otherwise. .. _class_Mesh_constant_ARRAY_CUSTOM2: @@ -245,7 +245,7 @@ Contains custom color channel 1. :ref:`PackedByteArray` i :ref:`ArrayType` **ARRAY_CUSTOM2** = ``8`` -Contains custom color channel 2. :ref:`PackedByteArray` if ``(format >> [constant ARRAY_FORMAT_CUSTOM2_SHIFT]) & [constant ARRAY_FORMAT_CUSTOM_MASK])`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RG_HALF` or :ref:`ARRAY_CUSTOM_RGBA_HALF`. :ref:`PackedFloat32Array` otherwise. +Contains custom color channel 2. :ref:`PackedByteArray` if ``(format >> Mesh.ARRAY_FORMAT_CUSTOM2_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RG_HALF` or :ref:`ARRAY_CUSTOM_RGBA_HALF`. :ref:`PackedFloat32Array` otherwise. .. _class_Mesh_constant_ARRAY_CUSTOM3: @@ -253,7 +253,7 @@ Contains custom color channel 2. :ref:`PackedByteArray` i :ref:`ArrayType` **ARRAY_CUSTOM3** = ``9`` -Contains custom color channel 3. :ref:`PackedByteArray` if ``(format >> [constant ARRAY_FORMAT_CUSTOM3_SHIFT]) & [constant ARRAY_FORMAT_CUSTOM_MASK])`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RG_HALF` or :ref:`ARRAY_CUSTOM_RGBA_HALF`. :ref:`PackedFloat32Array` otherwise. +Contains custom color channel 3. :ref:`PackedByteArray` if ``(format >> Mesh.ARRAY_FORMAT_CUSTOM3_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RG_HALF` or :ref:`ARRAY_CUSTOM_RGBA_HALF`. :ref:`PackedFloat32Array` otherwise. .. _class_Mesh_constant_ARRAY_BONES: diff --git a/classes/class_meshconvexdecompositionsettings.rst b/classes/class_meshconvexdecompositionsettings.rst new file mode 100644 index 00000000000..e599c209dc3 --- /dev/null +++ b/classes/class_meshconvexdecompositionsettings.rst @@ -0,0 +1,322 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/MeshConvexDecompositionSettings.xml. + +.. _class_MeshConvexDecompositionSettings: + +MeshConvexDecompositionSettings +=============================== + +**Inherits:** :ref:`RefCounted` **<** :ref:`Object` + +Parameters to be used with a :ref:`Mesh` convex decomposition operation. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Parameters to be used with a :ref:`Mesh` convex decomposition operation. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`bool` | :ref:`convex_hull_approximation` | ``true`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`int` | :ref:`convex_hull_downsampling` | ``4`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`max_concavity` | ``1.0`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`int` | :ref:`max_convex_hulls` | ``1`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`int` | :ref:`max_num_vertices_per_convex_hull` | ``32`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`min_volume_per_convex_hull` | ``0.0001`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`Mode` | :ref:`mode` | ``0`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`bool` | :ref:`normalize_mesh` | ``false`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`int` | :ref:`plane_downsampling` | ``4`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`bool` | :ref:`project_hull_vertices` | ``true`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`int` | :ref:`resolution` | ``10000`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`revolution_axes_clipping_bias` | ``0.05`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`symmetry_planes_clipping_bias` | ``0.05`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_MeshConvexDecompositionSettings_Mode: + +.. rst-class:: classref-enumeration + +enum **Mode**: + +.. _class_MeshConvexDecompositionSettings_constant_CONVEX_DECOMPOSITION_MODE_VOXEL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **CONVEX_DECOMPOSITION_MODE_VOXEL** = ``0`` + +Constant for voxel-based approximate convex decomposition. + +.. _class_MeshConvexDecompositionSettings_constant_CONVEX_DECOMPOSITION_MODE_TETRAHEDRON: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **CONVEX_DECOMPOSITION_MODE_TETRAHEDRON** = ``1`` + +Constant for tetrahedron-based approximate convex decomposition. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_MeshConvexDecompositionSettings_property_convex_hull_approximation: + +.. rst-class:: classref-property + +:ref:`bool` **convex_hull_approximation** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_convex_hull_approximation** **(** :ref:`bool` value **)** +- :ref:`bool` **get_convex_hull_approximation** **(** **)** + +If enabled uses approximation for computing convex hulls. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_convex_hull_downsampling: + +.. rst-class:: classref-property + +:ref:`int` **convex_hull_downsampling** = ``4`` + +.. rst-class:: classref-property-setget + +- void **set_convex_hull_downsampling** **(** :ref:`int` value **)** +- :ref:`int` **get_convex_hull_downsampling** **(** **)** + +Controls the precision of the convex-hull generation process during the clipping plane selection stage. Ranges from ``1`` to ``16``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_max_concavity: + +.. rst-class:: classref-property + +:ref:`float` **max_concavity** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_max_concavity** **(** :ref:`float` value **)** +- :ref:`float` **get_max_concavity** **(** **)** + +Maximum concavity. Ranges from ``0.0`` to ``1.0``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_max_convex_hulls: + +.. rst-class:: classref-property + +:ref:`int` **max_convex_hulls** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_max_convex_hulls** **(** :ref:`int` value **)** +- :ref:`int` **get_max_convex_hulls** **(** **)** + +The maximum number of convex hulls to produce from the merge operation. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_max_num_vertices_per_convex_hull: + +.. rst-class:: classref-property + +:ref:`int` **max_num_vertices_per_convex_hull** = ``32`` + +.. rst-class:: classref-property-setget + +- void **set_max_num_vertices_per_convex_hull** **(** :ref:`int` value **)** +- :ref:`int` **get_max_num_vertices_per_convex_hull** **(** **)** + +Controls the maximum number of triangles per convex-hull. Ranges from ``4`` to ``1024``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_min_volume_per_convex_hull: + +.. rst-class:: classref-property + +:ref:`float` **min_volume_per_convex_hull** = ``0.0001`` + +.. rst-class:: classref-property-setget + +- void **set_min_volume_per_convex_hull** **(** :ref:`float` value **)** +- :ref:`float` **get_min_volume_per_convex_hull** **(** **)** + +Controls the adaptive sampling of the generated convex-hulls. Ranges from ``0.0`` to ``0.01``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_mode: + +.. rst-class:: classref-property + +:ref:`Mode` **mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_mode** **(** :ref:`Mode` value **)** +- :ref:`Mode` **get_mode** **(** **)** + +Mode for the approximate convex decomposition. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_normalize_mesh: + +.. rst-class:: classref-property + +:ref:`bool` **normalize_mesh** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_normalize_mesh** **(** :ref:`bool` value **)** +- :ref:`bool` **get_normalize_mesh** **(** **)** + +If enabled normalizes the mesh before applying the convex decomposition. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_plane_downsampling: + +.. rst-class:: classref-property + +:ref:`int` **plane_downsampling** = ``4`` + +.. rst-class:: classref-property-setget + +- void **set_plane_downsampling** **(** :ref:`int` value **)** +- :ref:`int` **get_plane_downsampling** **(** **)** + +Controls the granularity of the search for the "best" clipping plane. Ranges from ``1`` to ``16``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_project_hull_vertices: + +.. rst-class:: classref-property + +:ref:`bool` **project_hull_vertices** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_project_hull_vertices** **(** :ref:`bool` value **)** +- :ref:`bool` **get_project_hull_vertices** **(** **)** + +If enabled projects output convex hull vertices onto original source mesh to increase floating point accuracy of the results. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_resolution: + +.. rst-class:: classref-property + +:ref:`int` **resolution** = ``10000`` + +.. rst-class:: classref-property-setget + +- void **set_resolution** **(** :ref:`int` value **)** +- :ref:`int` **get_resolution** **(** **)** + +Maximum number of voxels generated during the voxelization stage. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_revolution_axes_clipping_bias: + +.. rst-class:: classref-property + +:ref:`float` **revolution_axes_clipping_bias** = ``0.05`` + +.. rst-class:: classref-property-setget + +- void **set_revolution_axes_clipping_bias** **(** :ref:`float` value **)** +- :ref:`float` **get_revolution_axes_clipping_bias** **(** **)** + +Controls the bias toward clipping along revolution axes. Ranges from ``0.0`` to ``1.0``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_symmetry_planes_clipping_bias: + +.. rst-class:: classref-property + +:ref:`float` **symmetry_planes_clipping_bias** = ``0.05`` + +.. rst-class:: classref-property-setget + +- void **set_symmetry_planes_clipping_bias** **(** :ref:`float` value **)** +- :ref:`float` **get_symmetry_planes_clipping_bias** **(** **)** + +Controls the bias toward clipping along symmetry planes. Ranges from ``0.0`` to ``1.0``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_meshdatatool.rst b/classes/class_meshdatatool.rst index 778e5b1b291..6d2c6e27c9f 100644 --- a/classes/class_meshdatatool.rst +++ b/classes/class_meshdatatool.rst @@ -40,7 +40,7 @@ Below is an example of how MeshDataTool may be used. vertex += mdt.get_vertex_normal(i) # Save your change. mdt.set_vertex(i, vertex) - mesh.surface_remove(0) + mesh.clear_surfaces() mdt.commit_to_surface(mesh) var mi = MeshInstance.new() mi.mesh = mesh @@ -60,7 +60,7 @@ Below is an example of how MeshDataTool may be used. // Save your change. mdt.SetVertex(i, vertex); } - mesh.SurfaceRemove(0); + mesh.ClearSurfaces(); mdt.CommitToSurface(mesh); var mi = new MeshInstance(); mi.Mesh = mesh; diff --git a/classes/class_meshinstance3d.rst b/classes/class_meshinstance3d.rst index 2d674074498..58d503f1f88 100644 --- a/classes/class_meshinstance3d.rst +++ b/classes/class_meshinstance3d.rst @@ -60,31 +60,31 @@ Methods .. table:: :widths: auto - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_convex_collision` **(** :ref:`bool` clean=true, :ref:`bool` simplify=false **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_debug_tangents` **(** **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_multiple_convex_collisions` **(** **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_trimesh_collision` **(** **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`find_blend_shape_by_name` **(** :ref:`StringName` name **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Material` | :ref:`get_active_material` **(** :ref:`int` surface **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_blend_shape_count` **(** **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_blend_shape_value` **(** :ref:`int` blend_shape_idx **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Material` | :ref:`get_surface_override_material` **(** :ref:`int` surface **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_surface_override_material_count` **(** **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_blend_shape_value` **(** :ref:`int` blend_shape_idx, :ref:`float` value **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_surface_override_material` **(** :ref:`int` surface, :ref:`Material` material **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_convex_collision` **(** :ref:`bool` clean=true, :ref:`bool` simplify=false **)** | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_debug_tangents` **(** **)** | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_multiple_convex_collisions` **(** :ref:`MeshConvexDecompositionSettings` settings=null **)** | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_trimesh_collision` **(** **)** | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find_blend_shape_by_name` **(** :ref:`StringName` name **)** | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Material` | :ref:`get_active_material` **(** :ref:`int` surface **)** |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_blend_shape_count` **(** **)** |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_blend_shape_value` **(** :ref:`int` blend_shape_idx **)** |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Material` | :ref:`get_surface_override_material` **(** :ref:`int` surface **)** |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_surface_override_material_count` **(** **)** |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_blend_shape_value` **(** :ref:`int` blend_shape_idx, :ref:`float` value **)** | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_surface_override_material` **(** :ref:`int` surface, :ref:`Material` material **)** | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -183,9 +183,9 @@ This helper creates a **MeshInstance3D** child node with gizmos at every vertex .. rst-class:: classref-method -void **create_multiple_convex_collisions** **(** **)** +void **create_multiple_convex_collisions** **(** :ref:`MeshConvexDecompositionSettings` settings=null **)** -This helper creates a :ref:`StaticBody3D` child node with multiple :ref:`ConvexPolygonShape3D` collision shapes calculated from the mesh geometry via convex decomposition. It's mainly used for testing. +This helper creates a :ref:`StaticBody3D` child node with multiple :ref:`ConvexPolygonShape3D` collision shapes calculated from the mesh geometry via convex decomposition. The convex decomposition operation can be controlled with parameters from the optional ``settings``. .. rst-class:: classref-item-separator diff --git a/classes/class_missingnode.rst b/classes/class_missingnode.rst index 0e9f519842c..d9562674516 100644 --- a/classes/class_missingnode.rst +++ b/classes/class_missingnode.rst @@ -12,7 +12,7 @@ MissingNode **Inherits:** :ref:`Node` **<** :ref:`Object` -This is an internal editor class intended for keeping data of nodes of unknown type. +An internal editor class intended for keeping the data of unrecognized nodes. .. rst-class:: classref-introduction-group @@ -55,9 +55,7 @@ Property Descriptions - void **set_original_class** **(** :ref:`String` value **)** - :ref:`String` **get_original_class** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Returns the name of the type this node was originally. .. rst-class:: classref-item-separator diff --git a/classes/class_missingresource.rst b/classes/class_missingresource.rst index d912a25b42e..d458b706331 100644 --- a/classes/class_missingresource.rst +++ b/classes/class_missingresource.rst @@ -12,7 +12,7 @@ MissingResource **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -This is an internal editor class intended for keeping data of resources of unknown type. +An internal editor class intended for keeping the data of unrecognized resources. .. rst-class:: classref-introduction-group @@ -55,9 +55,7 @@ Property Descriptions - void **set_original_class** **(** :ref:`String` value **)** - :ref:`String` **get_original_class** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Returns the name of the class this resource was originally. .. rst-class:: classref-item-separator diff --git a/classes/class_multiplayerpeerextension.rst b/classes/class_multiplayerpeerextension.rst index 8da8e70399e..9aa48ea6f95 100644 --- a/classes/class_multiplayerpeerextension.rst +++ b/classes/class_multiplayerpeerextension.rst @@ -42,6 +42,10 @@ Methods +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`_get_packet` **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| | +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_packet_channel` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TransferMode` | :ref:`_get_packet_mode` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_get_packet_peer` **(** **)** |virtual| |const| | +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`_get_packet_script` **(** **)** |virtual| | @@ -56,6 +60,8 @@ Methods +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_is_server` **(** **)** |virtual| |const| | +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_server_relay_supported` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_poll` **(** **)** |virtual| | +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`_put_packet` **(** const uint8_t* p_buffer, :ref:`int` p_buffer_size **)** |virtual| | @@ -152,6 +158,30 @@ Called when a packet needs to be received by the :ref:`MultiplayerAPI` **_get_packet_channel** **(** **)** |virtual| |const| + +Called to get the channel over which the next available packet was received. See :ref:`MultiplayerPeer.get_packet_channel`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MultiplayerPeerExtension_method__get_packet_mode: + +.. rst-class:: classref-method + +:ref:`TransferMode` **_get_packet_mode** **(** **)** |virtual| |const| + +Called to get the :ref:`TransferMode` the remote peer used to send the next available packet. See :ref:`MultiplayerPeer.get_packet_mode`. + +.. rst-class:: classref-item-separator + +---- + .. _class_MultiplayerPeerExtension_method__get_packet_peer: .. rst-class:: classref-method @@ -206,7 +236,7 @@ Called when the transfer mode to use is read on this :ref:`MultiplayerPeer` **_get_unique_id** **(** **)** |virtual| |const| -Called when the unique ID of this :ref:`MultiplayerPeer` is requested (see :ref:`MultiplayerPeer.get_unique_id`). +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 @@ -236,6 +266,18 @@ Called when the "is server" status is requested on the :ref:`MultiplayerAPI` **_is_server_relay_supported** **(** **)** |virtual| |const| + +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 + +---- + .. _class_MultiplayerPeerExtension_method__poll: .. rst-class:: classref-method diff --git a/classes/class_multiplayersynchronizer.rst b/classes/class_multiplayersynchronizer.rst index cb825dfc9ff..ae4a703bfd0 100644 --- a/classes/class_multiplayersynchronizer.rst +++ b/classes/class_multiplayersynchronizer.rst @@ -27,6 +27,8 @@ Visibility can be handled directly with :ref:`set_visibility_for` 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. + .. rst-class:: classref-reftable-group Properties @@ -35,6 +37,8 @@ Properties .. table:: :widths: auto + +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+--------------------+ + | :ref:`float` | :ref:`delta_interval` | ``0.0`` | +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+--------------------+ | :ref:`bool` | :ref:`public_visibility` | ``true`` | +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+--------------------+ @@ -76,13 +80,25 @@ Methods Signals ------- +.. _class_MultiplayerSynchronizer_signal_delta_synchronized: + +.. rst-class:: classref-signal + +**delta_synchronized** **(** **)** + +Emitted when a new delta synchronization state is received by this synchronizer after the properties have been updated. + +.. rst-class:: classref-item-separator + +---- + .. _class_MultiplayerSynchronizer_signal_synchronized: .. rst-class:: classref-signal **synchronized** **(** **)** -Emitted when a new synchronization state is received by this synchronizer after the variables have been updated. +Emitted when a new synchronization state is received by this synchronizer after the properties have been updated. .. rst-class:: classref-item-separator @@ -144,6 +160,23 @@ Visibility filters are not updated automatically, and must be updated manually b Property Descriptions --------------------- +.. _class_MultiplayerSynchronizer_property_delta_interval: + +.. rst-class:: classref-property + +:ref:`float` **delta_interval** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_delta_interval** **(** :ref:`float` value **)** +- :ref:`float` **get_delta_interval** **(** **)** + +Time interval between delta synchronizations. When set to ``0.0`` (the default), delta synchronizations happen every network process frame. + +.. rst-class:: classref-item-separator + +---- + .. _class_MultiplayerSynchronizer_property_public_visibility: .. rst-class:: classref-property @@ -189,7 +222,7 @@ Resource containing which properties to synchronize. - void **set_replication_interval** **(** :ref:`float` value **)** - :ref:`float` **get_replication_interval** **(** **)** -Time interval between synchronizes. When set to ``0.0`` (the default), synchronizes happen every network process frame. +Time interval between synchronizations. When set to ``0.0`` (the default), synchronizations happen every network process frame. .. rst-class:: classref-item-separator @@ -292,7 +325,7 @@ Sets the visibility of ``peer`` to ``visible``. If ``peer`` is ``0``, the value void **update_visibility** **(** :ref:`int` for_peer=0 **)** -Updates the visibility of ``peer`` according to visibility filters. If ``peer`` is ``0`` (the default), all peers' visibilties are updated. +Updates the visibility of ``for_peer`` according to visibility filters. If ``for_peer`` is ``0`` (the default), all peers' visibilties are updated. .. |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_mutex.rst b/classes/class_mutex.rst index 41e261e466d..b72ae9b2e8c 100644 --- a/classes/class_mutex.rst +++ b/classes/class_mutex.rst @@ -12,14 +12,24 @@ Mutex **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -A synchronization mutex (mutual exclusion). +A binary :ref:`Semaphore` for synchronization of multiple :ref:`Thread`\ s. .. rst-class:: classref-introduction-group Description ----------- -A synchronization mutex (mutual exclusion). This is used to synchronize multiple :ref:`Thread`\ s, and is equivalent to a binary :ref:`Semaphore`. It guarantees that only one thread can ever acquire the lock at a time. A mutex can be used to protect a critical section; however, be careful to avoid deadlocks. +A synchronization mutex (mutual exclusion). This is used to synchronize multiple :ref:`Thread`\ s, and is equivalent to a binary :ref:`Semaphore`. It guarantees that only one thread can access a critical section at a time. + +This is a reentrant mutex, meaning that it can be locked multiple times by one thread, provided it also unlocks it as many times. + +\ **Warning:** Mutexes must be used carefully to avoid deadlocks. + +\ **Warning:** To ensure proper cleanup without crashes or deadlocks, the following conditions must be met: + +- When a **Mutex**'s reference count reaches zero and it is therefore destroyed, no threads (including the one on which the destruction will happen) must have it locked. + +- When a :ref:`Thread`'s reference count reaches zero and it is therefore destroyed, it must not have any mutex locked. .. rst-class:: classref-introduction-group @@ -28,6 +38,8 @@ Tutorials - :doc:`Using multiple threads <../tutorials/performance/using_multiple_threads>` +- :doc:`Thread-safe APIs <../tutorials/performance/thread_safe_apis>` + .. rst-class:: classref-reftable-group Methods @@ -91,6 +103,8 @@ 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. +\ **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.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_navigationagent2d.rst b/classes/class_navigationagent2d.rst index 738501d32a1..07ea6c4f3a7 100644 --- a/classes/class_navigationagent2d.rst +++ b/classes/class_navigationagent2d.rst @@ -12,16 +12,18 @@ NavigationAgent2D **Inherits:** :ref:`Node` **<** :ref:`Object` -2D Agent used in navigation for collision avoidance. +A 2D agent used to pathfind to a position while avoiding obstacles. .. rst-class:: classref-introduction-group Description ----------- -2D Agent that is used in navigation to reach a position while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. **NavigationAgent2D** is physics safe. +A 2D agent used to pathfind to a position while avoiding static and dynamic obstacles. The calculation can be used by the parent node to dynamically move it along the path. Requires navigation data to work correctly. -\ **Note:** After setting :ref:`target_position` it is required to use the :ref:`get_next_path_position` function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node. +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. .. rst-class:: classref-introduction-group @@ -38,41 +40,55 @@ Properties .. table:: :widths: auto - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`avoidance_enabled` | ``false`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`debug_enabled` | ``false`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Color` | :ref:`debug_path_custom_color` | ``Color(1, 1, 1, 1)`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`debug_path_custom_line_width` | ``1.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`debug_path_custom_point_size` | ``4.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`debug_use_custom` | ``false`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`int` | :ref:`max_neighbors` | ``10`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`max_speed` | ``100.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`int` | :ref:`navigation_layers` | ``1`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`neighbor_distance` | ``500.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`path_desired_distance` | ``20.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`path_max_distance` | ``100.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`PathMetadataFlags` | :ref:`path_metadata_flags` | ``7`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`radius` | ``10.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`target_desired_distance` | ``10.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Vector2` | :ref:`target_position` | ``Vector2(0, 0)`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`time_horizon` | ``1.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`avoidance_enabled` | ``false`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`avoidance_layers` | ``1`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`avoidance_mask` | ``1`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`avoidance_priority` | ``1.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`debug_enabled` | ``false`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`debug_path_custom_color` | ``Color(1, 1, 1, 1)`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`debug_path_custom_line_width` | ``-1.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`debug_path_custom_point_size` | ``4.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`debug_use_custom` | ``false`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`max_neighbors` | ``10`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`max_speed` | ``100.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`navigation_layers` | ``1`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`neighbor_distance` | ``500.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`path_desired_distance` | ``20.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`path_max_distance` | ``100.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`PathMetadataFlags` | :ref:`path_metadata_flags` | ``7`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`PathPostProcessing` | :ref:`path_postprocessing` | ``0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`PathfindingAlgorithm` | :ref:`pathfinding_algorithm` | ``0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`radius` | ``10.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`target_desired_distance` | ``10.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector2` | :ref:`target_position` | ``Vector2(0, 0)`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`time_horizon_agents` | ``1.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`time_horizon_obstacles` | ``0.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector2` | :ref:`velocity` | ``Vector2(0, 0)`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ .. rst-class:: classref-reftable-group @@ -85,6 +101,10 @@ Methods +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`distance_to_target` **(** **)** |const| | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_avoidance_layer_value` **(** :ref:`int` layer_number **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_avoidance_mask_value` **(** :ref:`int` mask_number **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector2Array` | :ref:`get_current_navigation_path` **(** **)** |const| | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_current_navigation_path_index` **(** **)** |const| | @@ -107,11 +127,15 @@ Methods +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_target_reached` **(** **)** |const| | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_avoidance_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_avoidance_mask_value` **(** :ref:`int` mask_number, :ref:`bool` value **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_velocity` **(** :ref:`Vector2` velocity **)** | + | void | :ref:`set_velocity_forced` **(** :ref:`Vector2` velocity **)** | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -191,7 +215,7 @@ Notifies when the player-defined :ref:`target_position` safe_velocity **)** -Notifies when the collision avoidance velocity is calculated. Emitted by :ref:`set_velocity`. Only emitted when :ref:`avoidance_enabled` is true. +Notifies when the collision avoidance velocity is calculated. Emitted when :ref:`velocity` is set. Only emitted when :ref:`avoidance_enabled` is true. .. rst-class:: classref-item-separator @@ -235,7 +259,58 @@ Property Descriptions - void **set_avoidance_enabled** **(** :ref:`bool` value **)** - :ref:`bool` **get_avoidance_enabled** **(** **)** -If ``true`` the agent is registered for an RVO avoidance callback on the :ref:`NavigationServer2D`. When :ref:`set_velocity` is used and the processing is completed a ``safe_velocity`` Vector2 is received with a signal connection to :ref:`velocity_computed`. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it. +If ``true`` the agent is registered for an RVO avoidance callback on the :ref:`NavigationServer2D`. When :ref:`velocity` is used and the processing is completed a ``safe_velocity`` Vector2 is received with a signal connection to :ref:`velocity_computed`. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent2D_property_avoidance_layers: + +.. rst-class:: classref-property + +:ref:`int` **avoidance_layers** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_avoidance_layers** **(** :ref:`int` value **)** +- :ref:`int` **get_avoidance_layers** **(** **)** + +A bitfield determining the avoidance layers for this NavigationAgent. Other agents with a matching bit on the :ref:`avoidance_mask` will avoid this agent. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent2D_property_avoidance_mask: + +.. rst-class:: classref-property + +:ref:`int` **avoidance_mask** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_avoidance_mask** **(** :ref:`int` value **)** +- :ref:`int` **get_avoidance_mask** **(** **)** + +A bitfield determining what other avoidance agents and obstacles this NavigationAgent will avoid when a bit matches at least one of their :ref:`avoidance_layers`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent2D_property_avoidance_priority: + +.. rst-class:: classref-property + +:ref:`float` **avoidance_priority** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_avoidance_priority** **(** :ref:`float` value **)** +- :ref:`float` **get_avoidance_priority** **(** **)** + +The agent does not adjust the velocity for other agents that would match the :ref:`avoidance_mask` but have a lower :ref:`avoidance_priority`. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent. .. rst-class:: classref-item-separator @@ -279,7 +354,7 @@ If :ref:`debug_use_custom` is .. rst-class:: classref-property -:ref:`float` **debug_path_custom_line_width** = ``1.0`` +:ref:`float` **debug_path_custom_line_width** = ``-1.0`` .. rst-class:: classref-property-setget @@ -371,7 +446,7 @@ The maximum speed that an agent can move. - void **set_navigation_layers** **(** :ref:`int` value **)** - :ref:`int` **get_navigation_layers** **(** **)** -A bitfield determining what navigation layers of navigation regions this agent will use to calculate path. Changing it runtime will clear current navigation path and generate new one, according to new navigation layers. +A bitfield determining which navigation layers of navigation regions this agent will use to calculate a path. Changing it during runtime will clear the current navigation path and generate a new one, according to the new navigation layers. .. rst-class:: classref-item-separator @@ -405,7 +480,7 @@ The distance to search for other agents. - void **set_path_desired_distance** **(** :ref:`float` value **)** - :ref:`float` **get_path_desired_distance** **(** **)** -The distance threshold before a path point is considered to be reached. This will allow an agent to not have to hit a path point on the path exactly, but in the area. If this value is set to high the NavigationAgent will skip points on the path which can lead to leaving the navigation mesh. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the next point on each physics frame update. +The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead too leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the next point on each physics frame update. .. rst-class:: classref-item-separator @@ -445,6 +520,40 @@ Additional information to return with the navigation path. ---- +.. _class_NavigationAgent2D_property_path_postprocessing: + +.. rst-class:: classref-property + +:ref:`PathPostProcessing` **path_postprocessing** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_path_postprocessing** **(** :ref:`PathPostProcessing` value **)** +- :ref:`PathPostProcessing` **get_path_postprocessing** **(** **)** + +The path postprocessing applied to the raw path corridor found by the :ref:`pathfinding_algorithm`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent2D_property_pathfinding_algorithm: + +.. rst-class:: classref-property + +:ref:`PathfindingAlgorithm` **pathfinding_algorithm** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_pathfinding_algorithm** **(** :ref:`PathfindingAlgorithm` value **)** +- :ref:`PathfindingAlgorithm` **get_pathfinding_algorithm** **(** **)** + +The pathfinding algorithm used in the path query. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationAgent2D_property_radius: .. rst-class:: classref-property @@ -475,7 +584,7 @@ Does not affect normal pathfinding. To change an actor's pathfinding radius bake - void **set_target_desired_distance** **(** :ref:`float` value **)** - :ref:`float` **get_target_desired_distance** **(** **)** -The distance threshold before the final target point is considered to be reached. This will allow an agent to not have to hit the point of the final target exactly, but only the area. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the final target point on each physics frame update. +The distance threshold before the final target point is considered to be reached. This allows agents to not have to hit the point of the final target exactly, but only to reach its general area. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the final target point on each physics frame update. .. rst-class:: classref-item-separator @@ -492,24 +601,58 @@ The distance threshold before the final target point is considered to be reached - void **set_target_position** **(** :ref:`Vector2` value **)** - :ref:`Vector2` **get_target_position** **(** **)** -The user-defined target position. Setting this property will clear the current navigation path. +If set a new navigation path from the current agent position to the :ref:`target_position` is requested from the NavigationServer. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent2D_property_time_horizon_agents: + +.. rst-class:: classref-property + +:ref:`float` **time_horizon_agents** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_time_horizon_agents** **(** :ref:`float` value **)** +- :ref:`float` **get_time_horizon_agents** **(** **)** + +The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. .. rst-class:: classref-item-separator ---- -.. _class_NavigationAgent2D_property_time_horizon: +.. _class_NavigationAgent2D_property_time_horizon_obstacles: .. rst-class:: classref-property -:ref:`float` **time_horizon** = ``1.0`` +:ref:`float` **time_horizon_obstacles** = ``0.0`` .. rst-class:: classref-property-setget -- void **set_time_horizon** **(** :ref:`float` value **)** -- :ref:`float` **get_time_horizon** **(** **)** +- void **set_time_horizon_obstacles** **(** :ref:`float` value **)** +- :ref:`float` **get_time_horizon_obstacles** **(** **)** -The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive. +The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to static avoidance obstacles. The larger the number, the sooner the agent will respond to static avoidance obstacles, but less freedom in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent2D_property_velocity: + +.. rst-class:: classref-property + +:ref:`Vector2` **velocity** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_velocity** **(** :ref:`Vector2` value **)** +- :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. .. rst-class:: classref-section-separator @@ -532,6 +675,30 @@ Returns the distance to the target position, using the agent's global position. ---- +.. _class_NavigationAgent2D_method_get_avoidance_layer_value: + +.. rst-class:: classref-method + +:ref:`bool` **get_avoidance_layer_value** **(** :ref:`int` layer_number **)** |const| + +Returns whether or not the specified layer of the :ref:`avoidance_layers` bitmask is enabled, given a ``layer_number`` between 1 and 32. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent2D_method_get_avoidance_mask_value: + +.. rst-class:: classref-method + +:ref:`bool` **get_avoidance_mask_value** **(** :ref:`int` mask_number **)** |const| + +Returns whether or not the specified mask of the :ref:`avoidance_mask` bitmask is enabled, given a ``mask_number`` between 1 and 32. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationAgent2D_method_get_current_navigation_path: .. rst-class:: classref-method @@ -574,7 +741,7 @@ Returns the path query result for the path the agent is currently following. :ref:`Vector2` **get_final_position** **(** **)** -Returns the reachable final position in global coordinates. This can change if the navigation path is altered in any way. Because of this, it would be best to check this each frame. +Returns the reachable final position of the current navigation path in global coordinates. This can change if the navigation path is altered in any way. Because of this, it would be best to check this each frame. .. rst-class:: classref-item-separator @@ -646,7 +813,7 @@ Returns true if the navigation path's final position has been reached. :ref:`bool` **is_target_reachable** **(** **)** -Returns true if :ref:`target_position` is reachable. +Returns true if :ref:`target_position` is reachable. The target position is set using :ref:`target_position`. .. rst-class:: classref-item-separator @@ -664,6 +831,30 @@ Returns true if :ref:`target_position` layer_number, :ref:`bool` value **)** + +Based on ``value``, enables or disables the specified layer in the :ref:`avoidance_layers` bitmask, given a ``layer_number`` between 1 and 32. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent2D_method_set_avoidance_mask_value: + +.. rst-class:: classref-method + +void **set_avoidance_mask_value** **(** :ref:`int` mask_number, :ref:`bool` value **)** + +Based on ``value``, enables or disables the specified mask in the :ref:`avoidance_mask` bitmask, given a ``mask_number`` between 1 and 32. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationAgent2D_method_set_navigation_layer_value: .. rst-class:: classref-method @@ -688,13 +879,13 @@ Sets the :ref:`RID` of the navigation map this NavigationAgent node s ---- -.. _class_NavigationAgent2D_method_set_velocity: +.. _class_NavigationAgent2D_method_set_velocity_forced: .. rst-class:: classref-method -void **set_velocity** **(** :ref:`Vector2` velocity **)** +void **set_velocity_forced** **(** :ref:`Vector2` velocity **)** -Sends the passed in velocity to the collision avoidance algorithm. It will adjust the velocity to avoid collisions. Once the adjustment to the velocity is complete, it will emit the :ref:`velocity_computed` signal. +Replaces the internal velocity in the collision avoidance simulation with ``velocity``. When an agent is teleported to a new position this function should be used in the same frame. If called frequently this function can get agents stuck. .. |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_navigationagent3d.rst b/classes/class_navigationagent3d.rst index 2487aa999ae..53d74f81579 100644 --- a/classes/class_navigationagent3d.rst +++ b/classes/class_navigationagent3d.rst @@ -12,16 +12,18 @@ NavigationAgent3D **Inherits:** :ref:`Node` **<** :ref:`Object` -3D Agent used in navigation for collision avoidance. +A 3D agent used to pathfind to a position while avoiding obstacles. .. rst-class:: classref-introduction-group Description ----------- -3D Agent that is used in navigation to reach a position while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. **NavigationAgent3D** is physics safe. +A 3D agent used to pathfind to a position while avoiding static and dynamic obstacles. The calculation can be used by the parent node to dynamically move it along the path. Requires navigation data to work correctly. -\ **Note:** After setting :ref:`target_position` it is required to use the :ref:`get_next_path_position` function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node. +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. .. rst-class:: classref-introduction-group @@ -38,43 +40,59 @@ Properties .. table:: :widths: auto - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`agent_height_offset` | ``0.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`avoidance_enabled` | ``false`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`debug_enabled` | ``false`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Color` | :ref:`debug_path_custom_color` | ``Color(1, 1, 1, 1)`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`debug_path_custom_point_size` | ``4.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`debug_use_custom` | ``false`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`ignore_y` | ``true`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`int` | :ref:`max_neighbors` | ``10`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`max_speed` | ``10.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`int` | :ref:`navigation_layers` | ``1`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`neighbor_distance` | ``50.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`path_desired_distance` | ``1.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`path_max_distance` | ``5.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`PathMetadataFlags` | :ref:`path_metadata_flags` | ``7`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`radius` | ``0.5`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`target_desired_distance` | ``1.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Vector3` | :ref:`target_position` | ``Vector3(0, 0, 0)`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`time_horizon` | ``1.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`avoidance_enabled` | ``false`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`avoidance_layers` | ``1`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`avoidance_mask` | ``1`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`avoidance_priority` | ``1.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`debug_enabled` | ``false`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`debug_path_custom_color` | ``Color(1, 1, 1, 1)`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`debug_path_custom_point_size` | ``4.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`debug_use_custom` | ``false`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`height` | ``1.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`max_neighbors` | ``10`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`max_speed` | ``10.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`navigation_layers` | ``1`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`neighbor_distance` | ``50.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`path_desired_distance` | ``1.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`path_height_offset` | ``0.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`path_max_distance` | ``5.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`PathMetadataFlags` | :ref:`path_metadata_flags` | ``7`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`PathPostProcessing` | :ref:`path_postprocessing` | ``0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`PathfindingAlgorithm` | :ref:`pathfinding_algorithm` | ``0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`radius` | ``0.5`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`target_desired_distance` | ``1.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector3` | :ref:`target_position` | ``Vector3(0, 0, 0)`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`time_horizon_agents` | ``1.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`time_horizon_obstacles` | ``0.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`use_3d_avoidance` | ``false`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector3` | :ref:`velocity` | ``Vector3(0, 0, 0)`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ .. rst-class:: classref-reftable-group @@ -87,6 +105,10 @@ Methods +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`distance_to_target` **(** **)** |const| | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_avoidance_layer_value` **(** :ref:`int` layer_number **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_avoidance_mask_value` **(** :ref:`int` mask_number **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector3Array` | :ref:`get_current_navigation_path` **(** **)** |const| | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_current_navigation_path_index` **(** **)** |const| | @@ -109,11 +131,15 @@ Methods +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_target_reached` **(** **)** |const| | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_avoidance_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_avoidance_mask_value` **(** :ref:`int` mask_number, :ref:`bool` value **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_velocity` **(** :ref:`Vector3` velocity **)** | + | void | :ref:`set_velocity_forced` **(** :ref:`Vector3` velocity **)** | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -193,7 +219,7 @@ Notifies when the player-defined :ref:`target_position` safe_velocity **)** -Notifies when the collision avoidance velocity is calculated. Emitted by :ref:`set_velocity`. Only emitted when :ref:`avoidance_enabled` is true. +Notifies when the collision avoidance velocity is calculated. Emitted when :ref:`velocity` is set. Only emitted when :ref:`avoidance_enabled` is true. .. rst-class:: classref-item-separator @@ -226,35 +252,69 @@ The details dictionary may contain the following keys depending on the value of Property Descriptions --------------------- -.. _class_NavigationAgent3D_property_agent_height_offset: +.. _class_NavigationAgent3D_property_avoidance_enabled: .. rst-class:: classref-property -:ref:`float` **agent_height_offset** = ``0.0`` +:ref:`bool` **avoidance_enabled** = ``false`` .. rst-class:: classref-property-setget -- void **set_agent_height_offset** **(** :ref:`float` value **)** -- :ref:`float` **get_agent_height_offset** **(** **)** +- void **set_avoidance_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **get_avoidance_enabled** **(** **)** -The NavigationAgent height offset is subtracted from the y-axis value of any vector path position for this NavigationAgent. The NavigationAgent height offset does not change or influence the navigation mesh or pathfinding query result. Additional navigation maps that use regions with navigation meshes that the developer baked with appropriate agent radius or height values are required to support different-sized agents. +If ``true`` the agent is registered for an RVO avoidance callback on the :ref:`NavigationServer3D`. When :ref:`velocity` is set and the processing is completed a ``safe_velocity`` Vector3 is received with a signal connection to :ref:`velocity_computed`. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it. .. rst-class:: classref-item-separator ---- -.. _class_NavigationAgent3D_property_avoidance_enabled: +.. _class_NavigationAgent3D_property_avoidance_layers: .. rst-class:: classref-property -:ref:`bool` **avoidance_enabled** = ``false`` +:ref:`int` **avoidance_layers** = ``1`` .. rst-class:: classref-property-setget -- void **set_avoidance_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **get_avoidance_enabled** **(** **)** +- void **set_avoidance_layers** **(** :ref:`int` value **)** +- :ref:`int` **get_avoidance_layers** **(** **)** + +A bitfield determining the avoidance layers for this NavigationAgent. Other agent's with a matching bit on the :ref:`avoidance_mask` will avoid this agent. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent3D_property_avoidance_mask: + +.. rst-class:: classref-property + +:ref:`int` **avoidance_mask** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_avoidance_mask** **(** :ref:`int` value **)** +- :ref:`int` **get_avoidance_mask** **(** **)** + +A bitfield determining what other avoidance agents and obstacles this NavigationAgent will avoid when a bit matches at least one of their :ref:`avoidance_layers`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent3D_property_avoidance_priority: + +.. rst-class:: classref-property + +:ref:`float` **avoidance_priority** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_avoidance_priority** **(** :ref:`float` value **)** +- :ref:`float` **get_avoidance_priority** **(** **)** -If ``true`` the agent is registered for an RVO avoidance callback on the :ref:`NavigationServer3D`. When :ref:`set_velocity` is used and the processing is completed a ``safe_velocity`` Vector3 is received with a signal connection to :ref:`velocity_computed`. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it. +The agent does not adjust the velocity for other agents that would match the :ref:`avoidance_mask` but have a lower :ref:`avoidance_priority`. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent. .. rst-class:: classref-item-separator @@ -328,18 +388,18 @@ If ``true`` uses the defined :ref:`debug_path_custom_color` **ignore_y** = ``true`` +:ref:`float` **height** = ``1.0`` .. rst-class:: classref-property-setget -- void **set_ignore_y** **(** :ref:`bool` value **)** -- :ref:`bool` **get_ignore_y** **(** **)** +- void **set_height** **(** :ref:`float` value **)** +- :ref:`float` **get_height** **(** **)** -Ignores collisions on the Y axis. Must be true to move on a horizontal plane. +The height of the avoidance agent. Agents will ignore other agents or obstacles that are above or below their current position + height in 2D avoidance. Does nothing in 3D avoidance which uses radius spheres alone. .. rst-class:: classref-item-separator @@ -390,7 +450,7 @@ The maximum speed that an agent can move. - void **set_navigation_layers** **(** :ref:`int` value **)** - :ref:`int` **get_navigation_layers** **(** **)** -A bitfield determining what navigation layers of navigation regions this NavigationAgent will use to calculate path. Changing it runtime will clear current navigation path and generate new one, according to new navigation layers. +A bitfield determining which navigation layers of navigation regions this agent will use to calculate a path. Changing it during runtime will clear the current navigation path and generate a new one, according to the new navigation layers. .. rst-class:: classref-item-separator @@ -424,7 +484,24 @@ The distance to search for other agents. - void **set_path_desired_distance** **(** :ref:`float` value **)** - :ref:`float` **get_path_desired_distance** **(** **)** -The distance threshold before a path point is considered to be reached. This will allow an agent to not have to hit a path point on the path exactly, but in the area. If this value is set to high the NavigationAgent will skip points on the path which can lead to leaving the navigation mesh. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the next point on each physics frame update. +The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead to leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the next point on each physics frame update. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent3D_property_path_height_offset: + +.. rst-class:: classref-property + +:ref:`float` **path_height_offset** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_path_height_offset** **(** :ref:`float` value **)** +- :ref:`float` **get_path_height_offset** **(** **)** + +The height offset is subtracted from the y-axis value of any vector path position for this NavigationAgent. The NavigationAgent height offset does not change or influence the navigation mesh or pathfinding query result. Additional navigation maps that use regions with navigation meshes that the developer baked with appropriate agent radius or height values are required to support different-sized agents. .. rst-class:: classref-item-separator @@ -464,6 +541,40 @@ Additional information to return with the navigation path. ---- +.. _class_NavigationAgent3D_property_path_postprocessing: + +.. rst-class:: classref-property + +:ref:`PathPostProcessing` **path_postprocessing** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_path_postprocessing** **(** :ref:`PathPostProcessing` value **)** +- :ref:`PathPostProcessing` **get_path_postprocessing** **(** **)** + +The path postprocessing applied to the raw path corridor found by the :ref:`pathfinding_algorithm`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent3D_property_pathfinding_algorithm: + +.. rst-class:: classref-property + +:ref:`PathfindingAlgorithm` **pathfinding_algorithm** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_pathfinding_algorithm** **(** :ref:`PathfindingAlgorithm` value **)** +- :ref:`PathfindingAlgorithm` **get_pathfinding_algorithm** **(** **)** + +The pathfinding algorithm used in the path query. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationAgent3D_property_radius: .. rst-class:: classref-property @@ -494,7 +605,7 @@ Does not affect normal pathfinding. To change an actor's pathfinding radius bake - void **set_target_desired_distance** **(** :ref:`float` value **)** - :ref:`float` **get_target_desired_distance** **(** **)** -The distance threshold before the final target point is considered to be reached. This will allow an agent to not have to hit the point of the final target exactly, but only the area. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the final target point on each physics frame update. +The distance threshold before the final target point is considered to be reached. This allows agents to not have to hit the point of the final target exactly, but only to reach its general. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the final target point on each physics frame update. .. rst-class:: classref-item-separator @@ -511,24 +622,77 @@ The distance threshold before the final target point is considered to be reached - void **set_target_position** **(** :ref:`Vector3` value **)** - :ref:`Vector3` **get_target_position** **(** **)** -The user-defined target position. Setting this property will clear the current navigation path. +If set a new navigation path from the current agent position to the :ref:`target_position` is requested from the NavigationServer. .. rst-class:: classref-item-separator ---- -.. _class_NavigationAgent3D_property_time_horizon: +.. _class_NavigationAgent3D_property_time_horizon_agents: .. rst-class:: classref-property -:ref:`float` **time_horizon** = ``1.0`` +:ref:`float` **time_horizon_agents** = ``1.0`` .. rst-class:: classref-property-setget -- void **set_time_horizon** **(** :ref:`float` value **)** -- :ref:`float` **get_time_horizon** **(** **)** +- void **set_time_horizon_agents** **(** :ref:`float` value **)** +- :ref:`float` **get_time_horizon_agents** **(** **)** -The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive. +The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent3D_property_time_horizon_obstacles: + +.. rst-class:: classref-property + +:ref:`float` **time_horizon_obstacles** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_time_horizon_obstacles** **(** :ref:`float` value **)** +- :ref:`float` **get_time_horizon_obstacles** **(** **)** + +The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to static avoidance obstacles. The larger the number, the sooner the agent will respond to static avoidance obstacles, but less freedom in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent3D_property_use_3d_avoidance: + +.. rst-class:: classref-property + +:ref:`bool` **use_3d_avoidance** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_3d_avoidance** **(** :ref:`bool` value **)** +- :ref:`bool` **get_use_3d_avoidance** **(** **)** + +If ``true``, the agent calculates avoidance velocities in 3D omnidirectionally, e.g. for games that take place in air, underwater or space. Agents using 3D avoidance only avoid other agents using 3D avoidance, and react to radius-based avoidance obstacles. They ignore any vertex-based obstacles. + +If ``false``, the agent calculates avoidance velocities in 2D along the x and z-axes, ignoring the y-axis. Agents using 2D avoidance only avoid other agents using 2D avoidance, and react to radius-based avoidance obstacles or vertex-based avoidance obstacles. Other agents using 2D avoidance that are below or above their current position including :ref:`height` are ignored. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent3D_property_velocity: + +.. rst-class:: classref-property + +:ref:`Vector3` **velocity** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_velocity** **(** :ref:`Vector3` value **)** +- :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. .. rst-class:: classref-section-separator @@ -551,6 +715,30 @@ Returns the distance to the target position, using the agent's global position. ---- +.. _class_NavigationAgent3D_method_get_avoidance_layer_value: + +.. rst-class:: classref-method + +:ref:`bool` **get_avoidance_layer_value** **(** :ref:`int` layer_number **)** |const| + +Returns whether or not the specified layer of the :ref:`avoidance_layers` bitmask is enabled, given a ``layer_number`` between 1 and 32. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent3D_method_get_avoidance_mask_value: + +.. rst-class:: classref-method + +:ref:`bool` **get_avoidance_mask_value** **(** :ref:`int` mask_number **)** |const| + +Returns whether or not the specified mask of the :ref:`avoidance_mask` bitmask is enabled, given a ``mask_number`` between 1 and 32. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationAgent3D_method_get_current_navigation_path: .. rst-class:: classref-method @@ -593,7 +781,7 @@ Returns the path query result for the path the agent is currently following. :ref:`Vector3` **get_final_position** **(** **)** -Returns the reachable final position in global coordinates. This can change if the navigation path is altered in any way. Because of this, it would be best to check this each frame. +Returns the reachable final position of the current navigation path in global coordinates. This position can change if the navigation path is altered in any way. Because of this, it would be best to check this each frame. .. rst-class:: classref-item-separator @@ -665,7 +853,7 @@ Returns true if the navigation path's final position has been reached. :ref:`bool` **is_target_reachable** **(** **)** -Returns true if :ref:`target_position` is reachable. +Returns true if :ref:`target_position` is reachable. The target position is set using :ref:`target_position`. .. rst-class:: classref-item-separator @@ -683,6 +871,30 @@ Returns true if :ref:`target_position` layer_number, :ref:`bool` value **)** + +Based on ``value``, enables or disables the specified layer in the :ref:`avoidance_layers` bitmask, given a ``layer_number`` between 1 and 32. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent3D_method_set_avoidance_mask_value: + +.. rst-class:: classref-method + +void **set_avoidance_mask_value** **(** :ref:`int` mask_number, :ref:`bool` value **)** + +Based on ``value``, enables or disables the specified mask in the :ref:`avoidance_mask` bitmask, given a ``mask_number`` between 1 and 32. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationAgent3D_method_set_navigation_layer_value: .. rst-class:: classref-method @@ -707,13 +919,13 @@ Sets the :ref:`RID` of the navigation map this NavigationAgent node s ---- -.. _class_NavigationAgent3D_method_set_velocity: +.. _class_NavigationAgent3D_method_set_velocity_forced: .. rst-class:: classref-method -void **set_velocity** **(** :ref:`Vector3` velocity **)** +void **set_velocity_forced** **(** :ref:`Vector3` velocity **)** -Sends the passed in velocity to the collision avoidance algorithm. It will adjust the velocity to avoid collisions. Once the adjustment to the velocity is complete, it will emit the :ref:`velocity_computed` signal. +Replaces the internal velocity in the collision avoidance simulation with ``velocity``. When an agent is teleported to a new position this function should be used in the same frame. If called frequently this function can get agents stuck. .. |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_navigationlink2d.rst b/classes/class_navigationlink2d.rst index 2383220d449..229399a65aa 100644 --- a/classes/class_navigationlink2d.rst +++ b/classes/class_navigationlink2d.rst @@ -12,14 +12,14 @@ NavigationLink2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Creates a link between two positions that :ref:`NavigationServer2D` can route agents through. +A link between two positions on :ref:`NavigationRegion2D`\ s that agents can be routed through. .. rst-class:: classref-introduction-group Description ----------- -Creates a link between two positions that :ref:`NavigationServer2D` can route agents through. Links can be used to express navigation methods that aren't just traveling along the surface of the navigation mesh, like zip-lines, teleporters, or jumping across gaps. +A link between two positions on :ref:`NavigationRegion2D`\ s that agents can be routed through. These positions can be on the same :ref:`NavigationRegion2D` or on two different ones. Links are useful to express navigation methods other than traveling along the surface of the navigation polygon, such as ziplines, teleporters, or gaps that can be jumped across. .. rst-class:: classref-introduction-group @@ -149,7 +149,7 @@ The distance the link will search is controlled by :ref:`NavigationServer2D.map_ - void **set_enter_cost** **(** :ref:`float` value **)** - :ref:`float` **get_enter_cost** **(** **)** -When pathfinding enters this link from another regions navigation mesh the ``enter_cost`` value is added to the path distance for determining the shortest path. +When pathfinding enters this link from another regions navigation mesh the :ref:`enter_cost` value is added to the path distance for determining the shortest path. .. rst-class:: classref-item-separator @@ -204,7 +204,7 @@ The distance the link will search is controlled by :ref:`NavigationServer2D.map_ - void **set_travel_cost** **(** :ref:`float` value **)** - :ref:`float` **get_travel_cost** **(** **)** -When pathfinding moves along the link the traveled distance is multiplied with ``travel_cost`` for determining the shortest path. +When pathfinding moves along the link the traveled distance is multiplied with :ref:`travel_cost` for determining the shortest path. .. rst-class:: classref-section-separator diff --git a/classes/class_navigationlink3d.rst b/classes/class_navigationlink3d.rst index 2cdb258ff7a..73a74804652 100644 --- a/classes/class_navigationlink3d.rst +++ b/classes/class_navigationlink3d.rst @@ -12,14 +12,14 @@ NavigationLink3D **Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -Creates a link between two positions that :ref:`NavigationServer3D` can route agents through. +A link between two positions on :ref:`NavigationRegion3D`\ s that agents can be routed through. .. rst-class:: classref-introduction-group Description ----------- -Creates a link between two positions that :ref:`NavigationServer3D` can route agents through. Links can be used to express navigation methods that aren't just traveling along the surface of the navigation mesh, like zip-lines, teleporters, or jumping across gaps. +A link between two positions on :ref:`NavigationRegion3D`\ s that agents can be routed through. These positions can be on the same :ref:`NavigationRegion3D` or on two different ones. Links are useful to express navigation methods other than traveling along the surface of the navigation mesh, such as ziplines, teleporters, or gaps that can be jumped across. .. rst-class:: classref-introduction-group @@ -149,7 +149,7 @@ The distance the link will search is controlled by :ref:`NavigationServer3D.map_ - void **set_enter_cost** **(** :ref:`float` value **)** - :ref:`float` **get_enter_cost** **(** **)** -When pathfinding enters this link from another regions navigation mesh the ``enter_cost`` value is added to the path distance for determining the shortest path. +When pathfinding enters this link from another regions navigation mesh the :ref:`enter_cost` value is added to the path distance for determining the shortest path. .. rst-class:: classref-item-separator @@ -204,7 +204,7 @@ The distance the link will search is controlled by :ref:`NavigationServer3D.map_ - void **set_travel_cost** **(** :ref:`float` value **)** - :ref:`float` **get_travel_cost** **(** **)** -When pathfinding moves along the link the traveled distance is multiplied with ``travel_cost`` for determining the shortest path. +When pathfinding moves along the link the traveled distance is multiplied with :ref:`travel_cost` for determining the shortest path. .. rst-class:: classref-section-separator diff --git a/classes/class_navigationmesh.rst b/classes/class_navigationmesh.rst index ad344ef28c6..9d9b6ead509 100644 --- a/classes/class_navigationmesh.rst +++ b/classes/class_navigationmesh.rst @@ -12,7 +12,7 @@ NavigationMesh **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A mesh to approximate the walkable areas and obstacles. +A navigation mesh that defines traversable areas and obstacles. .. rst-class:: classref-introduction-group diff --git a/classes/class_navigationobstacle2d.rst b/classes/class_navigationobstacle2d.rst index bd2975e3e99..e20634ddda6 100644 --- a/classes/class_navigationobstacle2d.rst +++ b/classes/class_navigationobstacle2d.rst @@ -10,18 +10,22 @@ NavigationObstacle2D ==================== -**Inherits:** :ref:`Node` **<** :ref:`Object` +**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -2D Obstacle used in navigation for collision avoidance. +2D Obstacle used in navigation to constrain avoidance controlled agents outside or inside an area. .. rst-class:: classref-introduction-group Description ----------- -2D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. **NavigationObstacle2D** is physics safe. +2D Obstacle used in navigation to constrain avoidance controlled agents outside or inside an area. The obstacle needs a navigation map and outline vertices defined to work correctly. -Obstacles **don't** change the resulting path from the pathfinding, they only affect the navigation agent movement in a radius. Therefore, using obstacles for the static walls in your level won't work because those walls don't exist in the pathfinding. The navigation agent will be pushed in a semi-random direction away while moving inside that radius. Obstacles are intended as a last resort option for constantly moving objects that cannot be (re)baked to a navigation mesh efficiently. +If the obstacle's vertices are winded in clockwise order, avoidance agents will be pushed in by the obstacle, otherwise, avoidance agents will be pushed out. Outlines must not cross or overlap. + +Obstacles are **not** a replacement for a (re)baked navigation mesh. Obstacles **don't** change the resulting path from the pathfinding, obstacles only affect the navigation avoidance agent movement by altering the suggested velocity of the avoidance agent. + +Obstacles using vertices can warp to a new position but should not moved every frame as each move requires a rebuild of the avoidance map. .. rst-class:: classref-introduction-group @@ -38,11 +42,15 @@ Properties .. table:: :widths: auto - +---------------------------+-----------------------------------------------------------------------------+----------+ - | :ref:`bool` | :ref:`estimate_radius` | ``true`` | - +---------------------------+-----------------------------------------------------------------------------+----------+ - | :ref:`float` | :ref:`radius` | ``1.0`` | - +---------------------------+-----------------------------------------------------------------------------+----------+ + +-----------------------------------------------------+-------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`avoidance_layers` | ``1`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------+--------------------------+ + | :ref:`float` | :ref:`radius` | ``0.0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------+--------------------------+ + | :ref:`Vector2` | :ref:`velocity` | ``Vector2(0, 0)`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedVector2Array` | :ref:`vertices` | ``PackedVector2Array()`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------+--------------------------+ .. rst-class:: classref-reftable-group @@ -52,13 +60,19 @@ Methods .. table:: :widths: auto - +-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_navigation_map` **(** **)** |const| | - +-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | - +-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | - +-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_agent_rid` **(** **)** |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_avoidance_layer_value` **(** :ref:`int` layer_number **)** |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_navigation_map` **(** **)** |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_obstacle_rid` **(** **)** |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_avoidance_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -69,18 +83,18 @@ Methods Property Descriptions --------------------- -.. _class_NavigationObstacle2D_property_estimate_radius: +.. _class_NavigationObstacle2D_property_avoidance_layers: .. rst-class:: classref-property -:ref:`bool` **estimate_radius** = ``true`` +:ref:`int` **avoidance_layers** = ``1`` .. rst-class:: classref-property-setget -- void **set_estimate_radius** **(** :ref:`bool` value **)** -- :ref:`bool` **is_radius_estimated** **(** **)** +- void **set_avoidance_layers** **(** :ref:`int` value **)** +- :ref:`int` **get_avoidance_layers** **(** **)** -Enables radius estimation algorithm which uses parent's collision shapes to determine the obstacle radius. +A bitfield determining the avoidance layers for this obstacle. Agent's with a matching bit on the their avoidance mask will avoid this obstacle. .. rst-class:: classref-item-separator @@ -90,14 +104,48 @@ Enables radius estimation algorithm which uses parent's collision shapes to dete .. rst-class:: classref-property -:ref:`float` **radius** = ``1.0`` +:ref:`float` **radius** = ``0.0`` .. rst-class:: classref-property-setget - void **set_radius** **(** :ref:`float` value **)** - :ref:`float` **get_radius** **(** **)** -The radius of the agent. Used only if :ref:`estimate_radius` is set to false. +Sets the avoidance radius for the obstacle. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationObstacle2D_property_velocity: + +.. rst-class:: classref-property + +:ref:`Vector2` **velocity** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_velocity** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_velocity** **(** **)** + +Sets the wanted velocity for the obstacle so other agent's can better predict the obstacle if it is moved with a velocity regularly (every frame) instead of warped to a new position. Does only affect avoidance for the obstacles :ref:`radius`. Does nothing for the obstacles static vertices. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationObstacle2D_property_vertices: + +.. rst-class:: classref-property + +:ref:`PackedVector2Array` **vertices** = ``PackedVector2Array()`` + +.. rst-class:: classref-property-setget + +- void **set_vertices** **(** :ref:`PackedVector2Array` value **)** +- :ref:`PackedVector2Array` **get_vertices** **(** **)** + +The outline vertices of the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out. Outlines can not be crossed or overlap. Should the vertices using obstacle be warped to a new position agent's can not predict this movement and may get trapped inside the obstacle. .. rst-class:: classref-section-separator @@ -108,25 +156,61 @@ The radius of the agent. Used only if :ref:`estimate_radius` **get_agent_rid** **(** **)** |const| + +Returns the :ref:`RID` of this agent on the :ref:`NavigationServer2D`. This :ref:`RID` is used for the moving avoidance "obstacle" component (using a fake avoidance agent) which size is defined by :ref:`radius` and velocity set by using :ref:`velocity`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationObstacle2D_method_get_avoidance_layer_value: + +.. rst-class:: classref-method + +:ref:`bool` **get_avoidance_layer_value** **(** :ref:`int` layer_number **)** |const| + +Returns whether or not the specified layer of the :ref:`avoidance_layers` bitmask is enabled, given a ``layer_number`` between 1 and 32. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationObstacle2D_method_get_navigation_map: .. rst-class:: classref-method :ref:`RID` **get_navigation_map** **(** **)** |const| -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 agent on the NavigationServer. If the agent 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 agent 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 + +---- + +.. _class_NavigationObstacle2D_method_get_obstacle_rid: + +.. rst-class:: classref-method + +:ref:`RID` **get_obstacle_rid** **(** **)** |const| + +Returns the :ref:`RID` of this obstacle on the :ref:`NavigationServer2D`. This :ref:`RID` is used for the static avoidance obstacle component which shape is defined by :ref:`vertices`. .. rst-class:: classref-item-separator ---- -.. _class_NavigationObstacle2D_method_get_rid: +.. _class_NavigationObstacle2D_method_set_avoidance_layer_value: .. rst-class:: classref-method -:ref:`RID` **get_rid** **(** **)** |const| +void **set_avoidance_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** -Returns the :ref:`RID` of this obstacle on the :ref:`NavigationServer2D`. +Based on ``value``, enables or disables the specified layer in the :ref:`avoidance_layers` bitmask, given a ``layer_number`` between 1 and 32. .. rst-class:: classref-item-separator @@ -138,7 +222,7 @@ Returns the :ref:`RID` of this obstacle on the :ref:`NavigationServer void **set_navigation_map** **(** :ref:`RID` navigation_map **)** -Sets the :ref:`RID` of the navigation map this NavigationObstacle node should use and also updates the ``agent`` on the NavigationServer. +Sets the :ref:`RID` of the navigation map this NavigationObstacle node should use and also updates the ``obstacle`` on the NavigationServer. .. |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_navigationobstacle3d.rst b/classes/class_navigationobstacle3d.rst index af0a871bd8e..d6e208271bc 100644 --- a/classes/class_navigationobstacle3d.rst +++ b/classes/class_navigationobstacle3d.rst @@ -10,18 +10,22 @@ NavigationObstacle3D ==================== -**Inherits:** :ref:`Node` **<** :ref:`Object` +**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -3D Obstacle used in navigation for collision avoidance. +3D Obstacle used in navigation to constrain avoidance controlled agents outside or inside an area. .. rst-class:: classref-introduction-group Description ----------- -3D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. **NavigationObstacle3D** is physics safe. +3D Obstacle used in navigation to constrain avoidance controlled agents outside or inside an area. The obstacle needs a navigation map and outline vertices defined to work correctly. -Obstacles **don't** change the resulting path from the pathfinding, they only affect the navigation agent movement in a radius. Therefore, using obstacles for the static walls in your level won't work because those walls don't exist in the pathfinding. The navigation agent will be pushed in a semi-random direction away while moving inside that radius. Obstacles are intended as a last resort option for constantly moving objects that cannot be (re)baked to a navigation mesh efficiently. +If the obstacle's vertices are winded in clockwise order, avoidance agents will be pushed in by the obstacle, otherwise, avoidance agents will be pushed out. Outlines must not cross or overlap. + +Obstacles are **not** a replacement for a (re)baked navigation mesh. Obstacles **don't** change the resulting path from the pathfinding, obstacles only affect the navigation avoidance agent movement by altering the suggested velocity of the avoidance agent. + +Obstacles using vertices can warp to a new position but should not moved every frame as each move requires a rebuild of the avoidance map. .. rst-class:: classref-introduction-group @@ -38,11 +42,19 @@ Properties .. table:: :widths: auto - +---------------------------+-----------------------------------------------------------------------------+----------+ - | :ref:`bool` | :ref:`estimate_radius` | ``true`` | - +---------------------------+-----------------------------------------------------------------------------+----------+ - | :ref:`float` | :ref:`radius` | ``1.0`` | - +---------------------------+-----------------------------------------------------------------------------+----------+ + +-----------------------------------------------------+-------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`avoidance_layers` | ``1`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------+--------------------------+ + | :ref:`float` | :ref:`height` | ``1.0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------+--------------------------+ + | :ref:`float` | :ref:`radius` | ``0.0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`use_3d_avoidance` | ``false`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------+--------------------------+ + | :ref:`Vector3` | :ref:`velocity` | ``Vector3(0, 0, 0)`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedVector3Array` | :ref:`vertices` | ``PackedVector3Array()`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------+--------------------------+ .. rst-class:: classref-reftable-group @@ -52,13 +64,19 @@ Methods .. table:: :widths: auto - +-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_navigation_map` **(** **)** |const| | - +-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | - +-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | - +-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_agent_rid` **(** **)** |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_avoidance_layer_value` **(** :ref:`int` layer_number **)** |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_navigation_map` **(** **)** |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_obstacle_rid` **(** **)** |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_avoidance_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -69,18 +87,35 @@ Methods Property Descriptions --------------------- -.. _class_NavigationObstacle3D_property_estimate_radius: +.. _class_NavigationObstacle3D_property_avoidance_layers: + +.. rst-class:: classref-property + +:ref:`int` **avoidance_layers** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_avoidance_layers** **(** :ref:`int` value **)** +- :ref:`int` **get_avoidance_layers** **(** **)** + +A bitfield determining the avoidance layers for this obstacle. Agent's with a matching bit on the their avoidance mask will avoid this obstacle. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationObstacle3D_property_height: .. rst-class:: classref-property -:ref:`bool` **estimate_radius** = ``true`` +:ref:`float` **height** = ``1.0`` .. rst-class:: classref-property-setget -- void **set_estimate_radius** **(** :ref:`bool` value **)** -- :ref:`bool` **is_radius_estimated** **(** **)** +- void **set_height** **(** :ref:`float` value **)** +- :ref:`float` **get_height** **(** **)** -Enables radius estimation algorithm which uses parent's collision shapes to determine the obstacle radius. +Sets the obstacle height used in 2D avoidance. 2D avoidance using agent's ignore obstacles that are below or above them. .. rst-class:: classref-item-separator @@ -90,14 +125,67 @@ Enables radius estimation algorithm which uses parent's collision shapes to dete .. rst-class:: classref-property -:ref:`float` **radius** = ``1.0`` +:ref:`float` **radius** = ``0.0`` .. rst-class:: classref-property-setget - void **set_radius** **(** :ref:`float` value **)** - :ref:`float` **get_radius** **(** **)** -The radius of the agent. Used only if :ref:`estimate_radius` is set to false. +Sets the avoidance radius for the obstacle. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationObstacle3D_property_use_3d_avoidance: + +.. rst-class:: classref-property + +:ref:`bool` **use_3d_avoidance** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_3d_avoidance** **(** :ref:`bool` value **)** +- :ref:`bool` **get_use_3d_avoidance** **(** **)** + +If ``true`` the obstacle affects 3D avoidance using agent's with obstacle :ref:`radius`. + +If ``false`` the obstacle affects 2D avoidance using agent's with both obstacle :ref:`vertices` as well as obstacle :ref:`radius`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationObstacle3D_property_velocity: + +.. rst-class:: classref-property + +:ref:`Vector3` **velocity** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_velocity** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_velocity** **(** **)** + +Sets the wanted velocity for the obstacle so other agent's can better predict the obstacle if it is moved with a velocity regularly (every frame) instead of warped to a new position. Does only affect avoidance for the obstacles :ref:`radius`. Does nothing for the obstacles static vertices. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationObstacle3D_property_vertices: + +.. rst-class:: classref-property + +:ref:`PackedVector3Array` **vertices** = ``PackedVector3Array()`` + +.. rst-class:: classref-property-setget + +- void **set_vertices** **(** :ref:`PackedVector3Array` value **)** +- :ref:`PackedVector3Array` **get_vertices** **(** **)** + +The outline vertices of the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out. Outlines can not be crossed or overlap. Should the vertices using obstacle be warped to a new position agent's can not predict this movement and may get trapped inside the obstacle. .. rst-class:: classref-section-separator @@ -108,25 +196,61 @@ The radius of the agent. Used only if :ref:`estimate_radius` **get_agent_rid** **(** **)** |const| + +Returns the :ref:`RID` of this agent on the :ref:`NavigationServer3D`. This :ref:`RID` is used for the moving avoidance "obstacle" component (using a fake avoidance agent) which size is defined by :ref:`radius` and velocity set by using :ref:`velocity`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationObstacle3D_method_get_avoidance_layer_value: + +.. rst-class:: classref-method + +:ref:`bool` **get_avoidance_layer_value** **(** :ref:`int` layer_number **)** |const| + +Returns whether or not the specified layer of the :ref:`avoidance_layers` bitmask is enabled, given a ``layer_number`` between 1 and 32. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationObstacle3D_method_get_navigation_map: .. rst-class:: classref-method :ref:`RID` **get_navigation_map** **(** **)** |const| -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 agent on the NavigationServer. If the agent 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 agent 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 + +---- + +.. _class_NavigationObstacle3D_method_get_obstacle_rid: + +.. rst-class:: classref-method + +:ref:`RID` **get_obstacle_rid** **(** **)** |const| + +Returns the :ref:`RID` of this obstacle on the :ref:`NavigationServer3D`. This :ref:`RID` is used for the static avoidance obstacle component which shape is defined by :ref:`vertices`. .. rst-class:: classref-item-separator ---- -.. _class_NavigationObstacle3D_method_get_rid: +.. _class_NavigationObstacle3D_method_set_avoidance_layer_value: .. rst-class:: classref-method -:ref:`RID` **get_rid** **(** **)** |const| +void **set_avoidance_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** -Returns the :ref:`RID` of this obstacle on the :ref:`NavigationServer3D`. +Based on ``value``, enables or disables the specified layer in the :ref:`avoidance_layers` bitmask, given a ``layer_number`` between 1 and 32. .. rst-class:: classref-item-separator @@ -138,7 +262,7 @@ Returns the :ref:`RID` of this obstacle on the :ref:`NavigationServer void **set_navigation_map** **(** :ref:`RID` navigation_map **)** -Sets the :ref:`RID` of the navigation map this NavigationObstacle node should use and also updates the ``agent`` on the NavigationServer. +Sets the :ref:`RID` of the navigation map this NavigationObstacle node should use and also updates the ``obstacle`` on the NavigationServer. .. |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_navigationpathqueryparameters2d.rst b/classes/class_navigationpathqueryparameters2d.rst index 7b9afc06da4..30b73f6c414 100644 --- a/classes/class_navigationpathqueryparameters2d.rst +++ b/classes/class_navigationpathqueryparameters2d.rst @@ -12,14 +12,14 @@ NavigationPathQueryParameters2D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Parameters to be sent to a 2D navigation path query. +Provides parameters for 2D navigation path queries. .. rst-class:: classref-introduction-group Description ----------- -This class contains the start and target position and other parameters to be used with :ref:`NavigationServer2D.query_path`. +By changing various properties of this object, such as the start and target position, you can configure path queries to the :ref:`NavigationServer2D`. .. rst-class:: classref-introduction-group diff --git a/classes/class_navigationpathqueryparameters3d.rst b/classes/class_navigationpathqueryparameters3d.rst index 9e82b79e093..50ddf2c85fb 100644 --- a/classes/class_navigationpathqueryparameters3d.rst +++ b/classes/class_navigationpathqueryparameters3d.rst @@ -12,14 +12,14 @@ NavigationPathQueryParameters3D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Parameters to be sent to a 3D navigation path query. +Provides parameters for 3D navigation path queries. .. rst-class:: classref-introduction-group Description ----------- -This class contains the start and target position and other parameters to be used with :ref:`NavigationServer3D.query_path`. +By changing various properties of this object, such as the start and target position, you can configure path queries to the :ref:`NavigationServer3D`. .. rst-class:: classref-introduction-group diff --git a/classes/class_navigationpathqueryresult2d.rst b/classes/class_navigationpathqueryresult2d.rst index e43afa25a40..f9f1e14da97 100644 --- a/classes/class_navigationpathqueryresult2d.rst +++ b/classes/class_navigationpathqueryresult2d.rst @@ -12,14 +12,14 @@ NavigationPathQueryResult2D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Result from a :ref:`NavigationPathQueryParameters2D` navigation path query. +Represents the result of a 2D pathfinding query. .. rst-class:: classref-introduction-group Description ----------- -This class contains the result of a navigation path query from :ref:`NavigationServer2D.query_path`. +This class stores the result of a 2D navigation path query from the :ref:`NavigationServer2D`. .. rst-class:: classref-introduction-group diff --git a/classes/class_navigationpathqueryresult3d.rst b/classes/class_navigationpathqueryresult3d.rst index a1c7fe2484b..be5da0aee5a 100644 --- a/classes/class_navigationpathqueryresult3d.rst +++ b/classes/class_navigationpathqueryresult3d.rst @@ -12,14 +12,14 @@ NavigationPathQueryResult3D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Result from a :ref:`NavigationPathQueryParameters3D` navigation path query. +Represents the result of a 3D pathfinding query. .. rst-class:: classref-introduction-group Description ----------- -This class contains the result of a navigation path query from :ref:`NavigationServer3D.query_path`. +This class stores the result of a 3D navigation path query from the :ref:`NavigationServer3D`. .. rst-class:: classref-introduction-group diff --git a/classes/class_navigationpolygon.rst b/classes/class_navigationpolygon.rst index 2303b61510a..79d5e909765 100644 --- a/classes/class_navigationpolygon.rst +++ b/classes/class_navigationpolygon.rst @@ -12,7 +12,7 @@ NavigationPolygon **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A node that has methods to draw outlines or use indices of vertices to create navigation polygons. +A navigation polygon that defines traversable areas and obstacles. .. rst-class:: classref-introduction-group diff --git a/classes/class_navigationregion2d.rst b/classes/class_navigationregion2d.rst index 111926f1036..2a156c76fda 100644 --- a/classes/class_navigationregion2d.rst +++ b/classes/class_navigationregion2d.rst @@ -12,20 +12,20 @@ NavigationRegion2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -A region of the 2D navigation map. +A traversable 2D region that :ref:`NavigationAgent2D`\ s can use for pathfinding. .. rst-class:: classref-introduction-group Description ----------- -A region of the navigation map. It tells the :ref:`NavigationServer2D` what can be navigated and what cannot, based on its :ref:`NavigationPolygon` resource. +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`. \ **Note:** Overlapping two regions' navigation polygons is not enough for connecting two regions. They must share a similar edge. -The pathfinding cost of entering this region from another region can be controlled with the :ref:`enter_cost` value. +The pathfinding cost of entering a region from another region can be controlled with the :ref:`enter_cost` value. \ **Note:** This value is not added to the path cost when the start position is already inside this region. @@ -48,17 +48,23 @@ Properties .. table:: :widths: auto - +---------------------------------------------------+---------------------------------------------------------------------------------+----------+ - | :ref:`bool` | :ref:`enabled` | ``true`` | - +---------------------------------------------------+---------------------------------------------------------------------------------+----------+ - | :ref:`float` | :ref:`enter_cost` | ``0.0`` | - +---------------------------------------------------+---------------------------------------------------------------------------------+----------+ - | :ref:`int` | :ref:`navigation_layers` | ``1`` | - +---------------------------------------------------+---------------------------------------------------------------------------------+----------+ - | :ref:`NavigationPolygon` | :ref:`navigation_polygon` | | - +---------------------------------------------------+---------------------------------------------------------------------------------+----------+ - | :ref:`float` | :ref:`travel_cost` | ``1.0`` | - +---------------------------------------------------+---------------------------------------------------------------------------------+----------+ + +---------------------------------------------------+-------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`avoidance_layers` | ``1`` | + +---------------------------------------------------+-------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`constrain_avoidance` | ``false`` | + +---------------------------------------------------+-------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`enabled` | ``true`` | + +---------------------------------------------------+-------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`enter_cost` | ``0.0`` | + +---------------------------------------------------+-------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`navigation_layers` | ``1`` | + +---------------------------------------------------+-------------------------------------------------------------------------------------+-----------+ + | :ref:`NavigationPolygon` | :ref:`navigation_polygon` | | + +---------------------------------------------------+-------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`travel_cost` | ``1.0`` | + +---------------------------------------------------+-------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`use_edge_connections` | ``true`` | + +---------------------------------------------------+-------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -68,11 +74,15 @@ Methods .. table:: :widths: auto + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_avoidance_layer_value` **(** :ref:`int` layer_number **)** |const| | +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_region_rid` **(** **)** |const| | +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_avoidance_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -85,6 +95,42 @@ Methods Property Descriptions --------------------- +.. _class_NavigationRegion2D_property_avoidance_layers: + +.. rst-class:: classref-property + +:ref:`int` **avoidance_layers** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_avoidance_layers** **(** :ref:`int` value **)** +- :ref:`int` **get_avoidance_layers** **(** **)** + +A bitfield determining all avoidance layers for the avoidance constrain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationRegion2D_property_constrain_avoidance: + +.. rst-class:: classref-property + +:ref:`bool` **constrain_avoidance** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_constrain_avoidance** **(** :ref:`bool` value **)** +- :ref:`bool` **get_constrain_avoidance** **(** **)** + +If ``true`` constraints avoidance agent's with an avoidance mask bit that matches with a bit of the :ref:`avoidance_layers` to the navigation polygon. Due to each navigation polygon outline creating an obstacle and each polygon edge creating an avoidance line constrain keep the navigation polygon shape as simple as possible for performance. + +\ **Experimental:** This is an experimental feature and should not be used in production as agent's can get stuck on the navigation polygon corners and edges especially at high frame rate. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationRegion2D_property_enabled: .. rst-class:: classref-property @@ -166,6 +212,23 @@ The :ref:`NavigationPolygon` resource to use. When pathfinding moves inside this region's navigation mesh the traveled distances are multiplied with ``travel_cost`` for determining the shortest path. +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationRegion2D_property_use_edge_connections: + +.. rst-class:: classref-property + +:ref:`bool` **use_edge_connections** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_use_edge_connections** **(** :ref:`bool` value **)** +- :ref:`bool` **get_use_edge_connections** **(** **)** + +If enabled the navigation region will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. + .. rst-class:: classref-section-separator ---- @@ -175,6 +238,18 @@ When pathfinding moves inside this region's navigation mesh the traveled distanc Method Descriptions ------------------- +.. _class_NavigationRegion2D_method_get_avoidance_layer_value: + +.. rst-class:: classref-method + +:ref:`bool` **get_avoidance_layer_value** **(** :ref:`int` layer_number **)** |const| + +Returns whether or not the specified layer of the :ref:`avoidance_layers` bitmask is enabled, given a ``layer_number`` between 1 and 32. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationRegion2D_method_get_navigation_layer_value: .. rst-class:: classref-method @@ -199,6 +274,18 @@ Returns the :ref:`RID` of this region on the :ref:`NavigationServer2D ---- +.. _class_NavigationRegion2D_method_set_avoidance_layer_value: + +.. rst-class:: classref-method + +void **set_avoidance_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** + +Based on ``value``, enables or disables the specified layer in the :ref:`avoidance_layers` bitmask, given a ``layer_number`` between 1 and 32. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationRegion2D_method_set_navigation_layer_value: .. rst-class:: classref-method diff --git a/classes/class_navigationregion3d.rst b/classes/class_navigationregion3d.rst index d8a350087ee..f5c5a6f0df6 100644 --- a/classes/class_navigationregion3d.rst +++ b/classes/class_navigationregion3d.rst @@ -12,14 +12,14 @@ NavigationRegion3D **Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -A region of the navigation map. +A traversable 3D region that :ref:`NavigationAgent3D`\ s can use for pathfinding. .. rst-class:: classref-introduction-group Description ----------- -A region of the navigation map. It tells the :ref:`NavigationServer3D` what can be navigated and what cannot, based on its :ref:`NavigationMesh` resource. +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`. @@ -48,17 +48,19 @@ Properties .. table:: :widths: auto - +---------------------------------------------+-------------------------------------------------------------------------------+----------+ - | :ref:`bool` | :ref:`enabled` | ``true`` | - +---------------------------------------------+-------------------------------------------------------------------------------+----------+ - | :ref:`float` | :ref:`enter_cost` | ``0.0`` | - +---------------------------------------------+-------------------------------------------------------------------------------+----------+ - | :ref:`int` | :ref:`navigation_layers` | ``1`` | - +---------------------------------------------+-------------------------------------------------------------------------------+----------+ - | :ref:`NavigationMesh` | :ref:`navigation_mesh` | | - +---------------------------------------------+-------------------------------------------------------------------------------+----------+ - | :ref:`float` | :ref:`travel_cost` | ``1.0`` | - +---------------------------------------------+-------------------------------------------------------------------------------+----------+ + +---------------------------------------------+-------------------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`enabled` | ``true`` | + +---------------------------------------------+-------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`enter_cost` | ``0.0`` | + +---------------------------------------------+-------------------------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`navigation_layers` | ``1`` | + +---------------------------------------------+-------------------------------------------------------------------------------------+----------+ + | :ref:`NavigationMesh` | :ref:`navigation_mesh` | | + +---------------------------------------------+-------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`travel_cost` | ``1.0`` | + +---------------------------------------------+-------------------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`use_edge_connections` | ``true`` | + +---------------------------------------------+-------------------------------------------------------------------------------------+----------+ .. rst-class:: classref-reftable-group @@ -197,6 +199,23 @@ The :ref:`NavigationMesh` resource to use. When pathfinding moves inside this region's navigation mesh the traveled distances are multiplied with ``travel_cost`` for determining the shortest path. +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationRegion3D_property_use_edge_connections: + +.. rst-class:: classref-property + +:ref:`bool` **use_edge_connections** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_use_edge_connections** **(** :ref:`bool` value **)** +- :ref:`bool` **get_use_edge_connections** **(** **)** + +If enabled the navigation region will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_navigationserver2d.rst b/classes/class_navigationserver2d.rst index 2e22c032938..f111b9071d5 100644 --- a/classes/class_navigationserver2d.rst +++ b/classes/class_navigationserver2d.rst @@ -12,26 +12,26 @@ NavigationServer2D **Inherits:** :ref:`Object` -Server interface for low-level 2D navigation access. +A server interface for low-level 2D navigation access. .. rst-class:: classref-introduction-group Description ----------- -NavigationServer2D is the server responsible for all 2D navigation. It handles several objects, namely maps, regions and agents. +NavigationServer2D is the server that handles navigation maps, regions and agents. It does not handle A\* navigation from :ref:`AStar2D` or :ref:`AStarGrid2D`. -Maps are made up of regions, which are made of navigation polygons. Together, they define the navigable areas in the 2D world. +Maps are made up of regions, which are made of navigation polygons. Together, they define the traversable areas in the 2D world. -\ **Note:** Most NavigationServer changes take effect after the next physics frame and not immediately. This includes all changes made to maps, regions or agents by navigation related Nodes in the SceneTree or made through scripts. +\ **Note:** Most **NavigationServer2D** changes take effect after the next physics frame and not immediately. This includes all changes made to maps, regions or agents by navigation-related nodes in the scene tree or made through scripts. 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 allows allowing or forbidding some areas to 2D 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. -\ **Note:** The collision avoidance system ignores regions. Using the modified velocity as-is might lead to pushing and agent outside of a navigable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine. +\ **Note:** The collision avoidance system ignores regions. Using the modified velocity directly may move an agent outside of the traversable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine. This server keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. @@ -55,11 +55,21 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`agent_create` **(** **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`agent_get_avoidance_enabled` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`agent_get_map` **(** :ref:`RID` agent **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`agent_is_map_changed` **(** :ref:`RID` agent **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_callback` **(** :ref:`RID` agent, :ref:`Callable` callback **)** | + | void | :ref:`agent_set_avoidance_callback` **(** :ref:`RID` agent, :ref:`Callable` callback **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_avoidance_enabled` **(** :ref:`RID` agent, :ref:`bool` enabled **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_avoidance_layers` **(** :ref:`RID` agent, :ref:`int` layers **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_avoidance_mask` **(** :ref:`RID` agent, :ref:`int` mask **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_avoidance_priority` **(** :ref:`RID` agent, :ref:`float` priority **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`agent_set_map` **(** :ref:`RID` agent, :ref:`RID` map **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -73,12 +83,14 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`agent_set_radius` **(** :ref:`RID` agent, :ref:`float` radius **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_target_velocity` **(** :ref:`RID` agent, :ref:`Vector2` target_velocity **)** | + | void | :ref:`agent_set_time_horizon_agents` **(** :ref:`RID` agent, :ref:`float` time_horizon **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_time_horizon` **(** :ref:`RID` agent, :ref:`float` time **)** | + | void | :ref:`agent_set_time_horizon_obstacles` **(** :ref:`RID` agent, :ref:`float` time_horizon **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`agent_set_velocity` **(** :ref:`RID` agent, :ref:`Vector2` velocity **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_velocity_forced` **(** :ref:`RID` agent, :ref:`Vector2` velocity **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`free_rid` **(** :ref:`RID` rid **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_debug_enabled` **(** **)** |const| | @@ -137,10 +149,14 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID[]` | :ref:`map_get_links` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`map_get_obstacles` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector2Array` | :ref:`map_get_path` **(** :ref:`RID` map, :ref:`Vector2` origin, :ref:`Vector2` destination, :ref:`bool` optimize, :ref:`int` navigation_layers=1 **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID[]` | :ref:`map_get_regions` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`map_get_use_edge_connections` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`map_is_active` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`map_set_active` **(** :ref:`RID` map, :ref:`bool` active **)** | @@ -151,6 +167,20 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`map_set_link_connection_radius` **(** :ref:`RID` map, :ref:`float` radius **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`map_set_use_edge_connections` **(** :ref:`RID` map, :ref:`bool` enabled **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`obstacle_create` **(** **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`obstacle_get_map` **(** :ref:`RID` obstacle **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`obstacle_set_avoidance_layers` **(** :ref:`RID` obstacle, :ref:`int` layers **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`obstacle_set_map` **(** :ref:`RID` obstacle, :ref:`RID` map **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`obstacle_set_position` **(** :ref:`RID` obstacle, :ref:`Vector2` position **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`obstacle_set_vertices` **(** :ref:`RID` obstacle, :ref:`PackedVector2Array` vertices **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`query_path` **(** :ref:`NavigationPathQueryParameters2D` parameters, :ref:`NavigationPathQueryResult2D` result **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`region_create` **(** **)** | @@ -171,6 +201,8 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`region_get_travel_cost` **(** :ref:`RID` region **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`region_get_use_edge_connections` **(** :ref:`RID` region **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`region_owns_point` **(** :ref:`RID` region, :ref:`Vector2` point **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`region_set_enter_cost` **(** :ref:`RID` region, :ref:`float` enter_cost **)** | @@ -187,6 +219,8 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`region_set_travel_cost` **(** :ref:`RID` region, :ref:`float` travel_cost **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_use_edge_connections` **(** :ref:`RID` region, :ref:`bool` enabled **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_debug_enabled` **(** :ref:`bool` enabled **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -240,6 +274,18 @@ Creates the agent. ---- +.. _class_NavigationServer2D_method_agent_get_avoidance_enabled: + +.. rst-class:: classref-method + +:ref:`bool` **agent_get_avoidance_enabled** **(** :ref:`RID` agent **)** |const| + +Return ``true`` if the specified ``agent`` uses avoidance. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_agent_get_map: .. rst-class:: classref-method @@ -264,15 +310,65 @@ Returns true if the map got changed the previous frame. ---- -.. _class_NavigationServer2D_method_agent_set_callback: +.. _class_NavigationServer2D_method_agent_set_avoidance_callback: + +.. rst-class:: classref-method + +void **agent_set_avoidance_callback** **(** :ref:`RID` agent, :ref:`Callable` callback **)** + +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`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_agent_set_avoidance_enabled: + +.. rst-class:: classref-method + +void **agent_set_avoidance_enabled** **(** :ref:`RID` agent, :ref:`bool` enabled **)** + +If ``enabled`` is ``true`` the specified ``agent`` uses avoidance. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_agent_set_avoidance_layers: + +.. rst-class:: classref-method + +void **agent_set_avoidance_layers** **(** :ref:`RID` agent, :ref:`int` layers **)** + +Set the agent's ``avoidance_layers`` bitmask. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_agent_set_avoidance_mask: .. rst-class:: classref-method -void **agent_set_callback** **(** :ref:`RID` agent, :ref:`Callable` callback **)** +void **agent_set_avoidance_mask** **(** :ref:`RID` agent, :ref:`int` mask **)** -Sets the callback that gets called after each avoidance processing step for the ``agent``. The calculated ``safe_velocity`` will be passed as the first parameter just before the physics calculations. +Set the agent's ``avoidance_mask`` bitmask. -\ **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_callback` again with an empty :ref:`Callable`. +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_agent_set_avoidance_priority: + +.. rst-class:: classref-method + +void **agent_set_avoidance_priority** **(** :ref:`RID` agent, :ref:`float` priority **)** + +Set the agent's ``avoidance_priority`` with a ``priority`` between 0.0 (lowest priority) to 1.0 (highest priority). + +The specified ``agent`` does not adjust the velocity for other agents that would match the ``avoidance_mask`` but have a lower `` avoidance_priority``. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent. .. rst-class:: classref-item-separator @@ -350,25 +446,25 @@ Sets the radius of the agent. ---- -.. _class_NavigationServer2D_method_agent_set_target_velocity: +.. _class_NavigationServer2D_method_agent_set_time_horizon_agents: .. rst-class:: classref-method -void **agent_set_target_velocity** **(** :ref:`RID` agent, :ref:`Vector2` target_velocity **)** +void **agent_set_time_horizon_agents** **(** :ref:`RID` agent, :ref:`float` time_horizon **)** -Sets the new target velocity. +The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. .. rst-class:: classref-item-separator ---- -.. _class_NavigationServer2D_method_agent_set_time_horizon: +.. _class_NavigationServer2D_method_agent_set_time_horizon_obstacles: .. rst-class:: classref-method -void **agent_set_time_horizon** **(** :ref:`RID` agent, :ref:`float` time **)** +void **agent_set_time_horizon_obstacles** **(** :ref:`RID` agent, :ref:`float` time_horizon **)** -The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. Must be positive. +The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to static avoidance obstacles. The larger this number, the sooner this agent will respond to the presence of static avoidance obstacles, but the less freedom this agent has in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. .. rst-class:: classref-item-separator @@ -380,7 +476,19 @@ The minimal amount of time for which the agent's velocities that are computed by void **agent_set_velocity** **(** :ref:`RID` agent, :ref:`Vector2` velocity **)** -Sets the current velocity of the agent. +Sets ``velocity`` as the new wanted velocity for the specified ``agent``. The avoidance simulation will try to fulfil 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 + +---- + +.. _class_NavigationServer2D_method_agent_set_velocity_forced: + +.. rst-class:: classref-method + +void **agent_set_velocity_forced** **(** :ref:`RID` agent, :ref:`Vector2` velocity **)** + +Replaces the internal velocity in the collision avoidance simulation with ``velocity`` for the specified ``agent``. When an agent is teleported to a new position far away this function should be used in the same frame. If called frequently this function can get agents stuck. .. rst-class:: classref-item-separator @@ -740,6 +848,18 @@ Returns all navigation link :ref:`RID`\ s that are currently assigned ---- +.. _class_NavigationServer2D_method_map_get_obstacles: + +.. rst-class:: classref-method + +:ref:`RID[]` **map_get_obstacles** **(** :ref:`RID` map **)** |const| + +Returns all navigation obstacle :ref:`RID`\ s that are currently assigned to the requested navigation ``map``. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_map_get_path: .. rst-class:: classref-method @@ -764,6 +884,18 @@ Returns all navigation regions :ref:`RID`\ s that are currently assig ---- +.. _class_NavigationServer2D_method_map_get_use_edge_connections: + +.. rst-class:: classref-method + +:ref:`bool` **map_get_use_edge_connections** **(** :ref:`RID` map **)** |const| + +Returns whether the navigation ``map`` allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_map_is_active: .. rst-class:: classref-method @@ -824,6 +956,92 @@ Set the map's link connection radius used to connect links to navigation polygon ---- +.. _class_NavigationServer2D_method_map_set_use_edge_connections: + +.. rst-class:: classref-method + +void **map_set_use_edge_connections** **(** :ref:`RID` map, :ref:`bool` enabled **)** + +Set the navigation ``map`` edge connection use. If ``enabled`` the navigation map allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_obstacle_create: + +.. rst-class:: classref-method + +:ref:`RID` **obstacle_create** **(** **)** + +Creates a new navigation obstacle. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_obstacle_get_map: + +.. rst-class:: classref-method + +:ref:`RID` **obstacle_get_map** **(** :ref:`RID` obstacle **)** |const| + +Returns the navigation map :ref:`RID` the requested ``obstacle`` is currently assigned to. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_obstacle_set_avoidance_layers: + +.. rst-class:: classref-method + +void **obstacle_set_avoidance_layers** **(** :ref:`RID` obstacle, :ref:`int` layers **)** + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_obstacle_set_map: + +.. rst-class:: classref-method + +void **obstacle_set_map** **(** :ref:`RID` obstacle, :ref:`RID` map **)** + +Sets the navigation map :ref:`RID` for the obstacle. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_obstacle_set_position: + +.. rst-class:: classref-method + +void **obstacle_set_position** **(** :ref:`RID` obstacle, :ref:`Vector2` position **)** + +Sets the position of the obstacle in world space. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_obstacle_set_vertices: + +.. rst-class:: classref-method + +void **obstacle_set_vertices** **(** :ref:`RID` obstacle, :ref:`PackedVector2Array` vertices **)** + +Sets the outline vertices for the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_query_path: .. rst-class:: classref-method @@ -944,6 +1162,18 @@ Returns the travel cost of this ``region``. ---- +.. _class_NavigationServer2D_method_region_get_use_edge_connections: + +.. rst-class:: classref-method + +:ref:`bool` **region_get_use_edge_connections** **(** :ref:`RID` region **)** |const| + +Returns whether the navigation ``region`` is set to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_region_owns_point: .. rst-class:: classref-method @@ -1044,6 +1274,18 @@ Sets the ``travel_cost`` for this ``region``. ---- +.. _class_NavigationServer2D_method_region_set_use_edge_connections: + +.. rst-class:: classref-method + +void **region_set_use_edge_connections** **(** :ref:`RID` region, :ref:`bool` enabled **)** + +If ``enabled`` the navigation ``region`` will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_set_debug_enabled: .. rst-class:: classref-method diff --git a/classes/class_navigationserver3d.rst b/classes/class_navigationserver3d.rst index 6ced2d5ecd0..da06c78b050 100644 --- a/classes/class_navigationserver3d.rst +++ b/classes/class_navigationserver3d.rst @@ -12,26 +12,26 @@ NavigationServer3D **Inherits:** :ref:`Object` -Server interface for low-level 3D navigation access. +A server interface for low-level 3D navigation access. .. rst-class:: classref-introduction-group Description ----------- -NavigationServer3D is the server responsible for all 3D navigation. It handles several objects, namely maps, regions and agents. +NavigationServer2D is the server that handles navigation maps, regions and agents. It does not handle A\* navigation from :ref:`AStar3D`. Maps are made up of regions, which are made of navigation meshes. Together, they define the navigable areas in the 3D world. -\ **Note:** Most NavigationServer changes take effect after the next physics frame and not immediately. This includes all changes made to maps, regions or agents by navigation related Nodes in the SceneTree or made through scripts. +\ **Note:** Most **NavigationServer3D** changes take effect after the next physics frame and not immediately. This includes all changes made to maps, regions or agents by navigation-related nodes in the scene tree or made through scripts. 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 allows allowing or forbidding some areas to 3D 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. -\ **Note:** The collision avoidance system ignores regions. Using the modified velocity as-is might lead to pushing and agent outside of a navigable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine. +\ **Note:** The collision avoidance system ignores regions. Using the modified velocity directly may move an agent outside of the traversable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine. This server keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. @@ -55,11 +55,25 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`agent_create` **(** **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`agent_get_avoidance_enabled` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`agent_get_map` **(** :ref:`RID` agent **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`agent_get_use_3d_avoidance` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`agent_is_map_changed` **(** :ref:`RID` agent **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_callback` **(** :ref:`RID` agent, :ref:`Callable` callback **)** | + | void | :ref:`agent_set_avoidance_callback` **(** :ref:`RID` agent, :ref:`Callable` callback **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_avoidance_enabled` **(** :ref:`RID` agent, :ref:`bool` enabled **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_avoidance_layers` **(** :ref:`RID` agent, :ref:`int` layers **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_avoidance_mask` **(** :ref:`RID` agent, :ref:`int` mask **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_avoidance_priority` **(** :ref:`RID` agent, :ref:`float` priority **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_height` **(** :ref:`RID` agent, :ref:`float` height **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`agent_set_map` **(** :ref:`RID` agent, :ref:`RID` map **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -73,12 +87,16 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`agent_set_radius` **(** :ref:`RID` agent, :ref:`float` radius **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_target_velocity` **(** :ref:`RID` agent, :ref:`Vector3` target_velocity **)** | + | void | :ref:`agent_set_time_horizon_agents` **(** :ref:`RID` agent, :ref:`float` time_horizon **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_time_horizon` **(** :ref:`RID` agent, :ref:`float` time **)** | + | void | :ref:`agent_set_time_horizon_obstacles` **(** :ref:`RID` agent, :ref:`float` time_horizon **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_use_3d_avoidance` **(** :ref:`RID` agent, :ref:`bool` enabled **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`agent_set_velocity` **(** :ref:`RID` agent, :ref:`Vector3` velocity **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_velocity_forced` **(** :ref:`RID` agent, :ref:`Vector3` velocity **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`free_rid` **(** :ref:`RID` rid **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_debug_enabled` **(** **)** |const| | @@ -143,12 +161,16 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID[]` | :ref:`map_get_links` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`map_get_obstacles` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector3Array` | :ref:`map_get_path` **(** :ref:`RID` map, :ref:`Vector3` origin, :ref:`Vector3` destination, :ref:`bool` optimize, :ref:`int` navigation_layers=1 **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID[]` | :ref:`map_get_regions` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`map_get_up` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`map_get_use_edge_connections` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`map_is_active` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`map_set_active` **(** :ref:`RID` map, :ref:`bool` active **)** | @@ -161,6 +183,22 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`map_set_up` **(** :ref:`RID` map, :ref:`Vector3` up **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`map_set_use_edge_connections` **(** :ref:`RID` map, :ref:`bool` enabled **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`obstacle_create` **(** **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`obstacle_get_map` **(** :ref:`RID` obstacle **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`obstacle_set_avoidance_layers` **(** :ref:`RID` obstacle, :ref:`int` layers **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`obstacle_set_height` **(** :ref:`RID` obstacle, :ref:`float` height **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`obstacle_set_map` **(** :ref:`RID` obstacle, :ref:`RID` map **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`obstacle_set_position` **(** :ref:`RID` obstacle, :ref:`Vector3` position **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`obstacle_set_vertices` **(** :ref:`RID` obstacle, :ref:`PackedVector3Array` vertices **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`query_path` **(** :ref:`NavigationPathQueryParameters3D` parameters, :ref:`NavigationPathQueryResult3D` result **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`region_bake_navigation_mesh` **(** :ref:`NavigationMesh` navigation_mesh, :ref:`Node` root_node **)** | @@ -183,6 +221,8 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`region_get_travel_cost` **(** :ref:`RID` region **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`region_get_use_edge_connections` **(** :ref:`RID` region **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`region_owns_point` **(** :ref:`RID` region, :ref:`Vector3` point **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`region_set_enter_cost` **(** :ref:`RID` region, :ref:`float` enter_cost **)** | @@ -199,6 +239,8 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`region_set_travel_cost` **(** :ref:`RID` region, :ref:`float` travel_cost **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_use_edge_connections` **(** :ref:`RID` region, :ref:`bool` enabled **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_active` **(** :ref:`bool` active **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_debug_enabled` **(** :ref:`bool` enabled **)** | @@ -213,6 +255,18 @@ Methods Signals ------- +.. _class_NavigationServer3D_signal_avoidance_debug_changed: + +.. rst-class:: classref-signal + +**avoidance_debug_changed** **(** **)** + +Emitted when avoidance debug settings are changed. Only available in debug builds. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_signal_map_changed: .. rst-class:: classref-signal @@ -341,6 +395,18 @@ Creates the agent. ---- +.. _class_NavigationServer3D_method_agent_get_avoidance_enabled: + +.. rst-class:: classref-method + +:ref:`bool` **agent_get_avoidance_enabled** **(** :ref:`RID` agent **)** |const| + +Returns ``true`` if the provided ``agent`` has avoidance enabled. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_agent_get_map: .. rst-class:: classref-method @@ -353,6 +419,18 @@ Returns the navigation map :ref:`RID` the requested ``agent`` is curr ---- +.. _class_NavigationServer3D_method_agent_get_use_3d_avoidance: + +.. rst-class:: classref-method + +:ref:`bool` **agent_get_use_3d_avoidance** **(** :ref:`RID` agent **)** |const| + +Returns ``true`` if the provided ``agent`` uses avoidance in 3D space Vector3(x,y,z) instead of horizontal 2D Vector2(x,y) / Vector3(x,0.0,z). + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_agent_is_map_changed: .. rst-class:: classref-method @@ -365,15 +443,77 @@ Returns true if the map got changed the previous frame. ---- -.. _class_NavigationServer3D_method_agent_set_callback: +.. _class_NavigationServer3D_method_agent_set_avoidance_callback: .. rst-class:: classref-method -void **agent_set_callback** **(** :ref:`RID` agent, :ref:`Callable` callback **)** +void **agent_set_avoidance_callback** **(** :ref:`RID` agent, :ref:`Callable` callback **)** -Sets the callback that gets called after each avoidance processing step for the ``agent``. The calculated ``safe_velocity`` will be passed as the first parameter just before the physics calculations. +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_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 + +---- + +.. _class_NavigationServer3D_method_agent_set_avoidance_enabled: + +.. rst-class:: classref-method + +void **agent_set_avoidance_enabled** **(** :ref:`RID` agent, :ref:`bool` enabled **)** + +If ``enabled`` the provided ``agent`` calculates avoidance. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_set_avoidance_layers: + +.. rst-class:: classref-method + +void **agent_set_avoidance_layers** **(** :ref:`RID` agent, :ref:`int` layers **)** + +Set the agent's ``avoidance_layers`` bitmask. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_set_avoidance_mask: + +.. rst-class:: classref-method + +void **agent_set_avoidance_mask** **(** :ref:`RID` agent, :ref:`int` mask **)** + +Set the agent's ``avoidance_mask`` bitmask. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_set_avoidance_priority: + +.. rst-class:: classref-method + +void **agent_set_avoidance_priority** **(** :ref:`RID` agent, :ref:`float` priority **)** + +Set the agent's ``avoidance_priority`` with a ``priority`` between 0.0 (lowest priority) to 1.0 (highest priority). + +The specified ``agent`` does not adjust the velocity for other agents that would match the ``avoidance_mask`` but have a lower `` avoidance_priority``. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_set_height: + +.. rst-class:: classref-method + +void **agent_set_height** **(** :ref:`RID` agent, :ref:`float` height **)** + +Updates the provided ``agent`` ``height``. .. rst-class:: classref-item-separator @@ -451,25 +591,41 @@ Sets the radius of the agent. ---- -.. _class_NavigationServer3D_method_agent_set_target_velocity: +.. _class_NavigationServer3D_method_agent_set_time_horizon_agents: .. rst-class:: classref-method -void **agent_set_target_velocity** **(** :ref:`RID` agent, :ref:`Vector3` target_velocity **)** +void **agent_set_time_horizon_agents** **(** :ref:`RID` agent, :ref:`float` time_horizon **)** -Sets the new target velocity. +The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. .. rst-class:: classref-item-separator ---- -.. _class_NavigationServer3D_method_agent_set_time_horizon: +.. _class_NavigationServer3D_method_agent_set_time_horizon_obstacles: .. rst-class:: classref-method -void **agent_set_time_horizon** **(** :ref:`RID` agent, :ref:`float` time **)** +void **agent_set_time_horizon_obstacles** **(** :ref:`RID` agent, :ref:`float` time_horizon **)** -The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. Must be positive. +The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to static avoidance obstacles. The larger this number, the sooner this agent will respond to the presence of static avoidance obstacles, but the less freedom this agent has in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_set_use_3d_avoidance: + +.. rst-class:: classref-method + +void **agent_set_use_3d_avoidance** **(** :ref:`RID` agent, :ref:`bool` enabled **)** + +Sets if the agent uses the 2D avoidance or the 3D avoidance while avoidance is enabled. + +If ``true`` the agent calculates avoidance velocities in 3D for the xyz-axis, e.g. for games that take place in air, unterwater or space. The 3D using agent only avoids other 3D avoidance using agent's. The 3D using agent only reacts to radius based avoidance obstacles. The 3D using agent ignores any vertices based obstacles. The 3D using agent only avoids other 3D using agent's. + +If ``false`` the agent calculates avoidance velocities in 2D along the xz-axis ignoring the y-axis. The 2D using agent only avoids other 2D avoidance using agent's. The 2D using agent reacts to radius avoidance obstacles. The 2D using agent reacts to vertices based avoidance obstacles. The 2D using agent only avoids other 2D using agent's. 2D using agents will ignore other 2D using agents or obstacles that are below their current position or above their current position including the agents height in 2D avoidance. .. rst-class:: classref-item-separator @@ -481,7 +637,19 @@ The minimal amount of time for which the agent's velocities that are computed by void **agent_set_velocity** **(** :ref:`RID` agent, :ref:`Vector3` velocity **)** -Sets the current velocity of the agent. +Sets ``velocity`` as the new wanted velocity for the specified ``agent``. The avoidance simulation will try to fulfil 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 + +---- + +.. _class_NavigationServer3D_method_agent_set_velocity_forced: + +.. rst-class:: classref-method + +void **agent_set_velocity_forced** **(** :ref:`RID` agent, :ref:`Vector3` velocity **)** + +Replaces the internal velocity in the collision avoidance simulation with ``velocity`` for the specified ``agent``. When an agent is teleported to a new position this function should be used in the same frame. If called frequently this function can get agents stuck. .. rst-class:: classref-item-separator @@ -877,6 +1045,18 @@ Returns all navigation link :ref:`RID`\ s that are currently assigned ---- +.. _class_NavigationServer3D_method_map_get_obstacles: + +.. rst-class:: classref-method + +:ref:`RID[]` **map_get_obstacles** **(** :ref:`RID` map **)** |const| + +Returns all navigation obstacle :ref:`RID`\ s that are currently assigned to the requested navigation ``map``. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_map_get_path: .. rst-class:: classref-method @@ -913,6 +1093,18 @@ Returns the map's up direction. ---- +.. _class_NavigationServer3D_method_map_get_use_edge_connections: + +.. rst-class:: classref-method + +:ref:`bool` **map_get_use_edge_connections** **(** :ref:`RID` map **)** |const| + +Returns true if the navigation ``map`` allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_map_is_active: .. rst-class:: classref-method @@ -985,6 +1177,102 @@ Sets the map up direction. ---- +.. _class_NavigationServer3D_method_map_set_use_edge_connections: + +.. rst-class:: classref-method + +void **map_set_use_edge_connections** **(** :ref:`RID` map, :ref:`bool` enabled **)** + +Set the navigation ``map`` edge connection use. If ``enabled`` the navigation map allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_obstacle_create: + +.. rst-class:: classref-method + +:ref:`RID` **obstacle_create** **(** **)** + +Creates a new obstacle. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_obstacle_get_map: + +.. rst-class:: classref-method + +:ref:`RID` **obstacle_get_map** **(** :ref:`RID` obstacle **)** |const| + +Returns the navigation map :ref:`RID` the requested ``obstacle`` is currently assigned to. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_obstacle_set_avoidance_layers: + +.. rst-class:: classref-method + +void **obstacle_set_avoidance_layers** **(** :ref:`RID` obstacle, :ref:`int` layers **)** + +Set the obstacles's ``avoidance_layers`` bitmask. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_obstacle_set_height: + +.. rst-class:: classref-method + +void **obstacle_set_height** **(** :ref:`RID` obstacle, :ref:`float` height **)** + +Sets the ``height`` for the ``obstacle``. In 3D agents will ignore obstacles that are above or below them while using 2D avoidance. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_obstacle_set_map: + +.. rst-class:: classref-method + +void **obstacle_set_map** **(** :ref:`RID` obstacle, :ref:`RID` map **)** + +Assigns the ``obstacle`` to a navigation map. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_obstacle_set_position: + +.. rst-class:: classref-method + +void **obstacle_set_position** **(** :ref:`RID` obstacle, :ref:`Vector3` position **)** + +Updates the ``position`` in world space for the ``obstacle``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_obstacle_set_vertices: + +.. rst-class:: classref-method + +void **obstacle_set_vertices** **(** :ref:`RID` obstacle, :ref:`PackedVector3Array` vertices **)** + +Sets the outline vertices for the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_query_path: .. rst-class:: classref-method @@ -1117,6 +1405,18 @@ Returns the travel cost of this ``region``. ---- +.. _class_NavigationServer3D_method_region_get_use_edge_connections: + +.. rst-class:: classref-method + +:ref:`bool` **region_get_use_edge_connections** **(** :ref:`RID` region **)** |const| + +Returns true if the navigation ``region`` is set to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_region_owns_point: .. rst-class:: classref-method @@ -1217,6 +1517,18 @@ Sets the ``travel_cost`` for this ``region``. ---- +.. _class_NavigationServer3D_method_region_set_use_edge_connections: + +.. rst-class:: classref-method + +void **region_set_use_edge_connections** **(** :ref:`RID` region, :ref:`bool` enabled **)** + +If ``enabled`` the navigation ``region`` will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_set_active: .. rst-class:: classref-method diff --git a/classes/class_ninepatchrect.rst b/classes/class_ninepatchrect.rst index bf51022abf8..db396e1edab 100644 --- a/classes/class_ninepatchrect.rst +++ b/classes/class_ninepatchrect.rst @@ -12,14 +12,14 @@ NinePatchRect **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Scalable texture-based frame that tiles the texture's centers and sides, but keeps the corners' original size. Perfect for panels and dialog boxes. +A control that displays a texture by keeping its corners intact, but tiling its edges and center. .. rst-class:: classref-introduction-group Description ----------- -Also known as 9-slice panels, NinePatchRect produces clean panels of any size, based on a small texture. To do so, it splits the texture in a 3×3 grid. When you scale the node, it tiles the texture's sides horizontally or vertically, the center on both axes but it doesn't scale or tile the corners. +Also known as 9-slice panels, **NinePatchRect** produces clean panels of any size based on a small texture. To do so, it splits the texture in a 3×3 grid. When you scale the node, it tiles the texture's edges horizontally or vertically, tiles the center on both axes, and leaves the corners unchanged. .. rst-class:: classref-reftable-group diff --git a/classes/class_node.rst b/classes/class_node.rst index c024c1912b4..0f65d8d41ae 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -12,9 +12,9 @@ Node **Inherits:** :ref:`Object` -**Inherited By:** :ref:`AnimationPlayer`, :ref:`AnimationTree`, :ref:`AudioStreamPlayer`, :ref:`CanvasItem`, :ref:`CanvasLayer`, :ref:`EditorFileSystem`, :ref:`EditorInterface`, :ref:`EditorPlugin`, :ref:`EditorResourcePreview`, :ref:`HTTPRequest`, :ref:`InstancePlaceholder`, :ref:`MissingNode`, :ref:`MultiplayerSpawner`, :ref:`MultiplayerSynchronizer`, :ref:`NavigationAgent2D`, :ref:`NavigationAgent3D`, :ref:`NavigationObstacle2D`, :ref:`NavigationObstacle3D`, :ref:`Node3D`, :ref:`ResourcePreloader`, :ref:`ShaderGlobalsOverride`, :ref:`SkeletonIK3D`, :ref:`Timer`, :ref:`Viewport`, :ref:`WorldEnvironment` +**Inherited By:** :ref:`AnimationPlayer`, :ref:`AnimationTree`, :ref:`AudioStreamPlayer`, :ref:`CanvasItem`, :ref:`CanvasLayer`, :ref:`EditorFileSystem`, :ref:`EditorPlugin`, :ref:`EditorResourcePreview`, :ref:`HTTPRequest`, :ref:`InstancePlaceholder`, :ref:`MissingNode`, :ref:`MultiplayerSpawner`, :ref:`MultiplayerSynchronizer`, :ref:`NavigationAgent2D`, :ref:`NavigationAgent3D`, :ref:`Node3D`, :ref:`ResourcePreloader`, :ref:`ShaderGlobalsOverride`, :ref:`SkeletonIK3D`, :ref:`Timer`, :ref:`Viewport`, :ref:`WorldEnvironment` -Base class for all *scene* objects. +Base class for all scene objects. .. rst-class:: classref-introduction-group @@ -62,23 +62,31 @@ Properties .. table:: :widths: auto - +---------------------------------------------+-----------------------------------------------------------------------+-----------+ - | :ref:`String` | :ref:`editor_description` | ``""`` | - +---------------------------------------------+-----------------------------------------------------------------------+-----------+ - | :ref:`MultiplayerAPI` | :ref:`multiplayer` | | - +---------------------------------------------+-----------------------------------------------------------------------+-----------+ - | :ref:`StringName` | :ref:`name` | | - +---------------------------------------------+-----------------------------------------------------------------------+-----------+ - | :ref:`Node` | :ref:`owner` | | - +---------------------------------------------+-----------------------------------------------------------------------+-----------+ - | :ref:`ProcessMode` | :ref:`process_mode` | ``0`` | - +---------------------------------------------+-----------------------------------------------------------------------+-----------+ - | :ref:`int` | :ref:`process_priority` | ``0`` | - +---------------------------------------------+-----------------------------------------------------------------------+-----------+ - | :ref:`String` | :ref:`scene_file_path` | | - +---------------------------------------------+-----------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`unique_name_in_owner` | ``false`` | - +---------------------------------------------+-----------------------------------------------------------------------+-----------+ + +---------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`editor_description` | ``""`` | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`MultiplayerAPI` | :ref:`multiplayer` | | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`StringName` | :ref:`name` | | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`Node` | :ref:`owner` | | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`ProcessMode` | :ref:`process_mode` | ``0`` | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`process_physics_priority` | ``0`` | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`process_priority` | ``0`` | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`ProcessThreadGroup` | :ref:`process_thread_group` | ``0`` | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`process_thread_group_order` | | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`ProcessThreadMessages` | :ref:`process_thread_messages` | | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`scene_file_path` | | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`unique_name_in_owner` | ``false`` | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -115,6 +123,10 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_to_group` **(** :ref:`StringName` group, :ref:`bool` persistent=false **)** | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`call_deferred_thread_group` **(** :ref:`StringName` method, ... **)** |vararg| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`call_thread_safe` **(** :ref:`StringName` method, ... **)** |vararg| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`can_process` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Tween` | :ref:`create_tween` **(** **)** | @@ -137,6 +149,8 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_index` **(** :ref:`bool` include_internal=false **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Window` | :ref:`get_last_exclusive_window` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_multiplayer_authority` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Node` | :ref:`get_node` **(** :ref:`NodePath` path **)** |const| | @@ -181,6 +195,8 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_multiplayer_authority` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_node_ready` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_physics_processing` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_physics_processing_internal` **(** **)** |const| | @@ -199,6 +215,10 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`move_child` **(** :ref:`Node` child_node, :ref:`int` to_index **)** | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`notify_deferred_thread_group` **(** :ref:`int` what **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`notify_thread_safe` **(** :ref:`int` what **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`print_orphan_nodes` **(** **)** |static| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`print_tree` **(** **)** | @@ -227,6 +247,8 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`rpc_id` **(** :ref:`int` peer_id, :ref:`StringName` method, ... **)** |vararg| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_deferred_thread_group` **(** :ref:`StringName` property, :ref:`Variant` value **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_display_folded` **(** :ref:`bool` fold **)** | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_editable_instance` **(** :ref:`Node` node, :ref:`bool` is_editable **)** | @@ -251,6 +273,8 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_scene_instance_load_placeholder` **(** :ref:`bool` load_placeholder **)** | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_thread_safe` **(** :ref:`StringName` property, :ref:`Variant` value **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`update_configuration_warnings` **(** **)** | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -291,6 +315,18 @@ When this signal is received, the child ``node`` is still in the tree and valid. ---- +.. _class_Node_signal_child_order_changed: + +.. rst-class:: classref-signal + +**child_order_changed** **(** **)** + +Emitted when the list of children is changed. This happens when child nodes are added, moved or removed. + +.. rst-class:: classref-item-separator + +---- + .. _class_Node_signal_ready: .. rst-class:: classref-signal @@ -406,6 +442,74 @@ Always process. Continue processing always, ignoring the :ref:`SceneTree`'s paused property. This is the inverse of :ref:`PROCESS_MODE_ALWAYS`. +.. rst-class:: classref-item-separator + +---- + +.. _enum_Node_ProcessThreadGroup: + +.. rst-class:: classref-enumeration + +enum **ProcessThreadGroup**: + +.. _class_Node_constant_PROCESS_THREAD_GROUP_INHERIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ProcessThreadGroup` **PROCESS_THREAD_GROUP_INHERIT** = ``0`` + +If the :ref:`process_thread_group` property is sent to this, the node will belong to any parent (or grandparent) node that has a thread group mode that is not inherit. See :ref:`process_thread_group` for more information. + +.. _class_Node_constant_PROCESS_THREAD_GROUP_MAIN_THREAD: + +.. rst-class:: classref-enumeration-constant + +:ref:`ProcessThreadGroup` **PROCESS_THREAD_GROUP_MAIN_THREAD** = ``1`` + +Process this node (and children nodes set to inherit) on the main thread. See :ref:`process_thread_group` for more information. + +.. _class_Node_constant_PROCESS_THREAD_GROUP_SUB_THREAD: + +.. rst-class:: classref-enumeration-constant + +:ref:`ProcessThreadGroup` **PROCESS_THREAD_GROUP_SUB_THREAD** = ``2`` + +Process this node (and children nodes set to inherit) on a sub-thread. See :ref:`process_thread_group` for more information. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_Node_ProcessThreadMessages: + +.. rst-class:: classref-enumeration + +enum **ProcessThreadMessages**: + +.. _class_Node_constant_FLAG_PROCESS_THREAD_MESSAGES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ProcessThreadMessages` **FLAG_PROCESS_THREAD_MESSAGES** = ``1`` + + + +.. _class_Node_constant_FLAG_PROCESS_THREAD_MESSAGES_PHYSICS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ProcessThreadMessages` **FLAG_PROCESS_THREAD_MESSAGES_PHYSICS** = ``2`` + + + +.. _class_Node_constant_FLAG_PROCESS_THREAD_MESSAGES_ALL: + +.. rst-class:: classref-enumeration-constant + +:ref:`ProcessThreadMessages` **FLAG_PROCESS_THREAD_MESSAGES_ALL** = ``3`` + + + .. rst-class:: classref-item-separator ---- @@ -519,7 +623,7 @@ This notification is emitted *after* the related :ref:`tree_exiting` instead. .. _class_Node_constant_NOTIFICATION_READY: @@ -617,6 +721,14 @@ Use :ref:`Viewport.gui_is_drag_successful` **process_physics_priority** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_physics_process_priority** **(** :ref:`int` value **)** +- :ref:`int` **get_physics_process_priority** **(** **)** + +Similar to :ref:`process_priority` but for :ref:`NOTIFICATION_PHYSICS_PROCESS`, :ref:`_physics_process` or the internal version. + +.. rst-class:: classref-item-separator + +---- + .. _class_Node_property_process_priority: .. rst-class:: classref-property @@ -979,6 +1108,63 @@ The node's priority in the execution order of the enabled processing callbacks ( ---- +.. _class_Node_property_process_thread_group: + +.. rst-class:: classref-property + +:ref:`ProcessThreadGroup` **process_thread_group** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_process_thread_group** **(** :ref:`ProcessThreadGroup` value **)** +- :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. + +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). + +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 children (and grandchildren) 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. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Node_property_process_thread_group_order: + +.. rst-class:: classref-property + +:ref:`int` **process_thread_group_order** + +.. rst-class:: classref-property-setget + +- void **set_process_thread_group_order** **(** :ref:`int` value **)** +- :ref:`int` **get_process_thread_group_order** **(** **)** + +Change the process thread group order. Groups with a lesser order will process before groups with a greater order. This is useful when a large amount of nodes process in sub thread and, afterwards, another group wants to collect their result in the main thread, as an example. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Node_property_process_thread_messages: + +.. rst-class:: classref-property + +:ref:`ProcessThreadMessages` **process_thread_messages** + +.. rst-class:: classref-property-setget + +- void **set_process_thread_messages** **(** :ref:`ProcessThreadMessages` value **)** +- :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. + +.. rst-class:: classref-item-separator + +---- + .. _class_Node_property_scene_file_path: .. rst-class:: classref-property @@ -1060,6 +1246,19 @@ Returning an empty array produces no warnings. Call :ref:`update_configuration_warnings` when the warnings need to be updated for this node. +:: + + @export var energy = 0: + set(value): + energy = value + update_configuration_warnings() + + func _get_configuration_warnings(): + if energy < 0: + return ["Energy must be 0 or greater."] + else: + return [] + .. rst-class:: classref-item-separator ---- @@ -1212,7 +1411,7 @@ 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. Such 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. Such 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 the child node already has a parent, the function will fail. Use :ref:`remove_child` first to remove the node from its current parent. For example: @@ -1279,6 +1478,30 @@ The ``persistent`` option is used when packing node to :ref:`PackedScene` **call_deferred_thread_group** **(** :ref:`StringName` method, ... **)** |vararg| + +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 + +---- + +.. _class_Node_method_call_thread_safe: + +.. rst-class:: classref-method + +:ref:`Variant` **call_thread_safe** **(** :ref:`StringName` method, ... **)** |vararg| + +This function ensures that the calling of this function will succeed, no matter whether it's being done from a thread or not. If called from a thread that is not allowed to call the function, the call will become deferred. Otherwise, the call will go through directly. + +.. rst-class:: classref-item-separator + +---- + .. _class_Node_method_can_process: .. rst-class:: classref-method @@ -1312,6 +1535,8 @@ Creates a new :ref:`Tween` and binds it to this node. This is equiv +The Tween will start automatically on the next process frame or physics frame (depending on :ref:`TweenProcessMode`). + .. rst-class:: classref-item-separator ---- @@ -1338,7 +1563,7 @@ You can fine-tune the behavior using the ``flags`` (see :ref:`DuplicateFlags` **find_child** **(** :ref:`String` pattern, :ref:`bool` recursive=true, :ref:`bool` owned=true **)** |const| -Finds the first descendant of this node whose name matches ``pattern`` as in :ref:`String.match`. +Finds the first descendant of this node whose name matches ``pattern`` as in :ref:`String.match`. Internal children are also searched over (see ``internal`` parameter in :ref:`add_child`). \ ``pattern`` does not match against the full path, just against individual node names. It is case-sensitive, with ``"*"`` matching zero or more characters and ``"?"`` matching any single character except ``"."``). @@ -1362,7 +1587,7 @@ Returns ``null`` if no matching **Node** is found. :ref:`Node[]` **find_children** **(** :ref:`String` pattern, :ref:`String` type="", :ref:`bool` recursive=true, :ref:`bool` owned=true **)** |const| -Finds descendants of this node whose name matches ``pattern`` as in :ref:`String.match`, and/or type matches ``type`` as in :ref:`Object.is_class`. +Finds descendants of this node whose name matches ``pattern`` as in :ref:`String.match`, and/or type matches ``type`` as in :ref:`Object.is_class`. Internal children are also searched over (see ``internal`` parameter in :ref:`add_child`). \ ``pattern`` does not match against the full path, just against individual node names. It is case-sensitive, with ``"*"`` matching zero or more characters and ``"?"`` matching any single character except ``"."``). @@ -1497,6 +1722,18 @@ If ``include_internal`` is ``false``, the index won't take internal children int ---- +.. _class_Node_method_get_last_exclusive_window: + +.. rst-class:: classref-method + +:ref:`Window` **get_last_exclusive_window** **(** **)** |const| + +Returns the :ref:`Window` that contains this node, or the last exclusive child in a chain of windows starting with the one that contains this node. + +.. rst-class:: classref-item-separator + +---- + .. _class_Node_method_get_multiplayer_authority: .. rst-class:: classref-method @@ -1822,6 +2059,20 @@ Returns ``true`` if the local system is the multiplayer authority of this node. ---- +.. _class_Node_method_is_node_ready: + +.. rst-class:: classref-method + +:ref:`bool` **is_node_ready** **(** **)** |const| + +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``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Node_method_is_physics_processing: .. rst-class:: classref-method @@ -1932,6 +2183,30 @@ Moves a child node to a different index (order) among the other children. Since ---- +.. _class_Node_method_notify_deferred_thread_group: + +.. rst-class:: classref-method + +void **notify_deferred_thread_group** **(** :ref:`int` what **)** + +Similar to :ref:`call_deferred_thread_group`, but for notifications. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Node_method_notify_thread_safe: + +.. rst-class:: classref-method + +void **notify_thread_safe** **(** :ref:`int` what **)** + +Similar to :ref:`call_thread_safe`, but for notifications. + +.. rst-class:: classref-item-separator + +---- + .. _class_Node_method_print_orphan_nodes: .. rst-class:: classref-method @@ -2022,7 +2297,9 @@ Notifies the current node and all its children recursively by calling :ref:`Obje void **queue_free** **(** **)** -Queues a node for deletion at the end of the current frame. When deleted, all of its child nodes will be deleted as well. This method ensures it's safe to delete the node, contrary to :ref:`Object.free`. Use :ref:`Object.is_queued_for_deletion` to check whether a node will be deleted at the end of the frame. +Queues a node for deletion at the end of the current frame. When deleted, all of its child nodes will be deleted as well, and all references to the node and its children will become invalid, see :ref:`Object.free`. + +It is safe to call :ref:`queue_free` multiple times per frame on a node, and to :ref:`Object.free` a node that is currently queued for deletion. Use :ref:`Object.is_queued_for_deletion` to check whether a node will be deleted at the end of the frame. .. rst-class:: classref-item-separator @@ -2147,6 +2424,18 @@ Sends a :ref:`rpc` to a specific peer identified by ``pee ---- +.. _class_Node_method_set_deferred_thread_group: + +.. rst-class:: classref-method + +void **set_deferred_thread_group** **(** :ref:`StringName` property, :ref:`Variant` value **)** + +Similar to :ref:`call_deferred_thread_group`, but for setting properties. + +.. rst-class:: classref-item-separator + +---- + .. _class_Node_method_set_display_folded: .. rst-class:: classref-method @@ -2295,6 +2584,18 @@ Sets whether this is an instance load placeholder. See :ref:`InstancePlaceholder ---- +.. _class_Node_method_set_thread_safe: + +.. rst-class:: classref-method + +void **set_thread_safe** **(** :ref:`StringName` property, :ref:`Variant` value **)** + +Similar to :ref:`call_thread_safe`, but for setting properties. + +.. rst-class:: classref-item-separator + +---- + .. _class_Node_method_update_configuration_warnings: .. rst-class:: classref-method diff --git a/classes/class_node2d.rst b/classes/class_node2d.rst index a1de51af535..49d4d3b269a 100644 --- a/classes/class_node2d.rst +++ b/classes/class_node2d.rst @@ -12,7 +12,7 @@ Node2D **Inherits:** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`AnimatedSprite2D`, :ref:`AudioListener2D`, :ref:`AudioStreamPlayer2D`, :ref:`BackBufferCopy`, :ref:`Bone2D`, :ref:`Camera2D`, :ref:`CanvasGroup`, :ref:`CanvasModulate`, :ref:`CollisionObject2D`, :ref:`CollisionPolygon2D`, :ref:`CollisionShape2D`, :ref:`CPUParticles2D`, :ref:`GPUParticles2D`, :ref:`Joint2D`, :ref:`Light2D`, :ref:`LightOccluder2D`, :ref:`Line2D`, :ref:`Marker2D`, :ref:`MeshInstance2D`, :ref:`MultiMeshInstance2D`, :ref:`NavigationLink2D`, :ref:`NavigationRegion2D`, :ref:`ParallaxLayer`, :ref:`Path2D`, :ref:`PathFollow2D`, :ref:`Polygon2D`, :ref:`RayCast2D`, :ref:`RemoteTransform2D`, :ref:`ShapeCast2D`, :ref:`Skeleton2D`, :ref:`Sprite2D`, :ref:`TileMap`, :ref:`TouchScreenButton`, :ref:`VisibleOnScreenNotifier2D` +**Inherited By:** :ref:`AnimatedSprite2D`, :ref:`AudioListener2D`, :ref:`AudioStreamPlayer2D`, :ref:`BackBufferCopy`, :ref:`Bone2D`, :ref:`Camera2D`, :ref:`CanvasGroup`, :ref:`CanvasModulate`, :ref:`CollisionObject2D`, :ref:`CollisionPolygon2D`, :ref:`CollisionShape2D`, :ref:`CPUParticles2D`, :ref:`GPUParticles2D`, :ref:`Joint2D`, :ref:`Light2D`, :ref:`LightOccluder2D`, :ref:`Line2D`, :ref:`Marker2D`, :ref:`MeshInstance2D`, :ref:`MultiMeshInstance2D`, :ref:`NavigationLink2D`, :ref:`NavigationObstacle2D`, :ref:`NavigationRegion2D`, :ref:`ParallaxLayer`, :ref:`Path2D`, :ref:`PathFollow2D`, :ref:`Polygon2D`, :ref:`RayCast2D`, :ref:`RemoteTransform2D`, :ref:`ShapeCast2D`, :ref:`Skeleton2D`, :ref:`Sprite2D`, :ref:`TileMap`, :ref:`TouchScreenButton`, :ref:`VisibleOnScreenNotifier2D` A 2D game object, inherited by all 2D-related nodes. Has a position, rotation, scale, and Z index. diff --git a/classes/class_node3d.rst b/classes/class_node3d.rst index cc0b8426d85..ead2f73dddc 100644 --- a/classes/class_node3d.rst +++ b/classes/class_node3d.rst @@ -12,7 +12,7 @@ Node3D **Inherits:** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`AudioListener3D`, :ref:`AudioStreamPlayer3D`, :ref:`BoneAttachment3D`, :ref:`Camera3D`, :ref:`CollisionObject3D`, :ref:`CollisionPolygon3D`, :ref:`CollisionShape3D`, :ref:`GridMap`, :ref:`ImporterMeshInstance3D`, :ref:`Joint3D`, :ref:`LightmapProbe`, :ref:`Marker3D`, :ref:`NavigationLink3D`, :ref:`NavigationRegion3D`, :ref:`OccluderInstance3D`, :ref:`OpenXRHand`, :ref:`Path3D`, :ref:`PathFollow3D`, :ref:`RayCast3D`, :ref:`RemoteTransform3D`, :ref:`ShapeCast3D`, :ref:`Skeleton3D`, :ref:`SpringArm3D`, :ref:`VehicleWheel3D`, :ref:`VisualInstance3D`, :ref:`XRNode3D`, :ref:`XROrigin3D` +**Inherited By:** :ref:`AudioListener3D`, :ref:`AudioStreamPlayer3D`, :ref:`BoneAttachment3D`, :ref:`Camera3D`, :ref:`CollisionObject3D`, :ref:`CollisionPolygon3D`, :ref:`CollisionShape3D`, :ref:`GridMap`, :ref:`ImporterMeshInstance3D`, :ref:`Joint3D`, :ref:`LightmapProbe`, :ref:`Marker3D`, :ref:`NavigationLink3D`, :ref:`NavigationObstacle3D`, :ref:`NavigationRegion3D`, :ref:`OccluderInstance3D`, :ref:`OpenXRHand`, :ref:`Path3D`, :ref:`PathFollow3D`, :ref:`RayCast3D`, :ref:`RemoteTransform3D`, :ref:`ShapeCast3D`, :ref:`Skeleton3D`, :ref:`SpringArm3D`, :ref:`VehicleWheel3D`, :ref:`VisualInstance3D`, :ref:`XRNode3D`, :ref:`XROrigin3D` Most basic 3D game object, parent of all 3D-related nodes. @@ -27,6 +27,8 @@ Affine operations (rotate, scale, translate) happen in parent's local coordinate \ **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. + .. rst-class:: classref-introduction-group Tutorials @@ -86,79 +88,79 @@ Methods .. table:: :widths: auto - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_gizmo` **(** :ref:`Node3DGizmo` gizmo **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_gizmos` **(** **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_subgizmo_selection` **(** **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`force_update_transform` **(** **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node3DGizmo[]` | :ref:`get_gizmos` **(** **)** |const| | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node3D` | :ref:`get_parent_node_3d` **(** **)** |const| | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`World3D` | :ref:`get_world_3d` **(** **)** |const| | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_rotate` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_scale` **(** :ref:`Vector3` scale **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_translate` **(** :ref:`Vector3` offset **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`hide` **(** **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_local_transform_notification_enabled` **(** **)** |const| | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_scale_disabled` **(** **)** |const| | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_transform_notification_enabled` **(** **)** |const| | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_visible_in_tree` **(** **)** |const| | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`look_at` **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`look_at_from_position` **(** :ref:`Vector3` position, :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`orthonormalize` **(** **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rotate` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rotate_object_local` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rotate_x` **(** :ref:`float` angle **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rotate_y` **(** :ref:`float` angle **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rotate_z` **(** :ref:`float` angle **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scale_object_local` **(** :ref:`Vector3` scale **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_disable_scale` **(** :ref:`bool` disable **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_identity` **(** **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_ignore_transform_notification` **(** :ref:`bool` enabled **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_notify_local_transform` **(** :ref:`bool` enable **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_notify_transform` **(** :ref:`bool` enable **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_subgizmo_selection` **(** :ref:`Node3DGizmo` gizmo, :ref:`int` id, :ref:`Transform3D` transform **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`show` **(** **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`to_global` **(** :ref:`Vector3` local_point **)** |const| | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`to_local` **(** :ref:`Vector3` global_point **)** |const| | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`translate` **(** :ref:`Vector3` offset **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`translate_object_local` **(** :ref:`Vector3` offset **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`update_gizmos` **(** **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_gizmo` **(** :ref:`Node3DGizmo` gizmo **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_gizmos` **(** **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_subgizmo_selection` **(** **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`force_update_transform` **(** **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node3DGizmo[]` | :ref:`get_gizmos` **(** **)** |const| | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node3D` | :ref:`get_parent_node_3d` **(** **)** |const| | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`World3D` | :ref:`get_world_3d` **(** **)** |const| | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`global_rotate` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`global_scale` **(** :ref:`Vector3` scale **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`global_translate` **(** :ref:`Vector3` offset **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`hide` **(** **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_local_transform_notification_enabled` **(** **)** |const| | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_scale_disabled` **(** **)** |const| | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_transform_notification_enabled` **(** **)** |const| | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_visible_in_tree` **(** **)** |const| | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`look_at` **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0), :ref:`bool` use_model_front=false **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`look_at_from_position` **(** :ref:`Vector3` position, :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0), :ref:`bool` use_model_front=false **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`orthonormalize` **(** **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rotate` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rotate_object_local` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rotate_x` **(** :ref:`float` angle **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rotate_y` **(** :ref:`float` angle **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rotate_z` **(** :ref:`float` angle **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scale_object_local` **(** :ref:`Vector3` scale **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_disable_scale` **(** :ref:`bool` disable **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_identity` **(** **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_ignore_transform_notification` **(** :ref:`bool` enabled **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_notify_local_transform` **(** :ref:`bool` enable **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_notify_transform` **(** :ref:`bool` enable **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_subgizmo_selection` **(** :ref:`Node3DGizmo` gizmo, :ref:`int` id, :ref:`Transform3D` transform **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`show` **(** **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`to_global` **(** :ref:`Vector3` local_point **)** |const| | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`to_local` **(** :ref:`Vector3` global_point **)** |const| | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`translate` **(** :ref:`Vector3` offset **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`translate_object_local` **(** :ref:`Vector3` offset **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`update_gizmos` **(** **)** | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -198,7 +200,7 @@ enum **RotationEditMode**: :ref:`RotationEditMode` **ROTATION_EDIT_MODE_EULER** = ``0`` - +The rotation is edited using :ref:`Vector3` Euler angles. .. _class_Node3D_constant_ROTATION_EDIT_MODE_QUATERNION: @@ -206,7 +208,7 @@ enum **RotationEditMode**: :ref:`RotationEditMode` **ROTATION_EDIT_MODE_QUATERNION** = ``1`` - +The rotation is edited using a :ref:`Quaternion`. .. _class_Node3D_constant_ROTATION_EDIT_MODE_BASIS: @@ -214,7 +216,7 @@ enum **RotationEditMode**: :ref:`RotationEditMode` **ROTATION_EDIT_MODE_BASIS** = ``2`` - +The rotation is edited using a :ref:`Basis`. In this mode, :ref:`scale` can't be edited separately. .. rst-class:: classref-section-separator @@ -554,7 +556,7 @@ Defines the visibility range parent for this node and its subtree. The visibilit - void **set_visible** **(** :ref:`bool` value **)** - :ref:`bool` **is_visible** **(** **)** -If ``true``, this node is drawn. The node is only visible if all of its antecedents 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 @@ -739,7 +741,7 @@ Returns whether the node notifies about its global and local transformation chan :ref:`bool` **is_visible_in_tree** **(** **)** |const| -Returns ``true`` if the node is present in the :ref:`SceneTree`, its :ref:`visible` property is ``true`` and all its antecedents are also visible. If any antecedent is hidden, this node will not be visible in the scene tree. +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. .. rst-class:: classref-item-separator @@ -749,9 +751,9 @@ Returns ``true`` if the node is present in the :ref:`SceneTree` .. rst-class:: classref-method -void **look_at** **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** +void **look_at** **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0), :ref:`bool` use_model_front=false **)** -Rotates the node so that the local forward axis (-Z) points toward the ``target`` position. +Rotates the node so that the local forward axis (-Z, :ref:`Vector3.FORWARD`) points toward the ``target`` position. The local up axis (+Y) points as close to the ``up`` vector as possible while staying perpendicular to the local forward axis. The resulting transform is orthogonal, and the scale is preserved. Non-uniform scaling may not work correctly. @@ -759,6 +761,8 @@ The ``target`` position cannot be the same as the node's position, the ``up`` ve Operations take place in global space, which means that the node must be in the scene tree. +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. By default, the -Z axis (camera forward) is treated as forward (implies +X is right). + .. rst-class:: classref-item-separator ---- @@ -767,7 +771,7 @@ Operations take place in global space, which means that the node must be in the .. rst-class:: classref-method -void **look_at_from_position** **(** :ref:`Vector3` position, :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** +void **look_at_from_position** **(** :ref:`Vector3` position, :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0), :ref:`bool` use_model_front=false **)** 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. diff --git a/classes/class_nodepath.rst b/classes/class_nodepath.rst index 8238fd1b696..178935cd346 100644 --- a/classes/class_nodepath.rst +++ b/classes/class_nodepath.rst @@ -10,7 +10,7 @@ NodePath ======== -Pre-parsed scene tree path. +A pre-parsed scene tree path. .. rst-class:: classref-introduction-group @@ -42,6 +42,8 @@ See also :ref:`StringName`, which is a similar concept for gen \ **Note:** In the editor, **NodePath** properties are automatically updated when moving, renaming or deleting a node in the scene tree, but they are never updated at runtime. +\ **Note:** In a boolean context, a **NodePath** will evaluate to ``false`` if it is empty (``NodePath("")``). Otherwise, a **NodePath** will always evaluate to ``true``. + .. rst-class:: classref-introduction-group Tutorials @@ -297,7 +299,7 @@ For example, ``"Path2D/PathFollow2D/Sprite2D"`` has 3 names. :ref:`StringName` **get_subname** **(** :ref:`int` idx **)** |const| -Gets the resource or property name indicated by ``idx`` (0 to :ref:`get_subname_count`). +Gets the resource or property name indicated by ``idx`` (0 to :ref:`get_subname_count` - 1). .. tabs:: diff --git a/classes/class_noise.rst b/classes/class_noise.rst index b74b56833b1..467ed7075cc 100644 --- a/classes/class_noise.rst +++ b/classes/class_noise.rst @@ -35,21 +35,25 @@ Methods .. table:: :widths: auto - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`get_image` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` invert=false, :ref:`bool` in_3d_space=false, :ref:`bool` normalize=true **)** |const| | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_noise_1d` **(** :ref:`float` x **)** |const| | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_noise_2d` **(** :ref:`float` x, :ref:`float` y **)** |const| | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_noise_2dv` **(** :ref:`Vector2` v **)** |const| | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_noise_3d` **(** :ref:`float` x, :ref:`float` y, :ref:`float` z **)** |const| | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_noise_3dv` **(** :ref:`Vector3` v **)** |const| | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`get_seamless_image` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` invert=false, :ref:`bool` in_3d_space=false, :ref:`float` skirt=0.1, :ref:`bool` normalize=true **)** |const| | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`get_image` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` invert=false, :ref:`bool` in_3d_space=false, :ref:`bool` normalize=true **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image[]` | :ref:`get_image_3d` **(** :ref:`int` width, :ref:`int` height, :ref:`int` depth, :ref:`bool` invert=false, :ref:`bool` normalize=true **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_noise_1d` **(** :ref:`float` x **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_noise_2d` **(** :ref:`float` x, :ref:`float` y **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_noise_2dv` **(** :ref:`Vector2` v **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_noise_3d` **(** :ref:`float` x, :ref:`float` y, :ref:`float` z **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_noise_3dv` **(** :ref:`Vector3` v **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`get_seamless_image` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` invert=false, :ref:`bool` in_3d_space=false, :ref:`float` skirt=0.1, :ref:`bool` normalize=true **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image[]` | :ref:`get_seamless_image_3d` **(** :ref:`int` width, :ref:`int` height, :ref:`int` depth, :ref:`bool` invert=false, :ref:`float` skirt=0.1, :ref:`bool` normalize=true **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -66,9 +70,23 @@ Method Descriptions :ref:`Image` **get_image** **(** :ref:`int` width, :ref:`int` height, :ref:`bool` invert=false, :ref:`bool` in_3d_space=false, :ref:`bool` normalize=true **)** |const| -Returns a 2D :ref:`Image` noise image. +Returns an :ref:`Image` containing 2D noise values. -Note: With ``normalize`` set to ``false`` the default implementation expects the noise generator to return values in the range ``-1.0`` to ``1.0``. +\ **Note:** With ``normalize`` set to ``false``, the default implementation expects the noise generator to return values in the range ``-1.0`` to ``1.0``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Noise_method_get_image_3d: + +.. rst-class:: classref-method + +:ref:`Image[]` **get_image_3d** **(** :ref:`int` width, :ref:`int` height, :ref:`int` depth, :ref:`bool` invert=false, :ref:`bool` normalize=true **)** |const| + +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``. .. rst-class:: classref-item-separator @@ -140,9 +158,23 @@ Returns the 3D noise value at the given position. :ref:`Image` **get_seamless_image** **(** :ref:`int` width, :ref:`int` height, :ref:`bool` invert=false, :ref:`bool` in_3d_space=false, :ref:`float` skirt=0.1, :ref:`bool` normalize=true **)** |const| -Returns a seamless 2D :ref:`Image` noise image. +Returns an :ref:`Image` containing seamless 2D noise values. + +\ **Note:** With ``normalize`` set to ``false``, the default implementation expects the noise generator to return values in the range ``-1.0`` to ``1.0``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Noise_method_get_seamless_image_3d: + +.. rst-class:: classref-method + +:ref:`Image[]` **get_seamless_image_3d** **(** :ref:`int` width, :ref:`int` height, :ref:`int` depth, :ref:`bool` invert=false, :ref:`float` skirt=0.1, :ref:`bool` normalize=true **)** |const| + +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``. +\ **Note:** With ``normalize`` set to ``false``, the default implementation expects the noise generator to return values in the range ``-1.0`` to ``1.0``. .. |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_noisetexture2d.rst b/classes/class_noisetexture2d.rst index 46d072fd6fa..96b822d39a4 100644 --- a/classes/class_noisetexture2d.rst +++ b/classes/class_noisetexture2d.rst @@ -19,9 +19,7 @@ A texture filled with noise generated by a :ref:`Noise` object. Description ----------- -Uses :ref:`FastNoiseLite` or other libraries to fill the texture data of your desired size. - -NoiseTexture2D can also generate normalmap textures. +Uses :ref:`FastNoiseLite` or other libraries 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: @@ -140,11 +138,9 @@ A :ref:`Gradient` which is used to map the luminance of each pix - void **set_generate_mipmaps** **(** :ref:`bool` value **)** - :ref:`bool` **is_generating_mipmaps** **(** **)** -Determines whether mipmaps are generated for this texture. - -Enabling this results in less texture aliasing, but the noise texture generation may take longer. +Determines whether mipmaps are generated for this texture. Enabling this results in less texture aliasing in the distance, at the cost of increasing memory usage by roughly 33% and making the noise texture generation take longer. -Requires (anisotropic) mipmap filtering to be enabled for a material to have an effect. +\ **Note:** :ref:`generate_mipmaps` requires mipmap filtering to be enabled on the material using the **NoiseTexture2D** to have an effect. .. rst-class:: classref-item-separator @@ -161,7 +157,7 @@ Requires (anisotropic) mipmap filtering to be enabled for a material to have an - void **set_height** **(** :ref:`int` value **)** - :ref:`int` **get_height** **(** **)** -Height of the generated texture. +Height of the generated texture (in pixels). .. rst-class:: classref-item-separator @@ -252,6 +248,8 @@ If ``true``, a seamless texture is requested from the :ref:`Noise` \ **Note:** Seamless noise textures may take longer to generate and/or can have a lower contrast compared to non-seamless noise depending on the used :ref:`Noise` resource. This is because some implementations use higher dimensions for generating seamless noise. +\ **Note:** The default :ref:`FastNoiseLite` implementation uses the fallback path for seamless generation. If using a :ref:`width` or :ref:`height` lower than the default, you may need to increase :ref:`seamless_blend_skirt` to make seamless blending more effective. + .. rst-class:: classref-item-separator ---- @@ -269,6 +267,8 @@ If ``true``, a seamless texture is requested from the :ref:`Noise` Used for the default/fallback implementation of the seamless texture generation. It determines the distance over which the seams are blended. High values may result in less details and contrast. See :ref:`Noise` for further details. +\ **Note:** If using a :ref:`width` or :ref:`height` lower than the default, you may need to increase :ref:`seamless_blend_skirt` to make seamless blending more effective. + .. rst-class:: classref-item-separator ---- @@ -284,7 +284,7 @@ Used for the default/fallback implementation of the seamless texture generation. - void **set_width** **(** :ref:`int` value **)** - :ref:`int` **get_width** **(** **)** -Width of the generated texture. +Width of the generated texture (in pixels). .. |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_noisetexture3d.rst b/classes/class_noisetexture3d.rst new file mode 100644 index 00000000000..ee6dd16257b --- /dev/null +++ b/classes/class_noisetexture3d.rst @@ -0,0 +1,232 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/noise/doc_classes/NoiseTexture3D.xml. + +.. _class_NoiseTexture3D: + +NoiseTexture3D +============== + +**Inherits:** :ref:`Texture3D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +A texture filled with noise generated by a :ref:`Noise` object. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Uses :ref:`FastNoiseLite` or other libraries 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: + +:: + + var texture = NoiseTexture3D.new() + texture.noise = FastNoiseLite.new() + await texture.changed + var data = texture.get_data() + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------------+---------------------------------------------------------------------------------+-----------+ + | :ref:`Gradient` | :ref:`color_ramp` | | + +---------------------------------+---------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`depth` | ``64`` | + +---------------------------------+---------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`height` | ``64`` | + +---------------------------------+---------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`invert` | ``false`` | + +---------------------------------+---------------------------------------------------------------------------------+-----------+ + | :ref:`Noise` | :ref:`noise` | | + +---------------------------------+---------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`normalize` | ``true`` | + +---------------------------------+---------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`seamless` | ``false`` | + +---------------------------------+---------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`seamless_blend_skirt` | ``0.1`` | + +---------------------------------+---------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`width` | ``64`` | + +---------------------------------+---------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_NoiseTexture3D_property_color_ramp: + +.. rst-class:: classref-property + +:ref:`Gradient` **color_ramp** + +.. rst-class:: classref-property-setget + +- void **set_color_ramp** **(** :ref:`Gradient` value **)** +- :ref:`Gradient` **get_color_ramp** **(** **)** + +A :ref:`Gradient` which is used to map the luminance of each pixel to a color value. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NoiseTexture3D_property_depth: + +.. rst-class:: classref-property + +:ref:`int` **depth** = ``64`` + +.. rst-class:: classref-property-setget + +- void **set_depth** **(** :ref:`int` value **)** +- :ref:`int` **get_depth** **(** **)** + +Depth of the generated texture (in pixels). + +.. rst-class:: classref-item-separator + +---- + +.. _class_NoiseTexture3D_property_height: + +.. rst-class:: classref-property + +:ref:`int` **height** = ``64`` + +.. rst-class:: classref-property-setget + +- void **set_height** **(** :ref:`int` value **)** +- :ref:`int` **get_height** **(** **)** + +Height of the generated texture (in pixels). + +.. rst-class:: classref-item-separator + +---- + +.. _class_NoiseTexture3D_property_invert: + +.. rst-class:: classref-property + +:ref:`bool` **invert** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_invert** **(** :ref:`bool` value **)** +- :ref:`bool` **get_invert** **(** **)** + +If ``true``, inverts the noise texture. White becomes black, black becomes white. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NoiseTexture3D_property_noise: + +.. rst-class:: classref-property + +:ref:`Noise` **noise** + +.. rst-class:: classref-property-setget + +- void **set_noise** **(** :ref:`Noise` value **)** +- :ref:`Noise` **get_noise** **(** **)** + +The instance of the :ref:`Noise` object. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NoiseTexture3D_property_normalize: + +.. rst-class:: classref-property + +:ref:`bool` **normalize** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_normalize** **(** :ref:`bool` value **)** +- :ref:`bool` **is_normalized** **(** **)** + +If ``true``, the noise image coming from the noise generator is normalized to the range ``0.0`` to ``1.0``. + +Turning normalization off can affect the contrast and allows you to generate non repeating tileable noise textures. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NoiseTexture3D_property_seamless: + +.. rst-class:: classref-property + +:ref:`bool` **seamless** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_seamless** **(** :ref:`bool` value **)** +- :ref:`bool` **get_seamless** **(** **)** + +If ``true``, a seamless texture is requested from the :ref:`Noise` resource. + +\ **Note:** Seamless noise textures may take longer to generate and/or can have a lower contrast compared to non-seamless noise depending on the used :ref:`Noise` resource. This is because some implementations use higher dimensions for generating seamless noise. + +\ **Note:** The default :ref:`FastNoiseLite` implementation uses the fallback path for seamless generation. If using a :ref:`width`, :ref:`height` or :ref:`depth` lower than the default, you may need to increase :ref:`seamless_blend_skirt` to make seamless blending more effective. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NoiseTexture3D_property_seamless_blend_skirt: + +.. rst-class:: classref-property + +:ref:`float` **seamless_blend_skirt** = ``0.1`` + +.. rst-class:: classref-property-setget + +- void **set_seamless_blend_skirt** **(** :ref:`float` value **)** +- :ref:`float` **get_seamless_blend_skirt** **(** **)** + +Used for the default/fallback implementation of the seamless texture generation. It determines the distance over which the seams are blended. High values may result in less details and contrast. See :ref:`Noise` for further details. + +\ **Note:** If using a :ref:`width`, :ref:`height` or :ref:`depth` lower than the default, you may need to increase :ref:`seamless_blend_skirt` to make seamless blending more effective. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NoiseTexture3D_property_width: + +.. rst-class:: classref-property + +:ref:`int` **width** = ``64`` + +.. rst-class:: classref-property-setget + +- void **set_width** **(** :ref:`int` value **)** +- :ref:`int` **get_width** **(** **)** + +Width of the generated texture (in pixels). + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_object.rst b/classes/class_object.rst index 54ff310e4ff..da02dd9bb48 100644 --- a/classes/class_object.rst +++ b/classes/class_object.rst @@ -10,7 +10,7 @@ Object ====== -**Inherited By:** :ref:`AudioServer`, :ref:`CameraServer`, :ref:`ClassDB`, :ref:`DisplayServer`, :ref:`EditorFileSystemDirectory`, :ref:`EditorPaths`, :ref:`EditorSelection`, :ref:`EditorUndoRedoManager`, :ref:`EditorVCSInterface`, :ref:`Engine`, :ref:`EngineDebugger`, :ref:`GDExtensionManager`, :ref:`Geometry2D`, :ref:`Geometry3D`, :ref:`GodotSharp`, :ref:`Input`, :ref:`InputMap`, :ref:`IP`, :ref:`JavaClassWrapper`, :ref:`JavaScriptBridge`, :ref:`JNISingleton`, :ref:`JSONRPC`, :ref:`MainLoop`, :ref:`Marshalls`, :ref:`MovieWriter`, :ref:`NavigationMeshGenerator`, :ref:`NavigationServer2D`, :ref:`NavigationServer3D`, :ref:`Node`, :ref:`OS`, :ref:`Performance`, :ref:`PhysicsDirectBodyState2D`, :ref:`PhysicsDirectBodyState3D`, :ref:`PhysicsDirectSpaceState2D`, :ref:`PhysicsDirectSpaceState3D`, :ref:`PhysicsServer2D`, :ref:`PhysicsServer2DManager`, :ref:`PhysicsServer3D`, :ref:`PhysicsServer3DManager`, :ref:`PhysicsServer3DRenderingServerHandler`, :ref:`ProjectSettings`, :ref:`RefCounted`, :ref:`RenderingDevice`, :ref:`RenderingServer`, :ref:`ResourceLoader`, :ref:`ResourceSaver`, :ref:`ResourceUID`, :ref:`ScriptLanguage`, :ref:`TextServerManager`, :ref:`ThemeDB`, :ref:`TileData`, :ref:`Time`, :ref:`TranslationServer`, :ref:`TreeItem`, :ref:`UndoRedo`, :ref:`WorkerThreadPool`, :ref:`XRServer` +**Inherited By:** :ref:`AudioServer`, :ref:`CameraServer`, :ref:`ClassDB`, :ref:`DisplayServer`, :ref:`EditorFileSystemDirectory`, :ref:`EditorInterface`, :ref:`EditorPaths`, :ref:`EditorSelection`, :ref:`EditorUndoRedoManager`, :ref:`EditorVCSInterface`, :ref:`Engine`, :ref:`EngineDebugger`, :ref:`GDExtensionManager`, :ref:`Geometry2D`, :ref:`Geometry3D`, :ref:`GodotSharp`, :ref:`Input`, :ref:`InputMap`, :ref:`IP`, :ref:`JavaClassWrapper`, :ref:`JavaScriptBridge`, :ref:`JNISingleton`, :ref:`JSONRPC`, :ref:`MainLoop`, :ref:`Marshalls`, :ref:`MovieWriter`, :ref:`NavigationMeshGenerator`, :ref:`NavigationServer2D`, :ref:`NavigationServer3D`, :ref:`Node`, :ref:`OS`, :ref:`Performance`, :ref:`PhysicsDirectBodyState2D`, :ref:`PhysicsDirectBodyState3D`, :ref:`PhysicsDirectSpaceState2D`, :ref:`PhysicsDirectSpaceState3D`, :ref:`PhysicsServer2D`, :ref:`PhysicsServer2DManager`, :ref:`PhysicsServer3D`, :ref:`PhysicsServer3DManager`, :ref:`PhysicsServer3DRenderingServerHandler`, :ref:`ProjectSettings`, :ref:`RefCounted`, :ref:`RenderingDevice`, :ref:`RenderingServer`, :ref:`ResourceLoader`, :ref:`ResourceSaver`, :ref:`ResourceUID`, :ref:`ScriptLanguage`, :ref:`TextServerManager`, :ref:`ThemeDB`, :ref:`TileData`, :ref:`Time`, :ref:`TranslationServer`, :ref:`TreeItem`, :ref:`UndoRedo`, :ref:`WorkerThreadPool`, :ref:`XRServer` Base class for all other classes in the engine. @@ -68,111 +68,113 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_get` **(** :ref:`StringName` property **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`_get_property_list` **(** **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_init` **(** **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_notification` **(** :ref:`int` what **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_property_can_revert` **(** :ref:`StringName` property **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_property_get_revert` **(** :ref:`StringName` property **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_set` **(** :ref:`StringName` property, :ref:`Variant` value **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_to_string` **(** **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_user_signal` **(** :ref:`String` signal, :ref:`Array` arguments=[] **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`call` **(** :ref:`StringName` method, ... **)** |vararg| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`call_deferred` **(** :ref:`StringName` method, ... **)** |vararg| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`callv` **(** :ref:`StringName` method, :ref:`Array` arg_array **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`can_translate_messages` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`connect` **(** :ref:`StringName` signal, :ref:`Callable` callable, :ref:`int` flags=0 **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`disconnect` **(** :ref:`StringName` signal, :ref:`Callable` callable **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`emit_signal` **(** :ref:`StringName` signal, ... **)** |vararg| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`free` **(** **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get` **(** :ref:`StringName` property **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_class` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`get_incoming_connections` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_indexed` **(** :ref:`NodePath` property_path **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_instance_id` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_meta` **(** :ref:`StringName` name, :ref:`Variant` default=null **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_meta_list` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`get_method_list` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`get_property_list` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_script` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`get_signal_connection_list` **(** :ref:`StringName` signal **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`get_signal_list` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_meta` **(** :ref:`StringName` name **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_method` **(** :ref:`StringName` method **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_signal` **(** :ref:`StringName` signal **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_user_signal` **(** :ref:`StringName` signal **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_blocking_signals` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_class` **(** :ref:`String` class **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_connected` **(** :ref:`StringName` signal, :ref:`Callable` callable **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_queued_for_deletion` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`notification` **(** :ref:`int` what, :ref:`bool` reversed=false **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`notify_property_list_changed` **(** **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`property_can_revert` **(** :ref:`StringName` property **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`property_get_revert` **(** :ref:`StringName` property **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_meta` **(** :ref:`StringName` name **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set` **(** :ref:`StringName` property, :ref:`Variant` value **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_block_signals` **(** :ref:`bool` enable **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_deferred` **(** :ref:`StringName` property, :ref:`Variant` value **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_indexed` **(** :ref:`NodePath` property_path, :ref:`Variant` value **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_message_translation` **(** :ref:`bool` enable **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_meta` **(** :ref:`StringName` name, :ref:`Variant` value **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_script` **(** :ref:`Variant` script **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`to_string` **(** **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`tr` **(** :ref:`StringName` message, :ref:`StringName` context="" **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`tr_n` **(** :ref:`StringName` message, :ref:`StringName` plural_message, :ref:`int` n, :ref:`StringName` context="" **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get` **(** :ref:`StringName` property **)** |virtual| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_property_list` **(** **)** |virtual| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_init` **(** **)** |virtual| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_notification` **(** :ref:`int` what **)** |virtual| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_property_can_revert` **(** :ref:`StringName` property **)** |virtual| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_property_get_revert` **(** :ref:`StringName` property **)** |virtual| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_set` **(** :ref:`StringName` property, :ref:`Variant` value **)** |virtual| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_to_string` **(** **)** |virtual| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_user_signal` **(** :ref:`String` signal, :ref:`Array` arguments=[] **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`call` **(** :ref:`StringName` method, ... **)** |vararg| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`call_deferred` **(** :ref:`StringName` method, ... **)** |vararg| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`callv` **(** :ref:`StringName` method, :ref:`Array` arg_array **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`can_translate_messages` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`cancel_free` **(** **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`connect` **(** :ref:`StringName` signal, :ref:`Callable` callable, :ref:`int` flags=0 **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`disconnect` **(** :ref:`StringName` signal, :ref:`Callable` callable **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`emit_signal` **(** :ref:`StringName` signal, ... **)** |vararg| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`free` **(** **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get` **(** :ref:`StringName` property **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_class` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`get_incoming_connections` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_indexed` **(** :ref:`NodePath` property_path **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_instance_id` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_meta` **(** :ref:`StringName` name, :ref:`Variant` default=null **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName[]` | :ref:`get_meta_list` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`get_method_list` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`get_property_list` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_script` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`get_signal_connection_list` **(** :ref:`StringName` signal **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`get_signal_list` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_meta` **(** :ref:`StringName` name **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_method` **(** :ref:`StringName` method **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_signal` **(** :ref:`StringName` signal **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_user_signal` **(** :ref:`StringName` signal **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_blocking_signals` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_class` **(** :ref:`String` class **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_connected` **(** :ref:`StringName` signal, :ref:`Callable` callable **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_queued_for_deletion` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`notification` **(** :ref:`int` what, :ref:`bool` reversed=false **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`notify_property_list_changed` **(** **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`property_can_revert` **(** :ref:`StringName` property **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`property_get_revert` **(** :ref:`StringName` property **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_meta` **(** :ref:`StringName` name **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set` **(** :ref:`StringName` property, :ref:`Variant` value **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_block_signals` **(** :ref:`bool` enable **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_deferred` **(** :ref:`StringName` property, :ref:`Variant` value **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_indexed` **(** :ref:`NodePath` property_path, :ref:`Variant` value **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_message_translation` **(** :ref:`bool` enable **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_meta` **(** :ref:`StringName` name, :ref:`Variant` value **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_script` **(** :ref:`Variant` script **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`to_string` **(** **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`tr` **(** :ref:`StringName` message, :ref:`StringName` context="" **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`tr_n` **(** :ref:`StringName` message, :ref:`StringName` plural_message, :ref:`int` n, :ref:`StringName` context="" **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -472,7 +474,7 @@ Called when the object receives a notification, which can be identified in ``wha .. code-tab:: csharp - public override void _Notification(long what) + public override void _Notification(int what) { if (what == NotificationPredelete) { @@ -731,6 +733,18 @@ Returns ``true`` if the object is allowed to translate messages with :ref:`tr`, this object will reject being freed and will remain allocated. This is mostly an internal function used for error handling to avoid the user from freeing objects when they are not intended to. + +.. rst-class:: classref-item-separator + +---- + .. _class_Object_method_connect: .. rst-class:: classref-method @@ -1068,7 +1082,9 @@ 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:** Metadata that has a ``name`` starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the Inspector dock and should not be edited. +\ **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. .. rst-class:: classref-item-separator @@ -1078,7 +1094,7 @@ Returns the object's metadata value for the given entry ``name``. If the entry d .. rst-class:: classref-method -:ref:`PackedStringArray` **get_meta_list** **(** **)** |const| +:ref:`StringName[]` **get_meta_list** **(** **)** |const| Returns the object's metadata entry names as a :ref:`PackedStringArray`. @@ -1188,6 +1204,8 @@ Returns the list of existing signals as an :ref:`Array` of dictiona 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:** 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. .. rst-class:: classref-item-separator @@ -1200,7 +1218,7 @@ Returns ``true`` if a metadata entry is found with the given ``name``. See also :ref:`bool` **has_method** **(** :ref:`StringName` method **)** |const| -Returns ``true`` if the the given ``method`` name exists in the object. +Returns ``true`` if the given ``method`` name exists in the object. \ **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. @@ -1394,7 +1412,9 @@ void **remove_meta** **(** :ref:`StringName` name **)** Removes the given entry ``name`` from the object's metadata. See also :ref:`has_meta`, :ref:`get_meta` and :ref:`set_meta`. -\ **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. +\ **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. .. rst-class:: classref-item-separator @@ -1539,7 +1559,9 @@ Adds or changes the entry ``name`` inside the object's metadata. The metadata `` 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:** Metadata that has a ``name`` starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the Inspector dock and should not be edited. +\ **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. .. rst-class:: classref-item-separator diff --git a/classes/class_openxraction.rst b/classes/class_openxraction.rst index 88caa6fa895..54ad62752c4 100644 --- a/classes/class_openxraction.rst +++ b/classes/class_openxraction.rst @@ -80,7 +80,7 @@ This action provides a float value between ``0.0`` and ``1.0`` for any analog in :ref:`ActionType` **OPENXR_ACTION_VECTOR2** = ``2`` -This action provides a vector2 value and can be bound to embedded trackpads and joysticks +This action provides a :ref:`Vector2` value and can be bound to embedded trackpads and joysticks. .. _class_OpenXRAction_constant_OPENXR_ACTION_POSE: diff --git a/classes/class_openxrinterface.rst b/classes/class_openxrinterface.rst index d8baf219065..b8178cf599d 100644 --- a/classes/class_openxrinterface.rst +++ b/classes/class_openxrinterface.rst @@ -38,9 +38,11 @@ Properties .. table:: :widths: auto - +---------------------------+----------------------------------------------------------------------------------+---------+ - | :ref:`float` | :ref:`display_refresh_rate` | ``0.0`` | - +---------------------------+----------------------------------------------------------------------------------+---------+ + +---------------------------+----------------------------------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`display_refresh_rate` | ``0.0`` | + +---------------------------+----------------------------------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`render_target_size_multiplier` | ``1.0`` | + +---------------------------+----------------------------------------------------------------------------------------------------+---------+ .. rst-class:: classref-reftable-group @@ -147,6 +149,23 @@ Property Descriptions The display refresh rate for the current HMD. Only functional if this feature is supported by the OpenXR runtime and after the interface has been initialized. +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_property_render_target_size_multiplier: + +.. rst-class:: classref-property + +:ref:`float` **render_target_size_multiplier** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_render_target_size_multiplier** **(** :ref:`float` value **)** +- :ref:`float` **get_render_target_size_multiplier** **(** **)** + +The render size multiplier for the current HMD. Must be set before the interface has been initialized. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_optimizedtranslation.rst b/classes/class_optimizedtranslation.rst index 9d7b87ad5a9..2de54cabe47 100644 --- a/classes/class_optimizedtranslation.rst +++ b/classes/class_optimizedtranslation.rst @@ -12,14 +12,14 @@ OptimizedTranslation **Inherits:** :ref:`Translation` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Optimized translation. +An optimized translation, used by default for CSV Translations. .. rst-class:: classref-introduction-group Description ----------- -Optimized translation. Uses real-time compressed translations, which results in very small dictionaries. +An optimized translation, used by default for CSV Translations. Uses real-time compressed translations, which results in very small dictionaries. .. rst-class:: classref-reftable-group diff --git a/classes/class_optionbutton.rst b/classes/class_optionbutton.rst index 98804436afa..8dd644c647f 100644 --- a/classes/class_optionbutton.rst +++ b/classes/class_optionbutton.rst @@ -12,19 +12,25 @@ OptionButton **Inherits:** :ref:`Button` **<** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Button control that provides selectable options when pressed. +A button that brings up a dropdown with selectable options when pressed. .. rst-class:: classref-introduction-group Description ----------- -OptionButton is a type button that provides a selectable list of items when pressed. The item selected becomes the "current" item and is displayed as the button text. +**OptionButton** is a type of button that brings up a dropdown with selectable items when pressed. The item selected becomes the "current" item and is displayed as the button text. See also :ref:`BaseButton` which contains common properties and methods associated with this node. \ **Note:** Properties :ref:`Button.text` and :ref:`Button.icon` are automatically set based on the selected item. They shouldn't be changed manually. +\ **Note:** The ID values used for items are limited to 32 bits, not full 64 bits of :ref:`int`. This has a range of ``-2^32`` to ``2^32 - 1``, i.e. ``-2147483648`` to ``2147483647``. + +\ **Note:** The ID values used for items are 32-bit, unlike :ref:`int` which is always 64-bit. They go from ``-2147483648`` to ``2147483647``. + +\ **Note:** The :ref:`Button.text` and :ref:`Button.icon` properties are set automatically based on the selected item. They shouldn't be changed manually. + .. rst-class:: classref-reftable-group Properties @@ -38,6 +44,8 @@ Properties +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`HorizontalAlignment` | alignment | ``0`` (overrides :ref:`Button`) | +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`allow_reselect` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`fit_to_longest_item` | ``true`` | +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`int` | :ref:`item_count` | ``0`` | @@ -194,6 +202,8 @@ Emitted when the user navigates to an item using the :ref:`ProjectSettings.input Emitted when the current item has been changed by the user. The index of the item selected is passed as argument. +\ :ref:`allow_reselect` must be enabled to reselect an item. + .. rst-class:: classref-section-separator ---- @@ -203,6 +213,23 @@ Emitted when the current item has been changed by the user. The index of the ite Property Descriptions --------------------- +.. _class_OptionButton_property_allow_reselect: + +.. rst-class:: classref-property + +:ref:`bool` **allow_reselect** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_allow_reselect** **(** :ref:`bool` value **)** +- :ref:`bool` **get_allow_reselect** **(** **)** + +If ``true``, the currently selected item can be selected again. + +.. rst-class:: classref-item-separator + +---- + .. _class_OptionButton_property_fit_to_longest_item: .. rst-class:: classref-property diff --git a/classes/class_os.rst b/classes/class_os.rst index e22b276da04..b65d96a6aee 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -12,14 +12,14 @@ OS **Inherits:** :ref:`Object` -Operating System functions. +Provides access to common operating system functionalities. .. rst-class:: classref-introduction-group Description ----------- -Operating System functions. **OS** wraps the most common functionality to communicate with the host operating system, such as the clipboard, video driver, delays, environment variables, execution of binaries, command line, etc. +This class wraps the most common functionalities for communicating with the host operating system, such as the video driver, delays, environment variables, execution of binaries, command line, etc. \ **Note:** In Godot 4, **OS** functions related to window management were moved to the :ref:`DisplayServer` singleton. @@ -38,6 +38,8 @@ Properties .. table:: :widths: auto + +-------------------------+---------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`delta_smoothing` | ``true`` | +-------------------------+---------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`low_processor_usage_mode` | ``false`` | +-------------------------+---------------------------------------------------------------------------------------------------+-----------+ @@ -99,6 +101,8 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_main_thread_id` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_memory_info` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_model_name` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_name` **(** **)** |const| | @@ -171,6 +175,8 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`shell_open` **(** :ref:`String` uri **)** | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`shell_show_in_file_manager` **(** :ref:`String` file_or_dir_path, :ref:`bool` open_folder=true **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`unset_environment` **(** :ref:`String` variable **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -288,6 +294,23 @@ Ringtones directory path. Property Descriptions --------------------- +.. _class_OS_property_delta_smoothing: + +.. rst-class:: classref-property + +:ref:`bool` **delta_smoothing** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_delta_smoothing** **(** :ref:`bool` value **)** +- :ref:`bool` **is_delta_smoothing_enabled** **(** **)** + +If ``true``, the engine filters the time delta measured between each frame, and attempts to compensate for random variation. This will only operate on systems where V-Sync is active. + +.. rst-class:: classref-item-separator + +---- + .. _class_OS_property_low_processor_usage_mode: .. rst-class:: classref-property @@ -456,7 +479,7 @@ Delays execution of the current thread by ``usec`` microseconds. ``usec`` must b :ref:`int` **execute** **(** :ref:`String` path, :ref:`PackedStringArray` arguments, :ref:`Array` output=[], :ref:`bool` read_stderr=false, :ref:`bool` open_console=false **)** -Executes a command. The file specified in ``path`` must exist and be executable. Platform path resolution will be used. The ``arguments`` are used in the given order and separated by a space. If an ``output`` :ref:`Array` is provided, the complete shell output of the process will be appended as a single :ref:`String` element in ``output``. If ``read_stderr`` is ``true``, the output to the standard error stream will be included too. +Executes a command. The file specified in ``path`` must exist and be executable. Platform path resolution will be used. The ``arguments`` are used in the given order, separated by spaces, and wrapped in quotes. If an ``output`` :ref:`Array` is provided, the complete shell output of the process will be appended as a single :ref:`String` element in ``output``. If ``read_stderr`` is ``true``, the output to the standard error stream will be included too. On Windows, if ``open_console`` is ``true`` and the process is a console app, a new terminal window will be opened. This is ignored on other platforms. @@ -713,7 +736,7 @@ Returns the path to the current engine executable. With this function, you can get the list of dangerous permissions that have been granted to the Android application. -\ **Note:** This method is implemented on Android. +\ **Note:** This method is implemented only on Android. .. rst-class:: classref-item-separator @@ -783,6 +806,26 @@ Returns the ID of the main thread. See :ref:`get_thread_caller_id` **get_memory_info** **(** **)** |const| + +Returns the :ref:`Dictionary` with the following keys: + +\ ``"physical"`` - total amount of usable physical memory, in bytes or ``-1`` if unknown. This value can be slightly less than the actual physical memory amount, since it does not include memory reserved by kernel and devices. + +\ ``"free"`` - amount of physical memory, that can be immediately allocated without disk access or other costly operation, in bytes or ``-1`` if unknown. The process might be able to allocate more physical memory, but such allocation will require moving inactive pages to disk and can take some time. + +\ ``"available"`` - amount of memory, that can be allocated without extending the swap file(s), in bytes or ``-1`` if unknown. This value include both physical memory and swap. + +\ ``"stack"`` - size of the current thread stack, in bytes or ``-1`` if unknown. + +.. rst-class:: classref-item-separator + +---- + .. _class_OS_method_get_model_name: .. rst-class:: classref-method @@ -995,7 +1038,7 @@ Returns an array of the system substitute font file paths, which are similar to The following aliases can be used to request default fonts: "sans-serif", "serif", "monospace", "cursive", and "fantasy". -\ **Note:** Depending on OS, it's not guaranteed that any of the returned fonts is suitable for rendering specified text. Fonts should be loaded and checked in the order they are returned, and the first suitable one used. +\ **Note:** Depending on OS, it's not guaranteed that any of the returned fonts will be suitable for rendering specified text. Fonts should be loaded and checked in the order they are returned, and the first suitable one used. \ **Note:** Returned fonts might have different style if the requested style is not available or belong to a different font family. @@ -1105,7 +1148,7 @@ For Android, the SDK version and the incremental build number are returned. If i :ref:`PackedStringArray` **get_video_adapter_driver_info** **(** **)** |const| -Returns the video adapter driver name and version for the user's currently active graphics card. +Returns the video adapter driver name and version for the user's currently active graphics card. See also :ref:`RenderingServer.get_video_adapter_api_version`. The first element holds the driver name, such as ``nvidia``, ``amdgpu``, etc. @@ -1141,6 +1184,8 @@ Returns ``true`` if the feature for the given feature tag is supported in the cu \ **Note:** Tag names are case-sensitive. +\ **Note:** On the web platform, one of the following additional tags is defined to indicate host platform: ``web_android``, ``web_ios``, ``web_linuxbsd``, ``web_macos``, or ``web_windows``. + .. rst-class:: classref-item-separator ---- @@ -1320,7 +1365,7 @@ At the moment this function is only used by ``AudioDriverOpenSL`` to request per With this function, you can request dangerous permissions since normal permissions are automatically granted at install time in Android applications. -\ **Note:** This method is implemented on Android. +\ **Note:** This method is implemented only on Android. .. rst-class:: classref-item-separator @@ -1398,12 +1443,32 @@ Requests the OS to open a resource with the most appropriate program. For exampl Use :ref:`ProjectSettings.globalize_path` to convert a ``res://`` or ``user://`` 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:** This method is implemented on Android, iOS, Web, Linux, macOS and Windows. .. rst-class:: classref-item-separator ---- +.. _class_OS_method_shell_show_in_file_manager: + +.. rst-class:: classref-method + +:ref:`Error` **shell_show_in_file_manager** **(** :ref:`String` file_or_dir_path, :ref:`bool` open_folder=true **)** + +Requests the OS to open the file manager, then navigate to the given ``file_or_dir_path`` and select the target file or folder. + +If ``file_or_dir_path`` is a valid directory path, and ``open_folder`` is ``true``, the method will open the file manager and enter the target folder without selecting anything. + +Use :ref:`ProjectSettings.globalize_path` to convert a ``res://`` or ``user://`` path into a system path for use with this method. + +\ **Note:** Currently this method is only implemented on Windows. On other platforms, it will fallback to :ref:`shell_open` with a directory path for ``file_or_dir_path``. + +.. rst-class:: classref-item-separator + +---- + .. _class_OS_method_unset_environment: .. rst-class:: classref-method diff --git a/classes/class_packedbytearray.rst b/classes/class_packedbytearray.rst index 003c260869d..f616b62c826 100644 --- a/classes/class_packedbytearray.rst +++ b/classes/class_packedbytearray.rst @@ -64,13 +64,15 @@ Methods +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`decode_half` **(** :ref:`int` byte_offset **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`decode_s8` **(** :ref:`int` byte_offset **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`decode_s16` **(** :ref:`int` byte_offset **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`decode_s32` **(** :ref:`int` byte_offset **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`decode_s64` **(** :ref:`int` byte_offset **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`decode_s8` **(** :ref:`int` byte_offset **)** |const| | + | :ref:`int` | :ref:`decode_u8` **(** :ref:`int` byte_offset **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`decode_u16` **(** :ref:`int` byte_offset **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -78,8 +80,6 @@ Methods +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`decode_u64` **(** :ref:`int` byte_offset **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`decode_u8` **(** :ref:`int` byte_offset **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`decode_var` **(** :ref:`int` byte_offset, :ref:`bool` allow_objects=false **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`decode_var_size` **(** :ref:`int` byte_offset, :ref:`bool` allow_objects=false **)** |const| | @@ -96,13 +96,15 @@ Methods +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`encode_half` **(** :ref:`int` byte_offset, :ref:`float` value **)** | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`encode_s8` **(** :ref:`int` byte_offset, :ref:`int` value **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`encode_s16` **(** :ref:`int` byte_offset, :ref:`int` value **)** | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`encode_s32` **(** :ref:`int` byte_offset, :ref:`int` value **)** | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`encode_s64` **(** :ref:`int` byte_offset, :ref:`int` value **)** | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`encode_s8` **(** :ref:`int` byte_offset, :ref:`int` value **)** | + | void | :ref:`encode_u8` **(** :ref:`int` byte_offset, :ref:`int` value **)** | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`encode_u16` **(** :ref:`int` byte_offset, :ref:`int` value **)** | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -110,8 +112,6 @@ Methods +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`encode_u64` **(** :ref:`int` byte_offset, :ref:`int` value **)** | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`encode_u8` **(** :ref:`int` byte_offset, :ref:`int` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`encode_var` **(** :ref:`int` byte_offset, :ref:`Variant` value, :ref:`bool` allow_objects=false **)** | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`fill` **(** :ref:`int` value **)** | @@ -120,11 +120,13 @@ Methods +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_string_from_ascii` **(** **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_string_from_utf8` **(** **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_string_from_utf16` **(** **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_string_from_utf32` **(** **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_string_from_utf8` **(** **)** |const| | + | :ref:`String` | :ref:`get_string_from_wchar` **(** **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has` **(** :ref:`int` value **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -337,6 +339,18 @@ Decodes a 16-bit floating point number from the bytes starting at ``byte_offset` ---- +.. _class_PackedByteArray_method_decode_s8: + +.. rst-class:: classref-method + +:ref:`int` **decode_s8** **(** :ref:`int` byte_offset **)** |const| + +Decodes a 8-bit signed integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded. + +.. rst-class:: classref-item-separator + +---- + .. _class_PackedByteArray_method_decode_s16: .. rst-class:: classref-method @@ -373,13 +387,13 @@ Decodes a 64-bit signed integer number from the bytes starting at ``byte_offset` ---- -.. _class_PackedByteArray_method_decode_s8: +.. _class_PackedByteArray_method_decode_u8: .. rst-class:: classref-method -:ref:`int` **decode_s8** **(** :ref:`int` byte_offset **)** |const| +:ref:`int` **decode_u8** **(** :ref:`int` byte_offset **)** |const| -Decodes a 8-bit signed integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded. +Decodes a 8-bit unsigned integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded. .. rst-class:: classref-item-separator @@ -421,18 +435,6 @@ Decodes a 64-bit unsigned integer number from the bytes starting at ``byte_offse ---- -.. _class_PackedByteArray_method_decode_u8: - -.. rst-class:: classref-method - -:ref:`int` **decode_u8** **(** :ref:`int` byte_offset **)** |const| - -Decodes a 8-bit unsigned integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded. - -.. rst-class:: classref-item-separator - ----- - .. _class_PackedByteArray_method_decode_var: .. rst-class:: classref-method @@ -475,7 +477,7 @@ Returns a new **PackedByteArray** with the data decompressed. Set ``buffer_size` :ref:`PackedByteArray` **decompress_dynamic** **(** :ref:`int` max_output_size, :ref:`int` compression_mode=0 **)** |const| -Returns a new **PackedByteArray** with the data decompressed. Set the compression mode using one of :ref:`CompressionMode`'s constants. **This method only accepts gzip and deflate compression modes.**\ +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 ``decompress``, as it may have to re-allocate its output buffer multiple times while decompressing, whereas ``decompress`` knows it's output buffer size from the beginning. @@ -533,6 +535,18 @@ Encodes a 16-bit floating point number as bytes at the index of ``byte_offset`` ---- +.. _class_PackedByteArray_method_encode_s8: + +.. rst-class:: classref-method + +void **encode_s8** **(** :ref:`int` byte_offset, :ref:`int` value **)** + +Encodes a 8-bit signed integer number (signed byte) at the index of ``byte_offset`` bytes. The array must have at least 1 byte of space, starting at the offset. + +.. rst-class:: classref-item-separator + +---- + .. _class_PackedByteArray_method_encode_s16: .. rst-class:: classref-method @@ -569,13 +583,13 @@ Encodes a 64-bit signed integer number as bytes at the index of ``byte_offset`` ---- -.. _class_PackedByteArray_method_encode_s8: +.. _class_PackedByteArray_method_encode_u8: .. rst-class:: classref-method -void **encode_s8** **(** :ref:`int` byte_offset, :ref:`int` value **)** +void **encode_u8** **(** :ref:`int` byte_offset, :ref:`int` value **)** -Encodes a 8-bit signed integer number (signed byte) at the index of ``byte_offset`` bytes. The array must have at least 1 byte of space, starting at the offset. +Encodes a 8-bit unsigned integer number (byte) at the index of ``byte_offset`` bytes. The array must have at least 1 byte of space, starting at the offset. .. rst-class:: classref-item-separator @@ -617,18 +631,6 @@ Encodes a 64-bit unsigned integer number as bytes at the index of ``byte_offset` ---- -.. _class_PackedByteArray_method_encode_u8: - -.. rst-class:: classref-method - -void **encode_u8** **(** :ref:`int` byte_offset, :ref:`int` value **)** - -Encodes a 8-bit unsigned integer number (byte) at the index of ``byte_offset`` bytes. The array must have at least 1 byte of space, starting at the offset. - -.. rst-class:: classref-item-separator - ----- - .. _class_PackedByteArray_method_encode_var: .. rst-class:: classref-method @@ -677,6 +679,18 @@ Converts ASCII/Latin-1 encoded array to :ref:`String`. Fast altern ---- +.. _class_PackedByteArray_method_get_string_from_utf8: + +.. rst-class:: classref-method + +:ref:`String` **get_string_from_utf8** **(** **)** |const| + +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. + +.. rst-class:: classref-item-separator + +---- + .. _class_PackedByteArray_method_get_string_from_utf16: .. rst-class:: classref-method @@ -701,13 +715,13 @@ Converts UTF-32 encoded array to :ref:`String`. System endianness ---- -.. _class_PackedByteArray_method_get_string_from_utf8: +.. _class_PackedByteArray_method_get_string_from_wchar: .. rst-class:: classref-method -:ref:`String` **get_string_from_utf8** **(** **)** |const| +:ref:`String` **get_string_from_wchar** **(** **)** |const| -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. +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. .. rst-class:: classref-item-separator diff --git a/classes/class_packeddatacontainer.rst b/classes/class_packeddatacontainer.rst index c147cf73d38..386b78932ea 100644 --- a/classes/class_packeddatacontainer.rst +++ b/classes/class_packeddatacontainer.rst @@ -12,21 +12,36 @@ PackedDataContainer **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Efficiently packs and serializes :ref:`Array` or :ref:`Dictionary`. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group -.. rst-class:: classref-reftable-group +Description +----------- -Properties ----------- +**PackedDataContainer** can be used to efficiently store data from untyped containers. The data is packed into raw bytes and can be saved to file. Only :ref:`Array` and :ref:`Dictionary` can be stored this way. -.. table:: - :widths: auto +You can retrieve the data by iterating on the container, which will work as if iterating on the packed data itself. If the packed container is a :ref:`Dictionary`, the data can be retrieved by key names (:ref:`String`/:ref:`StringName` only). + +:: + + var data = { "key": "value", "another_key": 123, "lock": Vector2() } + var packed = PackedDataContainer.new() + packed.pack(data) + ResourceSaver.save(packed, "packed_data.res") - +-----------------------------------------------+--------------------------------------------------------------+-----------------------+ - | :ref:`PackedByteArray` | :ref:`__data__` | ``PackedByteArray()`` | - +-----------------------------------------------+--------------------------------------------------------------+-----------------------+ +:: + + var container = load("packed_data.res") + for key in container: + prints(key, container[key]) + + # Prints: + # key value + # lock (0, 0) + # another_key 123 + +Nested containers will be packed recursively. While iterating, they will be returned as :ref:`PackedDataContainerRef`. .. rst-class:: classref-reftable-group @@ -48,25 +63,6 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- - -.. _class_PackedDataContainer_property___data__: - -.. rst-class:: classref-property - -:ref:`PackedByteArray` **__data__** = ``PackedByteArray()`` - -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - Method Descriptions ------------------- @@ -76,9 +72,9 @@ Method Descriptions :ref:`Error` **pack** **(** :ref:`Variant` value **)** -.. container:: contribute +Packs the given container into a binary representation. The ``value`` must be either :ref:`Array` or :ref:`Dictionary`, any other type will result in invalid data error. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** Subsequent calls to this method will overwrite the existing data. .. rst-class:: classref-item-separator @@ -90,9 +86,7 @@ Method Descriptions :ref:`int` **size** **(** **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 a178d3ff79c..98006a26a6d 100644 --- a/classes/class_packeddatacontainerref.rst +++ b/classes/class_packeddatacontainerref.rst @@ -12,7 +12,36 @@ PackedDataContainerRef **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Reference-counted version of :ref:`PackedDataContainer`. +An internal class used by :ref:`PackedDataContainer` to pack nested arrays and dictionaries. + +.. rst-class:: classref-introduction-group + +Description +----------- + +When packing nested containers using :ref:`PackedDataContainer`, they are recursively packed into **PackedDataContainerRef** (only applies to :ref:`Array` and :ref:`Dictionary`). Their data can be retrieved the same way as from :ref:`PackedDataContainer`. + +:: + + var packed = PackedDataContainer.new() + packed.pack([1, 2, 3, ["abc", "def"], 4, 5, 6]) + + for element in packed: + if element is PackedDataContainerRef: + for subelement in element: + print("::", subelement) + else: + print(element) + + # Prints: + # 1 + # 2 + # 3 + # ::abc + # ::def + # 4 + # 5 + # 6 .. rst-class:: classref-reftable-group @@ -41,9 +70,7 @@ Method Descriptions :ref:`int` **size** **(** **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 94a276d8091..8a8a0632920 100644 --- a/classes/class_packedfloat32array.rst +++ b/classes/class_packedfloat32array.rst @@ -187,6 +187,8 @@ Finds the index of an existing value (or the insertion index that maintains sort \ **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. + .. rst-class:: classref-item-separator ---- @@ -211,6 +213,8 @@ Clears the array. This is equivalent to using :ref:`resize` doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included. + .. rst-class:: classref-item-separator ---- @@ -247,6 +251,8 @@ Assigns the given value to all elements in the array. This can typically be used Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -259,6 +265,8 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt Returns ``true`` if the array contains ``value``. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -343,6 +351,8 @@ Reverses the order of the elements in the array. Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -395,6 +405,8 @@ void **sort** **(** **)** Sorts the elements of the array in ascending order. +\ **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. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_packedfloat64array.rst b/classes/class_packedfloat64array.rst index 36ee060d75b..c664b6326e8 100644 --- a/classes/class_packedfloat64array.rst +++ b/classes/class_packedfloat64array.rst @@ -187,6 +187,8 @@ Finds the index of an existing value (or the insertion index that maintains sort \ **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. + .. rst-class:: classref-item-separator ---- @@ -211,6 +213,8 @@ Clears the array. This is equivalent to using :ref:`resize` doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included. + .. rst-class:: classref-item-separator ---- @@ -247,6 +251,8 @@ Assigns the given value to all elements in the array. This can typically be used Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -259,6 +265,8 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt Returns ``true`` if the array contains ``value``. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -343,6 +351,8 @@ Reverses the order of the elements in the array. Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -395,6 +405,8 @@ void **sort** **(** **)** Sorts the elements of the array in ascending order. +\ **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. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_packedvector2array.rst b/classes/class_packedvector2array.rst index 6ce6d0908a7..6e1a97932af 100644 --- a/classes/class_packedvector2array.rst +++ b/classes/class_packedvector2array.rst @@ -194,6 +194,8 @@ Finds the index of an existing value (or the insertion index that maintains sort \ **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. + .. rst-class:: classref-item-separator ---- @@ -218,6 +220,8 @@ Clears the array. This is equivalent to using :ref:`resize` elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included. + .. rst-class:: classref-item-separator ---- @@ -254,6 +258,8 @@ Assigns the given value to all elements in the array. This can typically be used Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -266,6 +272,8 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt Returns ``true`` if the array contains ``value``. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -350,6 +358,8 @@ Reverses the order of the elements in the array. Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -402,6 +412,8 @@ void **sort** **(** **)** Sorts the elements of the array in ascending order. +\ **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. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_packedvector3array.rst b/classes/class_packedvector3array.rst index d51d69160da..e3831baade7 100644 --- a/classes/class_packedvector3array.rst +++ b/classes/class_packedvector3array.rst @@ -187,6 +187,8 @@ Finds the index of an existing value (or the insertion index that maintains sort \ **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. + .. rst-class:: classref-item-separator ---- @@ -211,6 +213,8 @@ Clears the array. This is equivalent to using :ref:`resize` elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included. + .. rst-class:: classref-item-separator ---- @@ -247,6 +251,8 @@ Assigns the given value to all elements in the array. This can typically be used Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -259,6 +265,8 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt Returns ``true`` if the array contains ``value``. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -343,6 +351,8 @@ Reverses the order of the elements in the array. Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -395,6 +405,8 @@ void **sort** **(** **)** Sorts the elements of the array in ascending order. +\ **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. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_packetpeerudp.rst b/classes/class_packetpeerudp.rst index 0f97d6d05c8..f2035033c1b 100644 --- a/classes/class_packetpeerudp.rst +++ b/classes/class_packetpeerudp.rst @@ -246,7 +246,7 @@ Waits for a packet to arrive on the bound address. See :ref:`bind` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Provides an opaque background for :ref:`Control` children. +A GUI control that displays a :ref:`StyleBox`. .. rst-class:: classref-introduction-group Description ----------- -Panel is a :ref:`Control` that displays an opaque background. It's commonly used as a parent and container for other types of :ref:`Control` nodes. +**Panel** is a GUI control that displays a :ref:`StyleBox`. See also :ref:`PanelContainer`. .. rst-class:: classref-introduction-group @@ -59,7 +59,7 @@ Theme Property Descriptions :ref:`StyleBox` **panel** -The style of this **Panel**. +The :ref:`StyleBox` of this 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_panelcontainer.rst b/classes/class_panelcontainer.rst index 68f7f41062a..7580d849784 100644 --- a/classes/class_panelcontainer.rst +++ b/classes/class_panelcontainer.rst @@ -14,21 +14,21 @@ PanelContainer **Inherited By:** :ref:`ScriptEditor` -Panel container type. +A container that keeps its child controls within the area of a :ref:`StyleBox`. .. rst-class:: classref-introduction-group Description ----------- -Panel container type. This container fits controls inside of the delimited area of a stylebox. It's useful for giving controls an outline. +A container that keeps its child controls within the area of a :ref:`StyleBox`. Useful for giving controls an outline. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`GUI containers <../tutorials/ui/gui_containers>` +- :doc:`Using Containers <../tutorials/ui/gui_containers>` - `2D Role Playing Game Demo `__ diff --git a/classes/class_parallaxbackground.rst b/classes/class_parallaxbackground.rst index 8094a7fbeef..c248ae9fb32 100644 --- a/classes/class_parallaxbackground.rst +++ b/classes/class_parallaxbackground.rst @@ -21,6 +21,8 @@ Description A ParallaxBackground uses one or more :ref:`ParallaxLayer` child nodes to create a parallax effect. Each :ref:`ParallaxLayer` can move at a different speed using :ref:`ParallaxLayer.motion_offset`. This creates an illusion of depth in a 2D game. If not used with a :ref:`Camera2D`, you must manually calculate the :ref:`scroll_offset`. +\ **Note:** Each **ParallaxBackground** is drawn on one specific :ref:`Viewport` and cannot be shared between multiple :ref:`Viewport`\ s, see :ref:`CanvasLayer.custom_viewport`. When using multiple :ref:`Viewport`\ s, for example in a split-screen game, you need create an individual **ParallaxBackground** for each :ref:`Viewport` you want it to be drawn on. + .. rst-class:: classref-reftable-group Properties diff --git a/classes/class_parallaxlayer.rst b/classes/class_parallaxlayer.rst index 38dc746d57e..f15cf55140b 100644 --- a/classes/class_parallaxlayer.rst +++ b/classes/class_parallaxlayer.rst @@ -61,9 +61,11 @@ Property Descriptions - void **set_mirroring** **(** :ref:`Vector2` value **)** - :ref:`Vector2` **get_mirroring** **(** **)** -The ParallaxLayer's :ref:`Texture2D` mirroring. Useful for creating an infinite scrolling background. If an axis is set to ``0``, the :ref:`Texture2D` will not be mirrored. +The ParallaxLayer's :ref:`Texture2D` repeating. Useful for creating an infinite scrolling background. If an axis is set to ``0``, the :ref:`Texture2D` will not be repeated. -If the length of the viewport axis is bigger than twice the mirrored axis size, it will not repeat infinitely, as the parallax layer only draws 2 instances of the texture at any one time. +If the length of the viewport axis is bigger than twice the repeated axis size, it will not repeat infinitely, as the parallax layer only draws 2 instances of the texture at any given time. + +\ **Note:** Despite its name, the texture will not be mirrored, it will simply be repeated. .. rst-class:: classref-item-separator diff --git a/classes/class_particleprocessmaterial.rst b/classes/class_particleprocessmaterial.rst index 06d2197891d..0fe7399a857 100644 --- a/classes/class_particleprocessmaterial.rst +++ b/classes/class_particleprocessmaterial.rst @@ -33,161 +33,161 @@ Properties .. table:: :widths: auto - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`angle_curve` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`angle_max` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`angle_min` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`angular_velocity_curve` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`angular_velocity_max` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`angular_velocity_min` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`anim_offset_curve` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`anim_offset_max` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`anim_offset_min` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`anim_speed_curve` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`anim_speed_max` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`anim_speed_min` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`bool` | :ref:`attractor_interaction_enabled` | ``true`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`collision_bounce` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`collision_friction` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`CollisionMode` | :ref:`collision_mode` | ``0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`bool` | :ref:`collision_use_scale` | ``false`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`color_initial_ramp` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`color_ramp` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`damping_curve` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`damping_max` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`damping_min` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Vector3` | :ref:`direction` | ``Vector3(1, 0, 0)`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Vector3` | :ref:`emission_box_extents` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`emission_color_texture` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`emission_normal_texture` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`int` | :ref:`emission_point_count` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`emission_point_texture` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Vector3` | :ref:`emission_ring_axis` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`emission_ring_height` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`emission_ring_inner_radius` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`emission_ring_radius` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`EmissionShape` | :ref:`emission_shape` | ``0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`emission_sphere_radius` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`flatness` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Vector3` | :ref:`gravity` | ``Vector3(0, -9.8, 0)`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`hue_variation_curve` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`hue_variation_max` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`hue_variation_min` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`initial_velocity_max` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`initial_velocity_min` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`lifetime_randomness` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`linear_accel_curve` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`linear_accel_max` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`linear_accel_min` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`orbit_velocity_curve` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`orbit_velocity_max` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`orbit_velocity_min` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`bool` | :ref:`particle_flag_align_y` | ``false`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`bool` | :ref:`particle_flag_disable_z` | ``false`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`bool` | :ref:`particle_flag_rotate_y` | ``false`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`radial_accel_curve` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`radial_accel_max` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`radial_accel_min` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`scale_curve` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`scale_max` | ``1.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`scale_min` | ``1.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`spread` | ``45.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`int` | :ref:`sub_emitter_amount_at_collision` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`int` | :ref:`sub_emitter_amount_at_end` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`sub_emitter_frequency` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`bool` | :ref:`sub_emitter_keep_velocity` | ``false`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`SubEmitterMode` | :ref:`sub_emitter_mode` | ``0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`tangential_accel_curve` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`tangential_accel_max` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`tangential_accel_min` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`bool` | :ref:`turbulence_enabled` | ``false`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`turbulence_influence_max` | ``0.1`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`turbulence_influence_min` | ``0.1`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`turbulence_influence_over_life` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`turbulence_initial_displacement_max` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`turbulence_initial_displacement_min` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`turbulence_noise_scale` | ``9.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Vector3` | :ref:`turbulence_noise_speed` | ``Vector3(0.5, 0.5, 0.5)`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`turbulence_noise_speed_random` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`turbulence_noise_strength` | ``1.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`angle_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`angle_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`angle_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`angular_velocity_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`angular_velocity_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`angular_velocity_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`anim_offset_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`anim_offset_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`anim_offset_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`anim_speed_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`anim_speed_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`anim_speed_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`attractor_interaction_enabled` | ``true`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`collision_bounce` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`collision_friction` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`CollisionMode` | :ref:`collision_mode` | ``0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`collision_use_scale` | ``false`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`color_initial_ramp` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`color_ramp` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`damping_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`damping_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`damping_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3` | :ref:`direction` | ``Vector3(1, 0, 0)`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3` | :ref:`emission_box_extents` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`emission_color_texture` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`emission_normal_texture` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`int` | :ref:`emission_point_count` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`emission_point_texture` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3` | :ref:`emission_ring_axis` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`emission_ring_height` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`emission_ring_inner_radius` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`emission_ring_radius` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`EmissionShape` | :ref:`emission_shape` | ``0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`emission_sphere_radius` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`flatness` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3` | :ref:`gravity` | ``Vector3(0, -9.8, 0)`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`hue_variation_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`hue_variation_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`hue_variation_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`initial_velocity_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`initial_velocity_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`lifetime_randomness` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`linear_accel_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`linear_accel_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`linear_accel_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`orbit_velocity_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`orbit_velocity_max` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`orbit_velocity_min` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`particle_flag_align_y` | ``false`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`particle_flag_disable_z` | ``false`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`particle_flag_rotate_y` | ``false`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`radial_accel_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`radial_accel_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`radial_accel_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`scale_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`scale_max` | ``1.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`scale_min` | ``1.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`spread` | ``45.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`int` | :ref:`sub_emitter_amount_at_collision` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`int` | :ref:`sub_emitter_amount_at_end` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`sub_emitter_frequency` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`sub_emitter_keep_velocity` | ``false`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`SubEmitterMode` | :ref:`sub_emitter_mode` | ``0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`tangential_accel_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`tangential_accel_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`tangential_accel_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`turbulence_enabled` | ``false`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`turbulence_influence_max` | ``0.1`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`turbulence_influence_min` | ``0.1`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`turbulence_influence_over_life` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`turbulence_initial_displacement_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`turbulence_initial_displacement_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`turbulence_noise_scale` | ``9.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3` | :ref:`turbulence_noise_speed` | ``Vector3(0, 0, 0)`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`turbulence_noise_speed_random` | ``0.2`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`turbulence_noise_strength` | ``1.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ .. rst-class:: classref-reftable-group @@ -1755,7 +1755,9 @@ Minimum equivalent of :ref:`tangential_accel_max` value **)** - :ref:`bool` **get_turbulence_enabled** **(** **)** -Enables and disables Turbulence for the particle system. +If ``true``, enables turbulence for the particle system. Turbulence can be used to vary particle movement according to its position (based on a 3D noise pattern). In 3D, :ref:`GPUParticlesAttractorVectorField3D` with :ref:`NoiseTexture3D` can be used as an alternative to turbulence that works in world space and with multiple particle systems reacting in the same way. + +\ **Note:** Enabling turbulence has a high performance cost on the GPU. Only enable turbulence on a few particle systems at once at most, and consider disabling it when targeting mobile/web platforms. .. rst-class:: classref-item-separator @@ -1772,9 +1774,9 @@ Enables and disables Turbulence for the particle system. - void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** - :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| -Minimum turbulence influence on each particle. +Maximum turbulence influence on each particle. - The actual amount of turbulence influence on each particle is calculated as a random value between :ref:`turbulence_influence_min` and :ref:`turbulence_influence_max` and multiplied by the amount of turbulence influence from :ref:`turbulence_influence_over_life`. +The actual amount of turbulence influence on each particle is calculated as a random value between :ref:`turbulence_influence_min` and :ref:`turbulence_influence_max` and multiplied by the amount of turbulence influence from :ref:`turbulence_influence_over_life`. .. rst-class:: classref-item-separator @@ -1791,7 +1793,7 @@ Minimum turbulence influence on each particle. - void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** - :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| -Maximum turbulence influence on each particle. +Minimum turbulence influence on each particle. The actual amount of turbulence influence on each particle is calculated as a random value between :ref:`turbulence_influence_min` and :ref:`turbulence_influence_max` and multiplied by the amount of turbulence influence from :ref:`turbulence_influence_over_life`. @@ -1827,7 +1829,7 @@ Each particle's amount of turbulence will be influenced along this :ref:`CurveTe - void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** - :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| -Maximum displacement of each particles spawn position by the turbulence. +Maximum displacement of each particle's spawn position by the turbulence. The actual amount of displacement will be a factor of the underlying turbulence multiplied by a random value between :ref:`turbulence_initial_displacement_min` and :ref:`turbulence_initial_displacement_max`. @@ -1846,7 +1848,7 @@ The actual amount of displacement will be a factor of the underlying turbulence - void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** - :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| -Minimum displacement of each particles spawn position by the turbulence. +Minimum displacement of each particle's spawn position by the turbulence. The actual amount of displacement will be a factor of the underlying turbulence multiplied by a random value between :ref:`turbulence_initial_displacement_min` and :ref:`turbulence_initial_displacement_max`. @@ -1877,16 +1879,16 @@ A small scale will result in smaller features with more detail while a high scal .. rst-class:: classref-property -:ref:`Vector3` **turbulence_noise_speed** = ``Vector3(0.5, 0.5, 0.5)`` +:ref:`Vector3` **turbulence_noise_speed** = ``Vector3(0, 0, 0)`` .. rst-class:: classref-property-setget - void **set_turbulence_noise_speed** **(** :ref:`Vector3` value **)** - :ref:`Vector3` **get_turbulence_noise_speed** **(** **)** -The movement speed of the turbulence pattern. This changes how quickly the noise changes over time. +A scrolling velocity for the turbulence field. This sets a directional trend for the pattern to move in over time. -A value of ``Vector3(0.0, 0.0, 0.0)`` will freeze the turbulence pattern in place. +The default value of ``Vector3(0, 0, 0)`` turns off the scrolling. .. rst-class:: classref-item-separator @@ -1896,14 +1898,16 @@ A value of ``Vector3(0.0, 0.0, 0.0)`` will freeze the turbulence pattern in plac .. rst-class:: classref-property -:ref:`float` **turbulence_noise_speed_random** = ``0.0`` +:ref:`float` **turbulence_noise_speed_random** = ``0.2`` .. rst-class:: classref-property-setget - void **set_turbulence_noise_speed_random** **(** :ref:`float` value **)** - :ref:`float` **get_turbulence_noise_speed_random** **(** **)** -Use to influence the noise speed in a random pattern. This helps to break up visible movement patterns. +The in-place rate of change of the turbulence field. This defines how quickly the noise pattern varies over time. + +A value of 0.0 will result in a fixed pattern. .. rst-class:: classref-item-separator @@ -1920,7 +1924,7 @@ Use to influence the noise speed in a random pattern. This helps to break up vis - void **set_turbulence_noise_strength** **(** :ref:`float` value **)** - :ref:`float` **get_turbulence_noise_strength** **(** **)** -The turbulence noise strength. Increasing this will result in a stronger, more contrasting, noise pattern. +The turbulence noise strength. Increasing this will result in a stronger, more contrasting, flow pattern. .. rst-class:: classref-section-separator diff --git a/classes/class_pathfollow2d.rst b/classes/class_pathfollow2d.rst index e03a035fbbc..33bb434bb6c 100644 --- a/classes/class_pathfollow2d.rst +++ b/classes/class_pathfollow2d.rst @@ -36,8 +36,6 @@ Properties +---------------------------+-------------------------------------------------------------------+----------+ | :ref:`float` | :ref:`h_offset` | ``0.0`` | +---------------------------+-------------------------------------------------------------------+----------+ - | :ref:`float` | :ref:`lookahead` | ``4.0`` | - +---------------------------+-------------------------------------------------------------------+----------+ | :ref:`bool` | :ref:`loop` | ``true`` | +---------------------------+-------------------------------------------------------------------+----------+ | :ref:`float` | :ref:`progress` | ``0.0`` | @@ -96,23 +94,6 @@ The node's offset along the curve. ---- -.. _class_PathFollow2D_property_lookahead: - -.. rst-class:: classref-property - -:ref:`float` **lookahead** = ``4.0`` - -.. rst-class:: classref-property-setget - -- void **set_lookahead** **(** :ref:`float` value **)** -- :ref:`float` **get_lookahead** **(** **)** - -How far to look ahead of the curve to calculate the tangent if the node is rotating. E.g. shorter lookaheads will lead to faster rotations. - -.. rst-class:: classref-item-separator - ----- - .. _class_PathFollow2D_property_loop: .. rst-class:: classref-property diff --git a/classes/class_pathfollow3d.rst b/classes/class_pathfollow3d.rst index fab23919aa8..02375ea90a1 100644 --- a/classes/class_pathfollow3d.rst +++ b/classes/class_pathfollow3d.rst @@ -31,23 +31,25 @@ Properties .. table:: :widths: auto - +-----------------------------------------------------+-------------------------------------------------------------------+----------+ - | :ref:`bool` | :ref:`cubic_interp` | ``true`` | - +-----------------------------------------------------+-------------------------------------------------------------------+----------+ - | :ref:`float` | :ref:`h_offset` | ``0.0`` | - +-----------------------------------------------------+-------------------------------------------------------------------+----------+ - | :ref:`bool` | :ref:`loop` | ``true`` | - +-----------------------------------------------------+-------------------------------------------------------------------+----------+ - | :ref:`float` | :ref:`progress` | ``0.0`` | - +-----------------------------------------------------+-------------------------------------------------------------------+----------+ - | :ref:`float` | :ref:`progress_ratio` | ``0.0`` | - +-----------------------------------------------------+-------------------------------------------------------------------+----------+ - | :ref:`RotationMode` | :ref:`rotation_mode` | ``3`` | - +-----------------------------------------------------+-------------------------------------------------------------------+----------+ - | :ref:`bool` | :ref:`tilt_enabled` | ``true`` | - +-----------------------------------------------------+-------------------------------------------------------------------+----------+ - | :ref:`float` | :ref:`v_offset` | ``0.0`` | - +-----------------------------------------------------+-------------------------------------------------------------------+----------+ + +-----------------------------------------------------+---------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`cubic_interp` | ``true`` | + +-----------------------------------------------------+---------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`h_offset` | ``0.0`` | + +-----------------------------------------------------+---------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`loop` | ``true`` | + +-----------------------------------------------------+---------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`progress` | ``0.0`` | + +-----------------------------------------------------+---------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`progress_ratio` | ``0.0`` | + +-----------------------------------------------------+---------------------------------------------------------------------+-----------+ + | :ref:`RotationMode` | :ref:`rotation_mode` | ``3`` | + +-----------------------------------------------------+---------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`tilt_enabled` | ``true`` | + +-----------------------------------------------------+---------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`use_model_front` | ``false`` | + +-----------------------------------------------------+---------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`v_offset` | ``0.0`` | + +-----------------------------------------------------+---------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -248,6 +250,23 @@ If ``true``, the tilt property of :ref:`Curve3D` takes effect. ---- +.. _class_PathFollow3D_property_use_model_front: + +.. rst-class:: classref-property + +:ref:`bool` **use_model_front** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_model_front** **(** :ref:`bool` value **)** +- :ref:`bool` **is_using_model_front** **(** **)** + +If ``true``, the node moves on the travel path with orienting the +Z axis as forward. See also :ref:`Vector3.FORWARD` and :ref:`Vector3.MODEL_FRONT`. + +.. rst-class:: classref-item-separator + +---- + .. _class_PathFollow3D_property_v_offset: .. rst-class:: classref-property diff --git a/classes/class_physicalbone2d.rst b/classes/class_physicalbone2d.rst index 4e25cc88b3c..2d06ea329c0 100644 --- a/classes/class_physicalbone2d.rst +++ b/classes/class_physicalbone2d.rst @@ -12,18 +12,18 @@ PhysicalBone2D **Inherits:** :ref:`RigidBody2D` **<** :ref:`PhysicsBody2D` **<** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -A 2D node that can be used for physically aware bones in 2D. +A :ref:`RigidBody2D`-derived node used to make :ref:`Bone2D`\ s in a :ref:`Skeleton2D` react to physics. .. rst-class:: classref-introduction-group Description ----------- -The ``PhysicalBone2D`` node is a :ref:`RigidBody2D`-based node that can be used to make :ref:`Bone2D` nodes in a :ref:`Skeleton2D` react to physics. This node is very similar to the :ref:`PhysicalBone3D` node, just for 2D instead of 3D. +The **PhysicalBone2D** node is a :ref:`RigidBody2D`-based node that can be used to make :ref:`Bone2D`\ s in a :ref:`Skeleton2D` react to physics. -\ **Note:** To have the Bone2D nodes visually follow the ``PhysicalBone2D`` node, use a :ref:`SkeletonModification2DPhysicalBones` modification on the :ref:`Skeleton2D` node with the :ref:`Bone2D` nodes. +\ **Note:** To make the :ref:`Bone2D`\ s visually follow the **PhysicalBone2D** node, use a :ref:`SkeletonModification2DPhysicalBones` modification on the :ref:`Skeleton2D` parent. -\ **Note:** The PhysicalBone2D node does not automatically create a :ref:`Joint2D` node to keep ``PhysicalBone2D`` nodes together. You will need to create these manually. For most cases, you want to use a :ref:`PinJoint2D` node. The ``PhysicalBone2D`` node can automatically configure the :ref:`Joint2D` node once it's been created as a child node. +\ **Note:** The **PhysicalBone2D** node does not automatically create a :ref:`Joint2D` node to keep **PhysicalBone2D** nodes together. They must be created manually. For most cases, you want to use a :ref:`PinJoint2D` node. The **PhysicalBone2D** node will automatically configure the :ref:`Joint2D` node once it's been added as a child node. .. rst-class:: classref-reftable-group @@ -79,7 +79,7 @@ Property Descriptions - void **set_auto_configure_joint** **(** :ref:`bool` value **)** - :ref:`bool` **get_auto_configure_joint** **(** **)** -If ``true``, the ``PhysicalBone2D`` node will automatically configure the first :ref:`Joint2D` child node. The automatic configuration is limited to setting up the node properties and positioning the :ref:`Joint2D`. +If ``true``, the **PhysicalBone2D** will automatically configure the first :ref:`Joint2D` child node. The automatic configuration is limited to setting up the node properties and positioning the :ref:`Joint2D`. .. rst-class:: classref-item-separator @@ -96,7 +96,7 @@ If ``true``, the ``PhysicalBone2D`` node will automatically configure the first - void **set_bone2d_index** **(** :ref:`int` value **)** - :ref:`int` **get_bone2d_index** **(** **)** -The index of the :ref:`Bone2D` node that this ``PhysicalBone2D`` node is supposed to be simulating. +The index of the :ref:`Bone2D` that this **PhysicalBone2D** should simulate. .. rst-class:: classref-item-separator @@ -113,7 +113,7 @@ The index of the :ref:`Bone2D` node that this ``PhysicalBone2D`` n - void **set_bone2d_nodepath** **(** :ref:`NodePath` value **)** - :ref:`NodePath` **get_bone2d_nodepath** **(** **)** -The :ref:`NodePath` to the :ref:`Bone2D` node that this ``PhysicalBone2D`` node is supposed to be simulating. +The :ref:`NodePath` to the :ref:`Bone2D` that this **PhysicalBone2D** isshould simulate. .. rst-class:: classref-item-separator @@ -130,7 +130,7 @@ The :ref:`NodePath` to the :ref:`Bone2D` node that - void **set_follow_bone_when_simulating** **(** :ref:`bool` value **)** - :ref:`bool` **get_follow_bone_when_simulating** **(** **)** -If ``true``, the ``PhysicalBone2D`` will keep the transform of the bone it is bound to when simulating physics. +If ``true``, the **PhysicalBone2D** will keep the transform of the bone it is bound to when simulating physics. .. rst-class:: classref-item-separator @@ -147,9 +147,9 @@ If ``true``, the ``PhysicalBone2D`` will keep the transform of the bone it is bo - void **set_simulate_physics** **(** :ref:`bool` value **)** - :ref:`bool` **get_simulate_physics** **(** **)** -If ``true``, the ``PhysicalBone2D`` will start simulating using physics. If ``false``, the ``PhysicalBone2D`` will follow the transform of the :ref:`Bone2D` node. +If ``true``, the **PhysicalBone2D** will start simulating using physics. If ``false``, the **PhysicalBone2D** will follow the transform of the :ref:`Bone2D` node. -\ **Note:** To have the Bone2D nodes visually follow the ``PhysicalBone2D`` node, use a :ref:`SkeletonModification2DPhysicalBones` modification on the :ref:`Skeleton2D` node with the :ref:`Bone2D` nodes. +\ **Note:** To have the :ref:`Bone2D`\ s visually follow the **PhysicalBone2D**, use a :ref:`SkeletonModification2DPhysicalBones` modification on the :ref:`Skeleton2D` node with the :ref:`Bone2D` nodes. .. rst-class:: classref-section-separator @@ -166,7 +166,7 @@ Method Descriptions :ref:`Joint2D` **get_joint** **(** **)** |const| -Returns the first :ref:`Joint2D` child node, if one exists. This is mainly a helper function to make it easier to get the :ref:`Joint2D` that the ``PhysicalBone2D`` is autoconfiguring. +Returns the first :ref:`Joint2D` child node, if one exists. This is mainly a helper function to make it easier to get the :ref:`Joint2D` that the **PhysicalBone2D** is autoconfiguring. .. rst-class:: classref-item-separator @@ -178,7 +178,7 @@ Returns the first :ref:`Joint2D` child node, if one exists. This :ref:`bool` **is_simulating_physics** **(** **)** |const| -Returns a boolean that indicates whether the ``PhysicalBone2D`` node is running and simulating using the Godot 2D physics engine. When ``true``, the PhysicalBone2D node is using physics. +Returns a boolean that indicates whether the **PhysicalBone2D** is running and simulating using the Godot 2D physics engine. When ``true``, the PhysicalBone2D node is using physics. .. |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_physicalbone3d.rst b/classes/class_physicalbone3d.rst index 44d6567590b..0154fd8f156 100644 --- a/classes/class_physicalbone3d.rst +++ b/classes/class_physicalbone3d.rst @@ -12,12 +12,14 @@ PhysicalBone3D **Inherits:** :ref:`PhysicsBody3D` **<** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +A physics body used to make bones in a :ref:`Skeleton3D` react to physics. + .. rst-class:: classref-introduction-group Description ----------- -**Warning:** With a non-uniform scale this node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size(s) of its collision shape(s) instead. +The **PhysicalBone3D** node is a physics body that can be used to make bones in a :ref:`Skeleton3D` react to physics. .. rst-class:: classref-reftable-group diff --git a/classes/class_physicsbody2d.rst b/classes/class_physicsbody2d.rst index b6e4ebd058a..672ab638a84 100644 --- a/classes/class_physicsbody2d.rst +++ b/classes/class_physicsbody2d.rst @@ -14,14 +14,14 @@ PhysicsBody2D **Inherited By:** :ref:`CharacterBody2D`, :ref:`RigidBody2D`, :ref:`StaticBody2D` -Base class for all objects affected by physics in 2D space. +Abstract base class for 2D game objects affected by physics. .. rst-class:: classref-introduction-group Description ----------- -PhysicsBody2D is an abstract base class for implementing a physics body. All \*Body2D types inherit from it. +**PhysicsBody2D** is an abstract base class for 2D game objects affected by physics. All 2D physics bodies inherit from it. .. rst-class:: classref-introduction-group diff --git a/classes/class_physicsbody3d.rst b/classes/class_physicsbody3d.rst index 4329ecfdd00..ddabb7c157c 100644 --- a/classes/class_physicsbody3d.rst +++ b/classes/class_physicsbody3d.rst @@ -14,16 +14,16 @@ PhysicsBody3D **Inherited By:** :ref:`CharacterBody3D`, :ref:`PhysicalBone3D`, :ref:`RigidBody3D`, :ref:`StaticBody3D` -Base class for all objects affected by physics in 3D space. +Abstract base class for 3D game objects affected by physics. .. rst-class:: classref-introduction-group Description ----------- -PhysicsBody3D is an abstract base class for implementing a physics body. All \*Body3D types inherit from it. +**PhysicsBody3D** is an abstract base class for 3D game objects affected by physics. All 3D physics bodies inherit from it. -\ **Warning:** With a non-uniform scale this node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size(s) of its collision shape(s) instead. +\ **Warning:** With a non-uniform scale, this node will likely not behave as expected. It is advised to keep its scale the same on all axes and adjust its collision shape(s) instead. .. rst-class:: classref-introduction-group diff --git a/classes/class_physicsdirectbodystate2d.rst b/classes/class_physicsdirectbodystate2d.rst index 5836d976eaa..fe8d243c35a 100644 --- a/classes/class_physicsdirectbodystate2d.rst +++ b/classes/class_physicsdirectbodystate2d.rst @@ -14,14 +14,14 @@ PhysicsDirectBodyState2D **Inherited By:** :ref:`PhysicsDirectBodyState2DExtension` -Direct access object to a physics body in the :ref:`PhysicsServer2D`. +Provides direct access to a physics body in the :ref:`PhysicsServer2D`. .. rst-class:: classref-introduction-group Description ----------- -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 rigid bodies, 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 @@ -119,6 +119,8 @@ Methods +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_contact_local_shape` **(** :ref:`int` contact_idx **)** |const| | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_contact_local_velocity_at_position` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PhysicsDirectSpaceState2D` | :ref:`get_space_state` **(** **)** | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_velocity_at_local_position` **(** :ref:`Vector2` local_position **)** |const| | @@ -540,7 +542,7 @@ Returns the collider object. This depends on how it was created (will return a s :ref:`Vector2` **get_contact_collider_position** **(** :ref:`int` contact_idx **)** |const| -Returns the contact position in the collider. +Returns the position of the contact point on the collider in the global coordinate system. .. rst-class:: classref-item-separator @@ -564,7 +566,7 @@ Returns the collider's shape index. :ref:`Vector2` **get_contact_collider_velocity_at_position** **(** :ref:`int` contact_idx **)** |const| -Returns the linear velocity vector at the collider's contact point. +Returns the velocity vector at the collider's contact point. .. rst-class:: classref-item-separator @@ -614,7 +616,7 @@ Returns the local normal at the contact point. :ref:`Vector2` **get_contact_local_position** **(** :ref:`int` contact_idx **)** |const| -Returns the local position of the contact point. +Returns the position of the contact point on the body in the global coordinate system. .. rst-class:: classref-item-separator @@ -632,6 +634,18 @@ Returns the local shape index of the collision. ---- +.. _class_PhysicsDirectBodyState2D_method_get_contact_local_velocity_at_position: + +.. rst-class:: classref-method + +:ref:`Vector2` **get_contact_local_velocity_at_position** **(** :ref:`int` contact_idx **)** |const| + +Returns the velocity vector at the body's contact point. + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsDirectBodyState2D_method_get_space_state: .. rst-class:: classref-method diff --git a/classes/class_physicsdirectbodystate2dextension.rst b/classes/class_physicsdirectbodystate2dextension.rst index 0c041a6a71c..ed9bc5a27e4 100644 --- a/classes/class_physicsdirectbodystate2dextension.rst +++ b/classes/class_physicsdirectbodystate2dextension.rst @@ -12,9 +12,16 @@ PhysicsDirectBodyState2DExtension **Inherits:** :ref:`PhysicsDirectBodyState2D` **<** :ref:`Object` -.. container:: contribute +Provides virtual methods that can be overridden to create custom :ref:`PhysicsDirectBodyState2D` implementations. + +.. rst-class:: classref-introduction-group + +Description +----------- - There is currently no description for this class. Please help us by :ref:`contributing one `! +This class extends :ref:`PhysicsDirectBodyState2D` by providing additional virtual methods that can be overridden. When these methods are overridden, they will be called instead of the internal methods of the physics server. + +Intended for use with GDExtension to create custom implementations of :ref:`PhysicsDirectBodyState2D`. .. rst-class:: classref-reftable-group @@ -75,6 +82,8 @@ Methods +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_get_contact_local_shape` **(** :ref:`int` contact_idx **)** |virtual| |const| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_contact_local_velocity_at_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_get_inverse_inertia` **(** **)** |virtual| |const| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_get_inverse_mass` **(** **)** |virtual| |const| | @@ -471,6 +480,20 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi ---- +.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_local_velocity_at_position: + +.. rst-class:: classref-method + +:ref:`Vector2` **_get_contact_local_velocity_at_position** **(** :ref:`int` contact_idx **)** |virtual| |const| + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsDirectBodyState2DExtension_method__get_inverse_inertia: .. rst-class:: classref-method diff --git a/classes/class_physicsdirectbodystate3d.rst b/classes/class_physicsdirectbodystate3d.rst index f35d9394406..6b5461634df 100644 --- a/classes/class_physicsdirectbodystate3d.rst +++ b/classes/class_physicsdirectbodystate3d.rst @@ -14,14 +14,14 @@ PhysicsDirectBodyState3D **Inherited By:** :ref:`PhysicsDirectBodyState3DExtension` -Direct access object to a physics body in the :ref:`PhysicsServer3D`. +Provides direct access to a physics body in the :ref:`PhysicsServer3D`. .. rst-class:: classref-introduction-group Description ----------- -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 rigid bodies, 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 @@ -123,6 +123,8 @@ Methods +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_contact_local_shape` **(** :ref:`int` contact_idx **)** |const| | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_contact_local_velocity_at_position` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PhysicsDirectSpaceState3D` | :ref:`get_space_state` **(** **)** | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_velocity_at_local_position` **(** :ref:`Vector3` local_position **)** |const| | @@ -578,7 +580,7 @@ Returns the collider object. :ref:`Vector3` **get_contact_collider_position** **(** :ref:`int` contact_idx **)** |const| -Returns the contact position in the collider. +Returns the position of the contact point on the collider in the global coordinate system. .. rst-class:: classref-item-separator @@ -652,7 +654,7 @@ Returns the local normal at the contact point. :ref:`Vector3` **get_contact_local_position** **(** :ref:`int` contact_idx **)** |const| -Returns the local position of the contact point. +Returns the position of the contact point on the body in the global coordinate system. .. rst-class:: classref-item-separator @@ -670,6 +672,18 @@ Returns the local shape index of the collision. ---- +.. _class_PhysicsDirectBodyState3D_method_get_contact_local_velocity_at_position: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_contact_local_velocity_at_position** **(** :ref:`int` contact_idx **)** |const| + +Returns the linear velocity vector at the body's contact point. + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsDirectBodyState3D_method_get_space_state: .. rst-class:: classref-method diff --git a/classes/class_physicsdirectbodystate3dextension.rst b/classes/class_physicsdirectbodystate3dextension.rst index 203a98af66f..6ae9124514a 100644 --- a/classes/class_physicsdirectbodystate3dextension.rst +++ b/classes/class_physicsdirectbodystate3dextension.rst @@ -12,9 +12,16 @@ PhysicsDirectBodyState3DExtension **Inherits:** :ref:`PhysicsDirectBodyState3D` **<** :ref:`Object` -.. container:: contribute +Provides virtual methods that can be overridden to create custom :ref:`PhysicsDirectBodyState3D` implementations. + +.. rst-class:: classref-introduction-group + +Description +----------- - There is currently no description for this class. Please help us by :ref:`contributing one `! +This class extends :ref:`PhysicsDirectBodyState3D` by providing additional virtual methods that can be overridden. When these methods are overridden, they will be called instead of the internal methods of the physics server. + +Intended for use with GDExtension to create custom implementations of :ref:`PhysicsDirectBodyState3D`. .. rst-class:: classref-reftable-group @@ -75,6 +82,8 @@ Methods +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_get_contact_local_shape` **(** :ref:`int` contact_idx **)** |virtual| |const| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_contact_local_velocity_at_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`_get_inverse_inertia` **(** **)** |virtual| |const| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Basis` | :ref:`_get_inverse_inertia_tensor` **(** **)** |virtual| |const| | @@ -475,6 +484,20 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** ---- +.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_local_velocity_at_position: + +.. rst-class:: classref-method + +:ref:`Vector3` **_get_contact_local_velocity_at_position** **(** :ref:`int` contact_idx **)** |virtual| |const| + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsDirectBodyState3DExtension_method__get_inverse_inertia: .. rst-class:: classref-method diff --git a/classes/class_physicsdirectspacestate2d.rst b/classes/class_physicsdirectspacestate2d.rst index 9eb74269c57..103369bf73c 100644 --- a/classes/class_physicsdirectspacestate2d.rst +++ b/classes/class_physicsdirectspacestate2d.rst @@ -14,14 +14,14 @@ PhysicsDirectSpaceState2D **Inherited By:** :ref:`PhysicsDirectSpaceState2DExtension` -Direct access object to a space in the :ref:`PhysicsServer2D`. +Provides direct access to a physics space in the :ref:`PhysicsServer2D`. .. rst-class:: classref-introduction-group Description ----------- -Direct access object to a space in the :ref:`PhysicsServer2D`. It's used mainly to do queries against objects and areas residing in a given space. +Provides direct access to a physics space in the :ref:`PhysicsServer2D`. It's used mainly to do queries against objects and areas residing in a given space. .. rst-class:: classref-introduction-group @@ -40,19 +40,19 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array` | :ref:`cast_motion` **(** :ref:`PhysicsShapeQueryParameters2D` parameters **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array[]` | :ref:`collide_shape` **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_rest_info` **(** :ref:`PhysicsShapeQueryParameters2D` parameters **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`intersect_point` **(** :ref:`PhysicsPointQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`intersect_ray` **(** :ref:`PhysicsRayQueryParameters2D` parameters **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`intersect_shape` **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`cast_motion` **(** :ref:`PhysicsShapeQueryParameters2D` parameters **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2[]` | :ref:`collide_shape` **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_rest_info` **(** :ref:`PhysicsShapeQueryParameters2D` parameters **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`intersect_point` **(** :ref:`PhysicsPointQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`intersect_ray` **(** :ref:`PhysicsRayQueryParameters2D` parameters **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`intersect_shape` **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -83,7 +83,7 @@ Returns an array with the safe and unsafe proportions (between 0 and 1) of the m .. rst-class:: classref-method -:ref:`PackedVector2Array[]` **collide_shape** **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** +:ref:`Vector2[]` **collide_shape** **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** 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. diff --git a/classes/class_physicsdirectspacestate2dextension.rst b/classes/class_physicsdirectspacestate2dextension.rst index 5c9cdbce89d..475dd506069 100644 --- a/classes/class_physicsdirectspacestate2dextension.rst +++ b/classes/class_physicsdirectspacestate2dextension.rst @@ -12,9 +12,16 @@ PhysicsDirectSpaceState2DExtension **Inherits:** :ref:`PhysicsDirectSpaceState2D` **<** :ref:`Object` -.. container:: contribute +Provides virtual methods that can be overridden to create custom :ref:`PhysicsDirectSpaceState2D` implementations. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This class extends :ref:`PhysicsDirectSpaceState2D` by providing additional virtual methods that can be overridden. When these methods are overridden, they will be called instead of the internal methods of the physics server. - There is currently no description for this class. Please help us by :ref:`contributing one `! +Intended for use with GDExtension to create custom implementations of :ref:`PhysicsDirectSpaceState2D`. .. rst-class:: classref-reftable-group diff --git a/classes/class_physicsdirectspacestate3d.rst b/classes/class_physicsdirectspacestate3d.rst index add7f8194dc..93441440485 100644 --- a/classes/class_physicsdirectspacestate3d.rst +++ b/classes/class_physicsdirectspacestate3d.rst @@ -14,14 +14,14 @@ PhysicsDirectSpaceState3D **Inherited By:** :ref:`PhysicsDirectSpaceState3DExtension` -Direct access object to a space in the :ref:`PhysicsServer3D`. +Provides direct access to a physics space in the :ref:`PhysicsServer3D`. .. rst-class:: classref-introduction-group Description ----------- -Direct access object to a space in the :ref:`PhysicsServer3D`. It's used mainly to do queries against objects and areas residing in a given space. +Provides direct access to a physics space in the :ref:`PhysicsServer3D`. It's used mainly to do queries against objects and areas residing in a given space. .. rst-class:: classref-introduction-group @@ -40,19 +40,19 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array` | :ref:`cast_motion` **(** :ref:`PhysicsShapeQueryParameters3D` parameters **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array[]` | :ref:`collide_shape` **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_rest_info` **(** :ref:`PhysicsShapeQueryParameters3D` parameters **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`intersect_point` **(** :ref:`PhysicsPointQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`intersect_ray` **(** :ref:`PhysicsRayQueryParameters3D` parameters **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`intersect_shape` **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`cast_motion` **(** :ref:`PhysicsShapeQueryParameters3D` parameters **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3[]` | :ref:`collide_shape` **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_rest_info` **(** :ref:`PhysicsShapeQueryParameters3D` parameters **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`intersect_point` **(** :ref:`PhysicsPointQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`intersect_ray` **(** :ref:`PhysicsRayQueryParameters3D` parameters **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`intersect_shape` **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -83,7 +83,7 @@ Returns an array with the safe and unsafe proportions (between 0 and 1) of the m .. rst-class:: classref-method -:ref:`PackedVector3Array[]` **collide_shape** **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** +:ref:`Vector3[]` **collide_shape** **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** 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. diff --git a/classes/class_physicsdirectspacestate3dextension.rst b/classes/class_physicsdirectspacestate3dextension.rst index 6c2c4cab66a..798809f1c62 100644 --- a/classes/class_physicsdirectspacestate3dextension.rst +++ b/classes/class_physicsdirectspacestate3dextension.rst @@ -12,9 +12,16 @@ PhysicsDirectSpaceState3DExtension **Inherits:** :ref:`PhysicsDirectSpaceState3D` **<** :ref:`Object` -.. container:: contribute +Provides virtual methods that can be overridden to create custom :ref:`PhysicsDirectSpaceState3D` implementations. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This class extends :ref:`PhysicsDirectSpaceState3D` by providing additional virtual methods that can be overridden. When these methods are overridden, they will be called instead of the internal methods of the physics server. - There is currently no description for this class. Please help us by :ref:`contributing one `! +Intended for use with GDExtension to create custom implementations of :ref:`PhysicsDirectSpaceState3D`. .. rst-class:: classref-reftable-group @@ -33,7 +40,7 @@ Methods +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_intersect_point` **(** :ref:`Vector3` position, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeResult* results, :ref:`int` max_results **)** |virtual| | +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_intersect_ray` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, :ref:`bool` hit_from_inside, :ref:`bool` hit_back_faces, PhysicsServer3DExtensionRayResult* result **)** |virtual| | + | :ref:`bool` | :ref:`_intersect_ray` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, :ref:`bool` hit_from_inside, :ref:`bool` hit_back_faces, :ref:`bool` pick_ray, PhysicsServer3DExtensionRayResult* result **)** |virtual| | +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_intersect_shape` **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeResult* result_count, :ref:`int` max_results **)** |virtual| | +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -111,7 +118,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool` **_intersect_ray** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, :ref:`bool` hit_from_inside, :ref:`bool` hit_back_faces, PhysicsServer3DExtensionRayResult* result **)** |virtual| +:ref:`bool` **_intersect_ray** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, :ref:`bool` hit_from_inside, :ref:`bool` hit_back_faces, :ref:`bool` pick_ray, PhysicsServer3DExtensionRayResult* result **)** |virtual| .. container:: contribute diff --git a/classes/class_physicsmaterial.rst b/classes/class_physicsmaterial.rst index 969224b307f..6aa9551634e 100644 --- a/classes/class_physicsmaterial.rst +++ b/classes/class_physicsmaterial.rst @@ -12,14 +12,14 @@ PhysicsMaterial **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A material for physics properties. +Holds physics-related properties of a surface, namely its roughness and bounciness. .. rst-class:: classref-introduction-group Description ----------- -Provides a means of modifying the collision properties of a :ref:`PhysicsBody3D`. +Holds physics-related properties of a surface, namely its roughness and bounciness. This class is used to apply these properties to a physics body. .. rst-class:: classref-reftable-group diff --git a/classes/class_physicspointqueryparameters2d.rst b/classes/class_physicspointqueryparameters2d.rst index 20e1608997e..bfacaeb13e5 100644 --- a/classes/class_physicspointqueryparameters2d.rst +++ b/classes/class_physicspointqueryparameters2d.rst @@ -12,14 +12,14 @@ PhysicsPointQueryParameters2D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Parameters to be sent to a 2D point physics query. +Provides parameters for :ref:`PhysicsDirectSpaceState2D.intersect_point`. .. rst-class:: classref-introduction-group Description ----------- -This class contains the position and other parameters to be used 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 diff --git a/classes/class_physicspointqueryparameters3d.rst b/classes/class_physicspointqueryparameters3d.rst index d895d3424f1..9f13435133b 100644 --- a/classes/class_physicspointqueryparameters3d.rst +++ b/classes/class_physicspointqueryparameters3d.rst @@ -12,14 +12,14 @@ PhysicsPointQueryParameters3D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Parameters to be sent to a 3D point physics query. +Provides parameters for :ref:`PhysicsDirectSpaceState3D.intersect_point`. .. rst-class:: classref-introduction-group Description ----------- -This class contains the position and other parameters to be used 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 diff --git a/classes/class_physicsrayqueryparameters2d.rst b/classes/class_physicsrayqueryparameters2d.rst index 9e3c2402bc0..d4e51be2481 100644 --- a/classes/class_physicsrayqueryparameters2d.rst +++ b/classes/class_physicsrayqueryparameters2d.rst @@ -12,14 +12,14 @@ PhysicsRayQueryParameters2D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Parameters to be sent to a 2D ray physics query. +Provides parameters for :ref:`PhysicsDirectSpaceState2D.intersect_ray`. .. rst-class:: classref-introduction-group Description ----------- -This class contains the ray position and other parameters to be used 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 diff --git a/classes/class_physicsrayqueryparameters3d.rst b/classes/class_physicsrayqueryparameters3d.rst index d7ce447427f..eeb39440ecd 100644 --- a/classes/class_physicsrayqueryparameters3d.rst +++ b/classes/class_physicsrayqueryparameters3d.rst @@ -12,14 +12,14 @@ PhysicsRayQueryParameters3D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Parameters to be sent to a 3D ray physics query. +Provides parameters for :ref:`PhysicsDirectSpaceState3D.intersect_ray`. .. rst-class:: classref-introduction-group Description ----------- -This class contains the ray position and other parameters to be used 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 diff --git a/classes/class_physicsserver2d.rst b/classes/class_physicsserver2d.rst index 34804ead399..52a8a43e9b9 100644 --- a/classes/class_physicsserver2d.rst +++ b/classes/class_physicsserver2d.rst @@ -14,7 +14,7 @@ PhysicsServer2D **Inherited By:** :ref:`PhysicsServer2DExtension` -Server interface for low-level 2D physics access. +A server interface for low-level 2D physics access. .. rst-class:: classref-introduction-group @@ -25,7 +25,7 @@ PhysicsServer2D is the server responsible for all 2D physics. It can directly cr - A *space* is a self-contained world for a physics simulation. It contains bodies, areas, and joints. Its state can be queried for collision and intersection information, and several parameters of the simulation can be modified. -- A *shape* is a geometric figure such as a circle, a rectangle, a capsule, or a polygon. It can be used for collision detection by adding it to a body/area, possibly with an extra transformation relative to the body/area's origin. Bodies/areas can have multiple (transformed) shapes added to them, and a single shape can be added to bodies/areas multiple times with different local transformations. +- A *shape* is a geometric shape such as a circle, a rectangle, a capsule, or a polygon. It can be used for collision detection by adding it to a body/area, possibly with an extra transformation relative to the body/area's origin. Bodies/areas can have multiple (transformed) shapes added to them, and a single shape can be added to bodies/areas multiple times with different local transformations. - A *body* is a physical object which can be in static, kinematic, or rigid mode. Its state (such as position and velocity) can be queried and updated. A force integration callback can be set to customize the body's physics. @@ -33,9 +33,9 @@ PhysicsServer2D is the server responsible for all 2D physics. It can directly cr - A *joint* is a constraint, either between two bodies or on one body relative to a point. Parameters such as the joint bias and the rest length of a spring joint can be adjusted. -Physics objects in the physics server may be created and manipulated independently; they do not have to be tied to nodes in the scene tree. +Physics objects in **PhysicsServer2D** may be created and manipulated independently; they do not have to be tied to nodes in the scene tree. -\ **Note:** All the physics nodes use the physics server internally. Adding a physics node to the scene tree will cause a corresponding physics object to be created in the physics server. A rigid body node registers a callback that updates the node's transform with the transform of the respective body object in the physics server (every physics update). An area node registers a callback to inform the area node about overlaps with the respective area object in the physics server. The raycast node queries the direct state of the relevant space in the physics server. +\ **Note:** All the 2D physics nodes use the physics server internally. Adding a physics node to the scene tree will cause a corresponding physics object to be created in the physics server. A rigid body node registers a callback that updates the node's transform with the transform of the respective body object in the physics server (every physics update). An area node registers a callback to inform the area node about overlaps with the respective area object in the physics server. The raycast node queries the direct state of the relevant space in the physics server. .. rst-class:: classref-reftable-group @@ -2437,7 +2437,7 @@ Sets the shape data that defines the configuration of the shape. The ``data`` to - :ref:`SHAPE_CONCAVE_POLYGON`: a :ref:`PackedVector2Array` of length divisible by two (each pair of points forms one segment). -\ **Warning**: In the case of :ref:`SHAPE_CONVEX_POLYGON`, this method does not check if the points supplied actually form a convex polygon (unlike the :ref:`CollisionPolygon2D.polygon` property). +\ **Warning:** In the case of :ref:`SHAPE_CONVEX_POLYGON`, this method does not check if the points supplied actually form a convex polygon (unlike the :ref:`CollisionPolygon2D.polygon` property). .. rst-class:: classref-item-separator diff --git a/classes/class_physicsserver2dextension.rst b/classes/class_physicsserver2dextension.rst index 2aecdc86b83..75b4395386f 100644 --- a/classes/class_physicsserver2dextension.rst +++ b/classes/class_physicsserver2dextension.rst @@ -12,9 +12,16 @@ PhysicsServer2DExtension **Inherits:** :ref:`PhysicsServer2D` **<** :ref:`Object` -.. container:: contribute +Provides virtual methods that can be overridden to create custom :ref:`PhysicsServer2D` implementations. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This class extends :ref:`PhysicsServer2D` by providing additional virtual methods that can be overridden. When these methods are overridden, they will be called instead of the internal methods of the physics server. - There is currently no description for this class. Please help us by :ref:`contributing one `! +Intended for use with GDExtension to create custom implementations of :ref:`PhysicsServer2D`. .. rst-class:: classref-reftable-group diff --git a/classes/class_physicsserver2dmanager.rst b/classes/class_physicsserver2dmanager.rst index 7586385fc29..1db96542584 100644 --- a/classes/class_physicsserver2dmanager.rst +++ b/classes/class_physicsserver2dmanager.rst @@ -12,14 +12,14 @@ PhysicsServer2DManager **Inherits:** :ref:`Object` -Manager for 2D physics server implementations. +A singleton for managing :ref:`PhysicsServer2D` implementations. .. rst-class:: classref-introduction-group Description ----------- -**PhysicsServer2DManager** is the API for registering :ref:`PhysicsServer2D` implementations, and for setting the default implementation. +**PhysicsServer2DManager** is the API for registering :ref:`PhysicsServer2D` implementations and for setting the default implementation. \ **Note:** It is not possible to switch physics servers at runtime. This class is only used on startup at the server initialization level, by Godot itself and possibly by GDExtensions. diff --git a/classes/class_physicsserver3d.rst b/classes/class_physicsserver3d.rst index 579a08a3354..a485a09f0b6 100644 --- a/classes/class_physicsserver3d.rst +++ b/classes/class_physicsserver3d.rst @@ -14,14 +14,28 @@ PhysicsServer3D **Inherited By:** :ref:`PhysicsServer3DExtension` -Server interface for low-level physics access. +A server interface for low-level 3D physics access. .. rst-class:: classref-introduction-group Description ----------- -PhysicsServer3D is the server responsible for all 3D physics. It can create many kinds of physics objects, but does not insert them on the node tree. +PhysicsServer2D is the server responsible for all 2D physics. It can directly create and manipulate all physics objects: + +- A *space* is a self-contained world for a physics simulation. It contains bodies, areas, and joints. Its state can be queried for collision and intersection information, and several parameters of the simulation can be modified. + +- A *shape* is a geometric shape such as a sphere, a box, a cylinder, or a polygon. It can be used for collision detection by adding it to a body/area, possibly with an extra transformation relative to the body/area's origin. Bodies/areas can have multiple (transformed) shapes added to them, and a single shape can be added to bodies/areas multiple times with different local transformations. + +- A *body* is a physical object which can be in static, kinematic, or rigid mode. Its state (such as position and velocity) can be queried and updated. A force integration callback can be set to customize the body's physics. + +- An *area* is a region in space which can be used to detect bodies and areas entering and exiting it. A body monitoring callback can be set to report entering/exiting body shapes, and similarly an area monitoring callback can be set. Gravity and damping can be overridden within the area by setting area parameters. + +- A *joint* is a constraint, either between two bodies or on one body relative to a point. Parameters such as the joint bias and the rest length of a spring joint can be adjusted. + +Physics objects in **PhysicsServer3D** may be created and manipulated independently; they do not have to be tied to nodes in the scene tree. + +\ **Note:** All the 3D physics nodes use the physics server internally. Adding a physics node to the scene tree will cause a corresponding physics object to be created in the physics server. A rigid body node registers a callback that updates the node's transform with the transform of the respective body object in the physics server (every physics update). An area node registers a callback to inform the area node about overlaps with the respective area object in the physics server. The raycast node queries the direct state of the relevant space in the physics server. .. rst-class:: classref-reftable-group @@ -1799,9 +1813,19 @@ Removes a shape from an area. It does not delete the shape, so it can be reassig void **area_set_area_monitor_callback** **(** :ref:`RID` area, :ref:`Callable` callback **)** -.. container:: contribute +Sets the area's area monitor callback. This callback will be called when any other (shape of an) area enters or exits (a shape of) the given area, and must take the following five parameters: - There is currently no description for this method. Please help us by :ref:`contributing one `! +1. an integer ``status``: either :ref:`AREA_BODY_ADDED` or :ref:`AREA_BODY_REMOVED` depending on whether the other area's shape entered or exited the area, + +2. an :ref:`RID` ``area_rid``: the :ref:`RID` of the other area that entered or exited the area, + +3. an integer ``instance_id``: the ``ObjectID`` attached to the other area, + +4. an integer ``area_shape_idx``: the index of the shape of the other area that entered or exited the area, + +5. an integer ``self_shape_idx``: the index of the shape of the area where the other area entered or exited. + +By counting (or keeping track of) the shapes that enter and exit, it can be determined if an area (with all its shapes) is entering for the first time or exiting for the last time. .. rst-class:: classref-item-separator @@ -1837,17 +1861,19 @@ Sets which physics layers the area will monitor. void **area_set_monitor_callback** **(** :ref:`RID` area, :ref:`Callable` callback **)** -Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: +Sets the area's body monitor callback. This callback will be called when any other (shape of a) body enters or exits (a shape of) the given area, and must take the following five parameters: + +1. an integer ``status``: either :ref:`AREA_BODY_ADDED` or :ref:`AREA_BODY_REMOVED` depending on whether the other body shape entered or exited the area, -1: :ref:`AREA_BODY_ADDED` or :ref:`AREA_BODY_REMOVED`, depending on whether the object entered or exited the area. +2. an :ref:`RID` ``body_rid``: the :ref:`RID` of the body that entered or exited the area, -2: :ref:`RID` of the object that entered/exited the area. +3. an integer ``instance_id``: the ``ObjectID`` attached to the body, -3: Instance ID of the object that entered/exited the area. +4. an integer ``body_shape_idx``: the index of the shape of the body that entered or exited the area, -4: The shape index of the object that entered/exited the area. +5. an integer ``self_shape_idx``: the index of the shape of the area where the body entered or exited. -5: The shape index of the area where the object entered/exited. +By counting (or keeping track of) the shapes that enter and exit, it can be determined if a body (with all its shapes) is entering for the first time or exiting for the last time. .. rst-class:: classref-item-separator diff --git a/classes/class_physicsserver3dextension.rst b/classes/class_physicsserver3dextension.rst index a27eba3685c..0b4858d87a2 100644 --- a/classes/class_physicsserver3dextension.rst +++ b/classes/class_physicsserver3dextension.rst @@ -12,9 +12,16 @@ PhysicsServer3DExtension **Inherits:** :ref:`PhysicsServer3D` **<** :ref:`Object` -.. container:: contribute +Provides virtual methods that can be overridden to create custom :ref:`PhysicsServer3D` implementations. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This class extends :ref:`PhysicsServer3D` by providing additional virtual methods that can be overridden. When these methods are overridden, they will be called instead of the internal methods of the physics server. - There is currently no description for this class. Please help us by :ref:`contributing one `! +Intended for use with GDExtension to create custom implementations of :ref:`PhysicsServer3D`. .. rst-class:: classref-reftable-group @@ -24,387 +31,387 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_attach_object_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_clear_shapes` **(** :ref:`RID` area **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_area_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_area_get_collision_layer` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_area_get_collision_mask` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_area_get_object_instance_id` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_area_get_param` **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_area_get_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_area_get_shape_count` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`_area_get_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_area_get_space` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`_area_get_transform` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_remove_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_area_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_collision_layer` **(** :ref:`RID` area, :ref:`int` layer **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_collision_mask` **(** :ref:`RID` area, :ref:`int` mask **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_monitorable` **(** :ref:`RID` area, :ref:`bool` monitorable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_param` **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_ray_pickable` **(** :ref:`RID` area, :ref:`bool` enable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_shape` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_shape_disabled` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_space` **(** :ref:`RID` area, :ref:`RID` space **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_transform` **(** :ref:`RID` area, :ref:`Transform3D` transform **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_constant_central_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_central_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_central_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_force` **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse, :ref:`Vector3` position **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_torque_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_attach_object_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_clear_shapes` **(** :ref:`RID` body **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_body_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]` | :ref:`_body_get_collision_exceptions` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_collision_layer` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_collision_mask` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_body_get_collision_priority` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_body_get_constant_force` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_body_get_constant_torque` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_body_get_contacts_reported_depth_threshold` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsDirectBodyState3D` | :ref:`_body_get_direct_state` **(** :ref:`RID` body **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_max_contacts_reported` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`BodyMode` | :ref:`_body_get_mode` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_object_instance_id` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_body_get_param` **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_body_get_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_shape_count` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`_body_get_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_body_get_space` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_user_flags` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_body_is_axis_locked` **(** :ref:`RID` body, :ref:`BodyAxis` axis **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_body_is_continuous_collision_detection_enabled` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_body_is_omitting_force_integration` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_remove_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_reset_mass_properties` **(** :ref:`RID` body **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_axis_lock` **(** :ref:`RID` body, :ref:`BodyAxis` axis, :ref:`bool` lock **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_axis_velocity` **(** :ref:`RID` body, :ref:`Vector3` axis_velocity **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_collision_priority` **(** :ref:`RID` body, :ref:`float` priority **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_contacts_reported_depth_threshold` **(** :ref:`RID` body, :ref:`float` threshold **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_enable_continuous_collision_detection` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_max_contacts_reported` **(** :ref:`RID` body, :ref:`int` amount **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_mode` **(** :ref:`RID` body, :ref:`BodyMode` mode **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_omit_force_integration` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_param` **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_ray_pickable` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_shape` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_shape_disabled` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_state_sync_callback` **(** :ref:`RID` body, :ref:`Callable` callable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_user_flags` **(** :ref:`RID` body, :ref:`int` flags **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_body_test_motion` **(** :ref:`RID` body, :ref:`Transform3D` from, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` max_collisions, :ref:`bool` collide_separation_ray, PhysicsServer3DExtensionMotionResult* result **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_box_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_capsule_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_concave_polygon_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_cone_twist_joint_get_param` **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_cone_twist_joint_set_param` **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param, :ref:`float` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_convex_polygon_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_custom_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_cylinder_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_end_sync` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_finish` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_flush_queries` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_free_rid` **(** :ref:`RID` rid **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_generic_6dof_joint_get_flag` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_generic_6dof_joint_get_param` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_generic_6dof_joint_set_flag` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag, :ref:`bool` enable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_generic_6dof_joint_set_param` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param, :ref:`float` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_process_info` **(** :ref:`ProcessInfo` process_info **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_heightmap_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_hinge_joint_get_flag` **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_hinge_joint_get_param` **(** :ref:`RID` joint, :ref:`HingeJointParam` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_hinge_joint_set_flag` **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag, :ref:`bool` enabled **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_hinge_joint_set_param` **(** :ref:`RID` joint, :ref:`HingeJointParam` param, :ref:`float` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_init` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_flushing_queries` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_clear` **(** :ref:`RID` joint **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_joint_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_disable_collisions_between_bodies` **(** :ref:`RID` joint, :ref:`bool` disable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_joint_get_solver_priority` **(** :ref:`RID` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`JointType` | :ref:`_joint_get_type` **(** :ref:`RID` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_joint_is_disabled_collisions_between_bodies` **(** :ref:`RID` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_cone_twist` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_generic_6dof` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_hinge` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` hinge_A, :ref:`RID` body_B, :ref:`Transform3D` hinge_B **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_hinge_simple` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` pivot_A, :ref:`Vector3` axis_A, :ref:`RID` body_B, :ref:`Vector3` pivot_B, :ref:`Vector3` axis_B **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_pin` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` local_A, :ref:`RID` body_B, :ref:`Vector3` local_B **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_slider` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_set_solver_priority` **(** :ref:`RID` joint, :ref:`int` priority **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_pin_joint_get_local_a` **(** :ref:`RID` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_pin_joint_get_local_b` **(** :ref:`RID` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_pin_joint_get_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_pin_joint_set_local_a` **(** :ref:`RID` joint, :ref:`Vector3` local_A **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_pin_joint_set_local_b` **(** :ref:`RID` joint, :ref:`Vector3` local_B **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_pin_joint_set_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_separation_ray_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_active` **(** :ref:`bool` active **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_shape_get_custom_solver_bias` **(** :ref:`RID` shape **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_shape_get_data` **(** :ref:`RID` shape **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_shape_get_margin` **(** :ref:`RID` shape **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ShapeType` | :ref:`_shape_get_type` **(** :ref:`RID` shape **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shape_set_custom_solver_bias` **(** :ref:`RID` shape, :ref:`float` bias **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shape_set_data` **(** :ref:`RID` shape, :ref:`Variant` data **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shape_set_margin` **(** :ref:`RID` shape, :ref:`float` margin **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_slider_joint_get_param` **(** :ref:`RID` joint, :ref:`SliderJointParam` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_slider_joint_set_param` **(** :ref:`RID` joint, :ref:`SliderJointParam` param, :ref:`float` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` body_b **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_soft_body_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB` | :ref:`_soft_body_get_bounds` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]` | :ref:`_soft_body_get_collision_exceptions` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_soft_body_get_collision_layer` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_soft_body_get_collision_mask` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_soft_body_get_damping_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_soft_body_get_drag_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_soft_body_get_linear_stiffness` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_soft_body_get_point_global_position` **(** :ref:`RID` body, :ref:`int` point_index **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_soft_body_get_pressure_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_soft_body_get_simulation_precision` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_soft_body_get_space` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_soft_body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_soft_body_get_total_mass` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_soft_body_is_point_pinned` **(** :ref:`RID` body, :ref:`int` point_index **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_move_point` **(** :ref:`RID` body, :ref:`int` point_index, :ref:`Vector3` global_position **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_pin_point` **(** :ref:`RID` body, :ref:`int` point_index, :ref:`bool` pin **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_remove_all_pinned_points` **(** :ref:`RID` body **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` body_b **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_damping_coefficient` **(** :ref:`RID` body, :ref:`float` damping_coefficient **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_drag_coefficient` **(** :ref:`RID` body, :ref:`float` drag_coefficient **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_linear_stiffness` **(** :ref:`RID` body, :ref:`float` linear_stiffness **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_mesh` **(** :ref:`RID` body, :ref:`RID` mesh **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_pressure_coefficient` **(** :ref:`RID` body, :ref:`float` pressure_coefficient **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_ray_pickable` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_simulation_precision` **(** :ref:`RID` body, :ref:`int` simulation_precision **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` variant **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_total_mass` **(** :ref:`RID` body, :ref:`float` total_mass **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_transform` **(** :ref:`RID` body, :ref:`Transform3D` transform **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_update_rendering_server` **(** :ref:`RID` body, :ref:`PhysicsServer3DRenderingServerHandler` rendering_server_handler **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_space_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_space_get_contact_count` **(** :ref:`RID` space **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array` | :ref:`_space_get_contacts` **(** :ref:`RID` space **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsDirectSpaceState3D` | :ref:`_space_get_direct_state` **(** :ref:`RID` space **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_space_get_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_space_is_active` **(** :ref:`RID` space **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_space_set_active` **(** :ref:`RID` space, :ref:`bool` active **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_space_set_debug_contacts` **(** :ref:`RID` space, :ref:`int` max_contacts **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_space_set_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_sphere_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_step` **(** :ref:`float` step **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_sync` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_world_boundary_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`body_test_motion_is_excluding_body` **(** :ref:`RID` body **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`body_test_motion_is_excluding_object` **(** :ref:`int` object **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_attach_object_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_clear_shapes` **(** :ref:`RID` area **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_area_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_collision_layer` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_collision_mask` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_object_instance_id` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_area_get_param` **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_area_get_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_shape_count` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`_area_get_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_area_get_space` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`_area_get_transform` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_remove_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_area_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_collision_layer` **(** :ref:`RID` area, :ref:`int` layer **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_collision_mask` **(** :ref:`RID` area, :ref:`int` mask **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_monitorable` **(** :ref:`RID` area, :ref:`bool` monitorable **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_param` **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_ray_pickable` **(** :ref:`RID` area, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_shape` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_shape_disabled` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_space` **(** :ref:`RID` area, :ref:`RID` space **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_transform` **(** :ref:`RID` area, :ref:`Transform3D` transform **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_constant_central_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_central_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_central_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_force` **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse, :ref:`Vector3` position **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_torque_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_attach_object_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_clear_shapes` **(** :ref:`RID` body **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_body_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`_body_get_collision_exceptions` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_collision_layer` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_collision_mask` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_body_get_collision_priority` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_body_get_constant_force` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_body_get_constant_torque` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_body_get_contacts_reported_depth_threshold` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectBodyState3D` | :ref:`_body_get_direct_state` **(** :ref:`RID` body **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_max_contacts_reported` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BodyMode` | :ref:`_body_get_mode` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_object_instance_id` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_body_get_param` **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_body_get_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_shape_count` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`_body_get_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_body_get_space` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_user_flags` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_body_is_axis_locked` **(** :ref:`RID` body, :ref:`BodyAxis` axis **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_body_is_continuous_collision_detection_enabled` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_body_is_omitting_force_integration` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_remove_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_reset_mass_properties` **(** :ref:`RID` body **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_axis_lock` **(** :ref:`RID` body, :ref:`BodyAxis` axis, :ref:`bool` lock **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_axis_velocity` **(** :ref:`RID` body, :ref:`Vector3` axis_velocity **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_collision_priority` **(** :ref:`RID` body, :ref:`float` priority **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_contacts_reported_depth_threshold` **(** :ref:`RID` body, :ref:`float` threshold **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_enable_continuous_collision_detection` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_max_contacts_reported` **(** :ref:`RID` body, :ref:`int` amount **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_mode` **(** :ref:`RID` body, :ref:`BodyMode` mode **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_omit_force_integration` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_param` **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_ray_pickable` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_shape` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_shape_disabled` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_state_sync_callback` **(** :ref:`RID` body, :ref:`Callable` callable **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_user_flags` **(** :ref:`RID` body, :ref:`int` flags **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_body_test_motion` **(** :ref:`RID` body, :ref:`Transform3D` from, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` max_collisions, :ref:`bool` collide_separation_ray, :ref:`bool` recovery_as_collision, PhysicsServer3DExtensionMotionResult* result **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_box_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_capsule_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_concave_polygon_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_cone_twist_joint_get_param` **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_cone_twist_joint_set_param` **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_convex_polygon_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_custom_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_cylinder_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_end_sync` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_finish` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_flush_queries` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_free_rid` **(** :ref:`RID` rid **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_generic_6dof_joint_get_flag` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_generic_6dof_joint_get_param` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_generic_6dof_joint_set_flag` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_generic_6dof_joint_set_param` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_process_info` **(** :ref:`ProcessInfo` process_info **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_heightmap_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_hinge_joint_get_flag` **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_hinge_joint_get_param` **(** :ref:`RID` joint, :ref:`HingeJointParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_hinge_joint_set_flag` **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag, :ref:`bool` enabled **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_hinge_joint_set_param` **(** :ref:`RID` joint, :ref:`HingeJointParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_init` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_flushing_queries` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_clear` **(** :ref:`RID` joint **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_joint_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_disable_collisions_between_bodies` **(** :ref:`RID` joint, :ref:`bool` disable **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_joint_get_solver_priority` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`JointType` | :ref:`_joint_get_type` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_joint_is_disabled_collisions_between_bodies` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_cone_twist` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_generic_6dof` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_hinge` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` hinge_A, :ref:`RID` body_B, :ref:`Transform3D` hinge_B **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_hinge_simple` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` pivot_A, :ref:`Vector3` axis_A, :ref:`RID` body_B, :ref:`Vector3` pivot_B, :ref:`Vector3` axis_B **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_pin` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` local_A, :ref:`RID` body_B, :ref:`Vector3` local_B **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_slider` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_set_solver_priority` **(** :ref:`RID` joint, :ref:`int` priority **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_pin_joint_get_local_a` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_pin_joint_get_local_b` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_pin_joint_get_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_pin_joint_set_local_a` **(** :ref:`RID` joint, :ref:`Vector3` local_A **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_pin_joint_set_local_b` **(** :ref:`RID` joint, :ref:`Vector3` local_B **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_pin_joint_set_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_separation_ray_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_active` **(** :ref:`bool` active **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shape_get_custom_solver_bias` **(** :ref:`RID` shape **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_shape_get_data` **(** :ref:`RID` shape **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shape_get_margin` **(** :ref:`RID` shape **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ShapeType` | :ref:`_shape_get_type` **(** :ref:`RID` shape **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shape_set_custom_solver_bias` **(** :ref:`RID` shape, :ref:`float` bias **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shape_set_data` **(** :ref:`RID` shape, :ref:`Variant` data **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shape_set_margin` **(** :ref:`RID` shape, :ref:`float` margin **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_slider_joint_get_param` **(** :ref:`RID` joint, :ref:`SliderJointParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_slider_joint_set_param` **(** :ref:`RID` joint, :ref:`SliderJointParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` body_b **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_soft_body_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`_soft_body_get_bounds` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`_soft_body_get_collision_exceptions` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_soft_body_get_collision_layer` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_soft_body_get_collision_mask` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_soft_body_get_damping_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_soft_body_get_drag_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_soft_body_get_linear_stiffness` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_soft_body_get_point_global_position` **(** :ref:`RID` body, :ref:`int` point_index **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_soft_body_get_pressure_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_soft_body_get_simulation_precision` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_soft_body_get_space` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_soft_body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_soft_body_get_total_mass` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_soft_body_is_point_pinned` **(** :ref:`RID` body, :ref:`int` point_index **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_move_point` **(** :ref:`RID` body, :ref:`int` point_index, :ref:`Vector3` global_position **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_pin_point` **(** :ref:`RID` body, :ref:`int` point_index, :ref:`bool` pin **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_remove_all_pinned_points` **(** :ref:`RID` body **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` body_b **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_damping_coefficient` **(** :ref:`RID` body, :ref:`float` damping_coefficient **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_drag_coefficient` **(** :ref:`RID` body, :ref:`float` drag_coefficient **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_linear_stiffness` **(** :ref:`RID` body, :ref:`float` linear_stiffness **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_mesh` **(** :ref:`RID` body, :ref:`RID` mesh **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_pressure_coefficient` **(** :ref:`RID` body, :ref:`float` pressure_coefficient **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_ray_pickable` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_simulation_precision` **(** :ref:`RID` body, :ref:`int` simulation_precision **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` variant **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_total_mass` **(** :ref:`RID` body, :ref:`float` total_mass **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_transform` **(** :ref:`RID` body, :ref:`Transform3D` transform **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_update_rendering_server` **(** :ref:`RID` body, :ref:`PhysicsServer3DRenderingServerHandler` rendering_server_handler **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_space_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_space_get_contact_count` **(** :ref:`RID` space **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`_space_get_contacts` **(** :ref:`RID` space **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState3D` | :ref:`_space_get_direct_state` **(** :ref:`RID` space **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_space_get_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_space_is_active` **(** :ref:`RID` space **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_space_set_active` **(** :ref:`RID` space, :ref:`bool` active **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_space_set_debug_contacts` **(** :ref:`RID` space, :ref:`int` max_contacts **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_space_set_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_sphere_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_step` **(** :ref:`float` step **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_sync` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_world_boundary_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`body_test_motion_is_excluding_body` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`body_test_motion_is_excluding_object` **(** :ref:`int` object **)** |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -1623,7 +1630,7 @@ void **_body_set_user_flags** **(** :ref:`RID` body, :ref:`int` **_body_test_motion** **(** :ref:`RID` body, :ref:`Transform3D` from, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` max_collisions, :ref:`bool` collide_separation_ray, PhysicsServer3DExtensionMotionResult* result **)** |virtual| |const| +:ref:`bool` **_body_test_motion** **(** :ref:`RID` body, :ref:`Transform3D` from, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` max_collisions, :ref:`bool` collide_separation_ray, :ref:`bool` recovery_as_collision, PhysicsServer3DExtensionMotionResult* result **)** |virtual| |const| .. container:: contribute diff --git a/classes/class_physicsserver3dmanager.rst b/classes/class_physicsserver3dmanager.rst index 93b20cf7fb6..545377364c2 100644 --- a/classes/class_physicsserver3dmanager.rst +++ b/classes/class_physicsserver3dmanager.rst @@ -12,14 +12,14 @@ PhysicsServer3DManager **Inherits:** :ref:`Object` -Manager for 3D physics server implementations. +A singleton for managing :ref:`PhysicsServer3D` implementations. .. rst-class:: classref-introduction-group Description ----------- -**PhysicsServer3DManager** is the API for registering :ref:`PhysicsServer3D` implementations, and for setting the default implementation. +**PhysicsServer3DManager** is the API for registering :ref:`PhysicsServer3D` implementations and for setting the default implementation. \ **Note:** It is not possible to switch physics servers at runtime. This class is only used on startup at the server initialization level, by Godot itself and possibly by GDExtensions. diff --git a/classes/class_physicsserver3drenderingserverhandler.rst b/classes/class_physicsserver3drenderingserverhandler.rst index fd2b278b32c..c054d1dccff 100644 --- a/classes/class_physicsserver3drenderingserverhandler.rst +++ b/classes/class_physicsserver3drenderingserverhandler.rst @@ -12,9 +12,7 @@ PhysicsServer3DRenderingServerHandler **Inherits:** :ref:`Object` -.. container:: contribute - - There is currently no description for this class. Please help us by :ref:`contributing one `! +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 3d7646466f1..49f820aa96a 100644 --- a/classes/class_physicsshapequeryparameters2d.rst +++ b/classes/class_physicsshapequeryparameters2d.rst @@ -12,14 +12,14 @@ PhysicsShapeQueryParameters2D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Parameters to be sent to a 2D shape physics query. +Provides parameters for :ref:`PhysicsDirectSpaceState2D.intersect_shape`. .. rst-class:: classref-introduction-group Description ----------- -This class contains the shape and other parameters for :ref:`PhysicsDirectSpaceState2D` intersection/collision queries. +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 diff --git a/classes/class_physicsshapequeryparameters3d.rst b/classes/class_physicsshapequeryparameters3d.rst index 630338ecd67..d940f8ac551 100644 --- a/classes/class_physicsshapequeryparameters3d.rst +++ b/classes/class_physicsshapequeryparameters3d.rst @@ -12,14 +12,14 @@ PhysicsShapeQueryParameters3D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Parameters to be sent to a 3D shape physics query. +Provides parameters for :ref:`PhysicsDirectSpaceState3D.intersect_shape`. .. rst-class:: classref-introduction-group Description ----------- -This class contains the shape and other parameters for :ref:`PhysicsDirectSpaceState3D` intersection/collision queries. +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 diff --git a/classes/class_physicstestmotionparameters2d.rst b/classes/class_physicstestmotionparameters2d.rst index 055c9844446..c1470dcff43 100644 --- a/classes/class_physicstestmotionparameters2d.rst +++ b/classes/class_physicstestmotionparameters2d.rst @@ -12,14 +12,14 @@ PhysicsTestMotionParameters2D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Parameters to be sent to a 2D body motion test. +Provides parameters for :ref:`PhysicsServer2D.body_test_motion`. .. rst-class:: classref-introduction-group Description ----------- -This class contains parameters used in :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 diff --git a/classes/class_physicstestmotionparameters3d.rst b/classes/class_physicstestmotionparameters3d.rst index 571d898b123..b19e7c64c5a 100644 --- a/classes/class_physicstestmotionparameters3d.rst +++ b/classes/class_physicstestmotionparameters3d.rst @@ -12,14 +12,14 @@ PhysicsTestMotionParameters3D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Parameters to be sent to a 3D body motion test. +Provides parameters for :ref:`PhysicsServer3D.body_test_motion`. .. rst-class:: classref-introduction-group Description ----------- -This class contains parameters used in :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 diff --git a/classes/class_physicstestmotionresult2d.rst b/classes/class_physicstestmotionresult2d.rst index 9571f339f3a..ac70482497c 100644 --- a/classes/class_physicstestmotionresult2d.rst +++ b/classes/class_physicstestmotionresult2d.rst @@ -12,14 +12,14 @@ PhysicsTestMotionResult2D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Result from a 2D body motion test. +Describes the motion and collision result from :ref:`PhysicsServer2D.body_test_motion`. .. rst-class:: classref-introduction-group Description ----------- -This class contains 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 diff --git a/classes/class_physicstestmotionresult3d.rst b/classes/class_physicstestmotionresult3d.rst index 6e30efd1816..37d1d069a7f 100644 --- a/classes/class_physicstestmotionresult3d.rst +++ b/classes/class_physicstestmotionresult3d.rst @@ -12,14 +12,14 @@ PhysicsTestMotionResult3D **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Result from a 3D body motion test. +Describes the motion and collision result from :ref:`PhysicsServer3D.body_test_motion`. .. rst-class:: classref-introduction-group Description ----------- -This class contains 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 diff --git a/classes/class_pinjoint2d.rst b/classes/class_pinjoint2d.rst index 8166dda49d6..bcb84da9c25 100644 --- a/classes/class_pinjoint2d.rst +++ b/classes/class_pinjoint2d.rst @@ -12,14 +12,14 @@ PinJoint2D **Inherits:** :ref:`Joint2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Pin joint for 2D shapes. +A physics joint that attaches two 2D physics bodies at a single point, allowing them to freely rotate. .. rst-class:: classref-introduction-group Description ----------- -Pin joint for 2D rigid bodies. It pins two bodies (dynamic or static) together. +A physics joint that attaches two 2D physics bodies at a single point, allowing them to freely rotate. For example, a :ref:`RigidBody2D` can be attached to a :ref:`StaticBody2D` to create a pendulum or a seesaw. .. rst-class:: classref-reftable-group diff --git a/classes/class_pinjoint3d.rst b/classes/class_pinjoint3d.rst index b831402d806..cf8fee45471 100644 --- a/classes/class_pinjoint3d.rst +++ b/classes/class_pinjoint3d.rst @@ -12,14 +12,14 @@ PinJoint3D **Inherits:** :ref:`Joint3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -Pin joint for 3D PhysicsBodies. +A physics joint that attaches two 3D physics bodies at a single point, allowing them to freely rotate. .. rst-class:: classref-introduction-group Description ----------- -Pin joint for 3D rigid bodies. It pins 2 bodies (dynamic or static) together. See also :ref:`Generic6DOFJoint3D`. +A physics joint that attaches two 2D physics bodies at a single point, allowing them to freely rotate. For example, a :ref:`RigidBody3D` can be attached to a :ref:`StaticBody3D` to create a pendulum or a seesaw. .. rst-class:: classref-reftable-group diff --git a/classes/class_placeholdercubemap.rst b/classes/class_placeholdercubemap.rst index 777f5908ab7..e687597e138 100644 --- a/classes/class_placeholdercubemap.rst +++ b/classes/class_placeholdercubemap.rst @@ -25,6 +25,8 @@ This class is used when loading a project that uses a :ref:`Cubemap` is the normal of the plane (a, b, c normalized), and :ref:`d` is the distance from the origin to the plane (in the direction of "normal"). "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing. .. rst-class:: classref-introduction-group diff --git a/classes/class_polygon2d.rst b/classes/class_polygon2d.rst index 2035a93fc6e..c125fa28cdb 100644 --- a/classes/class_polygon2d.rst +++ b/classes/class_polygon2d.rst @@ -121,9 +121,7 @@ If ``true``, polygon edges will be anti-aliased. :ref:`Array` **bones** = ``[]`` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Internal list of :ref:`Bone2D` nodes used by the assigned :ref:`skeleton`. Edited using the Polygon2D editor ("UV" button on the top toolbar). .. rst-class:: classref-item-separator @@ -157,9 +155,7 @@ The polygon's fill color. If ``texture`` is defined, it will be multiplied by th - void **set_internal_vertex_count** **(** :ref:`int` value **)** - :ref:`int` **get_internal_vertex_count** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Number of internal vertices, used for UV mapping. .. rst-class:: classref-item-separator @@ -263,9 +259,7 @@ The list of polygons, in case more than one is being represented. Every individu - void **set_skeleton** **(** :ref:`NodePath` value **)** - :ref:`NodePath` **get_skeleton** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Path to a :ref:`Skeleton2D` node used for skeleton-based deformations of this polygon. If empty or invalid, skeletal deformations will not be used. .. rst-class:: classref-item-separator @@ -444,7 +438,7 @@ Returns the path to the node associated with the specified bone. :ref:`PackedFloat32Array` **get_bone_weights** **(** :ref:`int` index **)** |const| -Returns the height values of the specified bone. +Returns the weight values of the specified bone. .. rst-class:: classref-item-separator diff --git a/classes/class_popup.rst b/classes/class_popup.rst index f8c9f3f7b8a..a02a1f19740 100644 --- a/classes/class_popup.rst +++ b/classes/class_popup.rst @@ -14,14 +14,14 @@ Popup **Inherited By:** :ref:`PopupMenu`, :ref:`PopupPanel` -Popup is a base window container for popup-like subwindows. +Base class for contextual windows and panels with fixed position. .. rst-class:: classref-introduction-group Description ----------- -Popup is a base window container for popup-like subwindows. It's a modal by default (see :ref:`Window.popup_window`) and has helpers for custom popup behavior. +**Popup** is a base class for contextual windows and panels with fixed position. It's a modal by default (see :ref:`Window.popup_window`) and provides methods for implementing custom popup behavior. .. rst-class:: classref-reftable-group diff --git a/classes/class_popupmenu.rst b/classes/class_popupmenu.rst index 503a0d9c85d..2c7f2674a0c 100644 --- a/classes/class_popupmenu.rst +++ b/classes/class_popupmenu.rst @@ -12,23 +12,23 @@ PopupMenu **Inherits:** :ref:`Popup` **<** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` -PopupMenu displays a list of options. +A modal window used to display a list of options. .. rst-class:: classref-introduction-group Description ----------- -**PopupMenu** is a modal window used to display a list of options. They are popular in toolbars or context menus. +**PopupMenu** is a modal window used to display a list of options. Useful for toolbars and context menus. -The size of a **PopupMenu** can be limited by using :ref:`Window.max_size`. If the height of the list of items is larger than the maximum height of the **PopupMenu**, a :ref:`ScrollContainer` within the popup will allow the user to scroll the contents. +The size of a **PopupMenu** can be limited by using :ref:`Window.max_size`. If the height of the list of items is larger than the maximum height of the **PopupMenu**, a :ref:`ScrollContainer` within the popup will allow the user to scroll the contents. If no maximum size is set, or if it is set to ``0``, the **PopupMenu** height will be limited by its parent rect. -If no maximum size is set, or if it is set to 0, the **PopupMenu** height will be limited by its parent rect. - -All ``set_*`` methods allow negative item index, which makes the item accessed from the last one. +All ``set_*`` methods allow negative item indices, i.e. ``-1`` to access the last item, ``-2`` to select the second-to-last item, and so on. \ **Incremental search:** Like :ref:`ItemList` and :ref:`Tree`, **PopupMenu** 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`. +\ **Note:** The ID values used for items are limited to 32 bits, not full 64 bits of :ref:`int`. This has a range of ``-2^32`` to ``2^32 - 1``, i.e. ``-2147483648`` to ``2147483647``. + .. rst-class:: classref-reftable-group Properties @@ -98,6 +98,10 @@ Methods +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture2D` | :ref:`get_item_icon` **(** :ref:`int` index **)** |const| | +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_item_icon_max_width` **(** :ref:`int` index **)** |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_item_icon_modulate` **(** :ref:`int` index **)** |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_item_id` **(** :ref:`int` index **)** |const| | +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_item_indent` **(** :ref:`int` index **)** |const| | @@ -150,6 +154,10 @@ Methods +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_icon` **(** :ref:`int` index, :ref:`Texture2D` icon **)** | +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_icon_max_width` **(** :ref:`int` index, :ref:`int` width **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_icon_modulate` **(** :ref:`int` index, :ref:`Color` modulate **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_id` **(** :ref:`int` index, :ref:`int` id **)** | +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_indent` **(** :ref:`int` index, :ref:`int` indent **)** | @@ -202,6 +210,8 @@ Theme Properties +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`h_separation` | ``4`` | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`icon_max_width` | ``0`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`indent` | ``10`` | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`item_end_padding` | ``2`` | @@ -678,7 +688,7 @@ Returns the index of the currently focused item. Returns ``-1`` if no item is fo :ref:`Key` **get_item_accelerator** **(** :ref:`int` index **)** |const| -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 boolean 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 @@ -696,6 +706,30 @@ Returns the icon of the item at the given ``index``. ---- +.. _class_PopupMenu_method_get_item_icon_max_width: + +.. rst-class:: classref-method + +:ref:`int` **get_item_icon_max_width** **(** :ref:`int` index **)** |const| + +Returns the maximum allowed width of the icon for the item at the given ``index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PopupMenu_method_get_item_icon_modulate: + +.. rst-class:: classref-method + +:ref:`Color` **get_item_icon_modulate** **(** :ref:`int` index **)** |const| + +Returns a :ref:`Color` modulating the item's icon at the given ``index``. + +.. rst-class:: classref-item-separator + +---- + .. _class_PopupMenu_method_get_item_id: .. rst-class:: classref-method @@ -940,7 +974,7 @@ Passing ``-1`` as the index makes so that no item is focused. void **set_item_accelerator** **(** :ref:`int` index, :ref:`Key` accel **)** -Sets 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. ``accel`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using boolean OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). +Sets 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. ``accel`` 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`). .. rst-class:: classref-item-separator @@ -1020,6 +1054,30 @@ Replaces the :ref:`Texture2D` icon of the item at the given ``i ---- +.. _class_PopupMenu_method_set_item_icon_max_width: + +.. rst-class:: classref-method + +void **set_item_icon_max_width** **(** :ref:`int` index, :ref:`int` width **)** + +Sets the maximum allowed width of the icon for the item at the given ``index``. This limit is applied on top of the default size of the icon and on top of :ref:`icon_max_width`. The height is adjusted according to the icon's ratio. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PopupMenu_method_set_item_icon_modulate: + +.. rst-class:: classref-method + +void **set_item_icon_modulate** **(** :ref:`int` index, :ref:`Color` modulate **)** + +Sets a modulating :ref:`Color` of the item's icon at the given ``index``. + +.. rst-class:: classref-item-separator + +---- + .. _class_PopupMenu_method_set_item_id: .. rst-class:: classref-method @@ -1279,6 +1337,18 @@ The horizontal space between the item's elements. ---- +.. _class_PopupMenu_theme_constant_icon_max_width: + +.. rst-class:: classref-themeproperty + +:ref:`int` **icon_max_width** = ``0`` + +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 + +---- + .. _class_PopupMenu_theme_constant_indent: .. rst-class:: classref-themeproperty diff --git a/classes/class_popuppanel.rst b/classes/class_popuppanel.rst index 5f43de45d0e..f642f954380 100644 --- a/classes/class_popuppanel.rst +++ b/classes/class_popuppanel.rst @@ -12,16 +12,14 @@ PopupPanel **Inherits:** :ref:`Popup` **<** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` -Class for displaying popups with a panel background. +A popup with a panel background. .. rst-class:: classref-introduction-group Description ----------- -Class for displaying popups with a panel background. In some cases it might be simpler to use than :ref:`Popup`, since it provides a configurable background. If you are making windows, better check :ref:`Window`. - -If any :ref:`Control` node is added as a child of this **PopupPanel**, it will be stretched to fit the panel's size (similar to how :ref:`PanelContainer` works). +A popup with a configurable panel background. Any child controls added to this node will be stretched to fit the panel's size (similar to how :ref:`PanelContainer` works). If you are making windows, see :ref:`Window`. .. rst-class:: classref-reftable-group diff --git a/classes/class_progressbar.rst b/classes/class_progressbar.rst index 5d151668824..21d7e9c190d 100644 --- a/classes/class_progressbar.rst +++ b/classes/class_progressbar.rst @@ -12,14 +12,14 @@ ProgressBar **Inherits:** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -General-purpose progress bar. +A control used for visual representation of a percentage. .. rst-class:: classref-introduction-group Description ----------- -General-purpose progress bar. Shows fill percentage from right to left. +A control used for visual representation of a percentage. Shows fill percentage from right to left. .. rst-class:: classref-reftable-group diff --git a/classes/class_projection.rst b/classes/class_projection.rst index 863cb03d480..40b30c4b18c 100644 --- a/classes/class_projection.rst +++ b/classes/class_projection.rst @@ -10,7 +10,7 @@ Projection ========== -3D projection (4x4 matrix). +A 4×4 matrix for 3D projective transformations. .. rst-class:: classref-introduction-group @@ -19,7 +19,7 @@ Description A 4x4 matrix used for 3D projective transformations. It can represent transformations such as translation, rotation, scaling, shearing, and perspective division. It consists of four :ref:`Vector4` columns. -For purely linear transformations (translation, rotation, and scale), it is recommended to use :ref:`Transform3D`, as it is more performant and has a lower memory footprint. +For purely linear transformations (translation, rotation, and scale), it is recommended to use :ref:`Transform3D`, as it is more performant and requires less memory. Used internally as :ref:`Camera3D`'s projection matrix. diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index 27445c016c9..efbf4dd7264 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -12,14 +12,14 @@ ProjectSettings **Inherits:** :ref:`Object` -Contains global variables accessible from everywhere. +Stores globally-accessible variables. .. rst-class:: classref-introduction-group Description ----------- -Contains global variables accessible 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. @@ -59,12 +59,12 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`application/boot_splash/use_filter` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/config/auto_accept_quit` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/config/custom_user_dir_name` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/config/description` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`application/config/features` | | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/config/icon` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/config/macos_native_icon` | ``""`` | @@ -75,12 +75,16 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/config/project_settings_override` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/config/quit_on_go_back` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`application/config/use_custom_user_dir` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`application/config/use_hidden_project_data_directory` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/config/windows_native_icon` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/run/delta_smoothing` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`application/run/disable_stderr` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`application/run/disable_stdout` | ``false`` | @@ -95,6 +99,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`application/run/low_processor_mode_sleep_usec` | ``6900`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/run/main_loop_type` | ``"SceneTree"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/run/main_scene` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`application/run/max_fps` | ``0`` | @@ -121,6 +127,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`audio/general/3d_panning_strength` | ``0.5`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`audio/general/text_to_speech` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`audio/video/video_delay_compensation_ms` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`compression/formats/gzip/compression_level` | ``-1`` | @@ -181,6 +189,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/redundant_await` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/redundant_static_unload` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debug/gdscript/warnings/renamed_in_godot_4_hint` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/return_value_discarded` | ``0`` | @@ -239,6 +249,46 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debug/settings/stdout/verbose_stdout` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/shader_language/warnings/device_limit_exceeded` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/shader_language/warnings/enable` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/shader_language/warnings/float_comparison` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/shader_language/warnings/formatting_error` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/shader_language/warnings/treat_warnings_as_errors` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/shader_language/warnings/unused_constant` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/shader_language/warnings/unused_function` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/shader_language/warnings/unused_local_variable` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/shader_language/warnings/unused_struct` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/shader_language/warnings/unused_uniform` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/shader_language/warnings/unused_varying` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`debug/shapes/avoidance/agents_radius_color` | ``Color(1, 1, 0, 0.25)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/shapes/avoidance/enable_agents_radius` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/shapes/avoidance/enable_obstacles_radius` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/shapes/avoidance/enable_obstacles_static` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`debug/shapes/avoidance/obstacles_radius_color` | ``Color(1, 0.5, 0, 0.25)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`debug/shapes/avoidance/obstacles_static_edge_pushin_color` | ``Color(1, 0, 0, 1)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`debug/shapes/avoidance/obstacles_static_edge_pushout_color` | ``Color(1, 1, 0, 1)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`debug/shapes/avoidance/obstacles_static_face_pushin_color` | ``Color(1, 0, 0, 0)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`debug/shapes/avoidance/obstacles_static_face_pushout_color` | ``Color(1, 1, 0, 0.5)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`debug/shapes/collision/contact_color` | ``Color(1, 0.2, 0.1, 0.8)`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debug/shapes/collision/draw_2d_outlines` | ``true`` | @@ -339,12 +389,26 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`display/window/size/window_width_override` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`display/window/stretch/aspect` | ``"keep"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`display/window/stretch/mode` | ``"disabled"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`display/window/stretch/scale` | ``1.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`display/window/subwindows/embed_subwindows` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`display/window/vsync/vsync_mode` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`dotnet/project/assembly_name` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`dotnet/project/solution_directory` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editor/export/convert_text_resources_to_binary` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editor/import/reimport_missing_imported_files` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editor/import/use_multiple_threads` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`editor/movie_writer/disable_vsync` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`editor/movie_writer/fps` | ``60`` | @@ -365,12 +429,18 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`editor/naming/node_name_num_separator` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editor/naming/scene_name_casing` | ``2`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`editor/run/main_run_args` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`editor/script/search_in_file_extensions` | ``PackedStringArray("gd", "gdshader")`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`editor/script/templates_search_path` | ``"res://script_templates"`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editor/version_control/autoload_on_startup` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`editor/version_control/plugin_name` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`filesystem/import/blender/enabled` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`filesystem/import/blender/enabled.android` | ``false`` | @@ -385,10 +455,14 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`gui/common/default_scroll_deadzone` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`gui/common/snap_controls_to_pixels` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`gui/common/swap_cancel_ok` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`gui/common/text_edit_undo_stack_max_size` | ``1024`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`gui/fonts/dynamic_fonts/use_oversampling` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`gui/theme/custom` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`gui/theme/custom_font` | ``""`` | @@ -583,10 +657,6 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`internationalization/locale/test` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`internationalization/locale/translation_remaps` | | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`internationalization/locale/translations` | | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`internationalization/pseudolocalization/double_vowels` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`internationalization/pseudolocalization/expansion_ratio` | ``0.0`` | @@ -607,10 +677,28 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`internationalization/rendering/force_right_to_left_layout_direction` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`internationalization/rendering/root_node_layout_direction` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`internationalization/rendering/text_driver` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/2d_navigation/layer_1` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_2` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_3` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_4` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_5` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_6` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_7` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_8` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_9` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/2d_navigation/layer_10` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/2d_navigation/layer_11` | ``""`` | @@ -631,8 +719,6 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/2d_navigation/layer_19` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_navigation/layer_2` | ``""`` | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/2d_navigation/layer_20` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/2d_navigation/layer_21` | ``""`` | @@ -653,27 +739,29 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/2d_navigation/layer_29` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_navigation/layer_3` | ``""`` | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/2d_navigation/layer_30` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/2d_navigation/layer_31` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/2d_navigation/layer_32` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_navigation/layer_4` | ``""`` | + | :ref:`String` | :ref:`layer_names/2d_physics/layer_1` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_navigation/layer_5` | ``""`` | + | :ref:`String` | :ref:`layer_names/2d_physics/layer_2` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_navigation/layer_6` | ``""`` | + | :ref:`String` | :ref:`layer_names/2d_physics/layer_3` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_navigation/layer_7` | ``""`` | + | :ref:`String` | :ref:`layer_names/2d_physics/layer_4` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_navigation/layer_8` | ``""`` | + | :ref:`String` | :ref:`layer_names/2d_physics/layer_5` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_navigation/layer_9` | ``""`` | + | :ref:`String` | :ref:`layer_names/2d_physics/layer_6` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_physics/layer_1` | ``""`` | + | :ref:`String` | :ref:`layer_names/2d_physics/layer_7` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_8` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_9` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/2d_physics/layer_10` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -695,8 +783,6 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/2d_physics/layer_19` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_physics/layer_2` | ``""`` | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/2d_physics/layer_20` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/2d_physics/layer_21` | ``""`` | @@ -717,27 +803,29 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/2d_physics/layer_29` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_physics/layer_3` | ``""`` | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/2d_physics/layer_30` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/2d_physics/layer_31` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/2d_physics/layer_32` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_physics/layer_4` | ``""`` | + | :ref:`String` | :ref:`layer_names/2d_render/layer_1` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_physics/layer_5` | ``""`` | + | :ref:`String` | :ref:`layer_names/2d_render/layer_2` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_physics/layer_6` | ``""`` | + | :ref:`String` | :ref:`layer_names/2d_render/layer_3` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_physics/layer_7` | ``""`` | + | :ref:`String` | :ref:`layer_names/2d_render/layer_4` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_physics/layer_8` | ``""`` | + | :ref:`String` | :ref:`layer_names/2d_render/layer_5` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_physics/layer_9` | ``""`` | + | :ref:`String` | :ref:`layer_names/2d_render/layer_6` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_render/layer_1` | ``""`` | + | :ref:`String` | :ref:`layer_names/2d_render/layer_7` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_render/layer_8` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_render/layer_9` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/2d_render/layer_10` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -759,25 +847,25 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/2d_render/layer_19` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_render/layer_2` | ``""`` | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/2d_render/layer_20` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_render/layer_3` | ``""`` | + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_1` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_render/layer_4` | ``""`` | + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_2` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_render/layer_5` | ``""`` | + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_3` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_render/layer_6` | ``""`` | + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_4` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_render/layer_7` | ``""`` | + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_5` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_render/layer_8` | ``""`` | + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_6` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/2d_render/layer_9` | ``""`` | + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_7` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_navigation/layer_1` | ``""`` | + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_8` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_9` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/3d_navigation/layer_10` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -799,8 +887,6 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/3d_navigation/layer_19` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_navigation/layer_2` | ``""`` | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/3d_navigation/layer_20` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/3d_navigation/layer_21` | ``""`` | @@ -821,27 +907,29 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/3d_navigation/layer_29` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_navigation/layer_3` | ``""`` | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/3d_navigation/layer_30` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/3d_navigation/layer_31` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/3d_navigation/layer_32` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_navigation/layer_4` | ``""`` | + | :ref:`String` | :ref:`layer_names/3d_physics/layer_1` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_navigation/layer_5` | ``""`` | + | :ref:`String` | :ref:`layer_names/3d_physics/layer_2` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_navigation/layer_6` | ``""`` | + | :ref:`String` | :ref:`layer_names/3d_physics/layer_3` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_navigation/layer_7` | ``""`` | + | :ref:`String` | :ref:`layer_names/3d_physics/layer_4` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_navigation/layer_8` | ``""`` | + | :ref:`String` | :ref:`layer_names/3d_physics/layer_5` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_navigation/layer_9` | ``""`` | + | :ref:`String` | :ref:`layer_names/3d_physics/layer_6` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_physics/layer_1` | ``""`` | + | :ref:`String` | :ref:`layer_names/3d_physics/layer_7` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_8` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_9` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/3d_physics/layer_10` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -863,8 +951,6 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/3d_physics/layer_19` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_physics/layer_2` | ``""`` | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/3d_physics/layer_20` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/3d_physics/layer_21` | ``""`` | @@ -885,27 +971,29 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/3d_physics/layer_29` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_physics/layer_3` | ``""`` | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/3d_physics/layer_30` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/3d_physics/layer_31` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/3d_physics/layer_32` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_physics/layer_4` | ``""`` | + | :ref:`String` | :ref:`layer_names/3d_render/layer_1` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_physics/layer_5` | ``""`` | + | :ref:`String` | :ref:`layer_names/3d_render/layer_2` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_physics/layer_6` | ``""`` | + | :ref:`String` | :ref:`layer_names/3d_render/layer_3` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_physics/layer_7` | ``""`` | + | :ref:`String` | :ref:`layer_names/3d_render/layer_4` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_physics/layer_8` | ``""`` | + | :ref:`String` | :ref:`layer_names/3d_render/layer_5` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_physics/layer_9` | ``""`` | + | :ref:`String` | :ref:`layer_names/3d_render/layer_6` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_render/layer_1` | ``""`` | + | :ref:`String` | :ref:`layer_names/3d_render/layer_7` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_render/layer_8` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_render/layer_9` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/3d_render/layer_10` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -927,25 +1015,73 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/3d_render/layer_19` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_render/layer_2` | ``""`` | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/3d_render/layer_20` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_render/layer_3` | ``""`` | + | :ref:`String` | :ref:`layer_names/avoidance/layer_1` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_render/layer_4` | ``""`` | + | :ref:`String` | :ref:`layer_names/avoidance/layer_2` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_render/layer_5` | ``""`` | + | :ref:`String` | :ref:`layer_names/avoidance/layer_3` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_render/layer_6` | ``""`` | + | :ref:`String` | :ref:`layer_names/avoidance/layer_4` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_render/layer_7` | ``""`` | + | :ref:`String` | :ref:`layer_names/avoidance/layer_5` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_render/layer_8` | ``""`` | + | :ref:`String` | :ref:`layer_names/avoidance/layer_6` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`layer_names/3d_render/layer_9` | ``""`` | + | :ref:`String` | :ref:`layer_names/avoidance/layer_7` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_8` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_9` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_10` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_11` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_12` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_13` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_14` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_15` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_16` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_17` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_18` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_19` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_20` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_21` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_22` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_23` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_24` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`memory/limits/message_queue/max_size_kb` | ``4096`` | + | :ref:`String` | :ref:`layer_names/avoidance/layer_25` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_26` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_27` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_28` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_29` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_30` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_31` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/avoidance/layer_32` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`memory/limits/message_queue/max_size_mb` | ``32`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`memory/limits/multithreaded_server/rid_pool_prealloc` | ``60`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -955,12 +1091,20 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`navigation/2d/default_link_connection_radius` | ``4`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`navigation/2d/use_edge_connections` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`navigation/3d/default_cell_size` | ``0.25`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`navigation/3d/default_edge_connection_margin` | ``0.25`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`navigation/3d/default_link_connection_radius` | ``1.0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`navigation/3d/use_edge_connections` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`navigation/avoidance/thread_model/avoidance_use_high_priority_threads` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`navigation/avoidance/thread_model/avoidance_use_multiple_threads` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`network/limits/debugger/max_chars_per_second` | ``32768`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`network/limits/debugger/max_errors_per_second` | ``400`` | @@ -975,10 +1119,6 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`network/limits/webrtc/max_channel_in_buffer_kb` | ``64`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`network/remote_fs/page_read_ahead` | ``4`` | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`network/remote_fs/page_size` | ``65536`` | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`network/tls/certificate_bundle_override` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`physics/2d/default_angular_damp` | ``1.0`` | @@ -1275,6 +1415,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`rendering/rendering_device/driver.windows` | ``"vulkan"`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rendering/rendering_device/pipeline_cache/save_chunk_size_mb` | ``3.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/rendering_device/staging_buffer/block_size_kb` | ``256`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/rendering_device/staging_buffer/max_size_mb` | ``128`` | @@ -1307,6 +1449,10 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/shading/overrides/force_vertex_shading.mobile` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/textures/canvas_textures/default_texture_filter` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/textures/canvas_textures/default_texture_repeat` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/textures/decals/filter` | ``3`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/textures/default_filters/anisotropic_filtering_level` | ``2`` | @@ -1319,9 +1465,9 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/textures/lossless_compression/force_png` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`rendering/textures/vram_compression/import_etc2_astc` | | + | :ref:`bool` | :ref:`rendering/textures/vram_compression/import_etc2_astc` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`rendering/textures/vram_compression/import_s3tc_bptc` | | + | :ref:`bool` | :ref:`rendering/textures/vram_compression/import_s3tc_bptc` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/textures/webp_compression/compression_method` | ``2`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -1347,6 +1493,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`xr/openxr/reference_space` | ``"1"`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`xr/openxr/startup_alert` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`xr/openxr/submit_depth_buffer` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`xr/openxr/view_configuration` | ``"1"`` | @@ -1387,6 +1535,10 @@ Methods +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`save_custom` **(** :ref:`String` file **)** | +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_as_basic` **(** :ref:`String` name, :ref:`bool` basic **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_as_internal` **(** :ref:`String` name, :ref:`bool` internal **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_initial_value` **(** :ref:`String` name, :ref:`Variant` value **)** | +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_order` **(** :ref:`String` name, :ref:`int` position **)** | @@ -1479,39 +1631,39 @@ If ``true``, applies linear filtering when scaling the image (recommended for hi ---- -.. _class_ProjectSettings_property_application/config/custom_user_dir_name: +.. _class_ProjectSettings_property_application/config/auto_accept_quit: .. rst-class:: classref-property -:ref:`String` **application/config/custom_user_dir_name** = ``""`` - -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`). +:ref:`bool` **application/config/auto_accept_quit** = ``true`` -The :ref:`application/config/use_custom_user_dir` setting must be enabled for this to take effect. +If ``true``, the application automatically accepts quitting requests. .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_application/config/description: +.. _class_ProjectSettings_property_application/config/custom_user_dir_name: .. rst-class:: classref-property -:ref:`String` **application/config/description** = ``""`` +:ref:`String` **application/config/custom_user_dir_name** = ``""`` -The project's description, displayed as a tooltip in the Project Manager when hovering the project. +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. .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_application/config/features: +.. _class_ProjectSettings_property_application/config/description: .. rst-class:: classref-property -:ref:`PackedStringArray` **application/config/features** +:ref:`String` **application/config/description** = ``""`` -List of internal features associated with the project, like ``Double Precision`` or ``C#``. Not to be confused with feature tags. +The project's description, displayed as a tooltip in the Project Manager when hovering the project. .. rst-class:: classref-item-separator @@ -1523,7 +1675,7 @@ List of internal features associated with the project, like ``Double Precision`` :ref:`String` **application/config/icon** = ``""`` -Icon used for the project, set when project loads. Exporters will also use this icon when possible. +Icon used for the project, set when project loads. Exporters will also use this icon as a fallback if necessary. .. rst-class:: classref-item-separator @@ -1581,6 +1733,18 @@ Specifies a file to override project settings. For example: ``user://custom_sett ---- +.. _class_ProjectSettings_property_application/config/quit_on_go_back: + +.. rst-class:: classref-property + +:ref:`bool` **application/config/quit_on_go_back** = ``true`` + +If ``true``, the application quits automatically when navigating back (e.g. using the system "Back" button on Android). + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_application/config/use_custom_user_dir: .. rst-class:: classref-property @@ -1625,6 +1789,22 @@ Icon set in ``.ico`` format used on Windows to set the game's icon. This is done ---- +.. _class_ProjectSettings_property_application/run/delta_smoothing: + +.. rst-class:: classref-property + +:ref:`bool` **application/run/delta_smoothing** = ``true`` + +Time samples for frame deltas are subject to random variation introduced by the platform, even when frames are displayed at regular intervals thanks to V-Sync. This can lead to jitter. Delta smoothing can often give a better result by filtering the input deltas to correct for minor fluctuations from the refresh rate. + +\ **Note:** Delta smoothing is only attempted when :ref:`display/window/vsync/vsync_mode` is set to ``enabled``, as it does not work well without V-Sync. + +It may take several seconds at a stable frame rate before the smoothing is initially activated. It will only be active on machines where performance is adequate to render frames at the refresh rate. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_application/run/disable_stderr: .. rst-class:: classref-property @@ -1721,25 +1901,37 @@ Amount of sleeping between frames when the low-processor usage mode is enabled ( ---- -.. _class_ProjectSettings_property_application/run/main_scene: +.. _class_ProjectSettings_property_application/run/main_loop_type: .. rst-class:: classref-property -:ref:`String` **application/run/main_scene** = ``""`` +:ref:`String` **application/run/main_loop_type** = ``"SceneTree"`` -Path to the main scene file that will be loaded when the project runs. +The name of the type implementing the engine's main loop. .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_application/run/max_fps: +.. _class_ProjectSettings_property_application/run/main_scene: .. rst-class:: classref-property -:ref:`int` **application/run/max_fps** = ``0`` +:ref:`String` **application/run/main_scene** = ``""`` -Maximum number of frames per second allowed. A value of ``0`` means "no limit". The actual number of frames per second may still be below this value if the CPU or GPU cannot keep up with the project logic and rendering. +Path to the main scene file that will be loaded when the project runs. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_application/run/max_fps: + +.. rst-class:: classref-property + +:ref:`int` **application/run/max_fps** = ``0`` + +Maximum number of frames per second allowed. A value of ``0`` means "no limit". The actual number of frames per second may still be below this value if the CPU or GPU cannot keep up with the project logic and rendering. Limiting the FPS can be useful to reduce system power consumption, which reduces heat and noise emissions (and improves battery life on mobile devices). @@ -1903,6 +2095,20 @@ The default value of ``0.5`` is tuned for headphones. When using speakers, you m ---- +.. _class_ProjectSettings_property_audio/general/text_to_speech: + +.. rst-class:: classref-property + +:ref:`bool` **audio/general/text_to_speech** = ``false`` + +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. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_audio/video/video_delay_compensation_ms: .. rst-class:: classref-property @@ -2263,6 +2469,18 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w ---- +.. _class_ProjectSettings_property_debug/gdscript/warnings/redundant_static_unload: + +.. rst-class:: classref-property + +:ref:`int` **debug/gdscript/warnings/redundant_static_unload** = ``1`` + +When set to ``warn`` or ``error``, produces a warning or an error respectively when the ``@static_unload`` annotation is used in a script without any static variables. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_debug/gdscript/warnings/renamed_in_godot_4_hint: .. rst-class:: classref-property @@ -2611,6 +2829,246 @@ Print more information to standard output when running. It displays information ---- +.. _class_ProjectSettings_property_debug/shader_language/warnings/device_limit_exceeded: + +.. rst-class:: classref-property + +:ref:`bool` **debug/shader_language/warnings/device_limit_exceeded** = ``true`` + +When set to ``true``, produces a warning when the shader exceeds certain device limits. Currently, the only device limit checked is the limit on uniform buffer size. More device limits will be added in the future. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/shader_language/warnings/enable: + +.. rst-class:: classref-property + +:ref:`bool` **debug/shader_language/warnings/enable** = ``true`` + +If ``true``, enables specific shader warnings (see ``debug/shader_language/warnings/*`` settings). If ``false``, disables all shader warnings. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/shader_language/warnings/float_comparison: + +.. rst-class:: classref-property + +:ref:`bool` **debug/shader_language/warnings/float_comparison** = ``true`` + +When set to ``true``, produces a warning when two floating point numbers are compared directly with the ``==`` operator or the ``!=`` operator. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/shader_language/warnings/formatting_error: + +.. rst-class:: classref-property + +:ref:`bool` **debug/shader_language/warnings/formatting_error** = ``true`` + +When set to ``true``, produces a warning upon encountering certain formatting errors. Currently this only checks for empty statements. More formatting errors may be added over time. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/shader_language/warnings/treat_warnings_as_errors: + +.. rst-class:: classref-property + +:ref:`bool` **debug/shader_language/warnings/treat_warnings_as_errors** = ``false`` + +When set to ``true``, warnings are treated as errors. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/shader_language/warnings/unused_constant: + +.. rst-class:: classref-property + +:ref:`bool` **debug/shader_language/warnings/unused_constant** = ``true`` + +When set to ``true``, produces a warning when a constant is never used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/shader_language/warnings/unused_function: + +.. rst-class:: classref-property + +:ref:`bool` **debug/shader_language/warnings/unused_function** = ``true`` + +When set to ``true``, produces a warning when a function is never used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/shader_language/warnings/unused_local_variable: + +.. rst-class:: classref-property + +:ref:`bool` **debug/shader_language/warnings/unused_local_variable** = ``true`` + +When set to ``true``, produces a warning when a local variable is never used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/shader_language/warnings/unused_struct: + +.. rst-class:: classref-property + +:ref:`bool` **debug/shader_language/warnings/unused_struct** = ``true`` + +When set to ``true``, produces a warning when a struct is never used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/shader_language/warnings/unused_uniform: + +.. rst-class:: classref-property + +:ref:`bool` **debug/shader_language/warnings/unused_uniform** = ``true`` + +When set to ``true``, produces a warning when a uniform is never used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/shader_language/warnings/unused_varying: + +.. rst-class:: classref-property + +:ref:`bool` **debug/shader_language/warnings/unused_varying** = ``true`` + +When set to ``true``, produces a warning when a varying is never used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/shapes/avoidance/agents_radius_color: + +.. rst-class:: classref-property + +:ref:`Color` **debug/shapes/avoidance/agents_radius_color** = ``Color(1, 1, 0, 0.25)`` + +Color of the avoidance agents radius, visible when "Visible Avoidance" is enabled in the Debug menu. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/shapes/avoidance/enable_agents_radius: + +.. rst-class:: classref-property + +:ref:`bool` **debug/shapes/avoidance/enable_agents_radius** = ``true`` + +If enabled, displays avoidance agents radius when "Visible Avoidance" is enabled in the Debug menu. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/shapes/avoidance/enable_obstacles_radius: + +.. rst-class:: classref-property + +:ref:`bool` **debug/shapes/avoidance/enable_obstacles_radius** = ``true`` + +If enabled, displays avoidance obstacles radius when "Visible Avoidance" is enabled in the Debug menu. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/shapes/avoidance/enable_obstacles_static: + +.. rst-class:: classref-property + +:ref:`bool` **debug/shapes/avoidance/enable_obstacles_static** = ``true`` + +If enabled, displays static avoidance obstacles when "Visible Avoidance" is enabled in the Debug menu. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/shapes/avoidance/obstacles_radius_color: + +.. rst-class:: classref-property + +:ref:`Color` **debug/shapes/avoidance/obstacles_radius_color** = ``Color(1, 0.5, 0, 0.25)`` + +Color of the avoidance obstacles radius, visible when "Visible Avoidance" is enabled in the Debug menu. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/shapes/avoidance/obstacles_static_edge_pushin_color: + +.. rst-class:: classref-property + +:ref:`Color` **debug/shapes/avoidance/obstacles_static_edge_pushin_color** = ``Color(1, 0, 0, 1)`` + +Color of the static avoidance obstacles edges when their vertices are winded in order to push agents in, visible when "Visible Avoidance" is enabled in the Debug menu. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/shapes/avoidance/obstacles_static_edge_pushout_color: + +.. rst-class:: classref-property + +:ref:`Color` **debug/shapes/avoidance/obstacles_static_edge_pushout_color** = ``Color(1, 1, 0, 1)`` + +Color of the static avoidance obstacles edges when their vertices are winded in order to push agents out, visible when "Visible Avoidance" is enabled in the Debug menu. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/shapes/avoidance/obstacles_static_face_pushin_color: + +.. rst-class:: classref-property + +:ref:`Color` **debug/shapes/avoidance/obstacles_static_face_pushin_color** = ``Color(1, 0, 0, 0)`` + +Color of the static avoidance obstacles faces when their vertices are winded in order to push agents in, visible when "Visible Avoidance" is enabled in the Debug menu. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/shapes/avoidance/obstacles_static_face_pushout_color: + +.. rst-class:: classref-property + +:ref:`Color` **debug/shapes/avoidance/obstacles_static_face_pushout_color** = ``Color(1, 1, 0, 0.5)`` + +Color of the static avoidance obstacles faces when their vertices are winded in order to push agents out, visible when "Visible Avoidance" is enabled in the Debug menu. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_debug/shapes/collision/contact_color: .. rst-class:: classref-property @@ -3097,7 +3555,7 @@ Main window content is expanded to the full size of the window. Unlike a borderl :ref:`Vector2i` **display/window/size/initial_position** = ``Vector2i(0, 0)`` -Main window initial position (in virtual desktop coordinates), this settings is used only if :ref:`display/window/size/initial_position_type` is set to "Absolute" (``0``). +Main window initial position (in virtual desktop coordinates), this setting is used only if :ref:`display/window/size/initial_position_type` is set to "Absolute" (``0``). .. rst-class:: classref-item-separator @@ -3127,7 +3585,7 @@ Main window initial position. :ref:`int` **display/window/size/initial_screen** = ``0`` -Main window initial screen, this settings is used only if :ref:`display/window/size/initial_position_type` is set to "Other Screen Center" (``2``). +Main window initial screen, this setting is used only if :ref:`display/window/size/initial_position_type` is set to "Other Screen Center" (``2``). .. rst-class:: classref-item-separator @@ -3239,81 +3697,179 @@ On desktop platforms, overrides the game's initial window width. See also :ref:` ---- -.. _class_ProjectSettings_property_display/window/vsync/vsync_mode: +.. _class_ProjectSettings_property_display/window/stretch/aspect: .. rst-class:: classref-property -:ref:`int` **display/window/vsync/vsync_mode** = ``1`` - -Sets the V-Sync mode for the main game window. - -See :ref:`VSyncMode` for possible values and how they affect the behavior of your application. - -Depending on the platform and used renderer, the engine will fall back to **Enabled** if the desired mode is not supported. +:ref:`String` **display/window/stretch/aspect** = ``"keep"`` -\ **Note:** V-Sync modes other than **Enabled** are only supported in the Forward+ and Mobile rendering methods, not Compatibility. +.. container:: contribute -\ **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. + There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_dotnet/project/assembly_name: +.. _class_ProjectSettings_property_display/window/stretch/mode: .. rst-class:: classref-property -:ref:`String` **dotnet/project/assembly_name** = ``""`` +:ref:`String` **display/window/stretch/mode** = ``"disabled"`` -Name of the .NET assembly. This name is used as the name of the ``.csproj`` and ``.sln`` files. By default, it's set to the name of the project (:ref:`application/config/name`) allowing to change it in the future without affecting the .NET assembly. +Defines how the base size is stretched to fit the resolution of the window or screen. + +\ **"disabled"**: No stretching happens. One unit in the scene corresponds to one pixel on the screen. In this mode, :ref:`display/window/stretch/aspect` has no effect. Recommended for non-game applications. + +\ **"canvas_items"**: The base size specified in width and height in the project settings is stretched to cover the whole screen (taking :ref:`display/window/stretch/aspect` into account). This means that everything is rendered directly at the target resolution. 3D is unaffected, while in 2D, there is no longer a 1:1 correspondence between sprite pixels and screen pixels, which may result in scaling artifacts. Recommended for most games that don't use a pixel art aesthetic, although it is possible to use this stretch mode for pixel art games too (especially in 3D). + +\ **"viewport"**: The size of the root :ref:`Viewport` is set precisely to the base size specified in the Project Settings' Display section. The scene is rendered to this viewport first. Finally, this viewport is scaled to fit the screen (taking :ref:`display/window/stretch/aspect` into account). Recommended for games that use a pixel art aesthetic. .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_dotnet/project/solution_directory: +.. _class_ProjectSettings_property_display/window/stretch/scale: .. rst-class:: classref-property -:ref:`String` **dotnet/project/solution_directory** = ``""`` +:ref:`float` **display/window/stretch/scale** = ``1.0`` -Directory that contains the ``.sln`` file. By default, the ``.sln`` files is in the root of the project directory, next to the ``project.godot`` and ``.csproj`` files. +.. container:: contribute -Changing this value allows setting up a multi-project scenario where there are multiple ``.csproj``. Keep in mind that the Godot project is considered one of the C# projects in the workspace and it's root directory should contain the ``project.godot`` and ``.csproj`` next to each other. + There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_editor/movie_writer/disable_vsync: +.. _class_ProjectSettings_property_display/window/subwindows/embed_subwindows: .. rst-class:: classref-property -:ref:`bool` **editor/movie_writer/disable_vsync** = ``false`` - -If ``true``, requests V-Sync to be disabled when writing a movie (similar to setting :ref:`display/window/vsync/vsync_mode` to **Disabled**). This can speed up video writing if the hardware is fast enough to render, encode and save the video at a framerate higher than the monitor's refresh rate. +:ref:`bool` **display/window/subwindows/embed_subwindows** = ``true`` -\ **Note:** :ref:`editor/movie_writer/disable_vsync` has no effect if the operating system or graphics driver forces V-Sync with no way for applications to disable it. +If ``true`` subwindows are embedded in the main window. .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_editor/movie_writer/fps: +.. _class_ProjectSettings_property_display/window/vsync/vsync_mode: .. rst-class:: classref-property -:ref:`int` **editor/movie_writer/fps** = ``60`` +:ref:`int` **display/window/vsync/vsync_mode** = ``1`` -The number of frames per second to record in the video when writing a movie. Simulation speed will adjust to always match the specified framerate, which means the engine will appear to run slower at higher :ref:`editor/movie_writer/fps` values. Certain FPS values will require you to adjust :ref:`editor/movie_writer/mix_rate` to prevent audio from desynchronizing over time. +Sets the V-Sync mode for the main game window. -This can be specified manually on the command line using the ``--fixed-fps `` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. +See :ref:`VSyncMode` for possible values and how they affect the behavior of your application. + +Depending on the platform and used renderer, the engine will fall back to **Enabled** if the desired mode is not supported. + +\ **Note:** V-Sync modes other than **Enabled** 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. .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_editor/movie_writer/mix_rate: +.. _class_ProjectSettings_property_dotnet/project/assembly_name: + +.. rst-class:: classref-property + +:ref:`String` **dotnet/project/assembly_name** = ``""`` + +Name of the .NET assembly. This name is used as the name of the ``.csproj`` and ``.sln`` files. By default, it's set to the name of the project (:ref:`application/config/name`) allowing to change it in the future without affecting the .NET assembly. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_dotnet/project/solution_directory: + +.. rst-class:: classref-property + +:ref:`String` **dotnet/project/solution_directory** = ``""`` + +Directory that contains the ``.sln`` file. By default, the ``.sln`` files is in the root of the project directory, next to the ``project.godot`` and ``.csproj`` files. + +Changing this value allows setting up a multi-project scenario where there are multiple ``.csproj``. Keep in mind that the Godot project is considered one of the C# projects in the workspace and it's root directory should contain the ``project.godot`` and ``.csproj`` next to each other. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_editor/export/convert_text_resources_to_binary: + +.. rst-class:: classref-property + +:ref:`bool` **editor/export/convert_text_resources_to_binary** = ``true`` + +If ``true``, text resources are converted to a binary format on export. This decreases file sizes and speeds up loading slightly. + +\ **Note:** If :ref:`editor/export/convert_text_resources_to_binary` is ``true``, :ref:`@GDScript.load` will not be able to return the converted files in an exported project. Some file paths within the exported PCK will also change, such as ``project.godot`` becoming ``project.binary``. If you rely on run-time loading of files present within the PCK, set :ref:`editor/export/convert_text_resources_to_binary` to ``false``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_editor/import/reimport_missing_imported_files: + +.. rst-class:: classref-property + +:ref:`bool` **editor/import/reimport_missing_imported_files** = ``true`` + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_editor/import/use_multiple_threads: + +.. rst-class:: classref-property + +:ref:`bool` **editor/import/use_multiple_threads** = ``true`` + +If ``true`` importing of resources is run on multiple threads. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_editor/movie_writer/disable_vsync: + +.. rst-class:: classref-property + +:ref:`bool` **editor/movie_writer/disable_vsync** = ``false`` + +If ``true``, requests V-Sync to be disabled when writing a movie (similar to setting :ref:`display/window/vsync/vsync_mode` to **Disabled**). This can speed up video writing if the hardware is fast enough to render, encode and save the video at a framerate higher than the monitor's refresh rate. + +\ **Note:** :ref:`editor/movie_writer/disable_vsync` has no effect if the operating system or graphics driver forces V-Sync with no way for applications to disable it. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_editor/movie_writer/fps: + +.. rst-class:: classref-property + +:ref:`int` **editor/movie_writer/fps** = ``60`` + +The number of frames per second to record in the video when writing a movie. Simulation speed will adjust to always match the specified framerate, which means the engine will appear to run slower at higher :ref:`editor/movie_writer/fps` values. Certain FPS values will require you to adjust :ref:`editor/movie_writer/mix_rate` to prevent audio from desynchronizing over time. + +This can be specified manually on the command line using the ``--fixed-fps `` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_editor/movie_writer/mix_rate: .. rst-class:: classref-property @@ -3421,6 +3977,18 @@ What to use to separate node name from number. This is mostly an editor setting. ---- +.. _class_ProjectSettings_property_editor/naming/scene_name_casing: + +.. rst-class:: classref-property + +:ref:`int` **editor/naming/scene_name_casing** = ``2`` + +When generating file names from scene root node, set the type of casing in this project. This is mostly an editor setting. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_editor/run/main_run_args: .. rst-class:: classref-property @@ -3465,6 +4033,34 @@ Search path for project-specific script templates. Godot will search for script ---- +.. _class_ProjectSettings_property_editor/version_control/autoload_on_startup: + +.. rst-class:: classref-property + +:ref:`bool` **editor/version_control/autoload_on_startup** = ``false`` + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_editor/version_control/plugin_name: + +.. rst-class:: classref-property + +:ref:`String` **editor/version_control/plugin_name** = ``""`` + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_filesystem/import/blender/enabled: .. rst-class:: classref-property @@ -3553,6 +4149,18 @@ Default value for :ref:`ScrollContainer.scroll_deadzone` **gui/common/snap_controls_to_pixels** = ``true`` + +If ``true``, snaps :ref:`Control` node vertices to the nearest pixel to ensure they remain crisp even when the camera moves or zooms. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_gui/common/swap_cancel_ok: .. rst-class:: classref-property @@ -3579,6 +4187,20 @@ Maximum undo/redo history size for :ref:`TextEdit` fields. ---- +.. _class_ProjectSettings_property_gui/fonts/dynamic_fonts/use_oversampling: + +.. rst-class:: classref-property + +:ref:`bool` **gui/fonts/dynamic_fonts/use_oversampling** = ``true`` + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_gui/theme/custom: .. rst-class:: classref-property @@ -4205,7 +4827,7 @@ macOS specific override for the shortcut to add a caret below every caret. :ref:`Dictionary` **input/ui_text_caret_document_end** -Default :ref:`InputEventAction` to move the text cursor the the end of the text. +Default :ref:`InputEventAction` to move the text cursor to the end of the text. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. @@ -4889,30 +5511,6 @@ If non-empty, this locale will be used when running the project from the editor. ---- -.. _class_ProjectSettings_property_internationalization/locale/translation_remaps: - -.. rst-class:: classref-property - -:ref:`PackedStringArray` **internationalization/locale/translation_remaps** - -Locale-dependent resource remaps. Edit them in the "Localization" tab of Project Settings editor. - -.. rst-class:: classref-item-separator - ----- - -.. _class_ProjectSettings_property_internationalization/locale/translations: - -.. rst-class:: classref-property - -:ref:`PackedStringArray` **internationalization/locale/translations** - -List of translation files available in the project. Edit them in the "Localization" tab of Project Settings editor. - -.. rst-class:: classref-item-separator - ----- - .. _class_ProjectSettings_property_internationalization/pseudolocalization/double_vowels: .. rst-class:: classref-property @@ -5029,7 +5627,19 @@ If ``true``, enables pseudolocalization for the project. This can be used to spo :ref:`bool` **internationalization/rendering/force_right_to_left_layout_direction** = ``false`` -Force layout direction and text writing direction to RTL for all locales. +Force layout direction and text writing direction to RTL for all controls. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_internationalization/rendering/root_node_layout_direction: + +.. rst-class:: classref-property + +:ref:`int` **internationalization/rendering/root_node_layout_direction** = ``0`` + +Root node default layout direction. .. rst-class:: classref-item-separator @@ -5065,181 +5675,265 @@ Optional name for the 2D navigation layer 1. If left empty, the layer will displ ---- -.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_10: +.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_2: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_navigation/layer_10** = ``""`` +:ref:`String` **layer_names/2d_navigation/layer_2** = ``""`` -Optional name for the 2D navigation layer 10. If left empty, the layer will display as "Layer 10". +Optional name for the 2D navigation layer 2. If left empty, the layer will display as "Layer 2". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_11: +.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_3: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_navigation/layer_11** = ``""`` +:ref:`String` **layer_names/2d_navigation/layer_3** = ``""`` -Optional name for the 2D navigation layer 11. If left empty, the layer will display as "Layer 11". +Optional name for the 2D navigation layer 3. If left empty, the layer will display as "Layer 3". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_12: +.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_4: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_navigation/layer_12** = ``""`` +:ref:`String` **layer_names/2d_navigation/layer_4** = ``""`` -Optional name for the 2D navigation layer 12. If left empty, the layer will display as "Layer 12". +Optional name for the 2D navigation layer 4. If left empty, the layer will display as "Layer 4". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_13: +.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_5: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_navigation/layer_13** = ``""`` +:ref:`String` **layer_names/2d_navigation/layer_5** = ``""`` -Optional name for the 2D navigation layer 13. If left empty, the layer will display as "Layer 13". +Optional name for the 2D navigation layer 5. If left empty, the layer will display as "Layer 5". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_14: +.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_6: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_navigation/layer_14** = ``""`` +:ref:`String` **layer_names/2d_navigation/layer_6** = ``""`` -Optional name for the 2D navigation layer 14. If left empty, the layer will display as "Layer 14". +Optional name for the 2D navigation layer 6. If left empty, the layer will display as "Layer 6". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_15: +.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_7: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_navigation/layer_15** = ``""`` +:ref:`String` **layer_names/2d_navigation/layer_7** = ``""`` -Optional name for the 2D navigation layer 15. If left empty, the layer will display as "Layer 15". +Optional name for the 2D navigation layer 7. If left empty, the layer will display as "Layer 7". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_16: +.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_8: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_navigation/layer_16** = ``""`` +:ref:`String` **layer_names/2d_navigation/layer_8** = ``""`` -Optional name for the 2D navigation layer 16. If left empty, the layer will display as "Layer 16". +Optional name for the 2D navigation layer 8. If left empty, the layer will display as "Layer 8". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_17: +.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_9: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_navigation/layer_17** = ``""`` +:ref:`String` **layer_names/2d_navigation/layer_9** = ``""`` -Optional name for the 2D navigation layer 17. If left empty, the layer will display as "Layer 17". +Optional name for the 2D navigation layer 9. If left empty, the layer will display as "Layer 9". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_18: +.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_10: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_navigation/layer_18** = ``""`` +:ref:`String` **layer_names/2d_navigation/layer_10** = ``""`` -Optional name for the 2D navigation layer 18. If left empty, the layer will display as "Layer 18". +Optional name for the 2D navigation layer 10. If left empty, the layer will display as "Layer 10". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_19: +.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_11: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_navigation/layer_19** = ``""`` +:ref:`String` **layer_names/2d_navigation/layer_11** = ``""`` -Optional name for the 2D navigation layer 19. If left empty, the layer will display as "Layer 19". +Optional name for the 2D navigation layer 11. If left empty, the layer will display as "Layer 11". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_2: +.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_12: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_navigation/layer_2** = ``""`` +:ref:`String` **layer_names/2d_navigation/layer_12** = ``""`` -Optional name for the 2D navigation layer 2. If left empty, the layer will display as "Layer 2". +Optional name for the 2D navigation layer 12. If left empty, the layer will display as "Layer 12". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_20: +.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_13: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_navigation/layer_20** = ``""`` +:ref:`String` **layer_names/2d_navigation/layer_13** = ``""`` -Optional name for the 2D navigation layer 20. If left empty, the layer will display as "Layer 20". +Optional name for the 2D navigation layer 13. If left empty, the layer will display as "Layer 13". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_21: +.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_14: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_navigation/layer_21** = ``""`` +:ref:`String` **layer_names/2d_navigation/layer_14** = ``""`` -Optional name for the 2D navigation layer 21. If left empty, the layer will display as "Layer 21". +Optional name for the 2D navigation layer 14. If left empty, the layer will display as "Layer 14". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_22: +.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_15: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_navigation/layer_22** = ``""`` +:ref:`String` **layer_names/2d_navigation/layer_15** = ``""`` -Optional name for the 2D navigation layer 22. If left empty, the layer will display as "Layer 22". +Optional name for the 2D navigation layer 15. If left empty, the layer will display as "Layer 15". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_23: +.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_16: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_navigation/layer_23** = ``""`` +:ref:`String` **layer_names/2d_navigation/layer_16** = ``""`` -Optional name for the 2D navigation layer 23. If left empty, the layer will display as "Layer 23". +Optional name for the 2D navigation layer 16. If left empty, the layer will display as "Layer 16". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_17: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/2d_navigation/layer_17** = ``""`` + +Optional name for the 2D navigation layer 17. If left empty, the layer will display as "Layer 17". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_18: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/2d_navigation/layer_18** = ``""`` + +Optional name for the 2D navigation layer 18. If left empty, the layer will display as "Layer 18". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_19: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/2d_navigation/layer_19** = ``""`` + +Optional name for the 2D navigation layer 19. If left empty, the layer will display as "Layer 19". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_20: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/2d_navigation/layer_20** = ``""`` + +Optional name for the 2D navigation layer 20. If left empty, the layer will display as "Layer 20". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_21: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/2d_navigation/layer_21** = ``""`` + +Optional name for the 2D navigation layer 21. If left empty, the layer will display as "Layer 21". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_22: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/2d_navigation/layer_22** = ``""`` + +Optional name for the 2D navigation layer 22. If left empty, the layer will display as "Layer 22". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_23: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/2d_navigation/layer_23** = ``""`` + +Optional name for the 2D navigation layer 23. If left empty, the layer will display as "Layer 23". .. rst-class:: classref-item-separator @@ -5317,18 +6011,6 @@ Optional name for the 2D navigation layer 29. If left empty, the layer will disp ---- -.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_3: - -.. rst-class:: classref-property - -:ref:`String` **layer_names/2d_navigation/layer_3** = ``""`` - -Optional name for the 2D navigation layer 3. If left empty, the layer will display as "Layer 3". - -.. rst-class:: classref-item-separator - ----- - .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_30: .. rst-class:: classref-property @@ -5365,85 +6047,109 @@ Optional name for the 2D navigation layer 32. If left empty, the layer will disp ---- -.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_4: +.. _class_ProjectSettings_property_layer_names/2d_physics/layer_1: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_navigation/layer_4** = ``""`` +:ref:`String` **layer_names/2d_physics/layer_1** = ``""`` -Optional name for the 2D navigation layer 4. If left empty, the layer will display as "Layer 4". +Optional name for the 2D physics layer 1. If left empty, the layer will display as "Layer 1". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_5: +.. _class_ProjectSettings_property_layer_names/2d_physics/layer_2: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_navigation/layer_5** = ``""`` +:ref:`String` **layer_names/2d_physics/layer_2** = ``""`` -Optional name for the 2D navigation layer 5. If left empty, the layer will display as "Layer 5". +Optional name for the 2D physics layer 2. If left empty, the layer will display as "Layer 2". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_6: +.. _class_ProjectSettings_property_layer_names/2d_physics/layer_3: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_navigation/layer_6** = ``""`` +:ref:`String` **layer_names/2d_physics/layer_3** = ``""`` -Optional name for the 2D navigation layer 6. If left empty, the layer will display as "Layer 6". +Optional name for the 2D physics layer 3. If left empty, the layer will display as "Layer 3". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_7: +.. _class_ProjectSettings_property_layer_names/2d_physics/layer_4: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_navigation/layer_7** = ``""`` +:ref:`String` **layer_names/2d_physics/layer_4** = ``""`` -Optional name for the 2D navigation layer 7. If left empty, the layer will display as "Layer 7". +Optional name for the 2D physics layer 4. If left empty, the layer will display as "Layer 4". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_8: +.. _class_ProjectSettings_property_layer_names/2d_physics/layer_5: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_navigation/layer_8** = ``""`` +:ref:`String` **layer_names/2d_physics/layer_5** = ``""`` -Optional name for the 2D navigation layer 8. If left empty, the layer will display as "Layer 8". +Optional name for the 2D physics layer 5. If left empty, the layer will display as "Layer 5". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_navigation/layer_9: +.. _class_ProjectSettings_property_layer_names/2d_physics/layer_6: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_navigation/layer_9** = ``""`` +:ref:`String` **layer_names/2d_physics/layer_6** = ``""`` -Optional name for the 2D navigation layer 9. If left empty, the layer will display as "Layer 9". +Optional name for the 2D physics layer 6. If left empty, the layer will display as "Layer 6". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_physics/layer_1: +.. _class_ProjectSettings_property_layer_names/2d_physics/layer_7: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_physics/layer_1** = ``""`` +:ref:`String` **layer_names/2d_physics/layer_7** = ``""`` -Optional name for the 2D physics layer 1. If left empty, the layer will display as "Layer 1". +Optional name for the 2D physics layer 7. If left empty, the layer will display as "Layer 7". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/2d_physics/layer_8: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/2d_physics/layer_8** = ``""`` + +Optional name for the 2D physics layer 8. If left empty, the layer will display as "Layer 8". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/2d_physics/layer_9: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/2d_physics/layer_9** = ``""`` + +Optional name for the 2D physics layer 9. If left empty, the layer will display as "Layer 9". .. rst-class:: classref-item-separator @@ -5569,18 +6275,6 @@ Optional name for the 2D physics layer 19. If left empty, the layer will display ---- -.. _class_ProjectSettings_property_layer_names/2d_physics/layer_2: - -.. rst-class:: classref-property - -:ref:`String` **layer_names/2d_physics/layer_2** = ``""`` - -Optional name for the 2D physics layer 2. If left empty, the layer will display as "Layer 2". - -.. rst-class:: classref-item-separator - ----- - .. _class_ProjectSettings_property_layer_names/2d_physics/layer_20: .. rst-class:: classref-property @@ -5701,18 +6395,6 @@ Optional name for the 2D physics layer 29. If left empty, the layer will display ---- -.. _class_ProjectSettings_property_layer_names/2d_physics/layer_3: - -.. rst-class:: classref-property - -:ref:`String` **layer_names/2d_physics/layer_3** = ``""`` - -Optional name for the 2D physics layer 3. If left empty, the layer will display as "Layer 3". - -.. rst-class:: classref-item-separator - ----- - .. _class_ProjectSettings_property_layer_names/2d_physics/layer_30: .. rst-class:: classref-property @@ -5749,85 +6431,109 @@ Optional name for the 2D physics layer 32. If left empty, the layer will display ---- -.. _class_ProjectSettings_property_layer_names/2d_physics/layer_4: +.. _class_ProjectSettings_property_layer_names/2d_render/layer_1: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_physics/layer_4** = ``""`` +:ref:`String` **layer_names/2d_render/layer_1** = ``""`` -Optional name for the 2D physics layer 4. If left empty, the layer will display as "Layer 4". +Optional name for the 2D render layer 1. If left empty, the layer will display as "Layer 1". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_physics/layer_5: +.. _class_ProjectSettings_property_layer_names/2d_render/layer_2: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_physics/layer_5** = ``""`` +:ref:`String` **layer_names/2d_render/layer_2** = ``""`` -Optional name for the 2D physics layer 5. If left empty, the layer will display as "Layer 5". +Optional name for the 2D render layer 2. If left empty, the layer will display as "Layer 2". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_physics/layer_6: +.. _class_ProjectSettings_property_layer_names/2d_render/layer_3: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_physics/layer_6** = ``""`` +:ref:`String` **layer_names/2d_render/layer_3** = ``""`` -Optional name for the 2D physics layer 6. If left empty, the layer will display as "Layer 6". +Optional name for the 2D render layer 3. If left empty, the layer will display as "Layer 3". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_physics/layer_7: +.. _class_ProjectSettings_property_layer_names/2d_render/layer_4: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_physics/layer_7** = ``""`` +:ref:`String` **layer_names/2d_render/layer_4** = ``""`` -Optional name for the 2D physics layer 7. If left empty, the layer will display as "Layer 7". +Optional name for the 2D render layer 4. If left empty, the layer will display as "Layer 4". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_physics/layer_8: +.. _class_ProjectSettings_property_layer_names/2d_render/layer_5: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_physics/layer_8** = ``""`` +:ref:`String` **layer_names/2d_render/layer_5** = ``""`` -Optional name for the 2D physics layer 8. If left empty, the layer will display as "Layer 8". +Optional name for the 2D render layer 5. If left empty, the layer will display as "Layer 5". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_physics/layer_9: +.. _class_ProjectSettings_property_layer_names/2d_render/layer_6: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_physics/layer_9** = ``""`` +:ref:`String` **layer_names/2d_render/layer_6** = ``""`` -Optional name for the 2D physics layer 9. If left empty, the layer will display as "Layer 9". +Optional name for the 2D render layer 6. If left empty, the layer will display as "Layer 6". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_render/layer_1: +.. _class_ProjectSettings_property_layer_names/2d_render/layer_7: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_render/layer_1** = ``""`` +:ref:`String` **layer_names/2d_render/layer_7** = ``""`` -Optional name for the 2D render layer 1. If left empty, the layer will display as "Layer 1". +Optional name for the 2D render layer 7. If left empty, the layer will display as "Layer 7". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/2d_render/layer_8: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/2d_render/layer_8** = ``""`` + +Optional name for the 2D render layer 8. If left empty, the layer will display as "Layer 8". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/2d_render/layer_9: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/2d_render/layer_9** = ``""`` + +Optional name for the 2D render layer 9. If left empty, the layer will display as "Layer 9". .. rst-class:: classref-item-separator @@ -5953,121 +6659,121 @@ Optional name for the 2D render layer 19. If left empty, the layer will display ---- -.. _class_ProjectSettings_property_layer_names/2d_render/layer_2: +.. _class_ProjectSettings_property_layer_names/2d_render/layer_20: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_render/layer_2** = ``""`` +:ref:`String` **layer_names/2d_render/layer_20** = ``""`` -Optional name for the 2D render layer 2. If left empty, the layer will display as "Layer 2". +Optional name for the 2D render layer 20. If left empty, the layer will display as "Layer 20". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_render/layer_20: +.. _class_ProjectSettings_property_layer_names/3d_navigation/layer_1: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_render/layer_20** = ``""`` +:ref:`String` **layer_names/3d_navigation/layer_1** = ``""`` -Optional name for the 2D render layer 20. If left empty, the layer will display as "Layer 20". +Optional name for the 3D navigation layer 1. If left empty, the layer will display as "Layer 1". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_render/layer_3: +.. _class_ProjectSettings_property_layer_names/3d_navigation/layer_2: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_render/layer_3** = ``""`` +:ref:`String` **layer_names/3d_navigation/layer_2** = ``""`` -Optional name for the 2D render layer 3. If left empty, the layer will display as "Layer 3". +Optional name for the 3D navigation layer 2. If left empty, the layer will display as "Layer 2". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_render/layer_4: +.. _class_ProjectSettings_property_layer_names/3d_navigation/layer_3: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_render/layer_4** = ``""`` +:ref:`String` **layer_names/3d_navigation/layer_3** = ``""`` -Optional name for the 2D render layer 4. If left empty, the layer will display as "Layer 4". +Optional name for the 3D navigation layer 3. If left empty, the layer will display as "Layer 3". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_render/layer_5: +.. _class_ProjectSettings_property_layer_names/3d_navigation/layer_4: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_render/layer_5** = ``""`` +:ref:`String` **layer_names/3d_navigation/layer_4** = ``""`` -Optional name for the 2D render layer 5. If left empty, the layer will display as "Layer 5". +Optional name for the 3D navigation layer 4. If left empty, the layer will display as "Layer 4". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_render/layer_6: +.. _class_ProjectSettings_property_layer_names/3d_navigation/layer_5: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_render/layer_6** = ``""`` +:ref:`String` **layer_names/3d_navigation/layer_5** = ``""`` -Optional name for the 2D render layer 6. If left empty, the layer will display as "Layer 6". +Optional name for the 3D navigation layer 5. If left empty, the layer will display as "Layer 5". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_render/layer_7: +.. _class_ProjectSettings_property_layer_names/3d_navigation/layer_6: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_render/layer_7** = ``""`` +:ref:`String` **layer_names/3d_navigation/layer_6** = ``""`` -Optional name for the 2D render layer 7. If left empty, the layer will display as "Layer 7". +Optional name for the 3D navigation layer 6. If left empty, the layer will display as "Layer 6". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_render/layer_8: +.. _class_ProjectSettings_property_layer_names/3d_navigation/layer_7: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_render/layer_8** = ``""`` +:ref:`String` **layer_names/3d_navigation/layer_7** = ``""`` -Optional name for the 2D render layer 8. If left empty, the layer will display as "Layer 8". +Optional name for the 3D navigation layer 7. If left empty, the layer will display as "Layer 7". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/2d_render/layer_9: +.. _class_ProjectSettings_property_layer_names/3d_navigation/layer_8: .. rst-class:: classref-property -:ref:`String` **layer_names/2d_render/layer_9** = ``""`` +:ref:`String` **layer_names/3d_navigation/layer_8** = ``""`` -Optional name for the 2D render layer 9. If left empty, the layer will display as "Layer 9". +Optional name for the 3D navigation layer 8. If left empty, the layer will display as "Layer 8". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_navigation/layer_1: +.. _class_ProjectSettings_property_layer_names/3d_navigation/layer_9: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_navigation/layer_1** = ``""`` +:ref:`String` **layer_names/3d_navigation/layer_9** = ``""`` -Optional name for the 3D navigation layer 1. If left empty, the layer will display as "Layer 1". +Optional name for the 3D navigation layer 9. If left empty, the layer will display as "Layer 9". .. rst-class:: classref-item-separator @@ -6193,18 +6899,6 @@ Optional name for the 3D navigation layer 19. If left empty, the layer will disp ---- -.. _class_ProjectSettings_property_layer_names/3d_navigation/layer_2: - -.. rst-class:: classref-property - -:ref:`String` **layer_names/3d_navigation/layer_2** = ``""`` - -Optional name for the 3D navigation layer 2. If left empty, the layer will display as "Layer 2". - -.. rst-class:: classref-item-separator - ----- - .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_20: .. rst-class:: classref-property @@ -6325,18 +7019,6 @@ Optional name for the 3D navigation layer 29. If left empty, the layer will disp ---- -.. _class_ProjectSettings_property_layer_names/3d_navigation/layer_3: - -.. rst-class:: classref-property - -:ref:`String` **layer_names/3d_navigation/layer_3** = ``""`` - -Optional name for the 3D navigation layer 3. If left empty, the layer will display as "Layer 3". - -.. rst-class:: classref-item-separator - ----- - .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_30: .. rst-class:: classref-property @@ -6373,85 +7055,109 @@ Optional name for the 3D navigation layer 32. If left empty, the layer will disp ---- -.. _class_ProjectSettings_property_layer_names/3d_navigation/layer_4: +.. _class_ProjectSettings_property_layer_names/3d_physics/layer_1: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_navigation/layer_4** = ``""`` +:ref:`String` **layer_names/3d_physics/layer_1** = ``""`` -Optional name for the 3D navigation layer 4. If left empty, the layer will display as "Layer 4". +Optional name for the 3D physics layer 1. If left empty, the layer will display as "Layer 1". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_navigation/layer_5: +.. _class_ProjectSettings_property_layer_names/3d_physics/layer_2: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_navigation/layer_5** = ``""`` +:ref:`String` **layer_names/3d_physics/layer_2** = ``""`` -Optional name for the 3D navigation layer 5. If left empty, the layer will display as "Layer 5". +Optional name for the 3D physics layer 2. If left empty, the layer will display as "Layer 2". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_navigation/layer_6: +.. _class_ProjectSettings_property_layer_names/3d_physics/layer_3: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_navigation/layer_6** = ``""`` +:ref:`String` **layer_names/3d_physics/layer_3** = ``""`` -Optional name for the 3D navigation layer 6. If left empty, the layer will display as "Layer 6". +Optional name for the 3D physics layer 3. If left empty, the layer will display as "Layer 3". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_navigation/layer_7: +.. _class_ProjectSettings_property_layer_names/3d_physics/layer_4: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_navigation/layer_7** = ``""`` +:ref:`String` **layer_names/3d_physics/layer_4** = ``""`` -Optional name for the 3D navigation layer 7. If left empty, the layer will display as "Layer 7". +Optional name for the 3D physics layer 4. If left empty, the layer will display as "Layer 4". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_navigation/layer_8: +.. _class_ProjectSettings_property_layer_names/3d_physics/layer_5: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_navigation/layer_8** = ``""`` +:ref:`String` **layer_names/3d_physics/layer_5** = ``""`` -Optional name for the 3D navigation layer 8. If left empty, the layer will display as "Layer 8". +Optional name for the 3D physics layer 5. If left empty, the layer will display as "Layer 5". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_navigation/layer_9: +.. _class_ProjectSettings_property_layer_names/3d_physics/layer_6: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_navigation/layer_9** = ``""`` +:ref:`String` **layer_names/3d_physics/layer_6** = ``""`` -Optional name for the 3D navigation layer 9. If left empty, the layer will display as "Layer 9". +Optional name for the 3D physics layer 6. If left empty, the layer will display as "Layer 6". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_physics/layer_1: +.. _class_ProjectSettings_property_layer_names/3d_physics/layer_7: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_physics/layer_1** = ``""`` +:ref:`String` **layer_names/3d_physics/layer_7** = ``""`` -Optional name for the 3D physics layer 1. If left empty, the layer will display as "Layer 1". +Optional name for the 3D physics layer 7. If left empty, the layer will display as "Layer 7". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_physics/layer_8: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_physics/layer_8** = ``""`` + +Optional name for the 3D physics layer 8. If left empty, the layer will display as "Layer 8". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_physics/layer_9: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_physics/layer_9** = ``""`` + +Optional name for the 3D physics layer 9. If left empty, the layer will display as "Layer 9". .. rst-class:: classref-item-separator @@ -6577,18 +7283,6 @@ Optional name for the 3D physics layer 19. If left empty, the layer will display ---- -.. _class_ProjectSettings_property_layer_names/3d_physics/layer_2: - -.. rst-class:: classref-property - -:ref:`String` **layer_names/3d_physics/layer_2** = ``""`` - -Optional name for the 3D physics layer 2. If left empty, the layer will display as "Layer 2". - -.. rst-class:: classref-item-separator - ----- - .. _class_ProjectSettings_property_layer_names/3d_physics/layer_20: .. rst-class:: classref-property @@ -6655,425 +7349,725 @@ Optional name for the 3D physics layer 24. If left empty, the layer will display :ref:`String` **layer_names/3d_physics/layer_25** = ``""`` -Optional name for the 3D physics layer 25. If left empty, the layer will display as "Layer 25". +Optional name for the 3D physics layer 25. If left empty, the layer will display as "Layer 25". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_physics/layer_26: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_physics/layer_26** = ``""`` + +Optional name for the 3D physics layer 26. If left empty, the layer will display as "Layer 26". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_physics/layer_27: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_physics/layer_27** = ``""`` + +Optional name for the 3D physics layer 27. If left empty, the layer will display as "Layer 27". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_physics/layer_28: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_physics/layer_28** = ``""`` + +Optional name for the 3D physics layer 28. If left empty, the layer will display as "Layer 28". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_physics/layer_29: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_physics/layer_29** = ``""`` + +Optional name for the 3D physics layer 29. If left empty, the layer will display as "Layer 29". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_physics/layer_30: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_physics/layer_30** = ``""`` + +Optional name for the 3D physics layer 30. If left empty, the layer will display as "Layer 30". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_physics/layer_31: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_physics/layer_31** = ``""`` + +Optional name for the 3D physics layer 31. If left empty, the layer will display as "Layer 31". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_physics/layer_32: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_physics/layer_32** = ``""`` + +Optional name for the 3D physics layer 32. If left empty, the layer will display as "Layer 32". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_render/layer_1: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_render/layer_1** = ``""`` + +Optional name for the 3D render layer 1. If left empty, the layer will display as "Layer 1". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_render/layer_2: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_render/layer_2** = ``""`` + +Optional name for the 3D render layer 2. If left empty, the layer will display as "Layer 2". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_render/layer_3: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_render/layer_3** = ``""`` + +Optional name for the 3D render layer 3. If left empty, the layer will display as "Layer 3". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_render/layer_4: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_render/layer_4** = ``""`` + +Optional name for the 3D render layer 4. If left empty, the layer will display as "Layer 4". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_render/layer_5: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_render/layer_5** = ``""`` + +Optional name for the 3D render layer 5. If left empty, the layer will display as "Layer 5". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_render/layer_6: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_render/layer_6** = ``""`` + +Optional name for the 3D render layer 6. If left empty, the layer will display as "Layer 6". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_render/layer_7: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_render/layer_7** = ``""`` + +Optional name for the 3D render layer 7. If left empty, the layer will display as "Layer 7". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_render/layer_8: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_render/layer_8** = ``""`` + +Optional name for the 3D render layer 8. If left empty, the layer will display as "Layer 8". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_render/layer_9: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_render/layer_9** = ``""`` + +Optional name for the 3D render layer 9. If left empty, the layer will display as "Layer 9". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_render/layer_10: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_render/layer_10** = ``""`` + +Optional name for the 3D render layer 10. If left empty, the layer will display as "Layer 10". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_render/layer_11: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_render/layer_11** = ``""`` + +Optional name for the 3D render layer 11. If left empty, the layer will display as "Layer 11". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_render/layer_12: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_render/layer_12** = ``""`` + +Optional name for the 3D render layer 12. If left empty, the layer will display as "Layer 12". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_render/layer_13: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_render/layer_13** = ``""`` + +Optional name for the 3D render layer 13. If left empty, the layer will display as "Layer 13". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_render/layer_14: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_render/layer_14** = ``""`` + +Optional name for the 3D render layer 14. If left empty, the layer will display as "Layer 14". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_render/layer_15: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_render/layer_15** = ``""`` + +Optional name for the 3D render layer 15. If left empty, the layer will display as "Layer 15". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_render/layer_16: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_render/layer_16** = ``""`` + +Optional name for the 3D render layer 16. If left empty, the layer will display as "Layer 16". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_render/layer_17: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_render/layer_17** = ``""`` + +Optional name for the 3D render layer 17. If left empty, the layer will display as "Layer 17". + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_layer_names/3d_render/layer_18: + +.. rst-class:: classref-property + +:ref:`String` **layer_names/3d_render/layer_18** = ``""`` + +Optional name for the 3D render layer 18. If left empty, the layer will display as "Layer 18". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_physics/layer_26: +.. _class_ProjectSettings_property_layer_names/3d_render/layer_19: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_physics/layer_26** = ``""`` +:ref:`String` **layer_names/3d_render/layer_19** = ``""`` -Optional name for the 3D physics layer 26. If left empty, the layer will display as "Layer 26". +Optional name for the 3D render layer 19. If left empty, the layer will display as "Layer 19". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_physics/layer_27: +.. _class_ProjectSettings_property_layer_names/3d_render/layer_20: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_physics/layer_27** = ``""`` +:ref:`String` **layer_names/3d_render/layer_20** = ``""`` -Optional name for the 3D physics layer 27. If left empty, the layer will display as "Layer 27". +Optional name for the 3D render layer 20. If left empty, the layer will display as "Layer 20". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_physics/layer_28: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_1: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_physics/layer_28** = ``""`` +:ref:`String` **layer_names/avoidance/layer_1** = ``""`` -Optional name for the 3D physics layer 28. If left empty, the layer will display as "Layer 28". +Optional name for the navigation avoidance layer 1. If left empty, the layer will display as "Layer 1". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_physics/layer_29: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_2: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_physics/layer_29** = ``""`` +:ref:`String` **layer_names/avoidance/layer_2** = ``""`` -Optional name for the 3D physics layer 29. If left empty, the layer will display as "Layer 29". +Optional name for the navigation avoidance layer 2. If left empty, the layer will display as "Layer 2". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_physics/layer_3: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_3: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_physics/layer_3** = ``""`` +:ref:`String` **layer_names/avoidance/layer_3** = ``""`` -Optional name for the 3D physics layer 3. If left empty, the layer will display as "Layer 3". +Optional name for the navigation avoidance layer 3. If left empty, the layer will display as "Layer 3". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_physics/layer_30: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_4: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_physics/layer_30** = ``""`` +:ref:`String` **layer_names/avoidance/layer_4** = ``""`` -Optional name for the 3D physics layer 30. If left empty, the layer will display as "Layer 30". +Optional name for the navigation avoidance layer 4. If left empty, the layer will display as "Layer 4". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_physics/layer_31: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_5: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_physics/layer_31** = ``""`` +:ref:`String` **layer_names/avoidance/layer_5** = ``""`` -Optional name for the 3D physics layer 31. If left empty, the layer will display as "Layer 31". +Optional name for the navigation avoidance layer 5. If left empty, the layer will display as "Layer 5". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_physics/layer_32: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_6: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_physics/layer_32** = ``""`` +:ref:`String` **layer_names/avoidance/layer_6** = ``""`` -Optional name for the 3D physics layer 32. If left empty, the layer will display as "Layer 32". +Optional name for the navigation avoidance layer 6. If left empty, the layer will display as "Layer 6". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_physics/layer_4: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_7: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_physics/layer_4** = ``""`` +:ref:`String` **layer_names/avoidance/layer_7** = ``""`` -Optional name for the 3D physics layer 4. If left empty, the layer will display as "Layer 4". +Optional name for the navigation avoidance layer 7. If left empty, the layer will display as "Layer 7". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_physics/layer_5: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_8: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_physics/layer_5** = ``""`` +:ref:`String` **layer_names/avoidance/layer_8** = ``""`` -Optional name for the 3D physics layer 5. If left empty, the layer will display as "Layer 5". +Optional name for the navigation avoidance layer 8. If left empty, the layer will display as "Layer 8". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_physics/layer_6: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_9: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_physics/layer_6** = ``""`` +:ref:`String` **layer_names/avoidance/layer_9** = ``""`` -Optional name for the 3D physics layer 6. If left empty, the layer will display as "Layer 6". +Optional name for the navigation avoidance layer 9. If left empty, the layer will display as "Layer 9". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_physics/layer_7: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_10: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_physics/layer_7** = ``""`` +:ref:`String` **layer_names/avoidance/layer_10** = ``""`` -Optional name for the 3D physics layer 7. If left empty, the layer will display as "Layer 7". +Optional name for the navigation avoidance layer 10. If left empty, the layer will display as "Layer 10". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_physics/layer_8: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_11: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_physics/layer_8** = ``""`` +:ref:`String` **layer_names/avoidance/layer_11** = ``""`` -Optional name for the 3D physics layer 8. If left empty, the layer will display as "Layer 8". +Optional name for the navigation avoidance layer 11. If left empty, the layer will display as "Layer 11". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_physics/layer_9: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_12: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_physics/layer_9** = ``""`` +:ref:`String` **layer_names/avoidance/layer_12** = ``""`` -Optional name for the 3D physics layer 9. If left empty, the layer will display as "Layer 9". +Optional name for the navigation avoidance layer 12. If left empty, the layer will display as "Layer 12". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_render/layer_1: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_13: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_render/layer_1** = ``""`` +:ref:`String` **layer_names/avoidance/layer_13** = ``""`` -Optional name for the 3D render layer 1. If left empty, the layer will display as "Layer 1". +Optional name for the navigation avoidance layer 13. If left empty, the layer will display as "Layer 13". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_render/layer_10: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_14: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_render/layer_10** = ``""`` +:ref:`String` **layer_names/avoidance/layer_14** = ``""`` -Optional name for the 3D render layer 10. If left empty, the layer will display as "Layer 10". +Optional name for the navigation avoidance layer 14. If left empty, the layer will display as "Layer 14". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_render/layer_11: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_15: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_render/layer_11** = ``""`` +:ref:`String` **layer_names/avoidance/layer_15** = ``""`` -Optional name for the 3D render layer 11. If left empty, the layer will display as "Layer 11". +Optional name for the navigation avoidance layer 15. If left empty, the layer will display as "Layer 15". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_render/layer_12: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_16: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_render/layer_12** = ``""`` +:ref:`String` **layer_names/avoidance/layer_16** = ``""`` -Optional name for the 3D render layer 12. If left empty, the layer will display as "Layer 12". +Optional name for the navigation avoidance layer 16. If left empty, the layer will display as "Layer 16". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_render/layer_13: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_17: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_render/layer_13** = ``""`` +:ref:`String` **layer_names/avoidance/layer_17** = ``""`` -Optional name for the 3D render layer 13. If left empty, the layer will display as "Layer 13". +Optional name for the navigation avoidance layer 17. If left empty, the layer will display as "Layer 17". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_render/layer_14: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_18: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_render/layer_14** = ``""`` +:ref:`String` **layer_names/avoidance/layer_18** = ``""`` -Optional name for the 3D render layer 14. If left empty, the layer will display as "Layer 14". +Optional name for the navigation avoidance layer 18. If left empty, the layer will display as "Layer 18". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_render/layer_15: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_19: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_render/layer_15** = ``""`` +:ref:`String` **layer_names/avoidance/layer_19** = ``""`` -Optional name for the 3D render layer 15. If left empty, the layer will display as "Layer 15". +Optional name for the navigation avoidance layer 19. If left empty, the layer will display as "Layer 19". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_render/layer_16: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_20: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_render/layer_16** = ``""`` +:ref:`String` **layer_names/avoidance/layer_20** = ``""`` -Optional name for the 3D render layer 16. If left empty, the layer will display as "Layer 16". +Optional name for the navigation avoidance layer 20. If left empty, the layer will display as "Layer 20". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_render/layer_17: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_21: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_render/layer_17** = ``""`` +:ref:`String` **layer_names/avoidance/layer_21** = ``""`` -Optional name for the 3D render layer 17. If left empty, the layer will display as "Layer 17". +Optional name for the navigation avoidance layer 21. If left empty, the layer will display as "Layer 21". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_render/layer_18: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_22: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_render/layer_18** = ``""`` +:ref:`String` **layer_names/avoidance/layer_22** = ``""`` -Optional name for the 3D render layer 18. If left empty, the layer will display as "Layer 18". +Optional name for the navigation avoidance layer 22. If left empty, the layer will display as "Layer 22". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_render/layer_19: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_23: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_render/layer_19** = ``""`` +:ref:`String` **layer_names/avoidance/layer_23** = ``""`` -Optional name for the 3D render layer 19. If left empty, the layer will display as "Layer 19". +Optional name for the navigation avoidance layer 23. If left empty, the layer will display as "Layer 23". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_render/layer_2: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_24: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_render/layer_2** = ``""`` +:ref:`String` **layer_names/avoidance/layer_24** = ``""`` -Optional name for the 3D render layer 2. If left empty, the layer will display as "Layer 2". +Optional name for the navigation avoidance layer 24. If left empty, the layer will display as "Layer 24". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_render/layer_20: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_25: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_render/layer_20** = ``""`` +:ref:`String` **layer_names/avoidance/layer_25** = ``""`` -Optional name for the 3D render layer 20. If left empty, the layer will display as "Layer 20". +Optional name for the navigation avoidance layer 25. If left empty, the layer will display as "Layer 25". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_render/layer_3: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_26: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_render/layer_3** = ``""`` +:ref:`String` **layer_names/avoidance/layer_26** = ``""`` -Optional name for the 3D render layer 3. If left empty, the layer will display as "Layer 3". +Optional name for the navigation avoidance layer 26. If left empty, the layer will display as "Layer 26". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_render/layer_4: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_27: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_render/layer_4** = ``""`` +:ref:`String` **layer_names/avoidance/layer_27** = ``""`` -Optional name for the 3D render layer 4. If left empty, the layer will display as "Layer 4". +Optional name for the navigation avoidance layer 27. If left empty, the layer will display as "Layer 27". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_render/layer_5: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_28: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_render/layer_5** = ``""`` +:ref:`String` **layer_names/avoidance/layer_28** = ``""`` -Optional name for the 3D render layer 5. If left empty, the layer will display as "Layer 5". +Optional name for the navigation avoidance layer 28. If left empty, the layer will display as "Layer 28". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_render/layer_6: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_29: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_render/layer_6** = ``""`` +:ref:`String` **layer_names/avoidance/layer_29** = ``""`` -Optional name for the 3D render layer 6. If left empty, the layer will display as "Layer 6". +Optional name for the navigation avoidance layer 29. If left empty, the layer will display as "Layer 29". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_render/layer_7: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_30: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_render/layer_7** = ``""`` +:ref:`String` **layer_names/avoidance/layer_30** = ``""`` -Optional name for the 3D render layer 7. If left empty, the layer will display as "Layer 7". +Optional name for the navigation avoidance layer 30. If left empty, the layer will display as "Layer 30". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_render/layer_8: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_31: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_render/layer_8** = ``""`` +:ref:`String` **layer_names/avoidance/layer_31** = ``""`` -Optional name for the 3D render layer 8. If left empty, the layer will display as "Layer 8". +Optional name for the navigation avoidance layer 31. If left empty, the layer will display as "Layer 31". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_layer_names/3d_render/layer_9: +.. _class_ProjectSettings_property_layer_names/avoidance/layer_32: .. rst-class:: classref-property -:ref:`String` **layer_names/3d_render/layer_9** = ``""`` +:ref:`String` **layer_names/avoidance/layer_32** = ``""`` -Optional name for the 3D render layer 9. If left empty, the layer will display as "Layer 9". +Optional name for the navigation avoidance layer 32. If left empty, the layer will display as "Layer 32". .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_memory/limits/message_queue/max_size_kb: +.. _class_ProjectSettings_property_memory/limits/message_queue/max_size_mb: .. rst-class:: classref-property -:ref:`int` **memory/limits/message_queue/max_size_kb** = ``4096`` +:ref:`int` **memory/limits/message_queue/max_size_mb** = ``32`` Godot uses a message queue to defer some function calls. If you run out of space on it (you will see an error), you can increase the size here. @@ -7129,6 +8123,18 @@ Default link connection radius for 2D navigation maps. See :ref:`NavigationServe ---- +.. _class_ProjectSettings_property_navigation/2d/use_edge_connections: + +.. rst-class:: classref-property + +:ref:`bool` **navigation/2d/use_edge_connections** = ``true`` + +If enabled 2D navigation regions will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. This setting only affects World2D default navigation maps. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_navigation/3d/default_cell_size: .. rst-class:: classref-property @@ -7165,6 +8171,42 @@ Default link connection radius for 3D navigation maps. See :ref:`NavigationServe ---- +.. _class_ProjectSettings_property_navigation/3d/use_edge_connections: + +.. rst-class:: classref-property + +:ref:`bool` **navigation/3d/use_edge_connections** = ``true`` + +If enabled 3D navigation regions will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. This setting only affects World3D default navigation maps. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_navigation/avoidance/thread_model/avoidance_use_high_priority_threads: + +.. rst-class:: classref-property + +:ref:`bool` **navigation/avoidance/thread_model/avoidance_use_high_priority_threads** = ``true`` + +If enabled and avoidance calculations use multiple threads the threads run with high priority. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_navigation/avoidance/thread_model/avoidance_use_multiple_threads: + +.. rst-class:: classref-property + +:ref:`bool` **navigation/avoidance/thread_model/avoidance_use_multiple_threads** = ``true`` + +If enabled the avoidance calculations use multiple threads. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_network/limits/debugger/max_chars_per_second: .. rst-class:: classref-property @@ -7249,30 +8291,6 @@ Maximum size (in kiB) for the :ref:`WebRTCDataChannel` ---- -.. _class_ProjectSettings_property_network/remote_fs/page_read_ahead: - -.. rst-class:: classref-property - -:ref:`int` **network/remote_fs/page_read_ahead** = ``4`` - -Amount of read ahead used by remote filesystem. Higher values decrease the effects of latency at the cost of higher bandwidth usage. - -.. rst-class:: classref-item-separator - ----- - -.. _class_ProjectSettings_property_network/remote_fs/page_size: - -.. rst-class:: classref-property - -:ref:`int` **network/remote_fs/page_size** = ``65536`` - -Page size used by remote filesystem (in bytes). - -.. rst-class:: classref-item-separator - ----- - .. _class_ProjectSettings_property_network/tls/certificate_bundle_override: .. rst-class:: classref-property @@ -7785,9 +8803,11 @@ The number of fixed iterations per second. This controls how often physics simul :ref:`int` **rendering/2d/sdf/oversize** = ``1`` -.. container:: contribute +Controls how much of the original viewport size should be covered by the 2D signed distance field. This SDF can be sampled in :ref:`CanvasItem` shaders and is used for :ref:`GPUParticles2D` collision. Higher values allow portions of occluders located outside the viewport to still be taken into account in the generated signed distance field, at the cost of performance. If you notice particles falling through :ref:`LightOccluder2D`\ s as the occluders leave the viewport, increase this setting. - There is currently no description for this property. Please help us by :ref:`contributing one `! +The percentage 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. .. rst-class:: classref-item-separator @@ -7799,9 +8819,9 @@ The number of fixed iterations per second. This controls how often physics simul :ref:`int` **rendering/2d/sdf/scale** = ``1`` -.. container:: contribute +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. - There is currently no description for this property. Please help us by :ref:`contributing one `! +\ **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 @@ -7813,9 +8833,9 @@ The number of fixed iterations per second. This controls how often physics simul :ref:`int` **rendering/2d/shadow_atlas/size** = ``2048`` -.. container:: contribute +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. - There is currently no description for this property. Please help us by :ref:`contributing one `! +\ **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 @@ -7827,9 +8847,11 @@ The number of fixed iterations per second. This controls how often physics simul :ref:`bool` **rendering/2d/snap/snap_2d_transforms_to_pixel** = ``false`` -.. container:: contribute +If ``true``, :ref:`CanvasItem` nodes will internally snap to full pixels. Their position can still be sub-pixel, but the decimals will not have effect. This can lead to a crisper appearance at the cost of less smooth movement, especially when :ref:`Camera2D` smoothing is enabled. - There is currently no description for this property. Please help us by :ref:`contributing one `! +\ **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`. .. rst-class:: classref-item-separator @@ -7841,9 +8863,11 @@ The number of fixed iterations per second. This controls how often physics simul :ref:`bool` **rendering/2d/snap/snap_2d_vertices_to_pixel** = ``false`` -.. container:: contribute +If ``true``, vertices of :ref:`CanvasItem` nodes will snap to full pixels. Only affects the final vertex positions, not the transforms. This can lead to a crisper appearance at the cost of less smooth movement, especially when :ref:`Camera2D` smoothing is enabled. - There is currently no description for this property. Please help us by :ref:`contributing one `! +\ **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`. .. rst-class:: classref-item-separator @@ -7855,7 +8879,7 @@ The number of fixed iterations per second. This controls how often physics simul :ref:`int` **rendering/anti_aliasing/quality/msaa_2d** = ``0`` -Sets the number of MSAA samples to use for 2D/Canvas 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. This has no effect on shader-induced aliasing or texture aliasing. +Sets the number of MSAA samples to use for 2D/Canvas 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. This has no effect on shader-induced aliasing or texture aliasing. \ **Note:** MSAA is only supported in the Forward+ and Mobile rendering methods, not Compatibility. @@ -7869,7 +8893,7 @@ Sets the number of MSAA samples to use for 2D/Canvas rendering (as a power of tw :ref:`int` **rendering/anti_aliasing/quality/msaa_3d** = ``0`` -Sets the number of 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. See also bilinear scaling 3d :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. +Sets the number of 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:** MSAA is only supported in the Forward+ and Mobile rendering methods, not Compatibility. @@ -7931,9 +8955,7 @@ Enables Temporal Anti-Aliasing for the default screen :ref:`Viewport` **rendering/anti_aliasing/screen_space_roughness_limiter/amount** = ``0.25`` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +**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 @@ -7947,7 +8969,9 @@ Enables Temporal Anti-Aliasing for the default screen :ref:`Viewport`. This filter has a small performance cost, so consider disabling it if it doesn't benefit your scene noticeably. -\ **Note:** TAA is only supported in the Forward+ and Mobile rendering methods, not Compatibility. +\ **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. .. rst-class:: classref-item-separator @@ -7959,9 +8983,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`` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +**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 @@ -8251,7 +9273,9 @@ Sets the quality of the screen-space indirect lighting effect. Higher values tak :ref:`float` **rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale** = ``0.01`` -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. +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. .. rst-class:: classref-item-separator @@ -8263,7 +9287,9 @@ Scales the depth over which the subsurface scattering effect is applied. A high :ref:`int` **rendering/environment/subsurface_scattering/subsurface_scattering_quality** = ``1`` -Sets the quality of the subsurface scattering effect. Higher values are slower but look nicer. +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. .. rst-class:: classref-item-separator @@ -8275,7 +9301,9 @@ Sets the quality of the subsurface scattering effect. Higher values are slower b :ref:`float` **rendering/environment/subsurface_scattering/subsurface_scattering_scale** = ``0.05`` -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. +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. .. rst-class:: classref-item-separator @@ -8433,9 +9461,9 @@ If ``true``, renders :ref:`VoxelGI` and SDFGI (:ref:`Environment. :ref:`int` **rendering/global_illumination/sdfgi/frames_to_converge** = ``5`` -.. container:: contribute +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`. - There is currently no description for this property. Please help us by :ref:`contributing one `! +\ **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 @@ -8447,9 +9475,11 @@ If ``true``, renders :ref:`VoxelGI` and SDFGI (:ref:`Environment. :ref:`int` **rendering/global_illumination/sdfgi/frames_to_update_lights** = ``2`` -.. container:: contribute +The number of frames over which dynamic lights should be updated in signed distance field global illumination. Higher values take more time to update indirect lighting coming from dynamic lights, but result in better performance when many dynamic lights are present. See also :ref:`rendering/global_illumination/sdfgi/frames_to_converge` and :ref:`rendering/global_illumination/sdfgi/probe_ray_count`. - There is currently no description for this property. Please help us by :ref:`contributing one `! +\ **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. .. rst-class:: classref-item-separator @@ -8461,9 +9491,9 @@ If ``true``, renders :ref:`VoxelGI` and SDFGI (:ref:`Environment. :ref:`int` **rendering/global_illumination/sdfgi/probe_ray_count** = ``1`` -.. container:: contribute +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`. - There is currently no description for this property. Please help us by :ref:`contributing one `! +\ **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 @@ -8475,9 +9505,9 @@ If ``true``, renders :ref:`VoxelGI` and SDFGI (:ref:`Environment. :ref:`int` **rendering/global_illumination/voxel_gi/quality** = ``0`` -.. container:: contribute +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. - There is currently no description for this property. Please help us by :ref:`contributing one `! +\ **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 @@ -8645,7 +9675,7 @@ The framerate-independent update speed when representing dynamic object lighting :ref:`bool` **rendering/lights_and_shadows/directional_shadow/16_bits** = ``true`` -Use 16 bits for shadow depth map. Enabling this results in shadows having less precision and may result in shadow acne, but can lead to performance improvements on some devices. +Use 16 bits for the directional shadow depth map. Enabling this results in shadows having less precision and may result in shadow acne, but can lead to performance improvements on some devices. .. rst-class:: classref-item-separator @@ -8657,7 +9687,7 @@ Use 16 bits for shadow depth map. Enabling this results in shadows having less p :ref:`int` **rendering/lights_and_shadows/directional_shadow/size** = ``4096`` -The directional shadow's size in pixels. Higher values will result in sharper shadows, at the cost of performance. The value will be rounded up to the nearest power of 2. +The directional shadow's size in pixels. Higher values will result in sharper shadows, at the cost of performance. The value is rounded up to the nearest power of 2. .. rst-class:: classref-item-separator @@ -8709,7 +9739,7 @@ Lower-end override for :ref:`rendering/lights_and_shadows/directional_shadow/sof :ref:`bool` **rendering/lights_and_shadows/positional_shadow/atlas_16_bits** = ``true`` -Use 16 bits for shadow depth map. Enabling this results in shadows having less precision and may result in shadow acne, but can lead to performance improvements on some devices. +Use 16 bits for the omni/spot shadow depth map. Enabling this results in shadows having less precision and may result in shadow acne, but can lead to performance improvements on some devices. .. rst-class:: classref-item-separator @@ -8977,7 +10007,9 @@ The automatic LOD bias to use for meshes rendered within the :ref:`ReflectionPro :ref:`int` **rendering/occlusion_culling/bvh_build_quality** = ``2`` -The `BVH `__ 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. +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`. .. rst-class:: classref-item-separator @@ -8989,7 +10021,9 @@ The `BVH `__ quality to :ref:`int` **rendering/occlusion_culling/occlusion_rays_per_thread** = ``512`` -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. +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`. .. rst-class:: classref-item-separator @@ -9231,6 +10265,18 @@ Windows override for :ref:`rendering/rendering_device/driver` **rendering/rendering_device/pipeline_cache/save_chunk_size_mb** = ``3.0`` + +Determines at which interval pipeline cache is saved to disk. The lower the value, the more often it is saved. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/rendering_device/staging_buffer/block_size_kb: .. rst-class:: classref-property @@ -9445,6 +10491,30 @@ Lower-end override for :ref:`rendering/shading/overrides/force_vertex_shading` **rendering/textures/canvas_textures/default_texture_filter** = ``1`` + +The default texture filtering mode to use on :ref:`CanvasItem`\ s. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_rendering/textures/canvas_textures/default_texture_repeat: + +.. rst-class:: classref-property + +:ref:`int` **rendering/textures/canvas_textures/default_texture_repeat** = ``0`` + +The default texture repeating mode to use on :ref:`CanvasItem`\ s. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/textures/decals/filter: .. rst-class:: classref-property @@ -9535,9 +10605,9 @@ If ``true``, the texture importer will import lossless textures using the PNG fo .. rst-class:: classref-property -:ref:`bool` **rendering/textures/vram_compression/import_etc2_astc** +:ref:`bool` **rendering/textures/vram_compression/import_etc2_astc** = ``false`` -If ``true``, the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression 2 algorithm for lower quality textures and normalmaps and Adaptable Scalable Texture Compression algorithm for high quality textures (in 4x4 block size). +If ``true``, the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression 2 algorithm for lower quality textures and normal maps and Adaptable Scalable Texture Compression algorithm for high quality textures (in 4x4 block size). \ **Note:** Changing this setting does *not* impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the ``.godot/imported/`` folder located inside the project folder then restart the editor (see :ref:`application/config/use_hidden_project_data_directory`). @@ -9549,9 +10619,9 @@ If ``true``, the texture importer will import VRAM-compressed textures using the .. rst-class:: classref-property -:ref:`bool` **rendering/textures/vram_compression/import_s3tc_bptc** +:ref:`bool` **rendering/textures/vram_compression/import_s3tc_bptc** = ``true`` -If ``true``, the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm (DXT1-5) for lower quality textures and the the BPTC algorithm (BC6H and BC7) for high quality textures. This algorithm is only supported on PC desktop platforms and consoles. +If ``true``, the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm (DXT1-5) for lower quality textures and the BPTC algorithm (BC6H and BC7) for high quality textures. This algorithm is only supported on PC desktop platforms and consoles. \ **Note:** Changing this setting does *not* impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the ``.godot/imported/`` folder located inside the project folder then restart the editor (see :ref:`application/config/use_hidden_project_data_directory`). @@ -9654,9 +10724,7 @@ The texture *must* use a lossless compression format so that colors can be match :ref:`int` **threading/worker_pool/max_threads** = ``-1`` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Maximum number of threads to be used by :ref:`WorkerThreadPool`. Value of ``-1`` means no limit. .. rst-class:: classref-item-separator @@ -9724,6 +10792,18 @@ Specify the default reference space. ---- +.. _class_ProjectSettings_property_xr/openxr/startup_alert: + +.. rst-class:: classref-property + +:ref:`bool` **xr/openxr/startup_alert** = ``true`` + +If ``true``, Godot will display an alert modal when OpenXR initialization fails on startup. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_xr/openxr/submit_depth_buffer: .. rst-class:: classref-property @@ -9773,11 +10853,11 @@ void **add_property_info** **(** :ref:`Dictionary` hint **)** Adds a custom property info to a property. The dictionary must contain: -- ``name``: :ref:`String` (the property's name) +- ``"name"``: :ref:`String` (the property's name) -- ``type``: :ref:`int` (see :ref:`Variant.Type`) +- ``"type"``: :ref:`int` (see :ref:`Variant.Type`) -- optionally ``hint``: :ref:`int` (see :ref:`PropertyHint`) and ``hint_string``: :ref:`String`\ +- optionally ``"hint"``: :ref:`int` (see :ref:`PropertyHint`) and ``"hint_string"``: :ref:`String`\ \ **Example:**\ @@ -10021,13 +11101,37 @@ Saves the configuration to a custom file. The file extension must be ``.godot`` ---- +.. _class_ProjectSettings_method_set_as_basic: + +.. rst-class:: classref-method + +void **set_as_basic** **(** :ref:`String` name, :ref:`bool` basic **)** + +Defines if the specified setting is considered basic or advanced. Basic settings will always be shown in the project settings. Advanced settings will only be shown if the user enables the "Advanced Settings" option. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_method_set_as_internal: + +.. rst-class:: classref-method + +void **set_as_internal** **(** :ref:`String` name, :ref:`bool` internal **)** + +Defines if the specified setting is considered internal. An internal setting won't show up in the Project Settings dialog. This is mostly useful for addons that need to store their own internal settings without exposing them directly to the user. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_method_set_initial_value: .. rst-class:: classref-method void **set_initial_value** **(** :ref:`String` name, :ref:`Variant` value **)** -Sets the specified property's initial value. This is the value the property reverts to. +Sets the specified setting's initial value. This is the value the setting reverts to. .. rst-class:: classref-item-separator diff --git a/classes/class_quaternion.rst b/classes/class_quaternion.rst index 6666ffb05b8..b865cd7ce3d 100644 --- a/classes/class_quaternion.rst +++ b/classes/class_quaternion.rst @@ -10,18 +10,18 @@ Quaternion ========== -Quaternion. +A unit quaternion used for representing 3D rotations. .. rst-class:: classref-introduction-group Description ----------- -A unit quaternion used for representing 3D rotations. Quaternions need to be normalized to be used for rotation. +Quaternions are similar to :ref:`Basis`, which implements the matrix representation of rotations. Unlike :ref:`Basis`, which stores rotation, scale, and shearing, quaternions only store rotation. -It is similar to Basis, which implements matrix representation of rotations, and can be parametrized using both an axis-angle pair or Euler angles. Basis stores rotation, scale, and shearing, while Quaternion only stores rotation. +Quaternions can be parametrized using both an axis-angle pair or Euler angles. Due to their compactness and the way they are stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors. -Due to its compactness and the way it is stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors. +\ **Note:** Quaternions need to be normalized before being used for rotation. .. rst-class:: classref-introduction-group @@ -269,9 +269,7 @@ Constructs a **Quaternion** as a copy of the given **Quaternion**. :ref:`Quaternion` **Quaternion** **(** :ref:`Vector3` arc_from, :ref:`Vector3` arc_to **)** -.. container:: contribute - - There is currently no description for this constructor. Please help us by :ref:`contributing one `! +Constructs a quaternion representing the shortest arc between two points on the surface of a sphere with a radius of ``1.0``. .. rst-class:: classref-item-separator diff --git a/classes/class_randomnumbergenerator.rst b/classes/class_randomnumbergenerator.rst index da4decd0ae7..9035c6d1822 100644 --- a/classes/class_randomnumbergenerator.rst +++ b/classes/class_randomnumbergenerator.rst @@ -12,7 +12,7 @@ RandomNumberGenerator **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -A class for generating pseudo-random numbers. +Provides methods for generating pseudo-random numbers. .. rst-class:: classref-introduction-group @@ -21,7 +21,7 @@ Description RandomNumberGenerator is a class for generating pseudo-random numbers. It currently uses `PCG32 `__. -\ **Note:** The underlying algorithm is an implementation detail. As a result, it should not be depended upon for reproducible random streams across Godot versions. +\ **Note:** The underlying algorithm is an implementation detail and should not be depended upon. To generate a random float number (within a given range) based on a time-dependant seed: @@ -31,8 +31,6 @@ To generate a random float number (within a given range) based on a time-dependa func _ready(): var my_random_number = rng.randf_range(-10.0, 10.0) -\ **Note:** The default values of :ref:`seed` and :ref:`state` properties are pseudo-random, and change when calling :ref:`randomize`. The ``0`` value documented here is a placeholder, and not the actual default seed. - .. rst-class:: classref-introduction-group Tutorials @@ -102,6 +100,8 @@ 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. + :: var rng = RandomNumberGenerator.new() @@ -136,6 +136,8 @@ 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. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_range.rst b/classes/class_range.rst index 268e3c04fbb..b5e929edcda 100644 --- a/classes/class_range.rst +++ b/classes/class_range.rst @@ -14,14 +14,14 @@ Range **Inherited By:** :ref:`EditorSpinSlider`, :ref:`ProgressBar`, :ref:`ScrollBar`, :ref:`Slider`, :ref:`SpinBox`, :ref:`TextureProgressBar` -Abstract base class for range-based controls. +Abstract base class for controls that represent a number within a range. .. rst-class:: classref-introduction-group Description ----------- -Range is a base class for :ref:`Control` nodes that change a floating-point :ref:`value` between a :ref:`min_value` and :ref:`max_value`, using a configured :ref:`step` and :ref:`page` size. See e.g. :ref:`ScrollBar` and :ref:`Slider` for examples of higher level nodes using Range. +Range is an abstract base class for controls that represent a number within a range, using a configured :ref:`step` and :ref:`page` size. See e.g. :ref:`ScrollBar` and :ref:`Slider` for examples of higher-level nodes using Range. .. rst-class:: classref-reftable-group @@ -158,7 +158,7 @@ If ``true``, :ref:`value` may be less than :ref:`min - void **set_exp_ratio** **(** :ref:`bool` value **)** - :ref:`bool` **is_ratio_exp** **(** **)** -If ``true``, and ``min_value`` is greater than 0, ``value`` will be represented exponentially rather than linearly. +If ``true``, and :ref:`min_value` is greater than 0, :ref:`value` will be represented exponentially rather than linearly. .. rst-class:: classref-item-separator @@ -175,7 +175,7 @@ If ``true``, and ``min_value`` is greater than 0, ``value`` will be represented - void **set_max** **(** :ref:`float` value **)** - :ref:`float` **get_max** **(** **)** -Maximum value. Range is clamped if ``value`` is greater than ``max_value``. +Maximum value. Range is clamped if :ref:`value` is greater than :ref:`max_value`. .. rst-class:: classref-item-separator @@ -192,7 +192,7 @@ Maximum value. Range is clamped if ``value`` is greater than ``max_value``. - void **set_min** **(** :ref:`float` value **)** - :ref:`float` **get_min** **(** **)** -Minimum value. Range is clamped if ``value`` is less than ``min_value``. +Minimum value. Range is clamped if :ref:`value` is less than :ref:`min_value`. .. rst-class:: classref-item-separator @@ -209,7 +209,7 @@ Minimum value. Range is clamped if ``value`` is less than ``min_value``. - void **set_page** **(** :ref:`float` value **)** - :ref:`float` **get_page** **(** **)** -Page size. Used mainly for :ref:`ScrollBar`. ScrollBar's length is its size multiplied by ``page`` over the difference between ``min_value`` and ``max_value``. +Page size. Used mainly for :ref:`ScrollBar`. ScrollBar's length is its size multiplied by :ref:`page` over the difference between :ref:`min_value` and :ref:`max_value`. .. rst-class:: classref-item-separator @@ -243,7 +243,7 @@ The value mapped between 0 and 1. - void **set_use_rounded_values** **(** :ref:`bool` value **)** - :ref:`bool` **is_using_rounded_values** **(** **)** -If ``true``, ``value`` will always be rounded to the nearest integer. +If ``true``, :ref:`value` will always be rounded to the nearest integer. .. rst-class:: classref-item-separator @@ -260,7 +260,7 @@ If ``true``, ``value`` will always be rounded to the nearest integer. - void **set_step** **(** :ref:`float` value **)** - :ref:`float` **get_step** **(** **)** -If greater than 0, ``value`` will always be rounded to a multiple of ``step``. If ``rounded`` is also ``true``, ``value`` will first be rounded to a multiple of ``step`` then rounded to the nearest integer. +If greater than 0, :ref:`value` will always be rounded to a multiple of this property's value. If :ref:`rounded` is also ``true``, :ref:`value` will first be rounded to a multiple of this property's value, then rounded to the nearest integer. .. rst-class:: classref-item-separator diff --git a/classes/class_raycast2d.rst b/classes/class_raycast2d.rst index 67b34838c23..44803310bfd 100644 --- a/classes/class_raycast2d.rst +++ b/classes/class_raycast2d.rst @@ -12,22 +12,20 @@ RayCast2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Query the closest object intersecting a ray. +A ray in 2D space, used to find the first :ref:`CollisionObject2D` it intersects. .. rst-class:: classref-introduction-group Description ----------- -A RayCast represents a line from its origin to its destination position, :ref:`target_position`. It is used to query the 2D space in order to find the closest object along the path of the ray. +A raycast represents a ray from its origin to its :ref:`target_position` that finds the closest :ref:`CollisionObject2D` along its path, if it intersects any. This is useful for a lot of things, such as -RayCast2D can ignore some objects by adding them to the exception list via :ref:`add_exception`, by setting proper filtering with collision layers, or by filtering object types with type masks. +\ **RayCast2D** can ignore some objects by adding them to an exception list, by making its detection reporting ignore :ref:`Area2D`\ s (:ref:`collide_with_areas`) or :ref:`PhysicsBody2D`\ s (:ref:`collide_with_bodies`), or by configuring physics layers. -RayCast2D can be configured to report collisions with :ref:`Area2D`\ s (:ref:`collide_with_areas`) and/or :ref:`PhysicsBody2D`\ s (:ref:`collide_with_bodies`). +\ **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`. -Only enabled raycasts will be able to query the space and report collisions. - -RayCast2D calculates intersection every physics frame (see :ref:`Node`), and the result is cached so it can be used later until the next frame. If multiple queries are required between physics frames (or during the same frame) use :ref:`force_raycast_update` after adjusting the raycast. +To sweep over a region of 2D space, you can approximate the region with multiple **RayCast2D**\ s or use :ref:`ShapeCast2D`. .. rst-class:: classref-introduction-group diff --git a/classes/class_raycast3d.rst b/classes/class_raycast3d.rst index 8b0ce193dd7..e297c936356 100644 --- a/classes/class_raycast3d.rst +++ b/classes/class_raycast3d.rst @@ -12,22 +12,20 @@ RayCast3D **Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -Query the closest object intersecting a ray. +A ray in 3D space, used to find the first :ref:`CollisionObject3D` it intersects. .. rst-class:: classref-introduction-group Description ----------- -A RayCast represents a line from its origin to its destination position, :ref:`target_position`. It is used to query the 3D space in order to find the closest object along the path of the ray. +A raycast represents a ray from its origin to its :ref:`target_position` that finds the closest :ref:`CollisionObject3D` along its path, if it intersects any. This is useful for a lot of things, such as -RayCast3D can ignore some objects by adding them to the exception list via :ref:`add_exception` or by setting proper filtering with collision layers and masks. +\ **RayCast3D** can ignore some objects by adding them to an exception list, by making its detection reporting ignore :ref:`Area3D`\ s (:ref:`collide_with_areas`) or :ref:`PhysicsBody3D`\ s (:ref:`collide_with_bodies`), or by configuring physics layers. -RayCast3D can be configured to report collisions with :ref:`Area3D`\ s (:ref:`collide_with_areas`) and/or :ref:`PhysicsBody3D`\ s (:ref:`collide_with_bodies`). +\ **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`. -Only enabled raycasts will be able to query the space and report collisions. - -RayCast3D calculates intersection every physics frame (see :ref:`Node`), and the result is cached so it can be used later until the next frame. If multiple queries are required between physics frames (or during the same frame), use :ref:`force_raycast_update` after adjusting the raycast. +To sweep over a region of 3D space, you can approximate the region with multiple **RayCast3D**\ s or use :ref:`ShapeCast3D`. .. rst-class:: classref-introduction-group diff --git a/classes/class_rdattachmentformat.rst b/classes/class_rdattachmentformat.rst index 698a1e77266..25ff27dd20b 100644 --- a/classes/class_rdattachmentformat.rst +++ b/classes/class_rdattachmentformat.rst @@ -12,9 +12,14 @@ RDAttachmentFormat **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Attachment format (used by :ref:`RenderingDevice`). - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +This object is used by :ref:`RenderingDevice`. .. rst-class:: classref-reftable-group @@ -52,9 +57,7 @@ Property Descriptions - void **set_format** **(** :ref:`DataFormat` value **)** - :ref:`DataFormat` **get_format** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The attachment's data format. .. rst-class:: classref-item-separator @@ -71,9 +74,7 @@ Property Descriptions - void **set_samples** **(** :ref:`TextureSamples` value **)** - :ref:`TextureSamples` **get_samples** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The number of samples used when sampling the attachment. .. rst-class:: classref-item-separator @@ -90,9 +91,7 @@ Property Descriptions - void **set_usage_flags** **(** :ref:`int` value **)** - :ref:`int` **get_usage_flags** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The attachment's usage flags, which determine what can be done with it. .. |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_rdframebufferpass.rst b/classes/class_rdframebufferpass.rst index 5fbb6b71d5f..0f5069cfc6e 100644 --- a/classes/class_rdframebufferpass.rst +++ b/classes/class_rdframebufferpass.rst @@ -12,7 +12,7 @@ RDFramebufferPass **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Framebuffer pass attachment description. +Framebuffer pass attachment description (used by :ref:`RenderingDevice`). .. rst-class:: classref-introduction-group @@ -21,7 +21,9 @@ Description This class contains the list of attachment descriptions for a framebuffer pass. Each points with an index to a previously supplied list of texture attachments. -Multipass framebuffers can optimize some configurations in mobile, on desktop they provide little to no advantage. +Multipass framebuffers can optimize some configurations in mobile. On desktop, they provide little to no advantage. + +This object is used by :ref:`RenderingDevice`. .. rst-class:: classref-reftable-group @@ -58,7 +60,7 @@ Constants **ATTACHMENT_UNUSED** = ``-1`` - +Attachment is unused. .. rst-class:: classref-section-separator diff --git a/classes/class_rdpipelinecolorblendstate.rst b/classes/class_rdpipelinecolorblendstate.rst index 05baa223108..ad95aa94fc5 100644 --- a/classes/class_rdpipelinecolorblendstate.rst +++ b/classes/class_rdpipelinecolorblendstate.rst @@ -12,9 +12,14 @@ RDPipelineColorBlendState **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Pipeline color blend state (used by :ref:`RenderingDevice`). - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +This object is used by :ref:`RenderingDevice`. .. rst-class:: classref-reftable-group @@ -54,9 +59,7 @@ Property Descriptions - void **set_attachments** **(** :ref:`RDPipelineColorBlendStateAttachment[]` value **)** - :ref:`RDPipelineColorBlendStateAttachment[]` **get_attachments** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The attachments that are blended together. .. rst-class:: classref-item-separator @@ -73,9 +76,7 @@ Property Descriptions - void **set_blend_constant** **(** :ref:`Color` value **)** - :ref:`Color` **get_blend_constant** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The constant color to blend with. See also :ref:`RenderingDevice.draw_list_set_blend_constants`. .. rst-class:: classref-item-separator @@ -92,9 +93,7 @@ Property Descriptions - void **set_enable_logic_op** **(** :ref:`bool` value **)** - :ref:`bool` **get_enable_logic_op** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If ``true``, performs the logic operation defined in :ref:`logic_op`. .. rst-class:: classref-item-separator @@ -111,9 +110,7 @@ Property Descriptions - void **set_logic_op** **(** :ref:`LogicOperation` value **)** - :ref:`LogicOperation` **get_logic_op** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The logic operation to perform for blending. Only effective if :ref:`enable_logic_op` is ``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_rdpipelinecolorblendstateattachment.rst b/classes/class_rdpipelinecolorblendstateattachment.rst index 0687b17dcf7..d94b15983de 100644 --- a/classes/class_rdpipelinecolorblendstateattachment.rst +++ b/classes/class_rdpipelinecolorblendstateattachment.rst @@ -12,9 +12,81 @@ RDPipelineColorBlendStateAttachment **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Pipeline color blend state attachment (used by :ref:`RenderingDevice`). - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +Controls how blending between source and destination fragments is performed when using :ref:`RenderingDevice`. + +For reference, this is how common user-facing blend modes are implemented in Godot's 2D renderer: + +\ **Mix:**\ + +:: + + var attachment = RDPipelineColorBlendStateAttachment.new() + attachment.enable_blend = true + attachment.color_blend_op = RenderingDevice.BLEND_OP_ADD + attachment.src_color_blend_factor = RenderingDevice.BLEND_FACTOR_SRC_ALPHA + attachment.dst_color_blend_factor = RenderingDevice.BLEND_FACTOR_ONE_MINUS_SRC_ALPHA + attachment.alpha_blend_op = RenderingDevice.BLEND_OP_ADD + attachment.src_alpha_blend_factor = RenderingDevice.BLEND_FACTOR_ONE + attachment.dst_alpha_blend_factor = RenderingDevice.BLEND_FACTOR_ONE_MINUS_SRC_ALPHA + +\ **Add:**\ + +:: + + var attachment = RDPipelineColorBlendStateAttachment.new() + attachment.enable_blend = true + attachment.alpha_blend_op = RenderingDevice.BLEND_OP_ADD + attachment.color_blend_op = RenderingDevice.BLEND_OP_ADD + attachment.src_color_blend_factor = RenderingDevice.BLEND_FACTOR_SRC_ALPHA + attachment.dst_color_blend_factor = RenderingDevice.BLEND_FACTOR_ONE + attachment.src_alpha_blend_factor = RenderingDevice.BLEND_FACTOR_SRC_ALPHA + attachment.dst_alpha_blend_factor = RenderingDevice.BLEND_FACTOR_ONE + +\ **Subtract:**\ + +:: + + var attachment = RDPipelineColorBlendStateAttachment.new() + attachment.enable_blend = true + attachment.alpha_blend_op = RenderingDevice.BLEND_OP_REVERSE_SUBTRACT + attachment.color_blend_op = RenderingDevice.BLEND_OP_REVERSE_SUBTRACT + attachment.src_color_blend_factor = RenderingDevice.BLEND_FACTOR_SRC_ALPHA + attachment.dst_color_blend_factor = RenderingDevice.BLEND_FACTOR_ONE + attachment.src_alpha_blend_factor = RenderingDevice.BLEND_FACTOR_SRC_ALPHA + attachment.dst_alpha_blend_factor = RenderingDevice.BLEND_FACTOR_ONE + +\ **Multiply:**\ + +:: + + var attachment = RDPipelineColorBlendStateAttachment.new() + attachment.enable_blend = true + attachment.alpha_blend_op = RenderingDevice.BLEND_OP_ADD + attachment.color_blend_op = RenderingDevice.BLEND_OP_ADD + attachment.src_color_blend_factor = RenderingDevice.BLEND_FACTOR_DST_COLOR + attachment.dst_color_blend_factor = RenderingDevice.BLEND_FACTOR_ZERO + attachment.src_alpha_blend_factor = RenderingDevice.BLEND_FACTOR_DST_ALPHA + attachment.dst_alpha_blend_factor = RenderingDevice.BLEND_FACTOR_ZERO + +\ **Pre-multiplied alpha:**\ + +:: + + var attachment = RDPipelineColorBlendStateAttachment.new() + attachment.enable_blend = true + attachment.alpha_blend_op = RenderingDevice.BLEND_OP_ADD + attachment.color_blend_op = RenderingDevice.BLEND_OP_ADD + attachment.src_color_blend_factor = RenderingDevice.BLEND_FACTOR_ONE + attachment.dst_color_blend_factor = RenderingDevice.BLEND_FACTOR_ONE_MINUS_SRC_ALPHA + attachment.src_alpha_blend_factor = RenderingDevice.BLEND_FACTOR_ONE + attachment.dst_alpha_blend_factor = RenderingDevice.BLEND_FACTOR_ONE_MINUS_SRC_ALPHA .. rst-class:: classref-reftable-group @@ -80,9 +152,7 @@ Property Descriptions - void **set_alpha_blend_op** **(** :ref:`BlendOperation` value **)** - :ref:`BlendOperation` **get_alpha_blend_op** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The blend mode to use for the alpha channel. .. rst-class:: classref-item-separator @@ -99,9 +169,7 @@ Property Descriptions - void **set_color_blend_op** **(** :ref:`BlendOperation` value **)** - :ref:`BlendOperation` **get_color_blend_op** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The blend mode to use for the red/green/blue color channels. .. rst-class:: classref-item-separator @@ -118,9 +186,7 @@ Property Descriptions - void **set_dst_alpha_blend_factor** **(** :ref:`BlendFactor` value **)** - :ref:`BlendFactor` **get_dst_alpha_blend_factor** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Controls how the blend factor for the alpha channel is determined based on the destination's fragments. .. rst-class:: classref-item-separator @@ -137,9 +203,7 @@ Property Descriptions - void **set_dst_color_blend_factor** **(** :ref:`BlendFactor` value **)** - :ref:`BlendFactor` **get_dst_color_blend_factor** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Controls how the blend factor for the color channels is determined based on the destination's fragments. .. rst-class:: classref-item-separator @@ -156,9 +220,7 @@ Property Descriptions - void **set_enable_blend** **(** :ref:`bool` value **)** - :ref:`bool` **get_enable_blend** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If ``true``, performs blending between the source and destination according to the factors defined in :ref:`src_color_blend_factor`, :ref:`dst_color_blend_factor`, :ref:`src_alpha_blend_factor` and :ref:`dst_alpha_blend_factor`. The blend modes :ref:`color_blend_op` and :ref:`alpha_blend_op` are also taken into account, with :ref:`write_r`, :ref:`write_g`, :ref:`write_b` and :ref:`write_a` controlling the output. .. rst-class:: classref-item-separator @@ -175,9 +237,7 @@ Property Descriptions - void **set_src_alpha_blend_factor** **(** :ref:`BlendFactor` value **)** - :ref:`BlendFactor` **get_src_alpha_blend_factor** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Controls how the blend factor for the alpha channel is determined based on the source's fragments. .. rst-class:: classref-item-separator @@ -194,9 +254,7 @@ Property Descriptions - void **set_src_color_blend_factor** **(** :ref:`BlendFactor` value **)** - :ref:`BlendFactor` **get_src_color_blend_factor** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Controls how the blend factor for the color channels is determined based on the source's fragments. .. rst-class:: classref-item-separator @@ -213,9 +271,7 @@ Property Descriptions - void **set_write_a** **(** :ref:`bool` value **)** - :ref:`bool` **get_write_a** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If ``true``, writes the new alpha channel to the final result. .. rst-class:: classref-item-separator @@ -232,9 +288,7 @@ Property Descriptions - void **set_write_b** **(** :ref:`bool` value **)** - :ref:`bool` **get_write_b** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If ``true``, writes the new blue color channel to the final result. .. rst-class:: classref-item-separator @@ -251,9 +305,7 @@ Property Descriptions - void **set_write_g** **(** :ref:`bool` value **)** - :ref:`bool` **get_write_g** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If ``true``, writes the new green color channel to the final result. .. rst-class:: classref-item-separator @@ -270,9 +322,7 @@ Property Descriptions - void **set_write_r** **(** :ref:`bool` value **)** - :ref:`bool` **get_write_r** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If ``true``, writes the new red color channel to the final result. .. rst-class:: classref-section-separator @@ -289,9 +339,7 @@ Method Descriptions void **set_as_mix** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Convenience method to perform standard mix blending with straight (non-premultiplied) alpha. This sets :ref:`enable_blend` to ``true``, :ref:`src_color_blend_factor` to :ref:`RenderingDevice.BLEND_FACTOR_SRC_ALPHA`, :ref:`dst_color_blend_factor` to :ref:`RenderingDevice.BLEND_FACTOR_ONE_MINUS_SRC_ALPHA`, :ref:`src_alpha_blend_factor` to :ref:`RenderingDevice.BLEND_FACTOR_SRC_ALPHA` and :ref:`dst_alpha_blend_factor` to :ref:`RenderingDevice.BLEND_FACTOR_ONE_MINUS_SRC_ALPHA`. .. |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_rdpipelinedepthstencilstate.rst b/classes/class_rdpipelinedepthstencilstate.rst index b73d92c14ac..223d67cd756 100644 --- a/classes/class_rdpipelinedepthstencilstate.rst +++ b/classes/class_rdpipelinedepthstencilstate.rst @@ -12,9 +12,14 @@ RDPipelineDepthStencilState **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Pipeline depth/stencil state (used by :ref:`RenderingDevice`). + +.. rst-class:: classref-introduction-group + +Description +----------- - There is currently no description for this class. Please help us by :ref:`contributing one `! +**RDPipelineDepthStencilState** controls the way depth and stencil comparisons are performed when sampling those values using :ref:`RenderingDevice`. .. rst-class:: classref-reftable-group @@ -297,9 +302,7 @@ Property Descriptions - void **set_enable_depth_test** **(** :ref:`bool` value **)** - :ref:`bool` **get_enable_depth_test** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If ``true``, enables depth testing which allows objects to be automatically occluded by other objects based on their depth. This also allows objects to be partially occluded by other objects. If ``false``, objects will appear in the order they were drawn (like in Godot's 2D renderer). .. rst-class:: classref-item-separator diff --git a/classes/class_rdpipelinemultisamplestate.rst b/classes/class_rdpipelinemultisamplestate.rst index 15d7ea30dec..11347140ccd 100644 --- a/classes/class_rdpipelinemultisamplestate.rst +++ b/classes/class_rdpipelinemultisamplestate.rst @@ -12,9 +12,14 @@ RDPipelineMultisampleState **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Pipeline multisample state (used by :ref:`RenderingDevice`). - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +**RDPipelineMultisampleState** is used to control how multisample or supersample antialiasing is being performed when rendering using :ref:`RenderingDevice`. .. rst-class:: classref-reftable-group @@ -58,9 +63,7 @@ Property Descriptions - void **set_enable_alpha_to_coverage** **(** :ref:`bool` value **)** - :ref:`bool` **get_enable_alpha_to_coverage** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If ``true``, alpha to coverage is enabled. This generates a temporary coverage value based on the alpha component of the fragment's first color output. This allows alpha transparency to make use of multisample antialiasing. .. rst-class:: classref-item-separator @@ -77,9 +80,7 @@ Property Descriptions - void **set_enable_alpha_to_one** **(** :ref:`bool` value **)** - :ref:`bool` **get_enable_alpha_to_one** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If ``true``, alpha is forced to either ``0.0`` or ``1.0``. This allows hardening the edges of antialiased alpha transparencies. Only relevant if :ref:`enable_alpha_to_coverage` is ``true``. .. rst-class:: classref-item-separator @@ -96,9 +97,7 @@ Property Descriptions - void **set_enable_sample_shading** **(** :ref:`bool` value **)** - :ref:`bool` **get_enable_sample_shading** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If ``true``, enables per-sample shading which replaces MSAA by SSAA. This provides higher quality antialiasing that works with transparent (alpha scissor) edges. This has a very high performance cost. See also :ref:`min_sample_shading`. See the `per-sample shading Vulkan documentation `__ for more details. .. rst-class:: classref-item-separator @@ -115,9 +114,7 @@ Property Descriptions - void **set_min_sample_shading** **(** :ref:`float` value **)** - :ref:`float` **get_min_sample_shading** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The multiplier of :ref:`sample_count` that determines how many samples are performed for each fragment. Must be between ``0.0`` and ``1.0`` (inclusive). Only effective if :ref:`enable_sample_shading` is ``true``. If :ref:`min_sample_shading` is ``1.0``, fragment invocation must only read from the coverage index sample. Tile image access must not be used if :ref:`enable_sample_shading` is *not* ``1.0``. .. rst-class:: classref-item-separator @@ -134,9 +131,7 @@ Property Descriptions - void **set_sample_count** **(** :ref:`TextureSamples` value **)** - :ref:`TextureSamples` **get_sample_count** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The number of MSAA samples (or SSAA samples if :ref:`enable_sample_shading` is ``true``) to perform. Higher values result in better antialiasing, at the cost of performance. .. rst-class:: classref-item-separator @@ -153,9 +148,7 @@ Property Descriptions - void **set_sample_masks** **(** :ref:`int[]` value **)** - :ref:`int[]` **get_sample_masks** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The sampleSee the `sample mask Vulkan documentation `__ for more details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_rdpipelinerasterizationstate.rst b/classes/class_rdpipelinerasterizationstate.rst index 4295a651afb..621bc13a2a2 100644 --- a/classes/class_rdpipelinerasterizationstate.rst +++ b/classes/class_rdpipelinerasterizationstate.rst @@ -12,9 +12,14 @@ RDPipelineRasterizationState **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Pipeline rasterization state (used by :ref:`RenderingDevice`). + +.. rst-class:: classref-introduction-group + +Description +----------- - There is currently no description for this class. Please help us by :ref:`contributing one `! +This object is used by :ref:`RenderingDevice`. .. rst-class:: classref-reftable-group @@ -68,9 +73,7 @@ Property Descriptions - void **set_cull_mode** **(** :ref:`PolygonCullMode` value **)** - :ref:`PolygonCullMode` **get_cull_mode** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The cull mode to use when drawing polygons, which determines whether front faces or backfaces are hidden. .. rst-class:: classref-item-separator @@ -163,9 +166,7 @@ Property Descriptions - void **set_discard_primitives** **(** :ref:`bool` value **)** - :ref:`bool` **get_discard_primitives** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If ``true``, primitives are discarded immediately before the rasterization stage. .. rst-class:: classref-item-separator @@ -201,9 +202,7 @@ Property Descriptions - void **set_front_face** **(** :ref:`PolygonFrontFace` value **)** - :ref:`PolygonFrontFace` **get_front_face** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The winding order to use to determine which face of a triangle is considered its front face. .. rst-class:: classref-item-separator @@ -220,9 +219,7 @@ Property Descriptions - void **set_line_width** **(** :ref:`float` value **)** - :ref:`float` **get_line_width** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +THe line width to use when drawing lines (in pixels). Thick lines may not be supported on all hardware. .. rst-class:: classref-item-separator @@ -239,9 +236,7 @@ Property Descriptions - void **set_patch_control_points** **(** :ref:`int` value **)** - :ref:`int` **get_patch_control_points** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The number of control points to use when drawing a patch with tessellation enabled. Higher values result in higher quality at the cost of performance. .. rst-class:: classref-item-separator @@ -258,9 +253,7 @@ Property Descriptions - void **set_wireframe** **(** :ref:`bool` value **)** - :ref:`bool` **get_wireframe** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If ``true``, performs wireframe rendering for triangles instead of flat or textured rendering. .. |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_rdpipelinespecializationconstant.rst b/classes/class_rdpipelinespecializationconstant.rst index 348458c5d27..615034b3e51 100644 --- a/classes/class_rdpipelinespecializationconstant.rst +++ b/classes/class_rdpipelinespecializationconstant.rst @@ -12,9 +12,16 @@ RDPipelineSpecializationConstant **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Pipeline specialization constant (used by :ref:`RenderingDevice`). - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +A *specialization constant* is a way to create additional variants of shaders without actually increasing the number of shader versions that are compiled. This allows improving performance by reducing the number of shader versions and reducing ``if`` branching, while still allowing shaders to be flexible for different use cases. + +This object is used by :ref:`RenderingDevice`. .. rst-class:: classref-reftable-group @@ -50,9 +57,7 @@ Property Descriptions - void **set_constant_id** **(** :ref:`int` value **)** - :ref:`int` **get_constant_id** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The identifier of the specialization constant. This is a value starting from ``0`` and that increments for every different specialization constant for a given shader. .. rst-class:: classref-item-separator @@ -69,9 +74,7 @@ Property Descriptions - void **set_value** **(** :ref:`Variant` value **)** - :ref:`Variant` **get_value** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The specialization constant's value. Only :ref:`bool`, :ref:`int` and :ref:`float` types are valid for specialization constants. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_rdsamplerstate.rst b/classes/class_rdsamplerstate.rst index df71f8253df..302c9aae380 100644 --- a/classes/class_rdsamplerstate.rst +++ b/classes/class_rdsamplerstate.rst @@ -12,9 +12,14 @@ RDSamplerState **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Sampler state (used by :ref:`RenderingDevice`). + +.. rst-class:: classref-introduction-group + +Description +----------- - There is currently no description for this class. Please help us by :ref:`contributing one `! +This object is used by :ref:`RenderingDevice`. .. rst-class:: classref-reftable-group @@ -76,9 +81,9 @@ Property Descriptions - void **set_anisotropy_max** **(** :ref:`float` value **)** - :ref:`float` **get_anisotropy_max** **(** **)** -.. container:: contribute +Maximum anisotropy that can be used when sampling. Only effective if :ref:`use_anisotropy` is ``true``. Higher values result in a sharper sampler at oblique angles, at the cost of performance (due to memory bandwidth). This value may be limited by the graphics hardware in use. Most graphics hardware only supports values up to ``16.0``. - There is currently no description for this property. Please help us by :ref:`contributing one `! +If :ref:`anisotropy_max` is ``1.0``, forcibly disables anisotropy even if :ref:`use_anisotropy` is ``true``. .. rst-class:: classref-item-separator @@ -95,9 +100,7 @@ Property Descriptions - void **set_border_color** **(** :ref:`SamplerBorderColor` value **)** - :ref:`SamplerBorderColor` **get_border_color** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The border color that will be returned when sampling outside the sampler's bounds and the :ref:`repeat_u`, :ref:`repeat_v` or :ref:`repeat_w` modes have repeating disabled. .. rst-class:: classref-item-separator @@ -114,9 +117,7 @@ Property Descriptions - void **set_compare_op** **(** :ref:`CompareOperator` value **)** - :ref:`CompareOperator` **get_compare_op** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The compare operation to use. Only effective if :ref:`enable_compare` is ``true``. .. rst-class:: classref-item-separator @@ -133,9 +134,7 @@ Property Descriptions - void **set_enable_compare** **(** :ref:`bool` value **)** - :ref:`bool` **get_enable_compare** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If ``true``, returned values will be based on the comparison operation defined in :ref:`compare_op`. This is a hardware-based approach and is therefore faster than performing this manually in a shader. For example, compare operations are used for shadow map rendering by comparing depth values from a shadow sampler. .. rst-class:: classref-item-separator @@ -152,9 +151,7 @@ Property Descriptions - void **set_lod_bias** **(** :ref:`float` value **)** - :ref:`float` **get_lod_bias** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The mipmap LOD bias to use. Positive values will make the sampler blurrier at a given distance, while negative values will make the sampler sharper at a given distance (at the risk of looking grainy). Recommended values are between ``-0.5`` and ``0.0``. Only effective if the sampler has mipmaps available. .. rst-class:: classref-item-separator @@ -171,9 +168,7 @@ Property Descriptions - void **set_mag_filter** **(** :ref:`SamplerFilter` value **)** - :ref:`SamplerFilter` **get_mag_filter** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The sampler's magnification filter. .. rst-class:: classref-item-separator @@ -190,9 +185,7 @@ Property Descriptions - void **set_max_lod** **(** :ref:`float` value **)** - :ref:`float` **get_max_lod** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The maximum mipmap LOD bias to display (lowest resolution). Only effective if the sampler has mipmaps available. .. rst-class:: classref-item-separator @@ -228,9 +221,7 @@ Property Descriptions - void **set_min_lod** **(** :ref:`float` value **)** - :ref:`float` **get_min_lod** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The minimum mipmap LOD bias to display (highest resolution). Only effective if the sampler has mipmaps available. .. rst-class:: classref-item-separator @@ -247,9 +238,7 @@ Property Descriptions - void **set_mip_filter** **(** :ref:`SamplerFilter` value **)** - :ref:`SamplerFilter` **get_mip_filter** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The filtering method to use for mipmaps. .. rst-class:: classref-item-separator @@ -266,9 +255,7 @@ Property Descriptions - void **set_repeat_u** **(** :ref:`SamplerRepeatMode` value **)** - :ref:`SamplerRepeatMode` **get_repeat_u** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The repeat mode to use along the U axis of UV coordinates. This affects the returned values if sampling outside the UV bounds. .. rst-class:: classref-item-separator @@ -285,9 +272,7 @@ Property Descriptions - void **set_repeat_v** **(** :ref:`SamplerRepeatMode` value **)** - :ref:`SamplerRepeatMode` **get_repeat_v** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The repeat mode to use along the V axis of UV coordinates. This affects the returned values if sampling outside the UV bounds. .. rst-class:: classref-item-separator @@ -304,9 +289,7 @@ Property Descriptions - void **set_repeat_w** **(** :ref:`SamplerRepeatMode` value **)** - :ref:`SamplerRepeatMode` **get_repeat_w** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The repeat mode to use along the W axis of UV coordinates. This affects the returned values if sampling outside the UV bounds. Only effective for 3D samplers. .. rst-class:: classref-item-separator @@ -342,9 +325,7 @@ Property Descriptions - void **set_use_anisotropy** **(** :ref:`bool` value **)** - :ref:`bool` **get_use_anisotropy** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If ``true``, perform anisotropic sampling. See :ref:`anisotropy_max`. .. |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_rdshaderfile.rst b/classes/class_rdshaderfile.rst index d3f01587400..819044324a2 100644 --- a/classes/class_rdshaderfile.rst +++ b/classes/class_rdshaderfile.rst @@ -12,9 +12,16 @@ RDShaderFile **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Compiled shader file in SPIR-V form (used by :ref:`RenderingDevice`). Not to be confused with Godot's own :ref:`Shader`. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +Compiled shader file in SPIR-V form. + +See also :ref:`RDShaderSource`. **RDShaderFile** is only meant to be used with the :ref:`RenderingDevice` API. It should not be confused with Godot's own :ref:`Shader` resource, which is what Godot's various nodes use for high-level shader programming. .. rst-class:: classref-reftable-group @@ -36,13 +43,13 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RDShaderSPIRV` | :ref:`get_spirv` **(** :ref:`StringName` version=&"" **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_version_list` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bytecode` **(** :ref:`RDShaderSPIRV` bytecode, :ref:`StringName` version=&"" **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RDShaderSPIRV` | :ref:`get_spirv` **(** :ref:`StringName` version=&"" **)** |const| | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName[]` | :ref:`get_version_list` **(** **)** |const| | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bytecode` **(** :ref:`RDShaderSPIRV` bytecode, :ref:`StringName` version=&"" **)** | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -64,9 +71,7 @@ Property Descriptions - void **set_base_error** **(** :ref:`String` value **)** - :ref:`String` **get_base_error** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The base compilation error message, which indicates errors not related to a specific shader stage if non-empty. If empty, shader compilation is not necessarily successful (check :ref:`RDShaderSPIRV`'s error message members). .. rst-class:: classref-section-separator @@ -83,9 +88,7 @@ Method Descriptions :ref:`RDShaderSPIRV` **get_spirv** **(** :ref:`StringName` version=&"" **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the SPIR-V intermediate representation for the specified shader ``version``. .. rst-class:: classref-item-separator @@ -95,11 +98,9 @@ Method Descriptions .. rst-class:: classref-method -:ref:`PackedStringArray` **get_version_list** **(** **)** |const| - -.. container:: contribute +:ref:`StringName[]` **get_version_list** **(** **)** |const| - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the list of compiled versions for this shader. .. rst-class:: classref-item-separator @@ -111,9 +112,7 @@ Method Descriptions void **set_bytecode** **(** :ref:`RDShaderSPIRV` bytecode, :ref:`StringName` version=&"" **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the SPIR-V ``bytecode`` that will be compiled for the specified ``version``. .. |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_rdshadersource.rst b/classes/class_rdshadersource.rst index a36cacd7ad2..5a165567323 100644 --- a/classes/class_rdshadersource.rst +++ b/classes/class_rdshadersource.rst @@ -12,9 +12,16 @@ RDShaderSource **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Shader source code (used by :ref:`RenderingDevice`). - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +Shader source code in text form. + +See also :ref:`RDShaderFile`. **RDShaderSource** is only meant to be used with the :ref:`RenderingDevice` API. It should not be confused with Godot's own :ref:`Shader` resource, which is what Godot's various nodes use for high-level shader programming. .. rst-class:: classref-reftable-group @@ -72,9 +79,7 @@ Property Descriptions - void **set_language** **(** :ref:`ShaderLanguage` value **)** - :ref:`ShaderLanguage` **get_language** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The language the shader is written in. .. rst-class:: classref-item-separator @@ -91,9 +96,7 @@ Property Descriptions - void **set_stage_source** **(** :ref:`ShaderStage` stage, :ref:`String` source **)** - :ref:`String` **get_stage_source** **(** :ref:`ShaderStage` stage **)** |const| -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Source code for the shader's compute stage. .. rst-class:: classref-item-separator @@ -110,9 +113,7 @@ Property Descriptions - void **set_stage_source** **(** :ref:`ShaderStage` stage, :ref:`String` source **)** - :ref:`String` **get_stage_source** **(** :ref:`ShaderStage` stage **)** |const| -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Source code for the shader's fragment stage. .. rst-class:: classref-item-separator @@ -129,9 +130,7 @@ Property Descriptions - void **set_stage_source** **(** :ref:`ShaderStage` stage, :ref:`String` source **)** - :ref:`String` **get_stage_source** **(** :ref:`ShaderStage` stage **)** |const| -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Source code for the shader's tessellation control stage. .. rst-class:: classref-item-separator @@ -148,9 +147,7 @@ Property Descriptions - void **set_stage_source** **(** :ref:`ShaderStage` stage, :ref:`String` source **)** - :ref:`String` **get_stage_source** **(** :ref:`ShaderStage` stage **)** |const| -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Source code for the shader's tessellation evaluation stage. .. rst-class:: classref-item-separator @@ -167,9 +164,7 @@ Property Descriptions - void **set_stage_source** **(** :ref:`ShaderStage` stage, :ref:`String` source **)** - :ref:`String` **get_stage_source** **(** :ref:`ShaderStage` stage **)** |const| -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Source code for the shader's vertex stage. .. rst-class:: classref-section-separator @@ -186,9 +181,7 @@ Method Descriptions :ref:`String` **get_stage_source** **(** :ref:`ShaderStage` stage **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns source code for the specified shader ``stage``. Equivalent to getting one of :ref:`source_compute`, :ref:`source_fragment`, :ref:`source_tesselation_control`, :ref:`source_tesselation_evaluation` or :ref:`source_vertex`. .. rst-class:: classref-item-separator @@ -200,9 +193,7 @@ Method Descriptions void **set_stage_source** **(** :ref:`ShaderStage` stage, :ref:`String` source **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets ``source`` code for the specified shader ``stage``. Equivalent to setting one of :ref:`source_compute`, :ref:`source_fragment`, :ref:`source_tesselation_control`, :ref:`source_tesselation_evaluation` or :ref:`source_vertex`. .. |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_rdshaderspirv.rst b/classes/class_rdshaderspirv.rst index 704dcaf4926..3ee7093db8c 100644 --- a/classes/class_rdshaderspirv.rst +++ b/classes/class_rdshaderspirv.rst @@ -12,9 +12,16 @@ RDShaderSPIRV **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +SPIR-V intermediate representation as part of a :ref:`RDShaderFile` (used by :ref:`RenderingDevice`). - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +**RDShaderSPIRV** represents a :ref:`RDShaderFile`'s `SPIR-V `__ code for various shader stages, as well as possible compilation error messages. SPIR-V a low-level intermediate shader representation. This intermediate representation is not used directly by GPUs for rendering, but it can be compiled into binary shaders that GPUs can understand. Unlike compiled shaders, SPIR-V is portable across GPU models and driver versions. + +This object is used by :ref:`RenderingDevice`. .. rst-class:: classref-reftable-group @@ -84,9 +91,7 @@ Property Descriptions - void **set_stage_bytecode** **(** :ref:`ShaderStage` stage, :ref:`PackedByteArray` bytecode **)** - :ref:`PackedByteArray` **get_stage_bytecode** **(** :ref:`ShaderStage` stage **)** |const| -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The SPIR-V bytecode for the compute shader stage. .. rst-class:: classref-item-separator @@ -103,9 +108,7 @@ Property Descriptions - void **set_stage_bytecode** **(** :ref:`ShaderStage` stage, :ref:`PackedByteArray` bytecode **)** - :ref:`PackedByteArray` **get_stage_bytecode** **(** :ref:`ShaderStage` stage **)** |const| -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The SPIR-V bytecode for the fragment shader stage. .. rst-class:: classref-item-separator @@ -122,9 +125,7 @@ Property Descriptions - void **set_stage_bytecode** **(** :ref:`ShaderStage` stage, :ref:`PackedByteArray` bytecode **)** - :ref:`PackedByteArray` **get_stage_bytecode** **(** :ref:`ShaderStage` stage **)** |const| -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The SPIR-V bytecode for the tessellation control shader stage. .. rst-class:: classref-item-separator @@ -141,9 +142,7 @@ Property Descriptions - void **set_stage_bytecode** **(** :ref:`ShaderStage` stage, :ref:`PackedByteArray` bytecode **)** - :ref:`PackedByteArray` **get_stage_bytecode** **(** :ref:`ShaderStage` stage **)** |const| -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The SPIR-V bytecode for the tessellation evaluation shader stage. .. rst-class:: classref-item-separator @@ -160,9 +159,7 @@ Property Descriptions - void **set_stage_bytecode** **(** :ref:`ShaderStage` stage, :ref:`PackedByteArray` bytecode **)** - :ref:`PackedByteArray` **get_stage_bytecode** **(** :ref:`ShaderStage` stage **)** |const| -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The SPIR-V bytecode for the vertex shader stage. .. rst-class:: classref-item-separator @@ -179,9 +176,7 @@ Property Descriptions - void **set_stage_compile_error** **(** :ref:`ShaderStage` stage, :ref:`String` compile_error **)** - :ref:`String` **get_stage_compile_error** **(** :ref:`ShaderStage` stage **)** |const| -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The compilation error message for the compute shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful. .. rst-class:: classref-item-separator @@ -198,9 +193,7 @@ Property Descriptions - void **set_stage_compile_error** **(** :ref:`ShaderStage` stage, :ref:`String` compile_error **)** - :ref:`String` **get_stage_compile_error** **(** :ref:`ShaderStage` stage **)** |const| -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The compilation error message for the fragment shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful. .. rst-class:: classref-item-separator @@ -217,9 +210,7 @@ Property Descriptions - void **set_stage_compile_error** **(** :ref:`ShaderStage` stage, :ref:`String` compile_error **)** - :ref:`String` **get_stage_compile_error** **(** :ref:`ShaderStage` stage **)** |const| -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The compilation error message for the tessellation control shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful. .. rst-class:: classref-item-separator @@ -236,9 +227,7 @@ Property Descriptions - void **set_stage_compile_error** **(** :ref:`ShaderStage` stage, :ref:`String` compile_error **)** - :ref:`String` **get_stage_compile_error** **(** :ref:`ShaderStage` stage **)** |const| -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The compilation error message for the tessellation evaluation shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful. .. rst-class:: classref-item-separator @@ -255,9 +244,7 @@ Property Descriptions - void **set_stage_compile_error** **(** :ref:`ShaderStage` stage, :ref:`String` compile_error **)** - :ref:`String` **get_stage_compile_error** **(** :ref:`ShaderStage` stage **)** |const| -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The compilation error message for the vertex shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful. .. rst-class:: classref-section-separator @@ -274,9 +261,7 @@ Method Descriptions :ref:`PackedByteArray` **get_stage_bytecode** **(** :ref:`ShaderStage` stage **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Equivalent to getting one of :ref:`bytecode_compute`, :ref:`bytecode_fragment`, :ref:`bytecode_tesselation_control`, :ref:`bytecode_tesselation_evaluation`, :ref:`bytecode_vertex`. .. rst-class:: classref-item-separator @@ -288,9 +273,7 @@ Method Descriptions :ref:`String` **get_stage_compile_error** **(** :ref:`ShaderStage` stage **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the compilation error message for the given shader ``stage``. Equivalent to getting one of :ref:`compile_error_compute`, :ref:`compile_error_fragment`, :ref:`compile_error_tesselation_control`, :ref:`compile_error_tesselation_evaluation`, :ref:`compile_error_vertex`. .. rst-class:: classref-item-separator @@ -302,9 +285,7 @@ Method Descriptions void **set_stage_bytecode** **(** :ref:`ShaderStage` stage, :ref:`PackedByteArray` bytecode **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the SPIR-V ``bytecode`` for the given shader ``stage``. Equivalent to setting one of :ref:`bytecode_compute`, :ref:`bytecode_fragment`, :ref:`bytecode_tesselation_control`, :ref:`bytecode_tesselation_evaluation`, :ref:`bytecode_vertex`. .. rst-class:: classref-item-separator @@ -316,9 +297,7 @@ void **set_stage_bytecode** **(** :ref:`ShaderStage` stage, :ref:`String` compile_error **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the compilation error message for the given shader ``stage`` to ``compile_error``. Equivalent to setting one of :ref:`compile_error_compute`, :ref:`compile_error_fragment`, :ref:`compile_error_tesselation_control`, :ref:`compile_error_tesselation_evaluation`, :ref:`compile_error_vertex`. .. |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_rdtextureformat.rst b/classes/class_rdtextureformat.rst index 93e45236d64..16c366947c7 100644 --- a/classes/class_rdtextureformat.rst +++ b/classes/class_rdtextureformat.rst @@ -12,9 +12,14 @@ RDTextureFormat **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Texture format (used by :ref:`RenderingDevice`). + +.. rst-class:: classref-introduction-group + +Description +----------- - There is currently no description for this class. Please help us by :ref:`contributing one `! +This object is used by :ref:`RenderingDevice`. .. rst-class:: classref-reftable-group @@ -78,9 +83,7 @@ Property Descriptions - void **set_array_layers** **(** :ref:`int` value **)** - :ref:`int` **get_array_layers** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The number of layers in the texture. Only relevant for 2D texture arrays. .. rst-class:: classref-item-separator @@ -97,9 +100,7 @@ Property Descriptions - void **set_depth** **(** :ref:`int` value **)** - :ref:`int` **get_depth** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The texture's depth (in pixels). This is always ``1`` for 2D textures. .. rst-class:: classref-item-separator @@ -116,9 +117,7 @@ Property Descriptions - void **set_format** **(** :ref:`DataFormat` value **)** - :ref:`DataFormat` **get_format** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The texture's pixel data format. .. rst-class:: classref-item-separator @@ -135,9 +134,7 @@ Property Descriptions - void **set_height** **(** :ref:`int` value **)** - :ref:`int` **get_height** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The texture's height (in pixels). .. rst-class:: classref-item-separator @@ -154,9 +151,7 @@ Property Descriptions - void **set_mipmaps** **(** :ref:`int` value **)** - :ref:`int` **get_mipmaps** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The number of mipmaps available in the texture. .. rst-class:: classref-item-separator @@ -173,9 +168,7 @@ Property Descriptions - void **set_samples** **(** :ref:`TextureSamples` value **)** - :ref:`TextureSamples` **get_samples** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The number of samples used when sampling the texture. .. rst-class:: classref-item-separator @@ -192,9 +185,7 @@ Property Descriptions - void **set_texture_type** **(** :ref:`TextureType` value **)** - :ref:`TextureType` **get_texture_type** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The texture type. .. rst-class:: classref-item-separator @@ -211,9 +202,7 @@ Property Descriptions - void **set_usage_bits** **(** :ref:`TextureUsageBits` value **)** - :ref:`TextureUsageBits` **get_usage_bits** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The texture's usage bits, which determine what can be done using the texture. .. rst-class:: classref-item-separator @@ -230,9 +219,7 @@ Property Descriptions - void **set_width** **(** :ref:`int` value **)** - :ref:`int` **get_width** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The texture's width (in pixels). .. rst-class:: classref-section-separator diff --git a/classes/class_rdtextureview.rst b/classes/class_rdtextureview.rst index bbd803f4ecb..d6bad84fd30 100644 --- a/classes/class_rdtextureview.rst +++ b/classes/class_rdtextureview.rst @@ -12,9 +12,14 @@ RDTextureView **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Texture view (used by :ref:`RenderingDevice`). - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +This object is used by :ref:`RenderingDevice`. .. rst-class:: classref-reftable-group @@ -56,9 +61,7 @@ Property Descriptions - void **set_format_override** **(** :ref:`DataFormat` value **)** - :ref:`DataFormat` **get_format_override** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Optional override for the data format to return sampled values in. The default value of :ref:`RenderingDevice.DATA_FORMAT_MAX` does not override the format. .. rst-class:: classref-item-separator @@ -75,9 +78,7 @@ Property Descriptions - void **set_swizzle_a** **(** :ref:`TextureSwizzle` value **)** - :ref:`TextureSwizzle` **get_swizzle_a** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The channel to sample when sampling the alpha channel. .. rst-class:: classref-item-separator @@ -94,9 +95,7 @@ Property Descriptions - void **set_swizzle_b** **(** :ref:`TextureSwizzle` value **)** - :ref:`TextureSwizzle` **get_swizzle_b** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The channel to sample when sampling the blue color channel. .. rst-class:: classref-item-separator @@ -113,9 +112,7 @@ Property Descriptions - void **set_swizzle_g** **(** :ref:`TextureSwizzle` value **)** - :ref:`TextureSwizzle` **get_swizzle_g** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The channel to sample when sampling the green color channel. .. rst-class:: classref-item-separator @@ -132,9 +129,7 @@ Property Descriptions - void **set_swizzle_r** **(** :ref:`TextureSwizzle` value **)** - :ref:`TextureSwizzle` **get_swizzle_r** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The channel to sample when sampling the red color channel. .. |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_rduniform.rst b/classes/class_rduniform.rst index 0ba311ddc34..ed331a9e46c 100644 --- a/classes/class_rduniform.rst +++ b/classes/class_rduniform.rst @@ -12,9 +12,14 @@ RDUniform **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Shader uniform (used by :ref:`RenderingDevice`). + +.. rst-class:: classref-introduction-group - There is currently no description for this class. Please help us by :ref:`contributing one `! +Description +----------- + +This object is used by :ref:`RenderingDevice`. .. rst-class:: classref-reftable-group @@ -66,9 +71,7 @@ Property Descriptions - void **set_binding** **(** :ref:`int` value **)** - :ref:`int` **get_binding** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The uniform's binding. .. rst-class:: classref-item-separator @@ -85,9 +88,7 @@ Property Descriptions - void **set_uniform_type** **(** :ref:`UniformType` value **)** - :ref:`UniformType` **get_uniform_type** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The uniform's data type. .. rst-class:: classref-section-separator diff --git a/classes/class_rdvertexattribute.rst b/classes/class_rdvertexattribute.rst index bf9f1212973..3d4941740dd 100644 --- a/classes/class_rdvertexattribute.rst +++ b/classes/class_rdvertexattribute.rst @@ -12,9 +12,14 @@ RDVertexAttribute **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Vertex attribute (used by :ref:`RenderingDevice`). + +.. rst-class:: classref-introduction-group + +Description +----------- - There is currently no description for this class. Please help us by :ref:`contributing one `! +This object is used by :ref:`RenderingDevice`. .. rst-class:: classref-reftable-group diff --git a/classes/class_rect2.rst b/classes/class_rect2.rst index 0cdd2825f15..56cac772d4f 100644 --- a/classes/class_rect2.rst +++ b/classes/class_rect2.rst @@ -10,7 +10,7 @@ Rect2 ===== -2D axis-aligned bounding box using floating point coordinates. +A 2D axis-aligned bounding box using floating-point coordinates. .. rst-class:: classref-introduction-group diff --git a/classes/class_rect2i.rst b/classes/class_rect2i.rst index dd95f4806e0..93f84148bc7 100644 --- a/classes/class_rect2i.rst +++ b/classes/class_rect2i.rst @@ -10,7 +10,7 @@ Rect2i ====== -2D axis-aligned bounding box using integer coordinates. +A 2D axis-aligned bounding box using integer coordinates. .. rst-class:: classref-introduction-group diff --git a/classes/class_rectangleshape2d.rst b/classes/class_rectangleshape2d.rst index ef5a7c90ccc..e6b3d16daf3 100644 --- a/classes/class_rectangleshape2d.rst +++ b/classes/class_rectangleshape2d.rst @@ -12,16 +12,16 @@ RectangleShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Rectangle shape resource for 2D physics. +A 2D rectangle shape used for physics collision. .. rst-class:: classref-introduction-group Description ----------- -2D rectangle shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. This shape is useful for modeling box-like 2D objects. +A 2D rectangle shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape2D`. -\ **Performance:** Being a primitive collision shape, **RectangleShape2D** is fast to check collisions against (though not as fast as :ref:`CircleShape2D`). +\ **Performance:** **RectangleShape2D** is fast to check collisions against. It is faster than :ref:`CapsuleShape2D`, but slower than :ref:`CircleShape2D`. .. rst-class:: classref-introduction-group diff --git a/classes/class_refcounted.rst b/classes/class_refcounted.rst index 1f9a9232c9f..5e32e23b32d 100644 --- a/classes/class_refcounted.rst +++ b/classes/class_refcounted.rst @@ -12,7 +12,7 @@ RefCounted **Inherits:** :ref:`Object` -**Inherited By:** :ref:`AESContext`, :ref:`AnimationTrackEditPlugin`, :ref:`AStar2D`, :ref:`AStar3D`, :ref:`AStarGrid2D`, :ref:`AudioEffectInstance`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`CharFXTransform`, :ref:`ConfigFile`, :ref:`Crypto`, :ref:`DirAccess`, :ref:`DTLSServer`, :ref:`EditorDebuggerPlugin`, :ref:`EditorDebuggerSession`, :ref:`EditorExportPlatform`, :ref:`EditorExportPlugin`, :ref:`EditorFeatureProfile`, :ref:`EditorFileSystemImportFormatSupportQuery`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorSceneFormatImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScenePostImportPlugin`, :ref:`EditorScript`, :ref:`EditorTranslationParserPlugin`, :ref:`EncodedObjectAsID`, :ref:`ENetConnection`, :ref:`EngineProfiler`, :ref:`Expression`, :ref:`FileAccess`, :ref:`HashingContext`, :ref:`HMACContext`, :ref:`HTTPClient`, :ref:`ImageFormatLoader`, :ref:`JavaClass`, :ref:`JavaScriptObject`, :ref:`KinematicCollision2D`, :ref:`KinematicCollision3D`, :ref:`Lightmapper`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`NavigationPathQueryParameters2D`, :ref:`NavigationPathQueryParameters3D`, :ref:`NavigationPathQueryResult2D`, :ref:`NavigationPathQueryResult3D`, :ref:`Node3DGizmo`, :ref:`OggPacketSequencePlayback`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`PCKPacker`, :ref:`PhysicsPointQueryParameters2D`, :ref:`PhysicsPointQueryParameters3D`, :ref:`PhysicsRayQueryParameters2D`, :ref:`PhysicsRayQueryParameters3D`, :ref:`PhysicsShapeQueryParameters2D`, :ref:`PhysicsShapeQueryParameters3D`, :ref:`PhysicsTestMotionParameters2D`, :ref:`PhysicsTestMotionParameters3D`, :ref:`PhysicsTestMotionResult2D`, :ref:`PhysicsTestMotionResult3D`, :ref:`RandomNumberGenerator`, :ref:`RDAttachmentFormat`, :ref:`RDFramebufferPass`, :ref:`RDPipelineColorBlendState`, :ref:`RDPipelineColorBlendStateAttachment`, :ref:`RDPipelineDepthStencilState`, :ref:`RDPipelineMultisampleState`, :ref:`RDPipelineRasterizationState`, :ref:`RDPipelineSpecializationConstant`, :ref:`RDSamplerState`, :ref:`RDShaderSource`, :ref:`RDTextureFormat`, :ref:`RDTextureView`, :ref:`RDUniform`, :ref:`RDVertexAttribute`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`Semaphore`, :ref:`SkinReference`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCPServer`, :ref:`TextLine`, :ref:`TextParagraph`, :ref:`TextServer`, :ref:`Thread`, :ref:`TLSOptions`, :ref:`TriangleMesh`, :ref:`Tween`, :ref:`Tweener`, :ref:`UDPServer`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser`, :ref:`XRInterface`, :ref:`XRPose`, :ref:`XRPositionalTracker`, :ref:`ZIPPacker`, :ref:`ZIPReader` +**Inherited By:** :ref:`AESContext`, :ref:`AStar2D`, :ref:`AStar3D`, :ref:`AStarGrid2D`, :ref:`AudioEffectInstance`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`CharFXTransform`, :ref:`ConfigFile`, :ref:`Crypto`, :ref:`DirAccess`, :ref:`DTLSServer`, :ref:`EditorDebuggerPlugin`, :ref:`EditorDebuggerSession`, :ref:`EditorExportPlatform`, :ref:`EditorExportPlugin`, :ref:`EditorFeatureProfile`, :ref:`EditorFileSystemImportFormatSupportQuery`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorResourceTooltipPlugin`, :ref:`EditorSceneFormatImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScenePostImportPlugin`, :ref:`EditorScript`, :ref:`EditorTranslationParserPlugin`, :ref:`EncodedObjectAsID`, :ref:`ENetConnection`, :ref:`EngineProfiler`, :ref:`Expression`, :ref:`FileAccess`, :ref:`HashingContext`, :ref:`HMACContext`, :ref:`HTTPClient`, :ref:`ImageFormatLoader`, :ref:`JavaClass`, :ref:`JavaScriptObject`, :ref:`KinematicCollision2D`, :ref:`KinematicCollision3D`, :ref:`Lightmapper`, :ref:`MeshConvexDecompositionSettings`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`NavigationPathQueryParameters2D`, :ref:`NavigationPathQueryParameters3D`, :ref:`NavigationPathQueryResult2D`, :ref:`NavigationPathQueryResult3D`, :ref:`Node3DGizmo`, :ref:`OggPacketSequencePlayback`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`PCKPacker`, :ref:`PhysicsPointQueryParameters2D`, :ref:`PhysicsPointQueryParameters3D`, :ref:`PhysicsRayQueryParameters2D`, :ref:`PhysicsRayQueryParameters3D`, :ref:`PhysicsShapeQueryParameters2D`, :ref:`PhysicsShapeQueryParameters3D`, :ref:`PhysicsTestMotionParameters2D`, :ref:`PhysicsTestMotionParameters3D`, :ref:`PhysicsTestMotionResult2D`, :ref:`PhysicsTestMotionResult3D`, :ref:`RandomNumberGenerator`, :ref:`RDAttachmentFormat`, :ref:`RDFramebufferPass`, :ref:`RDPipelineColorBlendState`, :ref:`RDPipelineColorBlendStateAttachment`, :ref:`RDPipelineDepthStencilState`, :ref:`RDPipelineMultisampleState`, :ref:`RDPipelineRasterizationState`, :ref:`RDPipelineSpecializationConstant`, :ref:`RDSamplerState`, :ref:`RDShaderSource`, :ref:`RDTextureFormat`, :ref:`RDTextureView`, :ref:`RDUniform`, :ref:`RDVertexAttribute`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`Semaphore`, :ref:`SkinReference`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCPServer`, :ref:`TextLine`, :ref:`TextParagraph`, :ref:`TextServer`, :ref:`Thread`, :ref:`TLSOptions`, :ref:`TriangleMesh`, :ref:`Tween`, :ref:`Tweener`, :ref:`UDPServer`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser`, :ref:`XRInterface`, :ref:`XRPose`, :ref:`XRPositionalTracker`, :ref:`ZIPPacker`, :ref:`ZIPReader` Base class for reference-counted objects. diff --git a/classes/class_referencerect.rst b/classes/class_referencerect.rst index 07ba31e158d..46ec484f645 100644 --- a/classes/class_referencerect.rst +++ b/classes/class_referencerect.rst @@ -12,14 +12,14 @@ ReferenceRect **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Reference frame for GUI. +A rectangle hint for designing UIs. .. rst-class:: classref-introduction-group Description ----------- -A rectangle box that displays only a :ref:`border_color` border color around its rectangle. **ReferenceRect** has no fill :ref:`Color`. If you need to display a rectangle filled with a solid color, consider using :ref:`ColorRect` instead. +A rectangle box that displays only a colored border around its rectangle. It is used to visualize the extents of a :ref:`Control`. .. rst-class:: classref-reftable-group @@ -57,7 +57,7 @@ Property Descriptions - void **set_border_color** **(** :ref:`Color` value **)** - :ref:`Color` **get_border_color** **(** **)** -Sets the border :ref:`Color` of the **ReferenceRect**. +Sets the border color of the **ReferenceRect**. .. rst-class:: classref-item-separator diff --git a/classes/class_reflectionprobe.rst b/classes/class_reflectionprobe.rst index 5737ea69352..ec556d5d4ab 100644 --- a/classes/class_reflectionprobe.rst +++ b/classes/class_reflectionprobe.rst @@ -119,7 +119,7 @@ enum **AmbientMode**: :ref:`AmbientMode` **AMBIENT_DISABLED** = ``0`` -Do not apply any ambient lighting inside the **ReflectionProbe**'s :ref:`size`. +Do not apply any ambient lighting inside the **ReflectionProbe**'s box defined by its :ref:`size`. .. _class_ReflectionProbe_constant_AMBIENT_ENVIRONMENT: @@ -127,7 +127,7 @@ Do not apply any ambient lighting inside the **ReflectionProbe**'s :ref:`size` **AMBIENT_ENVIRONMENT** = ``1`` -Apply automatically-sourced environment lighting inside the **ReflectionProbe**'s :ref:`size`. +Apply automatically-sourced environment lighting inside the **ReflectionProbe**'s box defined by its :ref:`size`. .. _class_ReflectionProbe_constant_AMBIENT_COLOR: @@ -135,7 +135,7 @@ Apply automatically-sourced environment lighting inside the **ReflectionProbe**' :ref:`AmbientMode` **AMBIENT_COLOR** = ``2`` -Apply custom ambient lighting inside the **ReflectionProbe**'s :ref:`size`. See :ref:`ambient_color` and :ref:`ambient_color_energy`. +Apply custom ambient lighting inside the **ReflectionProbe**'s box defined by its :ref:`size`. See :ref:`ambient_color` and :ref:`ambient_color_energy`. .. rst-class:: classref-section-separator @@ -157,7 +157,7 @@ Property Descriptions - void **set_ambient_color** **(** :ref:`Color` value **)** - :ref:`Color` **get_ambient_color** **(** **)** -The custom ambient color to use within the **ReflectionProbe**'s :ref:`size`. Only effective if :ref:`ambient_mode` is :ref:`AMBIENT_COLOR`. +The custom ambient color to use within the **ReflectionProbe**'s box defined by its :ref:`size`. Only effective if :ref:`ambient_mode` is :ref:`AMBIENT_COLOR`. .. rst-class:: classref-item-separator @@ -174,7 +174,7 @@ The custom ambient color to use within the **ReflectionProbe**'s :ref:`size` value **)** - :ref:`float` **get_ambient_color_energy** **(** **)** -The custom ambient color energy to use within the **ReflectionProbe**'s :ref:`size`. Only effective if :ref:`ambient_mode` is :ref:`AMBIENT_COLOR`. +The custom ambient color energy to use within the **ReflectionProbe**'s box defined by its :ref:`size`. Only effective if :ref:`ambient_mode` is :ref:`AMBIENT_COLOR`. .. rst-class:: classref-item-separator @@ -191,7 +191,7 @@ The custom ambient color energy to use within the **ReflectionProbe**'s :ref:`si - void **set_ambient_mode** **(** :ref:`AmbientMode` value **)** - :ref:`AmbientMode` **get_ambient_mode** **(** **)** -The ambient color to use within the **ReflectionProbe**'s :ref:`size`. The ambient color will smoothly blend with other **ReflectionProbe**\ s and the rest of the scene (outside the **ReflectionProbe**'s :ref:`size`). +The ambient color to use within the **ReflectionProbe**'s box defined by its :ref:`size`. The ambient color will smoothly blend with other **ReflectionProbe**\ s and the rest of the scene (outside the **ReflectionProbe**'s box defined by its :ref:`size`). .. rst-class:: classref-item-separator @@ -297,7 +297,7 @@ If ``true``, reflections will ignore sky contribution. The maximum distance away from the **ReflectionProbe** an object can be before it is culled. Decrease this to improve performance, especially when using the :ref:`UPDATE_ALWAYS` :ref:`update_mode`. -\ **Note:** The maximum reflection distance is always at least equal to the probe's extents. This means that decreasing :ref:`max_distance` will not always cull objects from reflections, especially if the reflection probe's :ref:`size` is already large. +\ **Note:** The maximum reflection distance is always at least equal to the probe's extents. This means that decreasing :ref:`max_distance` will not always cull objects from reflections, especially if the reflection probe's box defined by its :ref:`size` is already large. .. rst-class:: classref-item-separator diff --git a/classes/class_renderingdevice.rst b/classes/class_renderingdevice.rst index f326a0eb8d0..fa003118014 100644 --- a/classes/class_renderingdevice.rst +++ b/classes/class_renderingdevice.rst @@ -19,16 +19,23 @@ Abstraction for working with modern low-level graphics APIs. Description ----------- -**RenderingDevice** is an abstraction for working with modern low-level graphics APIs such as Vulkan. +**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. - -Internally, **RenderingDevice** is used in Godot to provide support for several modern low-level graphics APIs while reducing the amount of code duplication required. +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. +\ **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. + \ **Note:** **RenderingDevice** is not available when running in headless mode or when using the Compatibility rendering method. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `Using compute shaders `__ + .. rst-class:: classref-reftable-group Methods @@ -64,7 +71,7 @@ Methods +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`compute_pipeline_create` **(** :ref:`RID` shader, :ref:`RDPipelineSpecializationConstant[]` specialization_constants=[] **)** | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`compute_pipeline_is_valid` **(** :ref:`RID` compute_pieline **)** | + | :ref:`bool` | :ref:`compute_pipeline_is_valid` **(** :ref:`RID` compute_pipeline **)** | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RenderingDevice` | :ref:`create_local_device` **(** **)** | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -74,7 +81,7 @@ Methods +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`draw_command_insert_label` **(** :ref:`String` name, :ref:`Color` color **)** | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`draw_list_begin` **(** :ref:`RID` framebuffer, :ref:`InitialAction` initial_color_action, :ref:`FinalAction` final_color_action, :ref:`InitialAction` initial_depth_action, :ref:`FinalAction` final_depth_action, :ref:`PackedColorArray` clear_color_values=PackedColorArray(), :ref:`float` clear_depth=1.0, :ref:`int` clear_stencil=0, :ref:`Rect2` region=Rect2(0, 0, 0, 0), :ref:`Array` storage_textures=[] **)** | + | :ref:`int` | :ref:`draw_list_begin` **(** :ref:`RID` framebuffer, :ref:`InitialAction` initial_color_action, :ref:`FinalAction` final_color_action, :ref:`InitialAction` initial_depth_action, :ref:`FinalAction` final_depth_action, :ref:`PackedColorArray` clear_color_values=PackedColorArray(), :ref:`float` clear_depth=1.0, :ref:`int` clear_stencil=0, :ref:`Rect2` region=Rect2(0, 0, 0, 0), :ref:`RID[]` storage_textures=[] **)** | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`draw_list_begin_for_screen` **(** :ref:`int` screen=0, :ref:`Color` clear_color=Color(0, 0, 0, 1) **)** | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -160,6 +167,8 @@ Methods +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`sampler_create` **(** :ref:`RDSamplerState` state **)** | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`sampler_is_format_supported_for_filter` **(** :ref:`DataFormat` format, :ref:`SamplerFilter` sampler_filter **)** |const| | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`screen_get_framebuffer_format` **(** **)** |const| | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`screen_get_height` **(** :ref:`int` screen=0 **)** |const| | @@ -300,7 +309,7 @@ enum **DriverResource**: :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_DEVICE** = ``0`` - +Vulkan device driver resource. This is a "global" resource and ignores the RID passed in .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_PHYSICAL_DEVICE: @@ -308,7 +317,7 @@ enum **DriverResource**: :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_PHYSICAL_DEVICE** = ``1`` - +Physical device (graphics card) driver resource. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_INSTANCE: @@ -316,7 +325,7 @@ enum **DriverResource**: :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_INSTANCE** = ``2`` - +Vulkan instance driver resource. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_QUEUE: @@ -324,7 +333,7 @@ enum **DriverResource**: :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_QUEUE** = ``3`` - +Vulkan queue driver resource. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_QUEUE_FAMILY_INDEX: @@ -332,7 +341,7 @@ enum **DriverResource**: :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_QUEUE_FAMILY_INDEX** = ``4`` - +Vulkan queue family index driver resource. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_IMAGE: @@ -340,7 +349,7 @@ enum **DriverResource**: :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_IMAGE** = ``5`` - +Vulkan image driver resource. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_IMAGE_VIEW: @@ -348,7 +357,7 @@ enum **DriverResource**: :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_IMAGE_VIEW** = ``6`` - +Vulkan image view driver resource. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_IMAGE_NATIVE_TEXTURE_FORMAT: @@ -356,7 +365,7 @@ enum **DriverResource**: :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_IMAGE_NATIVE_TEXTURE_FORMAT** = ``7`` - +Vulkan image native texture format driver resource. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_SAMPLER: @@ -364,7 +373,7 @@ enum **DriverResource**: :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_SAMPLER** = ``8`` - +Vulkan sampler driver resource. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_DESCRIPTOR_SET: @@ -372,7 +381,7 @@ enum **DriverResource**: :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_DESCRIPTOR_SET** = ``9`` - +Vulkan `descriptor set `__ driver resource. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_BUFFER: @@ -380,7 +389,7 @@ enum **DriverResource**: :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_BUFFER** = ``10`` - +Vulkan buffer driver resource. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_COMPUTE_PIPELINE: @@ -388,7 +397,7 @@ enum **DriverResource**: :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_COMPUTE_PIPELINE** = ``11`` - +Vulkan compute pipeline driver resource. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_RENDER_PIPELINE: @@ -396,7 +405,7 @@ enum **DriverResource**: :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_RENDER_PIPELINE** = ``12`` - +Vulkan render pipeline driver resource. .. rst-class:: classref-item-separator @@ -414,7 +423,9 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R4G4_UNORM_PACK8** = ``0`` +4-bit-per-channel red/green channel data format, packed into 8 bits. Values are in the ``[0.0, 1.0]`` range. +\ **Note:** More information on all data formats can be found on the `Identification of formats `__ section of the Vulkan specification, as well as the `VkFormat `__ enum. .. _class_RenderingDevice_constant_DATA_FORMAT_R4G4B4A4_UNORM_PACK16: @@ -422,7 +433,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R4G4B4A4_UNORM_PACK16** = ``1`` - +4-bit-per-channel red/green/blue/alpha channel data format, packed into 16 bits. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_B4G4R4A4_UNORM_PACK16: @@ -430,7 +441,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_B4G4R4A4_UNORM_PACK16** = ``2`` - +4-bit-per-channel blue/green/red/alpha channel data format, packed into 16 bits. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R5G6B5_UNORM_PACK16: @@ -438,7 +449,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R5G6B5_UNORM_PACK16** = ``3`` - +Red/green/blue channel data format with 5 bits of red, 6 bits of green and 5 bits of blue, packed into 16 bits. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_B5G6R5_UNORM_PACK16: @@ -446,7 +457,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_B5G6R5_UNORM_PACK16** = ``4`` - +Blue/green/red channel data format with 5 bits of blue, 6 bits of green and 5 bits of red, packed into 16 bits. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R5G5B5A1_UNORM_PACK16: @@ -454,7 +465,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R5G5B5A1_UNORM_PACK16** = ``5`` - +Red/green/blue/alpha channel data format with 5 bits of red, 6 bits of green, 5 bits of blue and 1 bit of alpha, packed into 16 bits. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_B5G5R5A1_UNORM_PACK16: @@ -462,7 +473,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_B5G5R5A1_UNORM_PACK16** = ``6`` - +Blue/green/red/alpha channel data format with 5 bits of blue, 6 bits of green, 5 bits of red and 1 bit of alpha, packed into 16 bits. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_A1R5G5B5_UNORM_PACK16: @@ -470,7 +481,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_A1R5G5B5_UNORM_PACK16** = ``7`` - +Alpha/red/green/blue channel data format with 1 bit of alpha, 5 bits of red, 6 bits of green and 5 bits of blue, packed into 16 bits. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8_UNORM: @@ -478,7 +489,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8_UNORM** = ``8`` - +8-bit-per-channel unsigned floating-point red channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8_SNORM: @@ -486,7 +497,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8_SNORM** = ``9`` - +8-bit-per-channel signed floating-point red channel data format with normalized value. Values are in the ``[-1.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8_USCALED: @@ -494,7 +505,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8_USCALED** = ``10`` - +8-bit-per-channel unsigned floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the ``[0.0, 255.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8_SSCALED: @@ -502,7 +513,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8_SSCALED** = ``11`` - +8-bit-per-channel signed floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the ``[-127.0, 127.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8_UINT: @@ -510,7 +521,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8_UINT** = ``12`` - +8-bit-per-channel unsigned integer red channel data format. Values are in the ``[0, 255]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8_SINT: @@ -518,7 +529,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8_SINT** = ``13`` - +8-bit-per-channel signed integer red channel data format. Values are in the ``[-127, 127]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8_SRGB: @@ -526,7 +537,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8_SRGB** = ``14`` - +8-bit-per-channel unsigned floating-point red channel data format with normalized value and non-linear sRGB encoding. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8G8_UNORM: @@ -534,7 +545,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8G8_UNORM** = ``15`` - +8-bit-per-channel unsigned floating-point red/green channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8G8_SNORM: @@ -542,7 +553,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8G8_SNORM** = ``16`` - +8-bit-per-channel signed floating-point red/green channel data format with normalized value. Values are in the ``[-1.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8G8_USCALED: @@ -550,7 +561,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8G8_USCALED** = ``17`` - +8-bit-per-channel unsigned floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the ``[0.0, 255.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8G8_SSCALED: @@ -558,7 +569,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8G8_SSCALED** = ``18`` - +8-bit-per-channel signed floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the ``[-127.0, 127.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8G8_UINT: @@ -566,7 +577,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8G8_UINT** = ``19`` - +8-bit-per-channel unsigned integer red/green channel data format. Values are in the ``[0, 255]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8G8_SINT: @@ -574,7 +585,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8G8_SINT** = ``20`` - +8-bit-per-channel signed integer red/green channel data format. Values are in the ``[-127, 127]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8G8_SRGB: @@ -582,7 +593,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8G8_SRGB** = ``21`` - +8-bit-per-channel unsigned floating-point red/green channel data format with normalized value and non-linear sRGB encoding. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8_UNORM: @@ -590,7 +601,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8G8B8_UNORM** = ``22`` - +8-bit-per-channel unsigned floating-point red/green/blue channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8_SNORM: @@ -598,7 +609,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8G8B8_SNORM** = ``23`` - +8-bit-per-channel signed floating-point red/green/blue channel data format with normalized value. Values are in the ``[-1.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8_USCALED: @@ -606,7 +617,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8G8B8_USCALED** = ``24`` - +8-bit-per-channel unsigned floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the ``[0.0, 255.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8_SSCALED: @@ -614,7 +625,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8G8B8_SSCALED** = ``25`` - +8-bit-per-channel signed floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the ``[-127.0, 127.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8_UINT: @@ -622,7 +633,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8G8B8_UINT** = ``26`` - +8-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the ``[0, 255]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8_SINT: @@ -630,7 +641,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8G8B8_SINT** = ``27`` - +8-bit-per-channel signed integer red/green/blue channel data format. Values are in the ``[-127, 127]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8_SRGB: @@ -638,7 +649,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8G8B8_SRGB** = ``28`` - +8-bit-per-channel unsigned floating-point red/green/blue/blue channel data format with normalized value and non-linear sRGB encoding. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8_UNORM: @@ -646,7 +657,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_B8G8R8_UNORM** = ``29`` - +8-bit-per-channel unsigned floating-point blue/green/red channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8_SNORM: @@ -654,7 +665,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_B8G8R8_SNORM** = ``30`` - +8-bit-per-channel signed floating-point blue/green/red channel data format with normalized value. Values are in the ``[-1.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8_USCALED: @@ -662,7 +673,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_B8G8R8_USCALED** = ``31`` - +8-bit-per-channel unsigned floating-point blue/green/red channel data format with scaled value (value is converted from integer to float). Values are in the ``[0.0, 255.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8_SSCALED: @@ -670,7 +681,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_B8G8R8_SSCALED** = ``32`` - +8-bit-per-channel signed floating-point blue/green/red channel data format with scaled value (value is converted from integer to float). Values are in the ``[-127.0, 127.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8_UINT: @@ -678,7 +689,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_B8G8R8_UINT** = ``33`` - +8-bit-per-channel unsigned integer blue/green/red channel data format. Values are in the ``[0, 255]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8_SINT: @@ -686,7 +697,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_B8G8R8_SINT** = ``34`` - +8-bit-per-channel signed integer blue/green/red channel data format. Values are in the ``[-127, 127]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8_SRGB: @@ -694,7 +705,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_B8G8R8_SRGB** = ``35`` - +8-bit-per-channel unsigned floating-point blue/green/red data format with normalized value and non-linear sRGB encoding. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8A8_UNORM: @@ -702,7 +713,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8G8B8A8_UNORM** = ``36`` - +8-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8A8_SNORM: @@ -710,7 +721,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8G8B8A8_SNORM** = ``37`` - +8-bit-per-channel signed floating-point red/green/blue/alpha channel data format with normalized value. Values are in the ``[-1.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8A8_USCALED: @@ -718,7 +729,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8G8B8A8_USCALED** = ``38`` - +8-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the ``[0.0, 255.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8A8_SSCALED: @@ -726,7 +737,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8G8B8A8_SSCALED** = ``39`` - +8-bit-per-channel signed floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the ``[-127.0, 127.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8A8_UINT: @@ -734,7 +745,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8G8B8A8_UINT** = ``40`` - +8-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the ``[0, 255]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8A8_SINT: @@ -742,7 +753,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8G8B8A8_SINT** = ``41`` - +8-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the ``[-127, 127]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8A8_SRGB: @@ -750,7 +761,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R8G8B8A8_SRGB** = ``42`` - +8-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8A8_UNORM: @@ -758,7 +769,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_B8G8R8A8_UNORM** = ``43`` - +8-bit-per-channel unsigned floating-point blue/green/red/alpha channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8A8_SNORM: @@ -766,7 +777,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_B8G8R8A8_SNORM** = ``44`` - +8-bit-per-channel signed floating-point blue/green/red/alpha channel data format with normalized value. Values are in the ``[-1.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8A8_USCALED: @@ -774,7 +785,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_B8G8R8A8_USCALED** = ``45`` - +8-bit-per-channel unsigned floating-point blue/green/red/alpha channel data format with scaled value (value is converted from integer to float). Values are in the ``[0.0, 255.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8A8_SSCALED: @@ -782,7 +793,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_B8G8R8A8_SSCALED** = ``46`` - +8-bit-per-channel signed floating-point blue/green/red/alpha channel data format with scaled value (value is converted from integer to float). Values are in the ``[-127.0, 127.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8A8_UINT: @@ -790,7 +801,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_B8G8R8A8_UINT** = ``47`` - +8-bit-per-channel unsigned integer blue/green/red/alpha channel data format. Values are in the ``[0, 255]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8A8_SINT: @@ -798,7 +809,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_B8G8R8A8_SINT** = ``48`` - +8-bit-per-channel signed integer blue/green/red/alpha channel data format. Values are in the ``[-127, 127]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8A8_SRGB: @@ -806,7 +817,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_B8G8R8A8_SRGB** = ``49`` - +8-bit-per-channel unsigned floating-point blue/green/red/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_A8B8G8R8_UNORM_PACK32: @@ -814,7 +825,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_A8B8G8R8_UNORM_PACK32** = ``50`` - +8-bit-per-channel unsigned floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_A8B8G8R8_SNORM_PACK32: @@ -822,7 +833,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_A8B8G8R8_SNORM_PACK32** = ``51`` - +8-bit-per-channel signed floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Values are in the ``[-1.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_A8B8G8R8_USCALED_PACK32: @@ -830,7 +841,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_A8B8G8R8_USCALED_PACK32** = ``52`` - +8-bit-per-channel unsigned floating-point alpha/red/green/blue channel data format with scaled value (value is converted from integer to float), packed in 32 bits. Values are in the ``[0.0, 255.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_A8B8G8R8_SSCALED_PACK32: @@ -838,7 +849,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_A8B8G8R8_SSCALED_PACK32** = ``53`` - +8-bit-per-channel signed floating-point alpha/red/green/blue channel data format with scaled value (value is converted from integer to float), packed in 32 bits. Values are in the ``[-127.0, 127.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_A8B8G8R8_UINT_PACK32: @@ -846,7 +857,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_A8B8G8R8_UINT_PACK32** = ``54`` - +8-bit-per-channel unsigned integer alpha/red/green/blue channel data format, packed in 32 bits. Values are in the ``[0, 255]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_A8B8G8R8_SINT_PACK32: @@ -854,7 +865,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_A8B8G8R8_SINT_PACK32** = ``55`` - +8-bit-per-channel signed integer alpha/red/green/blue channel data format, packed in 32 bits. Values are in the ``[-127, 127]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_A8B8G8R8_SRGB_PACK32: @@ -862,7 +873,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_A8B8G8R8_SRGB_PACK32** = ``56`` - +8-bit-per-channel unsigned floating-point alpha/red/green/blue channel data format with normalized value and non-linear sRGB encoding, packed in 32 bits. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_A2R10G10B10_UNORM_PACK32: @@ -870,7 +881,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_A2R10G10B10_UNORM_PACK32** = ``57`` - +Unsigned floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_A2R10G10B10_SNORM_PACK32: @@ -878,7 +889,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_A2R10G10B10_SNORM_PACK32** = ``58`` - +Signed floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the ``[-1.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_A2R10G10B10_USCALED_PACK32: @@ -886,7 +897,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_A2R10G10B10_USCALED_PACK32** = ``59`` - +Unsigned floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the ``[0.0, 1023.0]`` range for red/green/blue and ``[0.0, 3.0]`` for alpha. .. _class_RenderingDevice_constant_DATA_FORMAT_A2R10G10B10_SSCALED_PACK32: @@ -894,7 +905,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_A2R10G10B10_SSCALED_PACK32** = ``60`` - +Signed floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the ``[-511.0, 511.0]`` range for red/green/blue and ``[-1.0, 1.0]`` for alpha. .. _class_RenderingDevice_constant_DATA_FORMAT_A2R10G10B10_UINT_PACK32: @@ -902,7 +913,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_A2R10G10B10_UINT_PACK32** = ``61`` - +Unsigned integer alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the ``[0, 1023]`` range for red/green/blue and ``[0, 3]`` for alpha. .. _class_RenderingDevice_constant_DATA_FORMAT_A2R10G10B10_SINT_PACK32: @@ -910,7 +921,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_A2R10G10B10_SINT_PACK32** = ``62`` - +Signed integer alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the ``[-511, 511]`` range for red/green/blue and ``[-1, 1]`` for alpha. .. _class_RenderingDevice_constant_DATA_FORMAT_A2B10G10R10_UNORM_PACK32: @@ -918,7 +929,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_A2B10G10R10_UNORM_PACK32** = ``63`` - +Unsigned floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_A2B10G10R10_SNORM_PACK32: @@ -926,7 +937,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_A2B10G10R10_SNORM_PACK32** = ``64`` - +Signed floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the ``[-1.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_A2B10G10R10_USCALED_PACK32: @@ -934,7 +945,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_A2B10G10R10_USCALED_PACK32** = ``65`` - +Unsigned floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the ``[0.0, 1023.0]`` range for blue/green/red and ``[0.0, 3.0]`` for alpha. .. _class_RenderingDevice_constant_DATA_FORMAT_A2B10G10R10_SSCALED_PACK32: @@ -942,7 +953,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_A2B10G10R10_SSCALED_PACK32** = ``66`` - +Signed floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the ``[-511.0, 511.0]`` range for blue/green/red and ``[-1.0, 1.0]`` for alpha. .. _class_RenderingDevice_constant_DATA_FORMAT_A2B10G10R10_UINT_PACK32: @@ -950,7 +961,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_A2B10G10R10_UINT_PACK32** = ``67`` - +Unsigned integer alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the ``[0, 1023]`` range for blue/green/red and ``[0, 3]`` for alpha. .. _class_RenderingDevice_constant_DATA_FORMAT_A2B10G10R10_SINT_PACK32: @@ -958,7 +969,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_A2B10G10R10_SINT_PACK32** = ``68`` - +Signed integer alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the ``[-511, 511]`` range for blue/green/red and ``[-1, 1]`` for alpha. .. _class_RenderingDevice_constant_DATA_FORMAT_R16_UNORM: @@ -966,7 +977,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16_UNORM** = ``69`` - +16-bit-per-channel unsigned floating-point red channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16_SNORM: @@ -974,7 +985,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16_SNORM** = ``70`` - +16-bit-per-channel signed floating-point red channel data format with normalized value. Values are in the ``[-1.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16_USCALED: @@ -982,7 +993,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16_USCALED** = ``71`` - +16-bit-per-channel unsigned floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the ``[0.0, 65535.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16_SSCALED: @@ -990,7 +1001,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16_SSCALED** = ``72`` - +16-bit-per-channel signed floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the ``[-32767.0, 32767.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16_UINT: @@ -998,7 +1009,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16_UINT** = ``73`` - +16-bit-per-channel unsigned integer red channel data format. Values are in the ``[0.0, 65535]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16_SINT: @@ -1006,7 +1017,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16_SINT** = ``74`` - +16-bit-per-channel signed integer red channel data format. Values are in the ``[-32767, 32767]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16_SFLOAT: @@ -1014,7 +1025,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16_SFLOAT** = ``75`` - +16-bit-per-channel signed floating-point red channel data format with the value stored as-is. .. _class_RenderingDevice_constant_DATA_FORMAT_R16G16_UNORM: @@ -1022,7 +1033,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16G16_UNORM** = ``76`` - +16-bit-per-channel unsigned floating-point red/green channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16G16_SNORM: @@ -1030,7 +1041,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16G16_SNORM** = ``77`` - +16-bit-per-channel signed floating-point red/green channel data format with normalized value. Values are in the ``[-1.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16G16_USCALED: @@ -1038,7 +1049,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16G16_USCALED** = ``78`` - +16-bit-per-channel unsigned floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the ``[0.0, 65535.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16G16_SSCALED: @@ -1046,7 +1057,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16G16_SSCALED** = ``79`` - +16-bit-per-channel signed floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the ``[-32767.0, 32767.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16G16_UINT: @@ -1054,7 +1065,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16G16_UINT** = ``80`` - +16-bit-per-channel unsigned integer red/green channel data format. Values are in the ``[0.0, 65535]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16G16_SINT: @@ -1062,7 +1073,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16G16_SINT** = ``81`` - +16-bit-per-channel signed integer red/green channel data format. Values are in the ``[-32767, 32767]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16G16_SFLOAT: @@ -1070,7 +1081,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16G16_SFLOAT** = ``82`` - +16-bit-per-channel signed floating-point red/green channel data format with the value stored as-is. .. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16_UNORM: @@ -1078,7 +1089,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16G16B16_UNORM** = ``83`` - +16-bit-per-channel unsigned floating-point red/green/blue channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16_SNORM: @@ -1086,7 +1097,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16G16B16_SNORM** = ``84`` - +16-bit-per-channel signed floating-point red/green/blue channel data format with normalized value. Values are in the ``[-1.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16_USCALED: @@ -1094,7 +1105,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16G16B16_USCALED** = ``85`` - +16-bit-per-channel unsigned floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the ``[0.0, 65535.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16_SSCALED: @@ -1102,7 +1113,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16G16B16_SSCALED** = ``86`` - +16-bit-per-channel signed floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the ``[-32767.0, 32767.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16_UINT: @@ -1110,7 +1121,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16G16B16_UINT** = ``87`` - +16-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the ``[0.0, 65535]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16_SINT: @@ -1118,7 +1129,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16G16B16_SINT** = ``88`` - +16-bit-per-channel signed integer red/green/blue channel data format. Values are in the ``[-32767, 32767]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16_SFLOAT: @@ -1126,7 +1137,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16G16B16_SFLOAT** = ``89`` - +16-bit-per-channel signed floating-point red/green/blue channel data format with the value stored as-is. .. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16A16_UNORM: @@ -1134,7 +1145,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16G16B16A16_UNORM** = ``90`` - +16-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16A16_SNORM: @@ -1142,7 +1153,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16G16B16A16_SNORM** = ``91`` - +16-bit-per-channel signed floating-point red/green/blue/alpha channel data format with normalized value. Values are in the ``[-1.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16A16_USCALED: @@ -1150,7 +1161,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16G16B16A16_USCALED** = ``92`` - +16-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the ``[0.0, 65535.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16A16_SSCALED: @@ -1158,7 +1169,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16G16B16A16_SSCALED** = ``93`` - +16-bit-per-channel signed floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the ``[-32767.0, 32767.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16A16_UINT: @@ -1166,7 +1177,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16G16B16A16_UINT** = ``94`` - +16-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the ``[0.0, 65535]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16A16_SINT: @@ -1174,7 +1185,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16G16B16A16_SINT** = ``95`` - +16-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the ``[-32767, 32767]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16A16_SFLOAT: @@ -1182,7 +1193,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R16G16B16A16_SFLOAT** = ``96`` - +16-bit-per-channel signed floating-point red/green/blue/alpha channel data format with the value stored as-is. .. _class_RenderingDevice_constant_DATA_FORMAT_R32_UINT: @@ -1190,7 +1201,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R32_UINT** = ``97`` - +32-bit-per-channel unsigned integer red channel data format. Values are in the ``[0, 2^32 - 1]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R32_SINT: @@ -1198,7 +1209,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R32_SINT** = ``98`` - +32-bit-per-channel signed integer red channel data format. Values are in the ``[2^31 + 1, 2^31 - 1]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R32_SFLOAT: @@ -1206,7 +1217,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R32_SFLOAT** = ``99`` - +32-bit-per-channel signed floating-point red channel data format with the value stored as-is. .. _class_RenderingDevice_constant_DATA_FORMAT_R32G32_UINT: @@ -1214,7 +1225,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R32G32_UINT** = ``100`` - +32-bit-per-channel unsigned integer red/green channel data format. Values are in the ``[0, 2^32 - 1]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R32G32_SINT: @@ -1222,7 +1233,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R32G32_SINT** = ``101`` - +32-bit-per-channel signed integer red/green channel data format. Values are in the ``[2^31 + 1, 2^31 - 1]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R32G32_SFLOAT: @@ -1230,7 +1241,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R32G32_SFLOAT** = ``102`` - +32-bit-per-channel signed floating-point red/green channel data format with the value stored as-is. .. _class_RenderingDevice_constant_DATA_FORMAT_R32G32B32_UINT: @@ -1238,7 +1249,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R32G32B32_UINT** = ``103`` - +32-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the ``[0, 2^32 - 1]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R32G32B32_SINT: @@ -1246,7 +1257,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R32G32B32_SINT** = ``104`` - +32-bit-per-channel signed integer red/green/blue channel data format. Values are in the ``[2^31 + 1, 2^31 - 1]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R32G32B32_SFLOAT: @@ -1254,7 +1265,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R32G32B32_SFLOAT** = ``105`` - +32-bit-per-channel signed floating-point red/green/blue channel data format with the value stored as-is. .. _class_RenderingDevice_constant_DATA_FORMAT_R32G32B32A32_UINT: @@ -1262,7 +1273,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R32G32B32A32_UINT** = ``106`` - +32-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the ``[0, 2^32 - 1]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R32G32B32A32_SINT: @@ -1270,7 +1281,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R32G32B32A32_SINT** = ``107`` - +32-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the ``[2^31 + 1, 2^31 - 1]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R32G32B32A32_SFLOAT: @@ -1278,7 +1289,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R32G32B32A32_SFLOAT** = ``108`` - +32-bit-per-channel signed floating-point red/green/blue/alpha channel data format with the value stored as-is. .. _class_RenderingDevice_constant_DATA_FORMAT_R64_UINT: @@ -1286,7 +1297,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R64_UINT** = ``109`` - +64-bit-per-channel unsigned integer red channel data format. Values are in the ``[0, 2^64 - 1]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R64_SINT: @@ -1294,7 +1305,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R64_SINT** = ``110`` - +64-bit-per-channel signed integer red channel data format. Values are in the ``[2^63 + 1, 2^63 - 1]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R64_SFLOAT: @@ -1302,7 +1313,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R64_SFLOAT** = ``111`` - +64-bit-per-channel signed floating-point red channel data format with the value stored as-is. .. _class_RenderingDevice_constant_DATA_FORMAT_R64G64_UINT: @@ -1310,7 +1321,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R64G64_UINT** = ``112`` - +64-bit-per-channel unsigned integer red/green channel data format. Values are in the ``[0, 2^64 - 1]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R64G64_SINT: @@ -1318,7 +1329,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R64G64_SINT** = ``113`` - +64-bit-per-channel signed integer red/green channel data format. Values are in the ``[2^63 + 1, 2^63 - 1]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R64G64_SFLOAT: @@ -1326,7 +1337,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R64G64_SFLOAT** = ``114`` - +64-bit-per-channel signed floating-point red/green channel data format with the value stored as-is. .. _class_RenderingDevice_constant_DATA_FORMAT_R64G64B64_UINT: @@ -1334,7 +1345,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R64G64B64_UINT** = ``115`` - +64-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the ``[0, 2^64 - 1]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R64G64B64_SINT: @@ -1342,7 +1353,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R64G64B64_SINT** = ``116`` - +64-bit-per-channel signed integer red/green/blue channel data format. Values are in the ``[2^63 + 1, 2^63 - 1]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R64G64B64_SFLOAT: @@ -1350,7 +1361,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R64G64B64_SFLOAT** = ``117`` - +64-bit-per-channel signed floating-point red/green/blue channel data format with the value stored as-is. .. _class_RenderingDevice_constant_DATA_FORMAT_R64G64B64A64_UINT: @@ -1358,7 +1369,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R64G64B64A64_UINT** = ``118`` - +64-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the ``[0, 2^64 - 1]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R64G64B64A64_SINT: @@ -1366,7 +1377,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R64G64B64A64_SINT** = ``119`` - +64-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the ``[2^63 + 1, 2^63 - 1]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R64G64B64A64_SFLOAT: @@ -1374,7 +1385,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R64G64B64A64_SFLOAT** = ``120`` - +64-bit-per-channel signed floating-point red/green/blue/alpha channel data format with the value stored as-is. .. _class_RenderingDevice_constant_DATA_FORMAT_B10G11R11_UFLOAT_PACK32: @@ -1382,7 +1393,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_B10G11R11_UFLOAT_PACK32** = ``121`` - +Unsigned floating-point blue/green/red data format with the value stored as-is, packed in 32 bits. The format's precision is 10 bits of blue channel, 11 bits of green channel and 11 bits of red channel. .. _class_RenderingDevice_constant_DATA_FORMAT_E5B9G9R9_UFLOAT_PACK32: @@ -1390,7 +1401,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_E5B9G9R9_UFLOAT_PACK32** = ``122`` - +Unsigned floating-point exposure/blue/green/red data format with the value stored as-is, packed in 32 bits. The format's precision is 5 bits of exposure, 9 bits of blue channel, 9 bits of green channel and 9 bits of red channel. .. _class_RenderingDevice_constant_DATA_FORMAT_D16_UNORM: @@ -1398,7 +1409,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_D16_UNORM** = ``123`` - +16-bit unsigned floating-point depth data format with normalized value. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_X8_D24_UNORM_PACK32: @@ -1406,7 +1417,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_X8_D24_UNORM_PACK32** = ``124`` - +24-bit unsigned floating-point depth data format with normalized value, plus 8 unused bits, packed in 32 bits. Values for depth are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_D32_SFLOAT: @@ -1414,7 +1425,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_D32_SFLOAT** = ``125`` - +32-bit signed floating-point depth data format with the value stored as-is. .. _class_RenderingDevice_constant_DATA_FORMAT_S8_UINT: @@ -1422,7 +1433,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_S8_UINT** = ``126`` - +8-bit unsigned integer stencil data format. .. _class_RenderingDevice_constant_DATA_FORMAT_D16_UNORM_S8_UINT: @@ -1430,7 +1441,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_D16_UNORM_S8_UINT** = ``127`` - +16-bit unsigned floating-point depth data format with normalized value, plus 8 bits of stencil in unsigned integer format. Values for depth are in the ``[0.0, 1.0]`` range. Values for stencil are in the ``[0, 255]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_D24_UNORM_S8_UINT: @@ -1438,7 +1449,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_D24_UNORM_S8_UINT** = ``128`` - +24-bit unsigned floating-point depth data format with normalized value, plus 8 bits of stencil in unsigned integer format. Values for depth are in the ``[0.0, 1.0]`` range. Values for stencil are in the ``[0, 255]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_D32_SFLOAT_S8_UINT: @@ -1446,7 +1457,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_D32_SFLOAT_S8_UINT** = ``129`` - +32-bit signed floating-point depth data format with the value stored as-is, plus 8 bits of stencil in unsigned integer format. Values for stencil are in the ``[0, 255]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_BC1_RGB_UNORM_BLOCK: @@ -1454,7 +1465,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_BC1_RGB_UNORM_BLOCK** = ``130`` - +VRAM-compressed unsigned red/green/blue channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. The format's precision is 5 bits of red channel, 6 bits of green channel and 5 bits of blue channel. Using BC1 texture compression (also known as S3TC DXT1). .. _class_RenderingDevice_constant_DATA_FORMAT_BC1_RGB_SRGB_BLOCK: @@ -1462,7 +1473,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_BC1_RGB_SRGB_BLOCK** = ``131`` - +VRAM-compressed unsigned red/green/blue channel data format with normalized value and non-linear sRGB encoding. Values are in the ``[0.0, 1.0]`` range. The format's precision is 5 bits of red channel, 6 bits of green channel and 5 bits of blue channel. Using BC1 texture compression (also known as S3TC DXT1). .. _class_RenderingDevice_constant_DATA_FORMAT_BC1_RGBA_UNORM_BLOCK: @@ -1470,7 +1481,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_BC1_RGBA_UNORM_BLOCK** = ``132`` - +VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 1 bit of alpha channel. Using BC1 texture compression (also known as S3TC DXT1). .. _class_RenderingDevice_constant_DATA_FORMAT_BC1_RGBA_SRGB_BLOCK: @@ -1478,7 +1489,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_BC1_RGBA_SRGB_BLOCK** = ``133`` - +VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the ``[0.0, 1.0]`` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 1 bit of alpha channel. Using BC1 texture compression (also known as S3TC DXT1). .. _class_RenderingDevice_constant_DATA_FORMAT_BC2_UNORM_BLOCK: @@ -1486,7 +1497,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_BC2_UNORM_BLOCK** = ``134`` - +VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 4 bits of alpha channel. Using BC2 texture compression (also known as S3TC DXT3). .. _class_RenderingDevice_constant_DATA_FORMAT_BC2_SRGB_BLOCK: @@ -1494,7 +1505,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_BC2_SRGB_BLOCK** = ``135`` - +VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the ``[0.0, 1.0]`` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 4 bits of alpha channel. Using BC2 texture compression (also known as S3TC DXT3). .. _class_RenderingDevice_constant_DATA_FORMAT_BC3_UNORM_BLOCK: @@ -1502,7 +1513,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_BC3_UNORM_BLOCK** = ``136`` - +VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 8 bits of alpha channel. Using BC3 texture compression (also known as S3TC DXT5). .. _class_RenderingDevice_constant_DATA_FORMAT_BC3_SRGB_BLOCK: @@ -1510,7 +1521,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_BC3_SRGB_BLOCK** = ``137`` - +VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the ``[0.0, 1.0]`` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 8 bits of alpha channel. Using BC3 texture compression (also known as S3TC DXT5). .. _class_RenderingDevice_constant_DATA_FORMAT_BC4_UNORM_BLOCK: @@ -1518,7 +1529,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_BC4_UNORM_BLOCK** = ``138`` - +VRAM-compressed unsigned red channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. The format's precision is 8 bits of red channel. Using BC4 texture compression. .. _class_RenderingDevice_constant_DATA_FORMAT_BC4_SNORM_BLOCK: @@ -1526,7 +1537,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_BC4_SNORM_BLOCK** = ``139`` - +VRAM-compressed signed red channel data format with normalized value. Values are in the ``[-1.0, 1.0]`` range. The format's precision is 8 bits of red channel. Using BC4 texture compression. .. _class_RenderingDevice_constant_DATA_FORMAT_BC5_UNORM_BLOCK: @@ -1534,7 +1545,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_BC5_UNORM_BLOCK** = ``140`` - +VRAM-compressed unsigned red/green channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. The format's precision is 8 bits of red channel and 8 bits of green channel. Using BC5 texture compression (also known as S3TC RGTC). .. _class_RenderingDevice_constant_DATA_FORMAT_BC5_SNORM_BLOCK: @@ -1542,7 +1553,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_BC5_SNORM_BLOCK** = ``141`` - +VRAM-compressed signed red/green channel data format with normalized value. Values are in the ``[-1.0, 1.0]`` range. The format's precision is 8 bits of red channel and 8 bits of green channel. Using BC5 texture compression (also known as S3TC RGTC). .. _class_RenderingDevice_constant_DATA_FORMAT_BC6H_UFLOAT_BLOCK: @@ -1550,7 +1561,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_BC6H_UFLOAT_BLOCK** = ``142`` - +VRAM-compressed unsigned red/green/blue channel data format with the floating-point value stored as-is. The format's precision is 8 bits of red channel and 8 bits of green channel. Using BC6H texture compression (also known as BPTC HDR). .. _class_RenderingDevice_constant_DATA_FORMAT_BC6H_SFLOAT_BLOCK: @@ -1558,7 +1569,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_BC6H_SFLOAT_BLOCK** = ``143`` - +VRAM-compressed signed red/green/blue channel data format with the floating-point value stored as-is. The format's precision is between 4 and 7 bits for the red/green/blue channels and between 0 and 8 bits for the alpha channel. Using BC7 texture compression (also known as BPTC HDR). .. _class_RenderingDevice_constant_DATA_FORMAT_BC7_UNORM_BLOCK: @@ -1566,7 +1577,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_BC7_UNORM_BLOCK** = ``144`` - +VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. The format's precision is between 4 and 7 bits for the red/green/blue channels and between 0 and 8 bits for the alpha channel. Also known as BPTC LDR. .. _class_RenderingDevice_constant_DATA_FORMAT_BC7_SRGB_BLOCK: @@ -1574,7 +1585,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_BC7_SRGB_BLOCK** = ``145`` - +VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the ``[0.0, 1.0]`` range. The format's precision is between 4 and 7 bits for the red/green/blue channels and between 0 and 8 bits for the alpha channel. Also known as BPTC LDR. .. _class_RenderingDevice_constant_DATA_FORMAT_ETC2_R8G8B8_UNORM_BLOCK: @@ -1582,7 +1593,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ETC2_R8G8B8_UNORM_BLOCK** = ``146`` - +VRAM-compressed unsigned red/green/blue channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. Using ETC2 texture compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ETC2_R8G8B8_SRGB_BLOCK: @@ -1590,7 +1601,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ETC2_R8G8B8_SRGB_BLOCK** = ``147`` - +VRAM-compressed unsigned red/green/blue channel data format with normalized value and non-linear sRGB encoding. Values are in the ``[0.0, 1.0]`` range. Using ETC2 texture compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK: @@ -1598,7 +1609,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK** = ``148`` - +VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. Red/green/blue use 8 bit of precision each, with alpha using 1 bit of precision. Using ETC2 texture compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK: @@ -1606,7 +1617,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK** = ``149`` - +VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the ``[0.0, 1.0]`` range. Red/green/blue use 8 bit of precision each, with alpha using 1 bit of precision. Using ETC2 texture compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK: @@ -1614,7 +1625,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK** = ``150`` - +VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. Red/green/blue use 8 bits of precision each, with alpha using 8 bits of precision. Using ETC2 texture compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK: @@ -1622,7 +1633,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK** = ``151`` - +VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the ``[0.0, 1.0]`` range. Red/green/blue use 8 bits of precision each, with alpha using 8 bits of precision. Using ETC2 texture compression. .. _class_RenderingDevice_constant_DATA_FORMAT_EAC_R11_UNORM_BLOCK: @@ -1630,7 +1641,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_EAC_R11_UNORM_BLOCK** = ``152`` - +11-bit VRAM-compressed unsigned red channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. Using ETC2 texture compression. .. _class_RenderingDevice_constant_DATA_FORMAT_EAC_R11_SNORM_BLOCK: @@ -1638,7 +1649,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_EAC_R11_SNORM_BLOCK** = ``153`` - +11-bit VRAM-compressed signed red channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. Using ETC2 texture compression. .. _class_RenderingDevice_constant_DATA_FORMAT_EAC_R11G11_UNORM_BLOCK: @@ -1646,7 +1657,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_EAC_R11G11_UNORM_BLOCK** = ``154`` - +11-bit VRAM-compressed unsigned red/green channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. Using ETC2 texture compression. .. _class_RenderingDevice_constant_DATA_FORMAT_EAC_R11G11_SNORM_BLOCK: @@ -1654,7 +1665,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_EAC_R11G11_SNORM_BLOCK** = ``155`` - +11-bit VRAM-compressed signed red/green channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. Using ETC2 texture compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_4x4_UNORM_BLOCK: @@ -1662,7 +1673,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_4x4_UNORM_BLOCK** = ``156`` - +VRAM-compressed unsigned floating-point data format with normalized value, packed in 4×4 blocks (highest quality). Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_4x4_SRGB_BLOCK: @@ -1670,7 +1681,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_4x4_SRGB_BLOCK** = ``157`` - +VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 4×4 blocks (highest quality). Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_5x4_UNORM_BLOCK: @@ -1678,7 +1689,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_5x4_UNORM_BLOCK** = ``158`` - +VRAM-compressed unsigned floating-point data format with normalized value, packed in 5×4 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_5x4_SRGB_BLOCK: @@ -1686,7 +1697,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_5x4_SRGB_BLOCK** = ``159`` - +VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 5×4 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_5x5_UNORM_BLOCK: @@ -1694,7 +1705,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_5x5_UNORM_BLOCK** = ``160`` - +VRAM-compressed unsigned floating-point data format with normalized value, packed in 5×5 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_5x5_SRGB_BLOCK: @@ -1702,7 +1713,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_5x5_SRGB_BLOCK** = ``161`` - +VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 5×5 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_6x5_UNORM_BLOCK: @@ -1710,7 +1721,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_6x5_UNORM_BLOCK** = ``162`` - +VRAM-compressed unsigned floating-point data format with normalized value, packed in 6×5 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_6x5_SRGB_BLOCK: @@ -1718,7 +1729,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_6x5_SRGB_BLOCK** = ``163`` - +VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 6×5 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_6x6_UNORM_BLOCK: @@ -1726,7 +1737,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_6x6_UNORM_BLOCK** = ``164`` - +VRAM-compressed unsigned floating-point data format with normalized value, packed in 6×6 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_6x6_SRGB_BLOCK: @@ -1734,7 +1745,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_6x6_SRGB_BLOCK** = ``165`` - +VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 6×6 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_8x5_UNORM_BLOCK: @@ -1742,7 +1753,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_8x5_UNORM_BLOCK** = ``166`` - +VRAM-compressed unsigned floating-point data format with normalized value, packed in 8×5 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_8x5_SRGB_BLOCK: @@ -1750,7 +1761,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_8x5_SRGB_BLOCK** = ``167`` - +VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 8×5 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_8x6_UNORM_BLOCK: @@ -1758,7 +1769,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_8x6_UNORM_BLOCK** = ``168`` - +VRAM-compressed unsigned floating-point data format with normalized value, packed in 8×6 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_8x6_SRGB_BLOCK: @@ -1766,7 +1777,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_8x6_SRGB_BLOCK** = ``169`` - +VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 8×6 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_8x8_UNORM_BLOCK: @@ -1774,7 +1785,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_8x8_UNORM_BLOCK** = ``170`` - +VRAM-compressed unsigned floating-point data format with normalized value, packed in 8×8 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_8x8_SRGB_BLOCK: @@ -1782,7 +1793,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_8x8_SRGB_BLOCK** = ``171`` - +VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 8×8 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x5_UNORM_BLOCK: @@ -1790,7 +1801,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_10x5_UNORM_BLOCK** = ``172`` - +VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×5 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x5_SRGB_BLOCK: @@ -1798,7 +1809,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_10x5_SRGB_BLOCK** = ``173`` - +VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 10×5 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x6_UNORM_BLOCK: @@ -1806,7 +1817,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_10x6_UNORM_BLOCK** = ``174`` - +VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×6 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x6_SRGB_BLOCK: @@ -1814,7 +1825,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_10x6_SRGB_BLOCK** = ``175`` - +VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 10×6 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x8_UNORM_BLOCK: @@ -1822,7 +1833,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_10x8_UNORM_BLOCK** = ``176`` - +VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×8 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x8_SRGB_BLOCK: @@ -1830,7 +1841,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_10x8_SRGB_BLOCK** = ``177`` - +VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 10×8 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x10_UNORM_BLOCK: @@ -1838,7 +1849,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_10x10_UNORM_BLOCK** = ``178`` - +VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×10 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x10_SRGB_BLOCK: @@ -1846,7 +1857,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_10x10_SRGB_BLOCK** = ``179`` - +VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 10×10 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_12x10_UNORM_BLOCK: @@ -1854,7 +1865,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_12x10_UNORM_BLOCK** = ``180`` - +VRAM-compressed unsigned floating-point data format with normalized value, packed in 12×10 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_12x10_SRGB_BLOCK: @@ -1862,7 +1873,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_12x10_SRGB_BLOCK** = ``181`` - +VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 12×10 blocks. Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_12x12_UNORM_BLOCK: @@ -1870,7 +1881,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_12x12_UNORM_BLOCK** = ``182`` - +VRAM-compressed unsigned floating-point data format with normalized value, packed in 12 blocks (lowest quality). Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_12x12_SRGB_BLOCK: @@ -1878,7 +1889,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_ASTC_12x12_SRGB_BLOCK** = ``183`` - +VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 12 blocks (lowest quality). Values are in the ``[0.0, 1.0]`` range. Using ASTC compression. .. _class_RenderingDevice_constant_DATA_FORMAT_G8B8G8R8_422_UNORM: @@ -1886,7 +1897,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G8B8G8R8_422_UNORM** = ``184`` - +8-bit-per-channel unsigned floating-point green/blue/red channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). .. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8G8_422_UNORM: @@ -1894,7 +1905,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_B8G8R8G8_422_UNORM** = ``185`` - +8-bit-per-channel unsigned floating-point blue/green/red channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). .. _class_RenderingDevice_constant_DATA_FORMAT_G8_B8_R8_3PLANE_420_UNORM: @@ -1902,7 +1913,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G8_B8_R8_3PLANE_420_UNORM** = ``186`` - +8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 3 separate planes (green + blue + red). Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). .. _class_RenderingDevice_constant_DATA_FORMAT_G8_B8R8_2PLANE_420_UNORM: @@ -1910,7 +1921,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G8_B8R8_2PLANE_420_UNORM** = ``187`` - +8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 2 separate planes (green + blue/red). Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). .. _class_RenderingDevice_constant_DATA_FORMAT_G8_B8_R8_3PLANE_422_UNORM: @@ -1918,7 +1929,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G8_B8_R8_3PLANE_422_UNORM** = ``188`` - +8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 2 separate planes (green + blue + red). Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). .. _class_RenderingDevice_constant_DATA_FORMAT_G8_B8R8_2PLANE_422_UNORM: @@ -1926,7 +1937,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G8_B8R8_2PLANE_422_UNORM** = ``189`` - +8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 2 separate planes (green + blue/red). Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). .. _class_RenderingDevice_constant_DATA_FORMAT_G8_B8_R8_3PLANE_444_UNORM: @@ -1934,7 +1945,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G8_B8_R8_3PLANE_444_UNORM** = ``190`` - +8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 3 separate planes. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R10X6_UNORM_PACK16: @@ -1942,7 +1953,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R10X6_UNORM_PACK16** = ``191`` - +10-bit-per-channel unsigned floating-point red channel data with normalized value, plus 6 unused bits, packed in 16 bits. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R10X6G10X6_UNORM_2PACK16: @@ -1950,7 +1961,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R10X6G10X6_UNORM_2PACK16** = ``192`` - +10-bit-per-channel unsigned floating-point red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 2×16 bits. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16: @@ -1958,7 +1969,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16** = ``193`` - +10-bit-per-channel unsigned floating-point red/green/blue/alpha channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16: @@ -1966,7 +1977,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16** = ``194`` - +10-bit-per-channel unsigned floating-point green/blue/green/red channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution. .. _class_RenderingDevice_constant_DATA_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16: @@ -1974,7 +1985,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16** = ``195`` - +10-bit-per-channel unsigned floating-point blue/green/red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution. .. _class_RenderingDevice_constant_DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16: @@ -1982,7 +1993,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16** = ``196`` - +10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue + red). Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). .. _class_RenderingDevice_constant_DATA_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16: @@ -1990,7 +2001,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16** = ``197`` - +10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue/red). Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). .. _class_RenderingDevice_constant_DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16: @@ -1998,7 +2009,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16** = ``198`` - +10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). .. _class_RenderingDevice_constant_DATA_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16: @@ -2006,7 +2017,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16** = ``199`` - +10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue/red). Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). .. _class_RenderingDevice_constant_DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16: @@ -2014,7 +2025,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16** = ``200`` - +10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R12X4_UNORM_PACK16: @@ -2022,7 +2033,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R12X4_UNORM_PACK16** = ``201`` - +12-bit-per-channel unsigned floating-point red channel data with normalized value, plus 6 unused bits, packed in 16 bits. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R12X4G12X4_UNORM_2PACK16: @@ -2030,7 +2041,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R12X4G12X4_UNORM_2PACK16** = ``202`` - +12-bit-per-channel unsigned floating-point red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 2×16 bits. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16: @@ -2038,7 +2049,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16** = ``203`` - +12-bit-per-channel unsigned floating-point red/green/blue/alpha channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16: @@ -2046,7 +2057,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16** = ``204`` - +12-bit-per-channel unsigned floating-point green/blue/green/red channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution. .. _class_RenderingDevice_constant_DATA_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16: @@ -2054,7 +2065,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16** = ``205`` - +12-bit-per-channel unsigned floating-point blue/green/red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution. .. _class_RenderingDevice_constant_DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16: @@ -2062,7 +2073,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16** = ``206`` - +12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue + red). Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). .. _class_RenderingDevice_constant_DATA_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16: @@ -2070,7 +2081,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16** = ``207`` - +12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue/red). Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). .. _class_RenderingDevice_constant_DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16: @@ -2078,7 +2089,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16** = ``208`` - +12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). .. _class_RenderingDevice_constant_DATA_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16: @@ -2086,7 +2097,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16** = ``209`` - +12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue/red). Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). .. _class_RenderingDevice_constant_DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16: @@ -2094,7 +2105,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16** = ``210`` - +12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_G16B16G16R16_422_UNORM: @@ -2102,7 +2113,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G16B16G16R16_422_UNORM** = ``211`` - +16-bit-per-channel unsigned floating-point green/blue/red channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). .. _class_RenderingDevice_constant_DATA_FORMAT_B16G16R16G16_422_UNORM: @@ -2110,7 +2121,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_B16G16R16G16_422_UNORM** = ``212`` - +16-bit-per-channel unsigned floating-point blue/green/red channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). .. _class_RenderingDevice_constant_DATA_FORMAT_G16_B16_R16_3PLANE_420_UNORM: @@ -2118,7 +2129,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G16_B16_R16_3PLANE_420_UNORM** = ``213`` - +16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 2 separate planes (green + blue + red). Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). .. _class_RenderingDevice_constant_DATA_FORMAT_G16_B16R16_2PLANE_420_UNORM: @@ -2126,7 +2137,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G16_B16R16_2PLANE_420_UNORM** = ``214`` - +16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 2 separate planes (green + blue/red). Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). .. _class_RenderingDevice_constant_DATA_FORMAT_G16_B16_R16_3PLANE_422_UNORM: @@ -2134,7 +2145,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G16_B16_R16_3PLANE_422_UNORM** = ``215`` - +16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 3 separate planes (green + blue + red). Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). .. _class_RenderingDevice_constant_DATA_FORMAT_G16_B16R16_2PLANE_422_UNORM: @@ -2142,7 +2153,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G16_B16R16_2PLANE_422_UNORM** = ``216`` - +16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 3 separate planes (green + blue/red). Values are in the ``[0.0, 1.0]`` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). .. _class_RenderingDevice_constant_DATA_FORMAT_G16_B16_R16_3PLANE_444_UNORM: @@ -2150,7 +2161,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_G16_B16_R16_3PLANE_444_UNORM** = ``217`` - +16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 3 separate planes (green + blue + red). Values are in the ``[0.0, 1.0]`` range. .. _class_RenderingDevice_constant_DATA_FORMAT_MAX: @@ -2158,7 +2169,7 @@ enum **DataFormat**: :ref:`DataFormat` **DATA_FORMAT_MAX** = ``218`` - +Represents the size of the :ref:`DataFormat` enum. .. rst-class:: classref-item-separator @@ -2176,7 +2187,7 @@ flags **BarrierMask**: :ref:`BarrierMask` **BARRIER_MASK_RASTER** = ``1`` - +Raster barrier mask. .. _class_RenderingDevice_constant_BARRIER_MASK_COMPUTE: @@ -2184,7 +2195,7 @@ flags **BarrierMask**: :ref:`BarrierMask` **BARRIER_MASK_COMPUTE** = ``2`` - +Compute barrier mask. .. _class_RenderingDevice_constant_BARRIER_MASK_TRANSFER: @@ -2192,7 +2203,7 @@ flags **BarrierMask**: :ref:`BarrierMask` **BARRIER_MASK_TRANSFER** = ``4`` - +Transfer barrier mask. .. _class_RenderingDevice_constant_BARRIER_MASK_ALL_BARRIERS: @@ -2200,7 +2211,7 @@ flags **BarrierMask**: :ref:`BarrierMask` **BARRIER_MASK_ALL_BARRIERS** = ``7`` - +Barrier mask for all types (raster, compute, transfer). Equivalent to ``BARRIER_MASK_RASTER | BARRIER_MASK_COMPUTE | BARRIER_MASK_TRANSFER``. .. _class_RenderingDevice_constant_BARRIER_MASK_NO_BARRIER: @@ -2208,7 +2219,7 @@ flags **BarrierMask**: :ref:`BarrierMask` **BARRIER_MASK_NO_BARRIER** = ``8`` - +No barrier for any type. .. rst-class:: classref-item-separator @@ -2300,7 +2311,7 @@ enum **TextureSamples**: :ref:`TextureSamples` **TEXTURE_SAMPLES_1** = ``0`` - +Perform 1 texture sample (this is the fastest but lowest-quality for antialiasing). .. _class_RenderingDevice_constant_TEXTURE_SAMPLES_2: @@ -2308,7 +2319,7 @@ enum **TextureSamples**: :ref:`TextureSamples` **TEXTURE_SAMPLES_2** = ``1`` - +Perform 2 texture samples. .. _class_RenderingDevice_constant_TEXTURE_SAMPLES_4: @@ -2316,7 +2327,7 @@ enum **TextureSamples**: :ref:`TextureSamples` **TEXTURE_SAMPLES_4** = ``2`` - +Perform 4 texture samples. .. _class_RenderingDevice_constant_TEXTURE_SAMPLES_8: @@ -2324,7 +2335,7 @@ enum **TextureSamples**: :ref:`TextureSamples` **TEXTURE_SAMPLES_8** = ``3`` - +Perform 8 texture samples. Not supported on mobile GPUs (including Apple Silicon). .. _class_RenderingDevice_constant_TEXTURE_SAMPLES_16: @@ -2332,7 +2343,7 @@ enum **TextureSamples**: :ref:`TextureSamples` **TEXTURE_SAMPLES_16** = ``4`` - +Perform 16 texture samples. Not supported on mobile GPUs and many desktop GPUs. .. _class_RenderingDevice_constant_TEXTURE_SAMPLES_32: @@ -2340,7 +2351,7 @@ enum **TextureSamples**: :ref:`TextureSamples` **TEXTURE_SAMPLES_32** = ``5`` - +Perform 32 texture samples. Not supported on most GPUs. .. _class_RenderingDevice_constant_TEXTURE_SAMPLES_64: @@ -2348,7 +2359,7 @@ enum **TextureSamples**: :ref:`TextureSamples` **TEXTURE_SAMPLES_64** = ``6`` - +Perform 64 texture samples (this is the slowest but highest-quality for antialiasing). Not supported on most GPUs. .. _class_RenderingDevice_constant_TEXTURE_SAMPLES_MAX: @@ -2374,7 +2385,7 @@ flags **TextureUsageBits**: :ref:`TextureUsageBits` **TEXTURE_USAGE_SAMPLING_BIT** = ``1`` - +Texture can be sampled. .. _class_RenderingDevice_constant_TEXTURE_USAGE_COLOR_ATTACHMENT_BIT: @@ -2382,7 +2393,7 @@ flags **TextureUsageBits**: :ref:`TextureUsageBits` **TEXTURE_USAGE_COLOR_ATTACHMENT_BIT** = ``2`` - +Texture can be used as a color attachment in a framebuffer. .. _class_RenderingDevice_constant_TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT: @@ -2390,7 +2401,7 @@ flags **TextureUsageBits**: :ref:`TextureUsageBits` **TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT** = ``4`` - +Texture can be used as a depth/stencil attachment in a framebuffer. .. _class_RenderingDevice_constant_TEXTURE_USAGE_STORAGE_BIT: @@ -2398,7 +2409,7 @@ flags **TextureUsageBits**: :ref:`TextureUsageBits` **TEXTURE_USAGE_STORAGE_BIT** = ``8`` - +Texture can be used as a `storage image `__. .. _class_RenderingDevice_constant_TEXTURE_USAGE_STORAGE_ATOMIC_BIT: @@ -2406,7 +2417,7 @@ flags **TextureUsageBits**: :ref:`TextureUsageBits` **TEXTURE_USAGE_STORAGE_ATOMIC_BIT** = ``16`` - +Texture can be used as a `storage image `__ with support for atomic operations. .. _class_RenderingDevice_constant_TEXTURE_USAGE_CPU_READ_BIT: @@ -2414,7 +2425,7 @@ flags **TextureUsageBits**: :ref:`TextureUsageBits` **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. .. _class_RenderingDevice_constant_TEXTURE_USAGE_CAN_UPDATE_BIT: @@ -2422,7 +2433,7 @@ flags **TextureUsageBits**: :ref:`TextureUsageBits` **TEXTURE_USAGE_CAN_UPDATE_BIT** = ``64`` - +Texture can be updated using :ref:`texture_update`. .. _class_RenderingDevice_constant_TEXTURE_USAGE_CAN_COPY_FROM_BIT: @@ -2430,7 +2441,7 @@ flags **TextureUsageBits**: :ref:`TextureUsageBits` **TEXTURE_USAGE_CAN_COPY_FROM_BIT** = ``128`` - +Texture can be a source for :ref:`texture_copy`. .. _class_RenderingDevice_constant_TEXTURE_USAGE_CAN_COPY_TO_BIT: @@ -2438,7 +2449,7 @@ flags **TextureUsageBits**: :ref:`TextureUsageBits` **TEXTURE_USAGE_CAN_COPY_TO_BIT** = ``256`` - +Texture can be a destination for :ref:`texture_copy`. .. _class_RenderingDevice_constant_TEXTURE_USAGE_INPUT_ATTACHMENT_BIT: @@ -2446,7 +2457,7 @@ flags **TextureUsageBits**: :ref:`TextureUsageBits` **TEXTURE_USAGE_INPUT_ATTACHMENT_BIT** = ``512`` - +Texture can be used as a `input attachment `__ in a framebuffer. .. rst-class:: classref-item-separator @@ -2464,7 +2475,7 @@ enum **TextureSwizzle**: :ref:`TextureSwizzle` **TEXTURE_SWIZZLE_IDENTITY** = ``0`` - +Return the sampled value as-is. .. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_ZERO: @@ -2472,7 +2483,7 @@ enum **TextureSwizzle**: :ref:`TextureSwizzle` **TEXTURE_SWIZZLE_ZERO** = ``1`` - +Always return ``0.0`` when sampling. .. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_ONE: @@ -2480,7 +2491,7 @@ enum **TextureSwizzle**: :ref:`TextureSwizzle` **TEXTURE_SWIZZLE_ONE** = ``2`` - +Always return ``1.0`` when sampling. .. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_R: @@ -2488,7 +2499,7 @@ enum **TextureSwizzle**: :ref:`TextureSwizzle` **TEXTURE_SWIZZLE_R** = ``3`` - +Sample the red color channel. .. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_G: @@ -2496,7 +2507,7 @@ enum **TextureSwizzle**: :ref:`TextureSwizzle` **TEXTURE_SWIZZLE_G** = ``4`` - +Sample the green color channel. .. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_B: @@ -2504,7 +2515,7 @@ enum **TextureSwizzle**: :ref:`TextureSwizzle` **TEXTURE_SWIZZLE_B** = ``5`` - +Sample the blue color channel. .. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_A: @@ -2512,7 +2523,7 @@ enum **TextureSwizzle**: :ref:`TextureSwizzle` **TEXTURE_SWIZZLE_A** = ``6`` - +Sample the alpha channel. .. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_MAX: @@ -2520,7 +2531,7 @@ enum **TextureSwizzle**: :ref:`TextureSwizzle` **TEXTURE_SWIZZLE_MAX** = ``7`` - +Represents the size of the :ref:`TextureSwizzle` enum. .. rst-class:: classref-item-separator @@ -2538,7 +2549,7 @@ enum **TextureSliceType**: :ref:`TextureSliceType` **TEXTURE_SLICE_2D** = ``0`` - +2-dimensional texture slice. .. _class_RenderingDevice_constant_TEXTURE_SLICE_CUBEMAP: @@ -2546,7 +2557,7 @@ enum **TextureSliceType**: :ref:`TextureSliceType` **TEXTURE_SLICE_CUBEMAP** = ``1`` - +Cubemap texture slice. .. _class_RenderingDevice_constant_TEXTURE_SLICE_3D: @@ -2554,7 +2565,7 @@ enum **TextureSliceType**: :ref:`TextureSliceType` **TEXTURE_SLICE_3D** = ``2`` - +3-dimensional texture slice. .. rst-class:: classref-item-separator @@ -2598,7 +2609,7 @@ enum **SamplerRepeatMode**: :ref:`SamplerRepeatMode` **SAMPLER_REPEAT_MODE_REPEAT** = ``0`` - +Sample with repeating enabled. .. _class_RenderingDevice_constant_SAMPLER_REPEAT_MODE_MIRRORED_REPEAT: @@ -2606,7 +2617,7 @@ enum **SamplerRepeatMode**: :ref:`SamplerRepeatMode` **SAMPLER_REPEAT_MODE_MIRRORED_REPEAT** = ``1`` - +Sample with mirrored repeating enabled. When sampling outside the ``[0.0, 1.0]`` range, return a mirrored version of the sampler. This mirrored version is mirrored again if sampling further away, with the pattern repeating indefinitely. .. _class_RenderingDevice_constant_SAMPLER_REPEAT_MODE_CLAMP_TO_EDGE: @@ -2614,7 +2625,7 @@ enum **SamplerRepeatMode**: :ref:`SamplerRepeatMode` **SAMPLER_REPEAT_MODE_CLAMP_TO_EDGE** = ``2`` - +Sample with repeating disabled. When sampling outside the ``[0.0, 1.0]`` range, return the color of the last pixel on the edge. .. _class_RenderingDevice_constant_SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER: @@ -2622,7 +2633,7 @@ enum **SamplerRepeatMode**: :ref:`SamplerRepeatMode` **SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER** = ``3`` - +Sample with repeating disabled. When sampling outside the ``[0.0, 1.0]`` range, return the specified :ref:`RDSamplerState.border_color`. .. _class_RenderingDevice_constant_SAMPLER_REPEAT_MODE_MIRROR_CLAMP_TO_EDGE: @@ -2630,7 +2641,7 @@ enum **SamplerRepeatMode**: :ref:`SamplerRepeatMode` **SAMPLER_REPEAT_MODE_MIRROR_CLAMP_TO_EDGE** = ``4`` - +Sample with mirrored repeating enabled, but only once. When sampling in the ``[-1.0, 0.0]`` range, return a mirrored version of the sampler. When sampling outside the ``[-1.0, 1.0]`` range, return the color of the last pixel on the edge. .. _class_RenderingDevice_constant_SAMPLER_REPEAT_MODE_MAX: @@ -2638,7 +2649,7 @@ enum **SamplerRepeatMode**: :ref:`SamplerRepeatMode` **SAMPLER_REPEAT_MODE_MAX** = ``5`` - +Represents the size of the :ref:`SamplerRepeatMode` enum. .. rst-class:: classref-item-separator @@ -2656,7 +2667,7 @@ enum **SamplerBorderColor**: :ref:`SamplerBorderColor` **SAMPLER_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK** = ``0`` - +Return a floating-point transparent black color when sampling outside the ``[0.0, 1.0]`` range. Only effective if the sampler repeat mode is :ref:`SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER`. .. _class_RenderingDevice_constant_SAMPLER_BORDER_COLOR_INT_TRANSPARENT_BLACK: @@ -2664,7 +2675,7 @@ enum **SamplerBorderColor**: :ref:`SamplerBorderColor` **SAMPLER_BORDER_COLOR_INT_TRANSPARENT_BLACK** = ``1`` - +Return a integer transparent black color when sampling outside the ``[0.0, 1.0]`` range. Only effective if the sampler repeat mode is :ref:`SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER`. .. _class_RenderingDevice_constant_SAMPLER_BORDER_COLOR_FLOAT_OPAQUE_BLACK: @@ -2672,7 +2683,7 @@ enum **SamplerBorderColor**: :ref:`SamplerBorderColor` **SAMPLER_BORDER_COLOR_FLOAT_OPAQUE_BLACK** = ``2`` - +Return a floating-point opaque black color when sampling outside the ``[0.0, 1.0]`` range. Only effective if the sampler repeat mode is :ref:`SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER`. .. _class_RenderingDevice_constant_SAMPLER_BORDER_COLOR_INT_OPAQUE_BLACK: @@ -2680,7 +2691,7 @@ enum **SamplerBorderColor**: :ref:`SamplerBorderColor` **SAMPLER_BORDER_COLOR_INT_OPAQUE_BLACK** = ``3`` - +Return a integer opaque black color when sampling outside the ``[0.0, 1.0]`` range. Only effective if the sampler repeat mode is :ref:`SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER`. .. _class_RenderingDevice_constant_SAMPLER_BORDER_COLOR_FLOAT_OPAQUE_WHITE: @@ -2688,7 +2699,7 @@ enum **SamplerBorderColor**: :ref:`SamplerBorderColor` **SAMPLER_BORDER_COLOR_FLOAT_OPAQUE_WHITE** = ``4`` - +Return a floating-point opaque white color when sampling outside the ``[0.0, 1.0]`` range. Only effective if the sampler repeat mode is :ref:`SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER`. .. _class_RenderingDevice_constant_SAMPLER_BORDER_COLOR_INT_OPAQUE_WHITE: @@ -2696,7 +2707,7 @@ enum **SamplerBorderColor**: :ref:`SamplerBorderColor` **SAMPLER_BORDER_COLOR_INT_OPAQUE_WHITE** = ``5`` - +Return a integer opaque white color when sampling outside the ``[0.0, 1.0]`` range. Only effective if the sampler repeat mode is :ref:`SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER`. .. _class_RenderingDevice_constant_SAMPLER_BORDER_COLOR_MAX: @@ -2704,7 +2715,7 @@ enum **SamplerBorderColor**: :ref:`SamplerBorderColor` **SAMPLER_BORDER_COLOR_MAX** = ``6`` - +Represents the size of the :ref:`SamplerBorderColor` enum. .. rst-class:: classref-item-separator @@ -2722,7 +2733,7 @@ enum **VertexFrequency**: :ref:`VertexFrequency` **VERTEX_FREQUENCY_VERTEX** = ``0`` - +Vertex attribute addressing is a function of the vertex. This is used to specify the rate at which vertex attributes are pulled from buffers. .. _class_RenderingDevice_constant_VERTEX_FREQUENCY_INSTANCE: @@ -2730,7 +2741,7 @@ enum **VertexFrequency**: :ref:`VertexFrequency` **VERTEX_FREQUENCY_INSTANCE** = ``1`` - +Vertex attribute addressing is a function of the instance index. This is used to specify the rate at which vertex attributes are pulled from buffers. .. rst-class:: classref-item-separator @@ -2748,7 +2759,7 @@ enum **IndexBufferFormat**: :ref:`IndexBufferFormat` **INDEX_BUFFER_FORMAT_UINT16** = ``0`` - +Index buffer in 16-bit unsigned integer format. This limits the maximum index that can be specified to ``65535``. .. _class_RenderingDevice_constant_INDEX_BUFFER_FORMAT_UINT32: @@ -2756,7 +2767,7 @@ enum **IndexBufferFormat**: :ref:`IndexBufferFormat` **INDEX_BUFFER_FORMAT_UINT32** = ``1`` - +Index buffer in 32-bit unsigned integer format. This limits the maximum index that can be specified to ``4294967295``. .. rst-class:: classref-item-separator @@ -2792,7 +2803,7 @@ enum **UniformType**: :ref:`UniformType` **UNIFORM_TYPE_SAMPLER** = ``0`` - +Sampler uniform. TODO: Difference between sampler and texture uniform .. _class_RenderingDevice_constant_UNIFORM_TYPE_SAMPLER_WITH_TEXTURE: @@ -2800,7 +2811,7 @@ enum **UniformType**: :ref:`UniformType` **UNIFORM_TYPE_SAMPLER_WITH_TEXTURE** = ``1`` - +Sampler uniform with a texture. .. _class_RenderingDevice_constant_UNIFORM_TYPE_TEXTURE: @@ -2808,7 +2819,7 @@ enum **UniformType**: :ref:`UniformType` **UNIFORM_TYPE_TEXTURE** = ``2`` - +Texture uniform. .. _class_RenderingDevice_constant_UNIFORM_TYPE_IMAGE: @@ -2816,7 +2827,7 @@ enum **UniformType**: :ref:`UniformType` **UNIFORM_TYPE_IMAGE** = ``3`` - +Image uniform. TODO: Difference between texture and image uniform .. _class_RenderingDevice_constant_UNIFORM_TYPE_TEXTURE_BUFFER: @@ -2824,7 +2835,7 @@ enum **UniformType**: :ref:`UniformType` **UNIFORM_TYPE_TEXTURE_BUFFER** = ``4`` - +Texture buffer uniform. TODO: Difference between texture and texture buffe uniformr .. _class_RenderingDevice_constant_UNIFORM_TYPE_SAMPLER_WITH_TEXTURE_BUFFER: @@ -2832,7 +2843,7 @@ enum **UniformType**: :ref:`UniformType` **UNIFORM_TYPE_SAMPLER_WITH_TEXTURE_BUFFER** = ``5`` - +Sampler uniform with a texture buffer. TODO: Difference between texture and texture buffer uniform .. _class_RenderingDevice_constant_UNIFORM_TYPE_IMAGE_BUFFER: @@ -2840,7 +2851,7 @@ enum **UniformType**: :ref:`UniformType` **UNIFORM_TYPE_IMAGE_BUFFER** = ``6`` - +Image buffer uniform. TODO: Difference between texture and image uniforms .. _class_RenderingDevice_constant_UNIFORM_TYPE_UNIFORM_BUFFER: @@ -2848,7 +2859,7 @@ enum **UniformType**: :ref:`UniformType` **UNIFORM_TYPE_UNIFORM_BUFFER** = ``7`` - +Uniform buffer uniform. .. _class_RenderingDevice_constant_UNIFORM_TYPE_STORAGE_BUFFER: @@ -2856,7 +2867,7 @@ enum **UniformType**: :ref:`UniformType` **UNIFORM_TYPE_STORAGE_BUFFER** = ``8`` - +`Storage buffer `__ uniform. .. _class_RenderingDevice_constant_UNIFORM_TYPE_INPUT_ATTACHMENT: @@ -2864,7 +2875,7 @@ enum **UniformType**: :ref:`UniformType` **UNIFORM_TYPE_INPUT_ATTACHMENT** = ``9`` - +Input attachment uniform. .. _class_RenderingDevice_constant_UNIFORM_TYPE_MAX: @@ -2872,7 +2883,7 @@ enum **UniformType**: :ref:`UniformType` **UNIFORM_TYPE_MAX** = ``10`` - +Represents the size of the :ref:`UniformType` enum. .. rst-class:: classref-item-separator @@ -2898,7 +2909,7 @@ Point rendering primitive (with constant size, regardless of distance from camer :ref:`RenderPrimitive` **RENDER_PRIMITIVE_LINES** = ``1`` -Line rendering primitive. +Line list rendering primitive. Lines are drawn separated from each other. .. _class_RenderingDevice_constant_RENDER_PRIMITIVE_LINES_WITH_ADJACENCY: @@ -2906,7 +2917,9 @@ Line rendering primitive. :ref:`RenderPrimitive` **RENDER_PRIMITIVE_LINES_WITH_ADJACENCY** = ``2`` +`Line list rendering primitive with adjacency. `__\ +\ **Note:** Adjacency is only useful with geometry shaders, which Godot does not expose. .. _class_RenderingDevice_constant_RENDER_PRIMITIVE_LINESTRIPS: @@ -2914,7 +2927,7 @@ Line rendering primitive. :ref:`RenderPrimitive` **RENDER_PRIMITIVE_LINESTRIPS** = ``3`` - +Line strip rendering primitive. Lines drawn are connected to the previous vertex. .. _class_RenderingDevice_constant_RENDER_PRIMITIVE_LINESTRIPS_WITH_ADJACENCY: @@ -2922,7 +2935,9 @@ Line rendering primitive. :ref:`RenderPrimitive` **RENDER_PRIMITIVE_LINESTRIPS_WITH_ADJACENCY** = ``4`` +`Line strip rendering primitive with adjacency. `__\ +\ **Note:** Adjacency is only useful with geometry shaders, which Godot does not expose. .. _class_RenderingDevice_constant_RENDER_PRIMITIVE_TRIANGLES: @@ -2930,7 +2945,7 @@ Line rendering primitive. :ref:`RenderPrimitive` **RENDER_PRIMITIVE_TRIANGLES** = ``5`` - +Triangle list rendering primitive. Triangles are drawn separated from each other. .. _class_RenderingDevice_constant_RENDER_PRIMITIVE_TRIANGLES_WITH_ADJACENCY: @@ -2938,7 +2953,9 @@ Line rendering primitive. :ref:`RenderPrimitive` **RENDER_PRIMITIVE_TRIANGLES_WITH_ADJACENCY** = ``6`` +`Triangle list rendering primitive with adjacency. `__\ + **Note:** Adjacency is only useful with geometry shaders, which Godot does not expose. .. _class_RenderingDevice_constant_RENDER_PRIMITIVE_TRIANGLE_STRIPS: @@ -2946,7 +2963,7 @@ Line rendering primitive. :ref:`RenderPrimitive` **RENDER_PRIMITIVE_TRIANGLE_STRIPS** = ``7`` - +Triangle strip rendering primitive. Triangles drawn are connected to the previous triangle. .. _class_RenderingDevice_constant_RENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_AJACENCY: @@ -2954,7 +2971,9 @@ Line rendering primitive. :ref:`RenderPrimitive` **RENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_AJACENCY** = ``8`` +`Triangle strip rendering primitive with adjacency. `__\ +\ **Note:** Adjacency is only useful with geometry shaders, which Godot does not expose. .. _class_RenderingDevice_constant_RENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_RESTART_INDEX: @@ -2962,7 +2981,9 @@ Line rendering primitive. :ref:`RenderPrimitive` **RENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_RESTART_INDEX** = ``9`` +Triangle strip rendering primitive with *primitive restart* enabled. Triangles drawn are connected to the previous triangle, but a primitive restart index can be specified before drawing to create a second triangle strip after the specified index. +\ **Note:** Only compatible with indexed draws. .. _class_RenderingDevice_constant_RENDER_PRIMITIVE_TESSELATION_PATCH: @@ -2970,7 +2991,7 @@ Line rendering primitive. :ref:`RenderPrimitive` **RENDER_PRIMITIVE_TESSELATION_PATCH** = ``10`` - +Tessellation patch rendering primitive. Only useful with tessellation shaders, which can be used to deform these patches. .. _class_RenderingDevice_constant_RENDER_PRIMITIVE_MAX: @@ -2978,7 +2999,7 @@ Line rendering primitive. :ref:`RenderPrimitive` **RENDER_PRIMITIVE_MAX** = ``11`` - +Represents the size of the :ref:`RenderPrimitive` enum. .. rst-class:: classref-item-separator @@ -2996,7 +3017,7 @@ enum **PolygonCullMode**: :ref:`PolygonCullMode` **POLYGON_CULL_DISABLED** = ``0`` - +Do not use polygon front face or backface culling. .. _class_RenderingDevice_constant_POLYGON_CULL_FRONT: @@ -3004,7 +3025,7 @@ enum **PolygonCullMode**: :ref:`PolygonCullMode` **POLYGON_CULL_FRONT** = ``1`` - +Use polygon frontface culling (faces pointing towards the camera are hidden). .. _class_RenderingDevice_constant_POLYGON_CULL_BACK: @@ -3012,7 +3033,7 @@ enum **PolygonCullMode**: :ref:`PolygonCullMode` **POLYGON_CULL_BACK** = ``2`` - +Use polygon backface culling (faces pointing away from the camera are hidden). .. rst-class:: classref-item-separator @@ -3030,7 +3051,7 @@ enum **PolygonFrontFace**: :ref:`PolygonFrontFace` **POLYGON_FRONT_FACE_CLOCKWISE** = ``0`` - +Clockwise winding order to determine which face of a polygon is its front face. .. _class_RenderingDevice_constant_POLYGON_FRONT_FACE_COUNTER_CLOCKWISE: @@ -3038,7 +3059,7 @@ enum **PolygonFrontFace**: :ref:`PolygonFrontFace` **POLYGON_FRONT_FACE_COUNTER_CLOCKWISE** = ``1`` - +Counter-clockwise winding order to determine which face of a polygon is its front face. .. rst-class:: classref-item-separator @@ -3056,7 +3077,7 @@ enum **StencilOperation**: :ref:`StencilOperation` **STENCIL_OP_KEEP** = ``0`` - +Keep the current stencil value. .. _class_RenderingDevice_constant_STENCIL_OP_ZERO: @@ -3064,7 +3085,7 @@ enum **StencilOperation**: :ref:`StencilOperation` **STENCIL_OP_ZERO** = ``1`` - +Set the stencil value to ``0``. .. _class_RenderingDevice_constant_STENCIL_OP_REPLACE: @@ -3072,7 +3093,7 @@ enum **StencilOperation**: :ref:`StencilOperation` **STENCIL_OP_REPLACE** = ``2`` - +Replace the existing stencil value with the new one. .. _class_RenderingDevice_constant_STENCIL_OP_INCREMENT_AND_CLAMP: @@ -3080,7 +3101,7 @@ enum **StencilOperation**: :ref:`StencilOperation` **STENCIL_OP_INCREMENT_AND_CLAMP** = ``3`` - +Increment the existing stencil value and clamp to the maximum representable unsigned value if reached. Stencil bits are considered as an unsigned integer. .. _class_RenderingDevice_constant_STENCIL_OP_DECREMENT_AND_CLAMP: @@ -3088,7 +3109,7 @@ enum **StencilOperation**: :ref:`StencilOperation` **STENCIL_OP_DECREMENT_AND_CLAMP** = ``4`` - +Decrement the existing stencil value and clamp to the minimum value if reached. Stencil bits are considered as an unsigned integer. .. _class_RenderingDevice_constant_STENCIL_OP_INVERT: @@ -3096,7 +3117,7 @@ enum **StencilOperation**: :ref:`StencilOperation` **STENCIL_OP_INVERT** = ``5`` - +Bitwise-invert the existing stencil value. .. _class_RenderingDevice_constant_STENCIL_OP_INCREMENT_AND_WRAP: @@ -3104,7 +3125,7 @@ enum **StencilOperation**: :ref:`StencilOperation` **STENCIL_OP_INCREMENT_AND_WRAP** = ``6`` - +Increment the stencil value and wrap around to ``0`` if reaching the maximum representable unsigned. Stencil bits are considered as an unsigned integer. .. _class_RenderingDevice_constant_STENCIL_OP_DECREMENT_AND_WRAP: @@ -3112,7 +3133,7 @@ enum **StencilOperation**: :ref:`StencilOperation` **STENCIL_OP_DECREMENT_AND_WRAP** = ``7`` - +Decrement the stencil value and wrap around to the maximum representable unsigned if reaching the minimum. Stencil bits are considered as an unsigned integer. .. _class_RenderingDevice_constant_STENCIL_OP_MAX: @@ -3120,7 +3141,7 @@ enum **StencilOperation**: :ref:`StencilOperation` **STENCIL_OP_MAX** = ``8`` - +Represents the size of the :ref:`StencilOperation` enum. .. rst-class:: classref-item-separator @@ -3138,7 +3159,7 @@ enum **CompareOperator**: :ref:`CompareOperator` **COMPARE_OP_NEVER** = ``0`` - +"Never" comparison (opposite of :ref:`COMPARE_OP_ALWAYS`). .. _class_RenderingDevice_constant_COMPARE_OP_LESS: @@ -3146,7 +3167,7 @@ enum **CompareOperator**: :ref:`CompareOperator` **COMPARE_OP_LESS** = ``1`` - +"Less than" comparison. .. _class_RenderingDevice_constant_COMPARE_OP_EQUAL: @@ -3154,7 +3175,7 @@ enum **CompareOperator**: :ref:`CompareOperator` **COMPARE_OP_EQUAL** = ``2`` - +"Equal" comparison. .. _class_RenderingDevice_constant_COMPARE_OP_LESS_OR_EQUAL: @@ -3162,7 +3183,7 @@ enum **CompareOperator**: :ref:`CompareOperator` **COMPARE_OP_LESS_OR_EQUAL** = ``3`` - +"Less than or equal" comparison. .. _class_RenderingDevice_constant_COMPARE_OP_GREATER: @@ -3170,7 +3191,7 @@ enum **CompareOperator**: :ref:`CompareOperator` **COMPARE_OP_GREATER** = ``4`` - +"Greater than" comparison. .. _class_RenderingDevice_constant_COMPARE_OP_NOT_EQUAL: @@ -3178,7 +3199,7 @@ enum **CompareOperator**: :ref:`CompareOperator` **COMPARE_OP_NOT_EQUAL** = ``5`` - +"Not equal" comparison. .. _class_RenderingDevice_constant_COMPARE_OP_GREATER_OR_EQUAL: @@ -3186,7 +3207,7 @@ enum **CompareOperator**: :ref:`CompareOperator` **COMPARE_OP_GREATER_OR_EQUAL** = ``6`` - +"Greater than or equal" comparison. .. _class_RenderingDevice_constant_COMPARE_OP_ALWAYS: @@ -3194,7 +3215,7 @@ enum **CompareOperator**: :ref:`CompareOperator` **COMPARE_OP_ALWAYS** = ``7`` - +"Always" comparison (opposite of :ref:`COMPARE_OP_NEVER`). .. _class_RenderingDevice_constant_COMPARE_OP_MAX: @@ -3202,7 +3223,7 @@ enum **CompareOperator**: :ref:`CompareOperator` **COMPARE_OP_MAX** = ``8`` - +Represents the size of the :ref:`CompareOperator` enum. .. rst-class:: classref-item-separator @@ -3220,7 +3241,7 @@ enum **LogicOperation**: :ref:`LogicOperation` **LOGIC_OP_CLEAR** = ``0`` - +Clear logic operation (result is always ``0``). See also :ref:`LOGIC_OP_SET`. .. _class_RenderingDevice_constant_LOGIC_OP_AND: @@ -3228,7 +3249,7 @@ enum **LogicOperation**: :ref:`LogicOperation` **LOGIC_OP_AND** = ``1`` - +AND logic operation. .. _class_RenderingDevice_constant_LOGIC_OP_AND_REVERSE: @@ -3236,7 +3257,7 @@ enum **LogicOperation**: :ref:`LogicOperation` **LOGIC_OP_AND_REVERSE** = ``2`` - +AND logic operation with the *destination* operand being inverted. See also :ref:`LOGIC_OP_AND_INVERTED`. .. _class_RenderingDevice_constant_LOGIC_OP_COPY: @@ -3244,7 +3265,7 @@ enum **LogicOperation**: :ref:`LogicOperation` **LOGIC_OP_COPY** = ``3`` - +Copy logic operation (keeps the *source* value as-is). See also :ref:`LOGIC_OP_COPY_INVERTED` and :ref:`LOGIC_OP_NO_OP`. .. _class_RenderingDevice_constant_LOGIC_OP_AND_INVERTED: @@ -3252,7 +3273,7 @@ enum **LogicOperation**: :ref:`LogicOperation` **LOGIC_OP_AND_INVERTED** = ``4`` - +AND logic operation with the *source* operand being inverted. See also :ref:`LOGIC_OP_AND_REVERSE`. .. _class_RenderingDevice_constant_LOGIC_OP_NO_OP: @@ -3260,7 +3281,7 @@ enum **LogicOperation**: :ref:`LogicOperation` **LOGIC_OP_NO_OP** = ``5`` - +No-op logic operation (keeps the *destination* value as-is). See also :ref:`LOGIC_OP_COPY`. .. _class_RenderingDevice_constant_LOGIC_OP_XOR: @@ -3276,7 +3297,7 @@ Exclusive or (XOR) logic operation. :ref:`LogicOperation` **LOGIC_OP_OR** = ``7`` - +OR logic operation. .. _class_RenderingDevice_constant_LOGIC_OP_NOR: @@ -3284,7 +3305,7 @@ Exclusive or (XOR) logic operation. :ref:`LogicOperation` **LOGIC_OP_NOR** = ``8`` - +Not-OR (NOR) logic operation. .. _class_RenderingDevice_constant_LOGIC_OP_EQUIVALENT: @@ -3292,7 +3313,7 @@ Exclusive or (XOR) logic operation. :ref:`LogicOperation` **LOGIC_OP_EQUIVALENT** = ``9`` - +Not-XOR (XNOR) logic operation. .. _class_RenderingDevice_constant_LOGIC_OP_INVERT: @@ -3300,7 +3321,7 @@ Exclusive or (XOR) logic operation. :ref:`LogicOperation` **LOGIC_OP_INVERT** = ``10`` - +Invert logic operation. .. _class_RenderingDevice_constant_LOGIC_OP_OR_REVERSE: @@ -3308,7 +3329,7 @@ Exclusive or (XOR) logic operation. :ref:`LogicOperation` **LOGIC_OP_OR_REVERSE** = ``11`` - +OR logic operation with the *destination* operand being inverted. See also :ref:`LOGIC_OP_OR_REVERSE`. .. _class_RenderingDevice_constant_LOGIC_OP_COPY_INVERTED: @@ -3316,7 +3337,7 @@ Exclusive or (XOR) logic operation. :ref:`LogicOperation` **LOGIC_OP_COPY_INVERTED** = ``12`` - +NOT logic operation (inverts the value). See also :ref:`LOGIC_OP_COPY`. .. _class_RenderingDevice_constant_LOGIC_OP_OR_INVERTED: @@ -3324,7 +3345,7 @@ Exclusive or (XOR) logic operation. :ref:`LogicOperation` **LOGIC_OP_OR_INVERTED** = ``13`` - +OR logic operation with the *source* operand being inverted. See also :ref:`LOGIC_OP_OR_REVERSE`. .. _class_RenderingDevice_constant_LOGIC_OP_NAND: @@ -3332,7 +3353,7 @@ Exclusive or (XOR) logic operation. :ref:`LogicOperation` **LOGIC_OP_NAND** = ``14`` - +Not-AND (NAND) logic operation. .. _class_RenderingDevice_constant_LOGIC_OP_SET: @@ -3340,7 +3361,7 @@ Exclusive or (XOR) logic operation. :ref:`LogicOperation` **LOGIC_OP_SET** = ``15`` - +SET logic operation (result is always ``1``). See also :ref:`LOGIC_OP_CLEAR`. .. _class_RenderingDevice_constant_LOGIC_OP_MAX: @@ -3348,7 +3369,7 @@ Exclusive or (XOR) logic operation. :ref:`LogicOperation` **LOGIC_OP_MAX** = ``16`` - +Represents the size of the :ref:`LogicOperation` enum. .. rst-class:: classref-item-separator @@ -3366,7 +3387,7 @@ enum **BlendFactor**: :ref:`BlendFactor` **BLEND_FACTOR_ZERO** = ``0`` - +Constant ``0.0`` blend factor. .. _class_RenderingDevice_constant_BLEND_FACTOR_ONE: @@ -3374,7 +3395,7 @@ enum **BlendFactor**: :ref:`BlendFactor` **BLEND_FACTOR_ONE** = ``1`` - +Constant ``1.0`` blend factor. .. _class_RenderingDevice_constant_BLEND_FACTOR_SRC_COLOR: @@ -3382,7 +3403,7 @@ enum **BlendFactor**: :ref:`BlendFactor` **BLEND_FACTOR_SRC_COLOR** = ``2`` - +Color blend factor is ``source color``. Alpha blend factor is ``source alpha``. .. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_SRC_COLOR: @@ -3390,7 +3411,7 @@ enum **BlendFactor**: :ref:`BlendFactor` **BLEND_FACTOR_ONE_MINUS_SRC_COLOR** = ``3`` - +Color blend factor is ``1.0 - source color``. Alpha blend factor is ``1.0 - source alpha``. .. _class_RenderingDevice_constant_BLEND_FACTOR_DST_COLOR: @@ -3398,7 +3419,7 @@ enum **BlendFactor**: :ref:`BlendFactor` **BLEND_FACTOR_DST_COLOR** = ``4`` - +Color blend factor is ``destination color``. Alpha blend factor is ``destination alpha``. .. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_DST_COLOR: @@ -3406,7 +3427,7 @@ enum **BlendFactor**: :ref:`BlendFactor` **BLEND_FACTOR_ONE_MINUS_DST_COLOR** = ``5`` - +Color blend factor is ``1.0 - destination color``. Alpha blend factor is ``1.0 - destination alpha``. .. _class_RenderingDevice_constant_BLEND_FACTOR_SRC_ALPHA: @@ -3414,7 +3435,7 @@ enum **BlendFactor**: :ref:`BlendFactor` **BLEND_FACTOR_SRC_ALPHA** = ``6`` - +Color and alpha blend factor is ``source alpha``. .. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA: @@ -3422,7 +3443,7 @@ enum **BlendFactor**: :ref:`BlendFactor` **BLEND_FACTOR_ONE_MINUS_SRC_ALPHA** = ``7`` - +Color and alpha blend factor is ``1.0 - source alpha``. .. _class_RenderingDevice_constant_BLEND_FACTOR_DST_ALPHA: @@ -3430,7 +3451,7 @@ enum **BlendFactor**: :ref:`BlendFactor` **BLEND_FACTOR_DST_ALPHA** = ``8`` - +Color and alpha blend factor is ``destination alpha``. .. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_DST_ALPHA: @@ -3438,7 +3459,7 @@ enum **BlendFactor**: :ref:`BlendFactor` **BLEND_FACTOR_ONE_MINUS_DST_ALPHA** = ``9`` - +Color and alpha blend factor is ``1.0 - destination alpha``. .. _class_RenderingDevice_constant_BLEND_FACTOR_CONSTANT_COLOR: @@ -3446,7 +3467,7 @@ enum **BlendFactor**: :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`). .. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR: @@ -3454,7 +3475,7 @@ enum **BlendFactor**: :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`). .. _class_RenderingDevice_constant_BLEND_FACTOR_CONSTANT_ALPHA: @@ -3462,7 +3483,7 @@ enum **BlendFactor**: :ref:`BlendFactor` **BLEND_FACTOR_CONSTANT_ALPHA** = ``12`` - +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: @@ -3470,7 +3491,7 @@ enum **BlendFactor**: :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`). .. _class_RenderingDevice_constant_BLEND_FACTOR_SRC_ALPHA_SATURATE: @@ -3478,7 +3499,7 @@ enum **BlendFactor**: :ref:`BlendFactor` **BLEND_FACTOR_SRC_ALPHA_SATURATE** = ``14`` - +Color blend factor is ``min(source alpha, 1.0 - destination alpha)``. Alpha blend factor is ``1.0``. .. _class_RenderingDevice_constant_BLEND_FACTOR_SRC1_COLOR: @@ -3486,7 +3507,7 @@ enum **BlendFactor**: :ref:`BlendFactor` **BLEND_FACTOR_SRC1_COLOR** = ``15`` - +Color blend factor is ``second source color``. Alpha blend factor is ``second source alpha``. Only relevant for dual-source blending. .. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR: @@ -3494,7 +3515,7 @@ enum **BlendFactor**: :ref:`BlendFactor` **BLEND_FACTOR_ONE_MINUS_SRC1_COLOR** = ``16`` - +Color blend factor is ``1.0 - second source color``. Alpha blend factor is ``1.0 - second source alpha``. Only relevant for dual-source blending. .. _class_RenderingDevice_constant_BLEND_FACTOR_SRC1_ALPHA: @@ -3502,7 +3523,7 @@ enum **BlendFactor**: :ref:`BlendFactor` **BLEND_FACTOR_SRC1_ALPHA** = ``17`` - +Color and alpha blend factor is ``second source alpha``. Only relevant for dual-source blending. .. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA: @@ -3510,7 +3531,7 @@ enum **BlendFactor**: :ref:`BlendFactor` **BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA** = ``18`` - +Color and alpha blend factor is ``1.0 - second source alpha``. Only relevant for dual-source blending. .. _class_RenderingDevice_constant_BLEND_FACTOR_MAX: @@ -3518,7 +3539,7 @@ enum **BlendFactor**: :ref:`BlendFactor` **BLEND_FACTOR_MAX** = ``19`` - +Represents the size of the :ref:`BlendFactor` enum. .. rst-class:: classref-item-separator @@ -3660,7 +3681,7 @@ enum **InitialAction**: :ref:`InitialAction` **INITIAL_ACTION_CLEAR** = ``0`` - +Start rendering and clear the whole framebuffer. .. _class_RenderingDevice_constant_INITIAL_ACTION_CLEAR_REGION: @@ -3668,7 +3689,7 @@ enum **InitialAction**: :ref:`InitialAction` **INITIAL_ACTION_CLEAR_REGION** = ``1`` - +Start rendering and clear the framebuffer in the specified region. .. _class_RenderingDevice_constant_INITIAL_ACTION_CLEAR_REGION_CONTINUE: @@ -3676,7 +3697,7 @@ enum **InitialAction**: :ref:`InitialAction` **INITIAL_ACTION_CLEAR_REGION_CONTINUE** = ``2`` - +Continue rendering and clear the framebuffer in the specified region. Framebuffer must have been left in :ref:`FINAL_ACTION_CONTINUE` state as the final action previously. .. _class_RenderingDevice_constant_INITIAL_ACTION_KEEP: @@ -3684,7 +3705,7 @@ enum **InitialAction**: :ref:`InitialAction` **INITIAL_ACTION_KEEP** = ``3`` - +Start rendering, but keep attached color texture contents. If the framebuffer was previously used to read in a shader, this will automatically insert a layout transition. .. _class_RenderingDevice_constant_INITIAL_ACTION_DROP: @@ -3692,7 +3713,7 @@ enum **InitialAction**: :ref:`InitialAction` **INITIAL_ACTION_DROP** = ``4`` - +Start rendering, ignore what is there; write above it. In general, this is the fastest option when you will be writing every single pixel and you don't need a clear color. .. _class_RenderingDevice_constant_INITIAL_ACTION_CONTINUE: @@ -3700,7 +3721,7 @@ enum **InitialAction**: :ref:`InitialAction` **INITIAL_ACTION_CONTINUE** = ``5`` - +Continue rendering. Framebuffer must have been left in :ref:`FINAL_ACTION_CONTINUE` state as the final action previously. .. _class_RenderingDevice_constant_INITIAL_ACTION_MAX: @@ -3708,7 +3729,7 @@ enum **InitialAction**: :ref:`InitialAction` **INITIAL_ACTION_MAX** = ``6`` - +Represents the size of the :ref:`InitialAction` enum. .. rst-class:: classref-item-separator @@ -3726,7 +3747,7 @@ enum **FinalAction**: :ref:`FinalAction` **FINAL_ACTION_READ** = ``0`` - +Store the texture for reading and make it read-only if it has the :ref:`TEXTURE_USAGE_SAMPLING_BIT` bit (only applies to color, depth and stencil attachments). .. _class_RenderingDevice_constant_FINAL_ACTION_DISCARD: @@ -3734,7 +3755,7 @@ enum **FinalAction**: :ref:`FinalAction` **FINAL_ACTION_DISCARD** = ``1`` - +Discard the texture data and make it read-only if it has the :ref:`TEXTURE_USAGE_SAMPLING_BIT` bit (only applies to color, depth and stencil attachments). .. _class_RenderingDevice_constant_FINAL_ACTION_CONTINUE: @@ -3742,7 +3763,7 @@ enum **FinalAction**: :ref:`FinalAction` **FINAL_ACTION_CONTINUE** = ``2`` - +Store the texture and continue for further processing. Similar to :ref:`FINAL_ACTION_READ`, but does not make the texture read-only if it has the :ref:`TEXTURE_USAGE_SAMPLING_BIT` bit. .. _class_RenderingDevice_constant_FINAL_ACTION_MAX: @@ -3750,7 +3771,7 @@ enum **FinalAction**: :ref:`FinalAction` **FINAL_ACTION_MAX** = ``3`` - +Represents the size of the :ref:`FinalAction` enum. .. rst-class:: classref-item-separator @@ -3768,7 +3789,7 @@ enum **ShaderStage**: :ref:`ShaderStage` **SHADER_STAGE_VERTEX** = ``0`` - +Vertex shader stage. This can be used to manipulate vertices from a shader (but not create new vertices). .. _class_RenderingDevice_constant_SHADER_STAGE_FRAGMENT: @@ -3776,7 +3797,7 @@ enum **ShaderStage**: :ref:`ShaderStage` **SHADER_STAGE_FRAGMENT** = ``1`` - +Fragment shader stage (called "pixel shader" in Direct3D). This can be used to manipulate pixels from a shader. .. _class_RenderingDevice_constant_SHADER_STAGE_TESSELATION_CONTROL: @@ -3784,7 +3805,7 @@ enum **ShaderStage**: :ref:`ShaderStage` **SHADER_STAGE_TESSELATION_CONTROL** = ``2`` - +Tessellation control shader stage. This can be used to create additional geometry from a shader. .. _class_RenderingDevice_constant_SHADER_STAGE_TESSELATION_EVALUATION: @@ -3792,7 +3813,7 @@ enum **ShaderStage**: :ref:`ShaderStage` **SHADER_STAGE_TESSELATION_EVALUATION** = ``3`` - +Tessellation evaluation shader stage. This can be used to create additional geometry from a shader. .. _class_RenderingDevice_constant_SHADER_STAGE_COMPUTE: @@ -3800,7 +3821,7 @@ enum **ShaderStage**: :ref:`ShaderStage` **SHADER_STAGE_COMPUTE** = ``4`` - +Compute shader stage. This can be used to run arbitrary computing tasks in a shader, performing them on the GPU instead of the CPU. .. _class_RenderingDevice_constant_SHADER_STAGE_MAX: @@ -3808,7 +3829,7 @@ enum **ShaderStage**: :ref:`ShaderStage` **SHADER_STAGE_MAX** = ``5`` - +Represents the size of the :ref:`ShaderStage` enum. .. _class_RenderingDevice_constant_SHADER_STAGE_VERTEX_BIT: @@ -3816,7 +3837,7 @@ enum **ShaderStage**: :ref:`ShaderStage` **SHADER_STAGE_VERTEX_BIT** = ``1`` - +Vertex shader stage bit (see also :ref:`SHADER_STAGE_VERTEX`). .. _class_RenderingDevice_constant_SHADER_STAGE_FRAGMENT_BIT: @@ -3824,7 +3845,7 @@ enum **ShaderStage**: :ref:`ShaderStage` **SHADER_STAGE_FRAGMENT_BIT** = ``2`` - +Fragment shader stage bit (see also :ref:`SHADER_STAGE_FRAGMENT`). .. _class_RenderingDevice_constant_SHADER_STAGE_TESSELATION_CONTROL_BIT: @@ -3832,7 +3853,7 @@ enum **ShaderStage**: :ref:`ShaderStage` **SHADER_STAGE_TESSELATION_CONTROL_BIT** = ``4`` - +Tessellation control shader stage bit (see also :ref:`SHADER_STAGE_TESSELATION_CONTROL`). .. _class_RenderingDevice_constant_SHADER_STAGE_TESSELATION_EVALUATION_BIT: @@ -3840,7 +3861,7 @@ enum **ShaderStage**: :ref:`ShaderStage` **SHADER_STAGE_TESSELATION_EVALUATION_BIT** = ``8`` - +Tessellation evaluation shader stage bit (see also :ref:`SHADER_STAGE_TESSELATION_EVALUATION`). .. _class_RenderingDevice_constant_SHADER_STAGE_COMPUTE_BIT: @@ -3848,7 +3869,7 @@ enum **ShaderStage**: :ref:`ShaderStage` **SHADER_STAGE_COMPUTE_BIT** = ``16`` - +Compute shader stage bit (see also :ref:`SHADER_STAGE_COMPUTE`). .. rst-class:: classref-item-separator @@ -3866,7 +3887,7 @@ enum **ShaderLanguage**: :ref:`ShaderLanguage` **SHADER_LANGUAGE_GLSL** = ``0`` - +Khronos' GLSL shading language (used natively by OpenGL and Vulkan). This is the language used for core Godot shaders. .. _class_RenderingDevice_constant_SHADER_LANGUAGE_HLSL: @@ -3874,7 +3895,7 @@ enum **ShaderLanguage**: :ref:`ShaderLanguage` **SHADER_LANGUAGE_HLSL** = ``1`` - +Microsoft's High-Level Shading Language (used natively by Direct3D, but can also be used in Vulkan). .. rst-class:: classref-item-separator @@ -3892,7 +3913,7 @@ enum **PipelineSpecializationConstantType**: :ref:`PipelineSpecializationConstantType` **PIPELINE_SPECIALIZATION_CONSTANT_TYPE_BOOL** = ``0`` - +Boolean specialization constant. .. _class_RenderingDevice_constant_PIPELINE_SPECIALIZATION_CONSTANT_TYPE_INT: @@ -3900,7 +3921,7 @@ enum **PipelineSpecializationConstantType**: :ref:`PipelineSpecializationConstantType` **PIPELINE_SPECIALIZATION_CONSTANT_TYPE_INT** = ``1`` - +Integer specialization constant. .. _class_RenderingDevice_constant_PIPELINE_SPECIALIZATION_CONSTANT_TYPE_FLOAT: @@ -3908,7 +3929,7 @@ enum **PipelineSpecializationConstantType**: :ref:`PipelineSpecializationConstantType` **PIPELINE_SPECIALIZATION_CONSTANT_TYPE_FLOAT** = ``2`` - +Floating-point specialization constant. .. rst-class:: classref-item-separator @@ -3926,7 +3947,7 @@ enum **Limit**: :ref:`Limit` **LIMIT_MAX_BOUND_UNIFORM_SETS** = ``0`` - +Maximum number of uniform sets that can be bound at a given time. .. _class_RenderingDevice_constant_LIMIT_MAX_FRAMEBUFFER_COLOR_ATTACHMENTS: @@ -3934,7 +3955,7 @@ enum **Limit**: :ref:`Limit` **LIMIT_MAX_FRAMEBUFFER_COLOR_ATTACHMENTS** = ``1`` - +Maximum number of color framebuffer attachments that can be used at a given time. .. _class_RenderingDevice_constant_LIMIT_MAX_TEXTURES_PER_UNIFORM_SET: @@ -3942,7 +3963,7 @@ enum **Limit**: :ref:`Limit` **LIMIT_MAX_TEXTURES_PER_UNIFORM_SET** = ``2`` - +Maximum number of textures that can be used per uniform set. .. _class_RenderingDevice_constant_LIMIT_MAX_SAMPLERS_PER_UNIFORM_SET: @@ -3950,7 +3971,7 @@ enum **Limit**: :ref:`Limit` **LIMIT_MAX_SAMPLERS_PER_UNIFORM_SET** = ``3`` - +Maximum number of samplers that can be used per uniform set. .. _class_RenderingDevice_constant_LIMIT_MAX_STORAGE_BUFFERS_PER_UNIFORM_SET: @@ -3958,7 +3979,7 @@ enum **Limit**: :ref:`Limit` **LIMIT_MAX_STORAGE_BUFFERS_PER_UNIFORM_SET** = ``4`` - +Maximum number of `storage buffers `__ per uniform set. .. _class_RenderingDevice_constant_LIMIT_MAX_STORAGE_IMAGES_PER_UNIFORM_SET: @@ -3966,7 +3987,7 @@ enum **Limit**: :ref:`Limit` **LIMIT_MAX_STORAGE_IMAGES_PER_UNIFORM_SET** = ``5`` - +Maximum number of storage images per uniform set. .. _class_RenderingDevice_constant_LIMIT_MAX_UNIFORM_BUFFERS_PER_UNIFORM_SET: @@ -3974,7 +3995,7 @@ enum **Limit**: :ref:`Limit` **LIMIT_MAX_UNIFORM_BUFFERS_PER_UNIFORM_SET** = ``6`` - +Maximum number of uniform buffers per uniform set. .. _class_RenderingDevice_constant_LIMIT_MAX_DRAW_INDEXED_INDEX: @@ -3982,7 +4003,7 @@ enum **Limit**: :ref:`Limit` **LIMIT_MAX_DRAW_INDEXED_INDEX** = ``7`` - +Maximum index for an indexed draw command. .. _class_RenderingDevice_constant_LIMIT_MAX_FRAMEBUFFER_HEIGHT: @@ -3990,7 +4011,7 @@ enum **Limit**: :ref:`Limit` **LIMIT_MAX_FRAMEBUFFER_HEIGHT** = ``8`` - +Maximum height of a framebuffer (in pixels). .. _class_RenderingDevice_constant_LIMIT_MAX_FRAMEBUFFER_WIDTH: @@ -3998,7 +4019,7 @@ enum **Limit**: :ref:`Limit` **LIMIT_MAX_FRAMEBUFFER_WIDTH** = ``9`` - +Maximum width of a framebuffer (in pixels). .. _class_RenderingDevice_constant_LIMIT_MAX_TEXTURE_ARRAY_LAYERS: @@ -4006,7 +4027,7 @@ enum **Limit**: :ref:`Limit` **LIMIT_MAX_TEXTURE_ARRAY_LAYERS** = ``10`` - +Maximum number of texture array layers. .. _class_RenderingDevice_constant_LIMIT_MAX_TEXTURE_SIZE_1D: @@ -4046,7 +4067,7 @@ Maximum supported cubemap texture size (in pixels on a single axis of a single f :ref:`Limit` **LIMIT_MAX_TEXTURES_PER_SHADER_STAGE** = ``15`` - +Maximum number of textures per shader stage. .. _class_RenderingDevice_constant_LIMIT_MAX_SAMPLERS_PER_SHADER_STAGE: @@ -4054,7 +4075,7 @@ Maximum supported cubemap texture size (in pixels on a single axis of a single f :ref:`Limit` **LIMIT_MAX_SAMPLERS_PER_SHADER_STAGE** = ``16`` - +Maximum number of samplers per shader stage. .. _class_RenderingDevice_constant_LIMIT_MAX_STORAGE_BUFFERS_PER_SHADER_STAGE: @@ -4062,7 +4083,7 @@ Maximum supported cubemap texture size (in pixels on a single axis of a single f :ref:`Limit` **LIMIT_MAX_STORAGE_BUFFERS_PER_SHADER_STAGE** = ``17`` - +Maximum number of `storage buffers `__ per shader stage. .. _class_RenderingDevice_constant_LIMIT_MAX_STORAGE_IMAGES_PER_SHADER_STAGE: @@ -4070,7 +4091,7 @@ Maximum supported cubemap texture size (in pixels on a single axis of a single f :ref:`Limit` **LIMIT_MAX_STORAGE_IMAGES_PER_SHADER_STAGE** = ``18`` - +Maximum number of storage images per shader stage. .. _class_RenderingDevice_constant_LIMIT_MAX_UNIFORM_BUFFERS_PER_SHADER_STAGE: @@ -4078,7 +4099,7 @@ Maximum supported cubemap texture size (in pixels on a single axis of a single f :ref:`Limit` **LIMIT_MAX_UNIFORM_BUFFERS_PER_SHADER_STAGE** = ``19`` - +Maximum number of uniform buffers per uniform set. .. _class_RenderingDevice_constant_LIMIT_MAX_PUSH_CONSTANT_SIZE: @@ -4086,7 +4107,7 @@ Maximum supported cubemap texture size (in pixels on a single axis of a single f :ref:`Limit` **LIMIT_MAX_PUSH_CONSTANT_SIZE** = ``20`` - +Maximum size of a push constant. A lot of devices are limited to 128 bytes, so try to avoid exceeding 128 bytes in push constants to ensure compatibility even if your GPU is reporting a higher value. .. _class_RenderingDevice_constant_LIMIT_MAX_UNIFORM_BUFFER_SIZE: @@ -4094,7 +4115,7 @@ Maximum supported cubemap texture size (in pixels on a single axis of a single f :ref:`Limit` **LIMIT_MAX_UNIFORM_BUFFER_SIZE** = ``21`` - +Maximum size of a uniform buffer. .. _class_RenderingDevice_constant_LIMIT_MAX_VERTEX_INPUT_ATTRIBUTE_OFFSET: @@ -4102,7 +4123,7 @@ Maximum supported cubemap texture size (in pixels on a single axis of a single f :ref:`Limit` **LIMIT_MAX_VERTEX_INPUT_ATTRIBUTE_OFFSET** = ``22`` - +Maximum vertex input attribute offset. .. _class_RenderingDevice_constant_LIMIT_MAX_VERTEX_INPUT_ATTRIBUTES: @@ -4110,7 +4131,7 @@ Maximum supported cubemap texture size (in pixels on a single axis of a single f :ref:`Limit` **LIMIT_MAX_VERTEX_INPUT_ATTRIBUTES** = ``23`` - +Maximum number of vertex input attributes. .. _class_RenderingDevice_constant_LIMIT_MAX_VERTEX_INPUT_BINDINGS: @@ -4118,7 +4139,7 @@ Maximum supported cubemap texture size (in pixels on a single axis of a single f :ref:`Limit` **LIMIT_MAX_VERTEX_INPUT_BINDINGS** = ``24`` - +Maximum number of vertex input bindings. .. _class_RenderingDevice_constant_LIMIT_MAX_VERTEX_INPUT_BINDING_STRIDE: @@ -4126,7 +4147,7 @@ Maximum supported cubemap texture size (in pixels on a single axis of a single f :ref:`Limit` **LIMIT_MAX_VERTEX_INPUT_BINDING_STRIDE** = ``25`` - +Maximum vertex input binding stride. .. _class_RenderingDevice_constant_LIMIT_MIN_UNIFORM_BUFFER_OFFSET_ALIGNMENT: @@ -4134,7 +4155,7 @@ Maximum supported cubemap texture size (in pixels on a single axis of a single f :ref:`Limit` **LIMIT_MIN_UNIFORM_BUFFER_OFFSET_ALIGNMENT** = ``26`` - +Minimum uniform buffer offset alignment. .. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_SHARED_MEMORY_SIZE: @@ -4142,7 +4163,7 @@ Maximum supported cubemap texture size (in pixels on a single axis of a single f :ref:`Limit` **LIMIT_MAX_COMPUTE_SHARED_MEMORY_SIZE** = ``27`` - +Maximum shared memory size for compute shaders. .. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_X: @@ -4150,7 +4171,7 @@ Maximum supported cubemap texture size (in pixels on a single axis of a single f :ref:`Limit` **LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_X** = ``28`` - +Maximum number of workgroups for compute shaders on the X axis. .. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_Y: @@ -4158,7 +4179,7 @@ Maximum supported cubemap texture size (in pixels on a single axis of a single f :ref:`Limit` **LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_Y** = ``29`` - +Maximum number of workgroups for compute shaders on the Y axis. .. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_Z: @@ -4166,7 +4187,7 @@ Maximum supported cubemap texture size (in pixels on a single axis of a single f :ref:`Limit` **LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_Z** = ``30`` - +Maximum number of workgroups for compute shaders on the Z axis. .. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_WORKGROUP_INVOCATIONS: @@ -4174,7 +4195,7 @@ Maximum supported cubemap texture size (in pixels on a single axis of a single f :ref:`Limit` **LIMIT_MAX_COMPUTE_WORKGROUP_INVOCATIONS** = ``31`` - +Maximum number of workgroup invocations for compute shaders. .. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_X: @@ -4182,7 +4203,7 @@ Maximum supported cubemap texture size (in pixels on a single axis of a single f :ref:`Limit` **LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_X** = ``32`` - +Maximum workgroup size for compute shaders on the X axis. .. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Y: @@ -4190,7 +4211,7 @@ Maximum supported cubemap texture size (in pixels on a single axis of a single f :ref:`Limit` **LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Y** = ``33`` - +Maximum workgroup size for compute shaders on the Y axis. .. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Z: @@ -4198,7 +4219,7 @@ Maximum supported cubemap texture size (in pixels on a single axis of a single f :ref:`Limit` **LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Z** = ``34`` - +Maximum workgroup size for compute shaders on the Z axis. .. _class_RenderingDevice_constant_LIMIT_MAX_VIEWPORT_DIMENSIONS_X: @@ -4206,7 +4227,7 @@ Maximum supported cubemap texture size (in pixels on a single axis of a single f :ref:`Limit` **LIMIT_MAX_VIEWPORT_DIMENSIONS_X** = ``35`` - +Maximum viewport width (in pixels). .. _class_RenderingDevice_constant_LIMIT_MAX_VIEWPORT_DIMENSIONS_Y: @@ -4214,7 +4235,7 @@ Maximum supported cubemap texture size (in pixels on a single axis of a single f :ref:`Limit` **LIMIT_MAX_VIEWPORT_DIMENSIONS_Y** = ``36`` - +Maximum viewport height (in pixels). .. rst-class:: classref-item-separator @@ -4290,9 +4311,7 @@ Method Descriptions void **barrier** **(** :ref:`BarrierMask` from=7, :ref:`BarrierMask` to=7 **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Puts a memory barrier in place. This is used for synchronization to avoid data races. See also :ref:`full_barrier`, which may be useful for debugging. .. rst-class:: classref-item-separator @@ -4344,9 +4363,7 @@ Returns a copy of the data of the specified ``buffer``, optionally ``offset_byte void **capture_timestamp** **(** :ref:`String` name **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -4372,9 +4389,27 @@ void **compute_list_add_barrier** **(** :ref:`int` compute_list **)** :ref:`int` **compute_list_begin** **(** :ref:`bool` allow_draw_overlap=false **)** -.. container:: contribute +Starts a list of compute commands created with the ``compute_*`` methods. The returned value should be passed to other ``compute_list_*`` functions. - There is currently no description for this method. Please help us by :ref:`contributing one `! +If ``allow_draw_overlap`` is ``true``, you may have one draw list running at the same time as one compute list. 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): + +:: + + var rd = RenderingDevice.new() + var compute_list = rd.compute_list_begin() + + rd.compute_list_bind_compute_pipeline(compute_list, compute_shader_dilate_pipeline) + rd.compute_list_bind_uniform_set(compute_list, compute_base_uniform_set, 0) + rd.compute_list_bind_uniform_set(compute_list, dilate_uniform_set, 1) + + for i in atlas_slices: + rd.compute_list_set_push_constant(compute_list, push_constant, push_constant.size()) + rd.compute_list_dispatch(compute_list, group_size.x, group_size.y, group_size.z) + # No barrier, let them run all together. + + rd.compute_list_end() .. rst-class:: classref-item-separator @@ -4414,9 +4449,7 @@ void **compute_list_bind_uniform_set** **(** :ref:`int` compute_list, void **compute_list_dispatch** **(** :ref:`int` compute_list, :ref:`int` x_groups, :ref:`int` y_groups, :ref:`int` z_groups **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Submits the compute list for processing on the GPU. This is the compute equivalent to :ref:`draw_list_draw`. .. rst-class:: classref-item-separator @@ -4428,9 +4461,7 @@ void **compute_list_dispatch** **(** :ref:`int` compute_list, :ref:`i void **compute_list_end** **(** :ref:`BarrierMask` post_barrier=7 **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Finishes a list of compute commands created with the ``compute_*`` methods. .. rst-class:: classref-item-separator @@ -4442,9 +4473,7 @@ void **compute_list_end** **(** :ref:`BarrierMask` compute_list, :ref:`PackedByteArray` buffer, :ref:`int` size_bytes **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -4456,9 +4485,9 @@ void **compute_list_set_push_constant** **(** :ref:`int` compute_list :ref:`RID` **compute_pipeline_create** **(** :ref:`RID` shader, :ref:`RDPipelineSpecializationConstant[]` specialization_constants=[] **)** -.. container:: contribute +Creates a new compute pipeline. It can be accessed with the RID that is returned. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -4468,11 +4497,9 @@ void **compute_list_set_push_constant** **(** :ref:`int` compute_list .. rst-class:: classref-method -:ref:`bool` **compute_pipeline_is_valid** **(** :ref:`RID` compute_pieline **)** +:ref:`bool` **compute_pipeline_is_valid** **(** :ref:`RID` compute_pipeline **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if the compute pipeline specified by the ``compute_pipeline`` RID is valid, ``false`` otherwise. .. rst-class:: classref-item-separator @@ -4484,9 +4511,7 @@ void **compute_list_set_push_constant** **(** :ref:`int` compute_list :ref:`RenderingDevice` **create_local_device** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Create a new local **RenderingDevice**. This is most useful for performing compute operations on the GPU independently from the rest of the engine. .. rst-class:: classref-item-separator @@ -4498,9 +4523,9 @@ void **compute_list_set_push_constant** **(** :ref:`int` compute_list void **draw_command_begin_label** **(** :ref:`String` name, :ref:`Color` color **)** -.. container:: contribute +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. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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_insert_label` and :ref:`draw_command_end_label`. .. rst-class:: classref-item-separator @@ -4512,9 +4537,7 @@ void **draw_command_begin_label** **(** :ref:`String` name, :ref:` void **draw_command_end_label** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Ends the command buffer debug label region started by a :ref:`draw_command_begin_label` call. .. rst-class:: classref-item-separator @@ -4526,9 +4549,7 @@ void **draw_command_end_label** **(** **)** void **draw_command_insert_label** **(** :ref:`String` name, :ref:`Color` color **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Inserts a command buffer debug label region in the current command buffer. Unlike :ref:`draw_command_begin_label`, this region should not be ended with a :ref:`draw_command_end_label` call. .. rst-class:: classref-item-separator @@ -4538,11 +4559,32 @@ void **draw_command_insert_label** **(** :ref:`String` name, :ref: .. rst-class:: classref-method -:ref:`int` **draw_list_begin** **(** :ref:`RID` framebuffer, :ref:`InitialAction` initial_color_action, :ref:`FinalAction` final_color_action, :ref:`InitialAction` initial_depth_action, :ref:`FinalAction` final_depth_action, :ref:`PackedColorArray` clear_color_values=PackedColorArray(), :ref:`float` clear_depth=1.0, :ref:`int` clear_stencil=0, :ref:`Rect2` region=Rect2(0, 0, 0, 0), :ref:`Array` storage_textures=[] **)** +:ref:`int` **draw_list_begin** **(** :ref:`RID` framebuffer, :ref:`InitialAction` initial_color_action, :ref:`FinalAction` final_color_action, :ref:`InitialAction` initial_depth_action, :ref:`FinalAction` final_depth_action, :ref:`PackedColorArray` clear_color_values=PackedColorArray(), :ref:`float` clear_depth=1.0, :ref:`int` clear_stencil=0, :ref:`Rect2` region=Rect2(0, 0, 0, 0), :ref:`RID[]` storage_textures=[] **)** -.. container:: contribute +Starts a list of raster drawing commands created with the ``draw_*`` methods. The returned value should be passed to other ``draw_list_*`` functions. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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): + +:: + + var rd = RenderingDevice.new() + var clear_colors = PackedColorArray([Color(0, 0, 0, 0), Color(0, 0, 0, 0), Color(0, 0, 0, 0)] + var draw_list = rd.draw_list_begin(framebuffers[i], RenderingDevice.INITIAL_ACTION_CLEAR, RenderingDevice.FINAL_ACTION_READ, RenderingDevice.INITIAL_ACTION_CLEAR, RenderingDevice.FINAL_ACTION_DISCARD, clear_colors) + + # Draw opaque. + rd.draw_list_bind_render_pipeline(draw_list, raster_pipeline) + rd.draw_list_bind_uniform_set(draw_list, raster_base_uniform, 0) + rd.draw_list_set_push_constant(draw_list, raster_push_constant, raster_push_constant.size()) + rd.draw_list_draw(draw_list, false, 1, slice_triangle_count[i] * 3) + # Draw wire. + rd.draw_list_bind_render_pipeline(draw_list, raster_pipeline_wire) + rd.draw_list_bind_uniform_set(draw_list, raster_base_uniform, 0) + rd.draw_list_set_push_constant(draw_list, raster_push_constant, raster_push_constant.size()) + rd.draw_list_draw(draw_list, false, 1, slice_triangle_count[i] * 3) + + rd.draw_list_end() .. rst-class:: classref-item-separator @@ -4554,9 +4596,9 @@ void **draw_command_insert_label** **(** :ref:`String` name, :ref: :ref:`int` **draw_list_begin_for_screen** **(** :ref:`int` screen=0, :ref:`Color` clear_color=Color(0, 0, 0, 1) **)** -.. container:: contribute +High-level variant of :ref:`draw_list_begin`, with the parameters automtaically being adjusted for drawing onto the window specified by the ``screen`` ID. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **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 @@ -4568,9 +4610,7 @@ void **draw_command_insert_label** **(** :ref:`String` name, :ref: :ref:`PackedInt64Array` **draw_list_begin_split** **(** :ref:`RID` framebuffer, :ref:`int` splits, :ref:`InitialAction` initial_color_action, :ref:`FinalAction` final_color_action, :ref:`InitialAction` initial_depth_action, :ref:`FinalAction` final_depth_action, :ref:`PackedColorArray` clear_color_values=PackedColorArray(), :ref:`float` clear_depth=1.0, :ref:`int` clear_stencil=0, :ref:`Rect2` region=Rect2(0, 0, 0, 0), :ref:`RID[]` storage_textures=[] **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Variant of :ref:`draw_list_begin` with support for multiple splits. The ``splits`` parameter determines how many splits are created. .. rst-class:: classref-item-separator @@ -4582,9 +4622,7 @@ void **draw_command_insert_label** **(** :ref:`String` name, :ref: void **draw_list_bind_index_array** **(** :ref:`int` draw_list, :ref:`RID` index_array **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Binds ``index_array`` to the specified ``draw_list``. .. rst-class:: classref-item-separator @@ -4596,9 +4634,7 @@ void **draw_list_bind_index_array** **(** :ref:`int` draw_list, :ref: void **draw_list_bind_render_pipeline** **(** :ref:`int` draw_list, :ref:`RID` render_pipeline **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Binds ``render_pipeline`` to the specified ``draw_list``. .. rst-class:: classref-item-separator @@ -4610,9 +4646,7 @@ void **draw_list_bind_render_pipeline** **(** :ref:`int` draw_list, : void **draw_list_bind_uniform_set** **(** :ref:`int` draw_list, :ref:`RID` uniform_set, :ref:`int` set_index **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Binds ``uniform_set`` to the specified ``draw_list``. A ``set_index`` must also be specified, which is an identifier starting from ``0`` that must match the one expected by the draw list. .. rst-class:: classref-item-separator @@ -4624,9 +4658,7 @@ void **draw_list_bind_uniform_set** **(** :ref:`int` draw_list, :ref: void **draw_list_bind_vertex_array** **(** :ref:`int` draw_list, :ref:`RID` vertex_array **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Binds ``vertex_array`` to the specified ``draw_list``. .. rst-class:: classref-item-separator @@ -4638,9 +4670,7 @@ void **draw_list_bind_vertex_array** **(** :ref:`int` draw_list, :ref void **draw_list_disable_scissor** **(** :ref:`int` draw_list **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Removes and disables the scissor rectangle for the specified ``draw_list``. See also :ref:`draw_list_enable_scissor`. .. rst-class:: classref-item-separator @@ -4652,9 +4682,7 @@ void **draw_list_disable_scissor** **(** :ref:`int` draw_list **)** void **draw_list_draw** **(** :ref:`int` draw_list, :ref:`bool` use_indices, :ref:`int` instances, :ref:`int` procedural_vertex_count=0 **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Submits ``draw_list`` for rendering on the GPU. This is the raster equivalent to :ref:`compute_list_dispatch`. .. rst-class:: classref-item-separator @@ -4666,9 +4694,9 @@ void **draw_list_draw** **(** :ref:`int` draw_list, :ref:`bool` draw_list, :ref:`Rect2` rect=Rect2(0, 0, 0, 0) **)** -.. container:: contribute +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`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** The specified ``rect`` is automatically intersected with the screen's dimensions, which means it cannot exceed the screen's dimensions. .. rst-class:: classref-item-separator @@ -4680,9 +4708,7 @@ void **draw_list_enable_scissor** **(** :ref:`int` draw_list, :ref:`R void **draw_list_end** **(** :ref:`BarrierMask` post_barrier=7 **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Finishes a list of raster drawing commands created with the ``draw_*`` methods. .. rst-class:: classref-item-separator @@ -4694,7 +4720,7 @@ void **draw_list_end** **(** :ref:`BarrierMask void **draw_list_set_blend_constants** **(** :ref:`int` draw_list, :ref:`Color` color **)** -Sets blend constants for draw list, blend constants are used only if the graphics pipeline is created with :ref:`DYNAMIC_STATE_BLEND_CONSTANTS` flag set. +Sets blend constants for the specified ``draw_list`` to ``color``. Blend constants are used only if the graphics pipeline is created with :ref:`DYNAMIC_STATE_BLEND_CONSTANTS` flag set. .. rst-class:: classref-item-separator @@ -4706,9 +4732,7 @@ Sets blend constants for draw list, blend constants are used only if the graphic void **draw_list_set_push_constant** **(** :ref:`int` draw_list, :ref:`PackedByteArray` buffer, :ref:`int` size_bytes **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -4720,9 +4744,7 @@ void **draw_list_set_push_constant** **(** :ref:`int` draw_list, :ref :ref:`int` **draw_list_switch_to_next_pass** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Switches to the next draw pass and returns the split's ID. Equivalent to :ref:`draw_list_switch_to_next_pass_split` with ``splits`` set to ``1``. .. rst-class:: classref-item-separator @@ -4734,9 +4756,7 @@ void **draw_list_set_push_constant** **(** :ref:`int` draw_list, :ref :ref:`PackedInt64Array` **draw_list_switch_to_next_pass_split** **(** :ref:`int` splits **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Switches to the next draw pass, with the number of splits allocated specified in ``splits``. The return value is an array containing the ID of each split. For single-split usage, see :ref:`draw_list_switch_to_next_pass`. .. rst-class:: classref-item-separator @@ -4748,9 +4768,9 @@ void **draw_list_set_push_constant** **(** :ref:`int` draw_list, :ref :ref:`RID` **framebuffer_create** **(** :ref:`RID[]` textures, :ref:`int` validate_with_format=-1, :ref:`int` view_count=1 **)** -.. container:: contribute +Creates a new framebuffer. It can be accessed with the RID that is returned. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -4762,9 +4782,9 @@ void **draw_list_set_push_constant** **(** :ref:`int` draw_list, :ref :ref:`RID` **framebuffer_create_empty** **(** :ref:`Vector2i` size, :ref:`TextureSamples` samples=0, :ref:`int` validate_with_format=-1 **)** -.. container:: contribute +Creates a new empty framebuffer. It can be accessed with the RID that is returned. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -4776,9 +4796,9 @@ void **draw_list_set_push_constant** **(** :ref:`int` draw_list, :ref :ref:`RID` **framebuffer_create_multipass** **(** :ref:`RID[]` textures, :ref:`RDFramebufferPass[]` passes, :ref:`int` validate_with_format=-1, :ref:`int` view_count=1 **)** -.. container:: contribute +Creates a new multipass framebuffer. It can be accessed with the RID that is returned. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -4790,9 +4810,9 @@ void **draw_list_set_push_constant** **(** :ref:`int` draw_list, :ref :ref:`int` **framebuffer_format_create** **(** :ref:`RDAttachmentFormat[]` attachments, :ref:`int` view_count=1 **)** -.. container:: contribute +Creates a new framebuffer format with the specified ``attachments`` and ``view_count``. Returns the new framebuffer's unique framebuffer format ID. - There is currently no description for this method. Please help us by :ref:`contributing one `! +If ``view_count`` is greater than or equal to ``2``, enables multiview which is used for VR rendering. This requires support for the Vulkan multiview extension. .. rst-class:: classref-item-separator @@ -4804,9 +4824,7 @@ void **draw_list_set_push_constant** **(** :ref:`int` draw_list, :ref :ref:`int` **framebuffer_format_create_empty** **(** :ref:`TextureSamples` samples=0 **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Creates a new empty framebuffer format with the specified number of ``samples`` and returns its ID. .. rst-class:: classref-item-separator @@ -4818,9 +4836,7 @@ void **draw_list_set_push_constant** **(** :ref:`int` draw_list, :ref :ref:`int` **framebuffer_format_create_multipass** **(** :ref:`RDAttachmentFormat[]` attachments, :ref:`RDFramebufferPass[]` passes, :ref:`int` view_count=1 **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Creates a multipass framebuffer format with the specified ``attachments``, ``passes`` and ``view_count`` and returns its ID. If ``view_count`` is greater than or equal to ``2``, enables multiview which is used for VR rendering. This requires support for the Vulkan multiview extension. .. rst-class:: classref-item-separator @@ -4832,9 +4848,7 @@ void **draw_list_set_push_constant** **(** :ref:`int` draw_list, :ref :ref:`TextureSamples` **framebuffer_format_get_texture_samples** **(** :ref:`int` format, :ref:`int` render_pass=0 **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the number of texture samples used for the given framebuffer ``format`` ID (returned by :ref:`framebuffer_get_format`). .. rst-class:: classref-item-separator @@ -4846,9 +4860,7 @@ void **draw_list_set_push_constant** **(** :ref:`int` draw_list, :ref :ref:`int` **framebuffer_get_format** **(** :ref:`RID` framebuffer **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the format ID of the framebuffer specified by the ``framebuffer`` RID. This ID is guaranteed to be unique for the same formats and does not need to be freed. .. rst-class:: classref-item-separator @@ -4860,9 +4872,7 @@ void **draw_list_set_push_constant** **(** :ref:`int` draw_list, :ref :ref:`bool` **framebuffer_is_valid** **(** :ref:`RID` framebuffer **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if the framebuffer specified by the ``framebuffer`` RID is valid, ``false`` otherwise. .. rst-class:: classref-item-separator @@ -4874,9 +4884,7 @@ void **draw_list_set_push_constant** **(** :ref:`int` draw_list, :ref void **free_rid** **(** :ref:`RID` rid **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Tries to free an object in the RenderingDevice. To avoid memory leaks, this should be called after using an object as memory management does not occur automatically when using RenderingDevice directly. .. rst-class:: classref-item-separator @@ -4888,9 +4896,7 @@ void **free_rid** **(** :ref:`RID` rid **)** void **full_barrier** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Puts a *full* memory barrier in place. This is a memory :ref:`barrier` with all flags enabled. :ref:`full_barrier` it should only be used for debugging as it can severely impact performance. .. rst-class:: classref-item-separator @@ -4902,9 +4908,7 @@ void **full_barrier** **(** **)** :ref:`int` **get_captured_timestamp_cpu_time** **(** :ref:`int` index **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -4916,9 +4920,7 @@ void **full_barrier** **(** **)** :ref:`int` **get_captured_timestamp_gpu_time** **(** :ref:`int` index **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -4930,9 +4932,7 @@ void **full_barrier** **(** **)** :ref:`String` **get_captured_timestamp_name** **(** :ref:`int` index **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the timestamp's name for the rendering step specified by ``index``. See also :ref:`capture_timestamp`. .. rst-class:: classref-item-separator @@ -4944,9 +4944,7 @@ void **full_barrier** **(** **)** :ref:`int` **get_captured_timestamps_count** **(** **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the total number of timestamps (rendering steps) available for profiling. .. rst-class:: classref-item-separator @@ -4958,9 +4956,7 @@ void **full_barrier** **(** **)** :ref:`int` **get_captured_timestamps_frame** **(** **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the index of the last frame rendered that has rendering timestamps available for querying. .. rst-class:: classref-item-separator @@ -4972,9 +4968,7 @@ void **full_barrier** **(** **)** :ref:`String` **get_device_name** **(** **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -4986,9 +4980,7 @@ void **full_barrier** **(** **)** :ref:`String` **get_device_pipeline_cache_uuid** **(** **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the universally unique identifier for the pipeline cache. This is used to cache shader files on disk, which avoids shader recompilations on subsequent engine runs. This UUID varies depending on the graphics card model, but also the driver version. Therefore, updating graphics drivers will invalidate the shader cache. .. rst-class:: classref-item-separator @@ -5000,9 +4992,7 @@ void **full_barrier** **(** **)** :ref:`String` **get_device_vendor_name** **(** **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -5014,9 +5004,7 @@ void **full_barrier** **(** **)** :ref:`int` **get_driver_resource** **(** :ref:`DriverResource` resource, :ref:`RID` rid, :ref:`int` index **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the unique identifier of the driver ``resource`` for the specified ``rid``. Some driver resource types ignore the specified ``rid`` (see :ref:`DriverResource` descriptions). ``index`` is always ignored but must be specified anyway. .. rst-class:: classref-item-separator @@ -5028,9 +5016,7 @@ void **full_barrier** **(** **)** :ref:`int` **get_frame_delay** **(** **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the frame count kept by the graphics API. Higher values result in higher input lag, but with more consistent throughput. For the main **RenderingDevice**, frames are cycled (usually 3 with triple-buffered V-Sync enabled). However, local **RenderingDevice**\ s only have 1 frame. .. rst-class:: classref-item-separator @@ -5042,9 +5028,7 @@ void **full_barrier** **(** **)** :ref:`int` **get_memory_usage** **(** :ref:`MemoryType` type **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the memory usage in bytes corresponding to the given ``type``. When using Vulkan, these statistics are calculated by `Vulkan Memory Allocator `__. .. rst-class:: classref-item-separator @@ -5056,9 +5040,9 @@ void **full_barrier** **(** **)** :ref:`RID` **index_array_create** **(** :ref:`RID` index_buffer, :ref:`int` index_offset, :ref:`int` index_count **)** -.. container:: contribute +Creates a new index array. It can be accessed with the RID that is returned. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -5070,9 +5054,9 @@ void **full_barrier** **(** **)** :ref:`RID` **index_buffer_create** **(** :ref:`int` size_indices, :ref:`IndexBufferFormat` format, :ref:`PackedByteArray` data=PackedByteArray(), :ref:`bool` use_restart_indices=false **)** -.. container:: contribute +Creates a new index buffer. It can be accessed with the RID that is returned. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -5084,9 +5068,9 @@ void **full_barrier** **(** **)** :ref:`int` **limit_get** **(** :ref:`Limit` limit **)** |const| -.. container:: contribute +Returns the value of the specified ``limit``. This limit varies depending on the current graphics hardware (and sometimes the driver version). If the given limit is exceeded, rendering errors will occur. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Limits for various graphics hardware can be found in the `Vulkan Hardware Database `__. .. rst-class:: classref-item-separator @@ -5098,9 +5082,9 @@ void **full_barrier** **(** **)** :ref:`RID` **render_pipeline_create** **(** :ref:`RID` shader, :ref:`int` framebuffer_format, :ref:`int` vertex_format, :ref:`RenderPrimitive` primitive, :ref:`RDPipelineRasterizationState` rasterization_state, :ref:`RDPipelineMultisampleState` multisample_state, :ref:`RDPipelineDepthStencilState` stencil_state, :ref:`RDPipelineColorBlendState` color_blend_state, :ref:`PipelineDynamicStateFlags` dynamic_state_flags=0, :ref:`int` for_render_pass=0, :ref:`RDPipelineSpecializationConstant[]` specialization_constants=[] **)** -.. container:: contribute +Creates a new render pipeline. It can be accessed with the RID that is returned. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -5112,9 +5096,7 @@ void **full_barrier** **(** **)** :ref:`bool` **render_pipeline_is_valid** **(** :ref:`RID` render_pipeline **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if the render pipeline specified by the ``render_pipeline`` RID is valid, ``false`` otherwise. .. rst-class:: classref-item-separator @@ -5126,9 +5108,21 @@ void **full_barrier** **(** **)** :ref:`RID` **sampler_create** **(** :ref:`RDSamplerState` state **)** -.. container:: contribute +Creates a new sampler. It can be accessed with the RID that is returned. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 + +---- + +.. _class_RenderingDevice_method_sampler_is_format_supported_for_filter: + +.. rst-class:: classref-method + +:ref:`bool` **sampler_is_format_supported_for_filter** **(** :ref:`DataFormat` format, :ref:`SamplerFilter` sampler_filter **)** |const| + +Returns ``true`` if implementation supports using a texture of ``format`` with the given ``sampler_filter``. .. rst-class:: classref-item-separator @@ -5140,9 +5134,9 @@ void **full_barrier** **(** **)** :ref:`int` **screen_get_framebuffer_format** **(** **)** |const| -.. container:: contribute +Returns the screen's framebuffer format. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **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 @@ -5154,9 +5148,9 @@ void **full_barrier** **(** **)** :ref:`int` **screen_get_height** **(** :ref:`int` screen=0 **)** |const| -.. container:: contribute +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`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **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 @@ -5168,9 +5162,9 @@ void **full_barrier** **(** **)** :ref:`int` **screen_get_width** **(** :ref:`int` screen=0 **)** |const| -.. container:: contribute +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`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **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 @@ -5182,9 +5176,11 @@ void **full_barrier** **(** **)** void **set_resource_name** **(** :ref:`RID` id, :ref:`String` name **)** -.. container:: contribute +Sets the resource name for ``id`` to ``name``. This is used for debugging with third-party tools such as `RenderDoc `__. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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. .. rst-class:: classref-item-separator @@ -5196,9 +5192,9 @@ void **set_resource_name** **(** :ref:`RID` id, :ref:`String` **shader_compile_binary_from_spirv** **(** :ref:`RDShaderSPIRV` spirv_data, :ref:`String` name="" **)** -.. container:: contribute +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`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ ``name`` is an optional human-readable name that can be given to the compiled shader for organizational purposes. .. rst-class:: classref-item-separator @@ -5210,9 +5206,9 @@ void **set_resource_name** **(** :ref:`RID` id, :ref:`String` **shader_compile_spirv_from_source** **(** :ref:`RDShaderSource` shader_source, :ref:`bool` allow_cache=true **)** -.. container:: contribute +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`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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. .. rst-class:: classref-item-separator @@ -5224,9 +5220,9 @@ void **set_resource_name** **(** :ref:`RID` id, :ref:`String` **shader_create_from_bytecode** **(** :ref:`PackedByteArray` binary_data **)** -.. container:: contribute +Creates a new shader instance from a binary compiled shader. It can be accessed with the RID that is returned. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -5238,9 +5234,9 @@ void **set_resource_name** **(** :ref:`RID` id, :ref:`String` **shader_create_from_spirv** **(** :ref:`RDShaderSPIRV` spirv_data, :ref:`String` name="" **)** -.. container:: contribute +Creates a new shader instance from SPIR-V intermediate code. It can be accessed with the RID that is returned. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -5266,9 +5262,9 @@ void **set_resource_name** **(** :ref:`RID` id, :ref:`String` **storage_buffer_create** **(** :ref:`int` size_bytes, :ref:`PackedByteArray` data=PackedByteArray(), :ref:`StorageBufferUsage` usage=0 **)** -.. container:: contribute +Creates a `storage buffer `__ with the specified ``data`` and ``usage``. It can be accessed with the RID that is returned. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -5280,9 +5276,9 @@ void **set_resource_name** **(** :ref:`RID` id, :ref:`String`). - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** Only available in local RenderingDevices. .. rst-class:: classref-item-separator @@ -5294,9 +5290,11 @@ void **submit** **(** **)** void **sync** **(** **)** -.. container:: contribute +Forces a synchronization between the CPU and GPU, which may be required in certain cases. Only call this when needed, as CPU-GPU synchronization has a performance cost. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** Only available in local RenderingDevices. + +\ **Note:** :ref:`sync` can only be called after a :ref:`submit`. .. rst-class:: classref-item-separator @@ -5308,9 +5306,9 @@ void **sync** **(** **)** :ref:`RID` **texture_buffer_create** **(** :ref:`int` size_bytes, :ref:`DataFormat` format, :ref:`PackedByteArray` data=PackedByteArray() **)** -.. container:: contribute +Creates a new texture buffer. It can be accessed with the RID that is returned. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -5322,9 +5320,9 @@ void **sync** **(** **)** :ref:`Error` **texture_clear** **(** :ref:`RID` texture, :ref:`Color` color, :ref:`int` base_mipmap, :ref:`int` mipmap_count, :ref:`int` base_layer, :ref:`int` layer_count, :ref:`BarrierMask` post_barrier=7 **)** -.. container:: contribute +Clears the specified ``texture`` by replacing all of its pixels with the specified ``color``. ``base_mipmap`` and ``mipmap_count`` determine which mipmaps of the texture are affected by this clear operation, while ``base_layer`` and ``layer_count`` determine which layers of a 3D texture (or texture array) are affected by this clear operation. For 2D textures (which only have one layer by design), ``base_layer`` and ``layer_count`` must both be ``0``. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** ``texture`` can't be cleared while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to :ref:`FINAL_ACTION_CONTINUE`) to clear this texture. .. rst-class:: classref-item-separator @@ -5336,9 +5334,17 @@ void **sync** **(** **)** :ref:`Error` **texture_copy** **(** :ref:`RID` from_texture, :ref:`RID` to_texture, :ref:`Vector3` from_pos, :ref:`Vector3` to_pos, :ref:`Vector3` size, :ref:`int` src_mipmap, :ref:`int` dst_mipmap, :ref:`int` src_layer, :ref:`int` dst_layer, :ref:`BarrierMask` post_barrier=7 **)** -.. container:: contribute +Copies the ``from_texture`` to ``to_texture`` with the specified ``from_pos``, ``to_pos`` and ``size`` coordinates. The Z axis of the ``from_pos``, ``to_pos`` and ``size`` must be ``0`` for 2-dimensional textures. Source and destination mipmaps/layers must also be specified, with these parameters being ``0`` for textures without mipmaps or single-layer textures. Returns :ref:`@GlobalScope.OK` if the texture copy was successful or :ref:`@GlobalScope.ERR_INVALID_PARAMETER` otherwise. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** ``from_texture`` texture can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to :ref:`FINAL_ACTION_CONTINUE`) to copy this texture. + +\ **Note:** ``from_texture`` texture requires the :ref:`TEXTURE_USAGE_CAN_COPY_FROM_BIT` to be retrieved. + +\ **Note:** ``to_texture`` can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to :ref:`FINAL_ACTION_CONTINUE`) to copy this texture. + +\ **Note:** ``to_texture`` requires the :ref:`TEXTURE_USAGE_CAN_COPY_TO_BIT` to be retrieved. + +\ **Note:** ``from_texture`` and ``to_texture`` must be of the same type (color or depth). .. rst-class:: classref-item-separator @@ -5350,9 +5356,11 @@ void **sync** **(** **)** :ref:`RID` **texture_create** **(** :ref:`RDTextureFormat` format, :ref:`RDTextureView` view, :ref:`PackedByteArray[]` data=[] **)** -.. container:: contribute +Creates a new texture. It can be accessed with the RID that is returned. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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. .. rst-class:: classref-item-separator @@ -5364,9 +5372,7 @@ void **sync** **(** **)** :ref:`RID` **texture_create_shared** **(** :ref:`RDTextureView` view, :ref:`RID` with_texture **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Creates a shared texture using the specified ``view`` and the texture information from ``with_texture``. .. rst-class:: classref-item-separator @@ -5378,9 +5384,11 @@ void **sync** **(** **)** :ref:`RID` **texture_create_shared_from_slice** **(** :ref:`RDTextureView` view, :ref:`RID` with_texture, :ref:`int` layer, :ref:`int` mipmap, :ref:`int` mipmaps=1, :ref:`TextureSliceType` slice_type=0 **)** -.. container:: contribute +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`\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +For 2D textures (which only have one layer), ``layer`` must be ``0``. + +\ **Note:** Layer slicing is only supported for 2D texture arrays, not 3D textures or cubemaps. .. rst-class:: classref-item-separator @@ -5392,9 +5400,11 @@ void **sync** **(** **)** :ref:`PackedByteArray` **texture_get_data** **(** :ref:`RID` texture, :ref:`int` layer **)** -.. container:: contribute +Returns the ``texture`` data for the specified ``layer`` as raw binary data. For 2D textures (which only have one layer), ``layer`` must be ``0``. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** ``texture`` can't be retrieved while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to :ref:`FINAL_ACTION_CONTINUE`) to retrieve this texture. Otherwise, an error is printed and a empty :ref:`PackedByteArray` is returned. + +\ **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. .. rst-class:: classref-item-separator @@ -5406,9 +5416,7 @@ void **sync** **(** **)** :ref:`bool` **texture_is_format_supported_for_usage** **(** :ref:`DataFormat` format, :ref:`TextureUsageBits` usage_flags **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if the specified ``format`` is supported for the given ``usage_flags``, ``false`` otherwise. .. rst-class:: classref-item-separator @@ -5420,9 +5428,7 @@ void **sync** **(** **)** :ref:`bool` **texture_is_shared** **(** :ref:`RID` texture **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if the ``texture`` is shared, ``false`` otherwise. See :ref:`RDTextureView`. .. rst-class:: classref-item-separator @@ -5434,9 +5440,7 @@ void **sync** **(** **)** :ref:`bool` **texture_is_valid** **(** :ref:`RID` texture **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if the ``texture`` is valid, ``false`` otherwise. .. rst-class:: classref-item-separator @@ -5448,9 +5452,21 @@ void **sync** **(** **)** :ref:`Error` **texture_resolve_multisample** **(** :ref:`RID` from_texture, :ref:`RID` to_texture, :ref:`BarrierMask` post_barrier=7 **)** -.. container:: contribute +Resolves the ``from_texture`` texture onto ``to_texture`` with multisample antialiasing enabled. This must be used when rendering a framebuffer for MSAA to work. Returns :ref:`@GlobalScope.OK` if successful, :ref:`@GlobalScope.ERR_INVALID_PARAMETER` otherwise. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** ``from_texture`` and ``to_texture`` textures must have the same dimension, format and type (color or depth). + +\ **Note:** ``from_texture`` can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to :ref:`FINAL_ACTION_CONTINUE`) to resolve this texture. + +\ **Note:** ``from_texture`` requires the :ref:`TEXTURE_USAGE_CAN_COPY_FROM_BIT` to be retrieved. + +\ **Note:** ``from_texture`` must be multisampled and must also be 2D (or a slice of a 3D/cubemap texture). + +\ **Note:** ``to_texture`` can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to :ref:`FINAL_ACTION_CONTINUE`) to resolve this texture. + +\ **Note:** ``to_texture`` texture requires the :ref:`TEXTURE_USAGE_CAN_COPY_TO_BIT` to be retrieved. + +\ **Note:** ``to_texture`` texture must **not** be multisampled and must also be 2D (or a slice of a 3D/cubemap texture). .. rst-class:: classref-item-separator @@ -5462,9 +5478,13 @@ void **sync** **(** **)** :ref:`Error` **texture_update** **(** :ref:`RID` texture, :ref:`int` layer, :ref:`PackedByteArray` data, :ref:`BarrierMask` post_barrier=7 **)** -.. container:: contribute +Updates texture data with new data, replacing the previous data in place. The updated texture data must have the same dimensions and format. For 2D textures (which only have one layer), ``layer`` must be ``0``. Returns :ref:`@GlobalScope.OK` if the update was successful, :ref:`@GlobalScope.ERR_INVALID_PARAMETER` otherwise. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** Updating textures is forbidden during creation of a draw or compute list. + +\ **Note:** The existing ``texture`` can't be updated while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to :ref:`FINAL_ACTION_CONTINUE`) to update this texture. + +\ **Note:** The existing ``texture`` requires the :ref:`TEXTURE_USAGE_CAN_UPDATE_BIT` to be updatable. .. rst-class:: classref-item-separator @@ -5476,9 +5496,9 @@ void **sync** **(** **)** :ref:`RID` **uniform_buffer_create** **(** :ref:`int` size_bytes, :ref:`PackedByteArray` data=PackedByteArray() **)** -.. container:: contribute +It can be accessed with the RID that is returned. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -5490,9 +5510,9 @@ void **sync** **(** **)** :ref:`RID` **uniform_set_create** **(** :ref:`RDUniform[]` uniforms, :ref:`RID` shader, :ref:`int` shader_set **)** -.. container:: contribute +It can be accessed with the RID that is returned. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -5530,9 +5550,9 @@ Creates a vertex array based on the specified buffers. Optionally, ``offsets`` ( :ref:`RID` **vertex_buffer_create** **(** :ref:`int` size_bytes, :ref:`PackedByteArray` data=PackedByteArray(), :ref:`bool` use_as_storage=false **)** -.. container:: contribute +It can be accessed with the RID that is returned. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -5544,9 +5564,7 @@ Creates a vertex array based on the specified buffers. Optionally, ``offsets`` ( :ref:`int` **vertex_format_create** **(** :ref:`RDVertexAttribute[]` vertex_descriptions **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Creates a new vertex format with the specified ``vertex_descriptions``. Returns a unique vertex format ID corresponding to the newly created vertex format. .. |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_renderingserver.rst b/classes/class_renderingserver.rst index 0d8dd6d9073..b93dd266af7 100644 --- a/classes/class_renderingserver.rst +++ b/classes/class_renderingserver.rst @@ -19,23 +19,21 @@ Server for anything visible. Description ----------- -The rendering server is the API backend for everything visible. The whole scene system mounts on it to display. +The rendering server is the API backend for everything visible. The whole scene system mounts on it to display. The rendering server is completely opaque: the internals are entirely implementation-specific and cannot be accessed. -The rendering server is completely opaque, the internals are entirely implementation specific and cannot be accessed. - -The rendering server can be used to bypass the scene/:ref:`Node` system entirely. +The rendering server can be used to bypass the scene/:ref:`Node` system entirely. This can improve performance in cases where the scene system is the bottleneck, but won't improve performance otherwise (for instance, if the GPU is already fully utilized). 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`. -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. -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. +\ **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). -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:** 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_*``. \ **Headless mode:** Starting the engine with the ``--headless`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>` disables all rendering and window management functions. Most functions from **RenderingServer** will return dummy values in this case. @@ -115,6 +113,8 @@ Methods +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_msdf_texture_rect_region` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`int` outline_size=0, :ref:`float` px_range=1.0, :ref:`float` scale=1.0 **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_add_multiline` **(** :ref:`RID` item, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=-1.0 **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_multimesh` **(** :ref:`RID` item, :ref:`RID` mesh, :ref:`RID` texture **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_nine_patch` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`Rect2` source, :ref:`RID` texture, :ref:`Vector2` topleft, :ref:`Vector2` bottomright, :ref:`NinePatchAxisMode` x_axis_mode=0, :ref:`NinePatchAxisMode` y_axis_mode=0, :ref:`bool` draw_center=true, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | @@ -391,7 +391,7 @@ Methods +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`global_shader_parameter_get` **(** :ref:`StringName` name **)** |const| | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`global_shader_parameter_get_list` **(** **)** |const| | + | :ref:`StringName[]` | :ref:`global_shader_parameter_get_list` **(** **)** |const| | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`GlobalShaderParameterType` | :ref:`global_shader_parameter_get_type` **(** :ref:`StringName` name **)** |const| | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -633,7 +633,7 @@ Methods +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`particles_collision_set_attractor_directionality` **(** :ref:`RID` particles_collision, :ref:`float` amount **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_collision_set_attractor_strength` **(** :ref:`RID` particles_collision, :ref:`float` setrngth **)** | + | void | :ref:`particles_collision_set_attractor_strength` **(** :ref:`RID` particles_collision, :ref:`float` strength **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`particles_collision_set_box_extents` **(** :ref:`RID` particles_collision, :ref:`Vector3` extents **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -827,6 +827,8 @@ Methods +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`texture_3d_update` **(** :ref:`RID` texture, :ref:`Image[]` data **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`texture_get_native_handle` **(** :ref:`RID` texture, :ref:`bool` srgb=false **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`texture_get_path` **(** :ref:`RID` texture **)** |const| | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`texture_get_rd_texture` **(** :ref:`RID` texture, :ref:`bool` srgb=false **)** |const| | @@ -857,6 +859,8 @@ Methods +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`viewport_get_render_info` **(** :ref:`RID` viewport, :ref:`ViewportRenderInfoType` type, :ref:`ViewportRenderInfo` info **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`viewport_get_render_target` **(** :ref:`RID` viewport **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`viewport_get_texture` **(** :ref:`RID` viewport **)** |const| | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_remove_canvas` **(** :ref:`RID` viewport, :ref:`RID` canvas **)** | @@ -1030,7 +1034,7 @@ enum **TextureLayeredType**: :ref:`TextureLayeredType` **TEXTURE_LAYERED_2D_ARRAY** = ``0`` - +Array of 2-dimensional textures (see :ref:`Texture2DArray`). .. _class_RenderingServer_constant_TEXTURE_LAYERED_CUBEMAP: @@ -1038,7 +1042,7 @@ enum **TextureLayeredType**: :ref:`TextureLayeredType` **TEXTURE_LAYERED_CUBEMAP** = ``1`` - +Cubemap texture (see :ref:`Cubemap`). .. _class_RenderingServer_constant_TEXTURE_LAYERED_CUBEMAP_ARRAY: @@ -1046,7 +1050,7 @@ enum **TextureLayeredType**: :ref:`TextureLayeredType` **TEXTURE_LAYERED_CUBEMAP_ARRAY** = ``2`` - +Array of cubemap textures (see :ref:`CubemapArray`). .. rst-class:: classref-item-separator @@ -1064,7 +1068,7 @@ enum **CubeMapLayer**: :ref:`CubeMapLayer` **CUBEMAP_LAYER_LEFT** = ``0`` - +Left face of a :ref:`Cubemap`. .. _class_RenderingServer_constant_CUBEMAP_LAYER_RIGHT: @@ -1072,7 +1076,7 @@ enum **CubeMapLayer**: :ref:`CubeMapLayer` **CUBEMAP_LAYER_RIGHT** = ``1`` - +Right face of a :ref:`Cubemap`. .. _class_RenderingServer_constant_CUBEMAP_LAYER_BOTTOM: @@ -1080,7 +1084,7 @@ enum **CubeMapLayer**: :ref:`CubeMapLayer` **CUBEMAP_LAYER_BOTTOM** = ``2`` - +Bottom face of a :ref:`Cubemap`. .. _class_RenderingServer_constant_CUBEMAP_LAYER_TOP: @@ -1088,7 +1092,7 @@ enum **CubeMapLayer**: :ref:`CubeMapLayer` **CUBEMAP_LAYER_TOP** = ``3`` - +Top face of a :ref:`Cubemap`. .. _class_RenderingServer_constant_CUBEMAP_LAYER_FRONT: @@ -1096,7 +1100,7 @@ enum **CubeMapLayer**: :ref:`CubeMapLayer` **CUBEMAP_LAYER_FRONT** = ``4`` - +Front face of a :ref:`Cubemap`. .. _class_RenderingServer_constant_CUBEMAP_LAYER_BACK: @@ -1104,7 +1108,7 @@ enum **CubeMapLayer**: :ref:`CubeMapLayer` **CUBEMAP_LAYER_BACK** = ``5`` - +Back face of a :ref:`Cubemap`. .. rst-class:: classref-item-separator @@ -1138,7 +1142,7 @@ Shader is a 2D shader. :ref:`ShaderMode` **SHADER_PARTICLES** = ``2`` -Shader is a particle shader. +Shader is a particle shader (can be used in both 2D and 3D). .. _class_RenderingServer_constant_SHADER_SKY: @@ -1146,7 +1150,7 @@ Shader is a particle shader. :ref:`ShaderMode` **SHADER_SKY** = ``3`` -Shader is a sky shader. +Shader is a 3D sky shader. .. _class_RenderingServer_constant_SHADER_FOG: @@ -1154,7 +1158,7 @@ Shader is a sky shader. :ref:`ShaderMode` **SHADER_FOG** = ``4`` -Shader is a fog shader. +Shader is a 3D fog shader. .. _class_RenderingServer_constant_SHADER_MAX: @@ -1180,7 +1184,7 @@ enum **ArrayType**: :ref:`ArrayType` **ARRAY_VERTEX** = ``0`` -Array is a vertex array. +Array is a vertex position array. .. _class_RenderingServer_constant_ARRAY_NORMAL: @@ -1204,7 +1208,7 @@ Array is a tangent array. :ref:`ArrayType` **ARRAY_COLOR** = ``3`` -Array is a color array. +Array is a vertex color array. .. _class_RenderingServer_constant_ARRAY_TEX_UV: @@ -1212,7 +1216,7 @@ Array is a color array. :ref:`ArrayType` **ARRAY_TEX_UV** = ``4`` -Array is an UV coordinates array. +Array is a UV coordinates array. .. _class_RenderingServer_constant_ARRAY_TEX_UV2: @@ -1220,7 +1224,7 @@ Array is an UV coordinates array. :ref:`ArrayType` **ARRAY_TEX_UV2** = ``5`` -Array is an UV coordinates array for the second UV coordinates. +Array is a UV coordinates array for the second set of UV coordinates. .. _class_RenderingServer_constant_ARRAY_CUSTOM0: @@ -1228,7 +1232,7 @@ Array is an UV coordinates array for the second UV coordinates. :ref:`ArrayType` **ARRAY_CUSTOM0** = ``6`` - +Array is a custom data array for the first set of custom data. .. _class_RenderingServer_constant_ARRAY_CUSTOM1: @@ -1236,7 +1240,7 @@ Array is an UV coordinates array for the second UV coordinates. :ref:`ArrayType` **ARRAY_CUSTOM1** = ``7`` - +Array is a custom data array for the second set of custom data. .. _class_RenderingServer_constant_ARRAY_CUSTOM2: @@ -1244,7 +1248,7 @@ Array is an UV coordinates array for the second UV coordinates. :ref:`ArrayType` **ARRAY_CUSTOM2** = ``8`` - +Array is a custom data array for the third set of custom data. .. _class_RenderingServer_constant_ARRAY_CUSTOM3: @@ -1252,7 +1256,7 @@ Array is an UV coordinates array for the second UV coordinates. :ref:`ArrayType` **ARRAY_CUSTOM3** = ``9`` - +Array is a custom data array for the fourth set of custom data. .. _class_RenderingServer_constant_ARRAY_BONES: @@ -1276,7 +1280,7 @@ Array is weight information. :ref:`ArrayType` **ARRAY_INDEX** = ``12`` -Array is index array. +Array is an index array. .. _class_RenderingServer_constant_ARRAY_MAX: @@ -1302,7 +1306,7 @@ enum **ArrayCustomFormat**: :ref:`ArrayCustomFormat` **ARRAY_CUSTOM_RGBA8_UNORM** = ``0`` - +Custom data array contains 8-bit-per-channel red/green/blue/alpha color data. Values are normalized, unsigned floating-point in the ``[0.0, 1.0]`` range. .. _class_RenderingServer_constant_ARRAY_CUSTOM_RGBA8_SNORM: @@ -1310,7 +1314,7 @@ enum **ArrayCustomFormat**: :ref:`ArrayCustomFormat` **ARRAY_CUSTOM_RGBA8_SNORM** = ``1`` - +Custom data array contains 8-bit-per-channel red/green/blue/alpha color data. Values are normalized, signed floating-point in the ``[-1.0, 1.0]`` range. .. _class_RenderingServer_constant_ARRAY_CUSTOM_RG_HALF: @@ -1318,7 +1322,7 @@ enum **ArrayCustomFormat**: :ref:`ArrayCustomFormat` **ARRAY_CUSTOM_RG_HALF** = ``2`` - +Custom data array contains 16-bit-per-channel red/green color data. Values are floating-point in half precision. .. _class_RenderingServer_constant_ARRAY_CUSTOM_RGBA_HALF: @@ -1326,7 +1330,7 @@ enum **ArrayCustomFormat**: :ref:`ArrayCustomFormat` **ARRAY_CUSTOM_RGBA_HALF** = ``3`` - +Custom data array contains 16-bit-per-channel red/green/blue/alpha color data. Values are floating-point in half precision. .. _class_RenderingServer_constant_ARRAY_CUSTOM_R_FLOAT: @@ -1334,7 +1338,7 @@ enum **ArrayCustomFormat**: :ref:`ArrayCustomFormat` **ARRAY_CUSTOM_R_FLOAT** = ``4`` - +Custom data array contains 32-bit-per-channel red color data. Values are floating-point in single precision. .. _class_RenderingServer_constant_ARRAY_CUSTOM_RG_FLOAT: @@ -1342,7 +1346,7 @@ enum **ArrayCustomFormat**: :ref:`ArrayCustomFormat` **ARRAY_CUSTOM_RG_FLOAT** = ``5`` - +Custom data array contains 32-bit-per-channel red/green color data. Values are floating-point in single precision. .. _class_RenderingServer_constant_ARRAY_CUSTOM_RGB_FLOAT: @@ -1350,7 +1354,7 @@ enum **ArrayCustomFormat**: :ref:`ArrayCustomFormat` **ARRAY_CUSTOM_RGB_FLOAT** = ``6`` - +Custom data array contains 32-bit-per-channel red/green/blue color data. Values are floating-point in single precision. .. _class_RenderingServer_constant_ARRAY_CUSTOM_RGBA_FLOAT: @@ -1358,7 +1362,7 @@ enum **ArrayCustomFormat**: :ref:`ArrayCustomFormat` **ARRAY_CUSTOM_RGBA_FLOAT** = ``7`` - +Custom data array contains 32-bit-per-channel red/green/blue/alpha color data. Values are floating-point in single precision. .. _class_RenderingServer_constant_ARRAY_CUSTOM_MAX: @@ -1366,7 +1370,7 @@ enum **ArrayCustomFormat**: :ref:`ArrayCustomFormat` **ARRAY_CUSTOM_MAX** = ``8`` - +Represents the size of the :ref:`ArrayCustomFormat` enum. .. rst-class:: classref-item-separator @@ -1384,7 +1388,7 @@ flags **ArrayFormat**: :ref:`ArrayFormat` **ARRAY_FORMAT_VERTEX** = ``1`` -Flag used to mark a vertex array. +Flag used to mark a vertex position array. .. _class_RenderingServer_constant_ARRAY_FORMAT_NORMAL: @@ -1408,7 +1412,7 @@ Flag used to mark a tangent array. :ref:`ArrayFormat` **ARRAY_FORMAT_COLOR** = ``8`` -Flag used to mark a color array. +Flag used to mark a vertex color array. .. _class_RenderingServer_constant_ARRAY_FORMAT_TEX_UV: @@ -1416,7 +1420,7 @@ Flag used to mark a color array. :ref:`ArrayFormat` **ARRAY_FORMAT_TEX_UV** = ``16`` -Flag used to mark an UV coordinates array. +Flag used to mark a UV coordinates array. .. _class_RenderingServer_constant_ARRAY_FORMAT_TEX_UV2: @@ -1424,7 +1428,7 @@ Flag used to mark an UV coordinates array. :ref:`ArrayFormat` **ARRAY_FORMAT_TEX_UV2** = ``32`` -Flag used to mark an UV coordinates array for the second UV coordinates. +Flag used to mark a UV coordinates array for the second UV coordinates. .. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM0: @@ -1432,7 +1436,7 @@ Flag used to mark an UV coordinates array for the second UV coordinates. :ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM0** = ``64`` - +Flag used to mark an array of custom per-vertex data for the first set of custom data. .. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM1: @@ -1440,7 +1444,7 @@ Flag used to mark an UV coordinates array for the second UV coordinates. :ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM1** = ``128`` - +Flag used to mark an array of custom per-vertex data for the second set of custom data. .. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM2: @@ -1448,7 +1452,7 @@ Flag used to mark an UV coordinates array for the second UV coordinates. :ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM2** = ``256`` - +Flag used to mark an array of custom per-vertex data for the third set of custom data. .. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM3: @@ -1456,7 +1460,7 @@ Flag used to mark an UV coordinates array for the second UV coordinates. :ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM3** = ``512`` - +Flag used to mark an array of custom per-vertex data for the fourth set of custom data. .. _class_RenderingServer_constant_ARRAY_FORMAT_BONES: @@ -1576,7 +1580,7 @@ Flag used to mark that the array contains 2D vertices. :ref:`ArrayFormat` **ARRAY_FLAG_USE_8_BONE_WEIGHTS** = ``134217728`` - +Flag used to mark that the array uses 8 bone weighs instead of 4. .. _class_RenderingServer_constant_ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY: @@ -1770,7 +1774,7 @@ enum **LightType**: :ref:`LightType` **LIGHT_DIRECTIONAL** = ``0`` -Is a directional (sun) light. +Directional (sun/moon) light (see :ref:`DirectionalLight3D`). .. _class_RenderingServer_constant_LIGHT_OMNI: @@ -1778,7 +1782,7 @@ Is a directional (sun) light. :ref:`LightType` **LIGHT_OMNI** = ``1`` -Is an omni light. +Omni light (see :ref:`OmniLight3D`). .. _class_RenderingServer_constant_LIGHT_SPOT: @@ -1786,7 +1790,7 @@ Is an omni light. :ref:`LightType` **LIGHT_SPOT** = ``2`` -Is a spot light. +Spot light (see :ref:`SpotLight3D`). .. rst-class:: classref-item-separator @@ -1876,7 +1880,7 @@ The spotlight's attenuation. :ref:`LightParam` **LIGHT_PARAM_SHADOW_MAX_DISTANCE** = ``9`` -Max distance that shadows will be rendered. +The maximum distance for shadow splits. Increasing this value will make directional shadows visible from further away, at the cost of lower overall shadow detail and performance (since more objects need to be included in the directional shadow rendering). .. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET: @@ -1982,7 +1986,7 @@ enum **LightBakeMode**: :ref:`LightBakeMode` **LIGHT_BAKE_DISABLED** = ``0`` - +Light is ignored when baking. This is the fastest mode, but the light will be taken into account when baking global illumination. This mode should generally be used for dynamic lights that change quickly, as the effect of global illumination is less noticeable on those lights. .. _class_RenderingServer_constant_LIGHT_BAKE_STATIC: @@ -1990,7 +1994,7 @@ enum **LightBakeMode**: :ref:`LightBakeMode` **LIGHT_BAKE_STATIC** = ``1`` - +Light is taken into account in static baking (:ref:`VoxelGI`, :ref:`LightmapGI`, SDFGI (:ref:`Environment.sdfgi_enabled`)). The light can be moved around or modified, but its global illumination will not update in real-time. This is suitable for subtle changes (such as flickering torches), but generally not large changes such as toggling a light on and off. .. _class_RenderingServer_constant_LIGHT_BAKE_DYNAMIC: @@ -1998,7 +2002,7 @@ enum **LightBakeMode**: :ref:`LightBakeMode` **LIGHT_BAKE_DYNAMIC** = ``2`` - +Light is taken into account in dynamic baking (:ref:`VoxelGI` and SDFGI (:ref:`Environment.sdfgi_enabled`) only). The light can be moved around or modified with global illumination updating in real-time. The light's global illumination appearance will be slightly different compared to :ref:`LIGHT_BAKE_STATIC`. This has a greater performance cost compared to :ref:`LIGHT_BAKE_STATIC`. When using SDFGI, the update speed of dynamic lights is affected by :ref:`ProjectSettings.rendering/global_illumination/sdfgi/frames_to_update_lights`. .. rst-class:: classref-item-separator @@ -2160,7 +2164,7 @@ Highest low shadow filtering quality (slowest). When using this quality setting, :ref:`ShadowQuality` **SHADOW_QUALITY_MAX** = ``6`` - +Represents the size of the :ref:`ShadowQuality` enum. .. rst-class:: classref-item-separator @@ -2204,7 +2208,7 @@ enum **ReflectionProbeAmbientMode**: :ref:`ReflectionProbeAmbientMode` **REFLECTION_PROBE_AMBIENT_DISABLED** = ``0`` - +Do not apply any ambient lighting inside the reflection probe's box defined by its size. .. _class_RenderingServer_constant_REFLECTION_PROBE_AMBIENT_ENVIRONMENT: @@ -2212,7 +2216,7 @@ enum **ReflectionProbeAmbientMode**: :ref:`ReflectionProbeAmbientMode` **REFLECTION_PROBE_AMBIENT_ENVIRONMENT** = ``1`` - +Apply automatically-sourced environment lighting inside the reflection probe's box defined by its size. .. _class_RenderingServer_constant_REFLECTION_PROBE_AMBIENT_COLOR: @@ -2220,7 +2224,7 @@ enum **ReflectionProbeAmbientMode**: :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`. .. rst-class:: classref-item-separator @@ -2238,7 +2242,7 @@ enum **DecalTexture**: :ref:`DecalTexture` **DECAL_TEXTURE_ALBEDO** = ``0`` - +Albedo texture slot in a decal (:ref:`Decal.texture_albedo`). .. _class_RenderingServer_constant_DECAL_TEXTURE_NORMAL: @@ -2246,7 +2250,7 @@ enum **DecalTexture**: :ref:`DecalTexture` **DECAL_TEXTURE_NORMAL** = ``1`` - +Normal map texture slot in a decal (:ref:`Decal.texture_normal`). .. _class_RenderingServer_constant_DECAL_TEXTURE_ORM: @@ -2254,7 +2258,7 @@ enum **DecalTexture**: :ref:`DecalTexture` **DECAL_TEXTURE_ORM** = ``2`` - +Occlusion/Roughness/Metallic texture slot in a decal (:ref:`Decal.texture_orm`). .. _class_RenderingServer_constant_DECAL_TEXTURE_EMISSION: @@ -2262,7 +2266,7 @@ enum **DecalTexture**: :ref:`DecalTexture` **DECAL_TEXTURE_EMISSION** = ``3`` - +Emission texture slot in a decal (:ref:`Decal.texture_emission`). .. _class_RenderingServer_constant_DECAL_TEXTURE_MAX: @@ -2270,7 +2274,7 @@ enum **DecalTexture**: :ref:`DecalTexture` **DECAL_TEXTURE_MAX** = ``4`` - +Represents the size of the :ref:`DecalTexture` enum. .. rst-class:: classref-item-separator @@ -2346,7 +2350,7 @@ enum **VoxelGIQuality**: :ref:`VoxelGIQuality` **VOXEL_GI_QUALITY_LOW** = ``0`` - +Low :ref:`VoxelGI` rendering quality using 4 cones. .. _class_RenderingServer_constant_VOXEL_GI_QUALITY_HIGH: @@ -2354,7 +2358,7 @@ enum **VoxelGIQuality**: :ref:`VoxelGIQuality` **VOXEL_GI_QUALITY_HIGH** = ``1`` - +High :ref:`VoxelGI` rendering quality using 6 cones. .. rst-class:: classref-item-separator @@ -2372,7 +2376,7 @@ enum **ParticlesMode**: :ref:`ParticlesMode` **PARTICLES_MODE_2D** = ``0`` - +2D particles. .. _class_RenderingServer_constant_PARTICLES_MODE_3D: @@ -2380,7 +2384,7 @@ enum **ParticlesMode**: :ref:`ParticlesMode` **PARTICLES_MODE_3D** = ``1`` - +3D particles. .. rst-class:: classref-item-separator @@ -2596,7 +2600,7 @@ enum **ParticlesCollisionHeightfieldResolution**: :ref:`ParticlesCollisionHeightfieldResolution` **PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_MAX** = ``6`` - +Represents the size of the :ref:`ParticlesCollisionHeightfieldResolution` enum. .. rst-class:: classref-item-separator @@ -2654,7 +2658,7 @@ enum **FogVolumeShape**: :ref:`FogVolumeShape` **FOG_VOLUME_SHAPE_MAX** = ``5`` - +Represents the size of the :ref:`FogVolumeShape` enum. .. rst-class:: classref-item-separator @@ -2672,7 +2676,7 @@ enum **ViewportScaling3DMode**: :ref:`ViewportScaling3DMode` **VIEWPORT_SCALING_3D_MODE_BILINEAR** = ``0`` -Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`Viewport.scaling_3d_scale`. Values less then ``1.0`` will result in undersampling while values greater than ``1.0`` will result in supersampling. A value of ``1.0`` disables scaling. +Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`Viewport.scaling_3d_scale`. Values less than ``1.0`` will result in undersampling while values greater than ``1.0`` will result in supersampling. A value of ``1.0`` disables scaling. .. _class_RenderingServer_constant_VIEWPORT_SCALING_3D_MODE_FSR: @@ -2680,7 +2684,7 @@ Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be :ref:`ViewportScaling3DMode` **VIEWPORT_SCALING_3D_MODE_FSR** = ``1`` -Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`Viewport.scaling_3d_scale`. Values less then ``1.0`` will be result in the viewport being upscaled using FSR. Values greater than ``1.0`` are not supported and bilinear downsampling will be used instead. A value of ``1.0`` disables scaling. +Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`Viewport.scaling_3d_scale`. Values less than ``1.0`` will be result in the viewport being upscaled using FSR. Values greater than ``1.0`` are not supported and bilinear downsampling will be used instead. A value of ``1.0`` disables scaling. .. _class_RenderingServer_constant_VIEWPORT_SCALING_3D_MODE_MAX: @@ -2688,7 +2692,7 @@ Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. :ref:`ViewportScaling3DMode` **VIEWPORT_SCALING_3D_MODE_MAX** = ``2`` - +Represents the size of the :ref:`ViewportScaling3DMode` enum. .. rst-class:: classref-item-separator @@ -2706,7 +2710,7 @@ enum **ViewportUpdateMode**: :ref:`ViewportUpdateMode` **VIEWPORT_UPDATE_DISABLED** = ``0`` -Do not update the viewport. +Do not update the viewport's render target. .. _class_RenderingServer_constant_VIEWPORT_UPDATE_ONCE: @@ -2714,7 +2718,7 @@ Do not update the viewport. :ref:`ViewportUpdateMode` **VIEWPORT_UPDATE_ONCE** = ``1`` -Update the viewport once then set to disabled. +Update the viewport's render target once, then switch to :ref:`VIEWPORT_UPDATE_DISABLED`. .. _class_RenderingServer_constant_VIEWPORT_UPDATE_WHEN_VISIBLE: @@ -2722,7 +2726,7 @@ Update the viewport once then set to disabled. :ref:`ViewportUpdateMode` **VIEWPORT_UPDATE_WHEN_VISIBLE** = ``2`` -Update the viewport whenever it is visible. +Update the viewport's render target only when it is visible. This is the default value. .. _class_RenderingServer_constant_VIEWPORT_UPDATE_WHEN_PARENT_VISIBLE: @@ -2730,7 +2734,7 @@ Update the viewport whenever it is visible. :ref:`ViewportUpdateMode` **VIEWPORT_UPDATE_WHEN_PARENT_VISIBLE** = ``3`` - +Update the viewport's render target only when its parent is visible. .. _class_RenderingServer_constant_VIEWPORT_UPDATE_ALWAYS: @@ -2738,7 +2742,7 @@ Update the viewport whenever it is visible. :ref:`ViewportUpdateMode` **VIEWPORT_UPDATE_ALWAYS** = ``4`` -Always update the viewport. +Always update the viewport's render target. .. rst-class:: classref-item-separator @@ -2756,7 +2760,7 @@ enum **ViewportClearMode**: :ref:`ViewportClearMode` **VIEWPORT_CLEAR_ALWAYS** = ``0`` -The viewport is always cleared before drawing. +Always clear the viewport's render target before drawing. .. _class_RenderingServer_constant_VIEWPORT_CLEAR_NEVER: @@ -2764,7 +2768,7 @@ The viewport is always cleared before drawing. :ref:`ViewportClearMode` **VIEWPORT_CLEAR_NEVER** = ``1`` -The viewport is never cleared before drawing. +Never clear the viewport's render target. .. _class_RenderingServer_constant_VIEWPORT_CLEAR_ONLY_NEXT_FRAME: @@ -2772,7 +2776,7 @@ The viewport is never cleared before drawing. :ref:`ViewportClearMode` **VIEWPORT_CLEAR_ONLY_NEXT_FRAME** = ``2`` -The viewport is cleared once, then the clear mode is set to :ref:`VIEWPORT_CLEAR_NEVER`. +Clear the viewport's render target on the next frame, then switch to :ref:`VIEWPORT_CLEAR_NEVER`. .. rst-class:: classref-item-separator @@ -2806,7 +2810,7 @@ Enable rendering of 3D environment over 2D canvas. :ref:`ViewportEnvironmentMode` **VIEWPORT_ENVIRONMENT_INHERIT** = ``2`` -Inherit enable/disable value from parent. If topmost parent is also set to inherit, then this has the same behavior as :ref:`VIEWPORT_ENVIRONMENT_ENABLED`. +Inherit enable/disable value from parent. If the topmost parent is also set to :ref:`VIEWPORT_ENVIRONMENT_INHERIT`, then this has the same behavior as :ref:`VIEWPORT_ENVIRONMENT_ENABLED`. .. _class_RenderingServer_constant_VIEWPORT_ENVIRONMENT_MAX: @@ -2814,7 +2818,7 @@ Inherit enable/disable value from parent. If topmost parent is also set to inher :ref:`ViewportEnvironmentMode` **VIEWPORT_ENVIRONMENT_MAX** = ``3`` -Max value of :ref:`ViewportEnvironmentMode` enum. +Represents the size of the :ref:`ViewportEnvironmentMode` enum. .. rst-class:: classref-item-separator @@ -2832,7 +2836,7 @@ enum **ViewportSDFOversize**: :ref:`ViewportSDFOversize` **VIEWPORT_SDF_OVERSIZE_100_PERCENT** = ``0`` - +Do not oversize the 2D signed distance field. Occluders may disappear when touching the viewport's edges, and :ref:`GPUParticles3D` collision may stop working earlier than intended. This has the lowest GPU requirements. .. _class_RenderingServer_constant_VIEWPORT_SDF_OVERSIZE_120_PERCENT: @@ -2840,7 +2844,7 @@ enum **ViewportSDFOversize**: :ref:`ViewportSDFOversize` **VIEWPORT_SDF_OVERSIZE_120_PERCENT** = ``1`` - +2D signed distance field covers 20% of the viewport's size outside the viewport on each side (top, right, bottom, left). .. _class_RenderingServer_constant_VIEWPORT_SDF_OVERSIZE_150_PERCENT: @@ -2848,7 +2852,7 @@ enum **ViewportSDFOversize**: :ref:`ViewportSDFOversize` **VIEWPORT_SDF_OVERSIZE_150_PERCENT** = ``2`` - +2D signed distance field covers 50% of the viewport's size outside the viewport on each side (top, right, bottom, left). .. _class_RenderingServer_constant_VIEWPORT_SDF_OVERSIZE_200_PERCENT: @@ -2856,7 +2860,7 @@ enum **ViewportSDFOversize**: :ref:`ViewportSDFOversize` **VIEWPORT_SDF_OVERSIZE_200_PERCENT** = ``3`` - +2D signed distance field covers 100% of the viewport's size outside the viewport on each side (top, right, bottom, left). This has the highest GPU requirements. .. _class_RenderingServer_constant_VIEWPORT_SDF_OVERSIZE_MAX: @@ -2864,7 +2868,7 @@ enum **ViewportSDFOversize**: :ref:`ViewportSDFOversize` **VIEWPORT_SDF_OVERSIZE_MAX** = ``4`` - +Represents the size of the :ref:`ViewportSDFOversize` enum. .. rst-class:: classref-item-separator @@ -2882,7 +2886,7 @@ enum **ViewportSDFScale**: :ref:`ViewportSDFScale` **VIEWPORT_SDF_SCALE_100_PERCENT** = ``0`` - +Full resolution 2D signed distance field scale. This has the highest GPU requirements. .. _class_RenderingServer_constant_VIEWPORT_SDF_SCALE_50_PERCENT: @@ -2890,7 +2894,7 @@ enum **ViewportSDFScale**: :ref:`ViewportSDFScale` **VIEWPORT_SDF_SCALE_50_PERCENT** = ``1`` - +Half resolution 2D signed distance field scale on each axis (25% of the viewport pixel count). .. _class_RenderingServer_constant_VIEWPORT_SDF_SCALE_25_PERCENT: @@ -2898,7 +2902,7 @@ enum **ViewportSDFScale**: :ref:`ViewportSDFScale` **VIEWPORT_SDF_SCALE_25_PERCENT** = ``2`` - +Quarter resolution 2D signed distance field scale on each axis (6.25% of the viewport pixel count). This has the lowest GPU requirements. .. _class_RenderingServer_constant_VIEWPORT_SDF_SCALE_MAX: @@ -2906,7 +2910,7 @@ enum **ViewportSDFScale**: :ref:`ViewportSDFScale` **VIEWPORT_SDF_SCALE_MAX** = ``3`` - +Represents the size of the :ref:`ViewportSDFScale` enum. .. rst-class:: classref-item-separator @@ -2956,7 +2960,7 @@ Multisample antialiasing uses 8 samples per pixel for 3D. This has a very high i :ref:`ViewportMSAA` **VIEWPORT_MSAA_MAX** = ``4`` - +Represents the size of the :ref:`ViewportMSAA` enum. .. rst-class:: classref-item-separator @@ -2974,7 +2978,7 @@ enum **ViewportScreenSpaceAA**: :ref:`ViewportScreenSpaceAA` **VIEWPORT_SCREEN_SPACE_AA_DISABLED** = ``0`` - +Do not perform any antialiasing in the full screen post-process. .. _class_RenderingServer_constant_VIEWPORT_SCREEN_SPACE_AA_FXAA: @@ -2982,7 +2986,7 @@ enum **ViewportScreenSpaceAA**: :ref:`ViewportScreenSpaceAA` **VIEWPORT_SCREEN_SPACE_AA_FXAA** = ``1`` - +Use fast approximate antialiasing. FXAA is a popular screen-space antialiasing method, which is fast but will make the image look blurry, especially at lower resolutions. It can still work relatively well at large resolutions such as 1440p and 4K. .. _class_RenderingServer_constant_VIEWPORT_SCREEN_SPACE_AA_MAX: @@ -2990,7 +2994,7 @@ enum **ViewportScreenSpaceAA**: :ref:`ViewportScreenSpaceAA` **VIEWPORT_SCREEN_SPACE_AA_MAX** = ``2`` - +Represents the size of the :ref:`ViewportScreenSpaceAA` enum. .. rst-class:: classref-item-separator @@ -3008,7 +3012,7 @@ enum **ViewportOcclusionCullingBuildQuality**: :ref:`ViewportOcclusionCullingBuildQuality` **VIEWPORT_OCCLUSION_BUILD_QUALITY_LOW** = ``0`` - +Low occlusion culling BVH build quality (as defined by Embree). Results in the lowest CPU usage, but least effective culling. .. _class_RenderingServer_constant_VIEWPORT_OCCLUSION_BUILD_QUALITY_MEDIUM: @@ -3016,7 +3020,7 @@ enum **ViewportOcclusionCullingBuildQuality**: :ref:`ViewportOcclusionCullingBuildQuality` **VIEWPORT_OCCLUSION_BUILD_QUALITY_MEDIUM** = ``1`` - +Medium occlusion culling BVH build quality (as defined by Embree). .. _class_RenderingServer_constant_VIEWPORT_OCCLUSION_BUILD_QUALITY_HIGH: @@ -3024,7 +3028,7 @@ enum **ViewportOcclusionCullingBuildQuality**: :ref:`ViewportOcclusionCullingBuildQuality` **VIEWPORT_OCCLUSION_BUILD_QUALITY_HIGH** = ``2`` - +High occlusion culling BVH build quality (as defined by Embree). Results in the highest CPU usage, but most effective culling. .. rst-class:: classref-item-separator @@ -3084,7 +3088,7 @@ enum **ViewportRenderInfoType**: :ref:`ViewportRenderInfoType` **VIEWPORT_RENDER_INFO_TYPE_VISIBLE** = ``0`` - +Visible render pass (excluding shadows). .. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_TYPE_SHADOW: @@ -3092,7 +3096,7 @@ enum **ViewportRenderInfoType**: :ref:`ViewportRenderInfoType` **VIEWPORT_RENDER_INFO_TYPE_SHADOW** = ``1`` - +Shadow render pass. Objects will be rendered several times depending on the number of amounts of lights with shadows and the number of directional shadow splits. .. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_TYPE_MAX: @@ -3100,7 +3104,7 @@ enum **ViewportRenderInfoType**: :ref:`ViewportRenderInfoType` **VIEWPORT_RENDER_INFO_TYPE_MAX** = ``2`` - +Represents the size of the :ref:`ViewportRenderInfoType` enum. .. rst-class:: classref-item-separator @@ -3208,7 +3212,7 @@ Draws the shadow atlas that stores shadows from :ref:`DirectionalLight3D` **VIEWPORT_DEBUG_DRAW_SCENE_LUMINANCE** = ``11`` - +Draws the estimated scene luminance. This is a 1×1 texture that is generated when autoexposure is enabled to control the scene's exposure. .. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_SSAO: @@ -3240,7 +3244,7 @@ Colors each PSSM split for the :ref:`DirectionalLight3D` **VIEWPORT_DEBUG_DRAW_DECAL_ATLAS** = ``15`` - +Draws the decal atlas that stores decal textures from :ref:`Decal`\ s. .. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_SDFGI: @@ -3248,7 +3252,7 @@ Colors each PSSM split for the :ref:`DirectionalLight3D` **VIEWPORT_DEBUG_DRAW_SDFGI** = ``16`` - +Draws SDFGI cascade data. This is the data structure that is used to bounce lighting against and create reflections. .. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_SDFGI_PROBES: @@ -3256,7 +3260,7 @@ Colors each PSSM split for the :ref:`DirectionalLight3D` **VIEWPORT_DEBUG_DRAW_SDFGI_PROBES** = ``17`` - +Draws SDFGI probe data. This is the data structure that is used to give indirect lighting dynamic objects moving within the scene. .. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_GI_BUFFER: @@ -3264,7 +3268,7 @@ Colors each PSSM split for the :ref:`DirectionalLight3D` **VIEWPORT_DEBUG_DRAW_GI_BUFFER** = ``18`` - +Draws the global illumination buffer (:ref:`VoxelGI` or SDFGI). .. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_DISABLE_LOD: @@ -3272,7 +3276,7 @@ Colors each PSSM split for the :ref:`DirectionalLight3D` **VIEWPORT_DEBUG_DRAW_DISABLE_LOD** = ``19`` - +Disable mesh LOD. All meshes are drawn with full detail, which can be used to compare performance. .. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS: @@ -3280,7 +3284,7 @@ Colors each PSSM split for the :ref:`DirectionalLight3D` **VIEWPORT_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS** = ``20`` - +Draws the :ref:`OmniLight3D` cluster. Clustering determines where lights are positioned in screen-space, which allows the engine to only process these portions of the screen for lighting. .. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS: @@ -3288,7 +3292,7 @@ Colors each PSSM split for the :ref:`DirectionalLight3D` **VIEWPORT_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS** = ``21`` - +Draws the :ref:`SpotLight3D` cluster. Clustering determines where lights are positioned in screen-space, which allows the engine to only process these portions of the screen for lighting. .. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_CLUSTER_DECALS: @@ -3296,7 +3300,7 @@ Colors each PSSM split for the :ref:`DirectionalLight3D` **VIEWPORT_DEBUG_DRAW_CLUSTER_DECALS** = ``22`` - +Draws the :ref:`Decal` cluster. Clustering determines where decals are positioned in screen-space, which allows the engine to only process these portions of the screen for decals. .. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES: @@ -3304,7 +3308,7 @@ Colors each PSSM split for the :ref:`DirectionalLight3D` **VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES** = ``23`` - +Draws the :ref:`ReflectionProbe` cluster. Clustering determines where reflection probes are positioned in screen-space, which allows the engine to only process these portions of the screen for reflection probes. .. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_OCCLUDERS: @@ -3312,7 +3316,7 @@ Colors each PSSM split for the :ref:`DirectionalLight3D` **VIEWPORT_DEBUG_DRAW_OCCLUDERS** = ``24`` - +Draws the occlusion culling buffer. This low-resolution occlusion culling buffer is rasterized on the CPU and is used to check whether instances are occluded by other objects. .. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_MOTION_VECTORS: @@ -3320,7 +3324,7 @@ Colors each PSSM split for the :ref:`DirectionalLight3D` **VIEWPORT_DEBUG_DRAW_MOTION_VECTORS** = ``25`` - +Draws the motion vectors buffer. This is used by temporal antialiasing to correct for motion that occurs during gameplay. .. rst-class:: classref-item-separator @@ -3338,7 +3342,7 @@ enum **ViewportVRSMode**: :ref:`ViewportVRSMode` **VIEWPORT_VRS_DISABLED** = ``0`` -VRS is disabled. +Variable rate shading is disabled. .. _class_RenderingServer_constant_VIEWPORT_VRS_TEXTURE: @@ -3346,7 +3350,7 @@ VRS is disabled. :ref:`ViewportVRSMode` **VIEWPORT_VRS_TEXTURE** = ``1`` -VRS uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view. +Variable rate shading uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view. .. _class_RenderingServer_constant_VIEWPORT_VRS_XR: @@ -3354,7 +3358,7 @@ VRS uses a texture. Note, for stereoscopic use a texture atlas with a texture fo :ref:`ViewportVRSMode` **VIEWPORT_VRS_XR** = ``2`` -VRS texture is supplied by the primary :ref:`XRInterface`. +Variable rate shading texture is supplied by the primary :ref:`XRInterface`. .. _class_RenderingServer_constant_VIEWPORT_VRS_MAX: @@ -3380,7 +3384,7 @@ enum **SkyMode**: :ref:`SkyMode` **SKY_MODE_AUTOMATIC** = ``0`` - +Automatically selects the appropriate process mode based on your sky shader. If your shader uses ``TIME`` or ``POSITION``, this will use :ref:`SKY_MODE_REALTIME`. If your shader uses any of the ``LIGHT_*`` variables or any custom uniforms, this uses :ref:`SKY_MODE_INCREMENTAL`. Otherwise, this defaults to :ref:`SKY_MODE_QUALITY`. .. _class_RenderingServer_constant_SKY_MODE_QUALITY: @@ -3388,7 +3392,7 @@ enum **SkyMode**: :ref:`SkyMode` **SKY_MODE_QUALITY** = ``1`` -Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than :ref:`Sky.PROCESS_MODE_REALTIME` but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing :ref:`ProjectSettings.rendering/reflections/sky_reflections/ggx_samples`. +Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than :ref:`SKY_MODE_REALTIME` but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing :ref:`ProjectSettings.rendering/reflections/sky_reflections/ggx_samples`. .. _class_RenderingServer_constant_SKY_MODE_INCREMENTAL: @@ -3396,7 +3400,7 @@ Uses high quality importance sampling to process the radiance map. In general, t :ref:`SkyMode` **SKY_MODE_INCREMENTAL** = ``2`` - +Uses the same high quality importance sampling to process the radiance map as :ref:`SKY_MODE_QUALITY`, but updates over several frames. The number of frames is determined by :ref:`ProjectSettings.rendering/reflections/sky_reflections/roughness_layers`. Use this when you need highest quality radiance maps, but have a sky that updates slowly. .. _class_RenderingServer_constant_SKY_MODE_REALTIME: @@ -3404,9 +3408,9 @@ Uses high quality importance sampling to process the radiance map. In general, t :ref:`SkyMode` **SKY_MODE_REALTIME** = ``3`` -Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. +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 256x256 cubemaps, so :ref:`Sky.radiance_size` must be set to :ref:`Sky.RADIANCE_SIZE_256`. +\ **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 @@ -3802,7 +3806,7 @@ enum **EnvironmentSDFGIYScale**: :ref:`EnvironmentSDFGIYScale` **ENV_SDFGI_Y_SCALE_50_PERCENT** = ``0`` - +Use 50% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be twice as short as they are wide. This allows providing increased GI detail and reduced light leaking with thin floors and ceilings. This is usually the best choice for scenes that don't feature much verticality. .. _class_RenderingServer_constant_ENV_SDFGI_Y_SCALE_75_PERCENT: @@ -3810,7 +3814,7 @@ enum **EnvironmentSDFGIYScale**: :ref:`EnvironmentSDFGIYScale` **ENV_SDFGI_Y_SCALE_75_PERCENT** = ``1`` - +Use 75% scale for SDFGI on the Y (vertical) axis. This is a balance between the 50% and 100% SDFGI Y scales. .. _class_RenderingServer_constant_ENV_SDFGI_Y_SCALE_100_PERCENT: @@ -3818,7 +3822,7 @@ enum **EnvironmentSDFGIYScale**: :ref:`EnvironmentSDFGIYScale` **ENV_SDFGI_Y_SCALE_100_PERCENT** = ``2`` - +Use 100% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be as tall as they are wide. This is usually the best choice for highly vertical scenes. The downside is that light leaking may become more noticeable with thin floors and ceilings. .. rst-class:: classref-item-separator @@ -3836,7 +3840,7 @@ enum **EnvironmentSDFGIRayCount**: :ref:`EnvironmentSDFGIRayCount` **ENV_SDFGI_RAY_COUNT_4** = ``0`` - +Throw 4 rays per frame when converging SDFGI. This has the lowest GPU requirements, but creates the most noisy result. .. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_8: @@ -3844,7 +3848,7 @@ enum **EnvironmentSDFGIRayCount**: :ref:`EnvironmentSDFGIRayCount` **ENV_SDFGI_RAY_COUNT_8** = ``1`` - +Throw 8 rays per frame when converging SDFGI. .. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_16: @@ -3852,7 +3856,7 @@ enum **EnvironmentSDFGIRayCount**: :ref:`EnvironmentSDFGIRayCount` **ENV_SDFGI_RAY_COUNT_16** = ``2`` - +Throw 16 rays per frame when converging SDFGI. .. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_32: @@ -3860,7 +3864,7 @@ enum **EnvironmentSDFGIRayCount**: :ref:`EnvironmentSDFGIRayCount` **ENV_SDFGI_RAY_COUNT_32** = ``3`` - +Throw 32 rays per frame when converging SDFGI. .. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_64: @@ -3868,7 +3872,7 @@ enum **EnvironmentSDFGIRayCount**: :ref:`EnvironmentSDFGIRayCount` **ENV_SDFGI_RAY_COUNT_64** = ``4`` - +Throw 64 rays per frame when converging SDFGI. .. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_96: @@ -3876,7 +3880,7 @@ enum **EnvironmentSDFGIRayCount**: :ref:`EnvironmentSDFGIRayCount` **ENV_SDFGI_RAY_COUNT_96** = ``5`` - +Throw 96 rays per frame when converging SDFGI. This has high GPU requirements. .. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_128: @@ -3884,7 +3888,7 @@ enum **EnvironmentSDFGIRayCount**: :ref:`EnvironmentSDFGIRayCount` **ENV_SDFGI_RAY_COUNT_128** = ``6`` - +Throw 128 rays per frame when converging SDFGI. This has very high GPU requirements, but creates the least noisy result. .. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_MAX: @@ -3892,7 +3896,7 @@ enum **EnvironmentSDFGIRayCount**: :ref:`EnvironmentSDFGIRayCount` **ENV_SDFGI_RAY_COUNT_MAX** = ``7`` - +Represents the size of the :ref:`EnvironmentSDFGIRayCount` enum. .. rst-class:: classref-item-separator @@ -3910,7 +3914,7 @@ enum **EnvironmentSDFGIFramesToConverge**: :ref:`EnvironmentSDFGIFramesToConverge` **ENV_SDFGI_CONVERGE_IN_5_FRAMES** = ``0`` - +Converge SDFGI over 5 frames. This is the most responsive, but creates the most noisy result with a given ray count. .. _class_RenderingServer_constant_ENV_SDFGI_CONVERGE_IN_10_FRAMES: @@ -3918,7 +3922,7 @@ enum **EnvironmentSDFGIFramesToConverge**: :ref:`EnvironmentSDFGIFramesToConverge` **ENV_SDFGI_CONVERGE_IN_10_FRAMES** = ``1`` - +Configure SDFGI to fully converge over 10 frames. .. _class_RenderingServer_constant_ENV_SDFGI_CONVERGE_IN_15_FRAMES: @@ -3926,7 +3930,7 @@ enum **EnvironmentSDFGIFramesToConverge**: :ref:`EnvironmentSDFGIFramesToConverge` **ENV_SDFGI_CONVERGE_IN_15_FRAMES** = ``2`` - +Configure SDFGI to fully converge over 15 frames. .. _class_RenderingServer_constant_ENV_SDFGI_CONVERGE_IN_20_FRAMES: @@ -3934,7 +3938,7 @@ enum **EnvironmentSDFGIFramesToConverge**: :ref:`EnvironmentSDFGIFramesToConverge` **ENV_SDFGI_CONVERGE_IN_20_FRAMES** = ``3`` - +Configure SDFGI to fully converge over 20 frames. .. _class_RenderingServer_constant_ENV_SDFGI_CONVERGE_IN_25_FRAMES: @@ -3942,7 +3946,7 @@ enum **EnvironmentSDFGIFramesToConverge**: :ref:`EnvironmentSDFGIFramesToConverge` **ENV_SDFGI_CONVERGE_IN_25_FRAMES** = ``4`` - +Configure SDFGI to fully converge over 25 frames. .. _class_RenderingServer_constant_ENV_SDFGI_CONVERGE_IN_30_FRAMES: @@ -3950,7 +3954,7 @@ enum **EnvironmentSDFGIFramesToConverge**: :ref:`EnvironmentSDFGIFramesToConverge` **ENV_SDFGI_CONVERGE_IN_30_FRAMES** = ``5`` - +Configure SDFGI to fully converge over 30 frames. This is the least responsive, but creates the least noisy result with a given ray count. .. _class_RenderingServer_constant_ENV_SDFGI_CONVERGE_MAX: @@ -3958,7 +3962,7 @@ enum **EnvironmentSDFGIFramesToConverge**: :ref:`EnvironmentSDFGIFramesToConverge` **ENV_SDFGI_CONVERGE_MAX** = ``6`` - +Represents the size of the :ref:`EnvironmentSDFGIFramesToConverge` enum. .. rst-class:: classref-item-separator @@ -3976,7 +3980,7 @@ enum **EnvironmentSDFGIFramesToUpdateLight**: :ref:`EnvironmentSDFGIFramesToUpdateLight` **ENV_SDFGI_UPDATE_LIGHT_IN_1_FRAME** = ``0`` - +Update indirect light from dynamic lights in SDFGI over 1 frame. This is the most responsive, but has the highest GPU requirements. .. _class_RenderingServer_constant_ENV_SDFGI_UPDATE_LIGHT_IN_2_FRAMES: @@ -3984,7 +3988,7 @@ enum **EnvironmentSDFGIFramesToUpdateLight**: :ref:`EnvironmentSDFGIFramesToUpdateLight` **ENV_SDFGI_UPDATE_LIGHT_IN_2_FRAMES** = ``1`` - +Update indirect light from dynamic lights in SDFGI over 2 frames. .. _class_RenderingServer_constant_ENV_SDFGI_UPDATE_LIGHT_IN_4_FRAMES: @@ -3992,7 +3996,7 @@ enum **EnvironmentSDFGIFramesToUpdateLight**: :ref:`EnvironmentSDFGIFramesToUpdateLight` **ENV_SDFGI_UPDATE_LIGHT_IN_4_FRAMES** = ``2`` - +Update indirect light from dynamic lights in SDFGI over 4 frames. .. _class_RenderingServer_constant_ENV_SDFGI_UPDATE_LIGHT_IN_8_FRAMES: @@ -4000,7 +4004,7 @@ enum **EnvironmentSDFGIFramesToUpdateLight**: :ref:`EnvironmentSDFGIFramesToUpdateLight` **ENV_SDFGI_UPDATE_LIGHT_IN_8_FRAMES** = ``3`` - +Update indirect light from dynamic lights in SDFGI over 8 frames. .. _class_RenderingServer_constant_ENV_SDFGI_UPDATE_LIGHT_IN_16_FRAMES: @@ -4008,7 +4012,7 @@ enum **EnvironmentSDFGIFramesToUpdateLight**: :ref:`EnvironmentSDFGIFramesToUpdateLight` **ENV_SDFGI_UPDATE_LIGHT_IN_16_FRAMES** = ``4`` - +Update indirect light from dynamic lights in SDFGI over 16 frames. This is the least responsive, but has the lowest GPU requirements. .. _class_RenderingServer_constant_ENV_SDFGI_UPDATE_LIGHT_MAX: @@ -4016,7 +4020,7 @@ enum **EnvironmentSDFGIFramesToUpdateLight**: :ref:`EnvironmentSDFGIFramesToUpdateLight` **ENV_SDFGI_UPDATE_LIGHT_MAX** = ``5`` - +Represents the size of the :ref:`EnvironmentSDFGIFramesToUpdateLight` enum. .. rst-class:: classref-item-separator @@ -4034,7 +4038,7 @@ enum **SubSurfaceScatteringQuality**: :ref:`SubSurfaceScatteringQuality` **SUB_SURFACE_SCATTERING_QUALITY_DISABLED** = ``0`` - +Disables subsurface scattering entirely, even on materials that have :ref:`BaseMaterial3D.subsurf_scatter_enabled` set to ``true``. This has the lowest GPU requirements. .. _class_RenderingServer_constant_SUB_SURFACE_SCATTERING_QUALITY_LOW: @@ -4042,7 +4046,7 @@ enum **SubSurfaceScatteringQuality**: :ref:`SubSurfaceScatteringQuality` **SUB_SURFACE_SCATTERING_QUALITY_LOW** = ``1`` - +Low subsurface scattering quality. .. _class_RenderingServer_constant_SUB_SURFACE_SCATTERING_QUALITY_MEDIUM: @@ -4050,7 +4054,7 @@ enum **SubSurfaceScatteringQuality**: :ref:`SubSurfaceScatteringQuality` **SUB_SURFACE_SCATTERING_QUALITY_MEDIUM** = ``2`` - +Medium subsurface scattering quality. .. _class_RenderingServer_constant_SUB_SURFACE_SCATTERING_QUALITY_HIGH: @@ -4058,7 +4062,7 @@ enum **SubSurfaceScatteringQuality**: :ref:`SubSurfaceScatteringQuality` **SUB_SURFACE_SCATTERING_QUALITY_HIGH** = ``3`` - +High subsurface scattering quality. This has the highest GPU requirements. .. rst-class:: classref-item-separator @@ -4184,7 +4188,7 @@ The instance is a particle emitter. :ref:`InstanceType` **INSTANCE_PARTICLES_COLLISION** = ``4`` - +The instance is a GPUParticles collision shape. .. _class_RenderingServer_constant_INSTANCE_LIGHT: @@ -4232,7 +4236,7 @@ The instance is a lightmap. :ref:`InstanceType` **INSTANCE_OCCLUDER** = ``10`` - +The instance is an occlusion culling occluder. .. _class_RenderingServer_constant_INSTANCE_VISIBLITY_NOTIFIER: @@ -4240,7 +4244,7 @@ The instance is a lightmap. :ref:`InstanceType` **INSTANCE_VISIBLITY_NOTIFIER** = ``11`` - +The instance is a visible on-screen notifier. .. _class_RenderingServer_constant_INSTANCE_FOG_VOLUME: @@ -4248,7 +4252,7 @@ The instance is a lightmap. :ref:`InstanceType` **INSTANCE_FOG_VOLUME** = ``12`` - +The instance is a fog volume. .. _class_RenderingServer_constant_INSTANCE_MAX: @@ -4306,7 +4310,7 @@ When set, manually requests to draw geometry on next frame. :ref:`InstanceFlags` **INSTANCE_FLAG_IGNORE_OCCLUSION_CULLING** = ``3`` - +Always draw, even if the instance would be culled by occlusion culling. Does not affect view frustum culling. .. _class_RenderingServer_constant_INSTANCE_FLAG_MAX: @@ -4450,7 +4454,7 @@ enum **CanvasTextureChannel**: :ref:`CanvasTextureChannel` **CANVAS_TEXTURE_CHANNEL_DIFFUSE** = ``0`` - +Diffuse canvas texture (:ref:`CanvasTexture.diffuse_texture`). .. _class_RenderingServer_constant_CANVAS_TEXTURE_CHANNEL_NORMAL: @@ -4458,7 +4462,7 @@ enum **CanvasTextureChannel**: :ref:`CanvasTextureChannel` **CANVAS_TEXTURE_CHANNEL_NORMAL** = ``1`` - +Normal map canvas texture (:ref:`CanvasTexture.normal_texture`). .. _class_RenderingServer_constant_CANVAS_TEXTURE_CHANNEL_SPECULAR: @@ -4466,7 +4470,7 @@ enum **CanvasTextureChannel**: :ref:`CanvasTextureChannel` **CANVAS_TEXTURE_CHANNEL_SPECULAR** = ``2`` - +Specular map canvas texture (:ref:`CanvasTexture.specular_texture`). .. rst-class:: classref-item-separator @@ -4642,7 +4646,7 @@ enum **CanvasGroupMode**: :ref:`CanvasGroupMode` **CANVAS_GROUP_MODE_DISABLED** = ``0`` - +Child draws over parent and is not clipped. .. _class_RenderingServer_constant_CANVAS_GROUP_MODE_CLIP_ONLY: @@ -4650,7 +4654,7 @@ enum **CanvasGroupMode**: :ref:`CanvasGroupMode` **CANVAS_GROUP_MODE_CLIP_ONLY** = ``1`` - +Parent is used for the purposes of clipping only. Child is clipped to the parent's visible area, parent is not drawn. .. _class_RenderingServer_constant_CANVAS_GROUP_MODE_CLIP_AND_DRAW: @@ -4658,7 +4662,7 @@ enum **CanvasGroupMode**: :ref:`CanvasGroupMode` **CANVAS_GROUP_MODE_CLIP_AND_DRAW** = ``2`` - +Parent is used for clipping child, but parent is also drawn underneath child as normal before clipping child to its visible area. .. _class_RenderingServer_constant_CANVAS_GROUP_MODE_TRANSPARENT: @@ -4684,7 +4688,7 @@ enum **CanvasLightMode**: :ref:`CanvasLightMode` **CANVAS_LIGHT_MODE_POINT** = ``0`` - +2D point light (see :ref:`PointLight2D`). .. _class_RenderingServer_constant_CANVAS_LIGHT_MODE_DIRECTIONAL: @@ -4692,7 +4696,7 @@ enum **CanvasLightMode**: :ref:`CanvasLightMode` **CANVAS_LIGHT_MODE_DIRECTIONAL** = ``1`` - +2D directional (sun/moon) light (see :ref:`DirectionalLight2D`). .. rst-class:: classref-item-separator @@ -4820,7 +4824,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_BOOL** = ``0`` - +Boolean global shader parameter (``global uniform bool ...``). .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_BVEC2: @@ -4828,7 +4832,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_BVEC2** = ``1`` - +2-dimensional boolean vector global shader parameter (``global uniform bvec2 ...``). .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_BVEC3: @@ -4836,7 +4840,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_BVEC3** = ``2`` - +3-dimensional boolean vector global shader parameter (``global uniform bvec3 ...``). .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_BVEC4: @@ -4844,7 +4848,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_BVEC4** = ``3`` - +4-dimensional boolean vector global shader parameter (``global uniform bvec4 ...``). .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_INT: @@ -4852,7 +4856,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_INT** = ``4`` - +Integer global shader parameter (``global uniform int ...``). .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_IVEC2: @@ -4860,7 +4864,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_IVEC2** = ``5`` - +2-dimensional integer vector global shader parameter (``global uniform ivec2 ...``). .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_IVEC3: @@ -4868,7 +4872,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_IVEC3** = ``6`` - +3-dimensional integer vector global shader parameter (``global uniform ivec3 ...``). .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_IVEC4: @@ -4876,7 +4880,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_IVEC4** = ``7`` - +4-dimensional integer vector global shader parameter (``global uniform ivec4 ...``). .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_RECT2I: @@ -4884,7 +4888,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_RECT2I** = ``8`` - +2-dimensional integer rectangle global shader parameter (``global uniform ivec4 ...``). Equivalent to :ref:`GLOBAL_VAR_TYPE_IVEC4` in shader code, but exposed as a :ref:`Rect2i` in the editor UI. .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_UINT: @@ -4892,7 +4896,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_UINT** = ``9`` - +Unsigned integer global shader parameter (``global uniform uint ...``). .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_UVEC2: @@ -4900,7 +4904,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_UVEC2** = ``10`` - +2-dimensional unsigned integer vector global shader parameter (``global uniform uvec2 ...``). .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_UVEC3: @@ -4908,7 +4912,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_UVEC3** = ``11`` - +3-dimensional unsigned integer vector global shader parameter (``global uniform uvec3 ...``). .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_UVEC4: @@ -4916,7 +4920,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_UVEC4** = ``12`` - +4-dimensional unsigned integer vector global shader parameter (``global uniform uvec4 ...``). .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_FLOAT: @@ -4924,7 +4928,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_FLOAT** = ``13`` - +Single-precision floating-point global shader parameter (``global uniform float ...``). .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_VEC2: @@ -4932,7 +4936,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_VEC2** = ``14`` - +2-dimensional floating-point vector global shader parameter (``global uniform vec2 ...``). .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_VEC3: @@ -4940,7 +4944,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_VEC3** = ``15`` - +3-dimensional floating-point vector global shader parameter (``global uniform vec3 ...``). .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_VEC4: @@ -4948,7 +4952,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_VEC4** = ``16`` - +4-dimensional floating-point vector global shader parameter (``global uniform vec4 ...``). .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_COLOR: @@ -4956,7 +4960,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_COLOR** = ``17`` - +Color global shader parameter (``global uniform vec4 ...``). Equivalent to :ref:`GLOBAL_VAR_TYPE_VEC4` in shader code, but exposed as a :ref:`Color` in the editor UI. .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_RECT2: @@ -4964,7 +4968,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_RECT2** = ``18`` - +2-dimensional floating-point rectangle global shader parameter (``global uniform vec4 ...``). Equivalent to :ref:`GLOBAL_VAR_TYPE_VEC4` in shader code, but exposed as a :ref:`Rect2` in the editor UI. .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_MAT2: @@ -4972,7 +4976,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_MAT2** = ``19`` - +2×2 matrix global shader parameter (``global uniform mat2 ...``). Exposed as a :ref:`PackedInt32Array` in the editor UI. .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_MAT3: @@ -4980,7 +4984,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_MAT3** = ``20`` - +3×3 matrix global shader parameter (``global uniform mat3 ...``). Exposed as a :ref:`Basis` in the editor UI. .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_MAT4: @@ -4988,7 +4992,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_MAT4** = ``21`` - +4×4 matrix global shader parameter (``global uniform mat4 ...``). Exposed as a :ref:`Projection` in the editor UI. .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_TRANSFORM_2D: @@ -4996,7 +5000,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_TRANSFORM_2D** = ``22`` - +2-dimensional transform global shader parameter (``global uniform mat2x3 ...``). Exposed as a :ref:`Transform2D` in the editor UI. .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_TRANSFORM: @@ -5004,7 +5008,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_TRANSFORM** = ``23`` - +3-dimensional transform global shader parameter (``global uniform mat3x4 ...``). Exposed as a :ref:`Transform3D` in the editor UI. .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_SAMPLER2D: @@ -5012,7 +5016,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_SAMPLER2D** = ``24`` - +2D sampler global shader parameter (``global uniform sampler2D ...``). Exposed as a :ref:`Texture2D` in the editor UI. .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_SAMPLER2DARRAY: @@ -5020,7 +5024,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_SAMPLER2DARRAY** = ``25`` - +2D sampler array global shader parameter (``global uniform sampler2DArray ...``). Exposed as a :ref:`Texture2DArray` in the editor UI. .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_SAMPLER3D: @@ -5028,7 +5032,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_SAMPLER3D** = ``26`` - +3D sampler global shader parameter (``global uniform sampler3D ...``). Exposed as a :ref:`Texture3D` in the editor UI. .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_SAMPLERCUBE: @@ -5036,7 +5040,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_SAMPLERCUBE** = ``27`` - +Cubemap sampler global shader parameter (``global uniform samplerCube ...``). Exposed as a :ref:`Cubemap` in the editor UI. .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_MAX: @@ -5044,7 +5048,7 @@ enum **GlobalShaderParameterType**: :ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_MAX** = ``28`` - +Represents the size of the :ref:`GlobalShaderParameterType` enum. .. rst-class:: classref-item-separator @@ -5062,7 +5066,7 @@ enum **RenderingInfo**: :ref:`RenderingInfo` **RENDERING_INFO_TOTAL_OBJECTS_IN_FRAME** = ``0`` - +Number of objects rendered in the current 3D scene. This varies depending on camera position and rotation. .. _class_RenderingServer_constant_RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME: @@ -5070,7 +5074,7 @@ enum **RenderingInfo**: :ref:`RenderingInfo` **RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME** = ``1`` - +Number of vertices/indices rendered in the current 3D scene. This varies depending on camera position and rotation. .. _class_RenderingServer_constant_RENDERING_INFO_TOTAL_DRAW_CALLS_IN_FRAME: @@ -5078,7 +5082,7 @@ enum **RenderingInfo**: :ref:`RenderingInfo` **RENDERING_INFO_TOTAL_DRAW_CALLS_IN_FRAME** = ``2`` - +Number of draw calls performed to render in the current 3D scene. This varies depending on camera position and rotation. .. _class_RenderingServer_constant_RENDERING_INFO_TEXTURE_MEM_USED: @@ -5086,7 +5090,7 @@ enum **RenderingInfo**: :ref:`RenderingInfo` **RENDERING_INFO_TEXTURE_MEM_USED** = ``3`` - +Texture memory used (in bytes). .. _class_RenderingServer_constant_RENDERING_INFO_BUFFER_MEM_USED: @@ -5094,7 +5098,7 @@ enum **RenderingInfo**: :ref:`RenderingInfo` **RENDERING_INFO_BUFFER_MEM_USED** = ``4`` - +Buffer memory used (in bytes). .. _class_RenderingServer_constant_RENDERING_INFO_VIDEO_MEM_USED: @@ -5102,7 +5106,7 @@ enum **RenderingInfo**: :ref:`RenderingInfo` **RENDERING_INFO_VIDEO_MEM_USED** = ``5`` - +Video memory used (in bytes). This is always greater than the sum of :ref:`RENDERING_INFO_TEXTURE_MEM_USED` and :ref:`RENDERING_INFO_BUFFER_MEM_USED`, since there is miscellaneous data not accounted for by those two metrics. .. rst-class:: classref-item-separator @@ -5177,7 +5181,7 @@ The maximum Z-layer for canvas items. **MAX_GLOW_LEVELS** = ``7`` -Max number of glow levels that can be used with glow post-process effect. +The maximum number of glow levels that can be used with the glow post-processing effect. .. _class_RenderingServer_constant_MAX_CURSORS: @@ -5185,7 +5189,7 @@ Max number of glow levels that can be used with glow post-process effect. **MAX_CURSORS** = ``8`` -Unused enum in Godot 3.x. +*Deprecated.* This constant is unused internally. .. _class_RenderingServer_constant_MAX_2D_DIRECTIONAL_LIGHTS: @@ -5193,7 +5197,7 @@ Unused enum in Godot 3.x. **MAX_2D_DIRECTIONAL_LIGHTS** = ``8`` - +The maximum number of directional lights that can be rendered at a given time in 2D. .. _class_RenderingServer_constant_MATERIAL_RENDER_PRIORITY_MIN: @@ -5217,7 +5221,7 @@ The maximum renderpriority of all materials. **ARRAY_CUSTOM_COUNT** = ``4`` - +The number of custom data arrays available (:ref:`ARRAY_CUSTOM0`, :ref:`ARRAY_CUSTOM1`, :ref:`ARRAY_CUSTOM2`, :ref:`ARRAY_CUSTOM3`). .. _class_RenderingServer_constant_PARTICLES_EMIT_FLAG_POSITION: @@ -5310,7 +5314,9 @@ Bakes the material data of the Mesh passed in the ``base`` parameter with option 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` static 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`. .. rst-class:: classref-item-separator @@ -5396,9 +5402,11 @@ The exposure value can be calculated from aperture (in f-stops), shutter speed ( :ref:`RID` **camera_create** **(** **)** -Creates a 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. +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` static method. +\ **Note:** The equivalent node is :ref:`Camera3D`. .. rst-class:: classref-item-separator @@ -5508,7 +5516,9 @@ 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` static 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. .. rst-class:: classref-item-separator @@ -5598,6 +5608,18 @@ See also :ref:`CanvasItem.draw_msdf_texture_rect_region` item, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=-1.0 **)** + +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 + +---- + .. _class_RenderingServer_method_canvas_item_add_multimesh: .. rst-class:: classref-method @@ -5640,7 +5662,7 @@ Draws particles on the :ref:`CanvasItem` pointed to by the ``i void **canvas_item_add_polygon** **(** :ref:`RID` item, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`RID` texture **)** -Draws a 2D polygon on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. 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`. .. rst-class:: classref-item-separator @@ -5652,7 +5674,7 @@ Draws a 2D polygon on the :ref:`CanvasItem` pointed to by the void **canvas_item_add_polyline** **(** :ref:`RID` item, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** -Draws a 2D polyline on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. See also :ref:`CanvasItem.draw_polyline`. +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 @@ -5700,9 +5722,7 @@ Sets a :ref:`Transform2D` that will be used to transform subs void **canvas_item_add_texture_rect** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`bool` tile=false, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -5714,9 +5734,7 @@ void **canvas_item_add_texture_rect** **(** :ref:`RID` item, :ref:`Re void **canvas_item_add_texture_rect_region** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false, :ref:`bool` clip_uv=true **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -5728,9 +5746,9 @@ void **canvas_item_add_texture_rect_region** **(** :ref:`RID` item, : void **canvas_item_add_triangle_array** **(** :ref:`RID` item, :ref:`PackedInt32Array` indices, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`PackedInt32Array` bones=PackedInt32Array(), :ref:`PackedFloat32Array` weights=PackedFloat32Array(), :ref:`RID` texture, :ref:`int` count=-1 **)** -.. container:: contribute +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`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** ``count`` is unused and can be left unspecified. .. rst-class:: classref-item-separator @@ -5754,7 +5772,11 @@ Clears the :ref:`CanvasItem` and removes all commands in it. :ref:`RID` **canvas_item_create** **(** **)** -Creates a new :ref:`CanvasItem` instance and returns its :ref:`RID`. +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. + +\ **Note:** The equivalent node is :ref:`CanvasItem`. .. rst-class:: classref-item-separator @@ -5766,9 +5788,9 @@ Creates a new :ref:`CanvasItem` instance and returns its :ref: void **canvas_item_set_canvas_group_mode** **(** :ref:`RID` item, :ref:`CanvasGroupMode` mode, :ref:`float` clear_margin=5.0, :ref:`bool` fit_empty=false, :ref:`float` fit_margin=0.0, :ref:`bool` blur_mipmaps=false **)** -.. container:: contribute +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. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** The equivalent node functionality is found in :ref:`CanvasGroup` and :ref:`CanvasItem.clip_children`. .. rst-class:: classref-item-separator @@ -5780,9 +5802,9 @@ void **canvas_item_set_canvas_group_mode** **(** :ref:`RID` item, :re void **canvas_item_set_clip** **(** :ref:`RID` item, :ref:`bool` clip **)** -.. container:: contribute +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. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** The equivalent node functionality is found in :ref:`Label.clip_text`, :ref:`RichTextLabel` (always enabled) and more. .. rst-class:: classref-item-separator @@ -5806,9 +5828,7 @@ Sets the :ref:`CanvasItem` to copy a rect to the backbuffer. void **canvas_item_set_custom_rect** **(** :ref:`RID` item, :ref:`bool` use_custom_rect, :ref:`Rect2` rect=Rect2(0, 0, 0, 0) **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +If ``use_custom_rect`` is ``true``, sets the custom visibility rectangle (used for culling) to ``rect`` for the canvas item specified by ``item``. Setting a custom visibility rect can reduce CPU load when drawing lots of 2D instances. If ``use_custom_rect`` is ``false``, automatically computes a visibility rectangle based on the canvas item's draw commands. .. rst-class:: classref-item-separator @@ -5820,9 +5840,7 @@ void **canvas_item_set_custom_rect** **(** :ref:`RID` item, :ref:`boo void **canvas_item_set_default_texture_filter** **(** :ref:`RID` item, :ref:`CanvasItemTextureFilter` filter **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the default texture filter mode for the canvas item specified by the ``item`` RID. Equivalent to :ref:`CanvasItem.texture_filter`. .. rst-class:: classref-item-separator @@ -5834,9 +5852,7 @@ void **canvas_item_set_default_texture_filter** **(** :ref:`RID` item void **canvas_item_set_default_texture_repeat** **(** :ref:`RID` item, :ref:`CanvasItemTextureRepeat` repeat **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the default texture repeat mode for the canvas item specified by the ``item`` RID. Equivalent to :ref:`CanvasItem.texture_repeat`. .. rst-class:: classref-item-separator @@ -5848,9 +5864,7 @@ void **canvas_item_set_default_texture_repeat** **(** :ref:`RID` item void **canvas_item_set_distance_field_mode** **(** :ref:`RID` item, :ref:`bool` enabled **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +If ``enabled`` is ``true``, enables multichannel signed distance field rendering mode for the canvas item specified by the ``item`` RID. This is meant to be used for font rendering, or with specially generated images using `msdfgen `__. .. rst-class:: classref-item-separator @@ -5862,9 +5876,7 @@ void **canvas_item_set_distance_field_mode** **(** :ref:`RID` item, : void **canvas_item_set_draw_behind_parent** **(** :ref:`RID` item, :ref:`bool` enabled **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +If ``enabled`` is ``true``, draws the canvas item specified by the ``item`` RID behind its parent. Equivalent to :ref:`CanvasItem.show_behind_parent`. .. rst-class:: classref-item-separator @@ -5888,9 +5900,7 @@ Sets the index for the :ref:`CanvasItem`. void **canvas_item_set_light_mask** **(** :ref:`RID` item, :ref:`int` mask **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the light ``mask`` for the canvas item specified by the ``item`` RID. Equivalent to :ref:`CanvasItem.light_mask`. .. rst-class:: classref-item-separator @@ -5902,7 +5912,7 @@ void **canvas_item_set_light_mask** **(** :ref:`RID` item, :ref:`int< void **canvas_item_set_material** **(** :ref:`RID` item, :ref:`RID` material **)** -Sets a new material to the :ref:`CanvasItem`. +Sets a new ``material`` to the canvas item specified by the ``item`` RID. Equivalent to :ref:`CanvasItem.material`. .. rst-class:: classref-item-separator @@ -5914,9 +5924,7 @@ Sets a new material to the :ref:`CanvasItem`. void **canvas_item_set_modulate** **(** :ref:`RID` item, :ref:`Color` color **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -5928,9 +5936,7 @@ void **canvas_item_set_modulate** **(** :ref:`RID` item, :ref:`Color< void **canvas_item_set_parent** **(** :ref:`RID` item, :ref:`RID` parent **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets a parent :ref:`CanvasItem` to the :ref:`CanvasItem`. The item will inherit transform, modulation and visibility from its parent, like :ref:`CanvasItem` nodes in the scene tree. .. rst-class:: classref-item-separator @@ -5942,9 +5948,7 @@ void **canvas_item_set_parent** **(** :ref:`RID` item, :ref:`RID` item, :ref:`Color` color **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -5956,9 +5960,7 @@ void **canvas_item_set_self_modulate** **(** :ref:`RID` item, :ref:`C void **canvas_item_set_sort_children_by_y** **(** :ref:`RID` item, :ref:`bool` enabled **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +If ``enabled`` is ``true``, child nodes with the lowest Y position are drawn before those with a higher Y position. Y-sorting only affects children that inherit from the canvas item specified by the ``item`` RID, not the canvas item itself. Equivalent to :ref:`CanvasItem.y_sort_enabled`. .. rst-class:: classref-item-separator @@ -5970,9 +5972,7 @@ void **canvas_item_set_sort_children_by_y** **(** :ref:`RID` item, :r void **canvas_item_set_transform** **(** :ref:`RID` item, :ref:`Transform2D` transform **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the ``transform`` of the canvas item specified by the ``item`` RID. This affects where and how the item will be drawn. Child canvas items' transforms are multiplied by their parent's transform. Equivalent to :ref:`Node2D.transform`. .. rst-class:: classref-item-separator @@ -6008,9 +6008,9 @@ Sets the rendering visibility layer associated with this :ref:`CanvasItem` item, :ref:`bool` enable, :ref:`Rect2` area, :ref:`Callable` enter_callable, :ref:`Callable` exit_callable **)** -.. container:: contribute +Sets the given :ref:`CanvasItem` as visibility notifier. ``area`` defines the area of detecting visibility. ``enter_callable`` is called when the :ref:`CanvasItem` enters the screen, ``exit_callable`` is called when the :ref:`CanvasItem` exits the screen. If ``enable`` is ``false``, the item will no longer function as notifier. - There is currently no description for this method. Please help us by :ref:`contributing one `! +This method can be used to manually mimic :ref:`VisibleOnScreenNotifier2D`. .. rst-class:: classref-item-separator @@ -6022,9 +6022,7 @@ void **canvas_item_set_visibility_notifier** **(** :ref:`RID` item, : void **canvas_item_set_visible** **(** :ref:`RID` item, :ref:`bool` visible **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the visibility of the :ref:`CanvasItem`. .. rst-class:: classref-item-separator @@ -6074,7 +6072,9 @@ 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` static 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`. .. rst-class:: classref-item-separator @@ -6098,9 +6098,11 @@ Attaches a light occluder to the canvas. Removes it from its previous canvas. :ref:`RID` **canvas_light_occluder_create** **(** **)** -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_ocluder_*`` RenderingServer functions. +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` static method. +\ **Note:** The equivalent node is :ref:`LightOccluder2D`. .. rst-class:: classref-item-separator @@ -6392,7 +6394,9 @@ Sets the Z range of objects that will be affected by this light. Equivalent to : 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` static 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`. .. rst-class:: classref-item-separator @@ -6466,9 +6470,7 @@ Modulates all colors in the given canvas. void **canvas_set_shadow_texture_size** **(** :ref:`int` size **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`ProjectSettings.rendering/2d/shadow_atlas/size` to use for :ref:`Light2D` shadow rendering (in pixels). The value is rounded up to the nearest power of 2. .. rst-class:: classref-item-separator @@ -6480,9 +6482,11 @@ void **canvas_set_shadow_texture_size** **(** :ref:`int` size **)** :ref:`RID` **canvas_texture_create** **(** **)** -.. container:: contribute +Creates a canvas texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``canvas_texture_*`` RenderingServer functions. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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. .. rst-class:: classref-item-separator @@ -6494,9 +6498,7 @@ void **canvas_set_shadow_texture_size** **(** :ref:`int` size **)** void **canvas_texture_set_channel** **(** :ref:`RID` canvas_texture, :ref:`CanvasTextureChannel` channel, :ref:`RID` texture **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the ``channel``'s ``texture`` for the canvas texture specified by the ``canvas_texture`` RID. Equivalent to :ref:`CanvasTexture.diffuse_texture`, :ref:`CanvasTexture.normal_texture` and :ref:`CanvasTexture.specular_texture`. .. rst-class:: classref-item-separator @@ -6508,9 +6510,7 @@ void **canvas_texture_set_channel** **(** :ref:`RID` canvas_texture, void **canvas_texture_set_shading_parameters** **(** :ref:`RID` canvas_texture, :ref:`Color` base_color, :ref:`float` shininess **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the ``base_color`` and ``shininess`` to use for the canvas texture specified by the ``canvas_texture`` RID. Equivalent to :ref:`CanvasTexture.specular_color` and :ref:`CanvasTexture.specular_shininess`. .. rst-class:: classref-item-separator @@ -6522,9 +6522,7 @@ void **canvas_texture_set_shading_parameters** **(** :ref:`RID` canva void **canvas_texture_set_texture_filter** **(** :ref:`RID` canvas_texture, :ref:`CanvasItemTextureFilter` filter **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the texture ``filter`` mode to use for the canvas texture specified by the ``canvas_texture`` RID. .. rst-class:: classref-item-separator @@ -6536,9 +6534,7 @@ void **canvas_texture_set_texture_filter** **(** :ref:`RID` canvas_te void **canvas_texture_set_texture_repeat** **(** :ref:`RID` canvas_texture, :ref:`CanvasItemTextureRepeat` repeat **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the texture ``repeat`` mode to use for the canvas texture specified by the ``canvas_texture`` RID. .. rst-class:: classref-item-separator @@ -6564,9 +6560,13 @@ Creates a RenderingDevice that can be used to do draw and compute operations on :ref:`RID` **decal_create** **(** **)** -.. container:: contribute +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. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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. + +\ **Note:** The equivalent node is :ref:`Decal`. .. rst-class:: classref-item-separator @@ -6578,9 +6578,7 @@ Creates a RenderingDevice that can be used to do draw and compute operations on void **decal_set_albedo_mix** **(** :ref:`RID` decal, :ref:`float` albedo_mix **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the ``albedo_mix`` in the decal specified by the ``decal`` RID. Equivalent to :ref:`Decal.albedo_mix`. .. rst-class:: classref-item-separator @@ -6592,9 +6590,7 @@ void **decal_set_albedo_mix** **(** :ref:`RID` decal, :ref:`float` decal, :ref:`int` mask **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the cull ``mask`` in the decal specified by the ``decal`` RID. Equivalent to :ref:`Decal.cull_mask`. .. rst-class:: classref-item-separator @@ -6606,9 +6602,7 @@ void **decal_set_cull_mask** **(** :ref:`RID` decal, :ref:`int` decal, :ref:`bool` enabled, :ref:`float` begin, :ref:`float` length **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the distance fade parameters in the decal specified by the ``decal`` RID. Equivalent to :ref:`Decal.distance_fade_enabled`, :ref:`Decal.distance_fade_begin` and :ref:`Decal.distance_fade_length`. .. rst-class:: classref-item-separator @@ -6620,9 +6614,7 @@ void **decal_set_distance_fade** **(** :ref:`RID` decal, :ref:`bool` decal, :ref:`float` energy **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the emission ``energy`` in the decal specified by the ``decal`` RID. Equivalent to :ref:`Decal.emission_energy`. .. rst-class:: classref-item-separator @@ -6634,9 +6626,7 @@ void **decal_set_emission_energy** **(** :ref:`RID` decal, :ref:`floa void **decal_set_fade** **(** :ref:`RID` decal, :ref:`float` above, :ref:`float` below **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the upper fade (``above``) and lower fade (``below``) in the decal specified by the ``decal`` RID. Equivalent to :ref:`Decal.upper_fade` and :ref:`Decal.lower_fade`. .. rst-class:: classref-item-separator @@ -6648,9 +6638,7 @@ void **decal_set_fade** **(** :ref:`RID` decal, :ref:`float` decal, :ref:`Color` color **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the color multiplier in the decal specified by the ``decal`` RID to ``color``. Equivalent to :ref:`Decal.modulate`. .. rst-class:: classref-item-separator @@ -6662,9 +6650,7 @@ void **decal_set_modulate** **(** :ref:`RID` decal, :ref:`Color` decal, :ref:`float` fade **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the normal ``fade`` in the decal specified by the ``decal`` RID. Equivalent to :ref:`Decal.normal_fade`. .. rst-class:: classref-item-separator @@ -6676,9 +6662,7 @@ void **decal_set_normal_fade** **(** :ref:`RID` decal, :ref:`float` decal, :ref:`Vector3` size **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the ``size`` of the decal specified by the ``decal`` RID. Equivalent to :ref:`Decal.size`. .. rst-class:: classref-item-separator @@ -6690,9 +6674,7 @@ void **decal_set_size** **(** :ref:`RID` decal, :ref:`Vector3` decal, :ref:`DecalTexture` type, :ref:`RID` texture **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the ``texture`` in the given texture ``type`` slot for the specified decal. Equivalent to :ref:`Decal.set_texture`. .. rst-class:: classref-item-separator @@ -6704,9 +6686,7 @@ void **decal_set_texture** **(** :ref:`RID` decal, :ref:`DecalTexture void **decals_set_filter** **(** :ref:`DecalFilter` filter **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the texture ``filter`` mode to use when rendering decals. This parameter is global and cannot be set on a per-decal basis. .. rst-class:: classref-item-separator @@ -6720,10 +6700,12 @@ void **decals_set_filter** **(** :ref:`DecalFilter` static 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. +\ **Note:** The equivalent node is :ref:`DirectionalLight3D`. + .. rst-class:: classref-item-separator ---- @@ -6734,9 +6716,7 @@ To place in a scene, attach this directional light to an instance using :ref:`in void **directional_shadow_atlas_set_size** **(** :ref:`int` size, :ref:`bool` is_16bits **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the ``size`` of the directional light shadows in 3D. See also :ref:`ProjectSettings.rendering/lights_and_shadows/directional_shadow/size`. This parameter is global and cannot be set on a per-viewport basis. .. rst-class:: classref-item-separator @@ -6748,9 +6728,7 @@ void **directional_shadow_atlas_set_size** **(** :ref:`int` size, :re void **directional_soft_shadow_filter_set_quality** **(** :ref:`ShadowQuality` quality **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the filter ``quality`` for directional light shadows in 3D. See also :ref:`ProjectSettings.rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality`. This parameter is global and cannot be set on a per-viewport basis. .. rst-class:: classref-item-separator @@ -6762,9 +6740,11 @@ void **directional_soft_shadow_filter_set_quality** **(** :ref:`ShadowQuality` **environment_bake_panorama** **(** :ref:`RID` environment, :ref:`bool` bake_irradiance, :ref:`Vector2i` size **)** -.. container:: contribute +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`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **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. + +\ **Note:** ``size`` should be a 2:1 aspect ratio for the generated panorama to have square pixels. For radiance maps, there is no point in using a height greater than :ref:`Sky.radiance_size`, as it won't increase detail. Irradiance maps only contain low-frequency data, so there is usually no point in going past a size of 128×64 pixels when saving an irradiance map. .. rst-class:: classref-item-separator @@ -6778,7 +6758,9 @@ void **directional_soft_shadow_filter_set_quality** **(** :ref:`ShadowQuality` static 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`. .. rst-class:: classref-item-separator @@ -6790,9 +6772,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe void **environment_glow_set_use_bicubic_upscale** **(** :ref:`bool` enable **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +If ``enable`` is ``true``, enables bicubic upscaling for glow which improves quality at the cost of performance. Equivalent to :ref:`ProjectSettings.rendering/environment/glow/upscale_mode`. .. rst-class:: classref-item-separator @@ -6804,7 +6784,7 @@ void **environment_glow_set_use_bicubic_upscale** **(** :ref:`bool` void **environment_set_adjustment** **(** :ref:`RID` env, :ref:`bool` enable, :ref:`float` brightness, :ref:`float` contrast, :ref:`float` saturation, :ref:`bool` use_1d_color_correction, :ref:`RID` color_correction **)** -Sets the values to be used with the "Adjustment" post-process effect. See :ref:`Environment` for more details. +Sets the values to be used with the "adjustments" post-process effect. See :ref:`Environment` for more details. .. rst-class:: classref-item-separator @@ -6816,9 +6796,7 @@ Sets the values to be used with the "Adjustment" post-process effect. See :ref:` void **environment_set_ambient_light** **(** :ref:`RID` env, :ref:`Color` color, :ref:`EnvironmentAmbientSource` ambient=0, :ref:`float` energy=1.0, :ref:`float` sky_contibution=0.0, :ref:`EnvironmentReflectionSource` reflection_source=0 **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the values to be used for ambient light rendering. See :ref:`Environment` for more details. .. rst-class:: classref-item-separator @@ -6830,7 +6808,7 @@ void **environment_set_ambient_light** **(** :ref:`RID` env, :ref:`Co void **environment_set_background** **(** :ref:`RID` env, :ref:`EnvironmentBG` bg **)** -Sets the *BGMode* of the environment. Equivalent to :ref:`Environment.background_mode`. +Sets the environment's background mode. Equivalent to :ref:`Environment.background_mode`. .. rst-class:: classref-item-separator @@ -6842,7 +6820,7 @@ Sets the *BGMode* of the environment. Equivalent to :ref:`Environment.background void **environment_set_bg_color** **(** :ref:`RID` env, :ref:`Color` color **)** -Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes). +Color displayed for clear areas of the scene. Only effective if using the :ref:`ENV_BG_COLOR` background mode. .. rst-class:: classref-item-separator @@ -6878,9 +6856,7 @@ Sets the maximum layer to use if using Canvas background mode. void **environment_set_fog** **(** :ref:`RID` env, :ref:`bool` enable, :ref:`Color` light_color, :ref:`float` light_energy, :ref:`float` sun_scatter, :ref:`float` density, :ref:`float` height, :ref:`float` height_density, :ref:`float` aerial_perspective, :ref:`float` sky_affect **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Configures fog for the specified environment RID. See ``fog_*`` properties in :ref:`Environment` for more information. .. rst-class:: classref-item-separator @@ -6892,9 +6868,7 @@ void **environment_set_fog** **(** :ref:`RID` env, :ref:`bool` env, :ref:`bool` enable, :ref:`PackedFloat32Array` levels, :ref:`float` intensity, :ref:`float` strength, :ref:`float` mix, :ref:`float` bloom_threshold, :ref:`EnvironmentGlowBlendMode` blend_mode, :ref:`float` hdr_bleed_threshold, :ref:`float` hdr_bleed_scale, :ref:`float` hdr_luminance_cap, :ref:`float` glow_map_strength, :ref:`RID` glow_map **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Configures glow for the specified environment RID. See ``glow_*`` properties in :ref:`Environment` for more information. .. rst-class:: classref-item-separator @@ -6906,9 +6880,7 @@ void **environment_set_glow** **(** :ref:`RID` env, :ref:`bool` env, :ref:`bool` enable, :ref:`int` cascades, :ref:`float` min_cell_size, :ref:`EnvironmentSDFGIYScale` y_scale, :ref:`bool` use_occlusion, :ref:`float` bounce_feedback, :ref:`bool` read_sky, :ref:`float` energy, :ref:`float` normal_bias, :ref:`float` probe_bias **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Configures signed distance field global illumination for the specified environment RID. See ``sdfgi_*`` properties in :ref:`Environment` for more information. .. rst-class:: classref-item-separator @@ -6920,9 +6892,7 @@ void **environment_set_sdfgi** **(** :ref:`RID` env, :ref:`bool` frames **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the number of frames to use for converging signed distance field global illumination. Equivalent to :ref:`ProjectSettings.rendering/global_illumination/sdfgi/frames_to_converge`. .. rst-class:: classref-item-separator @@ -6934,9 +6904,7 @@ void **environment_set_sdfgi_frames_to_converge** **(** :ref:`EnvironmentSDFGIFr void **environment_set_sdfgi_frames_to_update_light** **(** :ref:`EnvironmentSDFGIFramesToUpdateLight` frames **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the update speed for dynamic lights' indirect lighting when computing signed distance field global illumination. Equivalent to :ref:`ProjectSettings.rendering/global_illumination/sdfgi/frames_to_update_lights`. .. rst-class:: classref-item-separator @@ -6948,9 +6916,7 @@ void **environment_set_sdfgi_frames_to_update_light** **(** :ref:`EnvironmentSDF void **environment_set_sdfgi_ray_count** **(** :ref:`EnvironmentSDFGIRayCount` ray_count **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the number of rays to throw per frame when computing signed distance field global illumination. Equivalent to :ref:`ProjectSettings.rendering/global_illumination/sdfgi/probe_ray_count`. .. rst-class:: classref-item-separator @@ -7034,7 +7000,7 @@ Sets the quality level of the screen-space indirect lighting (SSIL) post-process void **environment_set_ssr** **(** :ref:`RID` env, :ref:`bool` enable, :ref:`int` max_steps, :ref:`float` fade_in, :ref:`float` fade_out, :ref:`float` depth_tolerance **)** -Sets the variables to be used with the "screen space reflections" post-process effect. See :ref:`Environment` for more details. +Sets the variables to be used with the screen-space reflections (SSR) post-process effect. See :ref:`Environment` for more details. .. rst-class:: classref-item-separator @@ -7072,9 +7038,7 @@ Sets the variables to be used with the "tonemap" post-process effect. See :ref:` void **environment_set_volumetric_fog** **(** :ref:`RID` env, :ref:`bool` enable, :ref:`float` density, :ref:`Color` albedo, :ref:`Color` emission, :ref:`float` emission_energy, :ref:`float` anisotropy, :ref:`float` length, :ref:`float` p_detail_spread, :ref:`float` gi_inject, :ref:`bool` temporal_reprojection, :ref:`float` temporal_reprojection_amount, :ref:`float` ambient_inject, :ref:`float` sky_affect **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the variables to be used with the volumetric fog post-process effect. See :ref:`Environment` for more details. .. rst-class:: classref-item-separator @@ -7110,7 +7074,11 @@ Sets the resolution of the volumetric fog's froxel buffer. ``size`` is modified :ref:`RID` **fog_volume_create** **(** **)** -Creates a new fog volume and allocates an RID. +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. + +\ **Note:** The equivalent node is :ref:`FogVolume`. .. rst-class:: classref-item-separator @@ -7158,9 +7126,7 @@ Sets the size of the fog volume when shape is :ref:`FOG_VOLUME_SHAPE_ELLIPSOID` swap_buffers=true, :ref:`float` frame_step=0.0 **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Forces redrawing of all viewports at once. .. rst-class:: classref-item-separator @@ -7172,9 +7138,7 @@ void **force_draw** **(** :ref:`bool` swap_buffers=true, :ref:`float void **force_sync** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Forces a synchronization between the CPU and GPU, which may be required in certain cases. Only call this when needed, as CPU-GPU synchronization has a performance cost. .. rst-class:: classref-item-separator @@ -7186,7 +7150,7 @@ void **force_sync** **(** **)** void **free_rid** **(** :ref:`RID` rid **)** -Tries to free an object in the RenderingServer. +Tries to free an object in the RenderingServer. To avoid memory leaks, this should be called after using an object as memory management does not occur automatically when using RendeeringServer directly. .. rst-class:: classref-item-separator @@ -7198,7 +7162,7 @@ Tries to free an object in the RenderingServer. :ref:`Color` **get_default_clear_color** **(** **)** -Returns the default clear color which is used when a specific clear color has not been selected. +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 @@ -7210,9 +7174,7 @@ Returns the default clear color which is used when a specific clear color has no :ref:`float` **get_frame_setup_time_cpu** **(** **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -7238,9 +7200,19 @@ Returns the global RenderingDevice. :ref:`int` **get_rendering_info** **(** :ref:`RenderingInfo` info **)** -.. container:: contribute +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. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **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: + +:: + + func _ready(): + for _i in 2: + await get_tree().process_frame + + print(RenderingServer.get_rendering_info(RENDERING_INFO_TOTAL_DRAW_CALLS_IN_FRAME)) .. rst-class:: classref-item-separator @@ -7264,7 +7236,7 @@ Returns the parameters of a shader. :ref:`RID` **get_test_cube** **(** **)** -Returns the ID of the test cube. Creates one if none exists. +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 @@ -7276,7 +7248,15 @@ Returns the ID of the test cube. Creates one if none exists. :ref:`RID` **get_test_texture** **(** **)** -Returns the ID of the test texture. Creates one if none exists. +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 of getting the test texture and applying it to a :ref:`Sprite2D` node: + +:: + + var texture_rid = RenderingServer.get_test_texture() + var texture = ImageTexture.create_from_image(RenderingServer.texture_2d_get(texture_rid)) + $Sprite2D.texture = texture .. rst-class:: classref-item-separator @@ -7288,7 +7268,7 @@ Returns the ID of the test texture. Creates one if none exists. :ref:`String` **get_video_adapter_api_version** **(** **)** |const| -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. +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. @@ -7344,7 +7324,15 @@ Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). :ref:`RID` **get_white_texture** **(** **)** -Returns the ID of a white texture. Creates one if none exists. +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 of getting the white texture and applying it to a :ref:`Sprite2D` node: + +:: + + var texture_rid = RenderingServer.get_white_texture() + var texture = ImageTexture.create_from_image(RenderingServer.texture_2d_get(texture_rid)) + $Sprite2D.texture = texture .. rst-class:: classref-item-separator @@ -7356,7 +7344,7 @@ Returns the ID of a white texture. Creates one if none exists. void **gi_set_use_half_resolution** **(** :ref:`bool` half_resolution **)** -If ``half_resolution`` is ``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. See also :ref:`ProjectSettings.rendering/global_illumination/gi/use_half_resolution`. +If ``half_resolution`` is ``true``, renders :ref:`VoxelGI` and SDFGI (:ref:`Environment.sdfgi_enabled`) buffers at halved resolution on each axis (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. Equivalent to :ref:`ProjectSettings.rendering/global_illumination/gi/use_half_resolution`. .. rst-class:: classref-item-separator @@ -7368,9 +7356,9 @@ If ``half_resolution`` is ``true``, renders :ref:`VoxelGI` and SD void **global_shader_parameter_add** **(** :ref:`StringName` name, :ref:`GlobalShaderParameterType` type, :ref:`Variant` default_value **)** -.. container:: contribute +Creates a new global shader uniform. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** Global shader parameter names are case-sensitive. .. rst-class:: classref-item-separator @@ -7382,9 +7370,9 @@ void **global_shader_parameter_add** **(** :ref:`StringName` n :ref:`Variant` **global_shader_parameter_get** **(** :ref:`StringName` name **)** |const| -.. container:: contribute +Returns the value of the global shader uniform specified by ``name``. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **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 @@ -7394,11 +7382,11 @@ void **global_shader_parameter_add** **(** :ref:`StringName` n .. rst-class:: classref-method -:ref:`PackedStringArray` **global_shader_parameter_get_list** **(** **)** |const| +:ref:`StringName[]` **global_shader_parameter_get_list** **(** **)** |const| -.. container:: contribute +Returns the list of global shader uniform names. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **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 @@ -7410,9 +7398,9 @@ void **global_shader_parameter_add** **(** :ref:`StringName` n :ref:`GlobalShaderParameterType` **global_shader_parameter_get_type** **(** :ref:`StringName` name **)** |const| -.. container:: contribute +Returns the type associated to the global shader uniform specified by ``name``. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **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 @@ -7424,9 +7412,7 @@ void **global_shader_parameter_add** **(** :ref:`StringName` n void **global_shader_parameter_remove** **(** :ref:`StringName` name **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Removes the global shader uniform specified by ``name``. .. rst-class:: classref-item-separator @@ -7438,9 +7424,7 @@ void **global_shader_parameter_remove** **(** :ref:`StringName void **global_shader_parameter_set** **(** :ref:`StringName` name, :ref:`Variant` value **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the global shader uniform ``name`` to ``value``. .. rst-class:: classref-item-separator @@ -7452,9 +7436,7 @@ void **global_shader_parameter_set** **(** :ref:`StringName` n void **global_shader_parameter_set_override** **(** :ref:`StringName` name, :ref:`Variant` value **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overrides the global shader uniform ``name`` with ``value``. Equivalent to the :ref:`ShaderGlobalsOverride` node. .. rst-class:: classref-item-separator @@ -7528,9 +7510,11 @@ 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` static 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, and reflection probes 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`. .. rst-class:: classref-item-separator @@ -7544,7 +7528,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` static method. +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 @@ -7556,9 +7540,9 @@ Once finished with your RID, you will want to free the RID using the RenderingSe :ref:`Variant` **instance_geometry_get_shader_parameter** **(** :ref:`RID` instance, :ref:`StringName` parameter **)** |const| -.. container:: contribute +Returns the value of the per-instance shader uniform from the specified 3D geometry instance. Equivalent to :ref:`GeometryInstance3D.get_instance_shader_parameter`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** Per-instance shader parameter names are case-sensitive. .. rst-class:: classref-item-separator @@ -7570,9 +7554,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe :ref:`Variant` **instance_geometry_get_shader_parameter_default_value** **(** :ref:`RID` instance, :ref:`StringName` parameter **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -7584,9 +7566,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe :ref:`Dictionary[]` **instance_geometry_get_shader_parameter_list** **(** :ref:`RID` instance **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -7622,9 +7602,7 @@ Sets the flag for a given :ref:`InstanceFlags` instance, :ref:`RID` lightmap, :ref:`Rect2` lightmap_uv_scale, :ref:`int` lightmap_slice **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the lightmap GI instance to use for the specified 3D geometry instance. The lightmap UV scale for the specified instance (equivalent to :ref:`GeometryInstance3D.gi_lightmap_scale`) and lightmap atlas slice must also be specified. .. rst-class:: classref-item-separator @@ -7636,9 +7614,7 @@ void **instance_geometry_set_lightmap** **(** :ref:`RID` instance, :r void **instance_geometry_set_lod_bias** **(** :ref:`RID` instance, :ref:`float` lod_bias **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the level of detail bias to use when rendering the specified 3D geometry instance. Higher values result in higher detail from further away. Equivalent to :ref:`GeometryInstance3D.lod_bias`. .. rst-class:: classref-item-separator @@ -7674,9 +7650,7 @@ Sets a material that will override the material for all surfaces on the mesh ass void **instance_geometry_set_shader_parameter** **(** :ref:`RID` instance, :ref:`StringName` parameter, :ref:`Variant` value **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -7718,7 +7692,7 @@ Sets the visibility range values for the given geometry instance. Equivalent to void **instance_set_base** **(** :ref:`RID` instance, :ref:`RID` base **)** -Sets the base of the instance. A base can be any of the 3D objects that are created in the RenderingServer that can be displayed. For example, any of the light types, mesh, multimesh, immediate geometry, particle system, reflection probe, lightmap, and the GI probe are all types that can be set as the base of an instance in order to be displayed in the scenario. +Sets the base of the instance. A base can be any of the 3D objects that are created in the RenderingServer that can be displayed. For example, any of the light types, mesh, multimesh, particle system, reflection probe, decal, lightmap, voxel GI and visibility notifiers are all types that can be set as the base of an instance in order to be displayed in the scenario. .. rst-class:: classref-item-separator @@ -7766,9 +7740,7 @@ Sets a margin to increase the size of the AABB when culling objects from the vie void **instance_set_ignore_culling** **(** :ref:`RID` instance, :ref:`bool` enabled **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +If ``true``, ignores both frustum and occlusion culling on the specified 3D geometry instance. This is not the same as :ref:`GeometryInstance3D.ignore_occlusion_culling`, which only ignores occlusion culling and leaves frustum culling intact. .. rst-class:: classref-item-separator @@ -7864,7 +7836,7 @@ Sets whether an instance is drawn or not. Equivalent to :ref:`Node3D.visible` **instances_cull_aabb** **(** :ref:`AABB` aabb, :ref:`RID` scenario **)** |const| -Returns an array of object IDs intersecting with the provided AABB. Only visual 3D nodes 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. @@ -7878,7 +7850,7 @@ Returns an array of object IDs intersecting with the provided AABB. Only visual :ref:`PackedInt64Array` **instances_cull_convex** **(** :ref:`Plane[]` convex, :ref:`RID` scenario **)** |const| -Returns an array of object IDs intersecting with the provided convex shape. Only visual 3D nodes 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. @@ -7892,7 +7864,7 @@ Returns an array of object IDs intersecting with the provided convex shape. Only :ref:`PackedInt64Array` **instances_cull_ray** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`RID` scenario **)** |const| -Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes 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. @@ -7954,9 +7926,7 @@ Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual para void **light_projectors_set_filter** **(** :ref:`LightProjectorFilter` filter **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the texture filter mode to use when rendering light projectors. This parameter is global and cannot be set on a per-light basis. .. rst-class:: classref-item-separator @@ -7968,9 +7938,7 @@ void **light_projectors_set_filter** **(** :ref:`LightProjectorFilter` light, :ref:`LightBakeMode` bake_mode **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the bake mode to use for the specified 3D light. Equivalent to :ref:`Light3D.light_bake_mode`. .. rst-class:: classref-item-separator @@ -7994,7 +7962,7 @@ Sets the color of the light. Equivalent to :ref:`Light3D.light_color` light, :ref:`int` mask **)** -Sets the cull mask for this Light3D. Lights only affect objects in the selected layers. Equivalent to :ref:`Light3D.light_cull_mask`. +Sets the cull mask for this 3D light. Lights only affect objects in the selected layers. Equivalent to :ref:`Light3D.light_cull_mask`. .. rst-class:: classref-item-separator @@ -8006,7 +7974,7 @@ Sets the cull mask for this Light3D. Lights only affect objects in the selected void **light_set_distance_fade** **(** :ref:`RID` decal, :ref:`bool` enabled, :ref:`float` begin, :ref:`float` shadow, :ref:`float` length **)** -Sets the distance fade for this Light3D. This acts as a form of level of detail (LOD) and can be used to improve performance. Equivalent to :ref:`Light3D.distance_fade_enabled`, :ref:`Light3D.distance_fade_begin`, :ref:`Light3D.distance_fade_shadow`, and :ref:`Light3D.distance_fade_length`. +Sets the distance fade for this 3D light. This acts as a form of level of detail (LOD) and can be used to improve performance. Equivalent to :ref:`Light3D.distance_fade_enabled`, :ref:`Light3D.distance_fade_begin`, :ref:`Light3D.distance_fade_shadow`, and :ref:`Light3D.distance_fade_length`. .. rst-class:: classref-item-separator @@ -8018,9 +7986,7 @@ Sets the distance fade for this Light3D. This acts as a form of level of detail void **light_set_max_sdfgi_cascade** **(** :ref:`RID` light, :ref:`int` cascade **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the maximum SDFGI cascade in which the 3D light's indirect lighting is rendered. Higher values allow the light to be rendered in SDFGI further away from the camera. .. rst-class:: classref-item-separator @@ -8032,7 +7998,7 @@ void **light_set_max_sdfgi_cascade** **(** :ref:`RID` light, :ref:`in void **light_set_negative** **(** :ref:`RID` light, :ref:`bool` enable **)** -If ``true``, light will subtract light instead of adding light. Equivalent to :ref:`Light3D.light_negative`. +If ``true``, the 3D light will subtract light instead of adding light. Equivalent to :ref:`Light3D.light_negative`. .. rst-class:: classref-item-separator @@ -8044,7 +8010,7 @@ If ``true``, light will subtract light instead of adding light. Equivalent to :r void **light_set_param** **(** :ref:`RID` light, :ref:`LightParam` param, :ref:`float` value **)** -Sets the specified 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 @@ -8056,7 +8022,7 @@ Sets the specified light parameter. See :ref:`LightParam` light, :ref:`RID` texture **)** -Not implemented in Godot 3.x. +Sets the projector texture to use for the specified 3D light. Equivalent to :ref:`Light3D.light_projector`. .. rst-class:: classref-item-separator @@ -8092,7 +8058,11 @@ If ``true``, light will cast shadows. Equivalent to :ref:`Light3D.shadow_enabled :ref:`RID` **lightmap_create** **(** **)** -Creates a new :ref:`LightmapGI` instance. +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. + +\ **Note:** The equivalent node is :ref:`LightmapGI`. .. rst-class:: classref-item-separator @@ -8228,9 +8198,7 @@ void **lightmap_set_probe_interior** **(** :ref:`RID` lightmap, :ref: void **lightmap_set_textures** **(** :ref:`RID` lightmap, :ref:`RID` light, :ref:`bool` uses_sh **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Set the textures on the given ``lightmap`` GI instance to the texture array pointed to by the ``light`` RID. If the lightmap texture was baked with :ref:`LightmapGI.directional` set to ``true``, then ``uses_sh`` must also be ``true``. .. rst-class:: classref-item-separator @@ -8242,7 +8210,7 @@ void **lightmap_set_textures** **(** :ref:`RID` lightmap, :ref:`RID` **make_sphere_mesh** **(** :ref:`int` latitudes, :ref:`int` longitudes, :ref:`float` radius **)** -Returns a mesh of a sphere with the given number of horizontal and vertical subdivisions. +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 @@ -8256,7 +8224,9 @@ Returns a mesh of a sphere with the given number of horizontal and vertical subd 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` static 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`. .. rst-class:: classref-item-separator @@ -8370,10 +8340,12 @@ 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` static 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. +\ **Note:** The equivalent resource is :ref:`Mesh`. + .. rst-class:: classref-item-separator ---- @@ -8660,10 +8632,12 @@ void **multimesh_allocate_data** **(** :ref:`RID` multimesh, :ref:`in 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` static 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. +\ **Note:** The equivalent resource is :ref:`MultiMesh`. + .. rst-class:: classref-item-separator ---- @@ -8686,9 +8660,9 @@ Calculates and returns the axis-aligned bounding box that encloses all instances :ref:`PackedFloat32Array` **multimesh_get_buffer** **(** :ref:`RID` multimesh **)** |const| -.. container:: contribute +Returns the MultiMesh data (such as instance transforms, colors, etc). See :ref:`multimesh_set_buffer` for a description of the returned data. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **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 @@ -8832,9 +8806,22 @@ Sets the :ref:`Transform2D` for this instance. For use when m void **multimesh_set_buffer** **(** :ref:`RID` multimesh, :ref:`PackedFloat32Array` buffer **)** -.. container:: contribute +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`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +The per-instance data size and expected data order is: + +:: + + 2D: + - Position: 8 floats (8 floats for Transform2D) + - Position + Vertex color: 12 floats (8 floats for Transform2D, 4 floats for Color) + - Position + Custom data: 12 floats (8 floats for Transform2D, 4 floats of custom data) + - Position + Vertex color + Custom data: 16 floats (8 floats for Transform2D, 4 floats for Color, 4 floats of custom data) + 3D: + - Position: 12 floats (12 floats for Transform3D) + - Position + Vertex color: 16 floats (12 floats for Transform3D, 4 floats for Color) + - Position + Custom data: 16 floats (12 floats for Transform3D, 4 floats of custom data) + - Position + Vertex color + Custom data: 20 floats (12 floats for Transform3D, 4 floats for Color, 4 floats of custom data) .. rst-class:: classref-item-separator @@ -8870,9 +8857,11 @@ Sets the number of instances visible at a given time. If -1, all instances that :ref:`RID` **occluder_create** **(** **)** -.. container:: contribute +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. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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). .. rst-class:: classref-item-separator @@ -8884,9 +8873,7 @@ Sets the number of instances visible at a given time. If -1, all instances that void **occluder_set_mesh** **(** :ref:`RID` occluder, :ref:`PackedVector3Array` vertices, :ref:`PackedInt32Array` indices **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the mesh data for the given occluder RID, which controls the shape of the occlusion culling that will be performed. .. rst-class:: classref-item-separator @@ -8900,10 +8887,12 @@ void **occluder_set_mesh** **(** :ref:`RID` occluder, :ref:`PackedVec 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` static 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. +\ **Note:** The equivalent node is :ref:`OmniLight3D`. + .. rst-class:: classref-item-separator ---- @@ -8914,9 +8903,9 @@ To place in a scene, attach this omni light to an instance using :ref:`instance_ :ref:`RID` **particles_collision_create** **(** **)** -.. container:: contribute +Creates a new 3D GPU particle collision or attractor and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most ``particles_collision_*`` RenderingServer functions. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** The equivalent nodes are :ref:`GPUParticlesCollision3D` and :ref:`GPUParticlesAttractor3D`. .. rst-class:: classref-item-separator @@ -8928,9 +8917,7 @@ To place in a scene, attach this omni light to an instance using :ref:`instance_ void **particles_collision_height_field_update** **(** :ref:`RID` particles_collision **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Requests an update for the 3D GPU particle collision heightfield. This may be automatically called by the 3D GPU particle collision heightfield depending on its :ref:`GPUParticlesCollisionHeightField3D.update_mode`. .. rst-class:: classref-item-separator @@ -8942,9 +8929,7 @@ void **particles_collision_height_field_update** **(** :ref:`RID` par void **particles_collision_set_attractor_attenuation** **(** :ref:`RID` particles_collision, :ref:`float` curve **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the attenuation ``curve`` for the 3D GPU particles attractor specified by the ``particles_collision`` RID. Only used for attractors, not colliders. Equivalent to :ref:`GPUParticlesAttractor3D.attenuation`. .. rst-class:: classref-item-separator @@ -8956,9 +8941,7 @@ void **particles_collision_set_attractor_attenuation** **(** :ref:`RID` particles_collision, :ref:`float` amount **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the directionality ``amount`` for the 3D GPU particles attractor specified by the ``particles_collision`` RID. Only used for attractors, not colliders. Equivalent to :ref:`GPUParticlesAttractor3D.directionality`. .. rst-class:: classref-item-separator @@ -8968,11 +8951,9 @@ void **particles_collision_set_attractor_directionality** **(** :ref:`RID` particles_collision, :ref:`float` setrngth **)** - -.. container:: contribute +void **particles_collision_set_attractor_strength** **(** :ref:`RID` particles_collision, :ref:`float` strength **)** - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the ``strength`` for the 3D GPU particles attractor specified by the ``particles_collision`` RID. Only used for attractors, not colliders. Equivalent to :ref:`GPUParticlesAttractor3D.strength`. .. rst-class:: classref-item-separator @@ -8984,9 +8965,7 @@ void **particles_collision_set_attractor_strength** **(** :ref:`RID` void **particles_collision_set_box_extents** **(** :ref:`RID` particles_collision, :ref:`Vector3` extents **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the ``extents`` for the 3D GPU particles collision by the ``particles_collision`` RID. Equivalent to :ref:`GPUParticlesCollisionBox3D.size`, :ref:`GPUParticlesCollisionSDF3D.size`, :ref:`GPUParticlesCollisionHeightField3D.size`, :ref:`GPUParticlesAttractorBox3D.size` or :ref:`GPUParticlesAttractorVectorField3D.size` depending on the ``particles_collision`` type. .. rst-class:: classref-item-separator @@ -8998,9 +8977,7 @@ void **particles_collision_set_box_extents** **(** :ref:`RID` particl void **particles_collision_set_collision_type** **(** :ref:`RID` particles_collision, :ref:`ParticlesCollisionType` type **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the collision or attractor shape ``type`` for the 3D GPU particles collision or attractor specified by the ``particles_collision`` RID. .. rst-class:: classref-item-separator @@ -9012,9 +8989,7 @@ void **particles_collision_set_collision_type** **(** :ref:`RID` part void **particles_collision_set_cull_mask** **(** :ref:`RID` particles_collision, :ref:`int` mask **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the cull ``mask`` for the 3D GPU particles collision or attractor specified by the ``particles_collision`` RID. Equivalent to :ref:`GPUParticlesCollision3D.cull_mask` or :ref:`GPUParticlesAttractor3D.cull_mask` depending on the ``particles_collision`` type. .. rst-class:: classref-item-separator @@ -9026,9 +9001,7 @@ void **particles_collision_set_cull_mask** **(** :ref:`RID` particles void **particles_collision_set_field_texture** **(** :ref:`RID` particles_collision, :ref:`RID` texture **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the signed distance field ``texture`` for the 3D GPU particles collision specified by the ``particles_collision`` RID. Equivalent to :ref:`GPUParticlesCollisionSDF3D.texture` or :ref:`GPUParticlesAttractorVectorField3D.texture` depending on the ``particles_collision`` type. .. rst-class:: classref-item-separator @@ -9040,9 +9013,7 @@ void **particles_collision_set_field_texture** **(** :ref:`RID` parti void **particles_collision_set_height_field_resolution** **(** :ref:`RID` particles_collision, :ref:`ParticlesCollisionHeightfieldResolution` resolution **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the heightmap ``resolution`` for the 3D GPU particles heightfield collision specified by the ``particles_collision`` RID. Equivalent to :ref:`GPUParticlesCollisionHeightField3D.resolution`. .. rst-class:: classref-item-separator @@ -9054,9 +9025,7 @@ void **particles_collision_set_height_field_resolution** **(** :ref:`RID` particles_collision, :ref:`float` radius **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the ``radius`` for the 3D GPU particles sphere collision or attractor specified by the ``particles_collision`` RID. Equivalent to :ref:`GPUParticlesCollisionSphere3D.radius` or :ref:`GPUParticlesAttractorSphere3D.radius` depending on the ``particles_collision`` type. .. rst-class:: classref-item-separator @@ -9068,12 +9037,16 @@ void **particles_collision_set_sphere_radius** **(** :ref:`RID` parti :ref:`RID` **particles_create** **(** **)** -Creates a 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. +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` static 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. +\ **Note:** The equivalent nodes are :ref:`GPUParticles2D` and :ref:`GPUParticles3D`. + +\ **Note:** All ``particles_*`` methods only apply to GPU-based particles, not CPU-based particles. :ref:`CPUParticles2D` and :ref:`CPUParticles3D` do not have equivalent RenderingServer functions available, as these use :ref:`MultiMeshInstance2D` and :ref:`MultiMeshInstance3D` under the hood (see ``multimesh_*`` methods). + .. rst-class:: classref-item-separator ---- @@ -9084,9 +9057,7 @@ To place in a scene, attach these particles to an instance using :ref:`instance_ void **particles_emit** **(** :ref:`RID` particles, :ref:`Transform3D` transform, :ref:`Vector3` velocity, :ref:`Color` color, :ref:`Color` custom, :ref:`int` emit_flags **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Manually emits particles from the ``particles`` instance. .. rst-class:: classref-item-separator @@ -9318,9 +9289,7 @@ Sets the lifetime of each particle in the system. Equivalent to :ref:`GPUParticl void **particles_set_mode** **(** :ref:`RID` particles, :ref:`ParticlesMode` mode **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets whether the GPU particles specified by the ``particles`` RID should be rendered in 2D or 3D according to ``mode``. .. rst-class:: classref-item-separator @@ -9422,9 +9391,7 @@ void **particles_set_trail_bind_poses** **(** :ref:`RID` particles, : void **particles_set_trails** **(** :ref:`RID` particles, :ref:`bool` enable, :ref:`float` length_sec **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +If ``enable`` is ``true``, enables trails for the ``particles`` with the specified ``length_sec`` in seconds. Equivalent to :ref:`GPUParticles3D.trail_enabled` and :ref:`GPUParticles3D.trail_lifetime`. .. rst-class:: classref-item-separator @@ -9462,9 +9429,7 @@ If ``true``, particles use local coordinates. If ``false`` they use global coord void **positional_soft_shadow_filter_set_quality** **(** :ref:`ShadowQuality` quality **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the filter quality for omni and spot light shadows in 3D. See also :ref:`ProjectSettings.rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality`. This parameter is global and cannot be set on a per-viewport basis. .. rst-class:: classref-item-separator @@ -9478,10 +9443,12 @@ void **positional_soft_shadow_filter_set_quality** **(** :ref:`ShadowQuality` static 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. +\ **Note:** The equivalent node is :ref:`ReflectionProbe`. + .. rst-class:: classref-item-separator ---- @@ -9492,9 +9459,7 @@ To place in a scene, attach this reflection probe to an instance using :ref:`ins void **reflection_probe_set_ambient_color** **(** :ref:`RID` probe, :ref:`Color` color **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the reflection probe's custom ambient light color. Equivalent to :ref:`ReflectionProbe.ambient_color`. .. rst-class:: classref-item-separator @@ -9506,9 +9471,7 @@ void **reflection_probe_set_ambient_color** **(** :ref:`RID` probe, : void **reflection_probe_set_ambient_energy** **(** :ref:`RID` probe, :ref:`float` energy **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the reflection probe's custom ambient light energy. Equivalent to :ref:`ReflectionProbe.ambient_color_energy`. .. rst-class:: classref-item-separator @@ -9520,9 +9483,7 @@ void **reflection_probe_set_ambient_energy** **(** :ref:`RID` probe, void **reflection_probe_set_ambient_mode** **(** :ref:`RID` probe, :ref:`ReflectionProbeAmbientMode` mode **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the reflection probe's ambient light mode. Equivalent to :ref:`ReflectionProbe.ambient_mode`. .. rst-class:: classref-item-separator @@ -9606,9 +9567,7 @@ Sets the max distance away from the probe an object can be before it is culled. void **reflection_probe_set_mesh_lod_threshold** **(** :ref:`RID` probe, :ref:`float` pixels **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the mesh level of detail to use in the reflection probe rendering. Higher values will use less detailed versions of meshes that have LOD variations generated, which can improve performance. Equivalent to :ref:`ReflectionProbe.mesh_lod_threshold`. .. rst-class:: classref-item-separator @@ -9632,9 +9591,7 @@ Sets the origin offset to be used when this reflection probe is in box project m void **reflection_probe_set_resolution** **(** :ref:`RID` probe, :ref:`int` resolution **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the resolution to use when rendering the specified reflection probe. The ``resolution`` is specified for each cubemap face: for instance, specifying ``512`` will allocate 6 faces of 512×512 each (plus mipmaps for roughness levels). .. rst-class:: classref-item-separator @@ -9684,7 +9641,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` static 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. @@ -9698,9 +9655,7 @@ The scenario is the 3D world that all the visual instances exist in. void **scenario_set_camera_attributes** **(** :ref:`RID` scenario, :ref:`RID` effects **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the camera attributes (``effects``) that will be used with this scenario. See also :ref:`CameraAttributes`. .. rst-class:: classref-item-separator @@ -9712,7 +9667,7 @@ void **scenario_set_camera_attributes** **(** :ref:`RID` scenario, :r void **scenario_set_environment** **(** :ref:`RID` scenario, :ref:`RID` environment **)** -Sets the environment that will be used with this scenario. +Sets the environment that will be used with this scenario. See also :ref:`Environment`. .. rst-class:: classref-item-separator @@ -9736,9 +9691,7 @@ Sets the fallback environment to be used by this scenario. The fallback environm void **screen_space_roughness_limiter_set_active** **(** :ref:`bool` enable, :ref:`float` amount, :ref:`float` limit **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the screen-space roughness limiter parameters, such as whether it should be enabled and its thresholds. Equivalent to :ref:`ProjectSettings.rendering/anti_aliasing/screen_space_roughness_limiter/enabled`, :ref:`ProjectSettings.rendering/anti_aliasing/screen_space_roughness_limiter/amount` and :ref:`ProjectSettings.rendering/anti_aliasing/screen_space_roughness_limiter/limit`. .. rst-class:: classref-item-separator @@ -9762,7 +9715,7 @@ Sets a boot image. The color defines the background color. If ``scale`` is ``tru void **set_debug_generate_wireframes** **(** :ref:`bool` generate **)** -If ``true``, the engine will generate wireframes for use with the wireframe debug mode. +This method is currently unimplemented and does nothing if called with ``generate`` set to ``true``. .. rst-class:: classref-item-separator @@ -9774,7 +9727,7 @@ If ``true``, the engine will generate wireframes for use with the wireframe debu void **set_default_clear_color** **(** :ref:`Color` color **)** -Sets the default clear color which is used when a specific clear color has not been selected. +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 @@ -9788,7 +9741,9 @@ 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` static 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`. .. rst-class:: classref-item-separator @@ -9800,7 +9755,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe :ref:`String` **shader_get_code** **(** :ref:`RID` shader **)** |const| -Returns a shader's code. +Returns a shader's source code as a string. .. rst-class:: classref-item-separator @@ -9826,9 +9781,7 @@ Returns a default texture from a shader searched by name. :ref:`Variant` **shader_get_parameter_default** **(** :ref:`RID` shader, :ref:`StringName` name **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the default value for the specified shader uniform. This is usually the value written in the shader source code. .. rst-class:: classref-item-separator @@ -9840,9 +9793,7 @@ Returns a default texture from a shader searched by name. void **shader_set_code** **(** :ref:`RID` shader, :ref:`String` code **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the shader's source code (which triggers recompilation after being changed). .. rst-class:: classref-item-separator @@ -9868,9 +9819,7 @@ Sets a shader's default texture. Overwrites the texture given by name. void **shader_set_path_hint** **(** :ref:`RID` shader, :ref:`String` path **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the path hint for the specified shader. This should generally match the :ref:`Shader` resource's :ref:`Resource.resource_path`. .. rst-class:: classref-item-separator @@ -9946,7 +9895,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` static 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 @@ -9984,9 +9933,11 @@ void **skeleton_set_base_transform_2d** **(** :ref:`RID` skeleton, :r :ref:`Image` **sky_bake_panorama** **(** :ref:`RID` sky, :ref:`float` energy, :ref:`bool` bake_irradiance, :ref:`Vector2i` size **)** -.. container:: contribute +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`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **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. + +\ **Note:** ``size`` should be a 2:1 aspect ratio for the generated panorama to have square pixels. For radiance maps, there is no point in using a height greater than :ref:`Sky.radiance_size`, as it won't increase detail. Irradiance maps only contain low-frequency data, so there is usually no point in going past a size of 128×64 pixels when saving an irradiance map. .. rst-class:: classref-item-separator @@ -10000,7 +9951,7 @@ void **skeleton_set_base_transform_2d** **(** :ref:`RID` skeleton, :r 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` static 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 @@ -10012,7 +9963,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe void **sky_set_material** **(** :ref:`RID` sky, :ref:`RID` material **)** -Sets the material that the sky uses to render the background and reflection maps. +Sets the material that the sky uses to render the background, ambient and reflection maps. .. rst-class:: classref-item-separator @@ -10024,9 +9975,7 @@ Sets the material that the sky uses to render the background and reflection maps void **sky_set_mode** **(** :ref:`RID` sky, :ref:`SkyMode` mode **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the process ``mode`` of the sky specified by the ``sky`` RID. Equivalent to :ref:`Sky.process_mode`. .. rst-class:: classref-item-separator @@ -10038,9 +9987,7 @@ void **sky_set_mode** **(** :ref:`RID` sky, :ref:`SkyMode` sky, :ref:`int` radiance_size **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the ``radiance_size`` of the sky specified by the ``sky`` RID (in pixels). Equivalent to :ref:`Sky.radiance_size`. .. rst-class:: classref-item-separator @@ -10054,7 +10001,7 @@ void **sky_set_radiance_size** **(** :ref:`RID` sky, :ref:`int` static 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. @@ -10068,9 +10015,7 @@ To place in a scene, attach this spot light to an instance using :ref:`instance_ void **sub_surface_scattering_set_quality** **(** :ref:`SubSurfaceScatteringQuality` quality **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets :ref:`ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_quality` to use when rendering materials that have subsurface scattering enabled. .. rst-class:: classref-item-separator @@ -10082,9 +10027,7 @@ void **sub_surface_scattering_set_quality** **(** :ref:`SubSurfaceScatteringQual void **sub_surface_scattering_set_scale** **(** :ref:`float` scale, :ref:`float` depth_scale **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_scale` and :ref:`ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale` to use when rendering materials that have subsurface scattering enabled. .. rst-class:: classref-item-separator @@ -10096,9 +10039,13 @@ void **sub_surface_scattering_set_scale** **(** :ref:`float` scale, :ref:`RID` **texture_2d_create** **(** :ref:`Image` image **)** -.. container:: contribute +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. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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. .. rst-class:: classref-item-separator @@ -10110,9 +10057,15 @@ void **sub_surface_scattering_set_scale** **(** :ref:`float` scale, :ref:`Image` **texture_2d_get** **(** :ref:`RID` texture **)** |const| -.. container:: contribute +Returns an :ref:`Image` instance from the given ``texture`` :ref:`RID`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Example of getting the test texture from :ref:`get_test_texture` and applying it to a :ref:`Sprite2D` node: + +:: + + var texture_rid = RenderingServer.get_test_texture() + var texture = ImageTexture.create_from_image(RenderingServer.texture_2d_get(texture_rid)) + $Sprite2D.texture = texture .. rst-class:: classref-item-separator @@ -10124,9 +10077,7 @@ void **sub_surface_scattering_set_scale** **(** :ref:`float` scale, :ref:`Image` **texture_2d_layer_get** **(** :ref:`RID` texture, :ref:`int` layer **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns an :ref:`Image` instance from the given ``texture`` :ref:`RID` and ``layer``. .. rst-class:: classref-item-separator @@ -10138,9 +10089,11 @@ void **sub_surface_scattering_set_scale** **(** :ref:`float` scale, :ref:`RID` **texture_2d_layered_create** **(** :ref:`Image[]` layers, :ref:`TextureLayeredType` layered_type **)** -.. container:: contribute +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. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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`. .. rst-class:: classref-item-separator @@ -10152,9 +10105,9 @@ void **sub_surface_scattering_set_scale** **(** :ref:`float` scale, :ref:`RID` **texture_2d_layered_placeholder_create** **(** :ref:`TextureLayeredType` layered_type **)** -.. container:: contribute +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`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** The equivalent resource is :ref:`PlaceholderTextureLayered`. .. rst-class:: classref-item-separator @@ -10166,9 +10119,11 @@ void **sub_surface_scattering_set_scale** **(** :ref:`float` scale, :ref:`RID` **texture_2d_placeholder_create** **(** **)** -.. container:: contribute +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`\ - There is currently no description for this method. Please help us by :ref:`contributing one `! +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`. .. rst-class:: classref-item-separator @@ -10180,9 +10135,9 @@ void **sub_surface_scattering_set_scale** **(** :ref:`float` scale, void **texture_2d_update** **(** :ref:`RID` texture, :ref:`Image` image, :ref:`int` layer **)** -.. container:: contribute +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`). - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **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 @@ -10194,9 +10149,7 @@ void **texture_2d_update** **(** :ref:`RID` texture, :ref:`Image` **texture_3d_create** **(** :ref:`Format` format, :ref:`int` width, :ref:`int` height, :ref:`int` depth, :ref:`bool` mipmaps, :ref:`Image[]` data **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +**Note:** The equivalent resource is :ref:`Texture3D`. .. rst-class:: classref-item-separator @@ -10208,9 +10161,7 @@ void **texture_2d_update** **(** :ref:`RID` texture, :ref:`Image` **texture_3d_get** **(** :ref:`RID` texture **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns 3D texture data as an array of :ref:`Image`\ s for the specified texture :ref:`RID`. .. rst-class:: classref-item-separator @@ -10222,9 +10173,11 @@ void **texture_2d_update** **(** :ref:`RID` texture, :ref:`Image` **texture_3d_placeholder_create** **(** **)** -.. container:: contribute +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. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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`. .. rst-class:: classref-item-separator @@ -10236,9 +10189,23 @@ void **texture_2d_update** **(** :ref:`RID` texture, :ref:`Image` texture, :ref:`Image[]` data **)** -.. container:: contribute +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. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **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 + +---- + +.. _class_RenderingServer_method_texture_get_native_handle: + +.. rst-class:: classref-method + +:ref:`int` **texture_get_native_handle** **(** :ref:`RID` texture, :ref:`bool` srgb=false **)** |const| + +Returns the internal graphics handle for this texture object. For use when communicating with 3rd party APIs mostly with GDExternal. + +\ **Note:** This functions returns a ``uint64_t`` which internally maps to a ``GLuint`` (OpenGL) or ``VkImage`` (Vulkan). .. rst-class:: classref-item-separator @@ -10276,9 +10243,7 @@ Returns a texture :ref:`RID` that can be used with :ref:`RenderingDev :ref:`RID` **texture_proxy_create** **(** :ref:`RID` base **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +*Deprecated.* ProxyTexture was removed in Godot 4, so this method does nothing when called and always returns a null :ref:`RID`. .. rst-class:: classref-item-separator @@ -10290,9 +10255,7 @@ Returns a texture :ref:`RID` that can be used with :ref:`RenderingDev void **texture_proxy_update** **(** :ref:`RID` texture, :ref:`RID` proxy_to **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +*Deprecated.* ProxyTexture was removed in Godot 4, so this method cannot be used anymore. .. rst-class:: classref-item-separator @@ -10304,9 +10267,7 @@ void **texture_proxy_update** **(** :ref:`RID` texture, :ref:`RID` texture, :ref:`RID` by_texture **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Replaces ``texture``'s texture data by the texture specified by the ``by_texture`` RID, without changing ``texture``'s RID. .. rst-class:: classref-item-separator @@ -10415,7 +10376,9 @@ 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` static 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`. .. rst-class:: classref-item-separator @@ -10427,9 +10390,9 @@ Once finished with your RID, you will want to free the RID using the RenderingSe :ref:`float` **viewport_get_measured_render_time_cpu** **(** :ref:`RID` viewport **)** |const| -.. container:: contribute +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`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **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 @@ -10441,9 +10404,11 @@ Once finished with your RID, you will want to free the RID using the RenderingSe :ref:`float` **viewport_get_measured_render_time_gpu** **(** :ref:`RID` viewport **)** |const| -.. container:: contribute +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_gpu`. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **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. .. rst-class:: classref-item-separator @@ -10455,9 +10420,35 @@ Once finished with your RID, you will want to free the RID using the RenderingSe :ref:`int` **viewport_get_render_info** **(** :ref:`RID` viewport, :ref:`ViewportRenderInfoType` type, :ref:`ViewportRenderInfo` info **)** -.. container:: contribute +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. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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: + +:: + + func _ready(): + for _i in 2: + await get_tree().process_frame + + print( + RenderingServer.viewport_get_render_info(get_viewport().get_viewport_rid(), + RenderingServer.VIEWPORT_RENDER_INFO_TYPE_VISIBLE, + RenderingServer.VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME) + ) + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingServer_method_viewport_get_render_target: + +.. rst-class:: classref-method + +:ref:`RID` **viewport_get_render_target** **(** :ref:`RID` viewport **)** |const| + +Returns the render target for the viewport. .. rst-class:: classref-item-separator @@ -10567,9 +10558,7 @@ Sets the debug draw mode of a viewport. See :ref:`ViewportDebugDraw` viewport, :ref:`CanvasItemTextureFilter` filter **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the default texture filtering mode for the specified ``viewport`` RID. See :ref:`CanvasItemTextureFilter` for options. .. rst-class:: classref-item-separator @@ -10581,9 +10570,7 @@ void **viewport_set_default_canvas_item_texture_filter** **(** :ref:`RID` viewport, :ref:`CanvasItemTextureRepeat` repeat **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the default texture repeat mode for the specified ``viewport`` RID. See :ref:`CanvasItemTextureRepeat` for options. .. rst-class:: classref-item-separator @@ -10595,7 +10582,7 @@ void **viewport_set_default_canvas_item_texture_repeat** **(** :ref:`RID` viewport, :ref:`bool` disable **)** -If ``true``, the viewport's canvas is not rendered. +If ``true``, the viewport's canvas (i.e. 2D and GUI elements) is not rendered. .. rst-class:: classref-item-separator @@ -10607,9 +10594,7 @@ If ``true``, the viewport's canvas is not rendered. void **viewport_set_disable_3d** **(** :ref:`RID` viewport, :ref:`bool` disable **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +If ``true``, the viewport's 3D elements are not rendered. .. rst-class:: classref-item-separator @@ -10657,9 +10642,7 @@ Sets the viewport's global transformation matrix. void **viewport_set_measure_render_time** **(** :ref:`RID` viewport, :ref:`bool` enable **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +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 @@ -10671,7 +10654,7 @@ void **viewport_set_measure_render_time** **(** :ref:`RID` viewport, void **viewport_set_msaa_2d** **(** :ref:`RID` viewport, :ref:`ViewportMSAA` msaa **)** -Sets the multisample anti-aliasing mode for 2D/Canvas. See :ref:`ViewportMSAA` for options. +Sets the multisample anti-aliasing mode for 2D/Canvas on the specified ``viewport`` RID. See :ref:`ViewportMSAA` for options. .. rst-class:: classref-item-separator @@ -10683,7 +10666,7 @@ Sets the multisample anti-aliasing mode for 2D/Canvas. See :ref:`ViewportMSAA` viewport, :ref:`ViewportMSAA` msaa **)** -Sets the multisample anti-aliasing mode for 3D. See :ref:`ViewportMSAA` for options. +Sets the multisample anti-aliasing mode for 3D on the specified ``viewport`` RID. See :ref:`ViewportMSAA` for options. .. rst-class:: classref-item-separator @@ -10695,9 +10678,7 @@ Sets the multisample anti-aliasing mode for 3D. See :ref:`ViewportMSAA` quality **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`ProjectSettings.rendering/occlusion_culling/bvh_build_quality` to use for occlusion culling. This parameter is global and cannot be set on a per-viewport basis. .. rst-class:: classref-item-separator @@ -10709,9 +10690,7 @@ void **viewport_set_occlusion_culling_build_quality** **(** :ref:`ViewportOcclus void **viewport_set_occlusion_rays_per_thread** **(** :ref:`int` rays_per_thread **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`ProjectSettings.rendering/occlusion_culling/occlusion_rays_per_thread` to use for occlusion culling. This parameter is global and cannot be set on a per-viewport basis. .. rst-class:: classref-item-separator @@ -10723,7 +10702,7 @@ void **viewport_set_occlusion_rays_per_thread** **(** :ref:`int` rays void **viewport_set_parent_viewport** **(** :ref:`RID` viewport, :ref:`RID` parent_viewport **)** -Sets the viewport's parent to another viewport. +Sets the viewport's parent to the viewport specified by the ``parent_viewport`` RID. .. rst-class:: classref-item-separator @@ -10735,7 +10714,7 @@ Sets the viewport's parent to another viewport. void **viewport_set_positional_shadow_atlas_quadrant_subdivision** **(** :ref:`RID` viewport, :ref:`int` quadrant, :ref:`int` subdivision **)** -Sets the shadow atlas quadrant's subdivision. +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 @@ -10747,9 +10726,9 @@ Sets the shadow atlas quadrant's subdivision. void **viewport_set_positional_shadow_atlas_size** **(** :ref:`RID` viewport, :ref:`int` size, :ref:`bool` use_16_bits=false **)** -Sets the size of the shadow atlas's images (used for omni and spot lights). The value will be rounded up to the nearest power of 2. +Sets the ``size`` of the shadow atlas's images (used for omni and spot lights) on the viewport specified by the ``viewport`` RID. The value is rounded up to the nearest power of 2. If ``use_16_bits`` is ``true``, use 16 bits for the omni/spot shadow depth map. Enabling this results in shadows having less precision and may result in shadow acne, but can lead to performance improvements on some devices. -\ **Note:** If this is set to ``0``, no shadows will be visible at all (including directional shadows). +\ **Note:** If this is set to ``0``, no positional shadows will be visible at all. This can improve performance significantly on low-end systems by reducing both the CPU and GPU load (as fewer draw calls are needed to draw the scene without shadows). .. rst-class:: classref-item-separator @@ -10773,7 +10752,7 @@ If ``true``, render the contents of the viewport directly to screen. This allows void **viewport_set_scaling_3d_mode** **(** :ref:`RID` viewport, :ref:`ViewportScaling3DMode` scaling_3d_mode **)** -Sets scaling 3d mode. Bilinear scaling renders at different resolution to either undersample or supersample the viewport. FidelityFX Super Resolution 1.0, abbreviated to FSR, is an upscaling technology that produces high quality images at fast framerates by using a spatially aware upscaling algorithm. FSR is slightly more expensive than bilinear, but it produces significantly higher image quality. FSR should be used where possible. +Sets the 3D resolution scaling mode. Bilinear scaling renders at different resolution to either undersample or supersample the viewport. FidelityFX Super Resolution 1.0, abbreviated to FSR, is an upscaling technology that produces high quality images at fast framerates by using a spatially aware upscaling algorithm. FSR is slightly more expensive than bilinear, but it produces significantly higher image quality. FSR should be used where possible. .. rst-class:: classref-item-separator @@ -10799,9 +10778,7 @@ When using FSR upscaling, AMD recommends exposing the following values as preset void **viewport_set_scenario** **(** :ref:`RID` viewport, :ref:`RID` scenario **)** -Sets a viewport's scenario. - -The scenario contains information about environment information, reflection atlas etc. +Sets a viewport's scenario. The scenario contains information about environment information, reflection atlas, etc. .. rst-class:: classref-item-separator @@ -10813,9 +10790,7 @@ The scenario contains information about environment information, reflection atla void **viewport_set_screen_space_aa** **(** :ref:`RID` viewport, :ref:`ViewportScreenSpaceAA` mode **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the viewport's screen-space antialiasing mode. .. rst-class:: classref-item-separator @@ -10827,9 +10802,7 @@ void **viewport_set_screen_space_aa** **(** :ref:`RID` viewport, :ref void **viewport_set_sdf_oversize_and_scale** **(** :ref:`RID` viewport, :ref:`ViewportSDFOversize` oversize, :ref:`ViewportSDFScale` scale **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the viewport's 2D signed distance field :ref:`ProjectSettings.rendering/2d/sdf/oversize` and :ref:`ProjectSettings.rendering/2d/sdf/scale`. This is used when sampling the signed distance field in :ref:`CanvasItem` shaders as well as :ref:`GPUParticles2D` collision. This is *not* used by SDFGI in 3D rendering. .. rst-class:: classref-item-separator @@ -10841,7 +10814,7 @@ void **viewport_set_sdf_oversize_and_scale** **(** :ref:`RID` viewpor void **viewport_set_size** **(** :ref:`RID` viewport, :ref:`int` width, :ref:`int` height **)** -Sets the viewport's width and height. +Sets the viewport's width and height in pixels. .. rst-class:: classref-item-separator @@ -10853,9 +10826,7 @@ Sets the viewport's width and height. void **viewport_set_snap_2d_transforms_to_pixel** **(** :ref:`RID` viewport, :ref:`bool` enabled **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +If ``true``, canvas item transforms (i.e. origin position) are snapped to the nearest pixel when rendering. This can lead to a crisper appearance at the cost of less smooth movement, especially when :ref:`Camera2D` smoothing is enabled. Equivalent to :ref:`ProjectSettings.rendering/2d/snap/snap_2d_transforms_to_pixel`. .. rst-class:: classref-item-separator @@ -10867,9 +10838,7 @@ void **viewport_set_snap_2d_transforms_to_pixel** **(** :ref:`RID` vi void **viewport_set_snap_2d_vertices_to_pixel** **(** :ref:`RID` viewport, :ref:`bool` enabled **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +If ``true``, canvas item vertices (i.e. polygon points) are snapped to the nearest pixel when rendering. This can lead to a crisper appearance at the cost of less smooth movement, especially when :ref:`Camera2D` smoothing is enabled. Equivalent to :ref:`ProjectSettings.rendering/2d/snap/snap_2d_vertices_to_pixel`. .. rst-class:: classref-item-separator @@ -10919,9 +10888,7 @@ Sets when the viewport should be updated. See :ref:`ViewportUpdateMode` viewport, :ref:`bool` enable **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +If ``true``, enables debanding on the specified viewport. Equivalent to :ref:`ProjectSettings.rendering/anti_aliasing/quality/use_debanding`. .. rst-class:: classref-item-separator @@ -10933,9 +10900,7 @@ void **viewport_set_use_debanding** **(** :ref:`RID` viewport, :ref:` void **viewport_set_use_occlusion_culling** **(** :ref:`RID` viewport, :ref:`bool` enable **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +If ``true``, enables occlusion culling on the specified viewport. Equivalent to :ref:`ProjectSettings.rendering/occlusion_culling/use_occlusion_culling`. .. rst-class:: classref-item-separator @@ -10947,7 +10912,7 @@ void **viewport_set_use_occlusion_culling** **(** :ref:`RID` viewport void **viewport_set_use_taa** **(** :ref:`RID` viewport, :ref:`bool` enable **)** -If ``true``, use Temporal Anti-Aliasing. +If ``true``, use Temporal Anti-Aliasing. Equivalent to :ref:`ProjectSettings.rendering/anti_aliasing/quality/use_taa`. .. rst-class:: classref-item-separator @@ -10971,7 +10936,7 @@ If ``true``, the viewport uses augmented or virtual reality technologies. See :r void **viewport_set_vrs_mode** **(** :ref:`RID` viewport, :ref:`ViewportVRSMode` mode **)** -Sets the Variable Rate Shading (VRS) mode for the viewport. Note, if hardware does not support VRS this property is ignored. +Sets the Variable Rate Shading (VRS) mode for the viewport. If the GPU does not support VRS, this property is ignored. Equivalent to :ref:`ProjectSettings.rendering/vrs/mode`. .. rst-class:: classref-item-separator @@ -10983,7 +10948,7 @@ Sets the Variable Rate Shading (VRS) mode for the viewport. Note, if hardware do void **viewport_set_vrs_texture** **(** :ref:`RID` viewport, :ref:`RID` texture **)** -Texture to use when the VRS mode is set to :ref:`VIEWPORT_VRS_TEXTURE`. +The texture to use when the VRS mode is set to :ref:`VIEWPORT_VRS_TEXTURE`. Equivalent to :ref:`ProjectSettings.rendering/vrs/texture`. .. rst-class:: classref-item-separator @@ -10995,9 +10960,13 @@ Texture to use when the VRS mode is set to :ref:`VIEWPORT_VRS_TEXTURE` **visibility_notifier_create** **(** **)** -.. container:: contribute +Creates a new 3D visibility notifier object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``visibility_notifier_*`` RenderingServer functions. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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. + +\ **Note:** The equivalent node is :ref:`VisibleOnScreenNotifier3D`. .. rst-class:: classref-item-separator @@ -11051,9 +11020,11 @@ void **voxel_gi_allocate_data** **(** :ref:`RID` voxel_gi, :ref:`Tran :ref:`RID` **voxel_gi_create** **(** **)** -.. container:: contribute +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. - There is currently no description for this method. Please help us by :ref:`contributing one `! +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`. .. rst-class:: classref-item-separator @@ -11161,9 +11132,7 @@ Used to inform the renderer what exposure normalization value was used while bak void **voxel_gi_set_bias** **(** :ref:`RID` voxel_gi, :ref:`float` bias **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`VoxelGIData.bias` value to use on the specified ``voxel_gi``'s :ref:`RID`. .. rst-class:: classref-item-separator @@ -11175,9 +11144,7 @@ void **voxel_gi_set_bias** **(** :ref:`RID` voxel_gi, :ref:`float` voxel_gi, :ref:`float` range **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`VoxelGIData.dynamic_range` value to use on the specified ``voxel_gi``'s :ref:`RID`. .. rst-class:: classref-item-separator @@ -11189,9 +11156,7 @@ void **voxel_gi_set_dynamic_range** **(** :ref:`RID` voxel_gi, :ref:` void **voxel_gi_set_energy** **(** :ref:`RID` voxel_gi, :ref:`float` energy **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`VoxelGIData.energy` value to use on the specified ``voxel_gi``'s :ref:`RID`. .. rst-class:: classref-item-separator @@ -11203,9 +11168,7 @@ void **voxel_gi_set_energy** **(** :ref:`RID` voxel_gi, :ref:`float` voxel_gi, :ref:`bool` enable **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`VoxelGIData.interior` value to use on the specified ``voxel_gi``'s :ref:`RID`. .. rst-class:: classref-item-separator @@ -11217,9 +11180,7 @@ void **voxel_gi_set_interior** **(** :ref:`RID` voxel_gi, :ref:`bool< void **voxel_gi_set_normal_bias** **(** :ref:`RID` voxel_gi, :ref:`float` bias **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`VoxelGIData.normal_bias` value to use on the specified ``voxel_gi``'s :ref:`RID`. .. rst-class:: classref-item-separator @@ -11231,9 +11192,7 @@ void **voxel_gi_set_normal_bias** **(** :ref:`RID` voxel_gi, :ref:`fl void **voxel_gi_set_propagation** **(** :ref:`RID` voxel_gi, :ref:`float` amount **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`VoxelGIData.propagation` value to use on the specified ``voxel_gi``'s :ref:`RID`. .. rst-class:: classref-item-separator @@ -11245,9 +11204,7 @@ void **voxel_gi_set_propagation** **(** :ref:`RID` voxel_gi, :ref:`fl void **voxel_gi_set_quality** **(** :ref:`VoxelGIQuality` quality **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`ProjectSettings.rendering/global_illumination/voxel_gi/quality` value to use when rendering. This parameter is global and cannot be set on a per-VoxelGI basis. .. rst-class:: classref-item-separator @@ -11259,9 +11216,7 @@ void **voxel_gi_set_quality** **(** :ref:`VoxelGIQuality` voxel_gi, :ref:`bool` enable **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`VoxelGIData.use_two_bounces` value to use on the specified ``voxel_gi``'s :ref:`RID`. .. |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_resource.rst b/classes/class_resource.rst index 96d060f0d4f..f1f9c02b1dc 100644 --- a/classes/class_resource.rst +++ b/classes/class_resource.rst @@ -12,9 +12,9 @@ Resource **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`Animation`, :ref:`AnimationLibrary`, :ref:`AnimationNode`, :ref:`AnimationNodeStateMachinePlayback`, :ref:`AnimationNodeStateMachineTransition`, :ref:`AudioBusLayout`, :ref:`AudioEffect`, :ref:`AudioStream`, :ref:`BitMap`, :ref:`BoneMap`, :ref:`ButtonGroup`, :ref:`CameraAttributes`, :ref:`CryptoKey`, :ref:`Curve`, :ref:`Curve2D`, :ref:`Curve3D`, :ref:`EditorNode3DGizmoPlugin`, :ref:`EditorSettings`, :ref:`Environment`, :ref:`Font`, :ref:`GDExtension`, :ref:`GLTFAccessor`, :ref:`GLTFAnimation`, :ref:`GLTFBufferView`, :ref:`GLTFCamera`, :ref:`GLTFDocument`, :ref:`GLTFDocumentExtension`, :ref:`GLTFLight`, :ref:`GLTFMesh`, :ref:`GLTFNode`, :ref:`GLTFSkeleton`, :ref:`GLTFSkin`, :ref:`GLTFSpecGloss`, :ref:`GLTFState`, :ref:`GLTFTexture`, :ref:`GLTFTextureSampler`, :ref:`Gradient`, :ref:`Image`, :ref:`ImporterMesh`, :ref:`InputEvent`, :ref:`JSON`, :ref:`LabelSettings`, :ref:`LightmapGIData`, :ref:`Material`, :ref:`Mesh`, :ref:`MeshLibrary`, :ref:`MissingResource`, :ref:`MultiMesh`, :ref:`NavigationMesh`, :ref:`NavigationPolygon`, :ref:`Noise`, :ref:`Occluder3D`, :ref:`OccluderPolygon2D`, :ref:`OggPacketSequence`, :ref:`OpenXRAction`, :ref:`OpenXRActionMap`, :ref:`OpenXRActionSet`, :ref:`OpenXRInteractionProfile`, :ref:`OpenXRIPBinding`, :ref:`PackedDataContainer`, :ref:`PackedScene`, :ref:`PhysicsMaterial`, :ref:`PolygonPathFinder`, :ref:`RDShaderFile`, :ref:`RDShaderSPIRV`, :ref:`RichTextEffect`, :ref:`SceneReplicationConfig`, :ref:`Script`, :ref:`Shader`, :ref:`ShaderInclude`, :ref:`Shape2D`, :ref:`Shape3D`, :ref:`Shortcut`, :ref:`SkeletonModification2D`, :ref:`SkeletonModificationStack2D`, :ref:`SkeletonProfile`, :ref:`Skin`, :ref:`Sky`, :ref:`SpriteFrames`, :ref:`StyleBox`, :ref:`SyntaxHighlighter`, :ref:`Texture`, :ref:`Theme`, :ref:`TileMapPattern`, :ref:`TileSet`, :ref:`TileSetSource`, :ref:`Translation`, :ref:`VideoStream`, :ref:`VideoStreamPlayback`, :ref:`VisualShaderNode`, :ref:`VoxelGIData`, :ref:`World2D`, :ref:`World3D`, :ref:`X509Certificate` +**Inherited By:** :ref:`Animation`, :ref:`AnimationLibrary`, :ref:`AnimationNode`, :ref:`AnimationNodeStateMachinePlayback`, :ref:`AnimationNodeStateMachineTransition`, :ref:`AudioBusLayout`, :ref:`AudioEffect`, :ref:`AudioStream`, :ref:`BitMap`, :ref:`BoneMap`, :ref:`ButtonGroup`, :ref:`CameraAttributes`, :ref:`CryptoKey`, :ref:`Curve`, :ref:`Curve2D`, :ref:`Curve3D`, :ref:`EditorNode3DGizmoPlugin`, :ref:`EditorSettings`, :ref:`Environment`, :ref:`Font`, :ref:`GDExtension`, :ref:`GLTFAccessor`, :ref:`GLTFAnimation`, :ref:`GLTFBufferView`, :ref:`GLTFCamera`, :ref:`GLTFCollider`, :ref:`GLTFDocument`, :ref:`GLTFDocumentExtension`, :ref:`GLTFLight`, :ref:`GLTFMesh`, :ref:`GLTFNode`, :ref:`GLTFPhysicsBody`, :ref:`GLTFSkeleton`, :ref:`GLTFSkin`, :ref:`GLTFSpecGloss`, :ref:`GLTFState`, :ref:`GLTFTexture`, :ref:`GLTFTextureSampler`, :ref:`Gradient`, :ref:`Image`, :ref:`ImporterMesh`, :ref:`InputEvent`, :ref:`JSON`, :ref:`LabelSettings`, :ref:`LightmapGIData`, :ref:`Material`, :ref:`Mesh`, :ref:`MeshLibrary`, :ref:`MissingResource`, :ref:`MultiMesh`, :ref:`NavigationMesh`, :ref:`NavigationPolygon`, :ref:`Noise`, :ref:`Occluder3D`, :ref:`OccluderPolygon2D`, :ref:`OggPacketSequence`, :ref:`OpenXRAction`, :ref:`OpenXRActionMap`, :ref:`OpenXRActionSet`, :ref:`OpenXRInteractionProfile`, :ref:`OpenXRIPBinding`, :ref:`PackedDataContainer`, :ref:`PackedScene`, :ref:`PhysicsMaterial`, :ref:`PolygonPathFinder`, :ref:`RDShaderFile`, :ref:`RDShaderSPIRV`, :ref:`RichTextEffect`, :ref:`SceneReplicationConfig`, :ref:`Script`, :ref:`Shader`, :ref:`ShaderInclude`, :ref:`Shape2D`, :ref:`Shape3D`, :ref:`Shortcut`, :ref:`SkeletonModification2D`, :ref:`SkeletonModificationStack2D`, :ref:`SkeletonProfile`, :ref:`Skin`, :ref:`Sky`, :ref:`SpriteFrames`, :ref:`StyleBox`, :ref:`SyntaxHighlighter`, :ref:`Texture`, :ref:`Theme`, :ref:`TileMapPattern`, :ref:`TileSet`, :ref:`TileSetSource`, :ref:`Translation`, :ref:`VideoStream`, :ref:`VideoStreamPlayback`, :ref:`VisualShaderNode`, :ref:`VoxelGIData`, :ref:`World2D`, :ref:`World3D`, :ref:`X509Certificate` -Base class for all resources. +Base class for serializable objects. .. rst-class:: classref-introduction-group @@ -163,7 +163,7 @@ An optional name for this resource. When defined, its value is displayed to repr - void **set_path** **(** :ref:`String` value **)** - :ref:`String` **get_path** **(** **)** -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 an unique identifier. +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`. diff --git a/classes/class_resourceimporter.rst b/classes/class_resourceimporter.rst index 7345044b4d1..ff97a6b7b59 100644 --- a/classes/class_resourceimporter.rst +++ b/classes/class_resourceimporter.rst @@ -14,14 +14,14 @@ ResourceImporter **Inherited By:** :ref:`EditorImportPlugin` -Base class for the implementation of core resource importers. +Base class for resource importers. .. rst-class:: classref-introduction-group Description ----------- -This is the base class for the resource importers implemented in core. To implement your own resource importers using editor plugins, see :ref:`EditorImportPlugin`. +This is the base class for Godot's resource importers. To implement your own resource importers using editor plugins, see :ref:`EditorImportPlugin`. .. rst-class:: classref-introduction-group diff --git a/classes/class_resourceloader.rst b/classes/class_resourceloader.rst index 7a9973109d8..98461fa14d3 100644 --- a/classes/class_resourceloader.rst +++ b/classes/class_resourceloader.rst @@ -12,14 +12,14 @@ ResourceLoader **Inherits:** :ref:`Object` -Singleton used to load resource files. +A singleton for loading resource files. .. rst-class:: classref-introduction-group Description ----------- -Singleton used to load resource files from the filesystem. +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. @@ -252,6 +252,8 @@ Returns an empty resource if no :ref:`ResourceFormatLoader` 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``. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_resourcepreloader.rst b/classes/class_resourcepreloader.rst index 6bb60162c60..6f410f39d3a 100644 --- a/classes/class_resourcepreloader.rst +++ b/classes/class_resourcepreloader.rst @@ -12,7 +12,7 @@ ResourcePreloader **Inherits:** :ref:`Node` **<** :ref:`Object` -Preloads a list of resources inside a scene. +A node used to preload sub-resources inside a scene. .. rst-class:: classref-introduction-group diff --git a/classes/class_resourcesaver.rst b/classes/class_resourcesaver.rst index 3b8b19627db..50656783a9d 100644 --- a/classes/class_resourcesaver.rst +++ b/classes/class_resourcesaver.rst @@ -12,16 +12,16 @@ ResourceSaver **Inherits:** :ref:`Object` -Singleton for saving Godot-specific resource types. +A singleton for saving :ref:`Resource`\ s to the filesystem. .. rst-class:: classref-introduction-group Description ----------- -Singleton for saving Godot-specific resource types to the filesystem. +A singleton for saving resource types to the filesystem. -It uses the many :ref:`ResourceFormatSaver` classes registered in the engine (either built-in or from a plugin) to save engine-specific resource data to text-based (e.g. ``.tres`` or ``.tscn``) or binary files (e.g. ``.res`` or ``.scn``). +It uses the many :ref:`ResourceFormatSaver` classes registered in the engine (either built-in or from a plugin) to save resource data to text-based (e.g. ``.tres`` or ``.tscn``) or binary files (e.g. ``.res`` or ``.scn``). .. rst-class:: classref-reftable-group diff --git a/classes/class_resourceuid.rst b/classes/class_resourceuid.rst index 7eb32998ab7..017cb0889a1 100644 --- a/classes/class_resourceuid.rst +++ b/classes/class_resourceuid.rst @@ -12,18 +12,16 @@ ResourceUID **Inherits:** :ref:`Object` -Singleton for managing a cache of resource UIDs within a project. +A singleton that manages the unique identifiers of all resources within a project. .. rst-class:: classref-introduction-group Description ----------- -Resources can not only be referenced using their resource paths ``res://``, but alternatively through a unique identifier specified via ``uid://``. +Resource UIDs (Unique IDentifiers) allow the engine to keep references between resources intact, even if files can renamed or moved. They can be accessed with ``uid://``. -Using UIDs allows for the engine to keep references between resources intact, even if the files get renamed or moved. - -This singleton is responsible for keeping track of all registered resource UIDs of a project, generating new UIDs and converting between the string and integer representation. +\ **ResourceUID** keeps track of all registered resource UIDs in a project, generates new UIDs, and converts between their string and integer representations. .. rst-class:: classref-reftable-group diff --git a/classes/class_ribbontrailmesh.rst b/classes/class_ribbontrailmesh.rst index 280eea4f007..13989c05b14 100644 --- a/classes/class_ribbontrailmesh.rst +++ b/classes/class_ribbontrailmesh.rst @@ -12,9 +12,25 @@ RibbonTrailMesh **Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Represents a straight ribbon-shaped :ref:`PrimitiveMesh` with variable width. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +**RibbonTrailMesh** represents a straight ribbon-shaped mesh with variable width. The ribbon is composed of a number of flat or cross-shaped sections, each with the same :ref:`section_length` and number of :ref:`section_segments`. A :ref:`curve` is sampled along the total length of the ribbon, meaning that the curve determines the size of the ribbon along its length. + +This primitive mesh is usually used for particle trails. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`3D Particle trails <../tutorials/3d/particles/trails>` + +- :doc:`Particle systems (3D) <../tutorials/3d/particles/index>` .. rst-class:: classref-reftable-group @@ -59,7 +75,7 @@ enum **Shape**: :ref:`Shape` **SHAPE_FLAT** = ``0`` - +Gives the mesh a single flat face. .. _class_RibbonTrailMesh_constant_SHAPE_CROSS: @@ -67,7 +83,7 @@ enum **Shape**: :ref:`Shape` **SHAPE_CROSS** = ``1`` - +Gives the mesh two perpendicular flat faces, making a cross shape. .. rst-class:: classref-section-separator @@ -89,9 +105,7 @@ Property Descriptions - void **set_curve** **(** :ref:`Curve` value **)** - :ref:`Curve` **get_curve** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Determines the size of the ribbon along its length. The size of a particular section segment is obtained by multiplying the baseline :ref:`size` by the value of this curve at the given distance. For values smaller than ``0``, the faces will be inverted. .. rst-class:: classref-item-separator @@ -108,9 +122,7 @@ Property Descriptions - void **set_section_length** **(** :ref:`float` value **)** - :ref:`float` **get_section_length** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The length of a section of the ribbon. .. rst-class:: classref-item-separator @@ -127,9 +139,7 @@ Property Descriptions - void **set_section_segments** **(** :ref:`int` value **)** - :ref:`int` **get_section_segments** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The number of segments in a section. The :ref:`curve` is sampled on each segment to determine its size. Higher values result in a more detailed ribbon at the cost of performance. .. rst-class:: classref-item-separator @@ -146,9 +156,7 @@ Property Descriptions - void **set_sections** **(** :ref:`int` value **)** - :ref:`int` **get_sections** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The total number of sections on the ribbon. .. rst-class:: classref-item-separator @@ -165,9 +173,7 @@ Property Descriptions - void **set_shape** **(** :ref:`Shape` value **)** - :ref:`Shape` **get_shape** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Determines the shape of the ribbon. .. rst-class:: classref-item-separator @@ -184,9 +190,7 @@ Property Descriptions - void **set_size** **(** :ref:`float` value **)** - :ref:`float` **get_size** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The baseline size of the ribbon. The size of a particular section segment is obtained by multiplying this size by the value of the :ref:`curve` at the given distance. .. |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_richtexteffect.rst b/classes/class_richtexteffect.rst index 0f492faec7c..6a24aa8e717 100644 --- a/classes/class_richtexteffect.rst +++ b/classes/class_richtexteffect.rst @@ -12,14 +12,14 @@ RichTextEffect **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A custom effect for use with :ref:`RichTextLabel`. +A custom effect for a :ref:`RichTextLabel`. .. rst-class:: classref-introduction-group Description ----------- -A custom effect for use with :ref:`RichTextLabel`. +A custom effect for a :ref:`RichTextLabel`. \ **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 79eb8a8f9b0..3f45c60168c 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -12,22 +12,22 @@ RichTextLabel **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Label that displays rich text. +A control for displaying text that can contain different font styles, images, and basic formatting. .. rst-class:: classref-introduction-group Description ----------- -Rich text can contain custom text, fonts, images and some basic formatting. The label manages these as an internal tag stack. It also adapts itself to given width/heights. +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:** 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]``. -\ **Note:** ``push_*/pop`` functions won't affect BBCode. +\ **Note:** ``push_*/pop_*`` functions won't affect BBCode. -\ **Note:** Unlike :ref:`Label`, RichTextLabel doesn't have a *property* to horizontally align text to the center. Instead, enable :ref:`bbcode_enabled` and surround the text in a ``[center]`` tag as follows: ``[center]Example[/center]``. There is currently no built-in way to vertically align text either, but this can be emulated by relying on anchors/containers and the :ref:`fit_content` property. +\ **Note:** Unlike :ref:`Label`, **RichTextLabel** doesn't have a *property* to horizontally align text to the center. Instead, enable :ref:`bbcode_enabled` and surround the text in a ``[center]`` tag as follows: ``[center]Example[/center]``. There is currently no built-in way to vertically align text either, but this can be emulated by relying on anchors/containers and the :ref:`fit_content` property. .. rst-class:: classref-introduction-group @@ -106,133 +106,133 @@ Methods .. table:: :widths: auto - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_image` **(** :ref:`Texture2D` image, :ref:`int` width=0, :ref:`int` height=0, :ref:`Color` color=Color(1, 1, 1, 1), :ref:`InlineAlignment` inline_align=5, :ref:`Rect2` region=Rect2(0, 0, 0, 0) **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_text` **(** :ref:`String` text **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`append_text` **(** :ref:`String` bbcode **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`deselect` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_character_line` **(** :ref:`int` character **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_character_paragraph` **(** :ref:`int` character **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_content_height` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_content_width` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_line_count` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_line_offset` **(** :ref:`int` line **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PopupMenu` | :ref:`get_menu` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_paragraph_count` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_paragraph_offset` **(** :ref:`int` paragraph **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_parsed_text` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_selected_text` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_selection_from` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_selection_to` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_total_character_count` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`VScrollBar` | :ref:`get_v_scroll_bar` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_visible_line_count` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_visible_paragraph_count` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`install_effect` **(** :ref:`Variant` effect **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_menu_visible` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_ready` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`menu_option` **(** :ref:`int` option **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`newline` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`parse_bbcode` **(** :ref:`String` bbcode **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`parse_expressions_for_values` **(** :ref:`PackedStringArray` expressions **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`pop` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_bgcolor` **(** :ref:`Color` bgcolor **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_bold` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_bold_italics` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_cell` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_color` **(** :ref:`Color` color **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_customfx` **(** :ref:`RichTextEffect` effect, :ref:`Dictionary` env **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_dropcap` **(** :ref:`String` string, :ref:`Font` font, :ref:`int` size, :ref:`Rect2` dropcap_margins=Rect2(0, 0, 0, 0), :ref:`Color` color=Color(1, 1, 1, 1), :ref:`int` outline_size=0, :ref:`Color` outline_color=Color(0, 0, 0, 0) **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_fgcolor` **(** :ref:`Color` fgcolor **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_font` **(** :ref:`Font` font, :ref:`int` font_size **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_font_size` **(** :ref:`int` font_size **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_hint` **(** :ref:`String` description **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_indent` **(** :ref:`int` level **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_italics` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_list` **(** :ref:`int` level, :ref:`ListType` type, :ref:`bool` capitalize **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_meta` **(** :ref:`Variant` data **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_mono` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_normal` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_outline_color` **(** :ref:`Color` color **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_outline_size` **(** :ref:`int` outline_size **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_paragraph` **(** :ref:`HorizontalAlignment` alignment, :ref:`TextDirection` base_direction=0, :ref:`String` language="", :ref:`StructuredTextParser` st_parser=0 **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_strikethrough` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_table` **(** :ref:`int` columns, :ref:`InlineAlignment` inline_align=0, :ref:`int` align_to_row=-1 **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_underline` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`remove_paragraph` **(** :ref:`int` paragraph **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scroll_to_line` **(** :ref:`int` line **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scroll_to_paragraph` **(** :ref:`int` paragraph **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scroll_to_selection` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`select_all` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cell_border_color` **(** :ref:`Color` color **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cell_padding` **(** :ref:`Rect2` padding **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cell_row_background_color` **(** :ref:`Color` odd_row_bg, :ref:`Color` even_row_bg **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cell_size_override` **(** :ref:`Vector2` min_size, :ref:`Vector2` max_size **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_table_column_expand` **(** :ref:`int` column, :ref:`bool` expand, :ref:`int` ratio **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_image` **(** :ref:`Texture2D` image, :ref:`int` width=0, :ref:`int` height=0, :ref:`Color` color=Color(1, 1, 1, 1), :ref:`InlineAlignment` inline_align=5, :ref:`Rect2` region=Rect2(0, 0, 0, 0) **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_text` **(** :ref:`String` text **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`append_text` **(** :ref:`String` bbcode **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`deselect` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_character_line` **(** :ref:`int` character **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_character_paragraph` **(** :ref:`int` character **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_content_height` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_content_width` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_line_count` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_line_offset` **(** :ref:`int` line **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PopupMenu` | :ref:`get_menu` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_paragraph_count` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_paragraph_offset` **(** :ref:`int` paragraph **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_parsed_text` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_selected_text` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selection_from` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selection_to` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_total_character_count` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VScrollBar` | :ref:`get_v_scroll_bar` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_visible_line_count` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_visible_paragraph_count` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`install_effect` **(** :ref:`Variant` effect **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_menu_visible` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_ready` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`menu_option` **(** :ref:`int` option **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`newline` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`parse_bbcode` **(** :ref:`String` bbcode **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`parse_expressions_for_values` **(** :ref:`PackedStringArray` expressions **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`pop` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_bgcolor` **(** :ref:`Color` bgcolor **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_bold` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_bold_italics` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_cell` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_color` **(** :ref:`Color` color **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_customfx` **(** :ref:`RichTextEffect` effect, :ref:`Dictionary` env **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_dropcap` **(** :ref:`String` string, :ref:`Font` font, :ref:`int` size, :ref:`Rect2` dropcap_margins=Rect2(0, 0, 0, 0), :ref:`Color` color=Color(1, 1, 1, 1), :ref:`int` outline_size=0, :ref:`Color` outline_color=Color(0, 0, 0, 0) **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_fgcolor` **(** :ref:`Color` fgcolor **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_font` **(** :ref:`Font` font, :ref:`int` font_size **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_font_size` **(** :ref:`int` font_size **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_hint` **(** :ref:`String` description **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_indent` **(** :ref:`int` level **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_italics` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_list` **(** :ref:`int` level, :ref:`ListType` type, :ref:`bool` capitalize, :ref:`String` bullet="•" **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_meta` **(** :ref:`Variant` data **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_mono` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_normal` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_outline_color` **(** :ref:`Color` color **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_outline_size` **(** :ref:`int` outline_size **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_paragraph` **(** :ref:`HorizontalAlignment` alignment, :ref:`TextDirection` base_direction=0, :ref:`String` language="", :ref:`StructuredTextParser` st_parser=0, :ref:`JustificationFlag` justification_flags=163, :ref:`PackedFloat32Array` tab_stops=PackedFloat32Array() **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_strikethrough` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_table` **(** :ref:`int` columns, :ref:`InlineAlignment` inline_align=0, :ref:`int` align_to_row=-1 **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_underline` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`remove_paragraph` **(** :ref:`int` paragraph **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scroll_to_line` **(** :ref:`int` line **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scroll_to_paragraph` **(** :ref:`int` paragraph **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scroll_to_selection` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`select_all` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cell_border_color` **(** :ref:`Color` color **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cell_padding` **(** :ref:`Rect2` padding **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cell_row_background_color` **(** :ref:`Color` odd_row_bg, :ref:`Color` even_row_bg **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cell_size_override` **(** :ref:`Vector2` min_size, :ref:`Vector2` max_size **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_table_column_expand` **(** :ref:`int` column, :ref:`bool` expand, :ref:`int` ratio **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -1434,7 +1434,7 @@ Adds an ``[indent]`` tag to the tag stack. Multiplies ``level`` by current :ref: void **push_italics** **(** **)** -Adds a ``[font]`` tag with a italics font to the tag stack. This is the same as adding a ``[i]`` tag if not currently in a ``[b]`` tag. +Adds a ``[font]`` tag with an italics font to the tag stack. This is the same as adding an ``[i]`` tag if not currently in a ``[b]`` tag. .. rst-class:: classref-item-separator @@ -1444,7 +1444,7 @@ Adds a ``[font]`` tag with a italics font to the tag stack. This is the same as .. rst-class:: classref-method -void **push_list** **(** :ref:`int` level, :ref:`ListType` type, :ref:`bool` capitalize **)** +void **push_list** **(** :ref:`int` level, :ref:`ListType` type, :ref:`bool` capitalize, :ref:`String` bullet="•" **)** Adds ``[ol]`` or ``[ul]`` tag to the tag stack. Multiplies ``level`` by current :ref:`tab_size` to determine new margin length. @@ -1516,7 +1516,7 @@ Adds a ``[outline_size]`` tag to the tag stack. Overrides default text outline s .. rst-class:: classref-method -void **push_paragraph** **(** :ref:`HorizontalAlignment` alignment, :ref:`TextDirection` base_direction=0, :ref:`String` language="", :ref:`StructuredTextParser` st_parser=0 **)** +void **push_paragraph** **(** :ref:`HorizontalAlignment` alignment, :ref:`TextDirection` base_direction=0, :ref:`String` language="", :ref:`StructuredTextParser` st_parser=0, :ref:`JustificationFlag` justification_flags=163, :ref:`PackedFloat32Array` tab_stops=PackedFloat32Array() **)** Adds a ``[p]`` tag to the tag stack. diff --git a/classes/class_rid.rst b/classes/class_rid.rst index 337316d481f..607c40960e7 100644 --- a/classes/class_rid.rst +++ b/classes/class_rid.rst @@ -10,7 +10,7 @@ RID === -Handle for a :ref:`Resource`'s unique ID. +A handle for a :ref:`Resource`'s unique identifier. .. rst-class:: classref-introduction-group diff --git a/classes/class_rigidbody2d.rst b/classes/class_rigidbody2d.rst index ce631ad44f8..c4461121784 100644 --- a/classes/class_rigidbody2d.rst +++ b/classes/class_rigidbody2d.rst @@ -14,22 +14,22 @@ RigidBody2D **Inherited By:** :ref:`PhysicalBone2D` -Physics Body which is moved by 2D physics simulation. Useful for objects that have gravity and can be pushed by other objects. +A 2D physics body that is moved by a physics simulation. .. rst-class:: classref-introduction-group Description ----------- -This node implements simulated 2D physics. You do not control a RigidBody2D directly. Instead, you apply forces to it (gravity, impulses, etc.) and the physics simulation calculates the resulting movement based on its mass, friction, and other physical properties. +**RigidBody2D** implements full 2D physics. It cannot be controlled directly, instead, you must apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, rotation, react to collisions, and affect other physics bodies in its path. -You can switch the body's behavior using :ref:`lock_rotation`, :ref:`freeze`, and :ref:`freeze_mode`. +The body's behavior can be adjusted via :ref:`lock_rotation`, :ref:`freeze`, and :ref:`freeze_mode`. By changing various properties of the object, such as :ref:`mass`, you can control how the physics simulation acts on it. -\ **Note:** You should not change a RigidBody2D's ``position`` or ``linear_velocity`` every frame or even very often. If you need to directly affect the body's state, use :ref:`_integrate_forces`, which allows you to directly access the physics state. +A rigid body will always maintain its shape and size, even when forces are applied to it. It is useful for objects that can be interacted with in an environment, such as a tree that can be knocked over or a stack of crates that can be pushed around. -Please also keep in mind that physics bodies manage their own transform which overwrites the ones you set. So any direct or indirect transformation (including scaling of the node or its parent) will be visible in the editor only, and immediately reset at runtime. +If you need to override the default physics behavior, you can write a custom force integration function. See :ref:`custom_integrator`. -If you need to override the default physics behavior or add a transformation at runtime, you can write a custom force integration. 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. .. rst-class:: classref-introduction-group @@ -266,7 +266,7 @@ enum **CenterOfMassMode**: :ref:`CenterOfMassMode` **CENTER_OF_MASS_MODE_AUTO** = ``0`` -In this mode, the body's center of mass is calculated automatically based on its shapes. +In this mode, the body's center of mass is calculated automatically based on its shapes. This assumes that the shapes' origins are also their center of mass. .. _class_RigidBody2D_constant_CENTER_OF_MASS_MODE_CUSTOM: diff --git a/classes/class_rigidbody3d.rst b/classes/class_rigidbody3d.rst index 6d47f40d4ad..917578da3d7 100644 --- a/classes/class_rigidbody3d.rst +++ b/classes/class_rigidbody3d.rst @@ -14,22 +14,22 @@ RigidBody3D **Inherited By:** :ref:`VehicleBody3D` -Physics Body which is moved by 3D physics simulation. Useful for objects that have gravity and can be pushed by other objects. +A 3D physics body that is moved by a physics simulation. .. rst-class:: classref-introduction-group Description ----------- -This is the node that implements full 3D physics. This means that you do not control a RigidBody3D directly. Instead, you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc. +**RigidBody3D** implements full 3D physics. It cannot be controlled directly, instead, you must apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, rotation, react to collisions, and affect other physics bodies in its path. -You can switch the body's behavior using :ref:`lock_rotation`, :ref:`freeze`, and :ref:`freeze_mode`. +The body's behavior can be adjusted via :ref:`lock_rotation`, :ref:`freeze`, and :ref:`freeze_mode`. By changing various properties of the object, such as :ref:`mass`, you can control how the physics simulation acts on it. -\ **Note:** Don't change a RigidBody3D's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed Hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop may result in strange behavior. If you need to directly affect the body's state, use :ref:`_integrate_forces`, which allows you to directly access the physics state. +A rigid body will always maintain its shape and size, even when forces are applied to it. It is useful for objects that can be interacted with in an environment, such as a tree that can be knocked over or a stack of crates that can be pushed around. If you need to override the default physics behavior, you can write a custom force integration function. See :ref:`custom_integrator`. -\ **Warning:** With a non-uniform scale this node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size(s) of its collision shape(s) instead. +\ **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 @@ -270,7 +270,7 @@ enum **CenterOfMassMode**: :ref:`CenterOfMassMode` **CENTER_OF_MASS_MODE_AUTO** = ``0`` -In this mode, the body's center of mass is calculated automatically based on its shapes. +In this mode, the body's center of mass is calculated automatically based on its shapes. This assumes that the shapes' origins are also their center of mass. .. _class_RigidBody3D_constant_CENTER_OF_MASS_MODE_CUSTOM: diff --git a/classes/class_scenemultiplayer.rst b/classes/class_scenemultiplayer.rst index aee346bb05a..3f20ed79059 100644 --- a/classes/class_scenemultiplayer.rst +++ b/classes/class_scenemultiplayer.rst @@ -44,6 +44,10 @@ Properties +---------------------------------+---------------------------------------------------------------------------------------+------------------+ | :ref:`float` | :ref:`auth_timeout` | ``3.0`` | +---------------------------------+---------------------------------------------------------------------------------------+------------------+ + | :ref:`int` | :ref:`max_delta_packet_size` | ``65535`` | + +---------------------------------+---------------------------------------------------------------------------------------+------------------+ + | :ref:`int` | :ref:`max_sync_packet_size` | ``1350`` | + +---------------------------------+---------------------------------------------------------------------------------------+------------------+ | :ref:`bool` | :ref:`refuse_new_connections` | ``false`` | +---------------------------------+---------------------------------------------------------------------------------------+------------------+ | :ref:`NodePath` | :ref:`root_path` | ``NodePath("")`` | @@ -176,6 +180,40 @@ If set to a value greater than ``0.0``, the maximum amount of time peers can sta ---- +.. _class_SceneMultiplayer_property_max_delta_packet_size: + +.. rst-class:: classref-property + +:ref:`int` **max_delta_packet_size** = ``65535`` + +.. rst-class:: classref-property-setget + +- void **set_max_delta_packet_size** **(** :ref:`int` value **)** +- :ref:`int` **get_max_delta_packet_size** **(** **)** + +Maximum size of each delta packet. Higher values increase the chance of receiving full updates in a single frame, but also the chance of causing networking congestion (higher latency, disconnections). See :ref:`MultiplayerSynchronizer`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SceneMultiplayer_property_max_sync_packet_size: + +.. rst-class:: classref-property + +:ref:`int` **max_sync_packet_size** = ``1350`` + +.. rst-class:: classref-property-setget + +- void **set_max_sync_packet_size** **(** :ref:`int` value **)** +- :ref:`int` **get_max_sync_packet_size** **(** **)** + +Maximum size of each synchronization packet. Higher values increase the chance of receiving full updates in a single frame, but also the chance of packet loss. See :ref:`MultiplayerSynchronizer`. + +.. rst-class:: classref-item-separator + +---- + .. _class_SceneMultiplayer_property_refuse_new_connections: .. rst-class:: classref-property diff --git a/classes/class_scenereplicationconfig.rst b/classes/class_scenereplicationconfig.rst index 4b5e5219ffe..6e7013d7db1 100644 --- a/classes/class_scenereplicationconfig.rst +++ b/classes/class_scenereplicationconfig.rst @@ -35,10 +35,14 @@ Methods +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`property_get_sync` **(** :ref:`NodePath` path **)** | +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`property_get_watch` **(** :ref:`NodePath` path **)** | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`property_set_spawn` **(** :ref:`NodePath` path, :ref:`bool` enabled **)** | +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`property_set_sync` **(** :ref:`NodePath` path, :ref:`bool` enabled **)** | +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`property_set_watch` **(** :ref:`NodePath` path, :ref:`bool` enabled **)** | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_property` **(** :ref:`NodePath` path **)** | +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -59,6 +63,8 @@ void **add_property** **(** :ref:`NodePath` path, :ref:`int`. + .. rst-class:: classref-item-separator ---- @@ -123,6 +129,18 @@ Returns whether the property identified by the given ``path`` is configured to b ---- +.. _class_SceneReplicationConfig_method_property_get_watch: + +.. rst-class:: classref-method + +:ref:`bool` **property_get_watch** **(** :ref:`NodePath` path **)** + +Returns whether the property identified by the given ``path`` is configured to be reliably synchronized when changes are detected on process. + +.. rst-class:: classref-item-separator + +---- + .. _class_SceneReplicationConfig_method_property_set_spawn: .. rst-class:: classref-method @@ -147,6 +165,18 @@ Sets whether the property identified by the given ``path`` is configured to be s ---- +.. _class_SceneReplicationConfig_method_property_set_watch: + +.. rst-class:: classref-method + +void **property_set_watch** **(** :ref:`NodePath` path, :ref:`bool` enabled **)** + +Sets whether the property identified by the given ``path`` is configured to be reliably synchronized when changes are detected on process. + +.. rst-class:: classref-item-separator + +---- + .. _class_SceneReplicationConfig_method_remove_property: .. rst-class:: classref-method diff --git a/classes/class_scenestate.rst b/classes/class_scenestate.rst index efbccb858dc..f93881442da 100644 --- a/classes/class_scenestate.rst +++ b/classes/class_scenestate.rst @@ -12,14 +12,14 @@ SceneState **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -A script interface to a scene file's data. +Provides access to a scene file's information. .. rst-class:: classref-introduction-group Description ----------- -Maintains a list of resources, nodes, exported, and overridden properties, and built-in scripts associated with a scene. +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`. diff --git a/classes/class_scenetree.rst b/classes/class_scenetree.rst index 9e4188aa52c..d8e733fdb28 100644 --- a/classes/class_scenetree.rst +++ b/classes/class_scenetree.rst @@ -288,7 +288,7 @@ Property Descriptions - void **set_auto_accept_quit** **(** :ref:`bool` value **)** - :ref:`bool` **is_auto_accept_quit** **(** **)** -If ``true``, the application automatically accepts quitting. +If ``true``, the application automatically accepts quitting requests. For mobile platforms, see :ref:`quit_on_go_back`. @@ -438,7 +438,7 @@ If ``true``, the **SceneTree** is paused. Doing so will have the following behav - void **set_quit_on_go_back** **(** :ref:`bool` value **)** - :ref:`bool` **is_quit_on_go_back** **(** **)** -If ``true``, the application quits automatically on going back (e.g. on Android). +If ``true``, the application quits automatically when navigating back (e.g. using the system "Back" button on Android). To handle 'Go Back' button when this option is disabled, use :ref:`DisplayServer.WINDOW_EVENT_GO_BACK_REQUEST`. @@ -581,7 +581,7 @@ The timer will be automatically freed after its time elapses. :ref:`Tween` **create_tween** **(** **)** -Creates and returns a new :ref:`Tween`. +Creates and returns a new :ref:`Tween`. The Tween will start automatically on the next process frame or physics frame (depending on :ref:`TweenProcessMode`). .. rst-class:: classref-item-separator diff --git a/classes/class_scriptcreatedialog.rst b/classes/class_scriptcreatedialog.rst index 309943f5713..84f396767ee 100644 --- a/classes/class_scriptcreatedialog.rst +++ b/classes/class_scriptcreatedialog.rst @@ -12,7 +12,7 @@ ScriptCreateDialog **Inherits:** :ref:`ConfirmationDialog` **<** :ref:`AcceptDialog` **<** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` -The Editor's popup dialog for creating new :ref:`Script` files. +Godot editor's popup dialog for creating new :ref:`Script` files. .. rst-class:: classref-introduction-group diff --git a/classes/class_scripteditor.rst b/classes/class_scripteditor.rst index c529f12818c..14a36a4e8be 100644 --- a/classes/class_scripteditor.rst +++ b/classes/class_scripteditor.rst @@ -19,7 +19,9 @@ Godot editor's script editor. Description ----------- -**Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_script_editor`. +Godot editor's 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_scripteditorbase.rst b/classes/class_scripteditorbase.rst index b8afb1d4a2d..a6d32bce577 100644 --- a/classes/class_scripteditorbase.rst +++ b/classes/class_scripteditorbase.rst @@ -19,7 +19,7 @@ Base editor for editing scripts in the :ref:`ScriptEditor`. Description ----------- -Base editor for editing scripts in the :ref:`ScriptEditor`, this does not include documentation items. +Base editor for editing scripts in the :ref:`ScriptEditor`. This does not include documentation items. .. rst-class:: classref-reftable-group diff --git a/classes/class_scriptlanguageextension.rst b/classes/class_scriptlanguageextension.rst index 8cf5669e1da..b76b8301419 100644 --- a/classes/class_scriptlanguageextension.rst +++ b/classes/class_scriptlanguageextension.rst @@ -245,7 +245,7 @@ enum **CodeCompletionLocation**: :ref:`CodeCompletionLocation` **LOCATION_LOCAL** = ``0`` -The option is local to the location of the code completion query - e.g. a local variable. +The option is local to the location of the code completion query - e.g. a local variable. Subsequent value of location represent options from the outer class, the exact value represent how far they are (in terms of inner classes). .. _class_ScriptLanguageExtension_constant_LOCATION_PARENT_MASK: @@ -253,7 +253,7 @@ The option is local to the location of the code completion query - e.g. a local :ref:`CodeCompletionLocation` **LOCATION_PARENT_MASK** = ``256`` -The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. 0 for the local class, 1 for the parent, 2 for the grandparent, etc) to store the depth of an option in a the class or a parent class. +The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. 0 for the local class, 1 for the parent, 2 for the grandparent, etc) to store the depth of an option in the class or a parent class. .. _class_ScriptLanguageExtension_constant_LOCATION_OTHER_USER_CODE: diff --git a/classes/class_scrollbar.rst b/classes/class_scrollbar.rst index f457a8be0c2..67a23780953 100644 --- a/classes/class_scrollbar.rst +++ b/classes/class_scrollbar.rst @@ -14,14 +14,14 @@ ScrollBar **Inherited By:** :ref:`HScrollBar`, :ref:`VScrollBar` -Base class for scroll bars. +Abstract base class for scrollbars. .. rst-class:: classref-introduction-group Description ----------- -Scrollbars are a :ref:`Range`-based :ref:`Control`, that display a draggable area (the size of the page). Horizontal (:ref:`HScrollBar`) and Vertical (:ref:`VScrollBar`) versions are available. +Abstract base class for scrollbars, typically used to navigate through content that extends beyond the visible area of a control. Scrollbars are :ref:`Range`-based controls. .. rst-class:: classref-reftable-group diff --git a/classes/class_scrollcontainer.rst b/classes/class_scrollcontainer.rst index 7dc96189317..3d6eaf5656c 100644 --- a/classes/class_scrollcontainer.rst +++ b/classes/class_scrollcontainer.rst @@ -14,25 +14,21 @@ ScrollContainer **Inherited By:** :ref:`EditorInspector` -A helper node for displaying scrollable elements such as lists. +A container used to provide scrollbars to a child control when needed. .. rst-class:: classref-introduction-group Description ----------- -A ScrollContainer node meant to contain a :ref:`Control` child. - -ScrollContainers will automatically create a scrollbar child (:ref:`HScrollBar`, :ref:`VScrollBar`, or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the :ref:`Control.custom_minimum_size` of the Control relative to the ScrollContainer. - -Works great with a :ref:`Panel` control. You can set :ref:`Control.SIZE_EXPAND` on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension). +A container used to provide a child control with scrollbars when needed. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the :ref:`Control.custom_minimum_size` of the Control relative to the ScrollContainer. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`GUI containers <../tutorials/ui/gui_containers>` +- :doc:`Using Containers <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group @@ -42,21 +38,25 @@ Properties .. table:: :widths: auto - +----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | - +----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`follow_focus` | ``false`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`ScrollMode` | :ref:`horizontal_scroll_mode` | ``1`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`int` | :ref:`scroll_deadzone` | ``0`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`int` | :ref:`scroll_horizontal` | ``0`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`int` | :ref:`scroll_vertical` | ``0`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`ScrollMode` | :ref:`vertical_scroll_mode` | ``1`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`follow_focus` | ``false`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`ScrollMode` | :ref:`horizontal_scroll_mode` | ``1`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`int` | :ref:`scroll_deadzone` | ``0`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`int` | :ref:`scroll_horizontal` | ``0`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`float` | :ref:`scroll_horizontal_custom_step` | ``-1.0`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`int` | :ref:`scroll_vertical` | ``0`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`float` | :ref:`scroll_vertical_custom_step` | ``-1.0`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`ScrollMode` | :ref:`vertical_scroll_mode` | ``1`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -233,7 +233,31 @@ Deadzone for touch scrolling. Lower deadzone makes the scrolling more sensitive. - void **set_h_scroll** **(** :ref:`int` value **)** - :ref:`int` **get_h_scroll** **(** **)** -The current horizontal scroll value. +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. + +:: + + func _ready(): + set_deferred("scroll_horizontal", 600) + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScrollContainer_property_scroll_horizontal_custom_step: + +.. rst-class:: classref-property + +:ref:`float` **scroll_horizontal_custom_step** = ``-1.0`` + +.. rst-class:: classref-property-setget + +- void **set_horizontal_custom_step** **(** :ref:`float` value **)** +- :ref:`float` **get_horizontal_custom_step** **(** **)** + +Overrides the :ref:`ScrollBar.custom_step` used when clicking the internal scroll bar's horizontal increment and decrement buttons or when using arrow keys when the :ref:`ScrollBar` is focused. .. rst-class:: classref-item-separator @@ -252,6 +276,30 @@ The current horizontal scroll value. The current vertical scroll value. +\ **Note:** Setting it early needs to be deferred, just like in :ref:`scroll_horizontal`. + +:: + + func _ready(): + set_deferred("scroll_vertical", 600) + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScrollContainer_property_scroll_vertical_custom_step: + +.. rst-class:: classref-property + +:ref:`float` **scroll_vertical_custom_step** = ``-1.0`` + +.. rst-class:: classref-property-setget + +- void **set_vertical_custom_step** **(** :ref:`float` value **)** +- :ref:`float` **get_vertical_custom_step** **(** **)** + +Overrides the :ref:`ScrollBar.custom_step` used when clicking the internal scroll bar's vertical increment and decrement buttons or when using arrow keys when the :ref:`ScrollBar` is focused. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_segmentshape2d.rst b/classes/class_segmentshape2d.rst index 984b4fd75c1..2111fe1edb3 100644 --- a/classes/class_segmentshape2d.rst +++ b/classes/class_segmentshape2d.rst @@ -12,16 +12,14 @@ SegmentShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Segment shape resource for 2D physics. +A 2D line segment shape used for physics collision. .. rst-class:: classref-introduction-group Description ----------- -2D segment shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. Consists of two points, ``a`` and ``b``. - -\ **Performance:** Being a primitive collision shape, **SegmentShape2D** is fast to check collisions against (though not as fast as :ref:`CircleShape2D`). +A 2D line segment shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape2D`. .. rst-class:: classref-reftable-group diff --git a/classes/class_semaphore.rst b/classes/class_semaphore.rst index fec8c052c98..a91daee5d96 100644 --- a/classes/class_semaphore.rst +++ b/classes/class_semaphore.rst @@ -12,14 +12,22 @@ Semaphore **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -A synchronization semaphore. +A synchronization mechanism used to control access to a shared resource by :ref:`Thread`\ s. .. rst-class:: classref-introduction-group Description ----------- -A synchronization semaphore which can be used to synchronize multiple :ref:`Thread`\ s. Initialized to zero on creation. Be careful to avoid deadlocks. For a binary version, see :ref:`Mutex`. +A synchronization semaphore that can be used to synchronize multiple :ref:`Thread`\ s. Initialized to zero on creation. For a binary version, see :ref:`Mutex`. + +\ **Warning:** Semaphores must be used carefully to avoid deadlocks. + +\ **Warning:** To guarantee that the operating system is able to perform proper cleanup (no crashes, no deadlocks), these conditions must be met: + +- When a **Semaphore**'s reference count reaches zero and it is therefore destroyed, no threads must be waiting on it. + +- When a :ref:`Thread`'s reference count reaches zero and it is therefore destroyed, it must not be waiting on any semaphore. .. rst-class:: classref-introduction-group @@ -28,6 +36,8 @@ Tutorials - :doc:`Using multiple threads <../tutorials/performance/using_multiple_threads>` +- :doc:`Thread-safe APIs <../tutorials/performance/thread_safe_apis>` + .. rst-class:: classref-reftable-group Methods diff --git a/classes/class_separationrayshape2d.rst b/classes/class_separationrayshape2d.rst index 1874487eef9..a066de816a1 100644 --- a/classes/class_separationrayshape2d.rst +++ b/classes/class_separationrayshape2d.rst @@ -12,16 +12,14 @@ SeparationRayShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Separation ray shape resource for 2D physics. +A 2D ray shape used for physics collision that tries to separate itself from any collider. .. rst-class:: classref-introduction-group Description ----------- -2D separation ray shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. - -\ **Performance:** Being a primitive collision shape, **SeparationRayShape2D** is fast to check collisions against. +A 2D ray shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape2D`. When a **SeparationRayShape2D** collides with an object, it tries to separate itself from it by moving its endpoint to the collision point. It can for example be used for spears falling from the sky. .. rst-class:: classref-reftable-group diff --git a/classes/class_separationrayshape3d.rst b/classes/class_separationrayshape3d.rst index b31ecff06d5..5071c20dc8c 100644 --- a/classes/class_separationrayshape3d.rst +++ b/classes/class_separationrayshape3d.rst @@ -12,16 +12,14 @@ SeparationRayShape3D **Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Separation ray shape resource for 3D physics. +A 3D ray shape used for physics collision that tries to separate itself from any collider. .. rst-class:: classref-introduction-group Description ----------- -3D separation ray shape to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. - -\ **Performance:** Being a primitive collision shape, **SeparationRayShape3D** is fast to check collisions against. +A 3D ray shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape2D`. When a **SeparationRayShape3D** collides with an object, it tries to separate itself from it by moving its endpoint to the collision point. It can for example be used for spears falling from the sky. .. rst-class:: classref-reftable-group diff --git a/classes/class_separator.rst b/classes/class_separator.rst index 4031a84cd64..19265910c03 100644 --- a/classes/class_separator.rst +++ b/classes/class_separator.rst @@ -14,14 +14,14 @@ Separator **Inherited By:** :ref:`HSeparator`, :ref:`VSeparator` -Base class for separators. +Abstract base class for separators. .. rst-class:: classref-introduction-group Description ----------- -Separator is a :ref:`Control` used for separating other controls. It's purely a visual decoration. Horizontal (:ref:`HSeparator`) and Vertical (:ref:`VSeparator`) versions are available. +Abstract base class for separators, used for separating other controls. **Separator**\ s are purely visual and normally drawn as a :ref:`StyleBoxLine`. .. |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_shaderglobalsoverride.rst b/classes/class_shaderglobalsoverride.rst index 7ee4e92ee7a..7f21037a085 100644 --- a/classes/class_shaderglobalsoverride.rst +++ b/classes/class_shaderglobalsoverride.rst @@ -12,9 +12,18 @@ ShaderGlobalsOverride **Inherits:** :ref:`Node` **<** :ref:`Object` -.. container:: contribute +Overrides global shader parameters' values in a specific scene. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +Similar to how a :ref:`WorldEnvironment` node can be used to override the environment while a specific scene is loaded, **ShaderGlobalsOverride** can be used to override global shader parameters temporarily. Once the node is removed, the project-wide values for the global shader parameters are restored. See the :ref:`RenderingServer` ``global_shader_parameter_*`` methods for more information. + +\ **Note:** Only one **ShaderGlobalsOverride** can be used per scene. If there is more than one **ShaderGlobalsOverride** node in the scene tree, only the first node (in tree order) will be taken into account. + +\ **Note:** All **ShaderGlobalsOverride** nodes are made part of a ``"shader_overrides_group"`` group when they are added to the scene tree. The currently active **ShaderGlobalsOverride** node also has a ``"shader_overrides_group_active"`` group added to it. You can use this to check which **ShaderGlobalsOverride** node is currently 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_shape2d.rst b/classes/class_shape2d.rst index 44d87f9bdc8..ab2b622ba8a 100644 --- a/classes/class_shape2d.rst +++ b/classes/class_shape2d.rst @@ -14,14 +14,16 @@ Shape2D **Inherited By:** :ref:`CapsuleShape2D`, :ref:`CircleShape2D`, :ref:`ConcavePolygonShape2D`, :ref:`ConvexPolygonShape2D`, :ref:`RectangleShape2D`, :ref:`SegmentShape2D`, :ref:`SeparationRayShape2D`, :ref:`WorldBoundaryShape2D` -Base class for all 2D shapes. +Abstract base class for 2D shapes used for physics collision. .. rst-class:: classref-introduction-group Description ----------- -Base class for all 2D shapes. All 2D shape types inherit from this. +Abstract base class for all 2D shapes, intended for use in physics. + +\ **Performance:** Primitive shapes, especially :ref:`CircleShape2D`, are fast to check collisions against. :ref:`ConvexPolygonShape2D` is slower, and :ref:`ConcavePolygonShape2D` is the slowest. .. rst-class:: classref-introduction-group diff --git a/classes/class_shape3d.rst b/classes/class_shape3d.rst index 8d17e3895dd..a952f717f1f 100644 --- a/classes/class_shape3d.rst +++ b/classes/class_shape3d.rst @@ -14,14 +14,16 @@ Shape3D **Inherited By:** :ref:`BoxShape3D`, :ref:`CapsuleShape3D`, :ref:`ConcavePolygonShape3D`, :ref:`ConvexPolygonShape3D`, :ref:`CylinderShape3D`, :ref:`HeightMapShape3D`, :ref:`SeparationRayShape3D`, :ref:`SphereShape3D`, :ref:`WorldBoundaryShape3D` -Base class for all 3D shape resources. +Abstract base class for 3D shapes used for physics collision. .. rst-class:: classref-introduction-group Description ----------- -Base class for all 3D shape resources. Nodes that inherit from this can be used as shapes for a :ref:`PhysicsBody3D` or :ref:`Area3D` objects. +Abstract base class for all 3D shapes, intended for use in physics. + +\ **Performance:** Primitive shapes, especially :ref:`SphereShape3D`, are fast to check collisions against. :ref:`ConvexPolygonShape3D` and :ref:`HeightMapShape3D` are slower, and :ref:`ConcavePolygonShape3D` is the slowest. .. rst-class:: classref-introduction-group @@ -95,7 +97,7 @@ When set to ``0``, the default value from :ref:`ProjectSettings.physics/3d/solve - void **set_margin** **(** :ref:`float` value **)** - :ref:`float` **get_margin** **(** **)** -The collision margin for the shape. Used in Bullet Physics only. +The collision margin for the shape. This is not used in Godot Physics. Collision margins allow collision detection to be more efficient by adding an extra shell around shapes. Collision algorithms are more expensive when objects overlap by more than their margin, so a higher value for margins is better for performance, at the cost of accuracy around edges as it makes them less sharp. diff --git a/classes/class_shapecast2d.rst b/classes/class_shapecast2d.rst index d8d92203d01..1c7dcc7cb16 100644 --- a/classes/class_shapecast2d.rst +++ b/classes/class_shapecast2d.rst @@ -12,20 +12,18 @@ ShapeCast2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Node for physics collision sweep and immediate overlap queries. Similar to the :ref:`RayCast2D` node. +A 2D shape that sweeps a region of space to detect :ref:`CollisionObject2D`\ s. .. rst-class:: classref-introduction-group Description ----------- -Shape casting allows to detect collision objects by sweeping the :ref:`shape` along the cast direction determined by :ref:`target_position` (useful for things like beam weapons). +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 also helps to overcome some limitations of :ref:`Area2D` when used as a continuous detection area, often requiring waiting a couple of frames before collision information is available to :ref:`Area2D` nodes, and when using the signals creates unnecessary complexity. +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. -The node can detect multiple collision objects, but it's usually used to detect the first collision. - -\ **Note:** shape casting is more computationally expensive compared to ray casting. +\ **Note:** Shape casting is more computationally expensive than ray casting. .. rst-class:: classref-reftable-group diff --git a/classes/class_shapecast3d.rst b/classes/class_shapecast3d.rst index 18fad24083d..147b53d86ac 100644 --- a/classes/class_shapecast3d.rst +++ b/classes/class_shapecast3d.rst @@ -12,20 +12,18 @@ ShapeCast3D **Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -Node for physics collision sweep and immediate overlap queries. Similar to the :ref:`RayCast3D` node. +A 3D shape that sweeps a region of space to detect :ref:`CollisionObject3D`\ s. .. rst-class:: classref-introduction-group Description ----------- -Shape casting allows to detect collision objects by sweeping the :ref:`shape` along the cast direction determined by :ref:`target_position` (useful for things like beam weapons). +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 also helps to overcome some limitations of :ref:`Area3D` when used as a continuous detection area, often requiring waiting a couple of frames before collision information is available to :ref:`Area3D` nodes, and when using the signals creates unnecessary complexity. +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. -The node can detect multiple collision objects, but it's usually used to detect the first collision. - -\ **Note:** Shape casting is more computationally expensive compared to ray casting. +\ **Note:** Shape casting is more computationally expensive than ray casting. .. rst-class:: classref-reftable-group diff --git a/classes/class_signal.rst b/classes/class_signal.rst index 6553948b39e..b31edc6f54c 100644 --- a/classes/class_signal.rst +++ b/classes/class_signal.rst @@ -10,7 +10,7 @@ Signal ====== -Built-in type representing a signal defined in an object. +A built-in type representing a signal of an :ref:`Object`. .. rst-class:: classref-introduction-group diff --git a/classes/class_skeleton2d.rst b/classes/class_skeleton2d.rst index 35490a1a99b..a973286aaa9 100644 --- a/classes/class_skeleton2d.rst +++ b/classes/class_skeleton2d.rst @@ -12,16 +12,16 @@ Skeleton2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Skeleton for 2D characters and animated objects. +The parent of a hierarchy of :ref:`Bone2D`\ s, used to create a 2D skeletal animation. .. rst-class:: classref-introduction-group Description ----------- -Skeleton2D parents a hierarchy of :ref:`Bone2D` objects. It is a requirement of :ref:`Bone2D`. Skeleton2D holds a reference to the rest pose of its children and acts as a single point of access to its bones. +**Skeleton2D** parents a hierarchy of :ref:`Bone2D` nodes. It holds a reference to each :ref:`Bone2D`'s rest pose and acts as a single point of access to its bones. -To setup different types of inverse kinematics for the given Skeleton2D, a :ref:`SkeletonModificationStack2D` should be created. They can be applied by creating the desired number of modifications, which can be done by increasing :ref:`SkeletonModificationStack2D.modification_count`. +To set up different types of inverse kinematics for the given Skeleton2D, a :ref:`SkeletonModificationStack2D` should be created. The inverse kinematics be applied by increasing :ref:`SkeletonModificationStack2D.modification_count` and creating the desired number of modifications. .. rst-class:: classref-introduction-group diff --git a/classes/class_skeleton3d.rst b/classes/class_skeleton3d.rst index 8a8c3db4587..27ff7f69e47 100644 --- a/classes/class_skeleton3d.rst +++ b/classes/class_skeleton3d.rst @@ -12,18 +12,18 @@ Skeleton3D **Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -Skeleton for characters and animated objects. +A node containing a bone hierarchy, used to create a 3D skeletal animation. .. rst-class:: classref-introduction-group Description ----------- -Skeleton3D provides a hierarchical interface for managing bones, including pose, rest and animation (see :ref:`Animation`). It can also use ragdoll physics. +**Skeleton3D** provides an interface for managing a hierarchy of bones, including pose, rest and animation (see :ref:`Animation`). It can also use ragdoll physics. -The overall transform of a bone with respect to the skeleton is determined by the following hierarchical order: rest pose, custom pose and pose. +The overall transform of a bone with respect to the skeleton is determined by bone pose. Bone rest defines the initial transform of the bone pose. -Note that "global pose" below refers to the overall transform of the bone with respect to skeleton, so it not the actual global/world transform of the bone. +Note that "global pose" below refers to the overall transform of the bone with respect to skeleton, so it is not the actual global/world transform of the bone. To setup different types of inverse kinematics, consider using :ref:`SkeletonIK3D`, or add a custom IK implementation in :ref:`Node._process` as a child node. @@ -257,7 +257,7 @@ Property Descriptions - void **set_motion_scale** **(** :ref:`float` value **)** - :ref:`float` **get_motion_scale** **(** **)** -Multiplies the position 3D track animation. +Multiplies the 3D position track animation. \ **Note:** Unless this value is ``1.0``, the key value in animation will not match the actual position value. @@ -359,6 +359,8 @@ void **force_update_all_bone_transforms** **(** **)** Force updates the bone transforms/poses for all bones in the skeleton. +\ *Deprecated.* Do not use. + .. rst-class:: classref-item-separator ---- @@ -479,7 +481,7 @@ Returns the bone index which is the parent of the bone at ``bone_idx``. If -1, t :ref:`Transform3D` **get_bone_pose** **(** :ref:`int` bone_idx **)** |const| -Returns the pose transform of the specified bone. Pose is applied on top of the custom pose, which is applied on top the rest pose. +Returns the pose transform of the specified bone. .. rst-class:: classref-item-separator diff --git a/classes/class_skeletonik3d.rst b/classes/class_skeletonik3d.rst index d732e0064fc..7d2b460ab73 100644 --- a/classes/class_skeletonik3d.rst +++ b/classes/class_skeletonik3d.rst @@ -12,14 +12,14 @@ SkeletonIK3D **Inherits:** :ref:`Node` **<** :ref:`Object` -SkeletonIK3D is used to place the end bone of a :ref:`Skeleton3D` bone chain at a certain point in 3D by rotating all bones in the chain accordingly. +A node used to rotate all bones of a :ref:`Skeleton3D` bone chain a way that places the end bone at a desired 3D position. .. rst-class:: classref-introduction-group Description ----------- -SkeletonIK3D is used to place the end bone of a :ref:`Skeleton3D` bone chain at a certain point in 3D by rotating all bones in the chain accordingly. A typical scenario for IK in games is to place a characters feet on the ground or a characters hands on a currently hold object. SkeletonIK uses FabrikInverseKinematic internally to solve the bone chain and applies the results to the :ref:`Skeleton3D` ``bones_global_pose_override`` property for all affected bones in the chain. If fully applied this overwrites any bone transform from :ref:`Animation`\ s or bone custom poses set by users. The applied amount can be controlled with the ``interpolation`` property. +SkeletonIK3D is used to rotate all bones of a :ref:`Skeleton3D` bone chain a way that places the end bone at a desired 3D position. A typical scenario for IK in games is to place a character's feet on the ground or a character's hands on a currently held object. SkeletonIK uses FabrikInverseKinematic internally to solve the bone chain and applies the results to the :ref:`Skeleton3D` ``bones_global_pose_override`` property for all affected bones in the chain. If fully applied, this overwrites any bone transform from :ref:`Animation`\ s or bone custom poses set by users. The applied amount can be controlled with the :ref:`interpolation` property. :: @@ -41,6 +41,8 @@ SkeletonIK3D is used to place the end bone of a :ref:`Skeleton3D`, :ref:`SkeletonModification2DFABRIK`, :ref:`SkeletonModification2DJiggle`, :ref:`SkeletonModification2DLookAt`, :ref:`SkeletonModification2DPhysicalBones`, :ref:`SkeletonModification2DStackHolder`, :ref:`SkeletonModification2DTwoBoneIK` -A resource that operates on :ref:`Bone2D` nodes in a :ref:`Skeleton2D`. +Base class for resources that operate on :ref:`Bone2D`\ s in a :ref:`Skeleton2D`. .. rst-class:: classref-introduction-group @@ -159,7 +159,7 @@ Called when the modification is setup. This is where the modification performs i :ref:`float` **clamp_angle** **(** :ref:`float` angle, :ref:`float` min, :ref:`float` max, :ref:`bool` invert **)** -Takes a angle and clamps it so it is within the passed-in ``min`` and ``max`` range. ``invert`` will inversely clamp the angle, clamping it to the range outside of the given bounds. +Takes an angle and clamps it so it is within the passed-in ``min`` and ``max`` range. ``invert`` will inversely clamp the angle, clamping it to the range outside of the given bounds. .. rst-class:: classref-item-separator diff --git a/classes/class_skeletonmodification2dfabrik.rst b/classes/class_skeletonmodification2dfabrik.rst index 70bb66fa52b..fc253a2e2e0 100644 --- a/classes/class_skeletonmodification2dfabrik.rst +++ b/classes/class_skeletonmodification2dfabrik.rst @@ -21,7 +21,7 @@ Description This :ref:`SkeletonModification2D` uses an algorithm called Forward And Backward Reaching Inverse Kinematics, or FABRIK, to rotate a bone chain so that it reaches a target. -FABRIK works by knowing the positions and lengths of a series of bones, typically called a "bone chain". It first starts by running a forward pass, which places the final bone at the target's position. Then all other bones are moved towards the tip bone, so they stay at the defined bone length away. Then a backwards pass is performed, where the root/first bone in the FABRIK chain is placed back at the origin. then all other bones are moved so they stay at the defined bone length away. This positions the bone chain so that it reaches the target when possible, but all of the bones stay the correct length away from each other. +FABRIK works by knowing the positions and lengths of a series of bones, typically called a "bone chain". It first starts by running a forward pass, which places the final bone at the target's position. Then all other bones are moved towards the tip bone, so they stay at the defined bone length away. Then a backwards pass is performed, where the root/first bone in the FABRIK chain is placed back at the origin. Then all other bones are moved so they stay at the defined bone length away. This positions the bone chain so that it reaches the target when possible, but all of the bones stay the correct length away from each other. Because of how FABRIK works, it often gives more natural results than those seen in :ref:`SkeletonModification2DCCDIK`. FABRIK also supports angle constraints, which are fully taken into account when solving. diff --git a/classes/class_skeletonmodification2dlookat.rst b/classes/class_skeletonmodification2dlookat.rst index 3f1fb091900..7bc27093555 100644 --- a/classes/class_skeletonmodification2dlookat.rst +++ b/classes/class_skeletonmodification2dlookat.rst @@ -104,7 +104,7 @@ The :ref:`Bone2D` node that the modification will operate on. - void **set_bone_index** **(** :ref:`int` value **)** - :ref:`int` **get_bone_index** **(** **)** -The index of the :ref:`Bone2D` node that the modification will oeprate on. +The index of the :ref:`Bone2D` node that the modification will operate on. .. rst-class:: classref-item-separator diff --git a/classes/class_skeletonmodification2dphysicalbones.rst b/classes/class_skeletonmodification2dphysicalbones.rst index 9ee32725320..56c2e2138c1 100644 --- a/classes/class_skeletonmodification2dphysicalbones.rst +++ b/classes/class_skeletonmodification2dphysicalbones.rst @@ -92,7 +92,7 @@ Method Descriptions void **fetch_physical_bones** **(** **)** -Empties the list of :ref:`PhysicalBone2D` nodes and populates it will all :ref:`PhysicalBone2D` nodes that are children of the :ref:`Skeleton2D`. +Empties the list of :ref:`PhysicalBone2D` nodes and populates it with all :ref:`PhysicalBone2D` nodes that are children of the :ref:`Skeleton2D`. .. rst-class:: classref-item-separator diff --git a/classes/class_skeletonmodification2dtwoboneik.rst b/classes/class_skeletonmodification2dtwoboneik.rst index 79c9e4d0beb..c3a0e0134b5 100644 --- a/classes/class_skeletonmodification2dtwoboneik.rst +++ b/classes/class_skeletonmodification2dtwoboneik.rst @@ -12,14 +12,14 @@ SkeletonModification2DTwoBoneIK **Inherits:** :ref:`SkeletonModification2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A modification that rotates two bones using the law of cosigns to reach the target. +A modification that rotates two bones using the law of cosines to reach the target. .. rst-class:: classref-introduction-group Description ----------- -This :ref:`SkeletonModification2D` uses an algorithm typically called TwoBoneIK. This algorithm works by leveraging the law of cosigns and the lengths of the bones to figure out what rotation the bones currently have, and what rotation they need to make a complete triangle, where the first bone, the second bone, and the target form the three vertices of the triangle. Because the algorithm works by making a triangle, it can only operate on two bones. +This :ref:`SkeletonModification2D` uses an algorithm typically called TwoBoneIK. This algorithm works by leveraging the law of cosines and the lengths of the bones to figure out what rotation the bones currently have, and what rotation they need to make a complete triangle, where the first bone, the second bone, and the target form the three vertices of the triangle. Because the algorithm works by making a triangle, it can only operate on two bones. TwoBoneIK is great for arms, legs, and really any joints that can be represented by just two bones that bend to reach a target. This solver is more lightweight than :ref:`SkeletonModification2DFABRIK`, but gives similar, natural looking results. diff --git a/classes/class_skeletonprofile.rst b/classes/class_skeletonprofile.rst index 98d7b2660a6..98629effd86 100644 --- a/classes/class_skeletonprofile.rst +++ b/classes/class_skeletonprofile.rst @@ -14,7 +14,7 @@ SkeletonProfile **Inherited By:** :ref:`SkeletonProfileHumanoid` -Profile of a virtual skeleton used as a target for retargeting. +Base class for a profile of a virtual skeleton used as a target for retargeting. .. rst-class:: classref-introduction-group diff --git a/classes/class_sky.rst b/classes/class_sky.rst index 53a60f60fda..84bf66aa920 100644 --- a/classes/class_sky.rst +++ b/classes/class_sky.rst @@ -158,7 +158,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 256x256 cubemaps, so :ref:`radiance_size` must be set to :ref:`RADIANCE_SIZE_256`. +\ **Note:** The fast filtering algorithm is limited to 256×256 cubemaps, so :ref:`radiance_size` must be set to :ref:`RADIANCE_SIZE_256`. Otherwise, a warning is printed and the overridden radiance size is ignored. .. rst-class:: classref-section-separator diff --git a/classes/class_slider.rst b/classes/class_slider.rst index 1c6e3aa5d64..789da27bf5f 100644 --- a/classes/class_slider.rst +++ b/classes/class_slider.rst @@ -14,16 +14,14 @@ Slider **Inherited By:** :ref:`HSlider`, :ref:`VSlider` -Base class for GUI sliders. +Abstract base class for sliders. .. rst-class:: classref-introduction-group Description ----------- -Base class for GUI sliders. - -\ **Note:** The :ref:`Range.changed` and :ref:`Range.value_changed` signals are part of the :ref:`Range` class which this class inherits from. +Abstract base class for sliders, used to adjust a value by moving a grabber along a horizontal or vertical axis. Sliders are :ref:`Range`-based controls. .. rst-class:: classref-reftable-group diff --git a/classes/class_sliderjoint3d.rst b/classes/class_sliderjoint3d.rst index 17273b4b4f2..db4b179811c 100644 --- a/classes/class_sliderjoint3d.rst +++ b/classes/class_sliderjoint3d.rst @@ -12,14 +12,14 @@ SliderJoint3D **Inherits:** :ref:`Joint3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -Slider between two PhysicsBodies in 3D. +A physics joint that restricts the movement of a 3D physics body along an axis relative to another physics body. .. rst-class:: classref-introduction-group Description ----------- -Slides across the X axis of the pivot object. See also :ref:`Generic6DOFJoint3D`. +A physics joint that restricts the movement of a 3D physics body along an axis relative to another physics body. For example, Body A could be a :ref:`StaticBody3D` representing a piston base, while Body B could be a :ref:`RigidBody3D` representing the piston head, moving up and down. .. rst-class:: classref-reftable-group diff --git a/classes/class_softbody3d.rst b/classes/class_softbody3d.rst index dd2a95e179f..59f3d990542 100644 --- a/classes/class_softbody3d.rst +++ b/classes/class_softbody3d.rst @@ -12,16 +12,16 @@ SoftBody3D **Inherits:** :ref:`MeshInstance3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -A soft mesh physics body. +A deformable 3D physics mesh. .. rst-class:: classref-introduction-group Description ----------- -A deformable physics body. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials. +A deformable 3D physics mesh. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials. -\ **Note:** There are many known bugs in **SoftBody3D**. Therefore, it's not recommended to use them for things that can affect gameplay (such as a player character made entirely out of soft bodies). +\ **Note:** There are many known bugs in **SoftBody3D**. Therefore, it's not recommended to use them for things that can affect gameplay (such as trampolines). .. rst-class:: classref-introduction-group diff --git a/classes/class_sphereshape3d.rst b/classes/class_sphereshape3d.rst index 4ea53c86d7b..ecd9f9b89e3 100644 --- a/classes/class_sphereshape3d.rst +++ b/classes/class_sphereshape3d.rst @@ -12,16 +12,16 @@ SphereShape3D **Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Sphere shape resource for 3D collisions. +A 3D sphere shape used for physics collision. .. rst-class:: classref-introduction-group Description ----------- -3D sphere shape to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. This shape is useful for modeling sphere-like 3D objects. +A 3D sphere shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape3D`. -\ **Performance:** Being a primitive collision shape, **SphereShape3D** is the fastest collision shape to check collisions against, as it only requires a distance check with the shape's origin. +\ **Performance:** **SphereShape3D** is fast to check collisions against. It is faster than :ref:`BoxShape3D`, :ref:`CapsuleShape3D`, and :ref:`CylinderShape3D`. .. rst-class:: classref-introduction-group diff --git a/classes/class_spinbox.rst b/classes/class_spinbox.rst index ef3458bbb87..0b062341451 100644 --- a/classes/class_spinbox.rst +++ b/classes/class_spinbox.rst @@ -12,14 +12,14 @@ SpinBox **Inherits:** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Numerical input text field. +An input field for numbers. .. rst-class:: classref-introduction-group Description ----------- -SpinBox is a numerical input text field. It allows entering integers and floats. +**SpinBox** is a numerical input text field. It allows entering integers and floating point numbers. \ **Example:**\ diff --git a/classes/class_splitcontainer.rst b/classes/class_splitcontainer.rst index a669ac7076c..8d445357483 100644 --- a/classes/class_splitcontainer.rst +++ b/classes/class_splitcontainer.rst @@ -14,21 +14,21 @@ SplitContainer **Inherited By:** :ref:`HSplitContainer`, :ref:`VSplitContainer` -Container for splitting and adjusting. +A container that splits two child controls horizontally or vertically and provides a grabber for adjusting the split ratio. .. rst-class:: classref-introduction-group Description ----------- -Container for splitting two :ref:`Control`\ s vertically or horizontally, with a grabber that allows adjusting the split offset or ratio. +A container that accepts only two child controls, then arranges them horizontally or vertically and creates a divisor between them. The divisor can be dragged around to change the size relation between the child controls. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`GUI containers <../tutorials/ui/gui_containers>` +- :doc:`Using Containers <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group diff --git a/classes/class_springarm3d.rst b/classes/class_springarm3d.rst index 8eadd2d0650..98337e2dd4d 100644 --- a/classes/class_springarm3d.rst +++ b/classes/class_springarm3d.rst @@ -12,20 +12,14 @@ SpringArm3D **Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -A helper node, mostly used in 3rd person cameras. +A 3D raycast that dynamically moves its children near the collision point. .. rst-class:: classref-introduction-group Description ----------- -The SpringArm3D node is a node that casts a ray (or collision shape) along its z axis and moves all its direct children to the collision point, minus a margin. - -The most common use case for this is to make a 3rd person camera that reacts to collisions in the environment. - -The SpringArm3D will either cast a ray, or if a shape is given, it will cast the shape in the direction of its z axis. - -If you use the SpringArm3D as a camera controller for your player, you might need to exclude the player's collider from the SpringArm3D's collision check. +**SpringArm3D** casts a ray or a shape along its Z axis and moves all its direct children to the collision point, with an optional margin. This is useful for 3rd person cameras that move closer to the player when inside a tight space (you may need to exclude the player's collider from the **SpringArm3D**'s collision check. .. rst-class:: classref-reftable-group diff --git a/classes/class_staticbody2d.rst b/classes/class_staticbody2d.rst index b095b6b0631..e1a7a9339e6 100644 --- a/classes/class_staticbody2d.rst +++ b/classes/class_staticbody2d.rst @@ -14,22 +14,18 @@ StaticBody2D **Inherited By:** :ref:`AnimatableBody2D` -Physics body for 2D physics which is static or moves only by script. Useful for floor and walls. +A 2D physics body that can't be moved by external forces. When moved manually, it doesn't affect other bodies in its path. .. rst-class:: classref-introduction-group Description ----------- -Static body for 2D physics. +A static 2D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationPlayer`\ s (with :ref:`AnimationPlayer.playback_process_mode` set to ``ANIMATION_PROCESS_PHYSICS``), and :ref:`RemoteTransform2D`. -A static body is a simple body that doesn't move under physics simulation, i.e. it can't be moved by external forces or contacts but its transformation can still be updated manually by the user. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to :ref:`RigidBody2D`, it doesn't consume any CPU resources as long as they don't move. +When **StaticBody2D** is moved, it is teleported to its new position without affecting other physics bodies in its path. If this is not desired, use :ref:`AnimatableBody2D` instead. -They have extra functionalities to move and affect other bodies: - -\ **Static transform change:** Static bodies can be moved by animation or script. In this case, they are just teleported and don't affect other bodies on their path. - -\ **Constant velocity:** When :ref:`constant_linear_velocity` or :ref:`constant_angular_velocity` is set, static bodies don't move themselves but affect touching bodies as if they were moving. This is useful for simulating conveyor belts or conveyor wheels. +\ **StaticBody2D** is useful for completely static objects like floors and walls, as well as moving surfaces like conveyor belts and circular revolving platforms (by using :ref:`constant_linear_velocity` and :ref:`constant_angular_velocity`). .. rst-class:: classref-reftable-group diff --git a/classes/class_staticbody3d.rst b/classes/class_staticbody3d.rst index 2671396dd45..3e6ddc1734e 100644 --- a/classes/class_staticbody3d.rst +++ b/classes/class_staticbody3d.rst @@ -14,24 +14,18 @@ StaticBody3D **Inherited By:** :ref:`AnimatableBody3D` -Physics body for 3D physics which is static or moves only by script. Useful for floor and walls. +A 3D physics body that can't be moved by external forces. When moved manually, it doesn't affect other bodies in its path. .. rst-class:: classref-introduction-group Description ----------- -Static body for 3D physics. +A static 3D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationPlayer`\ s (with :ref:`AnimationPlayer.playback_process_mode` set to ``ANIMATION_PROCESS_PHYSICS``), and :ref:`RemoteTransform3D`. -A static body is a simple body that doesn't move under physics simulation, i.e. it can't be moved by external forces or contacts but its transformation can still be updated manually by the user. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to :ref:`RigidBody3D`, it doesn't consume any CPU resources as long as they don't move. +When **StaticBody3D** is moved, it is teleported to its new position without affecting other physics bodies in its path. If this is not desired, use :ref:`AnimatableBody3D` instead. -They have extra functionalities to move and affect other bodies: - -\ *Static transform change:* Static bodies can be moved by animation or script. In this case, they are just teleported and don't affect other bodies on their path. - -\ *Constant velocity:* When :ref:`constant_linear_velocity` or :ref:`constant_angular_velocity` is set, static bodies don't move themselves but affect touching bodies as if they were moving. This is useful for simulating conveyor belts or conveyor wheels. - -\ **Warning:** With a non-uniform scale this node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size(s) of its collision shape(s) instead. +\ **StaticBody3D** is useful for completely static objects like floors and walls, as well as moving surfaces like conveyor belts and circular revolving platforms (by using :ref:`constant_linear_velocity` and :ref:`constant_angular_velocity`). .. rst-class:: classref-introduction-group diff --git a/classes/class_streampeer.rst b/classes/class_streampeer.rst index b8296519a57..ff13e035b5f 100644 --- a/classes/class_streampeer.rst +++ b/classes/class_streampeer.rst @@ -14,14 +14,14 @@ StreamPeer **Inherited By:** :ref:`StreamPeerBuffer`, :ref:`StreamPeerExtension`, :ref:`StreamPeerGZIP`, :ref:`StreamPeerTCP`, :ref:`StreamPeerTLS` -Abstraction and base class for stream-based protocols. +Abstract base class for interacting with streams. .. rst-class:: classref-introduction-group Description ----------- -StreamPeer is an abstraction and base class for stream-based protocols (such as TCP). It provides an API for sending and receiving data through streams as raw data or strings. +StreamPeer is an abstract base class mostly used for stream-based protocols (such as TCP). It provides an API for sending and receiving data through streams as raw data or strings. \ **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. @@ -45,6 +45,8 @@ Methods .. table:: :widths: auto + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_8` **(** **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_16` **(** **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ @@ -52,8 +54,6 @@ Methods +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_64` **(** **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_8` **(** **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_available_bytes` **(** **)** |const| | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_data` **(** :ref:`int` bytes **)** | @@ -66,26 +66,26 @@ Methods +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_string` **(** :ref:`int` bytes=-1 **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_u8` **(** **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_u16` **(** **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_u32` **(** **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_u64` **(** **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_u8` **(** **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_utf8_string` **(** :ref:`int` bytes=-1 **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`get_var` **(** :ref:`bool` allow_objects=false **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`put_8` **(** :ref:`int` value **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`put_16` **(** :ref:`int` value **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`put_32` **(** :ref:`int` value **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`put_64` **(** :ref:`int` value **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`put_8` **(** :ref:`int` value **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`put_data` **(** :ref:`PackedByteArray` data **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`put_double` **(** :ref:`float` value **)** | @@ -96,14 +96,14 @@ Methods +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`put_string` **(** :ref:`String` value **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`put_u8` **(** :ref:`int` value **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`put_u16` **(** :ref:`int` value **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`put_u32` **(** :ref:`int` value **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`put_u64` **(** :ref:`int` value **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`put_u8` **(** :ref:`int` value **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`put_utf8_string` **(** :ref:`String` value **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`put_var` **(** :ref:`Variant` value, :ref:`bool` full_objects=false **)** | @@ -140,49 +140,49 @@ If ``true``, this **StreamPeer** will using big-endian format for encoding and d Method Descriptions ------------------- -.. _class_StreamPeer_method_get_16: +.. _class_StreamPeer_method_get_8: .. rst-class:: classref-method -:ref:`int` **get_16** **(** **)** +:ref:`int` **get_8** **(** **)** -Gets a signed 16-bit value from the stream. +Gets a signed byte from the stream. .. rst-class:: classref-item-separator ---- -.. _class_StreamPeer_method_get_32: +.. _class_StreamPeer_method_get_16: .. rst-class:: classref-method -:ref:`int` **get_32** **(** **)** +:ref:`int` **get_16** **(** **)** -Gets a signed 32-bit value from the stream. +Gets a signed 16-bit value from the stream. .. rst-class:: classref-item-separator ---- -.. _class_StreamPeer_method_get_64: +.. _class_StreamPeer_method_get_32: .. rst-class:: classref-method -:ref:`int` **get_64** **(** **)** +:ref:`int` **get_32** **(** **)** -Gets a signed 64-bit value from the stream. +Gets a signed 32-bit value from the stream. .. rst-class:: classref-item-separator ---- -.. _class_StreamPeer_method_get_8: +.. _class_StreamPeer_method_get_64: .. rst-class:: classref-method -:ref:`int` **get_8** **(** **)** +:ref:`int` **get_64** **(** **)** -Gets a signed byte from the stream. +Gets a signed 64-bit value from the stream. .. rst-class:: classref-item-separator @@ -260,49 +260,49 @@ Gets an ASCII string with byte-length ``bytes`` from the stream. If ``bytes`` is ---- -.. _class_StreamPeer_method_get_u16: +.. _class_StreamPeer_method_get_u8: .. rst-class:: classref-method -:ref:`int` **get_u16** **(** **)** +:ref:`int` **get_u8** **(** **)** -Gets an unsigned 16-bit value from the stream. +Gets an unsigned byte from the stream. .. rst-class:: classref-item-separator ---- -.. _class_StreamPeer_method_get_u32: +.. _class_StreamPeer_method_get_u16: .. rst-class:: classref-method -:ref:`int` **get_u32** **(** **)** +:ref:`int` **get_u16** **(** **)** -Gets an unsigned 32-bit value from the stream. +Gets an unsigned 16-bit value from the stream. .. rst-class:: classref-item-separator ---- -.. _class_StreamPeer_method_get_u64: +.. _class_StreamPeer_method_get_u32: .. rst-class:: classref-method -:ref:`int` **get_u64** **(** **)** +:ref:`int` **get_u32** **(** **)** -Gets an unsigned 64-bit value from the stream. +Gets an unsigned 32-bit value from the stream. .. rst-class:: classref-item-separator ---- -.. _class_StreamPeer_method_get_u8: +.. _class_StreamPeer_method_get_u64: .. rst-class:: classref-method -:ref:`int` **get_u8** **(** **)** +:ref:`int` **get_u64** **(** **)** -Gets an unsigned byte from the stream. +Gets an unsigned 64-bit value from the stream. .. rst-class:: classref-item-separator @@ -314,7 +314,7 @@ Gets an unsigned byte from the stream. :ref:`String` **get_utf8_string** **(** :ref:`int` bytes=-1 **)** -Gets an 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 @@ -336,49 +336,49 @@ Internally, this uses the same decoding mechanism as the :ref:`@GlobalScope.byte ---- -.. _class_StreamPeer_method_put_16: +.. _class_StreamPeer_method_put_8: .. rst-class:: classref-method -void **put_16** **(** :ref:`int` value **)** +void **put_8** **(** :ref:`int` value **)** -Puts a signed 16-bit value into the stream. +Puts a signed byte into the stream. .. rst-class:: classref-item-separator ---- -.. _class_StreamPeer_method_put_32: +.. _class_StreamPeer_method_put_16: .. rst-class:: classref-method -void **put_32** **(** :ref:`int` value **)** +void **put_16** **(** :ref:`int` value **)** -Puts a signed 32-bit value into the stream. +Puts a signed 16-bit value into the stream. .. rst-class:: classref-item-separator ---- -.. _class_StreamPeer_method_put_64: +.. _class_StreamPeer_method_put_32: .. rst-class:: classref-method -void **put_64** **(** :ref:`int` value **)** +void **put_32** **(** :ref:`int` value **)** -Puts a signed 64-bit value into the stream. +Puts a signed 32-bit value into the stream. .. rst-class:: classref-item-separator ---- -.. _class_StreamPeer_method_put_8: +.. _class_StreamPeer_method_put_64: .. rst-class:: classref-method -void **put_8** **(** :ref:`int` value **)** +void **put_64** **(** :ref:`int` value **)** -Puts a signed byte into the stream. +Puts a signed 64-bit value into the stream. .. rst-class:: classref-item-separator @@ -447,11 +447,11 @@ Puts a zero-terminated ASCII string into the stream prepended by a 32-bit unsign .. code-tab:: gdscript - put_data("Hello world".to_ascii()) + put_data("Hello world".to_ascii_buffer()) .. code-tab:: csharp - PutData("Hello World".ToAscii()); + PutData("Hello World".ToAsciiBuffer()); @@ -459,49 +459,49 @@ Puts a zero-terminated ASCII string into the stream prepended by a 32-bit unsign ---- -.. _class_StreamPeer_method_put_u16: +.. _class_StreamPeer_method_put_u8: .. rst-class:: classref-method -void **put_u16** **(** :ref:`int` value **)** +void **put_u8** **(** :ref:`int` value **)** -Puts an unsigned 16-bit value into the stream. +Puts an unsigned byte into the stream. .. rst-class:: classref-item-separator ---- -.. _class_StreamPeer_method_put_u32: +.. _class_StreamPeer_method_put_u16: .. rst-class:: classref-method -void **put_u32** **(** :ref:`int` value **)** +void **put_u16** **(** :ref:`int` value **)** -Puts an unsigned 32-bit value into the stream. +Puts an unsigned 16-bit value into the stream. .. rst-class:: classref-item-separator ---- -.. _class_StreamPeer_method_put_u64: +.. _class_StreamPeer_method_put_u32: .. rst-class:: classref-method -void **put_u64** **(** :ref:`int` value **)** +void **put_u32** **(** :ref:`int` value **)** -Puts an unsigned 64-bit value into the stream. +Puts an unsigned 32-bit value into the stream. .. rst-class:: classref-item-separator ---- -.. _class_StreamPeer_method_put_u8: +.. _class_StreamPeer_method_put_u64: .. rst-class:: classref-method -void **put_u8** **(** :ref:`int` value **)** +void **put_u64** **(** :ref:`int` value **)** -Puts an unsigned byte into the stream. +Puts an unsigned 64-bit value into the stream. .. rst-class:: classref-item-separator @@ -515,18 +515,18 @@ void **put_utf8_string** **(** :ref:`String` value **)** Puts a zero-terminated UTF-8 string into the stream prepended by a 32 bits unsigned integer representing its size. -\ **Note:** To put an 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:: .. code-tab:: gdscript - put_data("Hello world".to_utf8()) + put_data("Hello world".to_utf8_buffer()) .. code-tab:: csharp - PutData("Hello World".ToUtf8()); + PutData("Hello World".ToUtf8Buffer()); diff --git a/classes/class_streampeerbuffer.rst b/classes/class_streampeerbuffer.rst index e0749731cc3..f2e8d74e4fd 100644 --- a/classes/class_streampeerbuffer.rst +++ b/classes/class_streampeerbuffer.rst @@ -12,14 +12,14 @@ StreamPeerBuffer **Inherits:** :ref:`StreamPeer` **<** :ref:`RefCounted` **<** :ref:`Object` -Data buffer stream peer. +A stream peer used to handle binary data streams. .. rst-class:: classref-introduction-group Description ----------- -Data buffer stream peer that uses a byte array as the stream. This object can be used to handle binary data from network sessions. To handle binary data stored in files, :ref:`FileAccess` can be used directly. +A data buffer stream peer that uses a byte array as the stream. This object can be used to handle binary data from network sessions. To handle binary data stored in files, :ref:`FileAccess` can be used directly. A **StreamPeerBuffer** object keeps an internal cursor which is the offset in bytes to the start of the buffer. Get and put operations are performed at the cursor position and will move the cursor accordingly. diff --git a/classes/class_streampeergzip.rst b/classes/class_streampeergzip.rst index 87ac4dbdeb6..39954a0b24d 100644 --- a/classes/class_streampeergzip.rst +++ b/classes/class_streampeergzip.rst @@ -12,14 +12,14 @@ StreamPeerGZIP **Inherits:** :ref:`StreamPeer` **<** :ref:`RefCounted` **<** :ref:`Object` -Stream peer handling GZIP and deflate compression/decompresison. +A stream peer that handles GZIP and deflate compression/decompression. .. rst-class:: classref-introduction-group 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 has to be sent through the network without having to allocate them all in memory. +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). diff --git a/classes/class_streampeertcp.rst b/classes/class_streampeertcp.rst index a7c502b171d..48d316aa891 100644 --- a/classes/class_streampeertcp.rst +++ b/classes/class_streampeertcp.rst @@ -12,14 +12,14 @@ StreamPeerTCP **Inherits:** :ref:`StreamPeer` **<** :ref:`RefCounted` **<** :ref:`Object` -TCP stream peer. +A stream peer that handles TCP connections. .. rst-class:: classref-introduction-group Description ----------- -TCP stream peer. This object can be used to connect to TCP servers, or also is returned by a TCP server. +A stream peer that handles TCP connections. This object can be used to connect to TCP servers, or also is returned by a TCP server. \ **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. diff --git a/classes/class_streampeertls.rst b/classes/class_streampeertls.rst index eab95e8100f..d4203174517 100644 --- a/classes/class_streampeertls.rst +++ b/classes/class_streampeertls.rst @@ -12,14 +12,14 @@ StreamPeerTLS **Inherits:** :ref:`StreamPeer` **<** :ref:`RefCounted` **<** :ref:`Object` -TLS stream peer. +A stream peer that handles TLS connections. .. rst-class:: classref-introduction-group Description ----------- -TLS stream peer. This object can be used to connect to an TLS server or accept a single TLS client connection. +A stream peer that handles TLS connections. This object can be used to connect to a TLS server or accept a single TLS client 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. diff --git a/classes/class_string.rst b/classes/class_string.rst index 14f73c61833..4f4491b58fa 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -10,7 +10,7 @@ String ====== -Built-in string Variant type. +A built-in type for strings. .. rst-class:: classref-introduction-group @@ -21,7 +21,7 @@ This is the built-in string Variant type (and the one used by GDScript). Strings 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. -\ **Note:** In a boolean context, a string will evaluate to ``false`` if it is empty (``""``). Otherwise, a string will always evaluate to ``true``. +\ **Note:** In a boolean context, a string will evaluate to ``false`` if it is empty (``""``). Otherwise, a string will always evaluate to ``true``. The ``not`` operator cannot be used. Instead, :ref:`is_empty` should be used to check for empty strings. .. rst-class:: classref-introduction-group @@ -83,6 +83,8 @@ Methods +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`ends_with` **(** :ref:`String` text **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`erase` **(** :ref:`int` position, :ref:`int` chars=1 **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`find` **(** :ref:`String` what, :ref:`int` from=0 **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`findn` **(** :ref:`String` what, :ref:`int` from=0 **)** |const| | @@ -105,6 +107,8 @@ Methods +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`hash` **(** **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`hex_decode` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`hex_to_int` **(** **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`humanize_size` **(** :ref:`int` size **)** |static| | @@ -157,6 +161,8 @@ Methods +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`md5_text` **(** **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`naturalcasecmp_to` **(** :ref:`String` to **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`naturalnocasecmp_to` **(** :ref:`String` to **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`nocasecmp_to` **(** :ref:`String` to **)** |const| | @@ -231,11 +237,13 @@ Methods +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`to_upper` **(** **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`to_utf8_buffer` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`to_utf16_buffer` **(** **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`to_utf32_buffer` **(** **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`to_utf8_buffer` **(** **)** |const| | + | :ref:`PackedByteArray` | :ref:`to_wchar_buffer` **(** **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`trim_prefix` **(** :ref:`String` prefix **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -468,7 +476,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` and :ref:`naturalnocasecmp_to`. +To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`nocasecmp_to`, :ref:`naturalcasecmp_to`, and :ref:`naturalnocasecmp_to`. .. rst-class:: classref-item-separator @@ -569,6 +577,18 @@ Returns ``true`` if the string ends with the given ``text``. See also :ref:`begi ---- +.. _class_String_method_erase: + +.. rst-class:: classref-method + +:ref:`String` **erase** **(** :ref:`int` position, :ref:`int` chars=1 **)** |const| + +Returns a string with ``chars`` characters erased starting from ``position``. If ``chars`` goes beyond the string's length given the specified ``position``, fewer characters will be erased from the returned string. Returns an empty string if either ``position`` or ``chars`` is negative. Returns the original string unmodified if ``chars`` is ``0``. + +.. rst-class:: classref-item-separator + +---- + .. _class_String_method_find: .. rst-class:: classref-method @@ -779,6 +799,35 @@ Returns the 32-bit hash value representing the string's contents. \ **Note:** Strings with equal hash values are *not* guaranteed to be the same, as a result of hash collisions. On the countrary, strings with different hash values are guaranteed to be different. +.. rst-class:: classref-item-separator + +---- + +.. _class_String_method_hex_decode: + +.. rst-class:: classref-method + +:ref:`PackedByteArray` **hex_decode** **(** **)** |const| + +Decodes a hexadecimal string as a :ref:`PackedByteArray`. + + +.. tabs:: + + .. code-tab:: gdscript + + var text = "hello world" + var encoded = text.to_utf8_buffer().hex_encode() # outputs "68656c6c6f20776f726c64" + print(buf.hex_decode().get_string_from_utf8()) + + .. code-tab:: csharp + + var text = "hello world"; + var encoded = text.ToUtf8Buffer().HexEncode(); // outputs "68656c6c6f20776f726c64" + GD.Print(buf.HexDecode().GetStringFromUtf8()); + + + .. rst-class:: classref-item-separator ---- @@ -1186,6 +1235,24 @@ Returns the `MD5 hash `__ of the string as an ---- +.. _class_String_method_naturalcasecmp_to: + +.. rst-class:: classref-method + +:ref:`int` **naturalcasecmp_to** **(** :ref:`String` to **)** |const| + +Performs a **case-sensitive**, *natural order* comparison to another string. Returns ``-1`` if less than, ``1`` if greater than, or ``0`` if equal. "Less than" or "greater than" are determined by the `Unicode code points `__ of each string, which roughly matches the alphabetical order. + +When used for sorting, natural order comparison orders sequences of numbers by the combined value of each digit as is often expected, instead of the single digit's value. A sorted sequence of numbered strings will be ``["1", "2", "3", ...]``, not ``["1", "10", "2", "3", ...]``. + +With different string lengths, returns ``1`` if this string is longer than the ``to`` string, or ``-1`` if shorter. Note that the length of empty strings is *always* ``0``. + +To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`naturalnocasecmp_to`, :ref:`nocasecmp_to`, and :ref:`casecmp_to`. + +.. rst-class:: classref-item-separator + +---- + .. _class_String_method_naturalnocasecmp_to: .. rst-class:: classref-method @@ -1198,7 +1265,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:`nocasecmp_to` and :ref:`casecmp_to`. +To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`naturalcasecmp_to`, :ref:`nocasecmp_to`, and :ref:`casecmp_to`. .. rst-class:: classref-item-separator @@ -1214,7 +1281,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` and :ref:`naturalnocasecmp_to`. +To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`casecmp_to`, :ref:`naturalcasecmp_to`, and :ref:`naturalnocasecmp_to`. .. rst-class:: classref-item-separator @@ -1790,6 +1857,18 @@ Returns the string converted to uppercase. ---- +.. _class_String_method_to_utf8_buffer: + +.. rst-class:: classref-method + +:ref:`PackedByteArray` **to_utf8_buffer** **(** **)** |const| + +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. + +.. rst-class:: classref-item-separator + +---- + .. _class_String_method_to_utf16_buffer: .. rst-class:: classref-method @@ -1814,13 +1893,13 @@ Converts the string to a `UTF-32 `__ encod ---- -.. _class_String_method_to_utf8_buffer: +.. _class_String_method_to_wchar_buffer: .. rst-class:: classref-method -:ref:`PackedByteArray` **to_utf8_buffer** **(** **)** |const| +:ref:`PackedByteArray` **to_wchar_buffer** **(** **)** |const| -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. +Converts the string to a `wide character `__ (``wchar_t``, UTF-16 on Windows, UTF-32 on other platforms) encoded :ref:`PackedByteArray`. .. rst-class:: classref-item-separator @@ -1868,7 +1947,7 @@ Returns the character code at position ``at``. :ref:`String` **uri_decode** **(** **)** |const| -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. +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:: @@ -1895,7 +1974,7 @@ Decodes the string from its URL-encoded format. This method is meant to properly :ref:`String` **uri_encode** **(** **)** |const| -Encodes the string to URL-friendly format. This method is meant to properly encode the parameters in a URL when sending an HTTP request. +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:: diff --git a/classes/class_stringname.rst b/classes/class_stringname.rst index cf55f2f694d..1024e40f3bd 100644 --- a/classes/class_stringname.rst +++ b/classes/class_stringname.rst @@ -10,22 +10,22 @@ StringName ========== -An optimized string type for unique names. +A built-in type for unique strings. .. rst-class:: classref-introduction-group Description ----------- -**StringName**\ s are immutable strings designed for general-purpose representation of unique names (also called "string interning"). **StringName** ensures that only one instance of a given name exists (so two **StringName**\ s with the same value are the same object). Comparing them is much faster than with regular :ref:`String`\ s, because only the pointers are compared, not the whole strings. +**StringName**\ s are immutable strings designed for general-purpose representation of unique names (also called "string interning"). Two **StringName**\ s with the same value are the same object. Comparing them is extremely fast compared to regular :ref:`String`\ s. You will usually just pass a :ref:`String` to methods expecting a **StringName** and it will be automatically converted, but you may occasionally want to construct a **StringName** ahead of time with the **StringName** constructor or, in GDScript, the literal syntax ``&"example"``. -See also :ref:`NodePath`, which is a similar concept specifically designed to store pre-parsed node paths. +See also :ref:`NodePath`, which is a similar concept specifically designed to store pre-parsed scene tree paths. -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. +All of :ref:`String`'s methods are available in this class too. They convert the **StringName** into a string, and they also return a string. This is highly inefficient and should only be used if the string is desired. -\ **Note:** In a boolean context, a **StringName** will evaluate to ``false`` if it is empty (``StringName("")``). Otherwise, a **StringName** will always evaluate to ``true``. +\ **Note:** In a boolean context, a **StringName** will evaluate to ``false`` if it is empty (``StringName("")``). Otherwise, a **StringName** will always evaluate to ``true``. The ``not`` operator cannot be used. Instead, :ref:`is_empty` should be used to check for empty **StringName**\ s. .. rst-class:: classref-reftable-group @@ -76,6 +76,8 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`ends_with` **(** :ref:`String` text **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`erase` **(** :ref:`int` position, :ref:`int` chars=1 **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`find` **(** :ref:`String` what, :ref:`int` from=0 **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`findn` **(** :ref:`String` what, :ref:`int` from=0 **)** |const| | @@ -98,6 +100,8 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`hash` **(** **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`hex_decode` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`hex_to_int` **(** **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`indent` **(** :ref:`String` prefix **)** |const| | @@ -148,6 +152,8 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`md5_text` **(** **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`naturalcasecmp_to` **(** :ref:`String` to **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`naturalnocasecmp_to` **(** :ref:`String` to **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`nocasecmp_to` **(** :ref:`String` to **)** |const| | @@ -214,11 +220,13 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`to_upper` **(** **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`to_utf8_buffer` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`to_utf16_buffer` **(** **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`to_utf32_buffer` **(** **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`to_utf8_buffer` **(** **)** |const| | + | :ref:`PackedByteArray` | :ref:`to_wchar_buffer` **(** **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`trim_prefix` **(** :ref:`String` prefix **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -439,7 +447,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` and :ref:`naturalnocasecmp_to`. +To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`nocasecmp_to`, :ref:`naturalcasecmp_to`, and :ref:`naturalnocasecmp_to`. .. rst-class:: classref-item-separator @@ -523,6 +531,18 @@ Returns ``true`` if the string ends with the given ``text``. See also :ref:`begi ---- +.. _class_StringName_method_erase: + +.. rst-class:: classref-method + +:ref:`String` **erase** **(** :ref:`int` position, :ref:`int` chars=1 **)** |const| + +Returns a string with ``chars`` characters erased starting from ``position``. If ``chars`` goes beyond the string's length given the specified ``position``, fewer characters will be erased from the returned string. Returns an empty string if either ``position`` or ``chars`` is negative. Returns the original string unmodified if ``chars`` is ``0``. + +.. rst-class:: classref-item-separator + +---- + .. _class_StringName_method_find: .. rst-class:: classref-method @@ -733,6 +753,35 @@ Returns the 32-bit hash value representing the string's contents. \ **Note:** Strings with equal hash values are *not* guaranteed to be the same, as a result of hash collisions. On the countrary, strings with different hash values are guaranteed to be different. +.. rst-class:: classref-item-separator + +---- + +.. _class_StringName_method_hex_decode: + +.. rst-class:: classref-method + +:ref:`PackedByteArray` **hex_decode** **(** **)** |const| + +Decodes a hexadecimal string as a :ref:`PackedByteArray`. + + +.. tabs:: + + .. code-tab:: gdscript + + var text = "hello world" + var encoded = text.to_utf8_buffer().hex_encode() # outputs "68656c6c6f20776f726c64" + print(buf.hex_decode().get_string_from_utf8()) + + .. code-tab:: csharp + + var text = "hello world"; + var encoded = text.ToUtf8Buffer().HexEncode(); // outputs "68656c6c6f20776f726c64" + GD.Print(buf.HexDecode().GetStringFromUtf8()); + + + .. rst-class:: classref-item-separator ---- @@ -1126,6 +1175,24 @@ Returns the `MD5 hash `__ of the string as an ---- +.. _class_StringName_method_naturalcasecmp_to: + +.. rst-class:: classref-method + +:ref:`int` **naturalcasecmp_to** **(** :ref:`String` to **)** |const| + +Performs a **case-sensitive**, *natural order* comparison to another string. Returns ``-1`` if less than, ``1`` if greater than, or ``0`` if equal. "Less than" or "greater than" are determined by the `Unicode code points `__ of each string, which roughly matches the alphabetical order. + +When used for sorting, natural order comparison orders sequences of numbers by the combined value of each digit as is often expected, instead of the single digit's value. A sorted sequence of numbered strings will be ``["1", "2", "3", ...]``, not ``["1", "10", "2", "3", ...]``. + +With different string lengths, returns ``1`` if this string is longer than the ``to`` string, or ``-1`` if shorter. Note that the length of empty strings is *always* ``0``. + +To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`naturalnocasecmp_to`, :ref:`nocasecmp_to`, and :ref:`casecmp_to`. + +.. rst-class:: classref-item-separator + +---- + .. _class_StringName_method_naturalnocasecmp_to: .. rst-class:: classref-method @@ -1138,7 +1205,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:`nocasecmp_to` and :ref:`casecmp_to`. +To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`naturalcasecmp_to`, :ref:`nocasecmp_to`, and :ref:`casecmp_to`. .. rst-class:: classref-item-separator @@ -1154,7 +1221,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` and :ref:`naturalnocasecmp_to`. +To get a :ref:`bool` result from a string comparison, use the ``==`` operator instead. See also :ref:`casecmp_to`, :ref:`naturalcasecmp_to`, and :ref:`naturalnocasecmp_to`. .. rst-class:: classref-item-separator @@ -1633,6 +1700,18 @@ Returns the string converted to uppercase. ---- +.. _class_StringName_method_to_utf8_buffer: + +.. rst-class:: classref-method + +:ref:`PackedByteArray` **to_utf8_buffer** **(** **)** |const| + +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. + +.. rst-class:: classref-item-separator + +---- + .. _class_StringName_method_to_utf16_buffer: .. rst-class:: classref-method @@ -1657,13 +1736,13 @@ Converts the string to a `UTF-32 `__ encod ---- -.. _class_StringName_method_to_utf8_buffer: +.. _class_StringName_method_to_wchar_buffer: .. rst-class:: classref-method -:ref:`PackedByteArray` **to_utf8_buffer** **(** **)** |const| +:ref:`PackedByteArray` **to_wchar_buffer** **(** **)** |const| -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. +Converts the string to a `wide character `__ (``wchar_t``, UTF-16 on Windows, UTF-32 on other platforms) encoded :ref:`PackedByteArray`. .. rst-class:: classref-item-separator @@ -1886,7 +1965,7 @@ Appends ``right`` at the end of this **StringName**, returning a :ref:`String` **operator <** **(** :ref:`StringName` right **)** -Returns ``true`` if the left :ref:`String` comes before ``right`` in `Unicode order `__, which roughly matches the alphabetical order. Useful for sorting. +Returns ``true`` if the left **StringName**'s pointer comes before ``right``. Note that this will not match their `Unicode order `__. .. rst-class:: classref-item-separator @@ -1898,7 +1977,7 @@ Returns ``true`` if the left :ref:`String` comes before ``right`` :ref:`bool` **operator <=** **(** :ref:`StringName` right **)** -Returns ``true`` if the left :ref:`String` comes before ``right`` in `Unicode order `__, which roughly matches the alphabetical order, or if both are equal. +Returns ``true`` if the left **StringName**'s pointer comes before ``right`` or if they are the same. Note that this will not match their `Unicode order `__. .. rst-class:: classref-item-separator @@ -1934,7 +2013,7 @@ Returns ``true`` if the **StringName** and ``right`` refer to the same name. Com :ref:`bool` **operator >** **(** :ref:`StringName` right **)** -Returns ``true`` if the left **StringName** comes after ``right`` in `Unicode order `__, which roughly matches the alphabetical order. Useful for sorting. +Returns ``true`` if the left **StringName**'s pointer comes after ``right``. Note that this will not match their `Unicode order `__. .. rst-class:: classref-item-separator @@ -1946,7 +2025,7 @@ Returns ``true`` if the left **StringName** comes after ``right`` in `Unicode or :ref:`bool` **operator >=** **(** :ref:`StringName` right **)** -Returns ``true`` if the left **StringName** comes after ``right`` in `Unicode order `__, which roughly matches the alphabetical order, or if both are equal. +Returns ``true`` if the left **StringName**'s pointer comes after ``right`` or if they are the same. Note that this will not match their `Unicode order `__. .. |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_stylebox.rst b/classes/class_stylebox.rst index d18e7e5e98f..db4e43a39e6 100644 --- a/classes/class_stylebox.rst +++ b/classes/class_stylebox.rst @@ -14,16 +14,16 @@ StyleBox **Inherited By:** :ref:`StyleBoxEmpty`, :ref:`StyleBoxFlat`, :ref:`StyleBoxLine`, :ref:`StyleBoxTexture` -Base class for drawing stylized boxes for the UI. +Abstract base class for defining stylized boxes for UI elements. .. rst-class:: classref-introduction-group Description ----------- -StyleBox is :ref:`Resource` that provides an abstract base class for drawing stylized boxes for the UI. StyleBoxes are used for drawing the styles of buttons, line edit backgrounds, tree backgrounds, etc. and also for testing a transparency mask for pointer signals. If mask test fails on a StyleBox assigned as mask to a control, clicks and motion signals will go through it to the one below. +**StyleBox** is an abstract base class for drawing stylized boxes for UI elements. It is used for panels, buttons, :ref:`LineEdit` backgrounds, :ref:`Tree` backgrounds, etc. and also for testing a transparency mask for pointer signals. If mask test fails on a **StyleBox** assigned as mask to a control, clicks and motion signals will go through it to the one below. -\ **Note:** For children of :ref:`Control` that have *Theme Properties*, the ``focus`` **StyleBox** is displayed over the ``normal``, ``hover`` or ``pressed`` **StyleBox**. This makes the ``focus`` **StyleBox** more reusable across different nodes. +\ **Note:** For control nodes that have *Theme Properties*, the ``focus`` **StyleBox** is displayed over the ``normal``, ``hover`` or ``pressed`` **StyleBox**. This makes the ``focus`` **StyleBox** more reusable across different nodes. .. rst-class:: classref-reftable-group diff --git a/classes/class_styleboxempty.rst b/classes/class_styleboxempty.rst index e9eb75427b2..4ffdb57530d 100644 --- a/classes/class_styleboxempty.rst +++ b/classes/class_styleboxempty.rst @@ -12,14 +12,14 @@ StyleBoxEmpty **Inherits:** :ref:`StyleBox` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Empty stylebox (does not display anything). +An empty :ref:`StyleBox` (does not display anything). .. rst-class:: classref-introduction-group Description ----------- -Empty stylebox (really does not display anything). +An empty :ref:`StyleBox` that can be used to display nothing instead of the default style (e.g. it can "disable" ``focus`` styles). .. |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_styleboxflat.rst b/classes/class_styleboxflat.rst index f20a42c6ec5..2bf8decb108 100644 --- a/classes/class_styleboxflat.rst +++ b/classes/class_styleboxflat.rst @@ -12,22 +12,14 @@ StyleBoxFlat **Inherits:** :ref:`StyleBox` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Customizable :ref:`StyleBox` with a given set of parameters (no texture required). +A customizable :ref:`StyleBox` that doesn't use a texture. .. rst-class:: classref-introduction-group Description ----------- -This :ref:`StyleBox` can be used to achieve all kinds of looks without the need of a texture. The following properties are customizable: - -- Color - -- Border width (individual width for each border) - -- Rounded corners (individual radius for each corner) - -- Shadow (with blur and offset) +By configuring various properties of this style box, you can achieve many common looks without the need of a texture. This includes optionally rounded borders, antialiasing, shadows, and skew. Setting corner radius to high values is allowed. As soon as corners overlap, the stylebox will switch to a relative system. @@ -57,7 +49,7 @@ Properties +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ | :ref:`bool` | :ref:`anti_aliasing` | ``true`` | +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ - | :ref:`float` | :ref:`anti_aliasing_size` | ``0.625`` | + | :ref:`float` | :ref:`anti_aliasing_size` | ``1.0`` | +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ | :ref:`Color` | :ref:`bg_color` | ``Color(0.6, 0.6, 0.6, 1)`` | +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ @@ -164,14 +156,16 @@ Antialiasing draws a small ring around the edges, which fades to transparency. A .. rst-class:: classref-property -:ref:`float` **anti_aliasing_size** = ``0.625`` +:ref:`float` **anti_aliasing_size** = ``1.0`` .. rst-class:: classref-property-setget - void **set_aa_size** **(** :ref:`float` value **)** - :ref:`float` **get_aa_size** **(** **)** -This changes the size of the faded ring. Higher values can be used to achieve a "blurry" effect. +This changes the size of the antialiasing effect. ``1.0`` is recommended for an optimal result at 100% scale, identical to how rounded rectangles are rendered in web browsers and most vector drawing software. + +\ **Note:** Higher values may produce a blur effect but can also create undesired artifacts on small boxes with large-radius corners. .. rst-class:: classref-item-separator diff --git a/classes/class_styleboxline.rst b/classes/class_styleboxline.rst index 3d942771a96..eeb3aef1487 100644 --- a/classes/class_styleboxline.rst +++ b/classes/class_styleboxline.rst @@ -12,14 +12,14 @@ StyleBoxLine **Inherits:** :ref:`StyleBox` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -:ref:`StyleBox` that displays a single line. +A :ref:`StyleBox` that displays a single line of a given color and thickness. .. rst-class:: classref-introduction-group Description ----------- -:ref:`StyleBox` that displays a single line of a given color and thickness. It can be used to draw things like separators. +A :ref:`StyleBox` that displays a single line of a given color and thickness. The line can be either horizontal or vertical. Useful for separators. .. rst-class:: classref-reftable-group diff --git a/classes/class_styleboxtexture.rst b/classes/class_styleboxtexture.rst index daf6929c373..e8697dbd364 100644 --- a/classes/class_styleboxtexture.rst +++ b/classes/class_styleboxtexture.rst @@ -12,14 +12,14 @@ StyleBoxTexture **Inherits:** :ref:`StyleBox` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Texture-based nine-patch :ref:`StyleBox`. +A texture-based nine-patch :ref:`StyleBox`. .. rst-class:: classref-introduction-group Description ----------- -Texture-based nine-patch :ref:`StyleBox`, in a way similar to :ref:`NinePatchRect`. This stylebox performs a 3×3 scaling of a texture, where only the center cell is fully stretched. This makes it possible to design bordered styles regardless of the stylebox's size. +A texture-based nine-patch :ref:`StyleBox`, in a way similar to :ref:`NinePatchRect`. This stylebox performs a 3×3 scaling of a texture, where only the center cell is fully stretched. This makes it possible to design bordered styles regardless of the stylebox's size. .. rst-class:: classref-reftable-group diff --git a/classes/class_subviewport.rst b/classes/class_subviewport.rst index c5a7b22169d..0977be29c90 100644 --- a/classes/class_subviewport.rst +++ b/classes/class_subviewport.rst @@ -12,14 +12,16 @@ SubViewport **Inherits:** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` -Creates a sub-view into the screen. +An interface to a game world that doesn't create a window or draw to the screen directly. .. rst-class:: classref-introduction-group Description ----------- -**SubViewport** is a :ref:`Viewport` that isn't a :ref:`Window`, i.e. it doesn't draw anything by itself. To display something, **SubViewport**'s :ref:`size` must be non-zero and it should be either put inside a :ref:`SubViewportContainer` or assigned to a :ref:`ViewportTexture`. +**SubViewport** Isolates a rectangular region of a scene to be displayed independently. This can be used, for example, to display UI in 3D space. + +\ **Note:** **SubViewport** is a :ref:`Viewport` that isn't a :ref:`Window`, i.e. it doesn't draw anything by itself. To display anything, **SubViewport** must have a non-zero size and be either put inside a :ref:`SubViewportContainer` or assigned to a :ref:`ViewportTexture`. .. rst-class:: classref-introduction-group diff --git a/classes/class_subviewportcontainer.rst b/classes/class_subviewportcontainer.rst index 1f0d03f1d5a..664f4b2bcf0 100644 --- a/classes/class_subviewportcontainer.rst +++ b/classes/class_subviewportcontainer.rst @@ -12,18 +12,18 @@ SubViewportContainer **Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Control for holding :ref:`SubViewport`\ s. +A container used for displaying the contents of a :ref:`SubViewport`. .. rst-class:: classref-introduction-group Description ----------- -A :ref:`Container` node that holds a :ref:`SubViewport`. It uses the :ref:`SubViewport`'s size as minimum size, unless :ref:`stretch` is enabled. +A container that displays the contents of underlying :ref:`SubViewport` child nodes. It uses the combined size of the :ref:`SubViewport`\ s as minimum size, unless :ref:`stretch` is enabled. -\ **Note:** Changing a SubViewportContainer's :ref:`Control.scale` will cause its contents to appear distorted. To change its visual size without causing distortion, adjust the node's margins instead (if it's not already in a container). +\ **Note:** Changing a **SubViewportContainer**'s :ref:`Control.scale` will cause its contents to appear distorted. To change its visual size without causing distortion, adjust the node's margins instead (if it's not already in a container). -\ **Note:** The SubViewportContainer forwards mouse-enter and mouse-exit notifications to its sub-viewports. +\ **Note:** The **SubViewportContainer** forwards mouse-enter and mouse-exit notifications to its sub-viewports. .. rst-class:: classref-reftable-group diff --git a/classes/class_surfacetool.rst b/classes/class_surfacetool.rst index 515fd8c7770..56f2a47cf8f 100644 --- a/classes/class_surfacetool.rst +++ b/classes/class_surfacetool.rst @@ -37,7 +37,7 @@ The **SurfaceTool** is used to construct a :ref:`Mesh` by specifying var st = new SurfaceTool(); st.Begin(Mesh.PrimitiveType.Triangles); st.SetColor(new Color(1, 0, 0)); - st.SetUv(new Vector2(0, 0)); + st.SetUV(new Vector2(0, 0)); st.AddVertex(new Vector3(0, 0, 0)); @@ -67,71 +67,71 @@ Methods .. table:: :widths: auto - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_index` **(** :ref:`int` index **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_triangle_fan` **(** :ref:`PackedVector3Array` vertices, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`PackedColorArray` colors=PackedColorArray(), :ref:`PackedVector2Array` uv2s=PackedVector2Array(), :ref:`PackedVector3Array` normals=PackedVector3Array(), :ref:`Array` tangents=[] **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_vertex` **(** :ref:`Vector3` vertex **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`append_from` **(** :ref:`Mesh` existing, :ref:`int` surface, :ref:`Transform3D` transform **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`begin` **(** :ref:`PrimitiveType` primitive **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear` **(** **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ArrayMesh` | :ref:`commit` **(** :ref:`ArrayMesh` existing=null, :ref:`int` flags=0 **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`commit_to_arrays` **(** **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_from` **(** :ref:`Mesh` existing, :ref:`int` surface **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_from_blend_shape` **(** :ref:`Mesh` existing, :ref:`int` surface, :ref:`String` blend_shape **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`deindex` **(** **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`generate_lod` **(** :ref:`float` nd_threshold, :ref:`int` target_index_count=3 **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`generate_normals` **(** :ref:`bool` flip=false **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`generate_tangents` **(** **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB` | :ref:`get_aabb` **(** **)** |const| | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`CustomFormat` | :ref:`get_custom_format` **(** :ref:`int` channel_index **)** |const| | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PrimitiveType` | :ref:`get_primitive_type` **(** **)** |const| | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SkinWeightCount` | :ref:`get_skin_weight_count` **(** **)** |const| | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`index` **(** **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`optimize_indices_for_cache` **(** **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bones` **(** :ref:`PackedInt32Array` bones **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_color` **(** :ref:`Color` color **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_custom` **(** :ref:`int` channel_index, :ref:`Color` custom_color **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_custom_format` **(** :ref:`int` channel_index, :ref:`CustomFormat` format **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_material` **(** :ref:`Material` material **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_normal` **(** :ref:`Vector3` normal **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_skin_weight_count` **(** :ref:`SkinWeightCount` count **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_smooth_group` **(** :ref:`int` index **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tangent` **(** :ref:`Plane` tangent **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_uv` **(** :ref:`Vector2` uv **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_uv2` **(** :ref:`Vector2` uv2 **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_weights` **(** :ref:`PackedFloat32Array` weights **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_index` **(** :ref:`int` index **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_triangle_fan` **(** :ref:`PackedVector3Array` vertices, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`PackedColorArray` colors=PackedColorArray(), :ref:`PackedVector2Array` uv2s=PackedVector2Array(), :ref:`PackedVector3Array` normals=PackedVector3Array(), :ref:`Plane[]` tangents=[] **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_vertex` **(** :ref:`Vector3` vertex **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`append_from` **(** :ref:`Mesh` existing, :ref:`int` surface, :ref:`Transform3D` transform **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`begin` **(** :ref:`PrimitiveType` primitive **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ArrayMesh` | :ref:`commit` **(** :ref:`ArrayMesh` existing=null, :ref:`int` flags=0 **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`commit_to_arrays` **(** **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_from` **(** :ref:`Mesh` existing, :ref:`int` surface **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_from_blend_shape` **(** :ref:`Mesh` existing, :ref:`int` surface, :ref:`String` blend_shape **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`deindex` **(** **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`generate_lod` **(** :ref:`float` nd_threshold, :ref:`int` target_index_count=3 **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`generate_normals` **(** :ref:`bool` flip=false **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`generate_tangents` **(** **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`get_aabb` **(** **)** |const| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CustomFormat` | :ref:`get_custom_format` **(** :ref:`int` channel_index **)** |const| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PrimitiveType` | :ref:`get_primitive_type` **(** **)** |const| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SkinWeightCount` | :ref:`get_skin_weight_count` **(** **)** |const| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`index` **(** **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`optimize_indices_for_cache` **(** **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bones` **(** :ref:`PackedInt32Array` bones **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_color` **(** :ref:`Color` color **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_custom` **(** :ref:`int` channel_index, :ref:`Color` custom_color **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_custom_format` **(** :ref:`int` channel_index, :ref:`CustomFormat` format **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_material` **(** :ref:`Material` material **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_normal` **(** :ref:`Vector3` normal **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_skin_weight_count` **(** :ref:`SkinWeightCount` count **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_smooth_group` **(** :ref:`int` index **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tangent` **(** :ref:`Plane` tangent **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_uv` **(** :ref:`Vector2` uv **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_uv2` **(** :ref:`Vector2` uv2 **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_weights` **(** :ref:`PackedFloat32Array` weights **)** | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -271,7 +271,7 @@ Adds a vertex to index array if you are using indexed vertices. Does not need to .. rst-class:: classref-method -void **add_triangle_fan** **(** :ref:`PackedVector3Array` vertices, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`PackedColorArray` colors=PackedColorArray(), :ref:`PackedVector2Array` uv2s=PackedVector2Array(), :ref:`PackedVector3Array` normals=PackedVector3Array(), :ref:`Array` tangents=[] **)** +void **add_triangle_fan** **(** :ref:`PackedVector3Array` vertices, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`PackedColorArray` colors=PackedColorArray(), :ref:`PackedVector2Array` uv2s=PackedVector2Array(), :ref:`PackedVector3Array` normals=PackedVector3Array(), :ref:`Plane[]` tangents=[] **)** Inserts a triangle fan made of array data into :ref:`Mesh` being constructed. @@ -399,7 +399,7 @@ Removes the index array by expanding the vertex array. Generates a LOD for a given ``nd_threshold`` in linear units (square root of quadric error metric), using at most ``target_index_count`` indices. -Deprecated. Unused internally and neglects to preserve normals or UVs. Consider using :ref:`ImporterMesh.generate_lods` instead. +\ *Deprecated.* Unused internally and neglects to preserve normals or UVs. Consider using :ref:`ImporterMesh.generate_lods` instead. .. rst-class:: classref-item-separator @@ -611,6 +611,8 @@ void **set_smooth_group** **(** :ref:`int` index **)** Specifies the smooth group to use for the *next* vertex. If this is never called, all vertices will have the default smooth group of ``0`` and will be smoothed with adjacent vertices of the same group. To produce a mesh with flat normals, set the smooth group to ``-1``. +\ **Note:** This function actually takes a ``uint32_t``, so C# users should use ``uint32.MaxValue`` instead of ``-1`` to produce a mesh with flat normals. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_syntaxhighlighter.rst b/classes/class_syntaxhighlighter.rst index 1f356b8be67..d225988e073 100644 --- a/classes/class_syntaxhighlighter.rst +++ b/classes/class_syntaxhighlighter.rst @@ -14,18 +14,16 @@ SyntaxHighlighter **Inherited By:** :ref:`CodeHighlighter`, :ref:`EditorSyntaxHighlighter` -Base Syntax highlighter resource for :ref:`TextEdit`. +Base class for syntax highlighters. Provides syntax highlighting data to a :ref:`TextEdit`. .. rst-class:: classref-introduction-group Description ----------- -Base syntax highlighter resource all syntax highlighters extend from, provides syntax highlighting data to :ref:`TextEdit`. +Base class for syntax highlighters. Provides syntax highlighting data to a :ref:`TextEdit`. The associated :ref:`TextEdit` will call into the **SyntaxHighlighter** on an as-needed basis. -The associated :ref:`TextEdit` node will call into the **SyntaxHighlighter** on a as needed basis. - -\ **Note:** Each Syntax highlighter instance should not be shared across multiple :ref:`TextEdit` nodes. +\ **Note:** A **SyntaxHighlighter** instance should not be used across multiple :ref:`TextEdit` nodes. .. rst-class:: classref-reftable-group @@ -46,7 +44,7 @@ Methods +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`get_line_syntax_highlighting` **(** :ref:`int` line **)** | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TextEdit` | :ref:`get_text_edit` **(** **)** | + | :ref:`TextEdit` | :ref:`get_text_edit` **(** **)** |const| | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`update_cache` **(** **)** | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -145,7 +143,7 @@ This will color columns 0-4 red, and columns 5-eol in green. .. rst-class:: classref-method -:ref:`TextEdit` **get_text_edit** **(** **)** +:ref:`TextEdit` **get_text_edit** **(** **)** |const| Returns the associated :ref:`TextEdit` node. diff --git a/classes/class_systemfont.rst b/classes/class_systemfont.rst index a39924a8e1d..84fe61aac85 100644 --- a/classes/class_systemfont.rst +++ b/classes/class_systemfont.rst @@ -12,9 +12,7 @@ SystemFont **Inherits:** :ref:`Font` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Font loaded from a system font. - -\ **Note:** This class is implemented on iOS, Linux, macOS and Windows, on other platforms it will fallback to default theme font. +A font loaded from a system font. Falls back to a default theme font if not implemented on the host OS. .. rst-class:: classref-introduction-group @@ -29,6 +27,8 @@ The returned font might be part of a font collection or be a variable font with You can create :ref:`FontVariation` of the system font for fine control over its features. +\ **Note:** This class is implemented on iOS, Linux, macOS and Windows, on other platforms it will fallback to default theme font. + .. rst-class:: classref-reftable-group Properties diff --git a/classes/class_tabbar.rst b/classes/class_tabbar.rst index b60d0d07b48..96f02937d23 100644 --- a/classes/class_tabbar.rst +++ b/classes/class_tabbar.rst @@ -12,14 +12,14 @@ TabBar **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Tab bar control. +A control that provides a horizontal bar with tabs. .. rst-class:: classref-introduction-group Description ----------- -Simple tabs control, similar to :ref:`TabContainer` but is only in charge of drawing tabs, not interacting with children. +A control that provides a horizontal bar with tabs. Similar to :ref:`TabContainer` but is only in charge of drawing tabs, not interacting with children. .. rst-class:: classref-reftable-group @@ -76,10 +76,14 @@ Methods +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture2D` | :ref:`get_tab_icon` **(** :ref:`int` tab_idx **)** |const| | +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_tab_icon_max_width` **(** :ref:`int` tab_idx **)** |const| | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_tab_idx_at_point` **(** :ref:`Vector2` point **)** |const| | +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_tab_language` **(** :ref:`int` tab_idx **)** |const| | +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_tab_metadata` **(** :ref:`int` tab_idx **)** |const| | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_tab_offset` **(** **)** |const| | +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2` | :ref:`get_tab_rect` **(** :ref:`int` tab_idx **)** |const| | @@ -104,8 +108,12 @@ Methods +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_tab_icon` **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** | +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tab_icon_max_width` **(** :ref:`int` tab_idx, :ref:`int` width **)** | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_tab_language` **(** :ref:`int` tab_idx, :ref:`String` language **)** | +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tab_metadata` **(** :ref:`int` tab_idx, :ref:`Variant` metadata **)** | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_tab_text_direction` **(** :ref:`int` tab_idx, :ref:`TextDirection` direction **)** | +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_tab_title` **(** :ref:`int` tab_idx, :ref:`String` title **)** | @@ -124,6 +132,8 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_hovered_color` | ``Color(0.95, 0.95, 0.95, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_selected_color` | ``Color(0.95, 0.95, 0.95, 1)`` | @@ -132,6 +142,8 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`h_separation` | ``4`` | +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`icon_max_width` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Font` | :ref:`font` | | @@ -156,6 +168,8 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`tab_disabled` | | +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`tab_hovered` | | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`tab_selected` | | +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`tab_unselected` | | @@ -454,7 +468,7 @@ Sets the maximum width which all tabs should be limited to. Unlimited if set to - void **set_scroll_to_selected** **(** :ref:`bool` value **)** - :ref:`bool` **get_scroll_to_selected** **(** **)** -If ``true``, the tab offset will be changed to keep the the currently selected tab visible. +If ``true``, the tab offset will be changed to keep the currently selected tab visible. .. rst-class:: classref-item-separator @@ -635,7 +649,7 @@ Returns the previously active tab index. :ref:`Texture2D` **get_tab_button_icon** **(** :ref:`int` tab_idx **)** |const| -Returns the :ref:`Texture2D` for the right button of the tab at index ``tab_idx`` or ``null`` if the button has no :ref:`Texture2D`. +Returns the icon for the right button of the tab at index ``tab_idx`` or ``null`` if the right button has no icon. .. rst-class:: classref-item-separator @@ -647,7 +661,19 @@ Returns the :ref:`Texture2D` for the right button of the tab at :ref:`Texture2D` **get_tab_icon** **(** :ref:`int` tab_idx **)** |const| -Returns the :ref:`Texture2D` for the tab at index ``tab_idx`` or ``null`` if the tab has no :ref:`Texture2D`. +Returns the icon for the tab at index ``tab_idx`` or ``null`` if the tab has no icon. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TabBar_method_get_tab_icon_max_width: + +.. rst-class:: classref-method + +:ref:`int` **get_tab_icon_max_width** **(** :ref:`int` tab_idx **)** |const| + +Returns the maximum allowed width of the icon for the tab at index ``tab_idx``. .. rst-class:: classref-item-separator @@ -677,6 +703,18 @@ Returns tab title language code. ---- +.. _class_TabBar_method_get_tab_metadata: + +.. rst-class:: classref-method + +:ref:`Variant` **get_tab_metadata** **(** :ref:`int` tab_idx **)** |const| + +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 + +---- + .. _class_TabBar_method_get_tab_offset: .. rst-class:: classref-method @@ -821,6 +859,18 @@ Sets an ``icon`` for the tab at index ``tab_idx``. ---- +.. _class_TabBar_method_set_tab_icon_max_width: + +.. rst-class:: classref-method + +void **set_tab_icon_max_width** **(** :ref:`int` tab_idx, :ref:`int` width **)** + +Sets the maximum allowed width of the icon for the tab at index ``tab_idx``. This limit is applied on top of the default size of the icon and on top of :ref:`icon_max_width`. The height is adjusted according to the icon's ratio. + +.. rst-class:: classref-item-separator + +---- + .. _class_TabBar_method_set_tab_language: .. rst-class:: classref-method @@ -833,6 +883,18 @@ Sets language code of tab title used for line-breaking and text shaping algorith ---- +.. _class_TabBar_method_set_tab_metadata: + +.. rst-class:: classref-method + +void **set_tab_metadata** **(** :ref:`int` tab_idx, :ref:`Variant` 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 + +---- + .. _class_TabBar_method_set_tab_text_direction: .. rst-class:: classref-method @@ -886,6 +948,18 @@ Font color of disabled tabs. ---- +.. _class_TabBar_theme_color_font_hovered_color: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **font_hovered_color** = ``Color(0.95, 0.95, 0.95, 1)`` + +Font color of the currently hovered tab. Does not apply to the selected tab. + +.. rst-class:: classref-item-separator + +---- + .. _class_TabBar_theme_color_font_outline_color: .. rst-class:: classref-themeproperty @@ -934,6 +1008,18 @@ The horizontal separation between the elements inside tabs. ---- +.. _class_TabBar_theme_constant_icon_max_width: + +.. rst-class:: classref-themeproperty + +:ref:`int` **icon_max_width** = ``0`` + +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 + +---- + .. _class_TabBar_theme_constant_outline_size: .. rst-class:: classref-themeproperty @@ -1080,6 +1166,18 @@ The style of disabled tabs. ---- +.. _class_TabBar_theme_style_tab_hovered: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **tab_hovered** + +The style of the currently hovered tab. Does not apply to the selected tab. + +.. rst-class:: classref-item-separator + +---- + .. _class_TabBar_theme_style_tab_selected: .. rst-class:: classref-themeproperty diff --git a/classes/class_tabcontainer.rst b/classes/class_tabcontainer.rst index d1c9bafa9cd..0ffe1c76992 100644 --- a/classes/class_tabcontainer.rst +++ b/classes/class_tabcontainer.rst @@ -12,25 +12,23 @@ TabContainer **Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Tabbed container. +A container that creates a tab for each child control, displaying only the active tab's control. .. rst-class:: classref-introduction-group Description ----------- -Arranges :ref:`Control` children into a tabbed view, creating a tab for each one. The active tab's corresponding :ref:`Control` has its ``visible`` property set to ``true``, and all other children's to ``false``. +Arranges child controls into a tabbed view, creating a tab for each one. The active tab's corresponding control is made visible, while all other child controls are hidden. Ignores non-control children. -Ignores non-:ref:`Control` children. - -\ **Note:** The drawing of the clickable tabs themselves is handled by this node. Adding :ref:`TabBar`\ s as children is not needed. +\ **Note:** The drawing of the clickable tabs is handled by this node; :ref:`TabBar` is not needed. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`GUI containers <../tutorials/ui/gui_containers>` +- :doc:`Using Containers <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group @@ -85,6 +83,8 @@ Methods +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_tab_idx_from_control` **(** :ref:`Control` control **)** |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_tab_metadata` **(** :ref:`int` tab_idx **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_tab_title` **(** :ref:`int` tab_idx **)** |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_tab_disabled` **(** :ref:`int` tab_idx **)** |const| | @@ -101,6 +101,8 @@ Methods +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_tab_icon` **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tab_metadata` **(** :ref:`int` tab_idx, :ref:`Variant` metadata **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_tab_title` **(** :ref:`int` tab_idx, :ref:`String` title **)** | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -117,12 +119,16 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_hovered_color` | ``Color(0.95, 0.95, 0.95, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_selected_color` | ``Color(0.95, 0.95, 0.95, 1)`` | +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_unselected_color` | ``Color(0.7, 0.7, 0.7, 1)`` | +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`icon_max_width` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`icon_separation` | ``4`` | +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | @@ -151,6 +157,8 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`tab_disabled` | | +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`tab_hovered` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`tab_selected` | | +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`tab_unselected` | | @@ -167,6 +175,18 @@ Theme Properties Signals ------- +.. _class_TabContainer_signal_active_tab_rearranged: + +.. rst-class:: classref-signal + +**active_tab_rearranged** **(** :ref:`int` idx_to **)** + +Emitted when the active tab is rearranged via mouse drag. See :ref:`drag_to_rearrange_enabled`. + +.. rst-class:: classref-item-separator + +---- + .. _class_TabContainer_signal_pre_popup_pressed: .. rst-class:: classref-signal @@ -203,6 +223,30 @@ Emitted when switching to another tab. ---- +.. _class_TabContainer_signal_tab_clicked: + +.. rst-class:: classref-signal + +**tab_clicked** **(** :ref:`int` tab **)** + +Emitted when a tab is clicked, even if it is the current tab. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TabContainer_signal_tab_hovered: + +.. rst-class:: classref-signal + +**tab_hovered** **(** :ref:`int` tab **)** + +Emitted when a tab is hovered by the mouse. + +.. rst-class:: classref-item-separator + +---- + .. _class_TabContainer_signal_tab_selected: .. rst-class:: classref-signal @@ -473,6 +517,18 @@ Returns the index of the tab tied to the given ``control``. The control must be ---- +.. _class_TabContainer_method_get_tab_metadata: + +.. rst-class:: classref-method + +:ref:`Variant` **get_tab_metadata** **(** :ref:`int` tab_idx **)** |const| + +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 + +---- + .. _class_TabContainer_method_get_tab_title: .. rst-class:: classref-method @@ -569,6 +625,18 @@ Sets an icon for the tab at index ``tab_idx``. ---- +.. _class_TabContainer_method_set_tab_metadata: + +.. rst-class:: classref-method + +void **set_tab_metadata** **(** :ref:`int` tab_idx, :ref:`Variant` 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 + +---- + .. _class_TabContainer_method_set_tab_title: .. rst-class:: classref-method @@ -610,6 +678,18 @@ Font color of disabled tabs. ---- +.. _class_TabContainer_theme_color_font_hovered_color: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **font_hovered_color** = ``Color(0.95, 0.95, 0.95, 1)`` + +Font color of the currently hovered tab. + +.. rst-class:: classref-item-separator + +---- + .. _class_TabContainer_theme_color_font_outline_color: .. rst-class:: classref-themeproperty @@ -646,6 +726,18 @@ Font color of the other, unselected tabs. ---- +.. _class_TabContainer_theme_constant_icon_max_width: + +.. rst-class:: classref-themeproperty + +:ref:`int` **icon_max_width** = ``0`` + +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 + +---- + .. _class_TabContainer_theme_constant_icon_separation: .. rst-class:: classref-themeproperty @@ -818,6 +910,18 @@ The style of disabled tabs. ---- +.. _class_TabContainer_theme_style_tab_hovered: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **tab_hovered** + +The style of the currently hovered tab. + +.. rst-class:: classref-item-separator + +---- + .. _class_TabContainer_theme_style_tab_selected: .. rst-class:: classref-themeproperty diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index 369492eaaf7..9697448ecee 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -14,14 +14,14 @@ TextEdit **Inherited By:** :ref:`CodeEdit` -Multiline text editing control. +A multiline text editor. .. rst-class:: classref-introduction-group Description ----------- -TextEdit is meant for editing large, multiline text. It also has facilities for editing code, such as syntax highlighting support and multiple levels of undo/redo. +A multiline text editor. It also has limited facilities for editing code, such as syntax highlighting support. For more advanced facilities for editing code, see :ref:`CodeEdit`. \ **Note:** Most viewport, caret and edit methods contain a ``caret_index`` argument for :ref:`caret_multiple` support. The argument should be one of the following: ``-1`` for all carets, ``0`` for the main caret, or greater than ``0`` for secondary carets. @@ -40,6 +40,8 @@ Properties +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`caret_blink_interval` | ``0.65`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`caret_draw_when_editable_disabled` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`caret_mid_grapheme` | ``true`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`caret_move_on_right_click` | ``true`` | @@ -959,7 +961,7 @@ Select whole words as if the user double clicked. :ref:`SelectionMode` **SELECTION_MODE_LINE** = ``4`` -Select whole lines as if the user tripped clicked. +Select whole lines as if the user triple clicked. .. rst-class:: classref-item-separator @@ -1041,7 +1043,7 @@ Property Descriptions - void **set_caret_blink_enabled** **(** :ref:`bool` value **)** - :ref:`bool` **is_caret_blink_enabled** **(** **)** -Sets if the caret should blink. +If ``true``, makes the caret blink. .. rst-class:: classref-item-separator @@ -1058,7 +1060,24 @@ Sets if the caret should blink. - void **set_caret_blink_interval** **(** :ref:`float` value **)** - :ref:`float` **get_caret_blink_interval** **(** **)** -Duration (in seconds) of a caret's blinking cycle. +The interval at which the caret blinks (in seconds). + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextEdit_property_caret_draw_when_editable_disabled: + +.. rst-class:: classref-property + +:ref:`bool` **caret_draw_when_editable_disabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_draw_caret_when_editable_disabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_drawing_caret_when_editable_disabled** **(** **)** + +If ``true``, caret will be visible when :ref:`editable` is disabled. .. rst-class:: classref-item-separator @@ -2222,7 +2241,9 @@ Returns the text currently in ``gutter`` at ``line``. :ref:`int` **get_line_height** **(** **)** |const| -Returns the height of a largest line. +Returns the maximum value of the line height among all lines. + +\ **Note:** The return value is influenced by :ref:`line_spacing` and :ref:`font_size`. And it will not be less than ``1``. .. rst-class:: classref-item-separator @@ -2453,7 +2474,7 @@ Returns the scroll position for ``wrap_index`` of ``line``. :ref:`String` **get_selected_text** **(** :ref:`int` caret_index=-1 **)** -Returns the text inside the selection. +Returns the text inside the selection of a caret, or all the carets if ``caret_index`` is its default value ``-1``. .. rst-class:: classref-item-separator diff --git a/classes/class_textline.rst b/classes/class_textline.rst index 0a6acca8214..5876466ca6c 100644 --- a/classes/class_textline.rst +++ b/classes/class_textline.rst @@ -19,7 +19,7 @@ Holds a line of text. Description ----------- -Abstraction over :ref:`TextServer` for handling single line of text. +Abstraction over :ref:`TextServer` for handling a single line of text. .. rst-class:: classref-reftable-group diff --git a/classes/class_textmesh.rst b/classes/class_textmesh.rst index fd70f2637f9..c6f8ecd927d 100644 --- a/classes/class_textmesh.rst +++ b/classes/class_textmesh.rst @@ -46,6 +46,8 @@ Properties +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ | :ref:`HorizontalAlignment` | :ref:`horizontal_alignment` | ``1`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`JustificationFlag` | :ref:`justification_flags` | ``163`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ | :ref:`String` | :ref:`language` | ``""`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ | :ref:`float` | :ref:`line_spacing` | ``0.0`` | @@ -180,6 +182,23 @@ Controls the text's horizontal alignment. Supports left, center, right, and fill ---- +.. _class_TextMesh_property_justification_flags: + +.. rst-class:: classref-property + +:ref:`JustificationFlag` **justification_flags** = ``163`` + +.. rst-class:: classref-property-setget + +- void **set_justification_flags** **(** :ref:`JustificationFlag` value **)** +- :ref:`JustificationFlag` **get_justification_flags** **(** **)** + +Line fill alignment rules. For more info see :ref:`JustificationFlag`. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextMesh_property_language: .. rst-class:: classref-property diff --git a/classes/class_textparagraph.rst b/classes/class_textparagraph.rst index 22490704352..4e70e9f294e 100644 --- a/classes/class_textparagraph.rst +++ b/classes/class_textparagraph.rst @@ -19,7 +19,7 @@ Holds a paragraph of text. Description ----------- -Abstraction over :ref:`TextServer` for handling paragraph of text. +Abstraction over :ref:`TextServer` for handling a single paragraph of text. .. rst-class:: classref-reftable-group @@ -38,7 +38,7 @@ Properties +-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`Direction` | :ref:`direction` | ``0`` | +-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ - | :ref:`JustificationFlag` | :ref:`justification_flags` | ``3`` | + | :ref:`JustificationFlag` | :ref:`justification_flags` | ``163`` | +-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`max_lines_visible` | ``-1`` | +-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ @@ -208,14 +208,14 @@ Text writing direction. .. rst-class:: classref-property -:ref:`JustificationFlag` **justification_flags** = ``3`` +:ref:`JustificationFlag` **justification_flags** = ``163`` .. rst-class:: classref-property-setget - void **set_justification_flags** **(** :ref:`JustificationFlag` value **)** - :ref:`JustificationFlag` **get_justification_flags** **(** **)** -Line alignment rules. For more info see :ref:`TextServer`. +Line fill alignment rules. For more info see :ref:`JustificationFlag`. .. rst-class:: classref-item-separator diff --git a/classes/class_textserver.rst b/classes/class_textserver.rst index 49479dba4a9..ba217d3747f 100644 --- a/classes/class_textserver.rst +++ b/classes/class_textserver.rst @@ -14,14 +14,14 @@ TextServer **Inherited By:** :ref:`TextServerExtension` -Interface for the fonts and complex text layouts. +A server interface for font management and text rendering. .. rst-class:: classref-introduction-group Description ----------- -**TextServer** is the API backend for managing fonts, and rendering complex text. +**TextServer** is the API backend for managing fonts and rendering text. .. rst-class:: classref-reftable-group @@ -54,6 +54,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_ascent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`font_get_char_from_glyph_index` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph_index **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_descent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_embolden` **(** :ref:`RID` font_rid **)** |const| | @@ -106,6 +108,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`font_get_opentype_feature_overrides` **(** :ref:`RID` font_rid **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`font_get_ot_name_strings` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_oversampling` **(** :ref:`RID` font_rid **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_scale` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | @@ -302,7 +306,7 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`shaped_text_draw_outline` **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l=-1, :ref:`float` clip_r=-1, :ref:`int` outline_size=1, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`shaped_text_fit_to_width` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` jst_flags=3 **)** | + | :ref:`float` | :ref:`shaped_text_fit_to_width` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` justification_flags=3 **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`shaped_text_get_ascent` **(** :ref:`RID` shaped **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -364,6 +368,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`shaped_text_get_word_breaks` **(** :ref:`RID` shaped, :ref:`GraphemeFlag` grapheme_flags=264 **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shaped_text_has_visible_chars` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`shaped_text_hit_test_grapheme` **(** :ref:`RID` shaped, :ref:`float` coords **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`shaped_text_hit_test_position` **(** :ref:`RID` shaped, :ref:`float` coords **)** |const| | @@ -642,6 +648,30 @@ Only apply justification to the part of the text after the last tab. Apply justification to the trimmed line with ellipsis. +.. _class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`JustificationFlag` **JUSTIFICATION_SKIP_LAST_LINE** = ``32`` + +Do not apply justification to the last line of the paragraph. + +.. _class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS: + +.. rst-class:: classref-enumeration-constant + +:ref:`JustificationFlag` **JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS** = ``64`` + +Do not apply justification to the last line of the paragraph with visible characters (takes precedence over :ref:`JUSTIFICATION_SKIP_LAST_LINE`). + +.. _class_TextServer_constant_JUSTIFICATION_DO_NOT_SKIP_SINGLE_LINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`JustificationFlag` **JUSTIFICATION_DO_NOT_SKIP_SINGLE_LINE** = ``128`` + +Always apply justification to the paragraphs with a single line (:ref:`JUSTIFICATION_SKIP_LAST_LINE` and :ref:`JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS` are ignored). + .. rst-class:: classref-item-separator ---- @@ -1006,6 +1036,14 @@ Grapheme is connected to the previous grapheme. Breaking line before this graphe It is safe to insert a U+0640 before this grapheme for elongation. +.. _class_TextServer_constant_GRAPHEME_IS_EMBEDDED_OBJECT: + +.. rst-class:: classref-enumeration-constant + +:ref:`GraphemeFlag` **GRAPHEME_IS_EMBEDDED_OBJECT** = ``4096`` + +Grapheme is an object replacement character for the embedded object. + .. rst-class:: classref-item-separator ---- @@ -1437,7 +1475,7 @@ Method Descriptions :ref:`RID` **create_font** **(** **)** -Creates new, empty font cache entry resource. To free the resulting resource, use :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 @@ -1579,6 +1617,18 @@ Returns the font ascent (number of pixels above the baseline). ---- +.. _class_TextServer_method_font_get_char_from_glyph_index: + +.. rst-class:: classref-method + +:ref:`int` **font_get_char_from_glyph_index** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph_index **)** |const| + +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 + +---- + .. _class_TextServer_method_font_get_descent: .. rst-class:: classref-method @@ -1701,7 +1751,7 @@ Returns outline contours of the glyph as a ``Dictionary`` with the following con :ref:`int` **font_get_glyph_index** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |const| -Returns the glyph index of a ``char``, optionally modified by the ``variation_selector``. +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 @@ -1903,6 +1953,18 @@ Returns font OpenType feature set override. ---- +.. _class_TextServer_method_font_get_ot_name_strings: + +.. rst-class:: classref-method + +:ref:`Dictionary` **font_get_ot_name_strings** **(** :ref:`RID` font_rid **)** |const| + +Returns :ref:`Dictionary` with OpenType font name strings (localized font names, version, description, license information, sample text, etc.). + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_font_get_oversampling: .. rst-class:: classref-method @@ -2929,7 +2991,7 @@ Returns ``true`` if locale is right-to-left. :ref:`bool` **is_valid_identifier** **(** :ref:`String` string **)** |const| -Returns ``true`` is ``string`` is a valid identifier. +Returns ``true`` if ``string`` is a valid identifier. If the text server supports the :ref:`FEATURE_UNICODE_IDENTIFIERS` feature, a valid identifier must: @@ -3127,9 +3189,9 @@ Draw the outline of the shaped text into a canvas item at a given position, with .. rst-class:: classref-method -:ref:`float` **shaped_text_fit_to_width** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` jst_flags=3 **)** +:ref:`float` **shaped_text_fit_to_width** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` justification_flags=3 **)** -Adjusts text with to fit to specified width, returns new text width. +Adjusts text width to fit to specified width, returns new text width. .. rst-class:: classref-item-separator @@ -3501,6 +3563,18 @@ Breaks text into words and returns array of character ranges. Use ``grapheme_fla ---- +.. _class_TextServer_method_shaped_text_has_visible_chars: + +.. rst-class:: classref-method + +:ref:`bool` **shaped_text_has_visible_chars** **(** :ref:`RID` shaped **)** |const| + +Returns ``true``, if text buffer contents any visible characters. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_shaped_text_hit_test_grapheme: .. rst-class:: classref-method diff --git a/classes/class_textserveradvanced.rst b/classes/class_textserveradvanced.rst index 3615e4bbdf4..476af3eabfc 100644 --- a/classes/class_textserveradvanced.rst +++ b/classes/class_textserveradvanced.rst @@ -12,7 +12,14 @@ TextServerAdvanced **Inherits:** :ref:`TextServerExtension` **<** :ref:`TextServer` **<** :ref:`RefCounted` **<** :ref:`Object` -Text Server using HarfBuzz, ICU and SIL Graphite to support BiDi, complex text layouts and contextual OpenType features. +An advanced text server with support for BiDi, complex text layout, and contextual OpenType features. Used in Godot by default. + +.. rst-class:: classref-introduction-group + +Description +----------- + +An implementation of :ref:`TextServer` that uses HarfBuzz, ICU and SIL Graphite to support BiDi, complex text layouts and contextual OpenType features. This is Godot's default primary :ref:`TextServer` interface. .. |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_textserverdummy.rst b/classes/class_textserverdummy.rst index b2f5fcb390e..9d5a9931528 100644 --- a/classes/class_textserverdummy.rst +++ b/classes/class_textserverdummy.rst @@ -12,9 +12,29 @@ TextServerDummy **Inherits:** :ref:`TextServerExtension` **<** :ref:`TextServer` **<** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +A dummy text server that can't render text or manage fonts. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +A dummy :ref:`TextServer` interface that doesn't do anything. Useful for freeing up memory when rendering text is not needed, as text servers are resource-intensive. It can also be used for performance comparisons in complex GUIs to check the impact of text rendering. + +A dummy text server is always available at the start of a project. Here's how to access it: + +:: + + var dummy_text_server = TextServerManager.find_interface("Dummy") + if dummy_text_server != null: + TextServerManager.set_primary_interface(dummy_text_server) + # If the other text servers are unneeded, they can be removed: + for i in TextServerManager.get_interface_count(): + var text_server = TextServerManager.get_interface(i) + if text_server != dummy_text_server: + TextServerManager.remove_interface(text_server) + +The command line argument ``--text-driver Dummy`` (case-sensitive) can be used to force the "Dummy" :ref:`TextServer` on any project. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_textserverextension.rst b/classes/class_textserverextension.rst index a7f0a026c25..1d68dc01d38 100644 --- a/classes/class_textserverextension.rst +++ b/classes/class_textserverextension.rst @@ -14,14 +14,14 @@ TextServerExtension **Inherited By:** :ref:`TextServerAdvanced`, :ref:`TextServerDummy`, :ref:`TextServerFallback` -Base class for TextServer custom implementations (plugins). +Base class for custom :ref:`TextServer` implementations (plugins). .. rst-class:: classref-introduction-group Description ----------- -External TextServer implementations should inherit from this class. +External :ref:`TextServer` implementations should inherit from this class. .. rst-class:: classref-reftable-group @@ -56,6 +56,8 @@ Methods +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_font_get_ascent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_char_from_glyph_index` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph_index **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_font_get_descent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_font_get_embolden` **(** :ref:`RID` font_rid **)** |virtual| |const| | @@ -108,6 +110,8 @@ Methods +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`_font_get_opentype_feature_overrides` **(** :ref:`RID` font_rid **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_font_get_ot_name_strings` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_font_get_oversampling` **(** :ref:`RID` font_rid **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_font_get_scale` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | @@ -306,7 +310,7 @@ Methods +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_shaped_text_draw_outline` **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l, :ref:`float` clip_r, :ref:`int` outline_size, :ref:`Color` color **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_shaped_text_fit_to_width` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` jst_flags **)** |virtual| | + | :ref:`float` | :ref:`_shaped_text_fit_to_width` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` justification_flags **)** |virtual| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_shaped_text_get_ascent` **(** :ref:`RID` shaped **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -598,6 +602,20 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI ---- +.. _class_TextServerExtension_method__font_get_char_from_glyph_index: + +.. rst-class:: classref-method + +:ref:`int` **_font_get_char_from_glyph_index** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph_index **)** |virtual| |const| + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServerExtension_method__font_get_descent: .. rst-class:: classref-method @@ -962,6 +980,20 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI ---- +.. _class_TextServerExtension_method__font_get_ot_name_strings: + +.. rst-class:: classref-method + +:ref:`Dictionary` **_font_get_ot_name_strings** **(** :ref:`RID` font_rid **)** |virtual| |const| + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServerExtension_method__font_get_oversampling: .. rst-class:: classref-method @@ -2352,7 +2384,7 @@ void **_shaped_text_draw_outline** **(** :ref:`RID` shaped, :ref:`RID .. rst-class:: classref-method -:ref:`float` **_shaped_text_fit_to_width** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` jst_flags **)** |virtual| +:ref:`float` **_shaped_text_fit_to_width** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` justification_flags **)** |virtual| .. container:: contribute diff --git a/classes/class_textserverfallback.rst b/classes/class_textserverfallback.rst index 4d6dc1cbea2..2e1c914b97c 100644 --- a/classes/class_textserverfallback.rst +++ b/classes/class_textserverfallback.rst @@ -12,7 +12,16 @@ TextServerFallback **Inherits:** :ref:`TextServerExtension` **<** :ref:`TextServer` **<** :ref:`RefCounted` **<** :ref:`Object` -Fallback implementation of the Text Server, without BiDi and complex text layout support. +A fallback implementation of Godot's text server, without support for BiDi and complex text layout. + +.. rst-class:: classref-introduction-group + +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``. .. |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_textservermanager.rst b/classes/class_textservermanager.rst index 378e1fd8638..65dcdc0c514 100644 --- a/classes/class_textservermanager.rst +++ b/classes/class_textservermanager.rst @@ -12,14 +12,14 @@ TextServerManager **Inherits:** :ref:`Object` -Manager for the font and complex text layout servers. +A singleton for managing :ref:`TextServer` implementations. .. rst-class:: classref-introduction-group Description ----------- -**TextServerManager** is the API backend for loading, enumeration and switching :ref:`TextServer`\ s. +**TextServerManager** is the API backend for loading, enumerating, and switching :ref:`TextServer`\ s. \ **Note:** Switching text server at runtime is possible, but will invalidate all fonts and text buffers. Make sure to unload all controls, fonts, and themes before doing so. @@ -93,7 +93,7 @@ Method Descriptions void **add_interface** **(** :ref:`TextServer` interface **)** -Registers an :ref:`TextServer` interface. +Registers a :ref:`TextServer` interface. .. rst-class:: classref-item-separator @@ -105,7 +105,7 @@ Registers an :ref:`TextServer` interface. :ref:`TextServer` **find_interface** **(** :ref:`String` name **)** |const| -Finds an interface by its name. +Finds an interface by its ``name``. .. rst-class:: classref-item-separator @@ -141,7 +141,7 @@ Returns the number of interfaces currently registered. :ref:`Dictionary[]` **get_interfaces** **(** **)** |const| -Returns a list of available interfaces the index and name of each interface. +Returns a list of available interfaces, with the index and name of each interface. .. rst-class:: classref-item-separator @@ -165,7 +165,7 @@ Returns the primary :ref:`TextServer` interface currently in u void **remove_interface** **(** :ref:`TextServer` interface **)** -Removes interface. All fonts and shaped text caches should be freed before removing interface. +Removes an interface. All fonts and shaped text caches should be freed before removing an interface. .. rst-class:: classref-item-separator diff --git a/classes/class_texture3d.rst b/classes/class_texture3d.rst index 5371f04ff14..508881bc162 100644 --- a/classes/class_texture3d.rst +++ b/classes/class_texture3d.rst @@ -12,7 +12,7 @@ Texture3D **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`CompressedTexture3D`, :ref:`ImageTexture3D`, :ref:`PlaceholderTexture3D` +**Inherited By:** :ref:`CompressedTexture3D`, :ref:`ImageTexture3D`, :ref:`NoiseTexture3D`, :ref:`PlaceholderTexture3D` Base class for 3-dimensionnal textures. diff --git a/classes/class_texturebutton.rst b/classes/class_texturebutton.rst index 465845e925f..2c07f18d937 100644 --- a/classes/class_texturebutton.rst +++ b/classes/class_texturebutton.rst @@ -289,7 +289,7 @@ Texture to display when the mouse hovers the node. - void **set_texture_normal** **(** :ref:`Texture2D` value **)** - :ref:`Texture2D` **get_texture_normal** **(** **)** -Texture to display by default, when the node is **not** in the disabled, focused, hover or pressed state. +Texture to display by default, when the node is **not** in the disabled, hover or pressed state. This texture is still displayed in the focused state, with :ref:`texture_focused` drawn on top. .. rst-class:: classref-item-separator diff --git a/classes/class_texturelayered.rst b/classes/class_texturelayered.rst index 4f0db755a3e..4ee057d8bb6 100644 --- a/classes/class_texturelayered.rst +++ b/classes/class_texturelayered.rst @@ -21,7 +21,7 @@ Base class for texture types which contain the data of multiple :ref:`Image`. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. See also :ref:`Texture3D`. +Base class for :ref:`ImageTextureLayered` and :ref:`CompressedTextureLayered`. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. See also :ref:`Texture3D`. Data is set on a per-layer basis. For :ref:`Texture2DArray`\ s, the layer specifies the array layer. @@ -135,7 +135,7 @@ Called when the **TextureLayered**'s format is queried. :ref:`int` **_get_height** **(** **)** |virtual| |const| -Called when the the **TextureLayered**'s height is queried. +Called when the **TextureLayered**'s height is queried. .. rst-class:: classref-item-separator diff --git a/classes/class_texturerect.rst b/classes/class_texturerect.rst index ae93fb0ed06..cd450e2b32e 100644 --- a/classes/class_texturerect.rst +++ b/classes/class_texturerect.rst @@ -12,14 +12,14 @@ TextureRect **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Control for drawing textures. +A control that displays a texture. .. rst-class:: classref-introduction-group Description ----------- -Used to draw icons and sprites in a user interface. The texture's placement can be controlled with the :ref:`stretch_mode` property. It can scale, tile, or stay centered inside its bounding rectangle. +A control that displays a texture, for example an icon inside a GUI. The texture's placement can be controlled with the :ref:`stretch_mode` property. It can scale, tile, or stay centered inside its bounding rectangle. .. rst-class:: classref-introduction-group diff --git a/classes/class_theme.rst b/classes/class_theme.rst index e67084ecf20..d142d12b41d 100644 --- a/classes/class_theme.rst +++ b/classes/class_theme.rst @@ -12,14 +12,14 @@ Theme **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Theme resource for styling/skinning :ref:`Control`\ s and :ref:`Window`\ s. +A resource used for styling/skinning :ref:`Control`\ s and :ref:`Window`\ s. .. rst-class:: classref-introduction-group Description ----------- -A theme resource is 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 between 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 resources assigned to a control node 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. @@ -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 icon 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. diff --git a/classes/class_themedb.rst b/classes/class_themedb.rst index 7bc3472eae1..552dfe02f69 100644 --- a/classes/class_themedb.rst +++ b/classes/class_themedb.rst @@ -12,14 +12,14 @@ ThemeDB **Inherits:** :ref:`Object` -An engine singleton providing access to static :ref:`Theme` information, such as default and project theme, and fallback values. +A singleton that provides access to static information about :ref:`Theme` resources used by the engine and by your project. .. rst-class:: classref-introduction-group Description ----------- -This engine singleton provides access to static information about :ref:`Theme` resources used by the engine and by your projects. You can fetch the default engine theme, as well as your project configured theme. +This singleton provides access to static information about :ref:`Theme` resources used by the engine and by your projects. You can fetch the default engine theme, as well as your project configured theme. \ **ThemeDB** also contains fallback values for theme properties. diff --git a/classes/class_thread.rst b/classes/class_thread.rst index da9c11b6c67..81ef3e7451d 100644 --- a/classes/class_thread.rst +++ b/classes/class_thread.rst @@ -23,6 +23,16 @@ A unit of execution in a process. Can run methods on :ref:`Object` \ **Note:** Breakpoints won't break on code if it's running in a thread. This is a current limitation of the GDScript debugger. +\ **Warning:**\ + +To ensure proper cleanup without crashes or deadlocks, when a **Thread**'s reference count reaches zero and it is therefore destroyed, the following conditions must be met: + +- It must not have any :ref:`Mutex` objects locked. + +- It must not be waiting on any :ref:`Semaphore` objects. + +- :ref:`wait_to_finish` should have been called on it. + .. rst-class:: classref-introduction-group Tutorials @@ -108,7 +118,7 @@ Method Descriptions :ref:`String` **get_id** **(** **)** |const| -Returns the current **Thread**'s ID, uniquely identifying it among all threads. If the **Thread** is not running 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 @@ -120,7 +130,7 @@ Returns the current **Thread**'s ID, uniquely identifying it among all threads. :ref:`bool` **is_alive** **(** **)** |const| -Returns ``true`` if this **Thread** is currently running. 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`. @@ -170,8 +180,6 @@ Should either be used when you want to retrieve the value returned from the meth To determine if this can be called without blocking the calling thread, check if :ref:`is_alive` is ``false``. -\ **Note:** After the **Thread** finishes joining it will be disposed. If you want to use it again you will have to create a new instance of it. - .. |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_tilemap.rst b/classes/class_tilemap.rst index 925b704a01b..098c354ff7e 100644 --- a/classes/class_tilemap.rst +++ b/classes/class_tilemap.rst @@ -95,6 +95,8 @@ Methods +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2i` | :ref:`get_coords_for_body_rid` **(** :ref:`RID` body **)** | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_layer_for_body_rid` **(** :ref:`RID` body **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`get_layer_modulate` **(** :ref:`int` layer **)** |const| | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_layer_name` **(** :ref:`int` layer **)** |const| | @@ -251,7 +253,7 @@ The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this If enabled, the TileMap will see its collisions synced to the physics tick and change its collision type from static to kinematic. This is required to create TileMap-based moving platform. -\ **Note:** Enabling ``collision_animatable`` may have a small performance impact, only do it if the TileMap is moving and has colliding tiles. +\ **Note:** Enabling :ref:`collision_animatable` may have a small performance impact, only do it if the TileMap is moving and has colliding tiles. .. rst-class:: classref-item-separator @@ -495,6 +497,18 @@ Returns the coordinates of the tile for given physics body RID. Such RID can be ---- +.. _class_TileMap_method_get_layer_for_body_rid: + +.. rst-class:: classref-method + +:ref:`int` **get_layer_for_body_rid** **(** :ref:`RID` body **)** + +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 + +---- + .. _class_TileMap_method_get_layer_modulate: .. rst-class:: classref-method @@ -763,7 +777,7 @@ Update all the cells in the ``cells`` coordinates array so that they use the giv If ``ignore_empty_terrains`` is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. -\ **Note:** To work correctly, ``set_cells_terrain_connect`` requires the TileMap's TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results. +\ **Note:** To work correctly, this method requires the TileMap's TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results. .. rst-class:: classref-item-separator @@ -779,7 +793,7 @@ Update all the cells in the ``path`` coordinates array so that they use the give If ``ignore_empty_terrains`` is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. -\ **Note:** To work correctly, ``set_cells_terrain_path`` requires the TileMap's TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results. +\ **Note:** To work correctly, this method requires the TileMap's TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results. .. rst-class:: classref-item-separator diff --git a/classes/class_tileset.rst b/classes/class_tileset.rst index bb41686c5a3..b71b886ffe7 100644 --- a/classes/class_tileset.rst +++ b/classes/class_tileset.rst @@ -27,7 +27,7 @@ Tiles are referenced by using three IDs: their source ID, their atlas coordinate A TileSet can be configured so that its tiles expose more or less properties. To do so, the TileSet resources uses property layers, that you can add or remove depending on your needs. -For example, adding a physics layer allows giving collision shapes to your tiles. Each layer having dedicated properties (physics layer an mask), you may add several TileSet physics layers for each type of collision you need. +For example, adding a physics layer allows giving collision shapes to your tiles. Each layer having dedicated properties (physics layer and mask), you may add several TileSet physics layers for each type of collision you need. See the functions to add new layers for more information. @@ -712,7 +712,7 @@ Physics layers allow assigning collision polygons to atlas tiles. Adds a :ref:`TileSetSource` to the TileSet. If ``atlas_source_id_override`` is not -1, also set its source ID. Otherwise, a unique identifier is automatically generated. -The function returns the added source source ID or -1 if the source could not be added. +The function returns the added source ID or -1 if the source could not be added. .. rst-class:: classref-item-separator @@ -860,7 +860,7 @@ Returns whether or not the specified navigation layer of the TileSet navigation :ref:`int` **get_navigation_layer_layers** **(** :ref:`int` layer_index **)** |const| -Returns the navigation layers (as in the Navigation server) of the gives TileSet navigation layer. +Returns the navigation layers (as in the Navigation server) of the given TileSet navigation layer. .. rst-class:: classref-item-separator @@ -1450,7 +1450,7 @@ Based on ``value``, enables or disables the specified navigation layer of the Ti void **set_navigation_layer_layers** **(** :ref:`int` layer_index, :ref:`int` layers **)** -Sets the navigation layers (as in the navigation server) for navigation regions is the given TileSet navigation layer. +Sets the navigation layers (as in the navigation server) for navigation regions in the given TileSet navigation layer. .. rst-class:: classref-item-separator @@ -1474,7 +1474,7 @@ Sets the occlusion layer (as in the rendering server) for occluders in the given void **set_occlusion_layer_sdf_collision** **(** :ref:`int` layer_index, :ref:`bool` sdf_collision **)** -Enables or disables sdf collision for occluders in the given TileSet occlusion layer. +Enables or disables SDF collision for occluders in the given TileSet occlusion layer. .. rst-class:: classref-item-separator @@ -1534,7 +1534,7 @@ Changes a source's ID. void **set_source_level_tile_proxy** **(** :ref:`int` source_from, :ref:`int` source_to **)** -Creates a source-level proxy for the given source ID. A proxy will map set of tile identifiers to another set of identifiers. Both the atlac coordinates ID and the alternative tile ID are kept the same when using source-level proxies. +Creates a source-level proxy for the given source ID. A proxy will map set of tile identifiers to another set of identifiers. Both the atlas coordinates ID and the alternative tile ID are kept the same when using source-level proxies. This can be used to replace a source in all TileMaps using this TileSet, as TileMap nodes will find and use the proxy's target source when one is available. diff --git a/classes/class_tilesetscenescollectionsource.rst b/classes/class_tilesetscenescollectionsource.rst index dc66578fa7c..f6c580e818d 100644 --- a/classes/class_tilesetscenescollectionsource.rst +++ b/classes/class_tilesetscenescollectionsource.rst @@ -180,7 +180,7 @@ Sets whether or not the scene tile with ``id`` should display a placeholder in t void **set_scene_tile_id** **(** :ref:`int` id, :ref:`int` new_id **)** -Changes a scene tile's ID from ``id`` to ``new_id``. This will fail if there is already a tile with a ID equal to ``new_id``. +Changes a scene tile's ID from ``id`` to ``new_id``. This will fail if there is already a tile with an ID equal to ``new_id``. .. rst-class:: classref-item-separator diff --git a/classes/class_time.rst b/classes/class_time.rst index 2119273df8e..9fc14a24988 100644 --- a/classes/class_time.rst +++ b/classes/class_time.rst @@ -12,7 +12,7 @@ Time **Inherits:** :ref:`Object` -Time singleton for working with time. +A singleton for working with time data. .. rst-class:: classref-introduction-group diff --git a/classes/class_timer.rst b/classes/class_timer.rst index eb6a3c0b061..e6a04015261 100644 --- a/classes/class_timer.rst +++ b/classes/class_timer.rst @@ -21,6 +21,8 @@ Description Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one-shot" mode. +\ **Note:** Timers are affected by :ref:`Engine.time_scale`, a higher scale means quicker timeouts, and vice versa. + \ **Note:** To create a one-shot timer without instantiating a node, use :ref:`SceneTree.create_timer`. .. rst-class:: classref-introduction-group @@ -226,7 +228,7 @@ The timer's remaining time in seconds. Returns 0 if the timer is inactive. The wait time in seconds. -\ **Note:** Timers can only emit once per rendered frame at most (or once per physics frame if :ref:`process_callback` is :ref:`TIMER_PROCESS_PHYSICS`). This means very low wait times (lower than 0.05 seconds) will behave in significantly different ways depending on the rendered framerate. For very low wait times, it is recommended to use a process loop in a script instead of using a Timer node. +\ **Note:** Timers can only emit once per rendered frame at most (or once per physics frame if :ref:`process_callback` is :ref:`TIMER_PROCESS_PHYSICS`). This means very low wait times (lower than 0.05 seconds) will behave in significantly different ways depending on the rendered framerate. For very low wait times, it is recommended to use a process loop in a script instead of using a Timer node. Timers are affected by :ref:`Engine.time_scale`, a higher scale means quicker timeouts, and vice versa. .. rst-class:: classref-section-separator diff --git a/classes/class_tlsoptions.rst b/classes/class_tlsoptions.rst index 7a48d4645df..383550bd518 100644 --- a/classes/class_tlsoptions.rst +++ b/classes/class_tlsoptions.rst @@ -35,7 +35,7 @@ Objects of this class cannot be instantiated directly, and one of the static met # Create a TLS server configuration. var server_certs = load("res://my_server_cas.crt") var server_key = load("res://my_server_key.key") - var server_tls_options = TLSOptions.server(server_certs, server_key) + var server_tls_options = TLSOptions.server(server_key, server_certs) diff --git a/classes/class_transform2d.rst b/classes/class_transform2d.rst index 7bcf08e599d..7fb58542d2e 100644 --- a/classes/class_transform2d.rst +++ b/classes/class_transform2d.rst @@ -10,14 +10,14 @@ Transform2D =========== -2D transformation (2×3 matrix). +A 2×3 matrix representing a 2D transformation. .. rst-class:: classref-introduction-group Description ----------- -2×3 matrix (2 rows, 3 columns) used for 2D linear transformations. It can represent transformations such as translation, rotation, or scaling. It consists of three :ref:`Vector2` values: :ref:`x`, :ref:`y`, and the :ref:`origin`. +A 2×3 matrix (2 rows, 3 columns) used for 2D linear transformations. It can represent transformations such as translation, rotation, and scaling. It consists of three :ref:`Vector2` values: :ref:`x`, :ref:`y`, and the :ref:`origin`. For more information, read the "Matrices and transforms" documentation article. @@ -85,6 +85,8 @@ Methods +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`basis_xform_inv` **(** :ref:`Vector2` v **)** |const| | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`determinant` **(** **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_origin` **(** **)** |const| | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_rotation` **(** **)** |const| | @@ -326,6 +328,20 @@ This method does not account for translation (the origin vector). ---- +.. _class_Transform2D_method_determinant: + +.. rst-class:: classref-method + +:ref:`float` **determinant** **(** **)** |const| + +Returns the determinant of the basis matrix. If the basis is uniformly scaled, then its determinant equals the square of the scale factor. + +A negative determinant means the basis was flipped, so one part of the scale is negative. A zero determinant means the basis isn't invertible, and is usually considered invalid. + +.. rst-class:: classref-item-separator + +---- + .. _class_Transform2D_method_get_origin: .. rst-class:: classref-method @@ -404,7 +420,7 @@ Returns the inverse of the transform, under the assumption that the transformati :ref:`bool` **is_equal_approx** **(** :ref:`Transform2D` xform **)** |const| -Returns ``true`` if this transform and ``transform`` are approximately equal, by calling ``is_equal_approx`` on each component. +Returns ``true`` if this transform and ``xform`` are approximately equal, by calling ``is_equal_approx`` on each component. .. rst-class:: classref-item-separator @@ -428,7 +444,7 @@ Returns ``true`` if this transform is finite, by calling :ref:`@GlobalScope.is_f :ref:`Transform2D` **looking_at** **(** :ref:`Vector2` target=Vector2(0, 0) **)** |const| -Returns a copy of the transform rotated such that it's rotation on the X-axis points towards the ``target`` position. +Returns a copy of the transform rotated such that the rotated X-axis points towards the ``target`` position. Operations take place in global space. @@ -456,9 +472,7 @@ Returns the transform with the basis orthogonal (90 degrees), and normalized axi Returns a copy of the transform rotated by the given ``angle`` (in radians). -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``. +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``. This can be seen as transforming with respect to the global/parent frame. @@ -474,9 +488,7 @@ This can be seen as transforming with respect to the global/parent frame. Returns a copy of the transform rotated by the given ``angle`` (in radians). -This method is an optimized version of multiplying the given transform ``X``\ - -with a corresponding rotation transform ``R`` from the right, i.e., ``X * R``. +This method is an optimized version of multiplying the given transform ``X`` with a corresponding rotation transform ``R`` from the right, i.e., ``X * R``. This can be seen as transforming with respect to the local frame. @@ -492,9 +504,7 @@ This can be seen as transforming with respect to the local frame. Returns a copy of the transform scaled by the given ``scale`` factor. -This method is an optimized version of multiplying the given transform ``X``\ - -with a corresponding scaling transform ``S`` from the left, i.e., ``S * X``. +This method is an optimized version of multiplying the given transform ``X`` with a corresponding scaling transform ``S`` from the left, i.e., ``S * X``. This can be seen as transforming with respect to the global/parent frame. @@ -510,9 +520,7 @@ This can be seen as transforming with respect to the global/parent frame. Returns a copy of the transform scaled by the given ``scale`` factor. -This method is an optimized version of multiplying the given transform ``X``\ - -with a corresponding scaling transform ``S`` from the right, i.e., ``X * S``. +This method is an optimized version of multiplying the given transform ``X`` with a corresponding scaling transform ``S`` from the right, i.e., ``X * S``. This can be seen as transforming with respect to the local frame. @@ -528,9 +536,7 @@ This can be seen as transforming with respect to the local frame. Returns a copy of the transform translated by the given ``offset``. -This method is an optimized version of multiplying the given transform ``X``\ - -with a corresponding translation transform ``T`` from the left, i.e., ``T * X``. +This method is an optimized version of multiplying the given transform ``X`` with a corresponding translation transform ``T`` from the left, i.e., ``T * X``. This can be seen as transforming with respect to the global/parent frame. @@ -546,9 +552,7 @@ This can be seen as transforming with respect to the global/parent frame. Returns a copy of the transform translated by the given ``offset``. -This method is an optimized version of multiplying the given transform ``X``\ - -with a corresponding translation transform ``T`` from the right, i.e., ``X * T``. +This method is an optimized version of multiplying the given transform ``X`` with a corresponding translation transform ``T`` from the right, i.e., ``X * T``. This can be seen as transforming with respect to the local frame. diff --git a/classes/class_transform3d.rst b/classes/class_transform3d.rst index b2f377d1be5..053b61d7b26 100644 --- a/classes/class_transform3d.rst +++ b/classes/class_transform3d.rst @@ -10,14 +10,14 @@ Transform3D =========== -3D transformation (3×4 matrix). +A 3×4 matrix representing a 3D transformation. .. rst-class:: classref-introduction-group Description ----------- -3×4 matrix (3 rows, 4 columns) used for 3D linear transformations. It can represent transformations such as translation, rotation, or scaling. It consists of a :ref:`basis` (first 3 columns) and a :ref:`Vector3` for the :ref:`origin` (last column). +A 3×4 matrix (3 rows, 4 columns) used for 3D linear transformations. It can represent transformations such as translation, rotation, and scaling. It consists of a :ref:`basis` (first 3 columns) and a :ref:`Vector3` for the :ref:`origin` (last column). For more information, read the "Matrices and transforms" documentation article. @@ -80,33 +80,33 @@ Methods .. table:: :widths: auto - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`affine_inverse` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`interpolate_with` **(** :ref:`Transform3D` xform, :ref:`float` weight **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`inverse` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Transform3D` xform **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_finite` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`looking_at` **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`orthonormalized` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`rotated` **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`rotated_local` **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`scaled` **(** :ref:`Vector3` scale **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`scaled_local` **(** :ref:`Vector3` scale **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`translated` **(** :ref:`Vector3` offset **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`translated_local` **(** :ref:`Vector3` offset **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`affine_inverse` **(** **)** |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`interpolate_with` **(** :ref:`Transform3D` xform, :ref:`float` weight **)** |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`inverse` **(** **)** |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Transform3D` xform **)** |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_finite` **(** **)** |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`looking_at` **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0), :ref:`bool` use_model_front=false **)** |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`orthonormalized` **(** **)** |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`rotated` **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`rotated_local` **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`scaled` **(** :ref:`Vector3` scale **)** |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`scaled_local` **(** :ref:`Vector3` scale **)** |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`translated` **(** :ref:`Vector3` offset **)** |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`translated_local` **(** :ref:`Vector3` offset **)** |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -314,7 +314,7 @@ Returns the inverse of the transform, under the assumption that the transformati :ref:`bool` **is_equal_approx** **(** :ref:`Transform3D` xform **)** |const| -Returns ``true`` if this transform and ``transform`` are approximately equal, by calling ``is_equal_approx`` on each component. +Returns ``true`` if this transform and ``xform`` are approximately equal, by calling ``is_equal_approx`` on each component. .. rst-class:: classref-item-separator @@ -336,12 +336,14 @@ Returns ``true`` if this transform is finite, by calling :ref:`@GlobalScope.is_f .. rst-class:: classref-method -:ref:`Transform3D` **looking_at** **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** |const| +:ref:`Transform3D` **looking_at** **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0), :ref:`bool` use_model_front=false **)** |const| Returns a copy of the transform rotated such that the forward axis (-Z) points towards the ``target`` position. The up axis (+Y) points as close to the ``up`` vector as possible while staying perpendicular to the forward axis. The resulting transform is orthonormalized. The existing rotation, scale, and skew information from the original transform is discarded. The ``target`` and ``up`` vectors cannot be zero, cannot be parallel to each other, and are defined in global/parent space. +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. By default, the -Z axis (camera forward) is treated as forward (implies +X is right). + .. rst-class:: classref-item-separator ---- @@ -368,9 +370,7 @@ Returns a copy of the transform rotated around the given ``axis`` by the given ` The ``axis`` must be a normalized vector. -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``. +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``. This can be seen as transforming with respect to the global/parent frame. @@ -388,9 +388,7 @@ Returns a copy of the transform rotated around the given ``axis`` by the given ` The ``axis`` must be a normalized vector. -This method is an optimized version of multiplying the given transform ``X``\ - -with a corresponding rotation transform ``R`` from the right, i.e., ``X * R``. +This method is an optimized version of multiplying the given transform ``X`` with a corresponding rotation transform ``R`` from the right, i.e., ``X * R``. This can be seen as transforming with respect to the local frame. @@ -406,9 +404,7 @@ This can be seen as transforming with respect to the local frame. Returns a copy of the transform scaled by the given ``scale`` factor. -This method is an optimized version of multiplying the given transform ``X``\ - -with a corresponding scaling transform ``S`` from the left, i.e., ``S * X``. +This method is an optimized version of multiplying the given transform ``X`` with a corresponding scaling transform ``S`` from the left, i.e., ``S * X``. This can be seen as transforming with respect to the global/parent frame. @@ -424,9 +420,7 @@ This can be seen as transforming with respect to the global/parent frame. Returns a copy of the transform scaled by the given ``scale`` factor. -This method is an optimized version of multiplying the given transform ``X``\ - -with a corresponding scaling transform ``S`` from the right, i.e., ``X * S``. +This method is an optimized version of multiplying the given transform ``X`` with a corresponding scaling transform ``S`` from the right, i.e., ``X * S``. This can be seen as transforming with respect to the local frame. @@ -442,9 +436,7 @@ This can be seen as transforming with respect to the local frame. Returns a copy of the transform translated by the given ``offset``. -This method is an optimized version of multiplying the given transform ``X``\ - -with a corresponding translation transform ``T`` from the left, i.e., ``T * X``. +This method is an optimized version of multiplying the given transform ``X`` with a corresponding translation transform ``T`` from the left, i.e., ``T * X``. This can be seen as transforming with respect to the global/parent frame. @@ -460,9 +452,7 @@ This can be seen as transforming with respect to the global/parent frame. Returns a copy of the transform translated by the given ``offset``. -This method is an optimized version of multiplying the given transform ``X``\ - -with a corresponding translation transform ``T`` from the right, i.e., ``X * T``. +This method is an optimized version of multiplying the given transform ``X`` with a corresponding translation transform ``T`` from the right, i.e., ``X * T``. This can be seen as transforming with respect to the local frame. diff --git a/classes/class_translation.rst b/classes/class_translation.rst index 88574cfee27..51ebb500bd8 100644 --- a/classes/class_translation.rst +++ b/classes/class_translation.rst @@ -14,14 +14,14 @@ Translation **Inherited By:** :ref:`OptimizedTranslation` -Language Translation. +A language translation that maps a collection of strings to their individual translations. .. rst-class:: classref-introduction-group Description ----------- -Translations are resources that can be loaded and unloaded on demand. They map a string to another string. +**Translation**\ s are resources that can be loaded and unloaded on demand. They map a collection of strings to their individual translations, and they also provide convenience methods for pluralization. .. rst-class:: classref-introduction-group diff --git a/classes/class_translationserver.rst b/classes/class_translationserver.rst index 6353bac2a72..e8532a9c7b0 100644 --- a/classes/class_translationserver.rst +++ b/classes/class_translationserver.rst @@ -12,14 +12,14 @@ TranslationServer **Inherits:** :ref:`Object` -Server that manages all translations. +The server responsible for language translations. .. rst-class:: classref-introduction-group Description ----------- -Server that manages all translations. Translations can be set to it and removed from it. +The server that manages all language translations. Translations can be added to or removed from it. .. rst-class:: classref-introduction-group @@ -155,7 +155,7 @@ Clears the server from all translations. :ref:`int` **compare_locales** **(** :ref:`String` locale_a, :ref:`String` locale_b **)** |const| -Compares two locales and return similarity score between ``0``\ (no match) and ``10``\ (full match). +Compares two locales and returns a similarity score between ``0`` (no match) and ``10`` (full match). .. rst-class:: classref-item-separator @@ -167,7 +167,7 @@ Compares two locales and return similarity score between ``0``\ (no match) and ` :ref:`PackedStringArray` **get_all_countries** **(** **)** |const| -Returns array of known country codes. +Returns an array of known country codes. .. rst-class:: classref-item-separator @@ -191,7 +191,7 @@ Returns array of known language codes. :ref:`PackedStringArray` **get_all_scripts** **(** **)** |const| -Returns array of known script codes. +Returns an array of known script codes. .. rst-class:: classref-item-separator @@ -203,7 +203,7 @@ Returns array of known script codes. :ref:`String` **get_country_name** **(** :ref:`String` country **)** |const| -Returns readable country name for the ``country`` code. +Returns a readable country name for the ``country`` code. .. rst-class:: classref-item-separator @@ -215,7 +215,7 @@ Returns readable country name for the ``country`` code. :ref:`String` **get_language_name** **(** :ref:`String` language **)** |const| -Returns readable language name for the ``language`` code. +Returns a readable language name for the ``language`` code. .. rst-class:: classref-item-separator @@ -265,7 +265,7 @@ Returns a locale's language and its variant (e.g. ``"en_US"`` would return ``"En :ref:`String` **get_script_name** **(** :ref:`String` script **)** |const| -Returns readable script name for the ``script`` code. +Returns a readable script name for the ``script`` code. .. rst-class:: classref-item-separator @@ -355,7 +355,7 @@ If translations have been loaded beforehand for the new locale, they will be app :ref:`String` **standardize_locale** **(** :ref:`String` locale **)** |const| -Returns ``locale`` string standardized to match known locales (e.g. ``en-US`` would be matched to ``en_US``). +Returns a ``locale`` string standardized to match known locales (e.g. ``en-US`` would be matched to ``en_US``). .. rst-class:: classref-item-separator @@ -379,7 +379,7 @@ Returns the current locale's translation for the given message (key) and context :ref:`StringName` **translate_plural** **(** :ref:`StringName` message, :ref:`StringName` plural_message, :ref:`int` n, :ref:`StringName` context="" **)** |const| -Returns the current locale's translation for the given message (key), plural_message and context. +Returns the current locale's translation for the given message (key), plural message and context. The number ``n`` is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language. diff --git a/classes/class_tree.rst b/classes/class_tree.rst index 87fecaee187..1f79ac935e7 100644 --- a/classes/class_tree.rst +++ b/classes/class_tree.rst @@ -12,16 +12,16 @@ Tree **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Control to show a tree of items. +A control used to show a set of internal :ref:`TreeItem`\ s in a hierarchical structure. .. rst-class:: classref-introduction-group Description ----------- -This shows a tree of items that can be selected, expanded and collapsed. The tree can have multiple columns with custom controls like text editing, buttons and popups. It can be useful for structured displays and interactions. +A control used to show a set of internal :ref:`TreeItem`\ s in a hierarchical structure. The tree items can be selected, expanded and collapsed. The tree can have multiple columns with custom controls like :ref:`LineEdit`\ s, buttons and popups. It can be useful for structured displays and interactions. -Trees are built via code, using :ref:`TreeItem` objects to create the structure. They have a single root but multiple roots can be simulated if a dummy hidden root is added. +Trees are built via code, using :ref:`TreeItem` objects to create the structure. They have a single root, but multiple roots can be simulated with :ref:`hide_root`: .. tabs:: @@ -69,6 +69,8 @@ Properties +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`allow_rmb_select` | ``false`` | +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`allow_search` | ``true`` | + +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`column_titles_visible` | ``false`` | @@ -100,77 +102,81 @@ Methods .. table:: :widths: auto - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear` **(** **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem` | :ref:`create_item` **(** :ref:`TreeItem` parent=null, :ref:`int` index=-1 **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`deselect_all` **(** **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`edit_selected` **(** **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`ensure_cursor_is_visible` **(** **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_button_id_at_position` **(** :ref:`Vector2` position **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_column_at_position` **(** :ref:`Vector2` position **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_column_expand_ratio` **(** :ref:`int` column **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_column_title` **(** :ref:`int` column **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TextDirection` | :ref:`get_column_title_direction` **(** :ref:`int` column **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_column_title_language` **(** :ref:`int` column **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_column_width` **(** :ref:`int` column **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2` | :ref:`get_custom_popup_rect` **(** **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_drop_section_at_position` **(** :ref:`Vector2` position **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem` | :ref:`get_edited` **(** **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_edited_column` **(** **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2` | :ref:`get_item_area_rect` **(** :ref:`TreeItem` item, :ref:`int` column=-1, :ref:`int` button_index=-1 **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem` | :ref:`get_item_at_position` **(** :ref:`Vector2` position **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem` | :ref:`get_next_selected` **(** :ref:`TreeItem` from **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_pressed_button` **(** **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem` | :ref:`get_root` **(** **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_scroll` **(** **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem` | :ref:`get_selected` **(** **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_selected_column` **(** **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_column_clipping_content` **(** :ref:`int` column **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_column_expanding` **(** :ref:`int` column **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scroll_to_item` **(** :ref:`TreeItem` item, :ref:`bool` center_on_item=false **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_column_clip_content` **(** :ref:`int` column, :ref:`bool` enable **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_column_custom_minimum_width` **(** :ref:`int` column, :ref:`int` min_width **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_column_expand` **(** :ref:`int` column, :ref:`bool` expand **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_column_expand_ratio` **(** :ref:`int` column, :ref:`int` ratio **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_column_title` **(** :ref:`int` column, :ref:`String` title **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_column_title_direction` **(** :ref:`int` column, :ref:`TextDirection` direction **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_column_title_language` **(** :ref:`int` column, :ref:`String` language **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_selected` **(** :ref:`TreeItem` item, :ref:`int` column **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`create_item` **(** :ref:`TreeItem` parent=null, :ref:`int` index=-1 **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`deselect_all` **(** **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`edit_selected` **(** :ref:`bool` force_edit=false **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`ensure_cursor_is_visible` **(** **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_button_id_at_position` **(** :ref:`Vector2` position **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_column_at_position` **(** :ref:`Vector2` position **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_column_expand_ratio` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_column_title` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`HorizontalAlignment` | :ref:`get_column_title_alignment` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextDirection` | :ref:`get_column_title_direction` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_column_title_language` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_column_width` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_custom_popup_rect` **(** **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_drop_section_at_position` **(** :ref:`Vector2` position **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_edited` **(** **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_edited_column` **(** **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_item_area_rect` **(** :ref:`TreeItem` item, :ref:`int` column=-1, :ref:`int` button_index=-1 **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_item_at_position` **(** :ref:`Vector2` position **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_next_selected` **(** :ref:`TreeItem` from **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_pressed_button` **(** **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_root` **(** **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_scroll` **(** **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_selected` **(** **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selected_column` **(** **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_column_clipping_content` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_column_expanding` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scroll_to_item` **(** :ref:`TreeItem` item, :ref:`bool` center_on_item=false **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_clip_content` **(** :ref:`int` column, :ref:`bool` enable **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_custom_minimum_width` **(** :ref:`int` column, :ref:`int` min_width **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_expand` **(** :ref:`int` column, :ref:`bool` expand **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_expand_ratio` **(** :ref:`int` column, :ref:`int` ratio **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_title` **(** :ref:`int` column, :ref:`String` title **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_title_alignment` **(** :ref:`int` column, :ref:`HorizontalAlignment` title_alignment **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_title_direction` **(** :ref:`int` column, :ref:`TextDirection` direction **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_title_language` **(** :ref:`int` column, :ref:`String` language **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_selected` **(** :ref:`TreeItem` item, :ref:`int` column **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -211,6 +217,8 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`h_separation` | ``4`` | +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`icon_max_width` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`item_margin` | ``16`` | +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | @@ -225,6 +233,18 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`scroll_speed` | ``12`` | +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`scrollbar_h_separation` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`scrollbar_margin_bottom` | ``-1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`scrollbar_margin_left` | ``-1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`scrollbar_margin_right` | ``-1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`scrollbar_margin_top` | ``-1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`scrollbar_v_separation` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`v_separation` | ``4`` | +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Font` | :ref:`font` | | @@ -589,6 +609,23 @@ If ``true``, a right mouse button click can select items. ---- +.. _class_Tree_property_allow_search: + +.. rst-class:: classref-property + +:ref:`bool` **allow_search** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_allow_search** **(** :ref:`bool` value **)** +- :ref:`bool` **get_allow_search** **(** **)** + +If ``true``, allows navigating the **Tree** with letter keys through incremental search. + +.. rst-class:: classref-item-separator + +---- + .. _class_Tree_property_column_titles_visible: .. rst-class:: classref-property @@ -793,9 +830,13 @@ Deselects all tree items (rows and columns). In :ref:`SELECT_MULTI` **edit_selected** **(** **)** +:ref:`bool` **edit_selected** **(** :ref:`bool` force_edit=false **)** -Edits the selected tree item as if it was clicked. The item must be set editable with :ref:`TreeItem.set_editable`. Returns ``true`` if the item could be edited. Fails if no item is selected. +Edits the selected tree item as if it was clicked. + +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. .. rst-class:: classref-item-separator @@ -865,6 +906,18 @@ Returns the column's title. ---- +.. _class_Tree_method_get_column_title_alignment: + +.. rst-class:: classref-method + +:ref:`HorizontalAlignment` **get_column_title_alignment** **(** :ref:`int` column **)** |const| + +Returns the column title alignment. + +.. rst-class:: classref-item-separator + +---- + .. _class_Tree_method_get_column_title_direction: .. rst-class:: classref-method @@ -1180,6 +1233,18 @@ Sets the title of a column. ---- +.. _class_Tree_method_set_column_title_alignment: + +.. rst-class:: classref-method + +void **set_column_title_alignment** **(** :ref:`int` column, :ref:`HorizontalAlignment` title_alignment **)** + +Sets the column title alignment. Note that :ref:`@GlobalScope.HORIZONTAL_ALIGNMENT_FILL` is not supported for column titles. + +.. rst-class:: classref-item-separator + +---- + .. _class_Tree_method_set_column_title_direction: .. rst-class:: classref-method @@ -1401,6 +1466,18 @@ The horizontal space between item cells. This is also used as the margin at the ---- +.. _class_Tree_theme_constant_icon_max_width: + +.. rst-class:: classref-themeproperty + +:ref:`int` **icon_max_width** = ``0`` + +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 + +---- + .. _class_Tree_theme_constant_item_margin: .. rst-class:: classref-themeproperty @@ -1487,6 +1564,78 @@ The speed of border scrolling. ---- +.. _class_Tree_theme_constant_scrollbar_h_separation: + +.. rst-class:: classref-themeproperty + +:ref:`int` **scrollbar_h_separation** = ``4`` + +The horizontal separation of tree content and scrollbar. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Tree_theme_constant_scrollbar_margin_bottom: + +.. rst-class:: classref-themeproperty + +:ref:`int` **scrollbar_margin_bottom** = ``-1`` + +The bottom margin of the scrollbars. When negative, uses :ref:`panel` bottom margin. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Tree_theme_constant_scrollbar_margin_left: + +.. rst-class:: classref-themeproperty + +:ref:`int` **scrollbar_margin_left** = ``-1`` + +The left margin of the horizontal scrollbar. When negative, uses :ref:`panel` left margin. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Tree_theme_constant_scrollbar_margin_right: + +.. rst-class:: classref-themeproperty + +:ref:`int` **scrollbar_margin_right** = ``-1`` + +The right margin of the scrollbars. When negative, uses :ref:`panel` right margin. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Tree_theme_constant_scrollbar_margin_top: + +.. rst-class:: classref-themeproperty + +:ref:`int` **scrollbar_margin_top** = ``-1`` + +The right margin of the vertical scrollbar. When negative, uses :ref:`panel` top margin. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Tree_theme_constant_scrollbar_v_separation: + +.. rst-class:: classref-themeproperty + +:ref:`int` **scrollbar_v_separation** = ``4`` + +The vertical separation of tree content and scrollbar. + +.. rst-class:: classref-item-separator + +---- + .. _class_Tree_theme_constant_v_separation: .. rst-class:: classref-themeproperty diff --git a/classes/class_treeitem.rst b/classes/class_treeitem.rst index 70745b6752b..7238c305413 100644 --- a/classes/class_treeitem.rst +++ b/classes/class_treeitem.rst @@ -12,16 +12,18 @@ TreeItem **Inherits:** :ref:`Object` -Control for a single item inside a :ref:`Tree`. +An internal control for a single item inside :ref:`Tree`. .. rst-class:: classref-introduction-group Description ----------- -Control for a single item inside a :ref:`Tree`. May have child **TreeItem**\ s and be styled as well as contain buttons. +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`. -You can remove a **TreeItem** by using :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``. .. rst-class:: classref-reftable-group @@ -52,6 +54,8 @@ Methods +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_button` **(** :ref:`int` column, :ref:`Texture2D` button, :ref:`int` id=-1, :ref:`bool` disabled=false, :ref:`String` tooltip_text="" **)** | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_child` **(** :ref:`TreeItem` child **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`call_recursive` **(** :ref:`StringName` method, ... **)** |vararg| | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear_custom_bg_color` **(** :ref:`int` column **)** | @@ -64,6 +68,8 @@ Methods +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`erase_button` **(** :ref:`int` column, :ref:`int` button_index **)** | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AutowrapMode` | :ref:`get_autowrap_mode` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture2D` | :ref:`get_button` **(** :ref:`int` column, :ref:`int` button_index **)** |const| | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_button_by_id` **(** :ref:`int` column, :ref:`int` id **)** |const| | @@ -110,12 +116,16 @@ Methods +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`TreeItem` | :ref:`get_next` **(** **)** |const| | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_next_in_tree` **(** :ref:`bool` wrap=false **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`TreeItem` | :ref:`get_next_visible` **(** :ref:`bool` wrap=false **)** | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`TreeItem` | :ref:`get_parent` **(** **)** |const| | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`TreeItem` | :ref:`get_prev` **(** **)** | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_prev_in_tree` **(** :ref:`bool` wrap=false **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`TreeItem` | :ref:`get_prev_visible` **(** :ref:`bool` wrap=false **)** | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_range` **(** :ref:`int` column **)** |const| | @@ -146,6 +156,8 @@ Methods +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_custom_set_as_button` **(** :ref:`int` column **)** |const| | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_edit_multiline` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_editable` **(** :ref:`int` column **)** | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_indeterminate` **(** :ref:`int` column **)** |const| | @@ -164,6 +176,8 @@ Methods +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`select` **(** :ref:`int` column **)** | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_autowrap_mode` **(** :ref:`int` column, :ref:`AutowrapMode` autowrap_mode **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_button` **(** :ref:`int` column, :ref:`int` button_index, :ref:`Texture2D` button **)** | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_button_color` **(** :ref:`int` column, :ref:`int` button_index, :ref:`Color` color **)** | @@ -188,6 +202,8 @@ Methods +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_custom_font_size` **(** :ref:`int` column, :ref:`int` font_size **)** | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_edit_multiline` **(** :ref:`int` column, :ref:`bool` multiline **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_editable` **(** :ref:`int` column, :ref:`bool` enabled **)** | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_expand_right` **(** :ref:`int` column, :ref:`bool` enable **)** | @@ -380,6 +396,18 @@ Adds a button with :ref:`Texture2D` ``button`` at column ``colu ---- +.. _class_TreeItem_method_add_child: + +.. rst-class:: classref-method + +void **add_child** **(** :ref:`TreeItem` 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 + +---- + .. _class_TreeItem_method_call_recursive: .. rst-class:: classref-method @@ -454,6 +482,18 @@ Removes the button at index ``button_index`` in column ``column``. ---- +.. _class_TreeItem_method_get_autowrap_mode: + +.. rst-class:: classref-method + +:ref:`AutowrapMode` **get_autowrap_mode** **(** :ref:`int` column **)** |const| + +Returns the text autowrap mode in the given ``column``. By default it is :ref:`TextServer.AUTOWRAP_OFF`. + +.. rst-class:: classref-item-separator + +---- + .. _class_TreeItem_method_get_button: .. rst-class:: classref-method @@ -654,7 +694,7 @@ Returns the given column's icon :ref:`Texture2D`. Error if no i :ref:`int` **get_icon_max_width** **(** :ref:`int` column **)** |const| -Returns the column's icon's maximum width. +Returns the maximum allowed width of the icon in the given ``column``. .. rst-class:: classref-item-separator @@ -732,13 +772,27 @@ Returns the next sibling TreeItem in the tree or a null object if there is none. ---- +.. _class_TreeItem_method_get_next_in_tree: + +.. rst-class:: classref-method + +:ref:`TreeItem` **get_next_in_tree** **(** :ref:`bool` wrap=false **)** + +Returns the next TreeItem in the tree (in the context of a depth-first search) or a ``null`` object if there is none. + +If ``wrap`` is enabled, the method will wrap around to the first element in the tree when called on the last element, otherwise it returns ``null``. + +.. rst-class:: classref-item-separator + +---- + .. _class_TreeItem_method_get_next_visible: .. rst-class:: classref-method :ref:`TreeItem` **get_next_visible** **(** :ref:`bool` wrap=false **)** -Returns the next visible sibling TreeItem in the tree or a null object if there is none. +Returns the next visible TreeItem in the tree (in the context of a depth-first search) or a ``null`` object if there is none. If ``wrap`` is enabled, the method will wrap around to the first visible element in the tree when called on the last visible element, otherwise it returns ``null``. @@ -770,13 +824,27 @@ Returns the previous sibling TreeItem in the tree or a null object if there is n ---- +.. _class_TreeItem_method_get_prev_in_tree: + +.. rst-class:: classref-method + +:ref:`TreeItem` **get_prev_in_tree** **(** :ref:`bool` wrap=false **)** + +Returns the previous TreeItem in the tree (in the context of a depth-first search) or a ``null`` object if there is none. + +If ``wrap`` is enabled, the method will wrap around to the last element in the tree when called on the first visible element, otherwise it returns ``null``. + +.. rst-class:: classref-item-separator + +---- + .. _class_TreeItem_method_get_prev_visible: .. rst-class:: classref-method :ref:`TreeItem` **get_prev_visible** **(** :ref:`bool` wrap=false **)** -Returns the previous visible sibling TreeItem in the tree or a null object if there is none. +Returns the previous visible sibling TreeItem in the tree (in the context of a depth-first search) or a ``null`` object if there is none. If ``wrap`` is enabled, the method will wrap around to the last visible element in the tree when called on the first visible element, otherwise it returns ``null``. @@ -960,6 +1028,18 @@ Returns ``true`` if the given ``column`` is checked. ---- +.. _class_TreeItem_method_is_edit_multiline: + +.. rst-class:: classref-method + +:ref:`bool` **is_edit_multiline** **(** :ref:`int` column **)** |const| + +Returns ``true`` if the given ``column`` is multiline editable. + +.. rst-class:: classref-item-separator + +---- + .. _class_TreeItem_method_is_editable: .. rst-class:: classref-method @@ -1054,7 +1134,9 @@ Propagates this item's checked status to its children and parents for the given void **remove_child** **(** :ref:`TreeItem` child **)** -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. 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`. .. rst-class:: classref-item-separator @@ -1072,6 +1154,18 @@ Selects the given ``column``. ---- +.. _class_TreeItem_method_set_autowrap_mode: + +.. rst-class:: classref-method + +void **set_autowrap_mode** **(** :ref:`int` column, :ref:`AutowrapMode` autowrap_mode **)** + +Sets the autowrap mode in the given ``column``. If set to something other than :ref:`TextServer.AUTOWRAP_OFF`, the text gets wrapped inside the cell's bounding rectangle. + +.. rst-class:: classref-item-separator + +---- + .. _class_TreeItem_method_set_button: .. rst-class:: classref-method @@ -1126,7 +1220,7 @@ Sets the given column's cell mode to ``mode``. See :ref:`TreeCellMode` column, :ref:`bool` checked **)** -If ``true``, the given ``column`` is checked. Clears column's indeterminate status. +If ``checked`` is ``true``, the given ``column`` is checked. Clears column's indeterminate status. .. rst-class:: classref-item-separator @@ -1220,13 +1314,27 @@ Sets custom font size used to draw text in the given ``column``. ---- +.. _class_TreeItem_method_set_edit_multiline: + +.. rst-class:: classref-method + +void **set_edit_multiline** **(** :ref:`int` column, :ref:`bool` multiline **)** + +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. + +.. rst-class:: classref-item-separator + +---- + .. _class_TreeItem_method_set_editable: .. rst-class:: classref-method void **set_editable** **(** :ref:`int` column, :ref:`bool` enabled **)** -If ``true``, the given ``column`` is editable. +If ``enabled`` is ``true``, the given ``column`` is editable. .. rst-class:: classref-item-separator @@ -1238,7 +1346,7 @@ If ``true``, the given ``column`` is editable. void **set_expand_right** **(** :ref:`int` column, :ref:`bool` enable **)** -If ``true``, the given ``column`` is expanded to the right. +If ``enable`` is ``true``, the given ``column`` is expanded to the right. .. rst-class:: classref-item-separator @@ -1262,7 +1370,7 @@ Sets the given column's icon :ref:`Texture2D`. void **set_icon_max_width** **(** :ref:`int` column, :ref:`int` width **)** -Sets the given column's icon's maximum width. +Sets the maximum allowed width of the icon in the given ``column``. This limit is applied on top of the default size of the icon and on top of :ref:`Tree.icon_max_width`. The height is adjusted according to the icon's ratio. .. rst-class:: classref-item-separator @@ -1298,7 +1406,7 @@ Sets the given column's icon's texture region. void **set_indeterminate** **(** :ref:`int` column, :ref:`bool` indeterminate **)** -If ``true``, the given ``column`` is marked ``indeterminate``. +If ``indeterminate`` is ``true``, the given ``column`` is marked indeterminate. \ **Note:** If set ``true`` from ``false``, then column is cleared of checked status. @@ -1362,7 +1470,7 @@ If ``expr`` is ``true``, the edit mode slider will use an exponential scale as w void **set_selectable** **(** :ref:`int` column, :ref:`bool` selectable **)** -If ``true``, the given column is selectable. +If ``selectable`` is ``true``, the given ``column`` is selectable. .. rst-class:: classref-item-separator diff --git a/classes/class_tubetrailmesh.rst b/classes/class_tubetrailmesh.rst index 89d0d65c151..6a5f056c960 100644 --- a/classes/class_tubetrailmesh.rst +++ b/classes/class_tubetrailmesh.rst @@ -12,9 +12,25 @@ TubeTrailMesh **Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Represents a straight tube-shaped :ref:`PrimitiveMesh` with variable width. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +**TubeTrailMesh** represents a straight tube-shaped mesh with variable width. The tube is composed of a number of cylindrical sections, each with the same :ref:`section_length` and number of :ref:`section_rings`. A :ref:`curve` is sampled along the total length of the tube, meaning that the curve determines the radius of the tube along its length. + +This primitive mesh is usually used for particle trails. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`3D Particle trails <../tutorials/3d/particles/trails>` + +- :doc:`Particle systems (3D) <../tutorials/3d/particles/index>` .. rst-class:: classref-reftable-group @@ -96,9 +112,7 @@ If ``true``, generates a cap at the top of the tube. This can be set to ``false` - void **set_curve** **(** :ref:`Curve` value **)** - :ref:`Curve` **get_curve** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Determines the radius of the tube along its length. The radius of a particular section ring is obtained by multiplying the baseline :ref:`radius` by the value of this curve at the given distance. For values smaller than ``0``, the faces will be inverted. .. rst-class:: classref-item-separator @@ -115,9 +129,7 @@ If ``true``, generates a cap at the top of the tube. This can be set to ``false` - void **set_radial_steps** **(** :ref:`int` value **)** - :ref:`int` **get_radial_steps** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The number of sides on the tube. For example, a value of ``5`` means the tube will be pentagonal. Higher values result in a more detailed tube at the cost of performance. .. rst-class:: classref-item-separator @@ -134,9 +146,7 @@ If ``true``, generates a cap at the top of the tube. This can be set to ``false` - void **set_radius** **(** :ref:`float` value **)** - :ref:`float` **get_radius** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The baseline radius of the tube. The radius of a particular section ring is obtained by multiplying this radius by the value of the :ref:`curve` at the given distance. .. rst-class:: classref-item-separator @@ -153,9 +163,7 @@ If ``true``, generates a cap at the top of the tube. This can be set to ``false` - void **set_section_length** **(** :ref:`float` value **)** - :ref:`float` **get_section_length** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The length of a section of the tube. .. rst-class:: classref-item-separator @@ -172,9 +180,7 @@ If ``true``, generates a cap at the top of the tube. This can be set to ``false` - void **set_section_rings** **(** :ref:`int` value **)** - :ref:`int` **get_section_rings** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The number of rings in a section. The :ref:`curve` is sampled on each ring to determine its radius. Higher values result in a more detailed tube at the cost of performance. .. rst-class:: classref-item-separator @@ -191,9 +197,7 @@ If ``true``, generates a cap at the top of the tube. This can be set to ``false` - void **set_sections** **(** :ref:`int` value **)** - :ref:`int` **get_sections** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The total number of sections on the tube. .. |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_tween.rst b/classes/class_tween.rst index cc7d2259b0c..716f1850715 100644 --- a/classes/class_tween.rst +++ b/classes/class_tween.rst @@ -141,9 +141,9 @@ Some :ref:`Tweener`\ s use transitions and eases. The first accep \ `Tween easing and transition types cheatsheet `__\ -\ **Note:** All **Tween**\ s will automatically start by default. To prevent a **Tween** from autostarting, you can call :ref:`stop` immediately after it is created. +\ **Note:** Tweens are not designed to be re-used 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:** **Tween**\ s are processing after all of nodes in the current frame, i.e. after :ref:`Node._process` or :ref:`Node._physics_process` (depending on :ref:`TweenProcessMode`). +\ **Note:** Tweens are processing after all of nodes in the current frame, i.e. after :ref:`Node._process` or :ref:`Node._physics_process` (depending on :ref:`TweenProcessMode`). .. rst-class:: classref-reftable-group @@ -160,6 +160,8 @@ Methods +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`custom_step` **(** :ref:`float` delta **)** | +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_loops_left` **(** **)** |const| | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_total_elapsed_time` **(** **)** |const| | +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`interpolate_value` **(** :ref:`Variant` initial_value, :ref:`Variant` delta_value, :ref:`float` elapsed_time, :ref:`float` duration, :ref:`TransitionType` trans_type, :ref:`EaseType` ease_type **)** |static| | @@ -218,8 +220,6 @@ Signals Emitted when the **Tween** has finished all tweening. Never emitted when the **Tween** is set to infinite looping (see :ref:`set_loops`). -\ **Note:** The **Tween** is removed (invalidated) in the next processing frame after this signal is emitted. Calling :ref:`stop` inside the signal callback will prevent the **Tween** from being removed. - .. rst-class:: classref-item-separator ---- @@ -407,6 +407,14 @@ The animation is interpolated by bouncing at the end. The animation is interpolated backing out at ends. +.. _class_Tween_constant_TRANS_SPRING: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransitionType` **TRANS_SPRING** = ``11`` + +The animation is interpolated like a spring towards the end. + .. rst-class:: classref-item-separator ---- @@ -513,7 +521,17 @@ Processes the **Tween** by the given ``delta`` value, in seconds. This is mostly Returns ``true`` if the **Tween** still has :ref:`Tweener`\ s that haven't finished. -\ **Note:** The **Tween** will become invalid in the next processing frame after its animation finishes. Calling :ref:`stop` after performing :ref:`custom_step` instead keeps and resets the **Tween**. +.. rst-class:: classref-item-separator + +---- + +.. _class_Tween_method_get_loops_left: + +.. rst-class:: classref-method + +:ref:`int` **get_loops_left** **(** **)** |const| + +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 diff --git a/classes/class_udpserver.rst b/classes/class_udpserver.rst index 17eadf9f752..459cf35bbba 100644 --- a/classes/class_udpserver.rst +++ b/classes/class_udpserver.rst @@ -43,7 +43,7 @@ Below a small example of how it can be used: func _process(delta): server.poll() # Important! if server.is_connection_available(): - var peer : PacketPeerUDP = server.take_connection() + var peer: PacketPeerUDP = server.take_connection() var packet = peer.get_packet() print("Accepted peer: %s:%s" % [peer.get_packet_ip(), peer.get_packet_port()]) print("Received data: %s" % [packet.get_string_from_utf8()]) @@ -112,7 +112,7 @@ Below a small example of how it can be used: func _process(delta): if !connected: # Try to contact server - udp.put_packet("The answer is... 42!".to_utf8()) + udp.put_packet("The answer is... 42!".to_utf8_buffer()) if udp.get_available_packet_count() > 0: print("Connected: %s" % udp.get_packet().get_string_from_utf8()) connected = true @@ -137,7 +137,7 @@ Below a small example of how it can be used: if (!_connected) { // Try to contact server - _udp.PutPacket("The Answer Is..42!".ToUtf8()); + _udp.PutPacket("The Answer Is..42!".ToUtf8Buffer()); } if (_udp.GetAvailablePacketCount() > 0) { diff --git a/classes/class_undoredo.rst b/classes/class_undoredo.rst index e9e64bad8ee..183fb2c6d47 100644 --- a/classes/class_undoredo.rst +++ b/classes/class_undoredo.rst @@ -12,25 +12,25 @@ UndoRedo **Inherits:** :ref:`Object` -Helper to manage undo/redo operations in the editor or custom tools. +Provides a high-level interface for implementing undo and redo operations. .. rst-class:: classref-introduction-group Description ----------- -Helper to manage undo/redo operations in the editor or custom tools. It works by registering methods and property changes inside "actions". +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. -Common behavior is to create an action, then add do/undo calls to functions or property changes, then committing 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. -Here's an example on how to add an action to the Godot editor's own **UndoRedo**, from a plugin: +Here's an example on how to add an action: .. tabs:: .. code-tab:: gdscript - var undo_redo = get_undo_redo() # Method of EditorPlugin. + var undo_redo = UndoRedo.new() func do_something(): pass # Put your code here. @@ -41,8 +41,8 @@ Here's an example on how to add an action to the Godot editor's own **UndoRedo** func _on_my_button_pressed(): var node = get_node("MyNode2D") undo_redo.create_action("Move the node") - undo_redo.add_do_method(self, "do_something") - undo_redo.add_undo_method(self, "undo_something") + undo_redo.add_do_method(do_something) + undo_redo.add_undo_method(undo_something) undo_redo.add_do_property(node, "position", Vector2(100,100)) undo_redo.add_undo_property(node, "position", node.position) undo_redo.commit_action() @@ -53,7 +53,7 @@ Here's an example on how to add an action to the Godot editor's own **UndoRedo** public override void _Ready() { - _undoRedo = GetUndoRedo(); // Method of EditorPlugin. + _undoRedo = new UndoRedo(); } public void DoSomething() @@ -81,7 +81,9 @@ Here's an example on how to add an action to the Godot editor's own **UndoRedo** \ :ref:`create_action`, :ref:`add_do_method`, :ref:`add_undo_method`, :ref:`add_do_property`, :ref:`add_undo_property`, and :ref:`commit_action` should be called one after the other, like in the example. Not doing so could lead to crashes. -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 in the order they should run. + +If you are making an :ref:`EditorPlugin` and want to integrate into the editor's undo history, use :ref:`EditorUndoRedoManager` instead. .. rst-class:: classref-reftable-group @@ -232,6 +234,15 @@ void **add_do_reference** **(** :ref:`Object` object **)** Register a reference for "do" that will be erased if the "do" history is lost. This is useful mostly for new nodes created for the "do" call. Do not use for resources. +:: + + var node = Node2D.new() + undo_redo.create_action("Add node") + undo_redo.add_do_method(add_child.bind(node)) + undo_redo.add_do_reference(node) + undo_redo.add_undo_method(remove_child.bind(node)) + undo_redo.commit_action() + .. rst-class:: classref-item-separator ---- @@ -268,6 +279,15 @@ void **add_undo_reference** **(** :ref:`Object` object **)** Register a reference for "undo" that will be erased if the "undo" history is lost. This is useful mostly for nodes removed with the "do" call (not the "undo" call!). +:: + + var node = $Node2D + undo_redo.create_action("Remove node") + undo_redo.add_do_method(remove_child.bind(node)) + undo_redo.add_undo_method(add_child.bind(node)) + undo_redo.add_undo_reference(node) + undo_redo.commit_action() + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_upnp.rst b/classes/class_upnp.rst index 3ad092e4ea3..16b9a031023 100644 --- a/classes/class_upnp.rst +++ b/classes/class_upnp.rst @@ -463,11 +463,11 @@ Adds the given :ref:`UPNPDevice` to the list of discovered dev :ref:`int` **add_port_mapping** **(** :ref:`int` port, :ref:`int` port_internal=0, :ref:`String` desc="", :ref:`String` proto="UDP", :ref:`int` duration=0 **)** |const| -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 ``internal_port`` 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. -If ``internal_port`` is ``0`` (the default), the same port number is used for both the external and the internal port (the ``port`` value). +If ``port_internal`` is ``0`` (the default), the same port number is used for both the external and the internal port (the ``port`` value). The description (``desc``) is shown in some routers management UIs and can be used to point out which application added the mapping. diff --git a/classes/class_variant.rst b/classes/class_variant.rst index c0ee3f24ec2..368331eb9c8 100644 --- a/classes/class_variant.rst +++ b/classes/class_variant.rst @@ -38,7 +38,7 @@ In computer programming, a Variant class is a class that is designed to store a var boo = "Boo is a string!"; var ref = new RefCounted(); // var is especially useful when used together with a constructor. - // Godot also provides a Variant type that works like an union of all the Variant-compatible types. + // Godot also provides a Variant type that works like a union of all the Variant-compatible types. Variant fooVar = 2; // fooVar is dynamically an integer (stored as a `long` in the Variant type). fooVar = "Now fooVar is a string!"; fooVar = new RefCounted(); // fooVar is a GodotObject. @@ -69,8 +69,7 @@ The global :ref:`@GlobalScope.typeof` function # To get the name of the underlying Object type, you need the `get_class()` method. print("foo is a(n) %s" % foo.get_class()) # inject the class name into a formatted string. # Note also that there is not yet any way to get a script's `class_name` string easily. - # To fetch that value, you can use [member ProjectSettings.get_global_class_list]. - # Open your project.godot file to see it up close. + # To fetch that value, you can use ProjectSettings.get_global_class_list(). .. code-tab:: csharp diff --git a/classes/class_vboxcontainer.rst b/classes/class_vboxcontainer.rst index 0a351ea10ca..5d10f047feb 100644 --- a/classes/class_vboxcontainer.rst +++ b/classes/class_vboxcontainer.rst @@ -14,21 +14,21 @@ VBoxContainer **Inherited By:** :ref:`ColorPicker`, :ref:`FileSystemDock`, :ref:`ScriptEditorBase` -Vertical box container. +A container that arranges its child controls vertically. .. rst-class:: classref-introduction-group Description ----------- -Vertical box container. See :ref:`BoxContainer`. +A variant of :ref:`BoxContainer` that can only arrange its child controls vertically. Child controls are rearranged automatically when their minimum size changes. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`GUI containers <../tutorials/ui/gui_containers>` +- :doc:`Using Containers <../tutorials/ui/gui_containers>` - `3D Voxel Demo `__ diff --git a/classes/class_vector2.rst b/classes/class_vector2.rst index f9318884da8..efc95f6843c 100644 --- a/classes/class_vector2.rst +++ b/classes/class_vector2.rst @@ -10,14 +10,14 @@ Vector2 ======= -Vector used for 2D math using floating point coordinates. +A 2D vector using floating point coordinates. .. rst-class:: classref-introduction-group Description ----------- -2-element structure that can be used to represent positions in 2D space or any other pair of numeric values. +A 2-element structure that can be used to represent 2D coordinates or any other pair of numeric values. It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike :ref:`float` which is always 64-bit. If double precision is needed, compile the engine with the option ``precision=double``. @@ -534,7 +534,7 @@ This is the signed area of the parallelogram formed by the two vectors. If the s :ref:`Vector2` **cubic_interpolate** **(** :ref:`Vector2` b, :ref:`Vector2` pre_a, :ref:`Vector2` post_b, :ref:`float` weight **)** |const| -Cubically interpolates 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. +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. .. rst-class:: classref-item-separator @@ -546,7 +546,7 @@ Cubically interpolates between this vector and ``b`` using ``pre_a`` and ``post_ :ref:`Vector2` **cubic_interpolate_in_time** **(** :ref:`Vector2` b, :ref:`Vector2` pre_a, :ref:`Vector2` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| -Cubically interpolates 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. +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 ``cubic_interpolate()`` by the time values. @@ -646,7 +646,7 @@ Creates a unit **Vector2** rotated to the given ``angle`` in radians. This is eq :ref:`bool` **is_equal_approx** **(** :ref:`Vector2` to **)** |const| -Returns ``true`` if this vector and ``v`` 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 @@ -670,7 +670,7 @@ Returns ``true`` if this vector is finite, by calling :ref:`@GlobalScope.is_fini :ref:`bool` **is_normalized** **(** **)** |const| -Returns ``true`` if the vector is normalized, ``false`` otherwise. +Returns ``true`` if the vector is normalized, i.e. its length is approximately equal to 1. .. rst-class:: classref-item-separator @@ -722,7 +722,7 @@ This method runs faster than :ref:`length`, so pref :ref:`Vector2` **lerp** **(** :ref:`Vector2` to, :ref:`float` weight **)** |const| -Returns the result of the 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. +Returns the result of the 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. .. rst-class:: classref-item-separator @@ -782,7 +782,9 @@ Returns a new vector moved toward ``to`` by the fixed ``delta`` amount. Will not :ref:`Vector2` **normalized** **(** **)** |const| -Returns a new vector scaled to unit length. Equivalent to ``v / v.length()``. +Returns the result of scaling the vector to unit length. Equivalent to ``v / v.length()``. See also :ref:`is_normalized`. + +\ **Note:** This function may return incorrect values if the input vector length is near zero. .. rst-class:: classref-item-separator @@ -937,6 +939,8 @@ 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:** 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. + .. rst-class:: classref-item-separator ---- @@ -1073,6 +1077,8 @@ Divides each component of the **Vector2** by the given :ref:`int`. Compares two **Vector2** vectors by first checking if the X value of the left vector is less than the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -1085,6 +1091,8 @@ Compares two **Vector2** vectors by first checking if the X value of the left ve Compares two **Vector2** vectors by first checking if the X value of the left vector is less than or equal to the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -1099,6 +1107,8 @@ 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:** 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. + .. rst-class:: classref-item-separator ---- @@ -1111,6 +1121,8 @@ Returns ``true`` if the vectors are exactly equal. Compares two **Vector2** vectors by first checking if the X value of the left vector is greater than the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -1123,6 +1135,8 @@ Compares two **Vector2** vectors by first checking if the X value of the left ve Compares two **Vector2** vectors by first checking if the X value of the left vector is greater than or equal to the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors. +\ **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. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_vector2i.rst b/classes/class_vector2i.rst index 0d0fcf28b7c..0016fa338bb 100644 --- a/classes/class_vector2i.rst +++ b/classes/class_vector2i.rst @@ -10,14 +10,14 @@ Vector2i ======== -Vector used for 2D math using integer coordinates. +A 2D vector using integer coordinates. .. rst-class:: classref-introduction-group Description ----------- -2-element structure that can be used to represent positions in 2D space or any other pair of numeric values. +A 2-element structure that can be used to represent 2D grid coordinates or any other pair of integers. It uses integer coordinates and is therefore preferable to :ref:`Vector2` when exact precision is required. Note that the values are limited to 32 bits, and unlike :ref:`Vector2` this cannot be configured with an engine build option. Use :ref:`int` or :ref:`PackedInt64Array` if 64-bit values are needed. @@ -279,7 +279,7 @@ Constructs a **Vector2i** as a copy of the given **Vector2i**. :ref:`Vector2i` **Vector2i** **(** :ref:`Vector2` from **)** -Constructs a new **Vector2i** from :ref:`Vector2`. The floating point coordinates will be truncated. +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 @@ -449,7 +449,7 @@ Gets the remainder of each component of the **Vector2i** with the components of :ref:`Vector2i` **operator %** **(** :ref:`int` right **)** -Gets the remainder of each component of the **Vector2i** with the 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 597dc8eeff7..dea2d5ef2eb 100644 --- a/classes/class_vector3.rst +++ b/classes/class_vector3.rst @@ -10,14 +10,14 @@ Vector3 ======= -Vector used for 3D math using floating point coordinates. +A 3D vector using floating point coordinates. .. rst-class:: classref-introduction-group Description ----------- -3-element structure that can be used to represent positions in 3D space or any other triplet of numeric values. +A 3-element structure that can be used to represent 3D coordinates or any other triplet of numeric values. It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike :ref:`float` which is always 64-bit. If double precision is needed, compile the engine with the option ``precision=double``. @@ -315,7 +315,7 @@ Down unit vector. **FORWARD** = ``Vector3(0, 0, -1)`` -Forward unit vector. Represents the local direction of forward, and the global direction of north. +Forward unit vector. Represents the local direction of forward, and the global direction of north. Keep in mind that the forward direction for lights, cameras, etc is different from 3D assets like characters, which face towards the camera by convention. Use :ref:`MODEL_FRONT` and similar constants when working in 3D asset space. .. _class_Vector3_constant_BACK: @@ -325,6 +325,54 @@ Forward unit vector. Represents the local direction of forward, and the global d Back unit vector. Represents the local direction of back, and the global direction of south. +.. _class_Vector3_constant_MODEL_LEFT: + +.. rst-class:: classref-constant + +**MODEL_LEFT** = ``Vector3(1, 0, 0)`` + +Unit vector pointing towards the left side of imported 3D assets. + +.. _class_Vector3_constant_MODEL_RIGHT: + +.. rst-class:: classref-constant + +**MODEL_RIGHT** = ``Vector3(-1, 0, 0)`` + +Unit vector pointing towards the right side of imported 3D assets. + +.. _class_Vector3_constant_MODEL_TOP: + +.. rst-class:: classref-constant + +**MODEL_TOP** = ``Vector3(0, 1, 0)`` + +Unit vector pointing towards the top side (up) of imported 3D assets. + +.. _class_Vector3_constant_MODEL_BOTTOM: + +.. rst-class:: classref-constant + +**MODEL_BOTTOM** = ``Vector3(0, -1, 0)`` + +Unit vector pointing towards the bottom side (down) of imported 3D assets. + +.. _class_Vector3_constant_MODEL_FRONT: + +.. rst-class:: classref-constant + +**MODEL_FRONT** = ``Vector3(0, 0, 1)`` + +Unit vector pointing towards the front side (facing forward) of imported 3D assets. + +.. _class_Vector3_constant_MODEL_REAR: + +.. rst-class:: classref-constant + +**MODEL_REAR** = ``Vector3(0, 0, -1)`` + +Unit vector pointing towards the rear side (back) of imported 3D assets. + .. rst-class:: classref-section-separator ---- @@ -654,7 +702,7 @@ Returns ``true`` if this vector is finite, by calling :ref:`@GlobalScope.is_fini :ref:`bool` **is_normalized** **(** **)** |const| -Returns ``true`` if the vector is :ref:`normalized`, ``false`` otherwise. +Returns ``true`` if the vector is normalized, i.e. its length is approximately equal to 1. .. rst-class:: classref-item-separator @@ -706,7 +754,7 @@ This method runs faster than :ref:`length`, so pref :ref:`Vector3` **lerp** **(** :ref:`Vector3` to, :ref:`float` weight **)** |const| -Returns the result of the 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. +Returns the result of the 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. .. rst-class:: classref-item-separator @@ -766,7 +814,9 @@ Returns a new vector moved toward ``to`` by the fixed ``delta`` amount. Will not :ref:`Vector3` **normalized** **(** **)** |const| -Returns the vector scaled to unit length. Equivalent to ``v / v.length()``. See also :ref:`is_normalized`. +Returns the result of scaling the vector to unit length. Equivalent to ``v / v.length()``. See also :ref:`is_normalized`. + +\ **Note:** This function may return incorrect values if the input vector length is near zero. .. rst-class:: classref-item-separator @@ -961,6 +1011,8 @@ 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:** 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. + .. rst-class:: classref-item-separator ---- @@ -1121,6 +1173,8 @@ Divides each component of the **Vector3** by the given :ref:`int`. Compares two **Vector3** vectors by first checking if the X value of the left vector is less than the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -1133,6 +1187,8 @@ Compares two **Vector3** vectors by first checking if the X value of the left ve Compares two **Vector3** vectors by first checking if the X value of the left vector is less than or equal to the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -1147,6 +1203,8 @@ 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:** 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. + .. rst-class:: classref-item-separator ---- @@ -1159,6 +1217,8 @@ Returns ``true`` if the vectors are exactly equal. Compares two **Vector3** vectors by first checking if the X value of the left vector is greater than the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -1171,6 +1231,8 @@ Compares two **Vector3** vectors by first checking if the X value of the left ve Compares two **Vector3** vectors by first checking if the X value of the left vector is greater than or equal to the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors. +\ **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. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_vector3i.rst b/classes/class_vector3i.rst index 15bb14d6552..d4c6a586442 100644 --- a/classes/class_vector3i.rst +++ b/classes/class_vector3i.rst @@ -10,14 +10,14 @@ Vector3i ======== -Vector used for 3D math using integer coordinates. +A 3D vector using integer coordinates. .. rst-class:: classref-introduction-group Description ----------- -3-element structure that can be used to represent positions in 3D space or any other triplet of numeric values. +A 3-element structure that can be used to represent 3D grid coordinates or any other triplet of integers. It uses integer coordinates and is therefore preferable to :ref:`Vector3` when exact precision is required. Note that the values are limited to 32 bits, and unlike :ref:`Vector3` this cannot be configured with an engine build option. Use :ref:`int` or :ref:`PackedInt64Array` if 64-bit values are needed. @@ -315,7 +315,7 @@ Constructs a **Vector3i** as a copy of the given **Vector3i**. :ref:`Vector3i` **Vector3i** **(** :ref:`Vector3` from **)** -Constructs a new **Vector3i** from :ref:`Vector3`. The floating point coordinates will be truncated. +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 @@ -473,7 +473,7 @@ Gets the remainder of each component of the **Vector3i** with the components of :ref:`Vector3i` **operator %** **(** :ref:`int` right **)** -Gets the remainder of each component of the **Vector3i** with the 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 fe4bae2e1ed..818cfdec675 100644 --- a/classes/class_vector4.rst +++ b/classes/class_vector4.rst @@ -10,14 +10,14 @@ Vector4 ======= -Vector used for 4D math using floating point coordinates. +A 4D vector using floating point coordinates. .. rst-class:: classref-introduction-group Description ----------- -4-element structure that can be used to represent any quadruplet of numeric values. +A 4-element structure that can be used to represent 4D coordinates or any other quadruplet of numeric values. It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike :ref:`float` which is always 64-bit. If double precision is needed, compile the engine with the option ``precision=double``. @@ -92,7 +92,7 @@ Methods +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector4` | :ref:`inverse` **(** **)** |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Vector4` with **)** |const| | + | :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Vector4` to **)** |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_finite` **(** **)** |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -483,9 +483,9 @@ Returns the inverse of the vector. This is the same as ``Vector4(1.0 / v.x, 1.0 .. rst-class:: classref-method -:ref:`bool` **is_equal_approx** **(** :ref:`Vector4` with **)** |const| +:ref:`bool` **is_equal_approx** **(** :ref:`Vector4` to **)** |const| -Returns ``true`` if this vector and ``with`` 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 @@ -509,7 +509,7 @@ Returns ``true`` if this vector is finite, by calling :ref:`@GlobalScope.is_fini :ref:`bool` **is_normalized** **(** **)** |const| -Returns ``true`` if the vector is normalized, i.e. its length is equal to 1. +Returns ``true`` if the vector is normalized, i.e. its length is approximately equal to 1. .. rst-class:: classref-item-separator @@ -547,7 +547,9 @@ Returns the length (magnitude) of this vector. :ref:`float` **length_squared** **(** **)** |const| -Returns the squared length (squared magnitude) of this vector. This method runs faster than :ref:`length`. +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. .. rst-class:: classref-item-separator @@ -595,7 +597,9 @@ Returns the axis of the vector's lowest value. See ``AXIS_*`` constants. If all :ref:`Vector4` **normalized** **(** **)** |const| -Returns the result of scaling the vector to unit length. Equivalent to ``v / v.length()``. +Returns the result of scaling the vector to unit length. Equivalent to ``v / v.length()``. See also :ref:`is_normalized`. + +\ **Note:** This function may return incorrect values if the input vector length is near zero. .. rst-class:: classref-item-separator @@ -607,7 +611,7 @@ Returns the result of scaling the vector to unit length. Equivalent to ``v / v.l :ref:`Vector4` **posmod** **(** :ref:`float` mod **)** |const| -Returns a new 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 @@ -619,7 +623,7 @@ Returns a new vector composed of the :ref:`@GlobalScope.fposmod` **posmodv** **(** :ref:`Vector4` modv **)** |const| -Returns a new 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 @@ -676,6 +680,8 @@ 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:** 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. + .. rst-class:: classref-item-separator ---- @@ -820,6 +826,8 @@ Divides each component of the **Vector4** by the given :ref:`int`. Compares two **Vector4** vectors by first checking if the X value of the left vector is less than the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -832,6 +840,8 @@ Compares two **Vector4** vectors by first checking if the X value of the left ve Compares two **Vector4** vectors by first checking if the X value of the left vector is less than or equal to the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -846,6 +856,8 @@ 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:** 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. + .. rst-class:: classref-item-separator ---- @@ -858,6 +870,8 @@ Returns ``true`` if the vectors are exactly equal. Compares two **Vector4** vectors by first checking if the X value of the left vector is greater than the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors. +\ **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. + .. rst-class:: classref-item-separator ---- @@ -870,6 +884,8 @@ Compares two **Vector4** vectors by first checking if the X value of the left ve Compares two **Vector4** vectors by first checking if the X value of the left vector is greater than or equal to the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors. +\ **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. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_vector4i.rst b/classes/class_vector4i.rst index e21d5f01c0f..7670f6a9e17 100644 --- a/classes/class_vector4i.rst +++ b/classes/class_vector4i.rst @@ -10,17 +10,19 @@ Vector4i ======== -Vector used for 4D math using integer coordinates. +A 4D vector using integer coordinates. .. rst-class:: classref-introduction-group Description ----------- -4-element structure that can be used to represent 4D grid coordinates or sets of integers. +A 4-element structure that can be used to represent 4D grid coordinates or any other quadruplet of integers. It uses integer coordinates and is therefore preferable to :ref:`Vector4` when exact precision is required. Note that the values are limited to 32 bits, and unlike :ref:`Vector4` this cannot be configured with an engine build option. Use :ref:`int` or :ref:`PackedInt64Array` if 64-bit values are needed. +\ **Note:** In a boolean context, a Vector4i will evaluate to ``false`` if it's equal to ``Vector4i(0, 0, 0, 0)``. Otherwise, a Vector3i will always evaluate to ``true``. + .. rst-class:: classref-reftable-group Properties @@ -276,7 +278,7 @@ Constructs a **Vector4i** as a copy of the given **Vector4i**. :ref:`Vector4i` **Vector4i** **(** :ref:`Vector4` from **)** -Constructs a new **Vector4i** from the given :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. .. rst-class:: classref-item-separator @@ -339,7 +341,9 @@ Returns the length (magnitude) of this vector. :ref:`int` **length_squared** **(** **)** |const| -Returns the squared length (squared magnitude) of this vector. This method runs faster than :ref:`length`. +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. .. rst-class:: classref-item-separator diff --git a/classes/class_vehiclebody3d.rst b/classes/class_vehiclebody3d.rst index 54b51cad3c7..d99baf67d2b 100644 --- a/classes/class_vehiclebody3d.rst +++ b/classes/class_vehiclebody3d.rst @@ -12,20 +12,18 @@ VehicleBody3D **Inherits:** :ref:`RigidBody3D` **<** :ref:`PhysicsBody3D` **<** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -Physics body that simulates the behavior of a car. +A 3D physics body that simulates the behavior of a car. .. rst-class:: classref-introduction-group Description ----------- -This node implements all the physics logic needed to simulate a car. It is based on the raycast vehicle system commonly found in physics engines. You will need to add a :ref:`CollisionShape3D` for the main body of your vehicle and add :ref:`VehicleWheel3D` nodes for the wheels. You should also add a :ref:`MeshInstance3D` to this node for the 3D model of your car but this model should not include meshes for the wheels. You should control the vehicle by using the :ref:`brake`, :ref:`engine_force`, and :ref:`steering` properties and not change the position or orientation of this node directly. +This physics body implements all the physics logic needed to simulate a car. It is based on the raycast vehicle system commonly found in physics engines. Aside from a :ref:`CollisionShape3D` for the main body of the vehicle, you must also add a :ref:`VehicleWheel3D` node for each wheel. You should also add a :ref:`MeshInstance3D` to this node for the 3D model of the vehicle, but this model should generally not include meshes for the wheels. You can control the vehicle by using the :ref:`brake`, :ref:`engine_force`, and :ref:`steering` properties. The position or orientation of this node shouldn't be changed directly. -\ **Note:** The origin point of your VehicleBody3D will determine the center of gravity of your vehicle so it is better to keep this low and move the :ref:`CollisionShape3D` and :ref:`MeshInstance3D` upwards. +\ **Note:** The origin point of your VehicleBody3D will determine the center of gravity of your vehicle. To make the vehicle more grounded, the origin point is usually kept low, moving the :ref:`CollisionShape3D` and :ref:`MeshInstance3D` upwards. -\ **Note:** This class has known issues and isn't designed to provide realistic 3D vehicle physics. If you want advanced vehicle physics, you will probably have to write your own physics integration using another :ref:`PhysicsBody3D` class. - -\ **Warning:** With a non-uniform scale this node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size(s) of its collision shape(s) instead. +\ **Note:** This class has known issues and isn't designed to provide realistic 3D vehicle physics. If you want advanced vehicle physics, you may have to write your own physics integration using :ref:`CharacterBody3D` or :ref:`RigidBody3D`. .. rst-class:: classref-introduction-group diff --git a/classes/class_vehiclewheel3d.rst b/classes/class_vehiclewheel3d.rst index 01ffe2053dd..858571efb51 100644 --- a/classes/class_vehiclewheel3d.rst +++ b/classes/class_vehiclewheel3d.rst @@ -12,16 +12,16 @@ VehicleWheel3D **Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -Physics object that simulates the behavior of a wheel. +A 3D physics body for a :ref:`VehicleBody3D` that simulates the behavior of a wheel. .. rst-class:: classref-introduction-group Description ----------- -This node needs to be used as a child node of :ref:`VehicleBody3D` and simulates the behavior of one of its wheels. This node also acts as a collider to detect if the wheel is touching a surface. +A node used as a child of a :ref:`VehicleBody3D` parent to simulate the behavior of one of its wheels. This node also acts as a collider to detect if the wheel is touching a surface. -\ **Note:** This class has known issues and isn't designed to provide realistic 3D vehicle physics. If you want advanced vehicle physics, you will probably have to write your own physics integration using another :ref:`PhysicsBody3D` class. +\ **Note:** This class has known issues and isn't designed to provide realistic 3D vehicle physics. If you want advanced vehicle physics, you may need to write your own physics integration using another :ref:`PhysicsBody3D` class. .. rst-class:: classref-introduction-group @@ -53,7 +53,7 @@ Properties +---------------------------+---------------------------------------------------------------------------------+------------+ | :ref:`float` | :ref:`suspension_stiffness` | ``5.88`` | +---------------------------+---------------------------------------------------------------------------------+------------+ - | :ref:`float` | :ref:`suspension_travel` | ``5.0`` | + | :ref:`float` | :ref:`suspension_travel` | ``0.2`` | +---------------------------+---------------------------------------------------------------------------------+------------+ | :ref:`bool` | :ref:`use_as_steering` | ``false`` | +---------------------------+---------------------------------------------------------------------------------+------------+ @@ -222,7 +222,7 @@ This value defines the stiffness of the suspension. Use a value lower than 50 fo .. rst-class:: classref-property -:ref:`float` **suspension_travel** = ``5.0`` +:ref:`float` **suspension_travel** = ``0.2`` .. rst-class:: classref-property-setget diff --git a/classes/class_vflowcontainer.rst b/classes/class_vflowcontainer.rst index 1b785aae70a..341cdc46b88 100644 --- a/classes/class_vflowcontainer.rst +++ b/classes/class_vflowcontainer.rst @@ -12,14 +12,21 @@ VFlowContainer **Inherits:** :ref:`FlowContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Vertical flow container. +A container that arranges its child controls vertically and wraps them around at the borders. .. rst-class:: classref-introduction-group Description ----------- -Vertical version of :ref:`FlowContainer`. +A variant of :ref:`FlowContainer` that can only arrange its child controls vertically, wrapping them around at the borders. This is similar to how text in a book wraps around when no more words can fit on a line, except vertically. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Using Containers <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group diff --git a/classes/class_videostreamplayer.rst b/classes/class_videostreamplayer.rst index 0070e1df9ab..fde17051c82 100644 --- a/classes/class_videostreamplayer.rst +++ b/classes/class_videostreamplayer.rst @@ -12,14 +12,14 @@ VideoStreamPlayer **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Control for playing video streams. +A control used for video playback. .. rst-class:: classref-introduction-group Description ----------- -Control node for playing video streams using :ref:`VideoStream` resources. +A control used for playback of :ref:`VideoStream` resources. Supported video formats are `Ogg Theora `__ (``.ogv``, :ref:`VideoStreamTheora`) and any format exposed via a GDExtension plugin. diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index f25fc29e902..98af743edcf 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -14,7 +14,7 @@ Viewport **Inherited By:** :ref:`SubViewport`, :ref:`Window` -Base class for viewports. +Abstract base class for viewports. Encapsulates drawing and interaction with a game world. .. rst-class:: classref-introduction-group @@ -23,7 +23,7 @@ Description A Viewport creates a different view into the screen, or a sub-view inside another viewport. Children 2D Nodes will display on it, and children Camera3D 3D nodes will render on it too. -Optionally, a viewport can have its own 2D or 3D world, so they don't share what they draw with other viewports. +Optionally, a viewport can have its own 2D or 3D world, so it doesn't share what it draws with other viewports. Viewports can also choose to be audio listeners, so they generate positional audio depending on a 2D or 3D camera child of it. @@ -185,7 +185,7 @@ Methods +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`gui_get_drag_data` **(** **)** |const| | +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Control` | :ref:`gui_get_focus_owner` **(** **)** | + | :ref:`Control` | :ref:`gui_get_focus_owner` **(** **)** |const| | +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`gui_is_drag_successful` **(** **)** |const| | +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -207,6 +207,8 @@ Methods +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_positional_shadow_atlas_quadrant_subdiv` **(** :ref:`int` quadrant, :ref:`PositionalShadowAtlasQuadrantSubdiv` subdiv **)** | +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`update_mouse_cursor_state` **(** **)** | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`warp_mouse` **(** :ref:`Vector2` position **)** | +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -334,7 +336,7 @@ enum **Scaling3DMode**: :ref:`Scaling3DMode` **SCALING_3D_MODE_BILINEAR** = ``0`` -Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`scaling_3d_scale`. Values less then ``1.0`` will result in undersampling while values greater than ``1.0`` will result in supersampling. A value of ``1.0`` disables scaling. +Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`scaling_3d_scale`. Values less than ``1.0`` will result in undersampling while values greater than ``1.0`` will result in supersampling. A value of ``1.0`` disables scaling. .. _class_Viewport_constant_SCALING_3D_MODE_FSR: @@ -342,7 +344,7 @@ Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be :ref:`Scaling3DMode` **SCALING_3D_MODE_FSR** = ``1`` -Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`scaling_3d_scale`. Values less then ``1.0`` will be result in the viewport being upscaled using FSR. Values greater than ``1.0`` are not supported and bilinear downsampling will be used instead. A value of ``1.0`` disables scaling. +Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`scaling_3d_scale`. Values less than ``1.0`` will be result in the viewport being upscaled using FSR. Values greater than ``1.0`` are not supported and bilinear downsampling will be used instead. A value of ``1.0`` disables scaling. .. _class_Viewport_constant_SCALING_3D_MODE_MAX: @@ -1199,7 +1201,7 @@ If ``true``, the GUI controls on the viewport will lay pixel perfectly. - void **set_handle_input_locally** **(** :ref:`bool` value **)** - :ref:`bool` **is_handling_input_locally** **(** **)** -If ``true``, this viewport will mark incoming input events as handled by itself. If ``false``, this is instead done by the the first parent viewport that is set to handle input locally. +If ``true``, this viewport will mark incoming input events as handled by itself. If ``false``, this is instead done by the first parent viewport that is set to handle input locally. A :ref:`SubViewportContainer` will automatically set this property to ``false`` for the **Viewport** contained inside of it. @@ -1328,9 +1330,7 @@ If ``true``, objects receive mouse picking events sorted primarily by their :ref - void **set_positional_shadow_atlas_16_bits** **(** :ref:`bool` value **)** - :ref:`bool` **get_positional_shadow_atlas_16_bits** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Use 16 bits for the omni/spot shadow depth map. Enabling this results in shadows having less precision and may result in shadow acne, but can lead to performance improvements on some devices. .. rst-class:: classref-item-separator @@ -1415,9 +1415,9 @@ The subdivision amount of the fourth quadrant on the shadow atlas. - void **set_positional_shadow_atlas_size** **(** :ref:`int` value **)** - :ref:`int` **get_positional_shadow_atlas_size** **(** **)** -The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2. +The shadow atlas' resolution (used for omni and spot lights). The value is rounded up to the nearest power of 2. -\ **Note:** If this is set to ``0``, no shadows will be visible at all (including directional shadows). +\ **Note:** If this is set to ``0``, no positional shadows will be visible at all. This can improve performance significantly on low-end systems by reducing both the CPU and GPU load (as fewer draw calls are needed to draw the scene without shadows). .. rst-class:: classref-item-separator @@ -1860,9 +1860,7 @@ Returns the :ref:`PositionalShadowAtlasQuadrantSubdiv` **get_render_info** **(** :ref:`RenderInfoType` type, :ref:`RenderInfo` info **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns rendering statistics of the given type. See :ref:`RenderInfoType` and :ref:`RenderInfo` for options. .. rst-class:: classref-item-separator @@ -1940,7 +1938,7 @@ Returns the drag data from the GUI, that was previously returned by :ref:`Contro .. rst-class:: classref-method -:ref:`Control` **gui_get_focus_owner** **(** **)** +:ref:`Control` **gui_get_focus_owner** **(** **)** |const| Returns the :ref:`Control` having the focus within this viewport. If no :ref:`Control` has the focus, returns null. @@ -2020,8 +2018,16 @@ Calling this method will propagate calls to child nodes for following methods in - :ref:`Control._gui_input` for :ref:`Control` nodes +- :ref:`Node._shortcut_input`\ + +- :ref:`Node._unhandled_input`\ + +- :ref:`Node._unhandled_key_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 none of the methods handle the event and :ref:`physics_object_picking` is ``true``, the event is used for physics object picking. + .. rst-class:: classref-item-separator ---- @@ -2032,9 +2038,7 @@ If an earlier method marks the input as handled via :ref:`set_input_as_handled` text **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Helper method which calls the ``set_text()`` method on the currently focused :ref:`Control`, provided that it is defined (e.g. if the focused Control is :ref:`Button` or :ref:`LineEdit`). .. rst-class:: classref-item-separator @@ -2064,6 +2068,10 @@ If an earlier method marks the input as handled via :ref:`set_input_as_handled` is ``true``, the event is used for physics object picking. +\ **Note:** This method doesn't propagate input events to embedded :ref:`Window`\ s or :ref:`SubViewport`\ s. + +\ *Deprecated.* Use :ref:`push_input` instead. + .. rst-class:: classref-item-separator ---- @@ -2088,6 +2096,8 @@ void **set_input_as_handled** **(** **)** Stops the input from propagating further down the :ref:`SceneTree`. +\ **Note:** This does not affect the methods in :ref:`Input`, only the way events are propagated. + .. rst-class:: classref-item-separator ---- @@ -2104,6 +2114,18 @@ Sets the number of subdivisions to use in the specified quadrant. A higher numbe ---- +.. _class_Viewport_method_update_mouse_cursor_state: + +.. rst-class:: classref-method + +void **update_mouse_cursor_state** **(** **)** + +Force instantly updating the display based on the current mouse cursor position. This includes updating the mouse cursor shape and sending necessary :ref:`Control.mouse_entered`, :ref:`CollisionObject2D.mouse_entered`, :ref:`CollisionObject3D.mouse_entered` and :ref:`Window.mouse_entered` signals and their respective ``mouse_exited`` counterparts. + +.. rst-class:: classref-item-separator + +---- + .. _class_Viewport_method_warp_mouse: .. rst-class:: classref-method diff --git a/classes/class_viewporttexture.rst b/classes/class_viewporttexture.rst index 129310701ad..6b25e61219e 100644 --- a/classes/class_viewporttexture.rst +++ b/classes/class_viewporttexture.rst @@ -12,18 +12,18 @@ ViewportTexture **Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Texture which displays the content of a :ref:`Viewport`. +Provides the content of a :ref:`Viewport` as a dynamic texture. .. rst-class:: classref-introduction-group Description ----------- -Displays the content of a :ref:`Viewport` node as a dynamic :ref:`Texture2D`. This can be used to mix controls, 2D, and 3D elements in the same scene. +Provides the content of a :ref:`Viewport` as a dynamic :ref:`Texture2D`. This can be used to mix controls, 2D game objects, and 3D game objects in the same scene. -To create a ViewportTexture in code, use the :ref:`Viewport.get_texture` method on the target viewport. +To create a **ViewportTexture** in code, use the :ref:`Viewport.get_texture` method on the target viewport. -\ **Note:** When local to scene, this texture uses :ref:`Resource.setup_local_to_scene` to set the proxy texture and flags in the local viewport. +\ **Note:** When local to scene, this texture uses :ref:`Resource.setup_local_to_scene` to set the proxy texture and flags in the local viewport. Local to scene **ViewportTexture**\ s will return incorrect data until the scene root is ready (see :ref:`Node.ready`). .. rst-class:: classref-introduction-group @@ -70,7 +70,9 @@ Property Descriptions - void **set_viewport_path_in_scene** **(** :ref:`NodePath` value **)** - :ref:`NodePath` **get_viewport_path_in_scene** **(** **)** -The path to the :ref:`Viewport` node to display. This is relative to the scene root, not to the node which uses the texture. +The path to the :ref:`Viewport` node to display. This is relative to the scene root, not to the node that uses the texture. + +\ **Note:** In the editor, this path is automatically updated when the target viewport or one of its ancestors is renamed or moved. At runtime, the path may not be able to automatically update due to the inability to determine the scene root. .. |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_visualinstance3d.rst b/classes/class_visualinstance3d.rst index ee90f213e24..df8325d75d0 100644 --- a/classes/class_visualinstance3d.rst +++ b/classes/class_visualinstance3d.rst @@ -85,10 +85,14 @@ Property Descriptions The render layer(s) this **VisualInstance3D** is drawn on. -This object will only be visible for :ref:`Camera3D`\ s whose cull mask includes the render object this **VisualInstance3D** is set to. +This object will only be visible for :ref:`Camera3D`\ s whose cull mask includes any of the render layers this **VisualInstance3D** is set to. 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`. + +\ **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. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_visualshadernodetextureparameter.rst b/classes/class_visualshadernodetextureparameter.rst index f146ef8fd4d..eef8bbedb52 100644 --- a/classes/class_visualshadernodetextureparameter.rst +++ b/classes/class_visualshadernodetextureparameter.rst @@ -381,7 +381,7 @@ Sets the texture repeating mode. See :ref:`TextureRepeat` value **)** - :ref:`TextureSource` **get_texture_source** **(** **)** -Sets the texture source mode. Used for reading from the screen, depth, or normal_roughness texture. see :ref:`TextureSource` for options. +Sets the texture source mode. Used for reading from the screen, depth, or normal_roughness texture. See :ref:`TextureSource` for options. .. rst-class:: classref-item-separator diff --git a/classes/class_vscrollbar.rst b/classes/class_vscrollbar.rst index 97ea17a34c6..2340e763844 100644 --- a/classes/class_vscrollbar.rst +++ b/classes/class_vscrollbar.rst @@ -12,14 +12,14 @@ VScrollBar **Inherits:** :ref:`ScrollBar` **<** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Vertical scroll bar. +A vertical scrollbar that goes from top (min) to bottom (max). .. rst-class:: classref-introduction-group Description ----------- -Vertical version of :ref:`ScrollBar`, which goes from top (min) to bottom (max). +A vertical scrollbar, typically used to navigate through content that extends beyond the visible height of a control. It is a :ref:`Range`-based control and goes from top (min) to bottom (max). Note that this direction is the opposite of :ref:`VSlider`'s. .. rst-class:: classref-reftable-group diff --git a/classes/class_vseparator.rst b/classes/class_vseparator.rst index 692f6f663db..a6be372cee9 100644 --- a/classes/class_vseparator.rst +++ b/classes/class_vseparator.rst @@ -12,14 +12,14 @@ VSeparator **Inherits:** :ref:`Separator` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Vertical version of :ref:`Separator`. +A vertical line used for separating other controls. .. rst-class:: classref-introduction-group Description ----------- -Vertical version of :ref:`Separator`. Even though it looks vertical, it is used to separate objects horizontally. +A vertical separator used for separating other controls that are arranged **horizontally**. **VSeparator** is purely visual and normally drawn as a :ref:`StyleBoxLine`. .. rst-class:: classref-reftable-group diff --git a/classes/class_vslider.rst b/classes/class_vslider.rst index bfa079f579a..a5653748b2c 100644 --- a/classes/class_vslider.rst +++ b/classes/class_vslider.rst @@ -12,16 +12,14 @@ VSlider **Inherits:** :ref:`Slider` **<** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Vertical slider. +A vertical slider that goes from bottom (min) to top (max). .. rst-class:: classref-introduction-group Description ----------- -Vertical slider. See :ref:`Slider`. This one goes from bottom (min) to top (max). - -\ **Note:** The :ref:`Range.changed` and :ref:`Range.value_changed` signals are part of the :ref:`Range` class which this class inherits from. +A vertical slider, used to adjust a value by moving a grabber along a vertical axis. It is a :ref:`Range`-based control and goes from bottom (min) to top (max). Note that this direction is the opposite of :ref:`VScrollBar`'s. .. rst-class:: classref-reftable-group @@ -45,6 +43,8 @@ Theme Properties .. table:: :widths: auto + +-----------------------------------+---------------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`center_grabber` | ``0`` | +-----------------------------------+---------------------------------------------------------------------------------+-------+ | :ref:`int` | :ref:`grabber_offset` | ``0`` | +-----------------------------------+---------------------------------------------------------------------------------+-------+ @@ -72,6 +72,18 @@ Theme Properties Theme Property Descriptions --------------------------- +.. _class_VSlider_theme_constant_center_grabber: + +.. rst-class:: classref-themeproperty + +:ref:`int` **center_grabber** = ``0`` + +Boolean constant. If ``1``, the grabber texture size will be ignored and it will fit within slider's bounds based only on its center position. + +.. rst-class:: classref-item-separator + +---- + .. _class_VSlider_theme_constant_grabber_offset: .. rst-class:: classref-themeproperty diff --git a/classes/class_vsplitcontainer.rst b/classes/class_vsplitcontainer.rst index 489ec3927e5..ffd4a8390b2 100644 --- a/classes/class_vsplitcontainer.rst +++ b/classes/class_vsplitcontainer.rst @@ -12,21 +12,21 @@ VSplitContainer **Inherits:** :ref:`SplitContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Vertical split container. +A container that splits two child controls vertically and provides a grabber for adjusting the split ratio. .. rst-class:: classref-introduction-group Description ----------- -Vertical split container. See :ref:`SplitContainer`. This goes from top to bottom. +A container that accepts only two child controls, then arranges them vertically and creates a divisor between them. The divisor can be dragged around to change the size relation between the child controls. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`GUI containers <../tutorials/ui/gui_containers>` +- :doc:`Using Containers <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group diff --git a/classes/class_weakref.rst b/classes/class_weakref.rst index 517a77b7dfa..08bf9a5edc8 100644 --- a/classes/class_weakref.rst +++ b/classes/class_weakref.rst @@ -12,14 +12,14 @@ WeakRef **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Holds an :ref:`Object`, but does not contribute to the reference count if the object is a reference. +Holds an :ref:`Object`. If the object is :ref:`RefCounted`, it doesn't update the reference count. .. rst-class:: classref-introduction-group Description ----------- -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. +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 eee4f3e7ab2..1df42307215 100644 --- a/classes/class_webrtcmultiplayerpeer.rst +++ b/classes/class_webrtcmultiplayerpeer.rst @@ -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 @@ -122,7 +122,7 @@ You can optionally specify a ``channels_config`` array of :ref:`TransferMode` **get_peer** **(** :ref:`int` peer_id **)** -Returns a dictionary representation of the peer with given ``peer_id`` with three keys. ``connection`` containing the :ref:`WebRTCPeerConnection` to this peer, ``channels`` an array of three :ref:`WebRTCDataChannel`, and ``connected`` a boolean representing if the peer connection is currently connected (all three channels are open). +Returns a dictionary representation of the peer with given ``peer_id`` with three keys. ``"connection"`` containing the :ref:`WebRTCPeerConnection` to this peer, ``"channels"`` an array of three :ref:`WebRTCDataChannel`, and ``"connected"`` a boolean representing if the peer connection is currently connected (all three channels are open). .. rst-class:: classref-item-separator diff --git a/classes/class_webrtcpeerconnection.rst b/classes/class_webrtcpeerconnection.rst index d315dc349c9..bc75fef6101 100644 --- a/classes/class_webrtcpeerconnection.rst +++ b/classes/class_webrtcpeerconnection.rst @@ -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: @@ -388,9 +388,9 @@ Returns the :ref:`SignalingState` on t :ref:`Error` **initialize** **(** :ref:`Dictionary` configuration={} **)** -Re-initialize this peer connection, closing any previously active connection, and going back to state :ref:`STATE_NEW`. A dictionary of ``options`` can be passed to configure the peer connection. +Re-initialize this peer connection, closing any previously active connection, and going back to state :ref:`STATE_NEW`. A dictionary of ``configuration`` options can be passed to configure the peer connection. -Valid ``options`` are: +Valid ``configuration`` options are: :: @@ -457,9 +457,9 @@ After calling this function the peer will start emitting :ref:`ice_candidate_cre Sets the SDP description of the remote peer. This should be called with the values generated by a remote peer and received over the signaling server. -If ``type`` is ``offer`` the peer will emit :ref:`session_description_created` with the appropriate answer. +If ``type`` is ``"offer"`` the peer will emit :ref:`session_description_created` with the appropriate answer. -If ``type`` is ``answer`` the peer will start emitting :ref:`ice_candidate_created`. +If ``type`` is ``"answer"`` the peer will start emitting :ref:`ice_candidate_created`. .. |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_websocketmultiplayerpeer.rst b/classes/class_websocketmultiplayerpeer.rst index a406303890e..e02089dc637 100644 --- a/classes/class_websocketmultiplayerpeer.rst +++ b/classes/class_websocketmultiplayerpeer.rst @@ -201,7 +201,7 @@ Starts a new multiplayer client connecting to the given ``url``. TLS certificate :ref:`Error` **create_server** **(** :ref:`int` port, :ref:`String` bind_address="*", :ref:`TLSOptions` tls_server_options=null **)** -Starts a new multiplayer server listening on the given ``port``. You can optionally specify a ``bind_address``, and provide valiid ``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_webxrinterface.rst b/classes/class_webxrinterface.rst index 0aef1bbb046..70607330578 100644 --- a/classes/class_webxrinterface.rst +++ b/classes/class_webxrinterface.rst @@ -150,6 +150,10 @@ Methods .. table:: :widths: auto + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_available_display_refresh_rates` **(** **)** |const| | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_display_refresh_rate` **(** **)** |const| | +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`TargetRayMode` | :ref:`get_input_source_target_ray_mode` **(** :ref:`int` input_source_id **)** |const| | +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -159,6 +163,8 @@ Methods +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`is_session_supported` **(** :ref:`String` session_mode **)** | +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_display_refresh_rate` **(** :ref:`float` refresh_rate **)** | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -169,6 +175,18 @@ Methods Signals ------- +.. _class_WebXRInterface_signal_display_refresh_rate_changed: + +.. rst-class:: classref-signal + +**display_refresh_rate_changed** **(** **)** + +Emitted after the display's refresh rate has changed. + +.. rst-class:: classref-item-separator + +---- + .. _class_WebXRInterface_signal_reference_space_reset: .. rst-class:: classref-signal @@ -518,6 +536,30 @@ Possible values come from `WebXR's XRVisibilityState ` **get_available_display_refresh_rates** **(** **)** |const| + +Returns display refresh rates supported by the current HMD. Only returned if this feature is supported by the web browser and after the interface has been initialized. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WebXRInterface_method_get_display_refresh_rate: + +.. rst-class:: classref-method + +:ref:`float` **get_display_refresh_rate** **(** **)** |const| + +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 + +---- + .. _class_WebXRInterface_method_get_input_source_target_ray_mode: .. rst-class:: classref-method @@ -584,6 +626,18 @@ Possible values come from `WebXR's XRSessionMode ` signal with the result. +.. rst-class:: classref-item-separator + +---- + +.. _class_WebXRInterface_method_set_display_refresh_rate: + +.. rst-class:: classref-method + +void **set_display_refresh_rate** **(** :ref:`float` refresh_rate **)** + +Sets the display refresh rate for the current HMD. Not supported on all HMDs and browsers. It won't take effect right away until after :ref:`display_refresh_rate_changed` is emitted. + .. |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_window.rst b/classes/class_window.rst index a4ce2bfe04b..0ec909cd8c6 100644 --- a/classes/class_window.rst +++ b/classes/class_window.rst @@ -14,7 +14,7 @@ Window **Inherited By:** :ref:`AcceptDialog`, :ref:`Popup` -Base class for all windows. +Base class for all windows, dialogs, and popups. .. rst-class:: classref-introduction-group @@ -23,7 +23,7 @@ Description A node that creates a window. The window can either be a native system window or embedded inside another **Window** (see :ref:`Viewport.gui_embed_subwindows`). -At runtime, **Window**\ s will not close automatically when requested. You need to handle it manually using :ref:`close_requested` (this applies both to clicking close button and clicking outside popup). +At runtime, **Window**\ s will not close automatically when requested. You need to handle it manually using the :ref:`close_requested` signal (this applies both to pressing the close button and clicking outside of a popup). .. rst-class:: classref-reftable-group @@ -99,133 +99,147 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_color_override` **(** :ref:`StringName` name, :ref:`Color` color **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_constant_override` **(** :ref:`StringName` name, :ref:`int` constant **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_font_override` **(** :ref:`StringName` name, :ref:`Font` font **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_font_size_override` **(** :ref:`StringName` name, :ref:`int` font_size **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_icon_override` **(** :ref:`StringName` name, :ref:`Texture2D` texture **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_stylebox_override` **(** :ref:`StringName` name, :ref:`StyleBox` stylebox **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`begin_bulk_theme_override` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`can_draw` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`child_controls_changed` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`end_bulk_theme_override` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_contents_minimum_size` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_flag` **(** :ref:`Flags` flag **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`LayoutDirection` | :ref:`get_layout_direction` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`get_position_with_decorations` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`get_size_with_decorations` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`get_theme_color` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_theme_constant` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_theme_default_base_scale` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Font` | :ref:`get_theme_default_font` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_theme_default_font_size` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Font` | :ref:`get_theme_font` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_theme_font_size` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`get_theme_icon` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StyleBox` | :ref:`get_theme_stylebox` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`grab_focus` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_focus` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_color` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_color_override` **(** :ref:`StringName` name **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_constant` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_constant_override` **(** :ref:`StringName` name **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_font` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_font_override` **(** :ref:`StringName` name **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_font_size` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_font_size_override` **(** :ref:`StringName` name **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_icon` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_icon_override` **(** :ref:`StringName` name **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_stylebox` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_stylebox_override` **(** :ref:`StringName` name **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`hide` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_embedded` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_layout_rtl` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_maximize_allowed` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_using_font_oversampling` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_to_foreground` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup` **(** :ref:`Rect2i` rect=Rect2i(0, 0, 0, 0) **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_centered` **(** :ref:`Vector2i` minsize=Vector2i(0, 0) **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_centered_clamped` **(** :ref:`Vector2i` minsize=Vector2i(0, 0), :ref:`float` fallback_ratio=0.75 **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_centered_ratio` **(** :ref:`float` ratio=0.8 **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_on_parent` **(** :ref:`Rect2i` parent_rect **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_color_override` **(** :ref:`StringName` name **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_constant_override` **(** :ref:`StringName` name **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_font_override` **(** :ref:`StringName` name **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_font_size_override` **(** :ref:`StringName` name **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_icon_override` **(** :ref:`StringName` name **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_stylebox_override` **(** :ref:`StringName` name **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`request_attention` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reset_size` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_flag` **(** :ref:`Flags` flag, :ref:`bool` enabled **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_ime_active` **(** :ref:`bool` active **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_ime_position` **(** :ref:`Vector2i` position **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_layout_direction` **(** :ref:`LayoutDirection` direction **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_use_font_oversampling` **(** :ref:`bool` enable **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`show` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_theme_color_override` **(** :ref:`StringName` name, :ref:`Color` color **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_theme_constant_override` **(** :ref:`StringName` name, :ref:`int` constant **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_theme_font_override` **(** :ref:`StringName` name, :ref:`Font` font **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_theme_font_size_override` **(** :ref:`StringName` name, :ref:`int` font_size **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_theme_icon_override` **(** :ref:`StringName` name, :ref:`Texture2D` texture **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_theme_stylebox_override` **(** :ref:`StringName` name, :ref:`StyleBox` stylebox **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`begin_bulk_theme_override` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`can_draw` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`child_controls_changed` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`end_bulk_theme_override` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_contents_minimum_size` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_flag` **(** :ref:`Flags` flag **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`LayoutDirection` | :ref:`get_layout_direction` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_position_with_decorations` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_size_with_decorations` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_theme_color` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_theme_constant` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_theme_default_base_scale` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Font` | :ref:`get_theme_default_font` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_theme_default_font_size` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Font` | :ref:`get_theme_font` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_theme_font_size` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_theme_icon` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StyleBox` | :ref:`get_theme_stylebox` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_window_id` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`grab_focus` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_focus` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_color` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_color_override` **(** :ref:`StringName` name **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_constant` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_constant_override` **(** :ref:`StringName` name **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_font` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_font_override` **(** :ref:`StringName` name **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_font_size` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_font_size_override` **(** :ref:`StringName` name **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_icon` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_icon_override` **(** :ref:`StringName` name **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_stylebox` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_stylebox_override` **(** :ref:`StringName` name **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`hide` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_embedded` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_layout_rtl` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_maximize_allowed` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_using_font_oversampling` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`move_to_foreground` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup` **(** :ref:`Rect2i` rect=Rect2i(0, 0, 0, 0) **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_centered` **(** :ref:`Vector2i` minsize=Vector2i(0, 0) **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_centered_clamped` **(** :ref:`Vector2i` minsize=Vector2i(0, 0), :ref:`float` fallback_ratio=0.75 **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_centered_ratio` **(** :ref:`float` ratio=0.8 **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_exclusive` **(** :ref:`Node` from_node, :ref:`Rect2i` rect=Rect2i(0, 0, 0, 0) **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_exclusive_centered` **(** :ref:`Node` from_node, :ref:`Vector2i` minsize=Vector2i(0, 0) **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_exclusive_centered_clamped` **(** :ref:`Node` from_node, :ref:`Vector2i` minsize=Vector2i(0, 0), :ref:`float` fallback_ratio=0.75 **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_exclusive_centered_ratio` **(** :ref:`Node` from_node, :ref:`float` ratio=0.8 **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_exclusive_on_parent` **(** :ref:`Node` from_node, :ref:`Rect2i` parent_rect **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_on_parent` **(** :ref:`Rect2i` parent_rect **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_theme_color_override` **(** :ref:`StringName` name **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_theme_constant_override` **(** :ref:`StringName` name **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_theme_font_override` **(** :ref:`StringName` name **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_theme_font_size_override` **(** :ref:`StringName` name **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_theme_icon_override` **(** :ref:`StringName` name **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_theme_stylebox_override` **(** :ref:`StringName` name **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`request_attention` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reset_size` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_flag` **(** :ref:`Flags` flag, :ref:`bool` enabled **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_ime_active` **(** :ref:`bool` active **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_ime_position` **(** :ref:`Vector2i` position **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_layout_direction` **(** :ref:`LayoutDirection` direction **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_unparent_when_invisible` **(** :ref:`bool` unparent **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_use_font_oversampling` **(** :ref:`bool` enable **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`show` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -318,7 +332,7 @@ Emitted when the **Window**'s DPI changes as a result of OS-level changes (e.g. Emitted when files are dragged from the OS file manager and dropped in the game window. The argument is a list of file paths. -Note that this method only works with non-embedded windows, i.e. the main window and **Window**-derived nodes when :ref:`Viewport.gui_embed_subwindows` is disabled in the main viewport. +Note that this method only works with native windows, i.e. the main window and **Window**-derived nodes when :ref:`Viewport.gui_embed_subwindows` is disabled in the main viewport. Example usage: @@ -515,7 +529,7 @@ enum **Flags**: :ref:`Flags` **FLAG_RESIZE_DISABLED** = ``0`` -The window can't be resizing by dragging its resize grip. It's still possible to resize the window using :ref:`size`. This flag is ignored for full screen windows. Set with :ref:`unresizable`. +The window can't be resized by dragging its resize grip. It's still possible to resize the window using :ref:`size`. This flag is ignored for full screen windows. Set with :ref:`unresizable`. .. _class_Window_constant_FLAG_BORDERLESS: @@ -539,9 +553,9 @@ The window is floating on top of all other windows. This flag is ignored for ful :ref:`Flags` **FLAG_TRANSPARENT** = ``3`` -The window background can be transparent. +The window background can be transparent. Set with :ref:`transparent`. -\ **Note:** This flag has no effect if :ref:`ProjectSettings.display/window/per_pixel_transparency/allowed` is set to ``false``. Set with :ref:`transparent`. +\ **Note:** This flag has no effect if either :ref:`ProjectSettings.display/window/per_pixel_transparency/allowed`, or the window's :ref:`Viewport.transparent_bg` is set to ``false``. .. _class_Window_constant_FLAG_NO_FOCUS: @@ -557,7 +571,9 @@ The window can't be focused. No-focus window will ignore all input, except mouse :ref:`Flags` **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:`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:`transient`). + +\ **Note:** This flag has no effect in embedded windows (unless said window is a :ref:`Popup`). .. _class_Window_constant_FLAG_EXTEND_TO_TITLE: @@ -567,7 +583,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. Set with :ref:`extend_to_title`. -\ **Note:** This flag is implemented on macOS. +\ **Note:** This flag is implemented only on macOS. + +\ **Note:** This flag has no effect in embedded windows. .. _class_Window_constant_FLAG_MOUSE_PASSTHROUGH: @@ -577,6 +595,8 @@ Window content is expanded to the full size of the window. Unlike borderless win All mouse events are passed to the underlying window of the same application. +\ **Note:** This flag has no effect in embedded windows. + .. _class_Window_constant_FLAG_MAX: .. rst-class:: classref-enumeration-constant @@ -667,7 +687,7 @@ The content can be expanded horizontally. Scaling vertically will result in keep :ref:`ContentScaleAspect` **CONTENT_SCALE_ASPECT_EXPAND** = ``4`` -The content's aspect will be preserved. If the target size has different aspect from the base one, the content will stay in the to-left corner and add an extra visible area in the stretched space. +The content's aspect will be preserved. If the target size has different aspect from the base one, the content will stay in the top-left corner and add an extra visible area in the stretched space. .. rst-class:: classref-item-separator @@ -735,7 +755,7 @@ Initial window position is determined by :ref:`position` **WINDOW_INITIAL_POSITION_CENTER_PRIMARY_SCREEN** = ``1`` -Initial window position is a center of the primary screen. +Initial window position is the center of the primary screen. .. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_MAIN_WINDOW_SCREEN: @@ -743,7 +763,7 @@ Initial window position is a center of the primary screen. :ref:`WindowInitialPosition` **WINDOW_INITIAL_POSITION_CENTER_MAIN_WINDOW_SCREEN** = ``2`` -Initial window position is a center of the main window screen. +Initial window position is the center of the main window screen. .. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_OTHER_SCREEN: @@ -751,7 +771,23 @@ Initial window position is a center of the main window screen. :ref:`WindowInitialPosition` **WINDOW_INITIAL_POSITION_CENTER_OTHER_SCREEN** = ``3`` -Initial window position is a center of :ref:`current_screen` screen. +Initial window position is the center of :ref:`current_screen` screen. + +.. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_MOUSE_FOCUS: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowInitialPosition` **WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_MOUSE_FOCUS** = ``4`` + +Initial window position is the center of the screen containing the mouse pointer. + +.. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_KEYBOARD_FOCUS: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowInitialPosition` **WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_KEYBOARD_FOCUS** = ``5`` + +Initial window position is the center of the screen containing the window with the keyboard focus. .. rst-class:: classref-section-separator @@ -963,6 +999,10 @@ Needs :ref:`transient` enabled to work. If ``true``, the **Window** contents is expanded to the full size of the window, window title bar is transparent. +\ **Note:** This property is implemented only on macOS. + +\ **Note:** This property only works with native windows. + .. rst-class:: classref-item-separator ---- @@ -978,9 +1018,7 @@ If ``true``, the **Window** contents is expanded to the full size of the window, - void **set_initial_position** **(** :ref:`WindowInitialPosition` value **)** - :ref:`WindowInitialPosition` **get_initial_position** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Specifies the initial type of position for the **Window**. See :ref:`WindowInitialPosition` constants. .. rst-class:: classref-item-separator @@ -1039,6 +1077,8 @@ Set's the window's current mode. \ **Note:** Fullscreen mode is not exclusive full screen on Windows and Linux. +\ **Note:** This method only works with native windows, i.e. the main window and **Window**-derived nodes when :ref:`Viewport.gui_embed_subwindows` is disabled in the main viewport. + .. rst-class:: classref-item-separator ---- @@ -1054,10 +1094,12 @@ Set's the window's current mode. - void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enabled **)** - :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| -If ``true``, all mouse event as passed to the underlying window of the same application. See also :ref:`mouse_passthrough_polygon`. +If ``true``, all mouse events will be passed to the underlying window of the same application. See also :ref:`mouse_passthrough_polygon`. \ **Note:** This property is implemented on Linux (X11), macOS and Windows. +\ **Note:** This property only works with native windows. + .. rst-class:: classref-item-separator ---- @@ -1127,6 +1169,8 @@ Passing an empty array will disable passthrough support (all mouse events will b If ``true``, the **Window** will be considered a popup. Popups are sub-windows that don't show as separate windows in system's window manager's window list and will send close request when anything is clicked outside of them (unless :ref:`exclusive` is enabled). +\ **Note:** This property only works with native windows. + .. rst-class:: classref-item-separator ---- @@ -1144,6 +1188,10 @@ If ``true``, the **Window** will be considered a popup. Popups are sub-windows t The window's position in pixels. +If :ref:`ProjectSettings.display/window/subwindows/embed_subwindows` is ``false``, the position is in absolute screen coordinates. This typically applies to editor plugins. If the setting is ``true``, the window's position is in the coordinates of its parent :ref:`Viewport`. + +\ **Note:** This property only works if :ref:`initial_position` is set to :ref:`WINDOW_INITIAL_POSITION_ABSOLUTE`. + .. rst-class:: classref-item-separator ---- @@ -1212,7 +1260,7 @@ The name of a theme type variation used by this **Window** to look up its own th - void **set_title** **(** :ref:`String` value **)** - :ref:`String` **get_title** **(** **)** -The window's title. If the **Window** is non-embedded, title styles set in :ref:`Theme` will have no effect. +The window's title. If the **Window** is native, title styles set in :ref:`Theme` will have no effect. .. rst-class:: classref-item-separator @@ -1229,7 +1277,7 @@ The window's title. If the **Window** is non-embedded, title styles set in :ref: - void **set_transient** **(** :ref:`bool` value **)** - :ref:`bool` **is_transient** **(** **)** -If ``true``, the **Window** is transient, i.e. it's considered a child of another **Window**. Transient window is will be destroyed with its transient parent and will return focus to their parent when closed. The transient window is displayed on top of a non-exclusive full-screen parent window. Transient windows can't enter full-screen mode. +If ``true``, the **Window** is transient, i.e. it's considered a child of another **Window**. The transient window will be destroyed with its transient parent and will return focus to their parent when closed. The transient window is displayed on top of a non-exclusive full-screen parent window. Transient windows can't enter full-screen mode. Note that behavior might be different depending on the platform. @@ -1250,10 +1298,10 @@ Note that behavior might be different depending on the platform. If ``true``, the **Window**'s background can be transparent. This is best used with embedded windows. -\ **Note:** For native windows, this flag has no effect if :ref:`ProjectSettings.display/window/per_pixel_transparency/allowed` is set to ``false``. - \ **Note:** Transparency support is implemented on Linux, macOS and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities. +\ **Note:** This property has no effect if either :ref:`ProjectSettings.display/window/per_pixel_transparency/allowed`, or the window's :ref:`Viewport.transparent_bg` is set to ``false``. + .. rst-class:: classref-item-separator ---- @@ -1651,6 +1699,18 @@ See :ref:`Control.get_theme_color` for det ---- +.. _class_Window_method_get_window_id: + +.. rst-class:: classref-method + +:ref:`int` **get_window_id** **(** **)** |const| + +Returns the ID of the window. + +.. rst-class:: classref-item-separator + +---- + .. _class_Window_method_grab_focus: .. rst-class:: classref-method @@ -1921,9 +1981,7 @@ Moves the **Window** on top of other windows and focuses it. void **popup** **(** :ref:`Rect2i` rect=Rect2i(0, 0, 0, 0) **)** -Shows the **Window** and makes it transient (see :ref:`transient`). If ``rect`` is provided, it will be set as the **Window**'s size. - -Fails if called on the main window. +Shows the **Window** and makes it transient (see :ref:`transient`). If ``rect`` is provided, it will be set as the **Window**'s size. Fails if called on the main window. .. rst-class:: classref-item-separator @@ -1935,9 +1993,7 @@ Fails if called on the main window. void **popup_centered** **(** :ref:`Vector2i` minsize=Vector2i(0, 0) **)** -Popups the **Window** at the center of the current screen, with optionally given minimum size. - -If the **Window** is embedded, it will be centered in the parent :ref:`Viewport` instead. +Popups the **Window** at the center of the current screen, with optionally given minimum size. If the **Window** is embedded, it will be centered in the parent :ref:`Viewport` instead. \ **Note:** Calling it with the default value of ``minsize`` is equivalent to calling it with :ref:`size`. @@ -1951,9 +2007,7 @@ If the **Window** is embedded, it will be centered in the parent :ref:`Viewport< void **popup_centered_clamped** **(** :ref:`Vector2i` minsize=Vector2i(0, 0), :ref:`float` fallback_ratio=0.75 **)** -Popups the **Window** centered inside its parent **Window**. - -\ ``fallback_ratio`` determines the maximum size of the **Window**, in relation to its parent. +Popups the **Window** centered inside its parent **Window**. ``fallback_ratio`` determines the maximum size of the **Window**, in relation to its parent. \ **Note:** Calling it with the default value of ``minsize`` is equivalent to calling it with :ref:`size`. @@ -1973,15 +2027,83 @@ Popups the **Window** centered inside its parent **Window** and sets its size as ---- +.. _class_Window_method_popup_exclusive: + +.. rst-class:: classref-method + +void **popup_exclusive** **(** :ref:`Node` from_node, :ref:`Rect2i` rect=Rect2i(0, 0, 0, 0) **)** + +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`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Window_method_popup_exclusive_centered: + +.. rst-class:: classref-method + +void **popup_exclusive_centered** **(** :ref:`Node` from_node, :ref:`Vector2i` minsize=Vector2i(0, 0) **)** + +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`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Window_method_popup_exclusive_centered_clamped: + +.. rst-class:: classref-method + +void **popup_exclusive_centered_clamped** **(** :ref:`Node` from_node, :ref:`Vector2i` minsize=Vector2i(0, 0), :ref:`float` fallback_ratio=0.75 **)** + +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`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Window_method_popup_exclusive_centered_ratio: + +.. rst-class:: classref-method + +void **popup_exclusive_centered_ratio** **(** :ref:`Node` from_node, :ref:`float` ratio=0.8 **)** + +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`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Window_method_popup_exclusive_on_parent: + +.. rst-class:: classref-method + +void **popup_exclusive_on_parent** **(** :ref:`Node` from_node, :ref:`Rect2i` parent_rect **)** + +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`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Window_method_popup_on_parent: .. rst-class:: classref-method void **popup_on_parent** **(** :ref:`Rect2i` parent_rect **)** -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 @@ -2131,6 +2253,20 @@ Sets layout direction and text writing direction. Right-to-left layouts are nece ---- +.. _class_Window_method_set_unparent_when_invisible: + +.. rst-class:: classref-method + +void **set_unparent_when_invisible** **(** :ref:`bool` unparent **)** + +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. + +.. rst-class:: classref-item-separator + +---- + .. _class_Window_method_set_use_font_oversampling: .. rst-class:: classref-method diff --git a/classes/class_workerthreadpool.rst b/classes/class_workerthreadpool.rst index 0c53c112c5a..f889dbd089b 100644 --- a/classes/class_workerthreadpool.rst +++ b/classes/class_workerthreadpool.rst @@ -12,9 +12,68 @@ WorkerThreadPool **Inherits:** :ref:`Object` -.. container:: contribute +A singleton that allocates some :ref:`Thread`\ s on startup, used to offload tasks to these threads. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +The **WorkerThreadPool** singleton allocates a set of :ref:`Thread`\ s (called worker threads) on project startup and provides methods for offloading tasks to them. This can be used for simple multithreading without having to create :ref:`Thread`\ s. + +Tasks hold the :ref:`Callable` to be run by the threads. **WorkerThreadPool** can be used to create regular tasks, which will be taken by one worker thread, or group tasks, which can be distributed between multiple worker threads. Group tasks execute the :ref:`Callable` multiple times, which makes them useful for iterating over a lot of elements, such as the enemies in an arena. + +Here's a sample on how to offload an expensive function to worker threads: + + +.. tabs:: + + .. code-tab:: gdscript + + var enemies = [] # An array to be filled with enemies. + + func process_enemy_ai(enemy_index): + var processed_enemy = enemies[enemy_index] + # Expensive logic... + + func _process(delta): + var task_id = WorkerThreadPool.add_group_task(process_enemy_ai, enemies.size()) + # Other code... + WorkerThreadPool.wait_for_group_task_completion(task_id) + # Other code that depends on the enemy AI already being processed. + + .. code-tab:: csharp + + private List _enemies = new List(); // A list to be filled with enemies. + + private void ProcessEnemyAI(int enemyIndex) + { + Node processedEnemy = _enemies[enemyIndex]; + // Expensive logic here. + } + + public override void _Process(double delta) + { + long taskId = WorkerThreadPool.AddGroupTask(Callable.From(ProcessEnemyAI), _enemies.Count); + // Other code... + WorkerThreadPool.WaitForGroupTaskCompletion(taskId); + // Other code that depends on the enemy AI already being processed. + } + + + +The above code relies on the number of elements in the ``enemies`` array remaining constant during the multithreaded part. + +\ **Note:** Using this singleton could affect performance negatively if the task being distributed between threads is not computationally expensive. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Using multiple threads <../tutorials/performance/using_multiple_threads>` + +- :doc:`Thread-safe APIs <../tutorials/performance/thread_safe_apis>` .. rst-class:: classref-reftable-group @@ -24,21 +83,21 @@ Methods .. table:: :widths: auto - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`add_group_task` **(** :ref:`Callable` action, :ref:`int` elements, :ref:`int` tasks_needed=-1, :ref:`bool` high_priority=false, :ref:`String` description="" **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`add_task` **(** :ref:`Callable` action, :ref:`bool` high_priority=false, :ref:`String` description="" **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_group_processed_element_count` **(** :ref:`int` group_id **)** |const| | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_group_task_completed` **(** :ref:`int` group_id **)** |const| | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_task_completed` **(** :ref:`int` task_id **)** |const| | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`wait_for_group_task_completion` **(** :ref:`int` group_id **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`wait_for_task_completion` **(** :ref:`int` task_id **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`add_group_task` **(** :ref:`Callable` action, :ref:`int` elements, :ref:`int` tasks_needed=-1, :ref:`bool` high_priority=false, :ref:`String` description="" **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`add_task` **(** :ref:`Callable` action, :ref:`bool` high_priority=false, :ref:`String` description="" **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_group_processed_element_count` **(** :ref:`int` group_id **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_group_task_completed` **(** :ref:`int` group_id **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_task_completed` **(** :ref:`int` task_id **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`wait_for_group_task_completion` **(** :ref:`int` group_id **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`wait_for_task_completion` **(** :ref:`int` task_id **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -55,9 +114,11 @@ Method Descriptions :ref:`int` **add_group_task** **(** :ref:`Callable` action, :ref:`int` elements, :ref:`int` tasks_needed=-1, :ref:`bool` high_priority=false, :ref:`String` description="" **)** -.. container:: contribute +Adds ``action`` as a group task to be executed by the worker threads. The :ref:`Callable` will be called a number of times based on ``elements``, with the first thread calling it with the value ``0`` as a parameter, and each consecutive execution incrementing this value by 1 until it reaches ``element - 1``. - There is currently no description for this method. Please help us by :ref:`contributing one `! +The number of threads the task is distributed to is defined by ``tasks_needed``, where the default value ``-1`` means it is distributed to all worker threads. ``high_priority`` determines if the task has a high priority or a low priority (default). You can optionally provide a ``description`` to help with debugging. + +Returns a group task ID that can be used by other methods. .. rst-class:: classref-item-separator @@ -69,9 +130,9 @@ Method Descriptions :ref:`int` **add_task** **(** :ref:`Callable` action, :ref:`bool` high_priority=false, :ref:`String` description="" **)** -.. container:: contribute +Adds ``action`` as a task to be executed by a worker thread. ``high_priority`` determines if the task has a high priority or a low priority (default). You can optionally provide a ``description`` to help with debugging. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns a task ID that can be used by other methods. .. rst-class:: classref-item-separator @@ -83,9 +144,9 @@ Method Descriptions :ref:`int` **get_group_processed_element_count** **(** :ref:`int` group_id **)** |const| -.. container:: contribute +Returns how many times the :ref:`Callable` of the group task with the given ID has already been executed by the worker threads. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** If a thread has started executing the :ref:`Callable` but is yet to finish, it won't be counted. .. rst-class:: classref-item-separator @@ -97,9 +158,7 @@ Method Descriptions :ref:`bool` **is_group_task_completed** **(** :ref:`int` group_id **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if the group task with the given ID is completed. .. rst-class:: classref-item-separator @@ -111,9 +170,7 @@ Method Descriptions :ref:`bool` **is_task_completed** **(** :ref:`int` task_id **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if the task with the given ID is completed. .. rst-class:: classref-item-separator @@ -125,9 +182,7 @@ Method Descriptions void **wait_for_group_task_completion** **(** :ref:`int` group_id **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Pauses the thread that calls this method until the group task with the given ID is completed. .. rst-class:: classref-item-separator @@ -137,11 +192,15 @@ void **wait_for_group_task_completion** **(** :ref:`int` group_id **) .. rst-class:: classref-method -void **wait_for_task_completion** **(** :ref:`int` task_id **)** +:ref:`Error` **wait_for_task_completion** **(** :ref:`int` task_id **)** + +Pauses the thread that calls this method until the task with the given ID is completed. + +Returns :ref:`@GlobalScope.OK` if the task could be successfully awaited. -.. container:: contribute +Returns :ref:`@GlobalScope.ERR_INVALID_PARAMETER` if a task with the passed ID does not exist (maybe because it was already awaited and disposed of). - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns :ref:`@GlobalScope.ERR_BUSY` if the call is made from another running task and, due to task scheduling, the task to await is at a lower level in the call stack and therefore can't progress. This is an advanced situation that should only matter when some tasks depend on others. .. |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_world2d.rst b/classes/class_world2d.rst index 071d970bb9d..40c9377cd81 100644 --- a/classes/class_world2d.rst +++ b/classes/class_world2d.rst @@ -12,14 +12,14 @@ World2D **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Class that has everything pertaining to a 2D world. +A resource that holds all components of a 2D world, such as a canvas and a physics space. .. rst-class:: classref-introduction-group Description ----------- -Class that has everything pertaining to a 2D world. A physics space, a visual scenario and a sound space. 2D nodes register their resources into the current 2D world. +Class that has everything pertaining to a 2D world: A physics space, a canvas, and a sound space. 2D nodes register their resources into the current 2D world. .. rst-class:: classref-introduction-group diff --git a/classes/class_world3d.rst b/classes/class_world3d.rst index 78fb5151fab..236382b22d9 100644 --- a/classes/class_world3d.rst +++ b/classes/class_world3d.rst @@ -12,14 +12,14 @@ World3D **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Class that has everything pertaining to a world. +A resource that holds all components of a 3D world, such as a visual scenario and a physics space. .. rst-class:: classref-introduction-group Description ----------- -Class that has everything pertaining to a world. A physics space, a visual scenario and a sound space. Node3D nodes register their resources into the current world. +Class that has everything pertaining to a world: A physics space, a visual scenario, and a sound space. 3D nodes register their resources into the current 3D world. .. rst-class:: classref-introduction-group diff --git a/classes/class_worldboundaryshape2d.rst b/classes/class_worldboundaryshape2d.rst index 6abcb039738..d9b9794ef3b 100644 --- a/classes/class_worldboundaryshape2d.rst +++ b/classes/class_worldboundaryshape2d.rst @@ -12,16 +12,14 @@ WorldBoundaryShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -World boundary (infinite plane) shape resource for 2D physics. +A 2D world boundary (half-plane) shape used for physics collision. .. rst-class:: classref-introduction-group Description ----------- -2D world boundary shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. **WorldBoundaryShape2D** works like an infinite plane and will not allow any physics body to go to the negative side. Note that the :ref:`normal` matters; anything "below" the plane will collide with it. If the **WorldBoundaryShape2D** is used in a :ref:`PhysicsBody2D`, it will cause colliding objects placed "below" it to teleport "above" the plane. - -\ **Performance:** Being a primitive collision shape, **WorldBoundaryShape2D** is fast to check collisions against. +A 2D world boundary shape, intended for use in physics. **WorldBoundaryShape2D** works like an infinite straight line that forces all physics bodies to stay above it. The line's normal determines which direction is considered as "above" and in the editor, the smaller line over it represents this direction. It can for example be used for endless flat floors. .. rst-class:: classref-reftable-group diff --git a/classes/class_worldboundaryshape3d.rst b/classes/class_worldboundaryshape3d.rst index 592abcdb6e4..56ff177fbd7 100644 --- a/classes/class_worldboundaryshape3d.rst +++ b/classes/class_worldboundaryshape3d.rst @@ -12,16 +12,14 @@ WorldBoundaryShape3D **Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -World boundary (infinite plane) shape resource for 3D physics. +A 3D world boundary (half-space) shape used for physics collision. .. rst-class:: classref-introduction-group Description ----------- -3D world boundary shape to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. **WorldBoundaryShape3D** works like an infinite plane and will not allow any physics body to go to the negative side. Note that the :ref:`Plane`'s normal matters; anything "below" the plane will collide with it. If the **WorldBoundaryShape3D** is used in a :ref:`PhysicsBody3D`, it will cause colliding objects placed "below" it to teleport "above" the plane. - -\ **Performance:** Being a primitive collision shape, **WorldBoundaryShape3D** is fast to check collisions against. +A 3D world boundary shape, intended for use in physics. **WorldBoundaryShape3D** works like an infinite plane that forces all physics bodies to stay above it. The :ref:`plane`'s normal determines which direction is considered as "above" and in the editor, the line over the plane represents this direction. It can for example be used for endless flat floors. .. rst-class:: classref-reftable-group diff --git a/classes/class_x509certificate.rst b/classes/class_x509certificate.rst index d6fafacc1b9..a715e0d0e0a 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 an 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-reftable-group @@ -31,11 +31,15 @@ Methods .. table:: :widths: auto - +---------------------------------------+---------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`save` **(** :ref:`String` path **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------+ + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load_from_string` **(** :ref:`String` string **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save` **(** :ref:`String` path **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`save_to_string` **(** **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -58,6 +62,18 @@ Loads a certificate from ``path`` ("\*.crt" file). ---- +.. _class_X509Certificate_method_load_from_string: + +.. rst-class:: classref-method + +:ref:`Error` **load_from_string** **(** :ref:`String` string **)** + +Loads a certificate from the given ``string``. + +.. rst-class:: classref-item-separator + +---- + .. _class_X509Certificate_method_save: .. rst-class:: classref-method @@ -66,6 +82,18 @@ Loads a certificate from ``path`` ("\*.crt" file). Saves a certificate to the given ``path`` (should be a "\*.crt" file). +.. rst-class:: classref-item-separator + +---- + +.. _class_X509Certificate_method_save_to_string: + +.. rst-class:: classref-method + +:ref:`String` **save_to_string** **(** **)** + +Returns a string representation of the certificate, or an empty string if the certificate is invalid. + .. |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_xmlparser.rst b/classes/class_xmlparser.rst index 492c4196f3f..70d611c3e5e 100644 --- a/classes/class_xmlparser.rst +++ b/classes/class_xmlparser.rst @@ -12,6 +12,8 @@ XMLParser **Inherits:** :ref:`RefCounted` **<** :ref:`Object` +Provides a low-level interface for creating parsers for XML files. + Low-level class for creating parsers for `XML `__ files. .. rst-class:: classref-introduction-group @@ -19,7 +21,7 @@ Low-level class for creating parsers for `XML `__ files. This class can serve as base to make custom XML parsers. .. rst-class:: classref-reftable-group diff --git a/classes/class_xrinterface.rst b/classes/class_xrinterface.rst index 51e0ba98a83..585c73f5560 100644 --- a/classes/class_xrinterface.rst +++ b/classes/class_xrinterface.rst @@ -71,6 +71,8 @@ Methods +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_supported_environment_blend_modes` **(** **)** | +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_system_info` **(** **)** | + +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`TrackingStatus` | :ref:`get_tracking_status` **(** **)** |const| | +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform3D` | :ref:`get_transform_for_view` **(** :ref:`int` view, :ref:`Transform3D` cam_transform **)** | @@ -286,7 +288,7 @@ Player is free to move around, full positional tracking. :ref:`PlayAreaMode` **XR_PLAY_AREA_STAGE** = ``4`` -Same as roomscale but origin point is fixed to the center of the physical space, XRServer.center_on_hmd disabled. +Same as :ref:`XR_PLAY_AREA_ROOMSCALE` but origin point is fixed to the center of the physical space, :ref:`XRServer.center_on_hmd` disabled. .. rst-class:: classref-item-separator @@ -471,6 +473,20 @@ Returns the an array of supported environment blend modes, see :ref:`Environment ---- +.. _class_XRInterface_method_get_system_info: + +.. rst-class:: classref-method + +:ref:`Dictionary` **get_system_info** **(** **)** + +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. + +.. rst-class:: classref-item-separator + +---- + .. _class_XRInterface_method_get_tracking_status: .. rst-class:: classref-method @@ -493,7 +509,7 @@ Returns the transform for a view/eye. \ ``view`` is the view/eye index. -\ ``cam_transform`` is the transform that maps device coordinates to scene coordinates, typically the global_transform of the current XROrigin3D. +\ ``cam_transform`` is the transform that maps device coordinates to scene coordinates, typically the :ref:`Node3D.global_transform` of the current XROrigin3D. .. rst-class:: classref-item-separator @@ -582,9 +598,9 @@ Sets the active environment blend mode. :: func _ready(): - var xr_interface : XRInterface = XRServer.find_interface("OpenXR") + var xr_interface: XRInterface = XRServer.find_interface("OpenXR") if xr_interface and xr_interface.is_initialized(): - var vp : Viewport = get_viewport() + var vp: Viewport = get_viewport() vp.use_xr = true var acceptable_modes = [ XRInterface.XR_ENV_BLEND_MODE_OPAQUE, XRInterface.XR_ENV_BLEND_MODE_ADDITIVE ] var modes = xr_interface.get_supported_environment_blend_modes() diff --git a/classes/class_xrinterfaceextension.rst b/classes/class_xrinterfaceextension.rst index d2e120554e2..4561b5aa30f 100644 --- a/classes/class_xrinterfaceextension.rst +++ b/classes/class_xrinterfaceextension.rst @@ -58,6 +58,8 @@ Methods +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`_get_suggested_tracker_names` **(** **)** |virtual| |const| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_system_info` **(** **)** |virtual| |const| | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`TrackingStatus` | :ref:`_get_tracking_status` **(** **)** |virtual| |const| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform3D` | :ref:`_get_transform_for_view` **(** :ref:`int` view, :ref:`Transform3D` cam_transform **)** |virtual| | @@ -278,6 +280,18 @@ Returns a :ref:`PackedStringArray` with tracker names c ---- +.. _class_XRInterfaceExtension_method__get_system_info: + +.. rst-class:: classref-method + +:ref:`Dictionary` **_get_system_info** **(** **)** |virtual| |const| + +Returns a :ref:`Dictionary` with system informationr elated to this interface. + +.. rst-class:: classref-item-separator + +---- + .. _class_XRInterfaceExtension_method__get_tracking_status: .. rst-class:: classref-method @@ -394,7 +408,7 @@ Called if this is our primary **XRInterfaceExtension** before we start processin void **_pre_render** **(** **)** |virtual| -Called if this **XRInterfaceExtension** is active before rendering starts, most XR interfaces will sync tracking at this point in time. +Called if this **XRInterfaceExtension** is active before rendering starts. Most XR interfaces will sync tracking at this point in time. .. rst-class:: classref-item-separator @@ -406,7 +420,7 @@ Called if this **XRInterfaceExtension** is active before rendering starts, most void **_process** **(** **)** |virtual| -Called if this **XRInterfaceExtension** is active before our physics and game process is called. most XR interfaces will update its :ref:`XRPositionalTracker`\ s at this point in time. +Called if this **XRInterfaceExtension** is active before our physics and game process is called. Most XR interfaces will update its :ref:`XRPositionalTracker`\ s at this point in time. .. rst-class:: classref-item-separator diff --git a/classes/class_xrserver.rst b/classes/class_xrserver.rst index b0fabe6d579..ce89a78e0fb 100644 --- a/classes/class_xrserver.rst +++ b/classes/class_xrserver.rst @@ -36,11 +36,13 @@ Properties .. table:: :widths: auto - +---------------------------------------+---------------------------------------------------------------------+---------+ - | :ref:`XRInterface` | :ref:`primary_interface` | | - +---------------------------------------+---------------------------------------------------------------------+---------+ - | :ref:`float` | :ref:`world_scale` | ``1.0`` | - +---------------------------------------+---------------------------------------------------------------------+---------+ + +---------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`XRInterface` | :ref:`primary_interface` | | + +---------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Transform3D` | :ref:`world_origin` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | + +---------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`float` | :ref:`world_scale` | ``1.0`` | + +---------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -274,6 +276,25 @@ The primary :ref:`XRInterface` currently bound to the **XRSer ---- +.. _class_XRServer_property_world_origin: + +.. rst-class:: classref-property + +:ref:`Transform3D` **world_origin** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_world_origin** **(** :ref:`Transform3D` value **)** +- :ref:`Transform3D` **get_world_origin** **(** **)** + +The current origin of our tracking space in the virtual world. This is used by the renderer to properly position the camera with new tracking data. + +\ **Note:** This property is managed by the current :ref:`XROrigin3D` node. It is exposed for access from GDExtensions. + +.. rst-class:: classref-item-separator + +---- + .. _class_XRServer_property_world_scale: .. rst-class:: classref-property diff --git a/classes/class_zippacker.rst b/classes/class_zippacker.rst index 314fdbac849..7ad5e75b287 100644 --- a/classes/class_zippacker.rst +++ b/classes/class_zippacker.rst @@ -76,7 +76,7 @@ enum **ZipAppend**: :ref:`ZipAppend` **APPEND_CREATE** = ``0`` - +Create a new zip archive at the given path. .. _class_ZIPPacker_constant_APPEND_CREATEAFTER: @@ -84,7 +84,7 @@ enum **ZipAppend**: :ref:`ZipAppend` **APPEND_CREATEAFTER** = ``1`` - +Append a new zip archive to the end of the already existing file at the given path. .. _class_ZIPPacker_constant_APPEND_ADDINZIP: @@ -92,7 +92,7 @@ enum **ZipAppend**: :ref:`ZipAppend` **APPEND_ADDINZIP** = ``2`` - +Add new files to the existing zip archive at the given path. .. rst-class:: classref-section-separator diff --git a/classes/index.rst b/classes/index.rst index f59f1761fd0..b09a656fec0 100644 --- a/classes/index.rst +++ b/classes/index.rst @@ -92,7 +92,6 @@ Nodes class_editorfiledialog class_editorfilesystem class_editorinspector - class_editorinterface class_editorplugin class_editorproperty class_editorresourcepicker @@ -288,6 +287,7 @@ Resources class_animationnodestatemachine class_animationnodestatemachineplayback class_animationnodestatemachinetransition + class_animationnodesub2 class_animationnodesync class_animationnodetimescale class_animationnodetimeseek @@ -386,12 +386,14 @@ Resources class_gltfanimation class_gltfbufferview class_gltfcamera + class_gltfcollider class_gltfdocument class_gltfdocumentextension class_gltfdocumentextensionconvertimportermesh class_gltflight class_gltfmesh class_gltfnode + class_gltfphysicsbody class_gltfskeleton class_gltfskin class_gltfspecgloss @@ -438,6 +440,7 @@ Resources class_navigationpolygon class_noise class_noisetexture2d + class_noisetexture3d class_occluder3d class_occluderpolygon2d class_oggpacketsequence @@ -656,7 +659,6 @@ Other objects class_object class_aescontext - class_animationtrackeditplugin class_astar2d class_astar3d class_astargrid2d @@ -681,16 +683,25 @@ Other objects class_editordebuggerplugin class_editordebuggersession class_editorexportplatform + class_editorexportplatformandroid + class_editorexportplatformios + class_editorexportplatformlinuxbsd + class_editorexportplatformmacos + class_editorexportplatformpc + class_editorexportplatformweb + class_editorexportplatformwindows class_editorexportplugin class_editorfeatureprofile class_editorfilesystemdirectory class_editorfilesystemimportformatsupportquery class_editorimportplugin class_editorinspectorplugin + class_editorinterface class_editornode3dgizmo class_editorpaths class_editorresourceconversionplugin class_editorresourcepreviewgenerator + class_editorresourcetooltipplugin class_editorsceneformatimporter class_editorsceneformatimporterblend class_editorsceneformatimporterfbx @@ -736,6 +747,7 @@ Other objects class_lightmapperrd class_mainloop class_marshalls + class_meshconvexdecompositionsettings class_meshdatatool class_methodtweener class_mobilevrinterface @@ -877,6 +889,64 @@ Other objects class_zippacker class_zipreader +Editor-only +=========== + +.. toctree:: + :maxdepth: 1 + :name: toc-class-ref-editors + + class_editorcommandpalette + class_editordebuggerplugin + class_editordebuggersession + class_editorexportplatform + class_editorexportplatformandroid + class_editorexportplatformios + class_editorexportplatformlinuxbsd + class_editorexportplatformmacos + class_editorexportplatformpc + class_editorexportplatformweb + class_editorexportplatformwindows + class_editorexportplugin + class_editorfeatureprofile + class_editorfiledialog + class_editorfilesystem + class_editorfilesystemdirectory + class_editorfilesystemimportformatsupportquery + class_editorimportplugin + class_editorinspector + class_editorinspectorplugin + class_editorinterface + class_editornode3dgizmo + class_editornode3dgizmoplugin + class_editorpaths + class_editorplugin + class_editorproperty + class_editorresourceconversionplugin + class_editorresourcepicker + class_editorresourcepreview + class_editorresourcepreviewgenerator + class_editorresourcetooltipplugin + class_editorsceneformatimporter + class_editorsceneformatimporterblend + class_editorsceneformatimporterfbx + class_editorsceneformatimportergltf + class_editorscenepostimport + class_editorscenepostimportplugin + class_editorscript + class_editorscriptpicker + class_editorselection + class_editorsettings + class_editorspinslider + class_editorsyntaxhighlighter + class_editortranslationparserplugin + class_editorundoredomanager + class_editorvcsinterface + class_filesystemdock + class_scriptcreatedialog + class_scripteditor + class_scripteditorbase + Variant types ============= @@ -884,6 +954,7 @@ Variant types :maxdepth: 1 :name: toc-class-ref-variants + class_variant class_aabb class_array class_basis @@ -915,7 +986,6 @@ Variant types class_stringname class_transform2d class_transform3d - class_variant class_vector2 class_vector2i class_vector3 diff --git a/contributing/development/best_practices_for_engine_contributors.rst b/contributing/development/best_practices_for_engine_contributors.rst index 48f730dad48..87fdf14a000 100644 --- a/contributing/development/best_practices_for_engine_contributors.rst +++ b/contributing/development/best_practices_for_engine_contributors.rst @@ -227,14 +227,16 @@ link libraries dynamically. Instead, we bundle them in our source tree. .. image:: img/best_practices8.png As a result, we are very picky with what goes in, and we tend to prefer smaller -libraries (in fact, single header ones are our favorite). Only in cases where -there is no other choice we end up bundling something larger. +libraries (single header ones are our favorite). We will only bundle something +larger if there is no other choice. -Also, libraries must use a permissive enough license to be included into Godot. +.. _doc_best_practices_for_engine_contributors_license_compliance: + +Libraries must use a permissive enough license to be included into Godot. Some examples of acceptable licenses are Apache 2.0, BSD, MIT, ISC, and MPL 2.0. In particular, we cannot accept libraries licensed under the GPL or LGPL since these licenses effectively disallow static linking in proprietary software (which Godot is distributed as in most exported projects). This requirement also applies to the editor, since we may want to run it on iOS in the long term. -Since iOS doesn't support dynamic linking, static linking the only option on +Since iOS doesn't support dynamic linking, static linking is the only option on that platform. diff --git a/contributing/development/compiling/compiling_for_ios.rst b/contributing/development/compiling/compiling_for_ios.rst index a79c0ea4076..a5b2257cc6b 100644 --- a/contributing/development/compiling/compiling_for_ios.rst +++ b/contributing/development/compiling/compiling_for_ios.rst @@ -82,7 +82,7 @@ should be placed in ``libgodot.ios.debug.xcframework`` and ``libgodot.ios.releas $ lipo -create libgodot.ios.debug.arm64.simulator.a libgodot.ios.debug.x86_64.simulator.a -output ios_xcode/libgodot.ios.debug.xcframework/ios-arm64_x86_64-simulator/libgodot.a $ cp libgodot.ios.opt.arm64.a ios_xcode/libgodot.ios.release.xcframework/ios-arm64/libgodot.a - $ lipo -create libgodot.ios.opt.arm64.simulator.a libgodot.ios.opt.x86_64.simulator.a -output ios_xcode/libgodot.ios.release.xcframework/ios-arm64_x86_64-simulator/libgodot.a + $ lipo -create libgodot.ios.opt.arm64.simulator.a libgodot.ios.opt.x86_64.simulator.a -output ios_xcode/libgodot.ios.release.xcframework/ios-arm64_x86_64-simulator/libgodot.a The MoltenVK static ``.xcframework`` folder must also be placed in the ``ios_xcode`` folder once it has been created. diff --git a/contributing/development/compiling/compiling_for_linuxbsd.rst b/contributing/development/compiling/compiling_for_linuxbsd.rst index adcb4637de7..e7633dad8b4 100644 --- a/contributing/development/compiling/compiling_for_linuxbsd.rst +++ b/contributing/development/compiling/compiling_for_linuxbsd.rst @@ -247,7 +247,7 @@ Start a terminal, go to the root dir of the engine source code and type: Prior to Godot 4.0, the Linux/\*BSD target was called ``x11`` instead of ``linuxbsd``. If you are looking to compile Godot 3.x, make sure to use the - `stable branch of this documentation `__. + `3.x branch of this documentation `__. If all goes well, the resulting binary executable will be placed in the "bin" subdirectory. This executable file contains the whole engine and @@ -436,7 +436,7 @@ listed in the :ref:`doc_compiling_for_linuxbsd_oneliners`: +------------------+-----------------------------------------------------------------------------------------------------------+ | **Fedora** | :: | | | | -| | sudo dnf install embree-devel enet-devel glslang-devel graphite2-devel harfbuzz-devel libicu-devel \ | +| | sudo dnf install embree3-devel enet-devel glslang-devel graphite2-devel harfbuzz-devel libicu-devel \ | | | libsquish-devel libtheora-devel libvorbis-devel libwebp-devel libzstd-devel mbedtls-devel \ | | | miniupnpc-devel | +------------------+-----------------------------------------------------------------------------------------------------------+ diff --git a/contributing/development/compiling/introduction_to_the_buildsystem.rst b/contributing/development/compiling/introduction_to_the_buildsystem.rst index a56a58eed59..4f7775bd446 100644 --- a/contributing/development/compiling/introduction_to_the_buildsystem.rst +++ b/contributing/development/compiling/introduction_to_the_buildsystem.rst @@ -365,6 +365,27 @@ aforementioned ``-j`` option for all future builds: $env:SCONSFLAGS="-j4" +SCU (single compilation unit) build +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Regular builds tend to be bottlenecked by including large numbers of headers +in each compilation translation unit. Primarily to speed up development (rather +than for production builds), Godot offers a "single compilation unit" build +(aka "Unity / Jumbo" build). + +For the folders accelerated by this option, multiple ``.cpp`` files are +compiled in each translation unit, so headers can be shared between multiple +files, which can dramatically decrease build times. + +To make a SCU build, use the ``scu_build=yes`` SCons option. + +.. note:: When developing a Pull Request using SCU builds, be sure to make a + regular build prior to submitting the PR. This is because SCU builds + by nature include headers from earlier ``.cpp`` files in the + translation unit, therefore won't catch all the includes you will + need in a regular build. The CI will catch these errors but it will + usually be faster to catch them on a local build on your machine. + Export templates ---------------- diff --git a/contributing/development/configuring_an_ide/img/rider_attach_to_process.webp b/contributing/development/configuring_an_ide/img/rider_attach_to_process.webp new file mode 100644 index 00000000000..e6b05f817be Binary files /dev/null and b/contributing/development/configuring_an_ide/img/rider_attach_to_process.webp differ diff --git a/contributing/development/configuring_an_ide/img/rider_configurations.webp b/contributing/development/configuring_an_ide/img/rider_configurations.webp new file mode 100644 index 00000000000..686c6a275ae Binary files /dev/null and b/contributing/development/configuring_an_ide/img/rider_configurations.webp differ diff --git a/contributing/development/configuring_an_ide/img/rider_configurations_changed.webp b/contributing/development/configuring_an_ide/img/rider_configurations_changed.webp new file mode 100644 index 00000000000..0436dafc7b2 Binary files /dev/null and b/contributing/development/configuring_an_ide/img/rider_configurations_changed.webp differ diff --git a/contributing/development/configuring_an_ide/img/rider_run_debug.webp b/contributing/development/configuring_an_ide/img/rider_run_debug.webp new file mode 100644 index 00000000000..e6e87cea691 Binary files /dev/null and b/contributing/development/configuring_an_ide/img/rider_run_debug.webp differ diff --git a/contributing/development/configuring_an_ide/index.rst b/contributing/development/configuring_an_ide/index.rst index 32bb8bb9b63..b8624988477 100644 --- a/contributing/development/configuring_an_ide/index.rst +++ b/contributing/development/configuring_an_ide/index.rst @@ -19,6 +19,7 @@ Development Environment), here are setup instructions for some popular ones: code_blocks kdevelop qt_creator + rider visual_studio visual_studio_code xcode diff --git a/contributing/development/configuring_an_ide/rider.rst b/contributing/development/configuring_an_ide/rider.rst new file mode 100644 index 00000000000..af7daf57167 --- /dev/null +++ b/contributing/development/configuring_an_ide/rider.rst @@ -0,0 +1,69 @@ +.. _doc_configuring_an_ide_rider: + +Rider +===== + +`Rider `_ is a commercial +`JetBrains `_ IDE for C# and C++ that uses the same solution system as Visual Studio. + +Importing the project +--------------------- + +.. tip:: If you already use Visual Studio as your main IDE, you can use the same solution file in Rider. + Rider and Visual Studio use the same solution format, so you can switch between the two IDEs without rebuilding the solution file. + Debug configurations need to be changed when going from one IDE to another. + +Rider requires a solution file to work on a project. While Godot does not come +with the solution file, it can be generated using SCons. + +- Navigate to the Godot root folder and open a Command Prompt or PowerShell window. +- Copy, paste and run the next command to generate the solution. + +:: + + scons platform=windows vsproj=yes dev_build=yes + +The ``vsproj`` parameter signals that you want Visual Studio solution generated. +The ``dev_build`` parameter makes sure the debug symbols are included, allowing to e.g. step through code using breakpoints. + +- If you have Rider setup as your main IDE for .sln, you can now open the project by double-clicking on the ``godot.sln`` in the project root + or by using the **Open** option inside of Rider. + +.. note:: Rider could fail to build the first time you open the project. + If that is the case, you can close Rider and open the solution in Visual Studio, build it, close Visual Studio, + and open the solution in Rider again. You are now able to build the project from Rider. + +Compiling and debugging the project +----------------------------------- +Rider comes with a built-in debugger that can be used to debug the Godot project. You can launch the debugger +by pressing the **Debug** icon at the top of the screen, this only works for the Project manager, +if you want to debug the editor, you need to configure the debugger first. + +.. figure:: img/rider_run_debug.webp + :align: center + +- Click on the **Godot > Edit Configurations** option at the top of the screen. + +.. figure:: img/rider_configurations.webp + :align: center + +- Delete what is under **Program arguments** and paste the following line: + +:: + + --e --path + +This will tell the executable to debug the specified project without using the project manager. +Use the root path to the project folder, not ``project.godot`` file path. + +.. figure:: img/rider_configurations_changed.webp + :align: center + +- Finally click on apply and ok to save the changes. + +- You can now launch the debugger by pressing the **Debug** icon at the top of the screen and it will open the project to debug. + +Alternatively you can use **Run > Attach to Process** to attach the debugger to a running Godot instance. + +.. figure:: img/rider_attach_to_process.webp + :align: center diff --git a/contributing/development/core_and_modules/internal_rendering_architecture.rst b/contributing/development/core_and_modules/internal_rendering_architecture.rst index da61b0ae0cc..dad9baa6ae2 100644 --- a/contributing/development/core_and_modules/internal_rendering_architecture.rst +++ b/contributing/development/core_and_modules/internal_rendering_architecture.rst @@ -311,7 +311,7 @@ this. ensure shader compilation doesn't become too slow. If you use ``if`` branching in a shader, performance may decrease as - :abbr`VGPR (Vector General-Purpose Register)` usage will increase in the + :abbr:`VGPR (Vector General-Purpose Register)` usage will increase in the shader. This happens even if all pixels evaluate to ``true`` or ``false`` in a given frame. @@ -368,6 +368,12 @@ this. in :abbr:`LDR (Low Dynamic Range)` sRGB-space while 3D rendering uses :abbr:`HDR (High Dynamic Range)` linear space. +The color format used for 2D rendering is RGB8 (RGBA8 if the **Transparent** +property on the Viewport is enabled). 3D rendering uses a 24-bit unsigned +normalized integer depth buffer, or 32-bit signed floating-point if a 24-bit +depth buffer is not supported by the hardware. 2D rendering does not use a depth +buffer. + 3D resolution scaling is performed differently depending on whether bilinear or FSR 1.0 scaling is used. When bilinear scaling is used, no special upscaling shader is run. Instead, the viewport's texture is stretched and displayed with a diff --git a/contributing/documentation/building_the_manual.rst b/contributing/documentation/building_the_manual.rst index 7fe9cb35b0e..4ac1d5059b4 100644 --- a/contributing/documentation/building_the_manual.rst +++ b/contributing/documentation/building_the_manual.rst @@ -10,7 +10,7 @@ documentation as a PDF, EPUB, or LaTeX file, for example. Before you get started, make sure that you have: - `Git `_ -- `make `_ (unless you’re using Windows) +- `make `_ (unless you're using Windows) - `Python `_ 3 .. note:: Python 3 should come with the ``pip3`` command. You may need to write @@ -154,6 +154,11 @@ If you have at least 16 GB of RAM, you can speed up compilation by running: make html SPHINXOPTS=-j2 +You can use ``-j auto`` to use all available CPU threads, but this can use a lot +of RAM if you have a lot of CPU threads. For instance, on a system with 32 CPU +threads, ``-j auto`` (which corresponds to ``-j 32`` here) can require 20+ GB of +RAM for Sphinx alone. + Specifying a list of files ^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/contributing/documentation/class_reference_primer.rst b/contributing/documentation/class_reference_primer.rst index 29f78947977..c73744c3175 100644 --- a/contributing/documentation/class_reference_primer.rst +++ b/contributing/documentation/class_reference_primer.rst @@ -134,62 +134,93 @@ Linking Whenever you link to a member of another class, you need to specify the class name. For links to the same class, the class name is optional and can be omitted. -+-------------------------+-------------------------------------------------+-----------------------------------------+-----------------------------------------------------------------------------+ -| Tag | Effect | Usage | Result | -+=========================+=================================================+=========================================+=============================================================================+ -| [Class] | Link to class ``Class`` | Move the [Sprite2D]. | Move the :ref:`class_Sprite2D`. | -+-------------------------+-------------------------------------------------+-----------------------------------------+-----------------------------------------------------------------------------+ -| [annotation Class.name] | Link to annotation ``name`` in class ``Class``, | See [annotation @GDScript.@export]. | See :ref:`@GDScript.@export`. | -| | many default annotations are in ``@GDScript`` | | | -+-------------------------+-------------------------------------------------+-----------------------------------------+-----------------------------------------------------------------------------+ -| [constant Class.name] | Link to constant ``name`` in class ``Class`` | See [constant @GlobalScope.KEY_ESCAPE]. | See :ref:`@GlobalScope.KEY_ESCAPE`. | -+-------------------------+-------------------------------------------------+-----------------------------------------+-----------------------------------------------------------------------------+ -| [enum Class.name] | Link to enum ``name`` in class ``Class`` | See [enum Mesh.ArrayType]. | See :ref:`ArrayType`. | -+-------------------------+-------------------------------------------------+-----------------------------------------+-----------------------------------------------------------------------------+ -| [method Class.name] | Link to method ``name`` in class ``Class`` | Call [method Node3D.hide]. | Call :ref:`hide`. | -+-------------------------+-------------------------------------------------+-----------------------------------------+-----------------------------------------------------------------------------+ -| [member Class.name] | Link to member ``name`` in class ``Class`` | Get [member Node2D.scale]. | Get :ref:`scale`. | -+-------------------------+-------------------------------------------------+-----------------------------------------+-----------------------------------------------------------------------------+ -| [signal Class.name] | Link to signal ``name`` in class ``Class`` | Emit [signal Node.renamed]. | Emit :ref:`renamed`. | -+-------------------------+-------------------------------------------------+-----------------------------------------+-----------------------------------------------------------------------------+ -| [theme_item Class.name] | Link to theme item ``name`` in class ``Class`` | See [theme_item GraphNode.position]. | See :ref:`position`. | -+-------------------------+-------------------------------------------------+-----------------------------------------+-----------------------------------------------------------------------------+ ++-------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| Tag and Description | Example | Result | ++===============================+=========================================+======================================================================+ +| | ``[Class]`` | ``Move the [Sprite2D].`` | Move the :ref:`class_Sprite2D`. | +| | Link to class | | | ++-------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| | ``[annotation Class.name]`` | ``See [annotation @GDScript.@export].`` | See :ref:`@GDScript.@export `. | +| | Link to annotation | | | ++-------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| | ``[constant Class.name]`` | ``See [constant @GlobalScope.KEY_F1].`` | See :ref:`@GlobalScope.KEY_F1 `. | +| | Link to constant | | | ++-------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| | ``[enum Class.name]`` | ``See [enum Mesh.ArrayType].`` | See :ref:`Mesh.ArrayType `. | +| | Link to enum | | | ++-------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| | ``[method Class.name]`` | ``Call [method Node3D.hide].`` | Call :ref:`Node3D.hide() `. | +| | Link to method | | | ++-------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| | ``[member Class.name]`` | ``Get [member Node2D.scale].`` | Get :ref:`Node2D.scale `. | +| | Link to member | | | ++-------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| | ``[signal Class.name]`` | ``Emit [signal Node.renamed].`` | Emit :ref:`Node.renamed `. | +| | Link to signal | | | ++-------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| | ``[theme_item Class.name]`` | ``See [theme_item Label.font].`` | See :ref:`Label.font `. | +| | Link to theme item | | | ++-------------------------------+-----------------------------------------+----------------------------------------------------------------------+ + +.. note:: + + Currently only :ref:`class_@GDScript` has annotations. Formatting text """"""""""""""" -+----------------------------+-----------------------------------------------------+-------------------------------------+-------------------------------------------------------------------+ -| Tag | Effect | Usage | Result | -+============================+=====================================================+=====================================+===================================================================+ -| [param name] | Formats a parameter name (as code) | Takes [param size] for the size. | Takes ``size`` for the size. | -+----------------------------+-----------------------------------------------------+-------------------------------------+-------------------------------------------------------------------+ -| [b] [/b] | Bold | Some [b]bold[/b] text. | Some **bold** text. | -+----------------------------+-----------------------------------------------------+-------------------------------------+-------------------------------------------------------------------+ -| [i] [/i] | Italic | Some [i]italic[/i] text. | Some *italic* text. | -+----------------------------+-----------------------------------------------------+-------------------------------------+-------------------------------------------------------------------+ -| [kbd] [/kbd] | Keyboard/mouse shortcut | Some [kbd]Ctrl + C[/kbd] key. | Some :kbd:`Ctrl + C` key. | -+----------------------------+-----------------------------------------------------+-------------------------------------+-------------------------------------------------------------------+ ++--------------------------------------+--------------------------------------+------------------------------+ +| Tag and Description | Example | Result | ++======================================+======================================+==============================+ +| | ``[param name]`` | ``Takes [param size] for the size.`` | Takes ``size`` for the size. | +| | Formats a parameter name (as code) | | | ++--------------------------------------+--------------------------------------+------------------------------+ +| | ``[br]`` | | ``Line 1.[br]`` | | Line 1. | +| | Line break | | ``Line 2.`` | | Line 2. | ++--------------------------------------+--------------------------------------+------------------------------+ +| | ``[b]`` ``[/b]`` | ``Some [b]bold[/b] text.`` | Some **bold** text. | +| | Bold | | | ++--------------------------------------+--------------------------------------+------------------------------+ +| | ``[i]`` ``[/i]`` | ``Some [i]italic[/i] text.`` | Some *italic* text. | +| | Italic | | | ++--------------------------------------+--------------------------------------+------------------------------+ +| | ``[kbd]`` ``[/kbd]`` | ``Some [kbd]Ctrl + C[/kbd] key.`` | Some :kbd:`Ctrl + C` key. | +| | Keyboard/mouse shortcut | | | ++--------------------------------------+--------------------------------------+------------------------------+ Formatting code """"""""""""""" -+----------------------------+-----------------------------------------------------+-------------------------------------+-------------------------------------------------------------------+ -| Tag | Effect | Usage | Result | -+============================+=====================================================+=====================================+===================================================================+ -| [code] [/code] | Monospace | Some [code]monospace[/code] text. | Some ``monospace`` text. | -+----------------------------+-----------------------------------------------------+-------------------------------------+-------------------------------------------------------------------+ -| [codeblock] [/codeblock] | Multiline preformatted block | *See below.* | *See below.* | -+----------------------------+-----------------------------------------------------+-------------------------------------+-------------------------------------------------------------------+ -| [codeblocks] [/codeblocks] | [codeblock] for multiple languages | *See below.* | *See below.* | -+----------------------------+-----------------------------------------------------+-------------------------------------+-------------------------------------------------------------------+ -| [gdscript] [/gdscript] | GDScript codeblock tab in codeblocks | *See below.* | *See below.* | -+----------------------------+-----------------------------------------------------+-------------------------------------+-------------------------------------------------------------------+ -| [csharp] [/csharp] | C# codeblock tab in codeblocks | *See below.* | *See below.* | -+----------------------------+-----------------------------------------------------+-------------------------------------+-------------------------------------------------------------------+ - -Use ``[codeblock]`` for pre-formatted code blocks. Inside ``[codeblock]``, -always use **four spaces** for indentation. The parser will delete tabs. For -example: ++----------------------------------------+---------------------------------------+--------------------------+ +| Tag and Description | Example | Result | ++========================================+=======================================+==========================+ +| | ``[code]`` ``[/code]`` | ``Some [code]monospace[/code] text.`` | Some ``monospace`` text. | +| | Monospace | | | ++----------------------------------------+---------------------------------------+--------------------------+ +| | ``[codeblock]`` ``[/codeblock]`` | *See below.* | *See below.* | +| | Multiline preformatted block | | | ++----------------------------------------+---------------------------------------+--------------------------+ +| | ``[codeblocks]`` ``[/codeblocks]`` | *See below.* | *See below.* | +| | Codeblock for multiple languages | | | ++----------------------------------------+---------------------------------------+--------------------------+ +| | ``[gdscript]`` ``[/gdscript]`` | *See below.* | *See below.* | +| | GDScript codeblock tab in codeblocks | | | ++----------------------------------------+---------------------------------------+--------------------------+ +| | ``[csharp]`` ``[/csharp]`` | *See below.* | *See below.* | +| | C# codeblock tab in codeblocks | | | ++----------------------------------------+---------------------------------------+--------------------------+ + +.. note:: + + 1. ``[code]`` disables BBCode until the parser encounters ``[/code]``. + 2. ``[codeblock]`` disables BBCode until the parser encounters ``[/codeblock]``. + +.. warning:: + + Use ``[codeblock]`` for pre-formatted code blocks. Inside ``[codeblock]``, + always use **four spaces** for indentation. The parser will delete tabs. + +For example: .. code-block:: none diff --git a/contributing/documentation/contributing_to_the_documentation.rst b/contributing/documentation/contributing_to_the_documentation.rst index b43ff354a0d..7d9d7916a6d 100644 --- a/contributing/documentation/contributing_to_the_documentation.rst +++ b/contributing/documentation/contributing_to_the_documentation.rst @@ -63,7 +63,7 @@ Editing existing pages To edit an existing page, locate its ``.rst`` source file and open it in your favorite text editor. You can then commit the changes, push them to your fork, and make a pull request. **Note that the pages in** ``classes/`` **should not be -edited here.** They are automatically generated from Godot’s `XML class +edited here.** They are automatically generated from Godot's `XML class reference `__. See :ref:`doc_updating_the_class_reference` for details. @@ -145,7 +145,7 @@ first letter capitalized. Sphinx and reStructuredText syntax ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Check Sphinx’s `reST Primer `__ +Check Sphinx's `reST Primer `__ and the `official reference `__ for details on the syntax. diff --git a/contributing/documentation/docs_image_guidelines.rst b/contributing/documentation/docs_image_guidelines.rst index 833d3210349..35099531657 100644 --- a/contributing/documentation/docs_image_guidelines.rst +++ b/contributing/documentation/docs_image_guidelines.rst @@ -1,6 +1,6 @@ .. _docs_image_guidelines: -Creating Documentation Images +Creating documentation images ============================= Throughout documentation images are often needed to make the explanation @@ -31,15 +31,15 @@ All screenshots should ideally be taken on a 1080p screen. Anything higher resolution is adding detail that doesn't make the documentation better and dramatically increases file size. If you're taking screenshots on a higher resolution screen the screenshot should be scaled down. There are instructions -on how to do this later on this page. +on how to do this later on this page. Format conversion ----------------- -The current format for images in Godot's documentation is WebP (.webp). While some -Linux programs will support saving screenshots in this format, macOS and the -Snip & Sketch program on Windows do not. For images that don't need editing, -such as precise cropping or adding outlines, Squoosh can be used. +The current format for images in Godot's documentation is WebP (``.webp``). +While some Linux programs will support saving screenshots in this format, macOS +and the Snip & Sketch program on Windows do not. For images that don't need +editing, such as precise cropping or adding outlines, Squoosh can be used. `Squoosh `_ is a converter developed by Google, is open source, and doesn't give Google any image rights by using it. @@ -87,9 +87,9 @@ Scaling down an image As explained earlier on this page, all images taken on a screen that is a higher resolution than 1080p should be scaled down. To do this in Krita click on **Image** on the top bar, and from the dropdown menu select **Scale Image To New Size**. This menu can also be opened by -pressing :kbd: `ctrl + alt + I`. On this menu you want to adjust the pixel dimensions. For +pressing :kbd:`Ctrl + Alt + I`. On this menu you want to adjust the pixel dimensions. For anything taken on a 4K monitor change the value of the width and height to half of its current -value, for anything taken on a 1440p monitor multiply the width and height by .75. Make +value, for anything taken on a 1440p monitor multiply the width and height by 0.75. Make sure the **Constrain Proportions** box at the bottom of the menu is checked so you only have to change 1 value. @@ -107,14 +107,14 @@ Outlines arrows and text Sometimes an image needs something extra to properly direct the readers attention, or make something clear. Outlines and arrows can be used for this purpose. For these types of edits Inkscape is the recommended open -source program, it can be downloaded from the `official Inkscape website `_. -Like Krita, if you're on linux you can also check your distributions repository +source program, it can be downloaded from the `official Inkscape website `_. +Like Krita, if you're on Linux you can also check your distributions repository or get it from Flathub. A full tutorial on creating outlines is not provided here, we recommend searching for various tutorials on how to use it online. However there are two standards for doc image outlines and arrows. First, the color should be yellow, specifically -this hex color: fffb44 (fffb44ff if there is a transparency value like in inkscape). +this hex color: ``fffb44`` (``fffb44ff`` if there is a transparency value like in Inkscape). This color was chosen specifically to make sure color blind people do not have issues reading the documentation, other colors can be used in addition to this yellow if multiple outlines on an image are needed, red should be avoided. The second standard @@ -129,8 +129,15 @@ multiple outlines in multiple colors. Adding an image to a documentation page --------------------------------------- -Once you've finished working on your image it can be added to the documentation. -All images are stored in folders named `img`. To add your image add it to the img -folder that's in the same folder as the rst file for the page. To add it in the -text yourself you would type this `.. image:: img/documentation_image.webp` and -`documentation_image.webp` would be whatever your image is named. +Once you've finished working on your image, it can be added to the documentation. +All images are stored in folders named ``img`` next to the page they are used in. + +To add your image, add it to the ``img`` folder that's in the same folder as the +``.rst`` file for the page (create it if it doesn't exist). In the ``.rst`` page, +images should be included with the following code snippet:: + + .. image:: img/documentation_image.webp + +Where ``documentation_image.webp`` would be changed to the name of the image you +created. Name your images in a way that makes their meaning clear, possibly with +a prefix that makes their relationship to a documentation page explicit. diff --git a/getting_started/first_2d_game/06.heads_up_display.rst b/getting_started/first_2d_game/06.heads_up_display.rst index e00cf50b1ea..973afcc0fb8 100644 --- a/getting_started/first_2d_game/06.heads_up_display.rst +++ b/getting_started/first_2d_game/06.heads_up_display.rst @@ -36,15 +36,12 @@ Inspector. The default font for ``Control`` nodes is small and doesn't scale well. There is a font file included in the game assets called "Xolonium-Regular.ttf". To use this font, do the following: -1. Under "Theme Overrides > Fonts", choose "Load" and select the "Xolonium-Regular.ttf" file. +Under "Theme Overrides > Fonts", choose "Load" and select the "Xolonium-Regular.ttf" file. .. image:: img/custom_font_load_font.webp -Once you've done this on the ``ScoreLabel``, you can click the down arrow next -to the Font property and choose "Copy", then "Paste" it in the same place -on the other two Control nodes. -Set the "Font Size" property of the ``ScoreLabel`` under "Theme Overrides > Font Sizes". -A setting of ``64`` works well. +The font size is still to small, increase it to ``64`` under "Theme Overrides > Font Sizes". +Once you've done this with the ``ScoreLabel``, repeat the changes for the ``Message`` and ``StartButton`` nodes. .. image:: img/custom_font_size.webp @@ -54,48 +51,34 @@ A setting of ``64`` works well. Arrange the nodes as shown below. You can drag the nodes to place them manually, or for more precise placement, -use "Anchor Presets" with the following settings: +use "Anchor Presets". .. image:: img/ui_anchor.webp ScoreLabel ~~~~~~~~~~ -Layout : - -- Anchor Preset : ``Center Top`` - -Label settings : - -- Text : ``0`` -- Horizontal Alignment : ``Center`` -- Vertical Alignment : ``Center`` +1. Add the text ``0``. +2. Set the "Horizontal Alignment" and "Vertical Alignment" to ``Center``. +3. Choose the "Anchor Preset" ``Center Top``. Message ~~~~~~~~~~~~ -Layout : - -- Anchor Preset : ``Center`` - -Label settings : - -- Text : ``Dodge the Creeps!`` -- Horizontal Alignment : ``Center`` -- Vertical Alignment : ``Center`` -- Autowrap Mode : ``Word`` +1. Add the text ``Dodge the creeps!``. +2. Set the "Horizontal Alignment" and "Vertical Alignment" to ``Center``. +3. Set the "Autowrap Mode" to ``Word``, otherwise the label will stay on one line. +4. Under "Control - Layout/Transform" set "Size X" to ``480`` to use the entire width of the screen. +5. Choose the "Anchor Preset" ``Center``. StartButton ~~~~~~~~~~~ -Layout : - -- Anchor Preset : ``Center Bottom`` - -Button settings : - -- Text : ``Start`` -- Position Y : ``580`` (Control - Layout/Transform) +1. Add the text ``Start``. +2. Under "Control - Layout/Transform", set "Size X" to ``200`` and "Size Y" to ``100`` + to add a little bit more padding between the border and text. +3. Choose the "Anchor Preset" ``Center Bottom``. +4. Under "Control - Layout/Transform", set "Position Y" to ``580``. On the ``MessageTimer``, set the ``Wait Time`` to ``2`` and set the ``One Shot`` property to "On". diff --git a/getting_started/first_3d_game/going_further.rst b/getting_started/first_3d_game/going_further.rst index 96323d37597..3ba482ca7ad 100644 --- a/getting_started/first_3d_game/going_further.rst +++ b/getting_started/first_3d_game/going_further.rst @@ -9,29 +9,29 @@ You can pat yourself on the back for having completed your first 3D game with Godot. In this series, we went over a wide range of techniques and editor features. -Hopefully, you’ve witnessed how intuitive Godot’s scene system can be and +Hopefully, you've witnessed how intuitive Godot's scene system can be and learned a few tricks you can apply in your projects. But we just scratched the surface: Godot has a lot more in store for you to save time creating games. And you can learn all that by browsing the documentation. -Where should you begin? Below, you’ll find a few pages to start exploring and -build upon what you’ve learned so far. +Where should you begin? Below, you'll find a few pages to start exploring and +build upon what you've learned so far. -But before that, here’s a link to download a completed version of the project: +But before that, here's a link to download a completed version of the project: ``_. Exploring the manual -------------------- -The manual is your ally whenever you have a doubt or you’re curious about a +The manual is your ally whenever you have a doubt or you're curious about a feature. It does not contain tutorials about specific game genres or mechanics. Instead, it explains how Godot works in general. In it, you will find information about 2D, 3D, physics, rendering and performance, and much more. Here are the sections we recommend you to explore next: -1. Read the :ref:`Scripting section ` to learn essential programming features you’ll use +1. Read the :ref:`Scripting section ` to learn essential programming features you'll use in every project. 2. The :ref:`3D ` and :ref:`Physics ` sections will teach you more about 3D game creation in the engine. @@ -40,5 +40,5 @@ Here are the sections we recommend you to explore next: You can start with these or, if you prefer, look at the sidebar menu on the left and pick your options. -We hope you enjoyed this tutorial series, and we’re looking forward to seeing +We hope you enjoyed this tutorial series, and we're looking forward to seeing what you achieve using Godot. diff --git a/getting_started/step_by_step/img/instancing_physics_material_expand.png b/getting_started/step_by_step/img/instancing_physics_material_expand.png deleted file mode 100644 index 67f452186ab..00000000000 Binary files a/getting_started/step_by_step/img/instancing_physics_material_expand.png and /dev/null differ diff --git a/getting_started/step_by_step/img/instancing_physics_material_expand.webp b/getting_started/step_by_step/img/instancing_physics_material_expand.webp new file mode 100644 index 00000000000..e9877692283 Binary files /dev/null and b/getting_started/step_by_step/img/instancing_physics_material_expand.webp differ diff --git a/getting_started/step_by_step/img/instancing_property_bounce_updated.png b/getting_started/step_by_step/img/instancing_property_bounce_updated.png deleted file mode 100644 index 2b7c3117bff..00000000000 Binary files a/getting_started/step_by_step/img/instancing_property_bounce_updated.png and /dev/null differ diff --git a/getting_started/step_by_step/img/instancing_property_bounce_updated.webp b/getting_started/step_by_step/img/instancing_property_bounce_updated.webp new file mode 100644 index 00000000000..a6405bb647c Binary files /dev/null and b/getting_started/step_by_step/img/instancing_property_bounce_updated.webp differ diff --git a/getting_started/step_by_step/img/signals_01_new_scene.png b/getting_started/step_by_step/img/signals_01_new_scene.png deleted file mode 100644 index a72018df68e..00000000000 Binary files a/getting_started/step_by_step/img/signals_01_new_scene.png and /dev/null differ diff --git a/getting_started/step_by_step/img/signals_01_new_scene.webp b/getting_started/step_by_step/img/signals_01_new_scene.webp new file mode 100644 index 00000000000..3b397376cc1 Binary files /dev/null and b/getting_started/step_by_step/img/signals_01_new_scene.webp differ diff --git a/getting_started/step_by_step/img/signals_02_2d_scene.png b/getting_started/step_by_step/img/signals_02_2d_scene.png deleted file mode 100644 index b6113054d12..00000000000 Binary files a/getting_started/step_by_step/img/signals_02_2d_scene.png and /dev/null differ diff --git a/getting_started/step_by_step/img/signals_02_2d_scene.webp b/getting_started/step_by_step/img/signals_02_2d_scene.webp new file mode 100644 index 00000000000..da91e3e4f5c Binary files /dev/null and b/getting_started/step_by_step/img/signals_02_2d_scene.webp differ diff --git a/getting_started/step_by_step/img/signals_04_add_child_node.png b/getting_started/step_by_step/img/signals_04_add_child_node.png deleted file mode 100644 index c624b3dc974..00000000000 Binary files a/getting_started/step_by_step/img/signals_04_add_child_node.png and /dev/null differ diff --git a/getting_started/step_by_step/img/signals_04_add_child_node.webp b/getting_started/step_by_step/img/signals_04_add_child_node.webp new file mode 100644 index 00000000000..cea7e61a347 Binary files /dev/null and b/getting_started/step_by_step/img/signals_04_add_child_node.webp differ diff --git a/getting_started/step_by_step/img/signals_05_add_button.png b/getting_started/step_by_step/img/signals_05_add_button.png deleted file mode 100644 index e16f8896680..00000000000 Binary files a/getting_started/step_by_step/img/signals_05_add_button.png and /dev/null differ diff --git a/getting_started/step_by_step/img/signals_05_add_button.webp b/getting_started/step_by_step/img/signals_05_add_button.webp new file mode 100644 index 00000000000..07789d61347 Binary files /dev/null and b/getting_started/step_by_step/img/signals_05_add_button.webp differ diff --git a/getting_started/step_by_step/img/signals_07_select_tool.png b/getting_started/step_by_step/img/signals_07_select_tool.png deleted file mode 100644 index 223cda2e6f0..00000000000 Binary files a/getting_started/step_by_step/img/signals_07_select_tool.png and /dev/null differ diff --git a/getting_started/step_by_step/img/signals_07_select_tool.webp b/getting_started/step_by_step/img/signals_07_select_tool.webp new file mode 100644 index 00000000000..e489243ae26 Binary files /dev/null and b/getting_started/step_by_step/img/signals_07_select_tool.webp differ diff --git a/getting_started/step_by_step/img/signals_08_toggle_motion_text.png b/getting_started/step_by_step/img/signals_08_toggle_motion_text.png deleted file mode 100644 index 9d8b14d4f0b..00000000000 Binary files a/getting_started/step_by_step/img/signals_08_toggle_motion_text.png and /dev/null differ diff --git a/getting_started/step_by_step/img/signals_08_toggle_motion_text.webp b/getting_started/step_by_step/img/signals_08_toggle_motion_text.webp new file mode 100644 index 00000000000..759c6533338 Binary files /dev/null and b/getting_started/step_by_step/img/signals_08_toggle_motion_text.webp differ diff --git a/getting_started/step_by_step/img/signals_10_node_dock.png b/getting_started/step_by_step/img/signals_10_node_dock.png deleted file mode 100644 index a2dad389b32..00000000000 Binary files a/getting_started/step_by_step/img/signals_10_node_dock.png and /dev/null differ diff --git a/getting_started/step_by_step/img/signals_10_node_dock.webp b/getting_started/step_by_step/img/signals_10_node_dock.webp new file mode 100644 index 00000000000..a6a5acec3f3 Binary files /dev/null and b/getting_started/step_by_step/img/signals_10_node_dock.webp differ diff --git a/getting_started/step_by_step/img/signals_11_pressed_signals.png b/getting_started/step_by_step/img/signals_11_pressed_signals.png deleted file mode 100644 index 3b7752b11d6..00000000000 Binary files a/getting_started/step_by_step/img/signals_11_pressed_signals.png and /dev/null differ diff --git a/getting_started/step_by_step/img/signals_11_pressed_signals.webp b/getting_started/step_by_step/img/signals_11_pressed_signals.webp new file mode 100644 index 00000000000..1aba6c1ac68 Binary files /dev/null and b/getting_started/step_by_step/img/signals_11_pressed_signals.webp differ diff --git a/getting_started/step_by_step/instancing.rst b/getting_started/step_by_step/instancing.rst index b4497fff3c2..69b94e0cb72 100644 --- a/getting_started/step_by_step/instancing.rst +++ b/getting_started/step_by_step/instancing.rst @@ -11,7 +11,7 @@ into any number of scenes. This feature helps you break down and organize your game's different components. You can create as many scenes as you'd like and save them as files with the -``.tscn`` extension, which stands for "text scene". The ``tabel.tscn`` file from +``.tscn`` extension, which stands for "text scene". The ``label.tscn`` file from the previous lesson was an example. We call those files "Packed Scenes" as they pack information about your scene's content. @@ -121,12 +121,12 @@ There is more to instances. With this feature, you can: Let's try this. Open ``ball.tscn`` and select the Ball node. In the Inspector on the right, click on the PhysicsMaterial property to expand it. -.. image:: img/instancing_physics_material_expand.png +.. image:: img/instancing_physics_material_expand.webp -Set its Bounce property to ``2`` by clicking on the number field, typing ``2``, +Set its Bounce property to ``0.5`` by clicking on the number field, typing ``0.5``, and pressing :kbd:`Enter`. -.. image:: img/instancing_property_bounce_updated.png +.. image:: img/instancing_property_bounce_updated.webp Play the game by pressing :kbd:`F5` and notice how all balls now bounce a lot more. As the Ball scene is a template for all instances, modifying it and saving diff --git a/getting_started/step_by_step/scripting_player_input.rst b/getting_started/step_by_step/scripting_player_input.rst index 69ca1752c90..acd007726a9 100644 --- a/getting_started/step_by_step/scripting_player_input.rst +++ b/getting_started/step_by_step/scripting_player_input.rst @@ -102,7 +102,7 @@ velocity. Replace the line starting with ``var velocity`` with the code below. var velocity = Vector2.Zero; if (Input.IsActionPressed("ui_up")) { - velocity = Vector2.Up.Rotated(Rotation) * Speed; + velocity = Vector2.Up.Rotated(Rotation) * _speed; } We initialize the ``velocity`` with a value of ``Vector2.ZERO``, another diff --git a/getting_started/step_by_step/signals.rst b/getting_started/step_by_step/signals.rst index dd716253f80..9d8bffa5ba2 100644 --- a/getting_started/step_by_step/signals.rst +++ b/getting_started/step_by_step/signals.rst @@ -22,7 +22,7 @@ limits `coupling code flexible. For example, you might have a life bar on the screen that represents the -player’s health. When the player takes damage or uses a healing potion, you want +player's health. When the player takes damage or uses a healing potion, you want the bar to reflect the change. To do so, in Godot, you would use signals. .. note:: As mentioned in the introduction, signals are Godot's version of the @@ -38,19 +38,19 @@ Scene setup ----------- To add a button to our game, we will create a new main scene which will include -both a button and the ``Sprite2D.tscn`` scene that we scripted in previous -lessons. +both a :ref:`Button ` and the ``sprite_2d.tscn`` scene we created in +the :ref:`doc_scripting_first_script` lesson. Create a new scene by going to the menu Scene -> New Scene. -.. image:: img/signals_01_new_scene.png +.. image:: img/signals_01_new_scene.webp -In the Scene dock, click the 2D Scene button. This will add a Node2D as our -root. +In the Scene dock, click the 2D Scene button. This will add +a :ref:`Node2D ` as our root. -.. image:: img/signals_02_2d_scene.png +.. image:: img/signals_02_2d_scene.webp -In the FileSystem dock, click and drag the ``Sprite2D.tscn`` file you saved +In the FileSystem dock, click and drag the ``sprite_2d.tscn`` file you saved previously onto the Node2D to instantiate it. .. image:: img/signals_03_dragging_scene.png @@ -58,11 +58,11 @@ previously onto the Node2D to instantiate it. We want to add another node as a sibling of the Sprite2D. To do so, right-click on Node2D and select Add Child Node. -.. image:: img/signals_04_add_child_node.png +.. image:: img/signals_04_add_child_node.webp -Search for the Button node type and add it. +Search for the :ref:`Button ` node and add it. -.. image:: img/signals_05_add_button.png +.. image:: img/signals_05_add_button.webp The node is small by default. Click and drag on the bottom-right handle of the Button in the viewport to resize it. @@ -71,20 +71,21 @@ Button in the viewport to resize it. If you don't see the handles, ensure the select tool is active in the toolbar. -.. image:: img/signals_07_select_tool.png +.. image:: img/signals_07_select_tool.webp Click and drag on the button itself to move it closer to the sprite. You can also write a label on the Button by editing its Text property in the -Inspector. Enter "Toggle motion". +Inspector. Enter ``Toggle motion``. -.. image:: img/signals_08_toggle_motion_text.png +.. image:: img/signals_08_toggle_motion_text.webp Your scene tree and viewport should look like this. .. image:: img/signals_09_scene_setup.png -Save your newly created scene. You can then run it with :kbd:`F6` (:kbd:`Cmd + R` on macOS). +Save your newly created scene as ``node_2d.tscn``, if you haven't already. +You can then run it with :kbd:`F6` (:kbd:`Cmd + R` on macOS). At the moment, the button will be visible, but nothing will happen if you press it. @@ -99,11 +100,11 @@ lesson. You can connect signals in the Node dock. Select the Button node and, on the right side of the editor, click on the tab named "Node" next to the Inspector. -.. image:: img/signals_10_node_dock.png +.. image:: img/signals_10_node_dock.webp The dock displays a list of signals available on the selected node. -.. image:: img/signals_11_pressed_signals.png +.. image:: img/signals_11_pressed_signals.webp Double-click the "pressed" signal to open the node connection window. diff --git a/img/tween_cheatsheet.png b/img/tween_cheatsheet.png deleted file mode 100644 index 36028573aed..00000000000 Binary files a/img/tween_cheatsheet.png and /dev/null differ diff --git a/img/tween_cheatsheet.webp b/img/tween_cheatsheet.webp new file mode 100644 index 00000000000..e86dfaeec21 Binary files /dev/null and b/img/tween_cheatsheet.webp differ diff --git a/requirements.txt b/requirements.txt index dd4a325d8a1..b25d1e97310 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ # https://github.com/readthedocs/readthedocs.org/blob/master/requirements/docs.txt # Base dependencies -pygments==2.14.0 +pygments==2.15.1 # Sphinx base and RTD theme. sphinx==4.4.0 diff --git a/tutorials/2d/2d_lights_and_shadows.rst b/tutorials/2d/2d_lights_and_shadows.rst index e8c5342484f..e7f4d193ae3 100644 --- a/tutorials/2d/2d_lights_and_shadows.rst +++ b/tutorials/2d/2d_lights_and_shadows.rst @@ -216,7 +216,7 @@ Manually drawing a light occluder ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Create a LightOccluder2D node, then select the node and click the "+" button at -the top top of the 2D editor. When asked to create a polygon resource, answer +the top of the 2D editor. When asked to create a polygon resource, answer **Yes**. You can then start drawing an occluder polygon by clicking to create new points. You can remove existing points by right-clicking them, and you can create new points from the existing line by clicking on the line then dragging. diff --git a/tutorials/3d/img/volumetric_fog_fog_material_density_texture.webp b/tutorials/3d/img/volumetric_fog_fog_material_density_texture.webp new file mode 100644 index 00000000000..fc264eeb8de Binary files /dev/null and b/tutorials/3d/img/volumetric_fog_fog_material_density_texture.webp differ diff --git a/tutorials/3d/particles/attractors.rst b/tutorials/3d/particles/attractors.rst index 2604b09f8fd..7b4012875da 100644 --- a/tutorials/3d/particles/attractors.rst +++ b/tutorials/3d/particles/attractors.rst @@ -165,6 +165,13 @@ To create a vector field attractor, add a new child node to your scene and selec from the list of available nodes. You can animate the attractor's position or attach it to a moving node for more dynamic effects. +.. tip:: + + If you don't have external tools to create vector field textures, you can use + a NoiseTexture3D with a Color Ramp attached as a vector field texture. The + Color Ramp can be modified to adjust how much each coordinate is affected by + the vector field. + .. figure:: img/particle_attractor_vector.webp :alt: Vector field attractor in a field of particles diff --git a/tutorials/3d/procedural_geometry/surfacetool.rst b/tutorials/3d/procedural_geometry/surfacetool.rst index f63bda50f79..aee6e652184 100644 --- a/tutorials/3d/procedural_geometry/surfacetool.rst +++ b/tutorials/3d/procedural_geometry/surfacetool.rst @@ -95,7 +95,7 @@ note, ``generate_normals()`` only works if the primitive type is set to ``Mesh.P You may notice that normal mapping or other material properties look broken on the generated mesh. This is because normal mapping **requires** the mesh to feature *tangents*, which are separate from *normals*. You can either add custom -tangents manually, or generate them automatically with with +tangents manually, or generate them automatically with ``generate_tangents()``. This method requires that each vertex have UVs and normals set already. diff --git a/tutorials/3d/resolution_scaling.rst b/tutorials/3d/resolution_scaling.rst index 2772870d69c..38f6d16b5a6 100644 --- a/tutorials/3d/resolution_scaling.rst +++ b/tutorials/3d/resolution_scaling.rst @@ -34,7 +34,7 @@ settings in your in-game menus. Resolution scaling options -------------------------- -In the advanced Project Settings' **Rendering > Scaling 3D** section, you cany +In the advanced Project Settings' **Rendering > Scaling 3D** section, you can find several options for 3D resolution scaling: Scaling mode diff --git a/tutorials/3d/standard_material_3d.rst b/tutorials/3d/standard_material_3d.rst index 4bb37273963..9c45a7204f2 100644 --- a/tutorials/3d/standard_material_3d.rst +++ b/tutorials/3d/standard_material_3d.rst @@ -114,7 +114,7 @@ Specifies when depth rendering must take place. * **Opaque Only (default):** Depth is only drawn for opaque objects. * **Always:** Depth draw is drawn for both opaque and transparent objects. * **Never:** No depth draw takes place - (do not confuse this with the No Depth Test option above). + (do not confuse this with the No Depth Test option below). * **Depth Pre-Pass:** For transparent objects, an opaque pass is made first with the opaque parts, then transparency is drawn above. Use this option with transparent grass or tree foliage. diff --git a/tutorials/3d/volumetric_fog.rst b/tutorials/3d/volumetric_fog.rst index 60f632fdf3c..1b84a2b1701 100644 --- a/tutorials/3d/volumetric_fog.rst +++ b/tutorials/3d/volumetric_fog.rst @@ -217,6 +217,40 @@ the following properties in FogMaterial: You can import any image as a 3D texture by :ref:`changing its import type in the Import dock `. +Using 3D noise density textures +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Since Godot 4.1, there is a NoiseTexture3D resource that can be used to +procedurally generate 3D noise. This is well-suited to FogMaterial density +textures, which can result in more detailed fog effects: + +.. figure:: img/volumetric_fog_fog_material_density_texture.webp + :alt: FogMaterial comparison (without and with density texture) + + Screenshot taken with **Volume Size** project setting set to 192 to make + high-frequency detail more visible in the fog. + +To do so, select the **Density Texture** property and choose **New NoiseTexture3D**. +Edit this NoiseTexture3D by clicking it, then click **Noise** at the bottom of the +NoiseTexture3D properties and choose **New FastNoiseLite**. Adjust the noise texture's +width, height and depth according to your fog volume's dimensions. + +To improve performance, it's recommended to use low texture sizes (64×64×64 or lower), +as high-frequency detail is difficult to notice in a FogVolume. If you wish to represent +more detailed density variations, you will need to increase +**Rendering > Environment > Volumetric Fog > Volume Size** in the project settings, +which has a performance cost. + +.. note:: + + NoiseTexture3D's **Color Ramp** affects FogMaterial density textures, but + since only the texture's red channel is sampled, only the color ramp's red + channel will affect the resulting density. + + However, using a color ramp will *not* tint the fog volume according to the + texture. You would need to use a custom shader that reads a Texture3D to + achieve this. + Custom FogVolume shaders ------------------------ diff --git a/tutorials/animation/animation_tree.rst b/tutorials/animation/animation_tree.rst index 1e75c9b50fb..547ee62d435 100644 --- a/tutorials/animation/animation_tree.rst +++ b/tutorials/animation/animation_tree.rst @@ -116,10 +116,10 @@ After setting the request and changing the animation playback, the one-shot node .. code-tab:: csharp // Play child animation connected to "shot" port. - animationTree.Set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE); + animationTree.Set("parameters/OneShot/request", (int)AnimationNodeOneShot.OneShotRequest.Fire); // Abort child animation connected to "shot" port. - animationTree.Set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_ABORT); + animationTree.Set("parameters/OneShot/request", (int)AnimationNodeOneShot.OneShotRequest.Abort); // Get current state (read-only). animationTree.Get("parameters/OneShot/active"); diff --git a/tutorials/animation/cutout_animation.rst b/tutorials/animation/cutout_animation.rst index 6d1d35e3e25..62587b03f61 100644 --- a/tutorials/animation/cutout_animation.rst +++ b/tutorials/animation/cutout_animation.rst @@ -1,3 +1,5 @@ +:article_outdated: True + .. _doc_cutout_animation: Cutout animation diff --git a/tutorials/animation/introduction.rst b/tutorials/animation/introduction.rst index 46424483347..0b6370a1d0a 100644 --- a/tutorials/animation/introduction.rst +++ b/tutorials/animation/introduction.rst @@ -86,7 +86,7 @@ at various points, and change their timing. Each line in the Animation Panel is an animation track that references a Normal or Transform property of a node. Each track stores a path to a node and its affected property. For example, the position track -in the illustration refers to to the ``position`` property of the Sprite2D +in the illustration refers to the ``position`` property of the Sprite2D node. .. figure:: img/animation_normal_track.png diff --git a/tutorials/animation/playing_videos.rst b/tutorials/animation/playing_videos.rst index e40396814bf..4f5879972e4 100644 --- a/tutorials/animation/playing_videos.rst +++ b/tutorials/animation/playing_videos.rst @@ -145,11 +145,7 @@ There are several limitations with the current implementation of video playback :ref:`Engine.time_scale`. - Looping is not supported, but you can connect a VideoStreamPlayer's :ref:`finished ` signal to a function - that plays the video again. However, this will cause a black frame to be - visible when the video restarts. This can be worked around by adding a fade to - black in the video file before the video ends, or by hiding the video for one - frame and displaying a TextureRect with a screenshot of the first frame of the - video until the video is restarted. + that plays the video again. - Streaming a video from a URL is not supported. .. _doc_playing_videos_recommended_theora_encoding_settings: @@ -205,7 +201,9 @@ The **audio quality** level (``-q:a``) must be between ``-1`` and ``10``. Qualit video quality, increasing audio quality doesn't increase the output file size nearly as much. Therefore, if you want the cleanest audio possible, you can increase this to ``9`` to get *perceptually lossless* audio. This is especially -valuable if your input file already uses lossy audio compression. See +valuable if your input file already uses lossy audio compression. Higher quality +audio does increase the CPU usage of the decoder, so it might lead to audio +dropouts in case of high system load. See `this page `__ for a table listing Ogg Vorbis audio quality presets and their respective variable bitrates. diff --git a/tutorials/assets_pipeline/escn_exporter/animation.rst b/tutorials/assets_pipeline/escn_exporter/animation.rst index 65066d77283..7ab057e16de 100644 --- a/tutorials/assets_pipeline/escn_exporter/animation.rst +++ b/tutorials/assets_pipeline/escn_exporter/animation.rst @@ -34,7 +34,7 @@ Or it can be done stashing the action in ``Dope Sheet`` An NLA track can be ``mute`` or ``unmute``, the exporter will export all the ``mute`` NLA track as a separate action, while blends all the ``unmute`` -NLA tracks into every action (including the action action) being exported. +NLA tracks into every action (including the action) being exported. .. image:: img/nla_strip.jpg diff --git a/tutorials/assets_pipeline/importing_scenes.rst b/tutorials/assets_pipeline/importing_scenes.rst index 965b2114a63..d07db08e560 100644 --- a/tutorials/assets_pipeline/importing_scenes.rst +++ b/tutorials/assets_pipeline/importing_scenes.rst @@ -29,6 +29,33 @@ Copy the scene file together with the textures and mesh data (if separate) to the project repository, then Godot will do a full import when focusing the editor window. +3D asset direction conventions +------------------------------ + +Godot uses a right-handed, Y-is-up coordinate system, with the -Z axis as +the camera's forward direction. This is the same as OpenGL. This implies +that +Z is back, +X is right, and -X is left for a camera. + +The convention for 3D assets is to face the opposite direction as the camera, +so that characters and other assets are facing the camera by default. +This convention is extremely common in 3D modeling applications, and is +`codified in glTF as part of the glTF 2.0 specification `__. +This means that for oriented 3D assets (such as characters), +the +Z axis is the direction of the front, so -Z is the rear, ++X is the left side, and -X is the right side for a 3D asset. +In Blender, this means that +Y is rear and -Y is front for an asset. + +When rotating an oriented 3D asset in Godot, use the ``use_model_front`` +option on the ``look_at`` functions, and use the ``Vector3.MODEL_*`` +constants to perform calculations in the oriented asset's local space. + +For assets without an intrinsic front side or forward direction, such as +a game map or terrain, take note of the cardinal directions instead. +The convention in Godot and the vast majority of other applications is +that +X is east and -X is west. Due to Godot's right-handed Y-is-up +coordinate system, this implies that +Z is south and -Z is north. +In Blender, this means that +Y is north and -Y is south. + Exporting glTF 2.0 files from Blender (recommended) --------------------------------------------------- diff --git a/tutorials/assets_pipeline/importing_translations.rst b/tutorials/assets_pipeline/importing_translations.rst index 5c01cc0909d..bd6e5a65390 100644 --- a/tutorials/assets_pipeline/importing_translations.rst +++ b/tutorials/assets_pipeline/importing_translations.rst @@ -44,15 +44,6 @@ editors can export to this format, so the only requirement is that the files have a special arrangement. The CSV files **must** be saved with UTF-8 encoding without a `byte order mark `__. -.. warning:: - - By default, Microsoft Excel will always save CSV files with ANSI encoding - rather than UTF-8. There is no built-in way to save as UTF-8, but there are - workarounds as described - `here `__. - - We recommend using `LibreOffice `__ or Google Sheets instead. - CSV files must be formatted as follows: +--------+----------+----------+----------+ diff --git a/tutorials/audio/audio_effects.rst b/tutorials/audio/audio_effects.rst index 72bf61c04c4..eada442a546 100644 --- a/tutorials/audio/audio_effects.rst +++ b/tutorials/audio/audio_effects.rst @@ -91,7 +91,7 @@ a low-quality speaker or device. EQ ~~ -EQ is what all other equalizers inherit from. It can be extended with with Custom +EQ is what all other equalizers inherit from. It can be extended with Custom scripts to create an equalizer with a custom number of bands. EQ6, EQ10, EQ21 diff --git a/tutorials/editor/command_line_tutorial.rst b/tutorials/editor/command_line_tutorial.rst index 6e9d9044f14..0f3fd7000f7 100644 --- a/tutorials/editor/command_line_tutorial.rst +++ b/tutorials/editor/command_line_tutorial.rst @@ -237,7 +237,9 @@ For example, the full command for exporting your game (as explained below) might :: - godot --path path_to_your_project --export-release my_export_preset_name game.exe + godot --headless --path path_to_your_project --export-release my_export_preset_name game.exe + +.. Creating a project ------------------ @@ -324,27 +326,34 @@ Exporting --------- Exporting the project from the command line is also supported. This is -especially useful for continuous integration setups. The version of Godot -that is headless (server build, no video) is ideal for this. +especially useful for continuous integration setups. + +.. note:: + + Using the ``--headless`` command line argument is **required** on platforms + that do not have GPU access (such as continuous integration). On platforms + with GPU access, ``--headless`` prevents a window from spawning while the + project is exporting. :: # `godot` must be a Godot editor binary, not an export template. # Also, export templates must be installed for the editor # (or a valid custom export template must be defined in the export preset). - godot --export-release "Linux/X11" /var/builds/project - godot --export-release Android /var/builds/project.apk + godot --headless --export-release "Linux/X11" /var/builds/project + godot --headless --export-release Android /var/builds/project.apk The preset name must match the name of an export preset defined in the project's ``export_presets.cfg`` file. If the preset name contains spaces or special characters (such as "Windows Desktop"), it must be surrounded with quotes. -To export a debug version of the game, use the ``--export-debug`` switch -instead of ``--export``. Their parameters and usage are the same. +To export a debug version of the game, use the ``--export-debug`` switch instead +of ``--export-release``. Their parameters and usage are the same. To export only a PCK file, use the ``--export-pack`` option followed by the -preset name and output path, with the file extension, instead of ``--export``. -The output path extension determines the package's format, either PCK or ZIP. +preset name and output path, with the file extension, instead of +``--export-release`` or ``--export-debug``. The output path extension determines +the package's format, either PCK or ZIP. .. warning:: diff --git a/tutorials/editor/index.rst b/tutorials/editor/index.rst index 383ae61bdf5..ff9d40cb88a 100644 --- a/tutorials/editor/index.rst +++ b/tutorials/editor/index.rst @@ -24,6 +24,20 @@ in other sections where appropriate. For example, the :ref:`animation editor default_key_mapping customizing_editor +Android editor +-------------- + +Godot offers a native port of the editor running entirely on Android devices. +The Android port can be downloaded from the `Android Downloads page `__. +While we strive for feature parity with the Desktop version of the editor, +the Android port has a certain amount of caveats you should be aware of. + +.. toctree:: + :maxdepth: 1 + :name: toc-android-editor + + using_the_android_editor + Web editor ---------- diff --git a/tutorials/editor/using_the_android_editor.rst b/tutorials/editor/using_the_android_editor.rst new file mode 100644 index 00000000000..12868368e26 --- /dev/null +++ b/tutorials/editor/using_the_android_editor.rst @@ -0,0 +1,55 @@ +.. _doc_using_the_android_editor: + +Using the Android editor +======================== + +In 2023, `we added `__ +a `Android port of the editor `__ +that can be used to work on new or existing projects on Android devices. + +.. note:: + + The Android editor is in beta testing stage, while we continue to refine the experience, + and bring it up to parity with the Desktop version of the editor. See :ref:`doc_using_the_android_editor_limitations` below. + +Android devices support +----------------------- + +The Android editor requires devices running Android 5 Lollipop or higher, with at least OpenGL 3 support. This includes (not exhaustive): + +- Android tablets, foldables and large phones +- Android-powered netbooks +- Chromebooks supporting Android apps + +.. _doc_using_the_android_editor_limitations: + +Required Permissions +-------------------- + +The Android editor requires the `All files access permission `__. +The permission allows the editor to create / import / read project files from any file locations on the device. +Without the permission, the editor is still functional, but has limited access to the device's files and directories. + +Limitations & known issues +-------------------------- + +Here are the known limitations and issues of the Android editor: + +- No C#/Mono support +- No GDExtension support +- No support for external script editors +- While available, the *Vulkan Forward+* renderer is not recommended due to severe performance issues +- No support for building and exporting an Android APK binary. + As a workaround, you can generate and export a `Godot PCK or ZIP file `__ +- No support for building and exporting binaries for other platforms +- Performance and stability issues when using the *Vulkan Mobile* renderer for a project +- UX not optimized for Android phones form-factor +- `Android Go devices `__ lacks + the *All files access* permission required for device read/write access. + As a workaround, when using a Android Go device, it's recommended to create new projects only in the Android *Documents* or *Downloads* directories. +- The editor doesn't properly resume when *Don't keep activities* is enabled in the *Developer Options* + +.. seealso:: + + See the + `list of open issues on GitHub related to the Android editor `__ for a list of known bugs. diff --git a/tutorials/inputs/handling_quit_requests.rst b/tutorials/inputs/handling_quit_requests.rst index 2ce7a77ec06..73aff713791 100644 --- a/tutorials/inputs/handling_quit_requests.rst +++ b/tutorials/inputs/handling_quit_requests.rst @@ -78,7 +78,7 @@ program termination, you should send the notification yourself: .. tabs:: .. code-tab:: gdscript GDScript - get_tree().get_root().propagate_notification(NOTIFICATION_WM_CLOSE_REQUEST) + get_tree().root.propagate_notification(NOTIFICATION_WM_CLOSE_REQUEST) .. code-tab:: csharp diff --git a/tutorials/math/beziers_and_curves.rst b/tutorials/math/beziers_and_curves.rst index 7d2cf87d0eb..3811a0c4475 100644 --- a/tutorials/math/beziers_and_curves.rst +++ b/tutorials/math/beziers_and_curves.rst @@ -262,7 +262,7 @@ Traversal at constant speed, then, can be done with the following pseudo-code: func _process(delta): t += delta - position = curve.interpolate_baked(t * curve.get_baked_length(), true) + position = curve.sample_baked(t * curve.get_baked_length(), true) .. code-tab:: csharp @@ -271,7 +271,7 @@ Traversal at constant speed, then, can be done with the following pseudo-code: public override void _Process(double delta) { _t += (float)delta; - Position = curve.InterpolateBaked(_t * curve.GetBakedLength(), true); + Position = curve.SampleBaked(_t * curve.GetBakedLength(), true); } And the output will, then, move at constant speed: diff --git a/tutorials/math/img/vector_subtract2.png b/tutorials/math/img/vector_subtract2.png deleted file mode 100644 index 55893b5ac7a..00000000000 Binary files a/tutorials/math/img/vector_subtract2.png and /dev/null differ diff --git a/tutorials/math/img/vector_subtract2.webp b/tutorials/math/img/vector_subtract2.webp new file mode 100644 index 00000000000..3c2351a282b Binary files /dev/null and b/tutorials/math/img/vector_subtract2.webp differ diff --git a/tutorials/math/random_number_generation.rst b/tutorials/math/random_number_generation.rst index c31a1d5c079..e11b1f40d12 100644 --- a/tutorials/math/random_number_generation.rst +++ b/tutorials/math/random_number_generation.rst @@ -445,7 +445,7 @@ terrain. Godot provides :ref:`class_fastnoiselite` for this, which supports func _ready(): randomize() # Configure the FastNoiseLite instance. - _noise.noise_type = NoiseType.TYPE_SIMPLEX_SMOOTH + _noise.noise_type = FastNoiseLite.NoiseType.TYPE_SIMPLEX_SMOOTH _noise.seed = randi() _noise.fractal_octaves = 4 _noise.frequency = 1.0 / 20.0 diff --git a/tutorials/math/vector_math.rst b/tutorials/math/vector_math.rst index b1d22287a54..f65639c3a6f 100644 --- a/tutorials/math/vector_math.rst +++ b/tutorials/math/vector_math.rst @@ -40,8 +40,9 @@ point: This is a **vector**. A vector represents a lot of useful information. As well as telling us that the point is at ``(4, 3)``, we can also think of it as an -angle ``θ`` and a length (or magnitude) ``m``. In this case, the arrow is a -**position vector** - it denotes a position in space, relative to the origin. +angle ``θ`` (theta) and a length (or magnitude) ``m``. In this case, the arrow +is a **position vector** - it denotes a position in space, relative to the +origin. A very important point to consider about vectors is that they only represent **relative** direction and magnitude. There is no concept of a vector's @@ -74,7 +75,9 @@ pixels down, use the following code: Godot supports both :ref:`Vector2 ` and :ref:`Vector3 ` for 2D and 3D usage, respectively. The same mathematical rules -discussed in this article apply to both types. +discussed in this article apply to both types, and wherever we link to +``Vector2`` methods in the class reference, you can also check out their +``Vector3`` counterparts. Member access ------------- @@ -84,18 +87,18 @@ The individual components of the vector can be accessed directly by name. .. tabs:: .. code-tab:: gdscript GDScript - # create a vector with coordinates (2, 5) + # Create a vector with coordinates (2, 5). var a = Vector2(2, 5) - # create a vector and assign x and y manually + # Create a vector and assign x and y manually. var b = Vector2() b.x = 3 b.y = 1 .. code-tab:: csharp - // create a vector with coordinates (2, 5) + // Create a vector with coordinates (2, 5). var a = new Vector2(2, 5); - // create a vector and assign x and y manually + // Create a vector and assign x and y manually. var b = new Vector2(); b.X = 3; b.Y = 1; @@ -125,7 +128,8 @@ Scalar multiplication --------------------- .. note:: Vectors represent both direction and magnitude. A value representing - only magnitude is called a **scalar**. + only magnitude is called a **scalar**. Scalars use the + :ref:`class_float` type in Godot. A vector can be multiplied by a **scalar**: @@ -155,14 +159,21 @@ Movement A vector can represent **any** quantity with a magnitude and direction. Typical examples are: position, velocity, acceleration, and force. In this image, the -spaceship at step 1 has a position vector of ``(1,3)`` and a velocity vector of -``(2,1)``. The velocity vector represents how far the ship moves each step. We +spaceship at step 1 has a position vector of ``(1, 3)`` and a velocity vector of +``(2, 1)``. The velocity vector represents how far the ship moves each step. We can find the position for step 2 by adding the velocity to the current position. .. image:: img/vector_movement1.png .. tip:: Velocity measures the **change** in position per unit of time. The new - position is found by adding velocity to the previous position. + position is found by adding the velocity multiplied by the elapsed time + (here assumed to be one unit, e.g. 1 s) to the previous position. + + In a typical 2D game scenario, you would have a velocity in pixels per + second, and multiply it by the ``delta`` parameter (time elapsed since + the previous frame) from the :ref:`_process() ` + or :ref:`_physics_process() ` + callbacks. Pointing toward a target ------------------------ @@ -171,9 +182,9 @@ In this scenario, you have a tank that wishes to point its turret at a robot. Subtracting the tank's position from the robot's position gives the vector pointing from the tank to the robot. -.. image:: img/vector_subtract2.png +.. image:: img/vector_subtract2.webp -.. tip:: To find a vector pointing from ``A`` to ``B`` use ``B - A``. +.. tip:: To find a vector pointing from ``A`` to ``B``, use ``B - A``. Unit vectors ~~~~~~~~~~~~ @@ -187,8 +198,8 @@ Normalization **Normalizing** a vector means reducing its length to ``1`` while preserving its direction. This is done by dividing each of its components by its magnitude. -Because this is such a common operation, ``Vector2`` and ``Vector3`` provide a -method for normalizing: +Because this is such a common operation, Godot provides a dedicated +:ref:`normalized() ` method for this: .. tabs:: .. code-tab:: gdscript GDScript @@ -199,12 +210,11 @@ method for normalizing: a = a.Normalized(); - .. warning:: Because normalization involves dividing by the vector's length, you cannot normalize a vector of length ``0``. Attempting to do so would normally result in an error. In GDScript though, trying to - call the ``normalized()`` method on a ``Vector2`` or ``Vector3`` of - length 0 leaves the value untouched and avoids the error for you. + call the ``normalized()`` method on a vector of length 0 leaves the + value untouched and avoids the error for you. Reflection ---------- @@ -220,30 +230,27 @@ other object: The surface normal has a value of ``(0, -1)`` because this is a horizontal surface. When the ball collides, we take its remaining motion (the amount left -over when it hits the surface) and reflect it using the normal. In Godot, the -:ref:`Vector2 ` class has a ``bounce()`` method to handle this. -Here is a GDScript example of the diagram above using a :ref:`CharacterBody2D +over when it hits the surface) and reflect it using the normal. In Godot, there +is a :ref:`bounce() ` method to handle this. +Here is a code example of the above diagram using a :ref:`CharacterBody2D `: - .. tabs:: .. code-tab:: gdscript GDScript - # object "collision" contains information about the collision - var collision = move_and_collide(velocity * delta) + var collision: KinematicCollision2D = move_and_collide(velocity * delta) if collision: - var reflect = collision.remainder.bounce(collision.normal) - velocity = velocity.bounce(collision.normal) + var reflect = collision.get_remainder().bounce(collision.get_normal()) + velocity = velocity.bounce(collision.get_normal()) move_and_collide(reflect) .. code-tab:: csharp - // KinematicCollision2D contains information about the collision - KinematicCollision2D collision = MoveAndCollide(_velocity * delta); + KinematicCollision2D collision = MoveAndCollide(_velocity * (float)delta); if (collision != null) { - var reflect = collision.Remainder.Bounce(collision.Normal); - _velocity = _velocity.Bounce(collision.Normal); + var reflect = collision.GetRemainder().Bounce(collision.GetNormal()); + _velocity = _velocity.Bounce(collision.GetNormal()); MoveAndCollide(reflect); } @@ -263,22 +270,25 @@ and .. image:: img/vector_dot2.png -However, in most cases it is easiest to use the built-in method. Note that the -order of the two vectors does not matter: +The mathematical notation *||A||* represents the magnitude of vector ``A``, and +*A*\ :sub:`x` means the ``x`` component of vector ``A``. + +However, in most cases it is easiest to use the built-in :ref:`dot() +` method. Note that the order of the two vectors does not matter: .. tabs:: .. code-tab:: gdscript GDScript var c = a.dot(b) - var d = b.dot(a) # These are equivalent. + var d = b.dot(a) # These are equivalent. .. code-tab:: csharp float c = a.Dot(b); - float d = b.Dot(a); // These are equivalent. + float d = b.Dot(a); // These are equivalent. The dot product is most useful when used with unit vectors, making the first -formula reduce to just ``cosθ``. This means we can use the dot product to tell +formula reduce to just ``cos(θ)``. This means we can use the dot product to tell us something about the angle between two vectors: .. image:: img/vector_dot3.png @@ -297,11 +307,12 @@ player? .. image:: img/vector_facing2.png The green arrows ``fA`` and ``fB`` are **unit vectors** representing the -zombies' facing directions and the blue semicircle represents its field of view. +zombie's facing direction and the blue semicircle represents its field of view. For zombie ``A``, we find the direction vector ``AP`` pointing to the player using ``P - A`` and normalize it, however, Godot has a helper method to do this -called ``direction_to``. If the angle between this vector and the facing vector -is less than 90°, then the zombie can see the player. +called :ref:`direction_to() `. If the angle +between this vector and the facing vector is less than 90°, then the zombie can +see the player. In code it would look like this: @@ -349,9 +360,8 @@ The cross product is calculated like this: c.Y = (a.Z * b.X) - (a.X * b.Z); c.Z = (a.X * b.Y) - (a.Y * b.X); - - -With Godot, you can use the built-in method: +With Godot, you can use the built-in :ref:`Vector3.cross() ` +method: .. tabs:: .. code-tab:: gdscript GDScript @@ -362,6 +372,10 @@ With Godot, you can use the built-in method: var c = a.Cross(b); +The cross product is not mathematically defined in 2D. The :ref:`Vector2.cross() +` method is a commonly used analog of the 3D cross +product for 2D vectors. + .. note:: In the cross product, order matters. ``a.cross(b)`` does not give the same result as ``b.cross(a)``. The resulting vectors point in **opposite** directions. @@ -371,8 +385,8 @@ Calculating normals One common use of cross products is to find the surface normal of a plane or surface in 3D space. If we have the triangle ``ABC`` we can use vector -subtraction to find two edges ``AB`` and ``AC``. Using the cross product, ``AB x -AC`` produces a vector perpendicular to both: the surface normal. +subtraction to find two edges ``AB`` and ``AC``. Using the cross product, +``AB × AC`` produces a vector perpendicular to both: the surface normal. Here is a function to calculate a triangle's normal: @@ -380,7 +394,7 @@ Here is a function to calculate a triangle's normal: .. code-tab:: gdscript GDScript func get_triangle_normal(a, b, c): - # find the surface normal given 3 vertices + # Find the surface normal given 3 vertices. var side1 = b - a var side2 = c - a var normal = side1.cross(side2) @@ -390,7 +404,7 @@ Here is a function to calculate a triangle's normal: Vector3 GetTriangleNormal(Vector3 a, Vector3 b, Vector3 c) { - // find the surface normal given 3 vertices + // Find the surface normal given 3 vertices. var side1 = b - a; var side2 = c - a; var normal = side1.Cross(side2); diff --git a/tutorials/navigation/img/nav_static_obstacle_build.gif b/tutorials/navigation/img/nav_static_obstacle_build.gif new file mode 100644 index 00000000000..4c50c4fcabe Binary files /dev/null and b/tutorials/navigation/img/nav_static_obstacle_build.gif differ diff --git a/tutorials/navigation/index.rst b/tutorials/navigation/index.rst index 738e9e5c13f..68becd28477 100644 --- a/tutorials/navigation/index.rst +++ b/tutorials/navigation/index.rst @@ -17,7 +17,6 @@ Navigation navigation_using_navigationobstacles navigation_using_navigationlinks navigation_using_navigationlayers - navigation_using_agent_avoidance navigation_debug_tools navigation_connecting_navmesh navigation_different_actor_types diff --git a/tutorials/navigation/navigation_different_actor_types.rst b/tutorials/navigation/navigation_different_actor_types.rst index 19707a510f9..2336f686ed9 100644 --- a/tutorials/navigation/navigation_different_actor_types.rst +++ b/tutorials/navigation/navigation_different_actor_types.rst @@ -16,12 +16,12 @@ The same approach can be used to distinguish between e.g. landwalking, swimming .. tabs:: .. code-tab:: gdscript GDScript - # create navigation mesh resources for each actor size + # Create a navigation mesh resource for each actor size. var navigation_mesh_standard_size: NavigationMesh = NavigationMesh.new() var navigation_mesh_small_size: NavigationMesh = NavigationMesh.new() var navigation_mesh_huge_size: NavigationMesh = NavigationMesh.new() - # set appropriated agent parameters + # Set appropriated agent parameters. navigation_mesh_standard_size.agent_radius = 0.5 navigation_mesh_standard_size.agent_height = 1.8 navigation_mesh_small_size.agent_radius = 0.25 @@ -29,38 +29,45 @@ The same approach can be used to distinguish between e.g. landwalking, swimming navigation_mesh_huge_size.agent_radius = 1.5 navigation_mesh_huge_size.agent_height = 2.5 - # get the root node for the baking to parse geometry + # Get the root node to parse geometry for the baking. var root_node: Node3D = get_node("NavigationMeshBakingRootNode") - # bake the navigation geometry for each agent size + # Bake the navigation geometry for each agent size. NavigationMeshGenerator.bake(navigation_mesh_standard_size, root_node) NavigationMeshGenerator.bake(navigation_mesh_small_size, root_node) NavigationMeshGenerator.bake(navigation_mesh_huge_size, root_node) - # create different navigation maps on the NavigationServer + # Create different navigation maps on the NavigationServer. var navigation_map_standard: RID = NavigationServer3D.map_create() var navigation_map_small: RID = NavigationServer3D.map_create() var navigation_map_huge: RID = NavigationServer3D.map_create() - # create a region for each map - var navigation_map_standard_region: RID = NavigationServer3D.region_create() - var navigation_map_small_region: RID = NavigationServer3D.region_create() - var navigation_map_huge_region: RID = NavigationServer3D.region_create() - - # set navigation mesh for each region - NavigationServer3D.region_set_navigation_mesh(navigation_map_standard_region, navigation_mesh_standard_size) - NavigationServer3D.region_set_navigation_mesh(navigation_map_small_region, navigation_mesh_small_size) - NavigationServer3D.region_set_navigation_mesh(navigation_map_huge_region, navigation_mesh_huge_size) - - # add regions to maps - navigation_map_standard_region.region_set_map(navigation_map_standard_region, navigation_map_standard) - navigation_map_small_region.region_set_map(navigation_map_small_region, navigation_map_small) - navigation_map_huge_region.region_set_map(navigation_map_huge_region, navigation_map_huge) - - # wait a physics frame for sync - await get_tree().physics_frame - - # query paths for each size - var path_standard_agent = NavigationServer3D.map_get_path(navigation_map_standard, start_pos, end_pos, true) - var path_small_agent = NavigationServer3D.map_get_path(navigation_mesh_small_size, start_pos, end_pos, true) - var path_huge_agent = NavigationServer3D.map_get_path(navigation_map_huge, start_pos, end_pos, true) + # Set the new navigation maps as active. + NavigationServer3D.map_set_active(navigation_map_standard, true) + NavigationServer3D.map_set_active(navigation_map_small, true) + NavigationServer3D.map_set_active(navigation_map_huge, true) + + # Create a region for each map. + var navigation_region_standard: RID = NavigationServer3D.region_create() + var navigation_region_small: RID = NavigationServer3D.region_create() + var navigation_region_huge: RID = NavigationServer3D.region_create() + + # Add the regions to the maps. + NavigationServer3D.region_set_map(navigation_region_standard, navigation_map_standard) + NavigationServer3D.region_set_map(navigation_region_small, navigation_map_small) + NavigationServer3D.region_set_map(navigation_region_huge, navigation_map_huge) + + # Set navigation mesh for each region. + NavigationServer3D.region_set_navigation_mesh(navigation_region_standard, navigation_mesh_standard_size) + NavigationServer3D.region_set_navigation_mesh(navigation_region_small, navigation_mesh_small_size) + NavigationServer3D.region_set_navigation_mesh(navigation_region_huge, navigation_mesh_huge_size) + + # Create start and end position for the navigation path query. + var start_pos: Vector3 = Vector3(0.0, 0.0, 0.0) + var end_pos: Vector3 = Vector3(2.0, 0.0, 0.0) + var use_corridorfunnel: bool = true + + # Query paths for each agent size. + var path_standard_agent = NavigationServer3D.map_get_path(navigation_map_standard, start_pos, end_pos, use_corridorfunnel) + var path_small_agent = NavigationServer3D.map_get_path(navigation_map_small, start_pos, end_pos, use_corridorfunnel) + var path_huge_agent = NavigationServer3D.map_get_path(navigation_map_huge, start_pos, end_pos, use_corridorfunnel) diff --git a/tutorials/navigation/navigation_using_agent_avoidance.rst b/tutorials/navigation/navigation_using_agent_avoidance.rst deleted file mode 100644 index a574038beed..00000000000 --- a/tutorials/navigation/navigation_using_agent_avoidance.rst +++ /dev/null @@ -1,72 +0,0 @@ -.. _doc_navigation_using_agent_avoidance: - -Using Agent Avoidance -===================== - -This section is about how to use agent avoidance with the NavigationServer and -documents how agent avoidance is implemented in Godot. - -For avoidance with NavigationAgents see :ref:`doc_navigation_using_navigationagents`. - -Agent avoidance helps to prevent direct collision with other agents or moving obstacles -while the agents still follow their original velocity as best as possible. - -Avoidance in Godot is implemented with the help of the RVO library (Reciprocal Velocity Obstacle). -RVO places agents on a flat RVO map and gives each agent a ``radius`` and a ``position``. -Agents with overlapping radius compute a ``safe_velocity`` from their -current ``velocity``. The ``safe_velocity`` then needs to replace the original -submitted ``velocity`` to move the actor behind the agent with custom movement code. - -.. note:: - - RVO avoidance is not involved in regular pathfinding, it is a completely separate system. - If used inappropriately, the RVO avoidance can actively harm the perceived pathfinding quality. - -Creating Avoidance Agents with Scripts --------------------------------------- - -Agents and obstacles share the same NavigationServer API functions. - -Creating agents on the NavigationServer is only required for avoidance but not for normal pathfinding. -Pathfinding is map and region navmesh based while avoidance is purely map and agent based. - -.. tabs:: - .. code-tab:: gdscript GDScript - - extends Node3D - - var new_agent_rid: RID = NavigationServer3D.agent_create() - var default_3d_map_rid: RID = get_world_3d().get_navigation_map() - - NavigationServer3D.agent_set_map(new_agent_rid, default_3d_map_rid) - NavigationServer3D.agent_set_radius(new_agent_rid, 0.5) - NavigationServer3D.agent_set_position(new_agent_rid, global_transform.origin) - -To receive safe_velocity signals for avoidance for the agent a callback needs to be registered on the NavigationServer. - -.. tabs:: - .. code-tab:: gdscript GDScript - - extends Node3D - - var agent_rid: RID = NavigationServer3D.agent_create() - NavigationServer3D.agent_set_callback(agent_rid, self.on_safe_velocity_computed) - - func on_safe_velocity_computed(safe_velocity: Vector3): - # do your avoidance movement - -After the current and new calculated velocity needs to be passed to the NavigationServer each physics frame to trigger the safe_velocity callback when the avoidance processing is finished. - -.. tabs:: - .. code-tab:: gdscript GDScript - - func _physics_process(delta): - - NavigationServer3D.agent_set_velocity(current_velocity) - NavigationServer3D.agent_set_target_velocity(new_velocity) - -.. warning:: - - If _process() is used instead of _physics_process() at a higher framerate - than physics the agent velocity should not be updated more than ones each - physics frame e.g. by tracking the Engine.get_physics_frames(). diff --git a/tutorials/navigation/navigation_using_navigationagents.rst b/tutorials/navigation/navigation_using_navigationagents.rst index 23e089414b4..b14a288b81c 100644 --- a/tutorials/navigation/navigation_using_navigationagents.rst +++ b/tutorials/navigation/navigation_using_navigationagents.rst @@ -3,123 +3,137 @@ Using NavigationAgents ====================== -NavigationsAgents are helper nodes to facilitate common calls to the NavigationServer API -on behalf of the parent actor node in a more convenient manner for beginners. +NavigationsAgents are helper nodes that combine functionality +for pathfinding, path following and agent avoidance for a Node2D/3D inheriting parent node. +They facilitate common calls to the NavigationServer API on +behalf of the parent actor node in a more convenient manner for beginners. 2D and 3D version of NavigationAgents are available as :ref:`NavigationAgent2D` and :ref:`NavigationAgent3D` respectively. -NavigationsAgents are entirely optional for navigation pathfinding. -The functionality of NavigationsAgents can be recreated with scripts and direct -calls to the NavigationServer API. If the default NavigationsAgent does not do what you want -for your game feel free to design your own NavigationsAgent with scripts. +New NavigationAgent nodes will automatically join the default navigation map on the World2D/World3D. -.. warning:: - - NavigationsAgent nodes and NavigationServer ``agents`` are not the same. - The later is an RVO avoidance agent and solely used for avoidance. - RVO avoidance agents are not involved in regular pathfinding. +NavigationsAgent nodes are optional and not a hard requirement to use the navigation system. +Their entire functionality can be replaced with scripts and direct calls to the NavigationServer API. NavigationAgent Pathfinding --------------------------- -To use NavigationAgents for pathfinding, place a NavigationAgent2D/3D Node below a Node2D/3D inheriting parent node. +NavigationAgents query a new navigation path on their current navigation map when their ``target_position`` is set with a global position. -To have the agent query a path to a target position use the ``set_target_position()`` method. -Once the target has been set, the next position to follow in the path -can be retrieved with the ``get_next_path_position()`` function. Move the parent actor node -to this position with your own movement code. On the next ``physics_frame``, call -``get_next_path_position()`` again for the next position and repeat this until the path ends. +The result of the pathfinding can be influenced with the following properties. -NavigationAgents have their own internal logic to proceed with the current path and call for updates. -NavigationAgents recognize by distance when a path point or the final target is reached. -NavigationAgents refresh a path automatically when too far away from the current pathpoint. -The important updates are all triggered with the ``get_next_path_position()`` function -when called in ``_physics_process()``. +- The ``navigation_layers`` bitmask can be used to limit the navigation meshes that the agent can use. +- The ``pathfinding_algorithm`` controls how the pathfinding travels through the navigation mesh polygons in the path search. +- The ``path_postprocessing`` sets if or how the raw path corridor found by the pathfinding is altered before it is returned. +- The ``path_metadata_flags`` enable the collection of additional path point meta data returned by the path. + +.. warning:: + + Disabling path meta flags will disable related signal emissions on the agent. + +NavigationAgent Pathfollowing +----------------------------- -Be careful calling other NavigationAgent functions not required for path movement -while the actor is following a path, as many function trigger a full path refresh. +After a ``target_position`` has been set for the agent, the next position to follow in the path +can be retrieved with the ``get_next_path_position()`` function. + +Once the next path position is received move the parent actor node of the agent +towards this path position with your own movement code. .. note:: - New NavigationAgents will automatically join the - default navigation map for their 2D/3D dimension. + The navigation system never moves the parent node of a NavigationAgent. + The movement is entirely in the hands of users and their custom scripts. -.. warning:: +NavigationAgents have their own internal logic to proceed with the current path and call for updates. - Resetting the path every frame (by accident) might get the actor to stutter or spin around in place. +The ``get_next_path_position()`` function is responsible for updating many of the agent's internal states and properties. +The function should be repeatedly called `once` every ``physics_process`` until ``is_navigation_finished()`` tells that the path is finished. +The function should not be called after the target position or path end has been reached +as it can make the agent jitter in place due to the repeated path updates. +Always check very early in script with ``is_navigation_finished()`` if the path is already finished. -NavigationAgents were designed with ``_physics_process()`` in mind to keep in sync with both :ref:`NavigationServer3D` and :ref:`PhysicsServer3D`. +The following properties influence the path following behavior. -They work well out of the box with :ref:`CharacterBody2D` and :ref:`CharacterBody3D` as well as any rigid bodies. +- The ``path_desired_distance`` defines the distance at which the agent advances its internal path index to the next path position. +- The ``target_desired_distance`` defines the distance at which the agent considers the target position to be reached and the path at its end. +- The ``path_max_distance`` defines when an agent requests a new path cause it was moved too far away from the current path point segment. -.. warning:: +The important updates are all triggered with the ``get_next_path_position()`` function +when called in ``_physics_process()``. - The important restriction for non-physics characters is that the NavigationAgent node only accepts a single update each ``physics_frame`` as further updates will be blocked. +NavigationAgents can be used with ``process`` but are still limited to a single update that happens in ``physics_process``. -.. warning:: +Script examples for various nodes commonly used with NavigationAgents can be found further below. + +Pathfollowing common problems +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There are some common user problems and important caveats to consider when writing agent movement scripts. - If a NavigationAgent is used with ``_process()`` at high framerate make sure to accumulate the values of multiple frames and call the NavigationAgent function only once each ``physics_frame``. +- The path is returned empty + If an agent queries a path before the navigation map synchronisation, e.g. in a _ready() function, the path might return empty. In this case the get_next_path_position() function will return the same position as the agent parent node and the agent will consider the path end reached. This is fixed by making a deferred call or using a callback e.g. waiting for the navigation map changed signal. -.. _doc_navigation_script_templates: +- The agent is stuck dancing between two positions + This is usually caused by very frequent path updates every single frame, either deliberate or by accident (e.g. max path distance set too short). The pathfinding needs to find the closest position that are valid on navigation mesh. If a new path is requested every single frame the first path positions might end up switching constantly in front and behind the agent's current position, causing it to dance between the two positions. +- The agent is backtracking sometimes + If an agent moves very fast it might overshoot the path_desired_distance check without ever advancing the path index. This can lead to the agent backtracking to the path point now behind it until it passes the distance check to increase the path index. Increase the desired distances accordingly for your agent speed and update rate usually fixes this as well as a more balanced navigation mesh polygon layout with not too many polygon edges cramped together in small spaces. + +- The agent is sometimes looking backwards for a frame + Same as with stuck dancing agents between two positions, this is usually caused by very frequent path updates every single frame. Depending on your navigation mesh layout, and especially when an agent is directly placed over a navigation mesh edge or edge connection, expect path positions to be sometimes slightly "behind" your actors current orientation. This happens due to precision issues and can not always be avoided. This is usually only a visible problem if actors are instantly rotated to face the current path position. NavigationAgent Avoidance ------------------------- -This section explains how to use the built-in avoidance specific -to NavigationAgent nodes. For general avoidance use and more technical details -on RVO avoidance see :ref:`doc_navigation_using_agent_avoidance`. - +This section explains how to use the navigation avoidance specific to NavigationAgents. In order for NavigationAgents to use the avoidance feature the ``enable_avoidance`` property must be set to ``true``. .. image:: img/agent_avoidance_enabled.png +The velocity_computed signal of the NavigationAgent node must be connected to receive the ``safe_velocity`` calculation result. + +.. image:: img/agent_safevelocity_signal.png + +In order to trigger the avoidance velocity calculation, the current velocity of the agent's parent node must be set with ``set_velocity()`` on the NavigationAgent node in ``_physics_process()``. + +After a short wait for processing the avoidance (still in the same frame) the ``safe_velocity`` vector will be received with the signal. +This velocity vector should be used to move the NavigationAgent's parent node in order to avoidance collision with other avoidance using agents or avoidance obstacles. + .. note:: Only other agents on the same map that are registered for avoidance themself will be considered in the avoidance calculation. The following NavigationAgent properties are relevant for avoidance: - - The property ``radius`` controls the size of the avoidance circle around the agent. This area describes the agents body and not the avoidance maneuver distance. + - The property ``height`` is available in 3D only. The height together with the current global y-axis position of the agent determines the vertical placement of the agent in the avoidance simulation. Agents using the 2D avoidance will automatically ignore other agents or obstacles that are below or above them. + - The property ``radius`` controls the size of the avoidance circle, or in case of 3D sphere, around the agent. This area describes the agents body and not the avoidance maneuver distance. - The property ``neighbor_distance`` controls the search radius of the agent when searching for other agents that should be avoided. A lower value reduces processing cost. - The property ``max_neighbors`` controls how many other agents are considered in the avoidance calculation if they all have overlapping radius. A lower value reduces processing cost but a too low value may result in agents ignoring the avoidance. - - The property ``time_horizion`` controls the avoidance maneuver start and end distance. - How early and for how long an agents reacts to other agents within the ``neighbor_distance`` radius to correct its own velocity. - A lower value results in avoidance kicking in with a very intense velocity change at a short distance while a high value results in very early but small velocity changes. - - The property ``max_speed`` controls the maximum velocity assumed for the agents avoidance calculation. + - The properties ``time_horizon_agents`` and ``time_horizon_obstacles`` control the avoidance prediction time for other agents or obstacles in seconds. When agents calculate their safe velocities they choose velocities that can be kept for this amount of seconds without colliding with another avoidance object. The prediction time should be kept as low as possible as agents will slow down their velocities to avoid collision in that timeframe. + - The property ``max_speed`` controls the maximum velocity allowed for the agents avoidance calculation. If the agents parents moves faster than this value the avoidance ``safe_velocity`` might not be accurate enough to avoid collision. + - The property ``use_3d_avoidance`` switches the agent between the 2D avoidance (xz axis) and the 3D avoidance (xyz axis) on the next update. + Note that 2D avoidance and 3D avoidance run in separate avoidance simulations so agents split between them do not affect each other. + - The properties ``avoidance_layers`` and ``avoidance_mask`` are bitmasks similar to e.g. physics layers. Agents will only avoid other avoidance objects that are on an avoidance layer that matches at least one of their own avoidance mask bits. + - The ``avoidance_priority`` makes agents with a higher priority ignore agents with a lower priority. This can be used to give certain agents more importance in the avoidance simulation, e.g. important npcs characters, without constantly changing their entire avoidance layers or mask. -The ``velocity_computed`` signal of the agent node must be connected to receive the ``safe_velocity`` calculation result. -.. image:: img/agent_safevelocity_signal.png - -Additional the current velocity of the agents parent must be set for the agent in ``_physics_process()`` with ``set_velocity()``. - -After a short wait for processing the avoidance (still in the same frame) the ``safe_velocity`` vector will be received with the signal. -This velocity vector should be used to move the NavigationAgent's parent node in order to avoidance collision with other avoidance registered agents in proximity. - -RVO exists in its own space and has no information from navigation meshes or physics collision. -Behind the scene avoidance agents are just circles with different radius on a flat plane. -In narrow places obstructed with collision objects, the avoidance maneuver radius needs to be -reduced considerably or disabled else the avoidance velocity will get actors stuck on collision easily. +Avoidance exists in its own space and has no information from navigation meshes or physics collision. +Behind the scene avoidance agents are just circles with different radius on a flat 2D plane or spheres in an otherwise empty 3D space. +NavigationObstacles can be used to add some environment constrains to the avoidance simulation, see :ref:`doc_navigation_using_navigationobstacles`. .. note:: - Avoidance should be seen as a last resort option for constantly moving objects that cannot be re(baked) to a navigationmesh efficiently in order to move around them. - -.. warning:: - - Actors that move according to their avoidance agent velocity will not move at - full speed, can leave the navigation mesh bounds and can make movement - pauses when the avoidance simulation becomes unsolvable. + Avoidance does not affect the pathfinding. It should be seen as an additional option for constantly moving objects that cannot be (re)baked to a navigation mesh efficiently in order to move around them. Using the NavigationAgent ``enable_avoidance`` property is the preferred option -to toggle avoidance but the following scripts for NavigationAgents can be -used to create or delete avoidance callbacks for the agent RID. +to toggle avoidance. The following code snippets can be used to +toggle avoidance on agents, create or delete avoidance callbacks or switch avoidance modes. .. tabs:: .. code-tab:: gdscript GDScript @@ -127,10 +141,15 @@ used to create or delete avoidance callbacks for the agent RID. extends NavigationAgent2D var agent: RID = get_rid() - # Enable - NavigationServer2D::get_singleton()->agent_set_callback(agent, self._avoidance_done) - # Disable - NavigationServer2D::get_singleton()->agent_set_callback(agent, Callable()) + # Enable avoidance + NavigationServer2D.agent_set_avoidance_enabled(agent, true) + # Create avoidance callback + NavigationServer2D.agent_set_avoidance_callback(agent, Callable(self, "_avoidance_done")) + + # Disable avoidance + NavigationServer2D.agent_set_avoidance_enabled(agent, false) + # Delete avoidance callback + NavigationServer2D.agent_set_avoidance_callback(agent, Callable()) .. tabs:: .. code-tab:: gdscript GDScript @@ -138,10 +157,19 @@ used to create or delete avoidance callbacks for the agent RID. extends NavigationAgent3D var agent: RID = get_rid() - # Enable - NavigationServer3D::get_singleton()->agent_set_callback(agent, self._avoidance_done) - # Disable - NavigationServer3D::get_singleton()->agent_set_callback(agent, Callable()) + # Enable avoidance + NavigationServer3D.agent_set_avoidance_enabled(agent, true) + # Create avoidance callback + NavigationServer3D.agent_set_avoidance_callback(agent, Callable(self, "_avoidance_done")) + # Switch to 3D avoidance + NavigationServer3D.agent_set_use_3d_avoidance(agent, true) + + # Disable avoidance + NavigationServer3D.agent_set_avoidance_enabled(agent, false) + # Delete avoidance callback + NavigationServer3D.agent_set_avoidance_callback(agent, Callable()) + # Switch to 2D avoidance + NavigationServer3D.agent_set_use_3d_avoidance(agent, false) NavigationAgent Script Templates -------------------------------- diff --git a/tutorials/navigation/navigation_using_navigationlinks.rst b/tutorials/navigation/navigation_using_navigationlinks.rst index 60b2d786e11..642ecb30223 100644 --- a/tutorials/navigation/navigation_using_navigationlinks.rst +++ b/tutorials/navigation/navigation_using_navigationlinks.rst @@ -5,7 +5,7 @@ Using NavigationLinks .. image:: img/nav_navmesh_links.png -NavigationLinks are used to connect navmesh polygons from :ref:`NavigationRegion2D` +NavigationLinks are used to connect navigation mesh polygons from :ref:`NavigationRegion2D` and :ref:`NavigationRegion3D` over arbitrary distances for pathfinding. NavigationLinks are also used to consider movement shortcuts in pathfinding available through @@ -15,7 +15,7 @@ interacting with gameplay objects e.g. ladders, jump pads or teleports. :ref:`NavigationLink2D` and :ref:`NavigationLink3D` respectively. -Different NavigationRegions can connect their navmeshes without the need for a NavigationLink +Different NavigationRegions can connect their navigation meshes without the need for a NavigationLink as long as they are within navigation map ``edge_connection_margin`` and have compatible ``navigation_layers``. As soon as the distance becomes too large, building valid connections becomes a problem - a problem that NavigationLinks can solve. @@ -26,17 +26,17 @@ See :ref:`doc_navigation_connecting_navmesh` to learn more about how to connect NavigationLinks share many properties with NavigationRegions like ``navigation_layers``. NavigationLinks add a single connection between two positions over an arbitrary distance -compared to NavigationRegions that add a more local traversable area with a navmesh resource. +compared to NavigationRegions that add a more local traversable area with a navigation mesh resource. -NavigationLinks have a ``start_location`` and ``end_location`` and can go in both directions when ``bidirectional`` is enabled. -When placed a navigationlink connects the navmesh polygons closest to its ``start_location`` and ``end_location`` within search radius for pathfinding. +NavigationLinks have a ``start_position`` and ``end_position`` and can go in both directions when ``bidirectional`` is enabled. +When placed a navigationlink connects the navigation mesh polygons closest to its ``start_position`` and ``end_position`` within search radius for pathfinding. The polygon search radius can be configured globally in the ProjectSettings under ``navigation/2d_or_3d/default_link_connection_radius`` or set for each navigation ``map`` individually using the ``NavigationServer.map_set_link_connection_radius()`` function. -Both ``start_location`` and ``end_location`` have debug markers in the Editor. +Both ``start_position`` and ``end_position`` have debug markers in the Editor. The visible radius of a position shows the polygon search radius. -All navmesh polygons inside are compared and the closest is picked for the edge connection. +All navigation mesh polygons inside are compared and the closest is picked for the edge connection. If no valid polygon is found within the search radius the navigation link gets disabled. .. image:: img/nav_link_debug_visuals.png diff --git a/tutorials/navigation/navigation_using_navigationmeshes.rst b/tutorials/navigation/navigation_using_navigationmeshes.rst index 7b8626b5cc5..d5ce14994f9 100644 --- a/tutorials/navigation/navigation_using_navigationmeshes.rst +++ b/tutorials/navigation/navigation_using_navigationmeshes.rst @@ -208,16 +208,22 @@ The following script creates a new 3D navigation region and fills it with proced NavigationServer3D.region_set_map(new_3d_region_rid, default_3d_map_rid) var new_navigation_mesh: NavigationMesh = NavigationMesh.new() - var new_plane_mesh: PlaneMesh = PlaneMesh.new() - new_plane_mesh.size = Vector2(10.0, 10.0) - new_navigation_mesh.create_from_mesh(new_plane_mesh) - + # Add vertices for a triangle. + new_navigation_mesh.vertices = PackedVector3Array([ + Vector3(-1.0, 0.0, 1.0), + Vector3(1.0, 0.0, 1.0), + Vector3(1.0, 0.0, -1.0) + ]) + # Add indices for the polygon. + new_navigation_mesh.add_polygon( + PackedInt32Array([0, 1, 2]) + ) NavigationServer3D.region_set_navigation_mesh(new_3d_region_rid, new_navigation_mesh) Navmesh for 3D GridMaps ~~~~~~~~~~~~~~~~~~~~~~~ -The following script creates a new 3D navmesh from the mesh of a GridMap item, clears the current grid cells and adds new procedual grid cells with the new navmesh. +The following script creates a new 3D navigation mesh for each GridMap items, clears the current grid cells and adds new procedual grid cells with the new navigation mesh. .. tabs:: .. code-tab:: gdscript GDScript @@ -227,12 +233,21 @@ The following script creates a new 3D navmesh from the mesh of a GridMap item, c # enable navigation mesh for grid items set_bake_navigation(true) - # get mesh from grid item, bake and set a new navigation mesh for the library + # get grid items, create and set a new navigation mesh for each item in the MeshLibrary var gridmap_item_list: PackedInt32Array = mesh_library.get_item_list() for item in gridmap_item_list: - var item_mesh: Mesh = mesh_library.get_item_mesh(item) var new_item_navigation_mesh: NavigationMesh = NavigationMesh.new() - new_item_navigation_mesh.create_from_mesh(item_mesh) + # Add vertices and polygons that describe the traversable ground surface. + # E.g. for a convex polygon that resembles a flat square. + new_item_navigation_mesh.vertices = PackedVector3Array([ + Vector3(-1.0, 0.0, 1.0), + Vector3(1.0, 0.0, 1.0), + Vector3(1.0, 0.0, -1.0), + Vector3(-1.0, 0.0, -1.0), + ]) + new_item_navigation_mesh.add_polygon( + PackedInt32Array([0, 1, 2, 3]) + ) mesh_library.set_item_navigation_mesh(item, new_item_navigation_mesh) mesh_library.set_item_navigation_mesh_transform(item, Transform3D()) diff --git a/tutorials/navigation/navigation_using_navigationobstacles.rst b/tutorials/navigation/navigation_using_navigationobstacles.rst index 107a1eed4ed..1e7e4d7049e 100644 --- a/tutorials/navigation/navigation_using_navigationobstacles.rst +++ b/tutorials/navigation/navigation_using_navigationobstacles.rst @@ -3,52 +3,93 @@ Using NavigationObstacles ========================= -NavigationObstacles are used to set an avoidance radius around objects -that, due to their constant movement, cannot be efficiently (re)baked -to a 2D NavigationPolygon or 3D NavigationMesh. +NavigationObstacles can be used either as static or dynamic obstacles to affect avoidance controlled agents. + +- When used statically NavigationObstacles constrain avoidance controlled agents outside or inside a polygon defined area. +- When used dynamically NavigationObstacles push away avoidance controlled agents in a radius around them. 2D and 3D versions of NavigationObstacles nodes are available as :ref:`NavigationObstacle2D` and :ref:`NavigationObstacle3D` respectively. -NavigationObstacles are not intended for any kind of static geometry -or temporary barriers that may change their position occasionally. -Those changes should be (re)baked so actors can follow the outlines -of these objects at higher detail with navigation paths. The obstacle avoidance -should be seen as a last resort option intended for objects that are constantly moving. +.. note:: + NavigationObstacles do not change or influence the pathfinding in any way. + NavigationObstacles only affect the avoidance velocities of agents controlled by avoidance. -To use NavigationObstacles for avoidance, place a NavigationObstacle2D/3D node -below a Node2D/3D inheriting parent node. While the obstacle node has an -option to ``estimate_radius`` from child collisions, prefer to set a -more reliable manual ``radius`` value. If estimated, the obstacle will use -a radius that encapsulates the entire parent node which can result in a very large -radius value if the parent is not a circle shape but e.g. a long rectangle shape. +Static obstacles +~~~~~~~~~~~~~~~~ -.. note:: +A NavigationObstacle is considered static when its ``vertices`` property is populated with an outline array of positions to form a polygon. + +.. image:: img/nav_static_obstacle_build.gif + +- Static obstacles act as hard do-not-cross boundaries for avoidance using agents, e.g. similar to physics collision but for avoidance. +- Static obstacles define their boundaries with an array of outline ``vertices`` (positions), and in case of 3D with an additional ``height`` property. +- Static obstacles only work for agents that use the 2D avoidance mode. +- Static obstacles define through winding order of the vertices if agents are pushed out or sucked in. +- Static obstacles can not change their position. They can only be warped to a new position and rebuild from scratch. Static obstacles as a result are ill-suited for usages where the position is changed every frame as the constant rebuild has a high performance cost. +- Static obstacles that are warped to another position can not be predicted by agents. This creates the risk of getting agents stuck should a static obstacle be warped on top of agents. + +When the 2D avoidance is used in 3D the y-axis of Vector3 vertices is ignored. Instead, the global y-axis position of the obstacle is used as the elevation level. Agents will ignore static obstacles in 3D that are below or above them. This is automatically determined by global y-axis position of both obstacle and agent as the elevation level as well as their respective height properties. + +Dynamic obstacles +~~~~~~~~~~~~~~~~~ + +A NavigationObstacle is considered dynamic when its ``radius`` property is greater than zero. + +- Dynamic obstacles act as a soft please-move-away-from-me object for avoidance using agents, e.g. similar to how they avoid other agents. +- Dynamic obstacles define their boundaries with a single ``radius`` for a 2D circle, or in case of 3D avoidance a sphere shape. +- Dynamic obstacles can change their position every frame without additional performance cost. +- Dynamic obstacles with a set velocity can be predicted in their movement by agents. +- Dynamic obstacles are not a reliable way to constrain agents in crowded or narrow spaces. + +While both static and dynamic properties can be active at the same time on the same obstacle this is not recommended for performance. +Ideally when an obstacle is moving the static vertices are removed and instead the radius activated. When the obstacle reaches the new final position it should gradually enlarge its radius to push all other agents away. With enough created save space around the obstacle it should add the static vertices again and remove the radius. This helps to avoid getting agents stuck in the suddenly appearing static obstacle when the rebuild static boundary is finished. - The obstacle ``radius`` is the area that will be strictly avoided whenever possible. - Do not set it too large. Agents start to avoid way before - this radius depending on parameters and velocity. +Similar to agents the obstacles can make use of the ``avoidance_layers`` bitmask. +All agents with a matching bit on their own avoidance mask will avoid the obstacle. +Procedual obstacles +~~~~~~~~~~~~~~~~~~~ -While NavigationObstacle nodes do require a Node parent the NavigationServer obstacles do not. -New obstacles created in scripts require only a ``map``, ``radius`` and ``position``. -Obstacles can be placed directly on the NavigationMap with the NavigationServer API. +New obstacles can be created without a Node directly on the NavigationServer. + +Obstacles created with scripts require at least a ``map`` and a ``position``. +For dynamic use a ``radius`` is required. +For static use an array of ``vertices`` is required. + +.. tabs:: + .. code-tab:: gdscript GDScript + + extends Node2D + # create a new "obstacle" and place it on the default navigation map. + var new_obstacle_rid: RID = NavigationServer2D.obstacle_create() + var default_2d_map_rid: RID = get_world_2d().get_navigation_map() + + NavigationServer2D.obstacle_set_map(new_obstacle_rid, default_2d_map_rid) + NavigationServer2D.obstacle_set_position(new_obstacle_rid, global_position) + + # Use obstacle dynamic by increasing radius above zero. + NavigationServer2D.obstacle_set_radius(new_obstacle_rid, 5.0) + + # Use obstacle static by adding a square that pushes agents out. + var outline = PackedVector2Array([Vector2(-100, -100), Vector2(100, -100), Vector2(100, 100), Vector2(-100, 100)]) + NavigationServer2D.obstacle_set_vertices(new_obstacle_rid, outline) .. tabs:: .. code-tab:: gdscript GDScript extends Node3D - # create a new "obstacle" agent and place it on the default map`` - var new_agent_rid: RID = NavigationServer3D.agent_create() + # Create a new "obstacle" and place it on the default navigation map. + var new_obstacle_rid: RID = NavigationServer3D.obstacle_create() var default_3d_map_rid: RID = get_world_3d().get_navigation_map() - NavigationServer3D.agent_set_map(new_agent_rid, default_3d_map_rid) - NavigationServer3D.agent_set_radius(new_agent_rid, 0.5) - NavigationServer3D.agent_set_position(new_agent_rid, global_transform.origin) + NavigationServer3D.obstacle_set_map(new_obstacle_rid, default_3d_map_rid) + NavigationServer3D.obstacle_set_position(new_obstacle_rid, global_position) -.. note:: + # Use obstacle dynamic by increasing radius above zero. + NavigationServer3D.obstacle_set_radius(new_obstacle_rid, 0.5) - The NavigationServer API has no dedicated functions for obstacles. - Obstacles are technically considered just normal agents. - All "agent" prefixed functions are intended for obstacles as well. + # Use obstacle static by adding a square that pushes agents out. + var outline = PackedVector3Array([Vector3(-5, 0, -5), Vector3(5, 0, -5), Vector3(5, 0, 5), Vector3(-5, 0, 5)]) + NavigationServer3D.obstacle_set_vertices(new_obstacle_rid, outline) diff --git a/tutorials/navigation/navigation_using_navigationservers.rst b/tutorials/navigation/navigation_using_navigationservers.rst index 6c22ad2547e..c63aa15f4e4 100644 --- a/tutorials/navigation/navigation_using_navigationservers.rst +++ b/tutorials/navigation/navigation_using_navigationservers.rst @@ -170,7 +170,6 @@ If RVO avoidance agents are registered for avoidance callbacks the NavigationSer their ``safe_velocity`` signals just before the PhysicsServer synchronization. To learn more about NavigationAgents see :ref:`doc_navigation_using_navigationagents`. -To learn more about RVO Avoidance see :ref:`doc_navigation_using_agent_avoidance`. The simplified order of execution for NavigationAgents that use avoidance: diff --git a/tutorials/performance/using_multiple_threads.rst b/tutorials/performance/using_multiple_threads.rst index 17fa79bf03e..8ee122ce03e 100644 --- a/tutorials/performance/using_multiple_threads.rst +++ b/tutorials/performance/using_multiple_threads.rst @@ -1,5 +1,3 @@ -:article_outdated: True - .. _doc_using_multiple_threads: Using multiple threads @@ -29,23 +27,22 @@ To create a thread, use the following code: .. tabs:: .. code-tab:: gdscript GDScript - var thread + var thread: Thread # The thread will start here. func _ready(): thread = Thread.new() - # Third argument is optional userdata, it can be any variable. - thread.start(self, "_thread_function", "Wafflecopter") + # You can bind multiple arguments to a function Callable. + thread.start(_thread_function.bind("Wafflecopter")) # Run here and exit. - # The argument is the userdata passed from start(). - # If no argument was passed, this one still needs to - # be here and it will be null. + # The argument is the bound data passed from start(). func _thread_function(userdata): # Print the userdata ("Wafflecopter") print("I'm a thread! Userdata is: ", userdata) + # Thread must be disposed (or "joined"), for portability. func _exit_tree(): thread.wait_to_finish() @@ -86,16 +83,16 @@ Here is an example of using a Mutex: .. tabs:: .. code-tab:: gdscript GDScript - var counter = 0 - var mutex - var thread + var counter := 0 + var mutex: Mutex + var thread: Thread # The thread will start here. func _ready(): mutex = Mutex.new() thread = Thread.new() - thread.start(self, "_thread_function") + thread.start(_thread_function) # Increase value, protect it with Mutex. mutex.lock() @@ -104,7 +101,7 @@ Here is an example of using a Mutex: # Increment the value from the thread, too. - func _thread_function(userdata): + func _thread_function(): mutex.lock() counter += 1 mutex.unlock() @@ -131,11 +128,11 @@ ready to be processed: .. tabs:: .. code-tab:: gdscript GDScript - var counter = 0 - var mutex - var semaphore - var thread - var exit_thread = false + var counter := 0 + var mutex: Mutex + var semaphore: Semaphore + var thread: Thread + var exit_thread := false # The thread will start here. @@ -145,10 +142,10 @@ ready to be processed: exit_thread = false thread = Thread.new() - thread.start(self, "_thread_function") + thread.start(_thread_function) - func _thread_function(userdata): + func _thread_function(): while true: semaphore.wait() # Wait until posted. diff --git a/tutorials/physics/physics_introduction.rst b/tutorials/physics/physics_introduction.rst index c3346085d9f..d7bac887cf7 100644 --- a/tutorials/physics/physics_introduction.rst +++ b/tutorials/physics/physics_introduction.rst @@ -414,7 +414,7 @@ Or to bounce off of the colliding object: { var collisionInfo = MoveAndCollide(_velocity * (float)delta); if (collisionInfo != null) - _velocity = _velocity.Bounce(collisionInfo.Normal); + _velocity = _velocity.Bounce(collisionInfo.GetNormal()); } } diff --git a/tutorials/physics/ray-casting.rst b/tutorials/physics/ray-casting.rst index ccddf279a39..7741ae9b5ac 100644 --- a/tutorials/physics/ray-casting.rst +++ b/tutorials/physics/ray-casting.rst @@ -56,7 +56,7 @@ Use the following code in 2D: func _physics_process(delta): var space_rid = get_world_2d().space - var space_state = Physics2DServer.space_get_direct_state(space_rid) + var space_state = PhysicsServer2D.space_get_direct_state(space_rid) .. code-tab:: csharp @@ -151,7 +151,24 @@ data: metadata: Variant() # metadata of collider } -The data is similar in 3D space, using Vector3 coordinates. +The data is similar in 3D space, using Vector3 coordinates. Note that to enable collisions +with Area3D, the boolean parameter ``collide_with_areas`` must be set to ``true``. + +.. tabs:: + .. code-tab:: gdscript GDScript + const RAY_LENGTH = 1000 + + func _physics_process(delta): + var space_state = get_world_3d().direct_space_state + var cam = $Camera3D + var mousepos = get_viewport().get_mouse_position() + + var origin = cam.project_ray_origin(mousepos) + var end = origin + cam.project_ray_normal(mousepos) * RAY_LENGTH + var query = PhysicsRayQueryParameters3D.create(origin, end) + query.collide_with_areas = true + + var result = space_state.intersect_ray(query) Collision exceptions -------------------- @@ -278,6 +295,5 @@ To obtain it using a camera, the following code can be used: } } - Remember that during ``_input()``, the space may be locked, so in practice this query should be run in ``_physics_process()``. diff --git a/tutorials/physics/using_character_body_2d.rst b/tutorials/physics/using_character_body_2d.rst index ef84a7cad38..f5978b00b60 100644 --- a/tutorials/physics/using_character_body_2d.rst +++ b/tutorials/physics/using_character_body_2d.rst @@ -223,7 +223,7 @@ Movement and walls If you've downloaded the sample project, this example is in "basic_movement.tscn". For this example, add a ``CharacterBody2D`` with two children: a ``Sprite2D`` and a -``CollisionShape2D``. Use the Godot "icon.png" as the Sprite2D's texture (drag it +``CollisionShape2D``. Use the Godot "icon.svg" as the Sprite2D's texture (drag it from the Filesystem dock to the *Texture* property of the ``Sprite2D``). In the ``CollisionShape2D``'s *Shape* property, select "New RectangleShape2D" and size the rectangle to fit over the sprite image. @@ -272,7 +272,7 @@ Attach a script to the CharacterBody2D and add the following code: Run this scene and you'll see that ``move_and_collide()`` works as expected, moving the body along the velocity vector. Now let's see what happens when you add some obstacles. Add a :ref:`StaticBody2D ` with a -rectangular collision shape. For visibility, you can use a sprite, a +rectangular collision shape. For visibility, you can use a Sprite2D, a Polygon2D, or turn on "Visible Collision Shapes" from the "Debug" menu. Run the scene again and try moving into the obstacle. You'll see that the ``CharacterBody2D`` @@ -436,7 +436,7 @@ And the code for the Bullet: The action happens in ``_physics_process()``. After using ``move_and_collide()``, if a collision occurs, a ``KinematicCollision2D`` object is returned (otherwise, the return -is ``Nil``). +is ``null``). If there is a returned collision, we use the ``normal`` of the collision to reflect the bullet's ``velocity`` with the ``Vector2.bounce()`` method. diff --git a/tutorials/platform/android/android_in_app_purchases.rst b/tutorials/platform/android/android_in_app_purchases.rst index 71333691886..fb7ba07bc4e 100644 --- a/tutorials/platform/android/android_in_app_purchases.rst +++ b/tutorials/platform/android/android_in_app_purchases.rst @@ -94,7 +94,7 @@ Query available items ********************* Once the API has connected, query SKUs using ``querySkuDetails()``. You must successfully complete -a SKU query before before calling the ``purchase()`` or ``queryPurchases()`` functions, +a SKU query before calling the ``purchase()`` or ``queryPurchases()`` functions, or they will return an error. ``querySkuDetails()`` takes two parameters: an array of SKU name strings, and a string specifying the type of SKU being queried. The SKU type string should be ``"inapp"`` for normal in-app purchases or ``"subs"`` for subscriptions. diff --git a/tutorials/platform/ios/ios_plugin.rst b/tutorials/platform/ios/ios_plugin.rst index 954ac5107b9..efc0ce876ea 100644 --- a/tutorials/platform/ios/ios_plugin.rst +++ b/tutorials/platform/ios/ios_plugin.rst @@ -28,6 +28,10 @@ When a plugin is active, you can access it in your using ``Engine.get_singleton( var singleton = Engine.get_singleton("MyPlugin") print(singleton.foo()) +.. note:: + + The plugin's files have to be in the ``res://ios/plugins/`` directory or a subdirectory, otherwise the Godot editor will not automatically detect them. + Creating an iOS plugin ---------------------- diff --git a/tutorials/platform/ios/plugins_for_ios.rst b/tutorials/platform/ios/plugins_for_ios.rst index ec84d3aeb33..5fa7a3d84f9 100644 --- a/tutorials/platform/ios/plugins_for_ios.rst +++ b/tutorials/platform/ios/plugins_for_ios.rst @@ -184,7 +184,7 @@ The response event will be a dictionary with the following fields: "invalid_ids": [ list of requested IDs that were invalid ], "ids": [ list of IDs that were valid ], "titles": [ list of valid product titles (corresponds with list of valid IDs) ], - "descriptions": [ list of valid product descriptions ] , + "descriptions": [ list of valid product descriptions ], "prices": [ list of valid product prices ], "localized_prices": [ list of valid product localized prices ], } diff --git a/tutorials/platform/web/customizing_html5_shell.rst b/tutorials/platform/web/customizing_html5_shell.rst index 68e7f29fb20..69c9a6e7848 100644 --- a/tutorials/platform/web/customizing_html5_shell.rst +++ b/tutorials/platform/web/customizing_html5_shell.rst @@ -101,7 +101,7 @@ optionally overriding any :js:attr:`EngineConfig` parameters. }); This snippet of code automatically loads and initializes the engine before starting the game. -It uses the given configuration to to load the engine. The :js:meth:`engine.startGame ` +It uses the given configuration to load the engine. The :js:meth:`engine.startGame ` method is asynchronous and returns a ``Promise``. This allows your control code to track if the game was loaded correctly without blocking execution or relying on polling. diff --git a/tutorials/rendering/jitter_stutter.rst b/tutorials/rendering/jitter_stutter.rst index 2dc52b4961f..fe85800e56c 100644 --- a/tutorials/rendering/jitter_stutter.rst +++ b/tutorials/rendering/jitter_stutter.rst @@ -70,7 +70,7 @@ The second is more complicated, because it is often not associated to the engine or game but the underlying operating system. Here is some information regarding stutter on different OSs. -On platforms that support disabling V-Sync, suttering can be made less +On platforms that support disabling V-Sync, stuttering can be made less noticeable by disabling V-Sync in the project settings. This will however cause tearing to appear, especially on monitors with low refresh rates. If your monitor supports it, consider enabling variable refresh rate (G-Sync/FreeSync) @@ -220,7 +220,7 @@ better troubleshoot it. If you are reporting input lag problems, please include a capture made with a high speed camera (such as your phone's slow motion video mode). The capture **must** have both the screen and the input device visible so that the number of -frames between an input and the on-screen result can can be counted. Also, make +frames between an input and the on-screen result can be counted. Also, make sure to mention your monitor's refresh rate and your input device's polling rate (especially for mice). diff --git a/tutorials/rendering/multiple_resolutions.rst b/tutorials/rendering/multiple_resolutions.rst index b5c85909633..563f2a37a24 100644 --- a/tutorials/rendering/multiple_resolutions.rst +++ b/tutorials/rendering/multiple_resolutions.rst @@ -109,7 +109,7 @@ little easier. The :ref:`Viewport ` node has several functions to handle resizing, and the root node of the scene tree is always a viewport (scenes loaded are instanced as a child of it, and it can always be accessed by calling -``get_tree().get_root()`` or ``get_node("/root")``). +``get_tree().root`` or ``get_node("/root")``). In any case, while changing the root Viewport params is probably the most flexible way to deal with the problem, it can be a lot of work, @@ -147,7 +147,7 @@ demonstrate the effect of different stretch modes. A single sprite, also .. image:: img/stretch_disabled_expand.gif -- **Stretch Mode = 2D**: In this mode, the base size specified in +- **Stretch Mode = Canvas Items**: In this mode, the base size specified in width and height in the project settings is stretched to cover the whole screen (taking the **Stretch Aspect** setting into account). This means that everything is rendered @@ -363,7 +363,7 @@ to change the display orientation project setting. Mobile game in portrait mode ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- Set the base window width to ``720`` and window height to ``1080``. +- Set the base window width to ``720`` and window height to ``1280``. - Alternatively, if you're targeting high-end devices primarily, set the base window width to ``1080`` and window height to ``1920``. This allows you to provide higher resolution 2D assets, resulting in crisper diff --git a/tutorials/scripting/c_sharp/c_sharp_exports.rst b/tutorials/scripting/c_sharp/c_sharp_exports.rst index dbf79e12dbd..0e699d55b2d 100644 --- a/tutorials/scripting/c_sharp/c_sharp_exports.rst +++ b/tutorials/scripting/c_sharp/c_sharp_exports.rst @@ -263,6 +263,8 @@ Since Godot 4.0, nodes can be directly exported without having to use NodePaths. [Export] public Node Node { get; set; } +Custom node classes can also be used, see :ref:`doc_c_sharp_global_classes`. + Exporting NodePaths like in Godot 3.x is still possible, in case you need it: .. code-block:: csharp @@ -296,7 +298,8 @@ Therefore, if you specify a type derived from Resource such as: private AnimationNode Resource; The drop-down menu will be limited to AnimationNode and all -its inherited classes. +its inherited classes. Custom resource classes can also be used, +see :ref:`doc_c_sharp_global_classes`. It must be noted that even if the script is not being run while in the editor, the exported properties are still editable. This can be used diff --git a/tutorials/scripting/c_sharp/c_sharp_global_classes.rst b/tutorials/scripting/c_sharp/c_sharp_global_classes.rst new file mode 100644 index 00000000000..d595fd94784 --- /dev/null +++ b/tutorials/scripting/c_sharp/c_sharp_global_classes.rst @@ -0,0 +1,52 @@ +.. _doc_c_sharp_global_classes: + +C# global classes +================= + +Global classes (also known as named scripts) are types registered in Godot's editor so they can be used +more conveniently. These classes show up in the *Add Node* and *Create Resource* dialogs, +and :ref:`exported properties ` are restricted to instances of the global class or derived classes. +Global classes are registered with the ``[GlobalClass]`` attribute. + +.. code-block:: csharp + + using Godot; + + [GlobalClass] + public partial class MyNode : Node + { + } + +The ``MyNode`` type will be registered as a global class with the same name as the type's name. + +.. image:: img/globalclasses_addnode.webp + +The ``[Icon]`` attribute also allows to provide the path to an icon so it can +be used as the class' icon in the editor. + +.. code-block:: csharp + + using Godot; + + [GlobalClass, Icon("res://Stats/StatsIcon.svg")] + public partial class Stats : Resource + { + [Export] + public int Strength { get; set; } + + [Export] + public int Defense { get; set; } + + [Export] + public int Speed { get; set; } + } + +.. image:: img/globalclasses_createresource.webp + +The ``Stats`` class is a custom resource registered as a global class. :ref:`Exporting properties ` of the +type ``Stats`` will only allow instances of this resource type to be assigned, and the inspector +will let you create and load instances of this type easily. + +.. image:: img/globalclasses_exportedproperty1.webp + +.. image:: img/globalclasses_exportedproperty2.webp diff --git a/tutorials/scripting/c_sharp/img/globalclasses_addnode.webp b/tutorials/scripting/c_sharp/img/globalclasses_addnode.webp new file mode 100644 index 00000000000..8e8378dc271 Binary files /dev/null and b/tutorials/scripting/c_sharp/img/globalclasses_addnode.webp differ diff --git a/tutorials/scripting/c_sharp/img/globalclasses_createresource.webp b/tutorials/scripting/c_sharp/img/globalclasses_createresource.webp new file mode 100644 index 00000000000..80de8c1111d Binary files /dev/null and b/tutorials/scripting/c_sharp/img/globalclasses_createresource.webp differ diff --git a/tutorials/scripting/c_sharp/img/globalclasses_exportedproperty1.webp b/tutorials/scripting/c_sharp/img/globalclasses_exportedproperty1.webp new file mode 100644 index 00000000000..a9cca77ae03 Binary files /dev/null and b/tutorials/scripting/c_sharp/img/globalclasses_exportedproperty1.webp differ diff --git a/tutorials/scripting/c_sharp/img/globalclasses_exportedproperty2.webp b/tutorials/scripting/c_sharp/img/globalclasses_exportedproperty2.webp new file mode 100644 index 00000000000..7fcab655197 Binary files /dev/null and b/tutorials/scripting/c_sharp/img/globalclasses_exportedproperty2.webp differ diff --git a/tutorials/scripting/c_sharp/index.rst b/tutorials/scripting/c_sharp/index.rst index 821c7e50bb3..f08d55fbe37 100644 --- a/tutorials/scripting/c_sharp/index.rst +++ b/tutorials/scripting/c_sharp/index.rst @@ -12,4 +12,5 @@ C# c_sharp_variant c_sharp_signals c_sharp_exports + c_sharp_global_classes c_sharp_style_guide diff --git a/tutorials/scripting/change_scenes_manually.rst b/tutorials/scripting/change_scenes_manually.rst index f2d6ccd1125..a41b2dcc8bd 100644 --- a/tutorials/scripting/change_scenes_manually.rst +++ b/tutorials/scripting/change_scenes_manually.rst @@ -17,7 +17,7 @@ scenes which one instances and adds to the tree at runtime: func _add_a_scene_manually(): # This is like autoloading the scene, only # it happens after already loading the main scene. - get_tree().get_root().add_child(simultaneous_scene) + get_tree().root.add_child(simultaneous_scene) .. code-tab:: csharp @@ -32,7 +32,7 @@ scenes which one instances and adds to the tree at runtime: { // This is like autoloading the scene, only // it happens after already loading the main scene. - GetTree().GetRoot().AddChild(simultaneousScene); + GetTree().Root.AddChild(simultaneousScene); } To complete the cycle and swap out the new scene with the old one, @@ -124,11 +124,11 @@ a scene's data between scene changes (adding the scene to the root node). .. tabs:: .. code-tab:: gdscript GDScript - get_tree().get_root().add_child(scene) + get_tree().root.add_child(scene) .. code-tab:: csharp - GetTree().GetRoot().AddChild(scene); + GetTree().Root.AddChild(scene); Perhaps instead they wish to display multiple scenes at the same time using :ref:`SubViewportContainers `. This is optimal in diff --git a/tutorials/scripting/gdextension/gdextension_cpp_example.rst b/tutorials/scripting/gdextension/gdextension_cpp_example.rst index e89ee066af6..d5446bd1a13 100644 --- a/tutorials/scripting/gdextension/gdextension_cpp_example.rst +++ b/tutorials/scripting/gdextension/gdextension_cpp_example.rst @@ -58,7 +58,7 @@ Alternatively, you can also clone it to the project folder: mkdir gdextension_cpp_example cd gdextension_cpp_example - git clone -b master https://github.com/godotengine/godot-cpp + git clone -b 4.0 https://github.com/godotengine/godot-cpp .. note:: @@ -268,8 +268,8 @@ GDExtension plugin. extern "C" { // Initialization. - GDExtensionBool GDE_EXPORT example_library_init(const GDExtensionInterface *p_interface, const GDExtensionClassLibraryPtr p_library, GDExtensionInitialization *r_initialization) { - godot::GDExtensionBinding::InitObject init_obj(p_interface, p_library, r_initialization); + GDExtensionBool GDE_EXPORT example_library_init(GDExtensionInterfaceGetProcAddress p_get_proc_address, const GDExtensionClassLibraryPtr p_library, GDExtensionInitialization *r_initialization) { + godot::GDExtensionBinding::InitObject init_obj(p_get_proc_address, p_library, r_initialization); init_obj.register_initializer(initialize_example_module); init_obj.register_terminator(uninitialize_example_module); @@ -348,6 +348,7 @@ loaded for each platform and the entry function for the module. It is called ``g [configuration] entry_symbol = "example_library_init" + compatibility_minimum = 4.1 [libraries] @@ -369,6 +370,8 @@ loaded for each platform and the entry function for the module. It is called ``g android.release.arm64 = "res://bin/libgdexample.android.template_release.arm64.so" This file contains a ``configuration`` section that controls the entry function of the module. +You should also set the minimum compatible Godot version with ``compatability_minimum``, +which prevents older version of Godot from trying to load your extension. The ``libraries`` section is the important bit: it tells Godot the location of the dynamic library in the project's filesystem for each supported platform. It will @@ -440,7 +443,7 @@ functions: double amplitude; public: - void set_amplitude(const double amplitude); + void set_amplitude(const double p_amplitude); double get_amplitude() const; ... @@ -496,8 +499,8 @@ code: double speed; ... void _process(double delta) override; - void set_speed(double p_speed); - double get_speed(); + void set_speed(const double p_speed); + double get_speed() const; ... This requires a few more changes to our ``gdexample.cpp`` file, again we're only @@ -512,7 +515,7 @@ showing the methods that have changed so don't remove anything we're omitting: ClassDB::add_property("GDExample", PropertyInfo(Variant::FLOAT, "speed", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_speed", "get_speed"); } - void GDExample::GDExample() { + GDExample::GDExample() { time_passed = 0.0; amplitude = 10.0; speed = 1.0; @@ -531,7 +534,7 @@ showing the methods that have changed so don't remove anything we're omitting: ... - void GDExample::set_speed(double p_speed) { + void GDExample::set_speed(const double p_speed) { speed = p_speed; } diff --git a/tutorials/scripting/gdscript/gdscript_basics.rst b/tutorials/scripting/gdscript/gdscript_basics.rst index 95379c08822..35f80d046de 100644 --- a/tutorials/scripting/gdscript/gdscript_basics.rst +++ b/tutorials/scripting/gdscript/gdscript_basics.rst @@ -404,11 +404,11 @@ between parentheses and separated by commas. Both of these are the same:: - @onready - @export_node_path("TextEdit", "LineEdit") - var input_field + @annotation_a + @annotation_b + var variable - @onready @export_node_path("TextEdit", "LineEdit") var input_field + @annotation_a @annotation_b var variable .. _doc_gdscript_onready_annotation: @@ -435,6 +435,29 @@ can replace the above code with a single line:: @onready var my_label = get_node("MyLabel") +.. warning:: + + Applying ``@onready`` and any ``@export`` annotation to the same variable + doesn't work as you might expect. The ``@onready`` annotation will cause + the default value to be set after the ``@export`` takes effect and will + override it:: + + @export var a = "init_value_a" + @onready @export var b = "init_value_b" + + func _init(): + prints(a, b) # init_value_a + + func _notification(what): + if what == NOTIFICATION_SCENE_INSTANTIATED: + prints(a, b) # exported_value_a exported_value_b + + func _ready(): + prints(a, b) # exported_value_a init_value_b + + Therefore, the ``ONREADY_WITH_EXPORT`` warning is generated, which is treated + as an error by default. We do not recommend disabling or ignoring it. + Comments ~~~~~~~~ @@ -908,26 +931,38 @@ Enums Enums are basically a shorthand for constants, and are pretty useful if you want to assign consecutive integers to some constant. -If you pass a name to the enum, it will put all the keys inside a constant -dictionary of that name. - -.. important:: In Godot 3.1 and later, keys in a named enum are not registered - as global constants. They should be accessed prefixed by the - enum's name (``Name.KEY``); see an example below. - :: enum {TILE_BRICK, TILE_FLOOR, TILE_SPIKE, TILE_TELEPORT} + # Is the same as: const TILE_BRICK = 0 const TILE_FLOOR = 1 const TILE_SPIKE = 2 const TILE_TELEPORT = 3 + +If you pass a name to the enum, it will put all the keys inside a constant +:ref:`Dictionary ` of that name. This means all constant methods of +a dictionary can also be used with a named enum. + +.. important:: Keys in a named enum are not registered + as global constants. They should be accessed prefixed + by the enum's name (``Name.KEY``). + +:: + enum State {STATE_IDLE, STATE_JUMP = 5, STATE_SHOOT} + # Is the same as: const State = {STATE_IDLE = 0, STATE_JUMP = 5, STATE_SHOOT = 6} - # Access values with State.STATE_IDLE, etc. + + func _ready(): + # Access values with Name.KEY, prints '5' + print(State.STATE_JUMP) + # Use constant dictionary functions + # prints '["STATE_IDLE", "STATE_JUMP", "STATE_SHOOT"]' + print(State.keys()) Functions diff --git a/tutorials/scripting/gdscript/gdscript_documentation_comments.rst b/tutorials/scripting/gdscript/gdscript_documentation_comments.rst index eeac476f00d..86492b1e6d6 100644 --- a/tutorials/scripting/gdscript/gdscript_documentation_comments.rst +++ b/tutorials/scripting/gdscript/gdscript_documentation_comments.rst @@ -35,29 +35,33 @@ Tags | Description | Use one blank line to separate the description from | | | the brief. | +-------------------+--------------------------------------------------------+ -| Tutorial | ``@tutorial[( The Title Here )]:`` | -| | | +| Tutorial | | ``@tutorial:`` | +| | | ``@tutorial(The Title Here):`` | +-------------------+--------------------------------------------------------+ -**Example:** +For example: :: extends Node2D - - ## A brief description of your script. + ## A brief description of the class's role and functionality. ## - ## A more detailed description of the script. + ## The description of the script, what it can do, + ## and any further detail. ## ## @tutorial: https://the/tutorial1/url.com ## @tutorial(Tutorial2): https://the/tutorial2/url.com -.. warning:: If there is any space in between the tag name and colon, for example - ``@tutorial :``, it won't be treated as a valid tag and will be ignored. +.. warning:: + + If there is any space in between the tag name and colon, for example + ``@tutorial :``, it won't be treated as a valid tag and will be ignored. + +.. note:: -.. note:: When the description spans multiple lines, the preceding and trailing white - spaces will be stripped and joined with a single space. To preserve the line - break use ``[br]``. See also `BBCode and class reference`_ below. + When the description spans multiple lines, the preceding and trailing white + spaces will be stripped and joined with a single space. To preserve the line + break use ``[br]``. See also `BBCode and class reference`_ below. Documenting script members -------------------------- @@ -82,14 +86,13 @@ Members that are applicable for documentation: - Enum - Enum value -Examples --------- +Example +------- :: extends Node2D - - ## A brief description of your script. + ## A brief description of the class's role and functionality. ## ## The description of the script, what it can do, ## and any further detail. @@ -97,19 +100,6 @@ Examples ## @tutorial: https://the/tutorial1/url.com ## @tutorial(Tutorial2): https://the/tutorial2/url.com - ## The description of the variable v1. - var v1 - - ## This is a multi line description of the variable v2. The type - ## information below will be extracted for the documentation. - var v2: int - - ## If the member has any annotation, the annotation should - ## immediately precede it. - @export - @onready - var v3 := some_func() - ## The description of a constant. const GRAVITY = 9.8 @@ -125,16 +115,34 @@ Examples RIGHT = 3, ## Direction right. } + ## The description of a constant. + const GRAVITY = 9.8 + + ## The description of the variable v1. + var v1 + + ## This is a multiline description of the variable v2.[br] + ## The type information below will be extracted for the documentation. + var v2: int + + ## If the member has any annotation, the annotation should + ## immediately precede it. + @export + var v3 := some_func() + + ## As the following function is documented, even though its name starts with ## an underscore, it will appear in the help window. func _fn(p1: int, p2: String) -> int: return 0 + # The below function isn't documented and its name starts with an underscore # so it will treated as private and will not be shown in the help window. func _internal() -> void: pass + ## Documenting an inner class. ## ## The same rules apply here. The documentation must @@ -146,6 +154,7 @@ Examples ## Inner class variable v4. var v4 + ## Inner class function fn. func fn(): pass @@ -159,73 +168,83 @@ URLs, animation effects, etc. can be added with the :ref:`bbcode `. + +Whenever you link to a member of another class, you need to specify the class name. +For links to the same class, the class name is optional and can be omitted. + Here's the list of available tags: -+---------------------------+--------------------------------+-------------------------------------+-------------------------------------------------------------------------+ -| Tag | Effect | Usage | Result | -+===========================+================================+=====================================+=========================================================================+ -| [Class] | Link a class | Move the [Sprite2D]. | Move the :ref:`class_Sprite2D`. | -+---------------------------+--------------------------------+-------------------------------------+-------------------------------------------------------------------------+ -| [annotation name] | Link to an annotation in this | See | See | -| | class | [annotation @export]. | :ref:`@GDScript.@export`. | -+---------------------------+--------------------------------+-------------------------------------+-------------------------------------------------------------------------+ -| [annotation Class.name] | Link to another class's | See | See | -| | annotation, many default | [annotation @GDScript.@export]. | :ref:`@GDScript.@export`. | -| | annotations are in | | | -| | ``@GDScript`` | | | -+---------------------------+--------------------------------+-------------------------------------+-------------------------------------------------------------------------+ -| [constant name] | Link to a constant in this | See | See | -| | class | [constant KEY_ESCAPE]. | :ref:`@GlobalScope.KEY_ESCAPE`. | -+---------------------------+--------------------------------+-------------------------------------+-------------------------------------------------------------------------+ -| [constant Class.name] | Link to another class's | See | See | -| | constant | [constant @GlobalScope.KEY_ESCAPE]. | :ref:`@GlobalScope.KEY_ESCAPE`. | -+---------------------------+--------------------------------+-------------------------------------+-------------------------------------------------------------------------+ -| [enum enumname] | Link to an enum in this class | See [enum ArrayType]. | See :ref:`ArrayType `. | -+---------------------------+--------------------------------+-------------------------------------+-------------------------------------------------------------------------+ -| [enum Class.enumname] | Link to another class's enum | See [enum Mesh.ArrayType]. | See :ref:`ArrayType `. | -+---------------------------+--------------------------------+-------------------------------------+-------------------------------------------------------------------------+ -| [method methodname] | Link to a method in this class | Call [method hide]. | Call :ref:`hide `. | -+---------------------------+--------------------------------+-------------------------------------+-------------------------------------------------------------------------+ -| [method Class.methodname] | Link to another class's method | Call [method Node3D.hide]. | Call :ref:`hide `. | -+---------------------------+--------------------------------+-------------------------------------+-------------------------------------------------------------------------+ -| [member membername] | Link to a member in this class | Get [member scale]. | Get :ref:`scale `. | -+---------------------------+--------------------------------+-------------------------------------+-------------------------------------------------------------------------+ -| [member Class.membername] | Link to another class's member | Get [member Node2D.scale]. | Get :ref:`scale `. | -+---------------------------+--------------------------------+-------------------------------------+-------------------------------------------------------------------------+ -| [signal signalname] | Link to a signal in this class | Emit [signal renamed]. | Emit :ref:`renamed `. | -+---------------------------+--------------------------------+-------------------------------------+-------------------------------------------------------------------------+ -| [signal Class.signalname] | Link to another class's signal | Emit [signal Node.renamed]. | Emit :ref:`renamed `. | -+---------------------------+--------------------------------+-------------------------------------+-------------------------------------------------------------------------+ -| [br] | Line break | | Line 1.[br] | | Line 1. | -| | | | Line 2. | | Line 2. | -+---------------------------+--------------------------------+-------------------------------------+-------------------------------------------------------------------------+ -| [b] [/b] | Bold | Some [b]bold[/b] text. | Some **bold** text. | -+---------------------------+--------------------------------+-------------------------------------+-------------------------------------------------------------------------+ -| [i] [/i] | Italic | Some [i]italic[/i] text. | Some *italic* text. | -+---------------------------+--------------------------------+-------------------------------------+-------------------------------------------------------------------------+ -| [code] [/code] | Monospace | Some [code]monospace[/code] text. | Some ``monospace`` text. | -+---------------------------+--------------------------------+-------------------------------------+-------------------------------------------------------------------------+ -| [kbd] [/kbd] | Keyboard/mouse shortcut | Some [kbd]Ctrl + C[/kbd] key. | Some :kbd:`Ctrl + C` key. | -+---------------------------+--------------------------------+-------------------------------------+-------------------------------------------------------------------------+ -| [codeblock] [/codeblock] | Multiline preformatted block | *See below.* | *See below.* | -+---------------------------+--------------------------------+-------------------------------------+-------------------------------------------------------------------------+ - -.. warning:: Use ``[codeblock]`` for pre-formatted code blocks. Inside - ``[codeblock]``, always use **four spaces** for indentation - (the parser will delete tabs). ++--------------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| Tag and Description | Example | Result | ++======================================+=========================================+======================================================================+ +| | ``[Class]`` | ``Move the [Sprite2D].`` | Move the :ref:`class_Sprite2D`. | +| | Link to class | | | ++--------------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| | ``[annotation Class.name]`` | ``See [annotation @GDScript.@export].`` | See :ref:`@GDScript.@export `. | +| | Link to annotation | | | ++--------------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| | ``[constant Class.name]`` | ``See [constant @GlobalScope.KEY_F1].`` | See :ref:`@GlobalScope.KEY_F1 `. | +| | Link to constant | | | ++--------------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| | ``[enum Class.name]`` | ``See [enum Mesh.ArrayType].`` | See :ref:`Mesh.ArrayType `. | +| | Link to enum | | | ++--------------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| | ``[method Class.name]`` | ``Call [method Node3D.hide].`` | Call :ref:`Node3D.hide() `. | +| | Link to method | | | ++--------------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| | ``[member Class.name]`` | ``Get [member Node2D.scale].`` | Get :ref:`Node2D.scale `. | +| | Link to member | | | ++--------------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| | ``[signal Class.name]`` | ``Emit [signal Node.renamed].`` | Emit :ref:`Node.renamed `. | +| | Link to signal | | | ++--------------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| | ``[theme_item Class.name]`` | ``See [theme_item Label.font].`` | See :ref:`Label.font `. | +| | Link to theme item | | | ++--------------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| | ``[param name]`` | ``Takes [param size] for the size.`` | Takes ``size`` for the size. | +| | Formats a parameter name (as code) | | | ++--------------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| | ``[br]`` | | ``Line 1.[br]`` | | Line 1. | +| | Line break | | ``Line 2.`` | | Line 2. | ++--------------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| | ``[b]`` ``[/b]`` | ``Some [b]bold[/b] text.`` | Some **bold** text. | +| | Bold | | | ++--------------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| | ``[i]`` ``[/i]`` | ``Some [i]italic[/i] text.`` | Some *italic* text. | +| | Italic | | | ++--------------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| | ``[kbd]`` ``[/kbd]`` | ``Some [kbd]Ctrl + C[/kbd] key.`` | Some :kbd:`Ctrl + C` key. | +| | Keyboard/mouse shortcut | | | ++--------------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| | ``[code]`` ``[/code]`` | ``Some [code]monospace[/code] text.`` | Some ``monospace`` text. | +| | Monospace | | | ++--------------------------------------+-----------------------------------------+----------------------------------------------------------------------+ +| | ``[codeblock]`` ``[/codeblock]`` | *See below.* | *See below.* | +| | Multiline preformatted block | | | ++--------------------------------------+-----------------------------------------+----------------------------------------------------------------------+ + +.. note:: + + 1. Currently only :ref:`class_@GDScript` has annotations. + 2. ``[code]`` disables BBCode until the parser encounters ``[/code]``. + 3. ``[codeblock]`` disables BBCode until the parser encounters ``[/codeblock]``. + +.. warning:: + + Use ``[codeblock]`` for pre-formatted code blocks. Inside ``[codeblock]``, + always use **four spaces** for indentation (the parser will delete tabs). :: - ## The do_something method for this plugin. before using the - ## method you first have to initialize [MyPlugin]. - ## see : [method initialize] - ## [color=yellow]Warning:[/color] always [method clean] after use. + ## Do something for this plugin. Before using the method + ## you first have to [method initialize] [MyPlugin].[br] + ## [color=yellow]Warning:[/color] Always [method clean] after use.[br] ## Usage: - ## [codeblock] - ## func _ready(): - ## the_plugin.initialize() - ## the_plugin.do_something() - ## the_plugin.clean() - ## [/codeblock] + ## [codeblock] + ## func _ready(): + ## the_plugin.initialize() + ## the_plugin.do_something() + ## the_plugin.clean() + ## [/codeblock] func do_something(): pass diff --git a/tutorials/scripting/gdscript/gdscript_styleguide.rst b/tutorials/scripting/gdscript/gdscript_styleguide.rst index ac4322b8eb0..ef314e186b7 100644 --- a/tutorials/scripting/gdscript/gdscript_styleguide.rst +++ b/tutorials/scripting/gdscript/gdscript_styleguide.rst @@ -19,8 +19,10 @@ and ask fellow developers for insights. In general, keeping your code consistent in your projects and within your team is more important than following this guide to a tee. -.. note:: Godot's built-in script editor uses a lot of these conventions - by default. Let it help you. +.. note:: + + Godot's built-in script editor uses a lot of these conventions + by default. Let it help you. Here is a complete class example based on these guidelines: @@ -28,9 +30,10 @@ Here is a complete class example based on these guidelines: class_name StateMachine extends Node - # Hierarchical State machine for the player. - # Initializes states and delegates engine callbacks - # (_physics_process, _unhandled_input) to the state. + ## Hierarchical State machine for the player. + ## + ## Initializes states and delegates engine callbacks ([method Node._physics_process], + ## [method Node._unhandled_input]) to the state. signal state_changed(previous, new) @@ -46,11 +49,11 @@ Here is a complete class example based on these guidelines: func _init(): add_to_group("state_machine") - - + + func _enter_tree(): print("this happens before the ready method!") - + func _ready(): state_changed.connect(_on_state_changed) @@ -287,8 +290,10 @@ Surround functions and class definitions with two blank lines: Use one blank line inside functions to separate logical sections. -.. note:: We use a single line between classes and function definitions in the class reference and - in short code snippets in this documentation. +.. note:: + + We use a single line between classes and function definitions in the class reference and + in short code snippets in this documentation. Line length ~~~~~~~~~~~ @@ -331,7 +336,7 @@ The only exception to that rule is the ternary operator: :: - next_state = "idle" if is_on_floor() else "fall" + next_state = "idle" if is_on_floor() else "fall" Format multiline statements for readability ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -467,9 +472,9 @@ This helps differentiate text comments from disabled code. .. note:: - In the script editor, to toggle the selected code commented, press - :kbd:`Ctrl + K`. This feature adds a single # sign at the start - of the selected lines. + In the script editor, to toggle the selected code commented, press + :kbd:`Ctrl + K`. This feature adds a single # sign at the start + of the selected lines. Whitespace ~~~~~~~~~~ @@ -636,7 +641,7 @@ Use PascalCase for class and node names: :: - extends CharacterBody3D + extends CharacterBody3D Also use PascalCase when loading a class into a constant or a variable: @@ -651,16 +656,16 @@ Use snake\_case to name functions and variables: :: - var particle_effect - func load_level(): + var particle_effect + func load_level(): Prepend a single underscore (\_) to virtual methods functions the user must override, private functions, and private variables: :: - var _counter = 0 - func _recalculate_path(): + var _counter = 0 + func _recalculate_path(): Signals ~~~~~~~ @@ -745,22 +750,25 @@ Class declaration If the code is meant to run in the editor, place the ``@tool`` annotation on the first line of the script. -Follow with the `class_name` if necessary. You can turn a GDScript file into a +Follow with the ``class_name`` if necessary. You can turn a GDScript file into a global type in your project using this feature. For more information, see :ref:`doc_gdscript`. -Then, add the `extends` keyword if the class extends a built-in type. +Then, add the ``extends`` keyword if the class extends a built-in type. -Following that, you should have the class's optional docstring as comments. You -can use that to explain the role of your class to your teammates, how it works, +Following that, you should have the class's optional +:ref:`documentation comments `. +You can use that to explain the role of your class to your teammates, how it works, and how other developers should use it, for example. :: - class_name MyNode - extends Node - # A brief description of the class's role and functionality. - # Longer description. + class_name MyNode + extends Node + ## A brief description of the class's role and functionality. + ## + ## The description of the script, what it can do, + ## and any further detail. Signals and properties ~~~~~~~~~~~~~~~~~~~~~~ @@ -776,32 +784,32 @@ variables, in that order. :: - signal spawn_player(position) + signal spawn_player(position) - enum Jobs {KNIGHT, WIZARD, ROGUE, HEALER, SHAMAN} + enum Jobs {KNIGHT, WIZARD, ROGUE, HEALER, SHAMAN} - const MAX_LIVES = 3 + const MAX_LIVES = 3 - @export var job: Jobs = Jobs.KNIGHT - @export var max_health = 50 - @export var attack = 5 + @export var job: Jobs = Jobs.KNIGHT + @export var max_health = 50 + @export var attack = 5 - var health = max_health: - set(new_health): - health = new_health + var health = max_health: + set(new_health): + health = new_health - var _speed = 300.0 + var _speed = 300.0 - @onready var sword = get_node("Sword") - @onready var gun = get_node("Gun") + @onready var sword = get_node("Sword") + @onready var gun = get_node("Gun") .. note:: - The GDScript compiler evaluates onready variables right before the ``_ready`` - callback. You can use that to cache node dependencies, that is to say, to get - child nodes in the scene that your class relies on. This is what the example - above shows. + The GDScript compiler evaluates onready variables right before the ``_ready`` + callback. You can use that to cache node dependencies, that is to say, to get + child nodes in the scene that your class relies on. This is what the example + above shows. Member variables ~~~~~~~~~~~~~~~~ @@ -881,13 +889,13 @@ To declare a variable's type, use ``: ``: :: - var health: int = 0 + var health: int = 0 To declare the return type of a function, use ``-> ``: :: - func heal(amount: int) -> void: + func heal(amount: int) -> void: Inferred types ~~~~~~~~~~~~~~ @@ -902,8 +910,8 @@ otherwise prefer writing the type explicitly. :: - var health: int = 0 # The type can be int or float, and thus should be stated explicitly. - var direction := Vector3(1, 2, 3) # The type is clearly inferred as Vector3. + var health: int = 0 # The type can be int or float, and thus should be stated explicitly. + var direction := Vector3(1, 2, 3) # The type is clearly inferred as Vector3. Include the type hint when the type is ambiguous, and omit the type hint when it's redundant. @@ -914,11 +922,11 @@ omit the type hint when it's redundant. :: - var health := 0 # Typed as int, but it could be that float was intended. - var direction: Vector3 = Vector3(1, 2, 3) # The type hint has redundant information. + var health := 0 # Typed as int, but it could be that float was intended. + var direction: Vector3 = Vector3(1, 2, 3) # The type hint has redundant information. - # What type is this? It's not immediately clear to the reader, so it's bad. - var value := complex_function() + # What type is this? It's not immediately clear to the reader, so it's bad. + var value := complex_function() In some cases, the type must be stated explicitly, otherwise the behavior will not be as expected because the compiler will only be able to use @@ -932,7 +940,7 @@ should set the type explicitly. :: - @onready var health_bar: ProgressBar = get_node("UI/LifeBar") + @onready var health_bar: ProgressBar = get_node("UI/LifeBar") Alternatively, you can use the ``as`` keyword to cast the return type, and that type will be used to infer the type of the var. @@ -941,8 +949,8 @@ that type will be used to infer the type of the var. :: - @onready var health_bar := get_node("UI/LifeBar") as ProgressBar - # health_bar will be typed as ProgressBar + @onready var health_bar := get_node("UI/LifeBar") as ProgressBar + # health_bar will be typed as ProgressBar This option is also considered more :ref:`type-safe` than the first. @@ -952,6 +960,6 @@ This option is also considered more :ref:`type-safe("res://compute_example.glsl"); - var shaderBytecode = shaderFile.GetSpirv(); - var shader = rd.ShaderCreateFromSpirv(shaderBytecode); + var shaderBytecode = shaderFile.GetSpirV(); + var shader = rd.ShaderCreateFromSpirV(shaderBytecode); Provide input data @@ -356,11 +356,11 @@ the data and print the results to our console. .. code-tab:: csharp // Read back the data from the buffers - var outputBytes = rd.BufferGetData(outputBuffer); + var outputBytes = rd.BufferGetData(buffer); var output = new float[input.Length]; Buffer.BlockCopy(outputBytes, 0, output, 0, outputBytes.Length); - GD.Print("Input: ", input) - GD.Print("Output: ", output) + GD.Print("Input: ", string.Join(", ", input)); + GD.Print("Output: ", string.Join(", ", output)); With that, you have everything you need to get started working with compute shaders. diff --git a/tutorials/shaders/converting_glsl_to_godot_shaders.rst b/tutorials/shaders/converting_glsl_to_godot_shaders.rst index c812baf13f5..56fcf49c600 100644 --- a/tutorials/shaders/converting_glsl_to_godot_shaders.rst +++ b/tutorials/shaders/converting_glsl_to_godot_shaders.rst @@ -74,13 +74,11 @@ rename ``main`` to ``fragment``. Macros ^^^^^^ -In keeping with its similarity to C, GLSL lets you use macros. Commonly -``#define`` is used to define constants or small functions. There is no -straightforward way to translate defines to Godot's shading language. If it is a -function that is defined, then replace with a function, and if it is a constant, -then replace with a uniform. For other macros (``#if``, ``#ifdef``, etc.), there -is no equivalent because they run during the pre-processing stage of -compilation. +The :ref:`Godot shader preprocessor` supports the following macros: +* ``#define`` / ``#undef`` +* ``#if``, ``#elif``, ``#else``, ``#endif``, ``defined()``, ``#ifdef``, ``#ifndef`` +* ``#include`` (only ``.gdshaderinc`` files and with a maximum depth of 25) +* ``#pragma disable_preprocessor``, which disables preprocessing for the rest of the file Variables ^^^^^^^^^ diff --git a/tutorials/shaders/img/visual_shader_create.png b/tutorials/shaders/img/visual_shader_create.png deleted file mode 100644 index e36820d1291..00000000000 Binary files a/tutorials/shaders/img/visual_shader_create.png and /dev/null differ diff --git a/tutorials/shaders/img/visual_shader_create.webp b/tutorials/shaders/img/visual_shader_create.webp new file mode 100644 index 00000000000..64ed1a69c58 Binary files /dev/null and b/tutorials/shaders/img/visual_shader_create.webp differ diff --git a/tutorials/shaders/img/visual_shader_create2.webp b/tutorials/shaders/img/visual_shader_create2.webp new file mode 100644 index 00000000000..02a5a55ce51 Binary files /dev/null and b/tutorials/shaders/img/visual_shader_create2.webp differ diff --git a/tutorials/shaders/shader_reference/shader_preprocessor.rst b/tutorials/shaders/shader_reference/shader_preprocessor.rst index 23c96851d45..fa2a855765b 100644 --- a/tutorials/shaders/shader_reference/shader_preprocessor.rst +++ b/tutorials/shaders/shader_reference/shader_preprocessor.rst @@ -61,8 +61,7 @@ anywhere within the shader (including in uniform hints). ``#define`` can also be used to insert arbitrary shader code at any location, while constants can't do that. -.. FIXME: An upstream bug (https://github.com/pygments/pygments/pull/2350), fixed but not published yet. -.. code-block:: none +.. code-block:: glsl shader_type spatial; diff --git a/tutorials/shaders/shader_reference/spatial_shader.rst b/tutorials/shaders/shader_reference/spatial_shader.rst index 007764162dc..995196cb01c 100644 --- a/tutorials/shaders/shader_reference/spatial_shader.rst +++ b/tutorials/shaders/shader_reference/spatial_shader.rst @@ -217,7 +217,7 @@ shader, this value can be used as desired. +----------------------------------------+--------------------------------------------------------+ | inout mat4 **MODEL_MATRIX** | Model space to world space transform. | +----------------------------------------+--------------------------------------------------------+ -| inout mat3 **WORLD_NORMAL_MATRIX** | | +| inout mat3 **MODEL_NORMAL_MATRIX** | | +----------------------------------------+--------------------------------------------------------+ | inout mat4 **PROJECTION_MATRIX** | View space to clip space transform. | +----------------------------------------+--------------------------------------------------------+ diff --git a/tutorials/shaders/shaders_style_guide.rst b/tutorials/shaders/shaders_style_guide.rst index 0d5185e13c5..107de14f703 100644 --- a/tutorials/shaders/shaders_style_guide.rst +++ b/tutorials/shaders/shaders_style_guide.rst @@ -346,8 +346,7 @@ the console, extra indentation should **not** be added within ``#if``, **Bad**: -.. FIXME: An upstream bug in Pygment related to #ifdef. -.. code-block:: none +.. code-block:: glsl #define heightmap_enabled diff --git a/tutorials/shaders/visual_shaders.rst b/tutorials/shaders/visual_shaders.rst index 798c5cc4b5f..9ee39ced79a 100644 --- a/tutorials/shaders/visual_shaders.rst +++ b/tutorials/shaders/visual_shaders.rst @@ -26,10 +26,14 @@ VisualShaders, create a new ``ShaderMaterial`` in an object of your choice. Then assign a :ref:`class_VisualShader` resource to the ``Shader`` property. -.. image:: img/visual_shader_create.png +.. image:: img/visual_shader_create.webp -Click on the new ``VisualShader`` resource and the Visual Shader Editor will -open automatically. The layout of the Visual Shader Editor comprises two parts: +Click on the new ``Shader`` resource and the Create Shader dialog will +open automatically. Change the Type option to VisualShader in the dropdown. + +.. image:: img/visual_shader_create2.webp + +The layout of the Visual Shader Editor comprises two parts: the upper toolbar and the graph itself. .. image:: img/visual_shader_editor2.png diff --git a/tutorials/shaders/your_first_shader/your_first_2d_shader.rst b/tutorials/shaders/your_first_shader/your_first_2d_shader.rst index 93c6b0eedd5..63a536f5dc8 100644 --- a/tutorials/shaders/your_first_shader/your_first_2d_shader.rst +++ b/tutorials/shaders/your_first_shader/your_first_2d_shader.rst @@ -93,7 +93,7 @@ every pixel. We do so by writing a ``vec4`` to the built-in variable ``COLOR``. ``vec4`` is shorthand for constructing a vector with 4 numbers. For more information about -vectors see the :ref:`Vector math tutorial ` ``COLOR`` is both +vectors see the :ref:`Vector math tutorial `. ``COLOR`` is both an input variable to the fragment function and the final output from it. .. code-block:: glsl diff --git a/tutorials/shaders/your_first_shader/your_first_3d_shader.rst b/tutorials/shaders/your_first_shader/your_first_3d_shader.rst index 9d149691327..c0817a5c136 100644 --- a/tutorials/shaders/your_first_shader/your_first_3d_shader.rst +++ b/tutorials/shaders/your_first_shader/your_first_3d_shader.rst @@ -197,7 +197,7 @@ texture as the second argument. We use the ``x`` and ``z`` channels of ``VERTEX`` to determine where on the texture to look up. Note that the PlaneMesh coordinates are within the [-1,1] range (for a size of 2), while the texture coordinates are within [0,1], so to normalize we divide by the size of the -PlaneMesh 2.0 and add 0.5. ``texture()`` returns a ``vec4`` of the ``r, g, b, +PlaneMesh by 2.0 and add 0.5. ``texture()`` returns a ``vec4`` of the ``r, g, b, a`` channels at the position. Since the noise texture is grayscale, all of the values are the same, so we can use any one of the channels as the height. In this case we'll use the ``r``, or ``x`` channel. @@ -325,7 +325,7 @@ explained in more detail in the next part of this tutorial. When we have normals that correspond to a specific vertex we set ``NORMAL``, but if you have a normalmap that comes from a texture, set the normal using -``NORMAL_MAP``. This way Godot will handle the wrapping the texture around the +``NORMAL_MAP``. This way Godot will handle the wrapping of texture around the mesh automatically. Lastly, in order to ensure that we are reading from the same places on the noise diff --git a/tutorials/ui/bbcode_in_richtextlabel.rst b/tutorials/ui/bbcode_in_richtextlabel.rst index 1b54aefaa7c..9eb1f0ed195 100644 --- a/tutorials/ui/bbcode_in_richtextlabel.rst +++ b/tutorials/ui/bbcode_in_richtextlabel.rst @@ -711,11 +711,15 @@ Wave .. image:: img/bbcode_in_richtextlabel_effect_wave.webp Wave makes the text go up and down. Its tag format is -``[wave amp=50.0 freq=5.0]{text}[/wave]``. +``[wave amp=50.0 freq=5.0 connected=1]{text}[/wave]``. ``amp`` controls how high and low the effect goes, and ``freq`` controls how fast the text goes up and down. A ``freq`` value of ``0`` will result in no -visible waves, and negative ``freq`` values won't display any waves either. +visible waves, and negative ``freq`` values won't display any waves either. If +``connected`` is ``1`` (default), glyphs with ligatures will be moved together. +If ``connected`` is ``0``, each glyph is moved individually even if they are +joined by ligatures. This can work around certain rendering issues with font +ligatures. Tornado ~~~~~~~ @@ -723,21 +727,29 @@ Tornado .. image:: img/bbcode_in_richtextlabel_effect_tornado.webp Tornao makes the text move around in a circle. Its tag format is -``[tornado radius=10.0 freq=1.0]{text}[/tornado]``. +``[tornado radius=10.0 freq=1.0 connected=1]{text}[/tornado]``. ``radius`` is the radius of the circle that controls the offset, ``freq`` is how fast the text moves in a circle. A ``freq`` value of ``0`` will pause the -animation, while negative ``freq`` will play the animation backwards. +animation, while negative ``freq`` will play the animation backwards. If +``connected`` is ``1`` (default), glyphs with ligatures will be moved together. +If ``connected`` is ``0``, each glyph is moved individually even if they are +joined by ligatures. This can work around certain rendering issues with font +ligatures. Shake ~~~~~ .. image:: img/bbcode_in_richtextlabel_effect_shake.webp -Shake makes the text shake. Its tag format is ``[shake rate=20.0 level=5]{text}[/shake]``. +Shake makes the text shake. Its tag format is +``[shake rate=20.0 level=5 connected=1]{text}[/shake]``. -``rate`` controls how fast the text shakes, ``level`` controls how far the text is -offset from the origin. +``rate`` controls how fast the text shakes, ``level`` controls how far the text +is offset from the origin. If ``connected`` is ``1`` (default), glyphs with +ligatures will be moved together. If ``connected`` is ``0``, each glyph is moved +individually even if they are joined by ligatures. This can work around certain +rendering issues with font ligatures. Fade ~~~~ diff --git a/tutorials/ui/gui_using_fonts.rst b/tutorials/ui/gui_using_fonts.rst index cb23738347c..58c276ee798 100644 --- a/tutorials/ui/gui_using_fonts.rst +++ b/tutorials/ui/gui_using_fonts.rst @@ -145,9 +145,13 @@ property that accepts a Font resource. Fonts that have a pixel art appearance should have bilinear filtering disabled by changing the **Rendering > Textures > Canvas Textures > Default Texture Filter** - project setting to **Nearest**. The font size must also be an integer multiple of the - design size (which varies on a per-font basis), and the Control node using the font - must be scaled by an integer multiple as well. Otherwise, the font may look blurry. + project setting to **Nearest**. + + The font size must also be an integer multiple of the design size (which + varies on a per-font basis), and the Control node using the font must be + scaled by an integer multiple as well. Otherwise, the font may look blurry. + Font sizes in Godot are specified in pixels (px), not points (pt). Keep this + in mind when comparing font sizes across different software. The texture filter mode can also be set on individual nodes that inherit from CanvasItem by setting :ref:`CanvasItem.texture_filter `. @@ -293,6 +297,8 @@ The downsides of MSDF font rendering are: `Google Fonts `__, try downloading the font from the font author's official website instead. +.. _doc_using_fonts_emoji: + Using emoji ^^^^^^^^^^^ @@ -300,6 +306,9 @@ Godot has limited support for emoji fonts: - CBDT/CBLC (embedded PNGs) and SVG emoji fonts are supported. - COLR/CPAL emoji fonts (custom vector format) are **not** supported. +- EMJC bitmap image compression (used by iOS' system emoji font) is **not** supported. + This means that to support emoji on iOS, you must use a custom font that + uses SVG or PNG bitmap compression instead. For Godot to be able to display emoji, the font used (or one of its :ref:`fallbacks `) needs to include them. @@ -322,7 +331,6 @@ you get the expected result: Correct appearance after adding an emoji font to the label - To use a regular font alongside emoji, it's recommended to specify a :ref:`fallback font ` that points to the emoji font in the regular font's advanced import options. If you wish to use @@ -625,6 +633,14 @@ For example, here's the `Inter `__ font without the OpenType feature comparison (Inter) +You can disable ligatures and/or kerning for a specific font by adding OpenType +features, then unchecking them in the inspector: + +.. figure:: img/using_fonts_font_variation_disable_ligatures.webp + :align: center + + Disabling ligatures and kerning for a font + .. _doc_using_fonts_system_fonts: System fonts @@ -632,7 +648,7 @@ System fonts .. warning:: - Loading system fonts is only supported on Windows, macOS and Linux. + Loading system fonts is only supported on Windows, macOS, Linux, Android and iOS. System fonts are a different type of resource compared to imported fonts. They are never actually imported into the project, but are loaded at run-time. This @@ -644,6 +660,11 @@ has 2 benefits: issues that would occur if proprietary system fonts were distributed alongside the project. +The engine automatically uses system fonts as fallback fonts, which makes it +possible to display CJK characters and emoji without having to load a custom +font. There are some restrictions that apply though, as mentioned in the +:ref:`Using emoji ` section. + Create a SystemFont resource in the location where you desire to use the system font: .. figure:: img/using_fonts_system_font_create.webp @@ -660,19 +681,25 @@ You can either specify one or more font names explicitly (such as ``Arial``), or specify the name of a font *alias* that maps to a "standard" default font for the system: -+----------------+-----------------+----------------+-------------------------+ -| Font alias | Windows | macOS/iOS | Linux | -+================+=================+================+=========================+ -| ``sans-serif`` | Arial | Helvetica | *Handled by fontconfig* | -+----------------+-----------------+----------------+-------------------------+ -| ``serif`` | Times New Roman | Times | *Handled by fontconfig* | -+----------------+-----------------+----------------+-------------------------+ -| ``monospace`` | Courier New | Courier | *Handled by fontconfig* | -+----------------+-----------------+----------------+-------------------------+ -| ``cursive`` | Comic Sans MS | Apple Chancery | *Handled by fontconfig* | -+----------------+-----------------+----------------+-------------------------+ -| ``fantasy`` | Gabriola | Papyrus | *Handled by fontconfig* | -+----------------+-----------------+----------------+-------------------------+ +.. Android font information sourced from + ++----------------+-----------------+----------------+-------------------------+-------------------------+ +| Font alias | Windows | macOS/iOS | Linux | Android | ++================+=================+================+=========================+=========================+ +| ``sans-serif`` | Arial | Helvetica | *Handled by fontconfig* | Roboto / Noto Sans | ++----------------+-----------------+----------------+-------------------------+-------------------------+ +| ``serif`` | Times New Roman | Times | *Handled by fontconfig* | Noto Serif | ++----------------+-----------------+----------------+-------------------------+-------------------------+ +| ``monospace`` | Courier New | Courier | *Handled by fontconfig* | Droid Sans Mono | ++----------------+-----------------+----------------+-------------------------+-------------------------+ +| ``cursive`` | Comic Sans MS | Apple Chancery | *Handled by fontconfig* | Dancing Script | ++----------------+-----------------+----------------+-------------------------+-------------------------+ +| ``fantasy`` | Gabriola | Papyrus | *Handled by fontconfig* | Droid Sans Mono | ++----------------+-----------------+----------------+-------------------------+-------------------------+ + +On Android, Roboto is used for Latin/Cyrillic text and Noto Sans is used for +other languages' glyphs such as CJK. On third-party Android distributions, the +exact font selection may differ. If specifying more than one font, the first font that is found on the system will be used (from top to bottom). Font names and aliases are case-insensitive @@ -681,6 +708,11 @@ on all platforms. Like for font variations, you can save the SystemFont arrangement to a resource file to reuse it in other places. +Remember that different system fonts have different metrics, which means that +text that can fit within a rectangle on one platform may not be doing so on +another platform. Always reserve some additional space during development so +that labels can extend further if needed. + .. note:: Unlike Windows and macOS/iOS, the set of default fonts shipped on Linux diff --git a/tutorials/ui/img/using_fonts_font_variation_disable_ligatures.webp b/tutorials/ui/img/using_fonts_font_variation_disable_ligatures.webp new file mode 100644 index 00000000000..cd4fe1e8c48 Binary files /dev/null and b/tutorials/ui/img/using_fonts_font_variation_disable_ligatures.webp differ diff --git a/tutorials/xr/openxr_passthrough.rst b/tutorials/xr/openxr_passthrough.rst index 48ca11196bb..d8a1510ba5a 100644 --- a/tutorials/xr/openxr_passthrough.rst +++ b/tutorials/xr/openxr_passthrough.rst @@ -57,7 +57,7 @@ This will return a list of supported blend modes for submitting the main render We need to check if ``XR_ENV_BLEND_MODE_ALPHA_BLEND`` is present in this list. If so we can tell OpenXR to expect an image that can be alpha blended with a background. -To do this, we simply call ``set_environment_blend_mode(XR_ENV_BLEND_MODE_ALPHA_BLEND)``. +To do this, we simply call ``set_environment_blend_mode(xr_interface.XR_ENV_BLEND_MODE_ALPHA_BLEND)``. We must also set ``transparent_bg`` to true to ensure we submit the right image. @@ -74,8 +74,8 @@ Putting the above together we can use the following code as a base: return xr_interface.start_passthrough() else: var modes = xr_interface.get_supported_environment_blend_modes() - if XR_ENV_BLEND_MODE_ALPHA_BLEND in modes: - xr_interface.set_environment_blend_mode(XR_ENV_BLEND_MODE_ALPHA_BLEND) + if xr_interface.XR_ENV_BLEND_MODE_ALPHA_BLEND in modes: + xr_interface.set_environment_blend_mode(xr_interface.XR_ENV_BLEND_MODE_ALPHA_BLEND) return true else: return false